diff options
Diffstat (limited to 'flake.nix')
| -rw-r--r-- | flake.nix | 55 |
1 files changed, 55 insertions, 0 deletions
diff --git a/flake.nix b/flake.nix new file mode 100644 index 0000000..ca34236 --- /dev/null +++ b/flake.nix @@ -0,0 +1,55 @@ +{ + inputs = { + personal-webpage = { + url = "git+https://git.aristote.fr/about-me/webpage"; + inputs.nixpkgs.follows = "/nixpkgs"; + }; + my-nixpkgs.url = "git+https://git.aristote.fr/nix/my-nixpkgs"; + nixpkgs.url = "github:NixOS/nixpkgs/nixos-26.05"; + }; + + outputs = + { + nixpkgs, + my-nixpkgs, + nixos-hardware, + personal-webpage, + ... + }: + { + nixosConfigurations = + let + system = "x86_64-linux"; + commonModules = [ + my-nixpkgs.nixosModules.personal + ( + { ... }: + { + nixpkgs.overlays = [ + (self: _: { + personal = { inherit (personal-webpage.packages."${self.stdenv.hostPlatform.system}") webpage; }; + }) + # TODO the order shouldn't matter, yet this overlay doesn't work + # if it comes first + my-nixpkgs.overlays.personal + ]; + } + ) + ]; + in + { + hermaphroditos = nixpkgs.lib.nixosSystem { + inherit system; + specialArgs = { inherit nixos-hardware; }; + modules = commonModules ++ [ + ./config + ./config/hardware + ]; + }; + hermaphroditos-test = nixpkgs.lib.nixosSystem { + inherit system; + modules = commonModules ++ [ ./tests/configuration.nix ]; + }; + }; + }; +} |
