diff options
Diffstat (limited to 'flake.nix')
| -rw-r--r-- | flake.nix | 44 |
1 files changed, 32 insertions, 12 deletions
@@ -1,21 +1,41 @@ { - inputs.personal-webpage = { - url = "github:qaristote/webpage"; - inputs.nixpkgs.follows = ""; + inputs = { + personal-webpage = { + url = "github:qaristote/webpage"; + inputs = { + nixpkgs.follows = "/nixpkgs"; + flake-utils.follows = "/flake-utils"; + }; + }; }; - outputs = { self, nixpkgs, ... }@attrs: { - nixosConfigurations = { - hermes = nixpkgs.lib.nixosSystem { - system = "x86_64-linux"; - specialArgs = attrs; - modules = [ ./configuration.nix ./hardware-configuration.nix ]; + outputs = { self, nixpkgs, personal-webpage, flake-utils, ... }@attrs: + flake-utils.lib.eachDefaultSystem (system: { + overlays.default = final: prev: { + personal = import ./pkgs { pkgs = final; } // { + webpage = personal-webpage.defaultPackage."${system}"; + }; }; - hermes-test = nixpkgs.lib.nixosSystem { + }) // { + nixosModules.default = import ./modules; + nixosConfigurations = let system = "x86_64-linux"; specialArgs = attrs; - modules = [ ./tests/configuration.nix ]; + commonModules = [ + self.nixosModules.default + ({ ... }: { + nixpkgs.overlays = [ self.overlays."${system}".default ]; + }) + ]; + in { + hermes = nixpkgs.lib.nixosSystem { + inherit system specialArgs; + modules = commonModules ++ [ ./config ./hardware-configuration.nix ]; + }; + hermes-test = nixpkgs.lib.nixosSystem { + inherit system specialArgs; + modules = commonModules ++ [ ./tests/configuration.nix ]; + }; }; }; - }; } |
