Add wsl-bootstrap config

This does not contain the home manager setup, since including that in
the bootstrap image appears to prevent home-manager from doing any updates
This commit is contained in:
Nathan McCarty 2023-06-15 13:54:20 -04:00
parent f0d33d6525
commit 086873fd91
No known key found for this signature in database
2 changed files with 28 additions and 4 deletions

View File

@ -182,8 +182,34 @@
wsl = makeNixosSystem {
system = "x86_64-linux";
hostName = "wsl";
extraModules =
[ wsl.nixosModules.wsl ./machines/wsl/configuration.nix ];
extraModules = [
wsl.nixosModules.wsl
./machines/wsl/configuration.nix
({ ... }: { # Setup home manager
home-manager.users.nathan = import ./machines/wsl/home.nix;
})
];
};
wsl-bootstrap = nixpkgs.lib.nixosSystem {
system = "x86_64-linux";
specialArgs = { inputs = inputs; };
modules = [
sops-nix.nixosModules.sops
hyprland.nixosModules.default
./modules/linux/default.nix
({ pkgs, lib, config, ... }: {
# Configure hostname
networking = { hostName = "wsl"; };
# Setup sops
# Add default secrets
sops = { age.sshKeyPaths = [ "/etc/ssh/ssh_host_ed25519_key" ]; };
nixpkgs.config.allowUnfree = true;
nixpkgs.config.allowUnfreePredicate = (pkg: true);
})
wsl.nixosModules.wsl
./machines/wsl/configuration.nix
];
};
# VMs

View File

@ -16,8 +16,6 @@
};
# Configure networking
networking = { domain = "mccarty.io"; };
# Setup home manager
home-manager.users.nathan = import ./home.nix;
# Setup WSL
wsl = {
enable = true;