diff options
Diffstat (limited to 'flake.nix')
| -rw-r--r-- | flake.nix | 64 |
1 files changed, 37 insertions, 27 deletions
@@ -1,41 +1,51 @@ { inputs = { - nixpkgs.url = "nixpkgs/nixos-unstable"; + nixpkgs.url = "nixpkgs/nixos-22.11"; + nixpkgsUnstable.url = "nixpkgs/nixos-unstable"; nixos-wsl.url = "git+https://github.com/nix-community/NixOS-WSL?ref=main"; home-manager.url = "github:nix-community/home-manager"; home-manager.inputs.nixpkgs.follows = "nixpkgs"; + lanzaboote.url = "github:nix-community/lanzaboote"; }; - outputs = { + outputs = inputs @ { + self, nixpkgs, - nixos-wsl, - home-manager, + nixpkgsUnstable, ... - }: { - nixosConfigurations.glados-wsl = nixpkgs.lib.nixosSystem { - system = "x86_64-linux"; - modules = [ - home-manager.nixosModules.home-manager - { - home-manager.useGlobalPkgs = true; - home-manager.useUserPackages = true; - } + }: let + util = import ./util; + in { + nixosConfigurations = { + glados = util.host.mkHost { + name = "glados"; + modules = [ + self.lanzaboote.nixosModules.lanzaboote - ./hosts/glados-wsl + ./hosts/glados + ]; + pkgs = nixpkgsUnstable; + }; + glados-wsl = util.host.mkHost { + name = "glados-wsl"; + modules = [ + ./hosts/glados-wsl - nixos-wsl.nixosModules.wsl - ({lib, ...}: { - environment.noXlibs = lib.mkForce false; - wsl = { - enable = true; - defaultUser = "seth"; - nativeSystemd = true; - wslConf.network.hostname = "glados-wsl"; - startMenuLaunchers = false; - interop.includePath = false; - }; - }) - ]; + self.nixos-wsl.nixosModules.wsl + ({lib, ...}: { + environment.noXlibs = lib.mkForce false; + wsl = { + enable = true; + defaultUser = "seth"; + nativeSystemd = true; + wslConf.network.hostname = "glados-wsl"; + startMenuLaunchers = false; + interop.includePath = false; + }; + }) + ]; + pkgs = nixpkgs; + }; }; }; } |
