This commit is contained in:
2023-02-18 17:23:23 -05:00
parent 2b45edc5cc
commit 6aab1d3443
2 changed files with 39 additions and 1 deletions

View File

@@ -24,9 +24,13 @@
inputs.nixpkgs.follows = "nixpkgs"; inputs.nixpkgs.follows = "nixpkgs";
}; };
#nixos-wsl
nixos-wsl.url = github:nix-community/NixOS-WSL;
nixos-wsl.inputs.nixpkgs.follows = "nixpkgs";
}; };
outputs = inputs@{ self, nixpkgs, home-manager, nixos-generators, deploy-rs outputs = inputs@{ self, nixpkgs, home-manager, nixos-generators, nixos-wsl,deploy-rs
, agenix, ... }: , agenix, ... }:
let let
system = "x86_64-linux"; system = "x86_64-linux";
@@ -53,6 +57,26 @@
}; };
nixos = nixpkgs.lib.nixosSystem {
system = "x86_64-linux";
# specialArgs = { inherit inputs; }; # Pass flake inputs to our config
modules = [
./hosts/wsl2
./modules
nixos-wsl.nixosModules.wsl
# Add agenix for secret management.
# agenix.nixosModules.age
# {
# environment.systemPackages = [agenix.defaultPackage.${system}];
# }
];
specialArgs = {
inherit inputs myData;
};
};
}; };
packages.x86_64-linux = { packages.x86_64-linux = {

14
hosts/wsl2/default.nix Normal file
View File

@@ -0,0 +1,14 @@
{ lib, pkgs, config, modulesPath, ... }:
{
wsl = {
enable = true;
automountPath = "/mnt";
defaultUser = "sstent";
startMenuLaunchers = true;
compatibility.interopPreserveArgvZero = true;
};
mymods = {
user_sstent.enable = true;
};
}