diff options
Diffstat (limited to 'flake.nix')
| -rw-r--r-- | flake.nix | 41 |
1 files changed, 41 insertions, 0 deletions
diff --git a/flake.nix b/flake.nix new file mode 100644 index 0000000..ac3ee30 --- /dev/null +++ b/flake.nix @@ -0,0 +1,41 @@ +{ + inputs = { + personal-webpage = { + url = "github:qaristote/webpage"; + inputs = { + nixpkgs.follows = "/nixpkgs"; + flake-utils.follows = "/flake-utils"; + }; + }; + }; + + 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}"; + }; + }; + }) // { + nixosModules.default = import ./modules; + nixosConfigurations = let + system = "x86_64-linux"; + specialArgs = attrs; + 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 ]; + }; + }; + }; +} |
