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 b5233065f9
No known key found for this signature in database
2 changed files with 29 additions and 4 deletions

View File

@ -182,8 +182,35 @@
wsl = makeNixosSystem { wsl = makeNixosSystem {
system = "x86_64-linux"; system = "x86_64-linux";
hostName = "wsl"; hostName = "wsl";
extraModules = extraModules = [
[ wsl.nixosModules.wsl ./machines/wsl/configuration.nix ]; 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
home-manager.nixosModules.home-manager
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 # VMs

View File

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