diff options
Diffstat (limited to 'flake.nix')
-rw-r--r-- | flake.nix | 37 |
1 files changed, 36 insertions, 1 deletions
@@ -4,6 +4,10 @@ inputs = { nixpkgs.url = "github:nixos/nixpkgs/nixos-24.11"; + disko.url = "github:nix-community/disko"; + disko.inputs.nixpkgs.follows = "nixpkgs"; + nixos-facter-modules.url = "github:numtide/nixos-facter-modules"; + home-manager.url = "github:nix-community/home-manager/release-24.11"; home-manager.inputs.nixpkgs.follows = "nixpkgs"; @@ -25,7 +29,17 @@ astal-bar.url = "git+http://tarreltaart.home:3000/jras/astal-bar.git"; }; - outputs = { self, nixpkgs, home-manager, agenix, update-systemd-resolved, astal-bar, ... }@inputs: + outputs = inputs@{ + self, + nixpkgs, + disko, + nixos-facter-modules, + home-manager, + agenix, + update-systemd-resolved, + astal-bar, + ... + }: { nixosConfigurations.work = nixpkgs.lib.nixosSystem { system = "x86_64-linux"; @@ -70,5 +84,26 @@ } ]; }; + + nixosConfigurations.snorlax = nixpkgs.lib.nixosSystem { + system = "x86_64-linux"; + + modules = [ + { system.stateVersion = "24.11"; } + + disko.nixosModules.disko + nixos-facter-modules.nixosModules.facter + { + config.facter.reportPath = + if builtins.pathExists ./hardware/snorlax.json then + ./hardware/snorlax.json + else + throw "Have you forgotten to run nixos-anywhere with `--generate-hardware-config nixos-facter ./hardware/snorlax.json`?"; + } + + ./roles/server.nix + ./hardware/snorlax-disks.nix + ]; + }; }; } |