Archived
0
0
Fork 0

add wsl config

This commit is contained in:
Daryl Ronningen 2023-01-02 05:19:31 +00:00
parent 2b9725807d
commit e3368738e7
3 changed files with 78 additions and 7 deletions

15
devices/wsl/base.nix Normal file
View file

@ -0,0 +1,15 @@
{ pkgs, ... }:
{
wsl = {
enable = true;
wslConf.automount.root = "/mnt";
defaultUser = "relms";
startMenuLaunchers = true;
nativeSystemd = true;
};
networking.hostName = "wsl";
system.stateVersion = "22.11";
}

View file

@ -1,5 +1,21 @@
{ {
"nodes": { "nodes": {
"flake-compat": {
"flake": false,
"locked": {
"lastModified": 1668681692,
"narHash": "sha256-Ht91NGdewz8IQLtWZ9LCeNXMSXHUss+9COoqu6JLmXU=",
"owner": "edolstra",
"repo": "flake-compat",
"rev": "009399224d5e398d03b22badca40a37ac85412a1",
"type": "github"
},
"original": {
"owner": "edolstra",
"repo": "flake-compat",
"type": "github"
}
},
"flake-utils": { "flake-utils": {
"locked": { "locked": {
"lastModified": 1644229661, "lastModified": 1644229661,
@ -47,11 +63,11 @@
}, },
"locked": { "locked": {
"dir": "contrib", "dir": "contrib",
"lastModified": 1672440083, "lastModified": 1672586299,
"narHash": "sha256-CsOplUdX18GGb190pRN1SuEqCqcFluUy4BoZ/W5/ou4=", "narHash": "sha256-a+fm3qTnpU63l84WN3qDva3U+13IKchw0FTJNvEOiYA=",
"owner": "neovim", "owner": "neovim",
"repo": "neovim", "repo": "neovim",
"rev": "99cf111289bfcd14981255e805da43bac5139141", "rev": "c590641febf4d03e89c46f8e7ef4c3fb2a455520",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -61,6 +77,30 @@
"type": "github" "type": "github"
} }
}, },
"nixos-wsl": {
"inputs": {
"flake-compat": "flake-compat",
"flake-utils": [
"utils"
],
"nixpkgs": [
"nixpkgs"
]
},
"locked": {
"lastModified": 1672225470,
"narHash": "sha256-CL81URMZdjwCbqYY+WqIZAo1aj9moWNPISJaRw2YwV4=",
"owner": "nix-community",
"repo": "nixos-wsl",
"rev": "79fa1eb78f746c30e41f1be76a209a407b25dc9d",
"type": "github"
},
"original": {
"owner": "nix-community",
"repo": "nixos-wsl",
"type": "github"
}
},
"nixpkgs": { "nixpkgs": {
"locked": { "locked": {
"lastModified": 1672350804, "lastModified": 1672350804,
@ -79,11 +119,11 @@
}, },
"nur": { "nur": {
"locked": { "locked": {
"lastModified": 1672476334, "lastModified": 1672635614,
"narHash": "sha256-y1Hb9FrF/PJaaEneN9x73BIR8eAl5jBn8Fafc+1FoI4=", "narHash": "sha256-zUZFJe6YUBF0XAHl4/ZDojhxEaFTklKXNhqBDMXfn+8=",
"owner": "nix-community", "owner": "nix-community",
"repo": "NUR", "repo": "NUR",
"rev": "c960f8caf6b26f6f43b9a38b4e21c8e4bd6f5090", "rev": "65ff12f2eb0857f2777211e40093d932e24ae992",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -96,6 +136,7 @@
"inputs": { "inputs": {
"home-manager": "home-manager", "home-manager": "home-manager",
"neovim": "neovim", "neovim": "neovim",
"nixos-wsl": "nixos-wsl",
"nixpkgs": "nixpkgs", "nixpkgs": "nixpkgs",
"nur": "nur", "nur": "nur",
"utils": "utils_2" "utils": "utils_2"

View file

@ -13,8 +13,12 @@
nur.url = "github:nix-community/NUR"; nur.url = "github:nix-community/NUR";
utils.url = "github:gytis-ivaskevicius/flake-utils-plus"; utils.url = "github:gytis-ivaskevicius/flake-utils-plus";
nixos-wsl.url = "github:nix-community/nixos-wsl";
nixos-wsl.inputs.nixpkgs.follows = "nixpkgs";
nixos-wsl.inputs.flake-utils.follows = "utils";
}; };
outputs = { self, nixpkgs, utils, home-manager, neovim, nur, ... }: let outputs = { self, nixpkgs, utils, home-manager, neovim, nur, nixos-wsl, ... }: let
modules = { modules = {
home = [ home = [
./users/relms/home.nix ./users/relms/home.nix
@ -61,6 +65,17 @@
./devices/skynet/hardware.nix ./devices/skynet/hardware.nix
]; ];
}; };
wsl = nixpkgs.lib.nixosSystem {
inherit pkgs;
system = "x86_64-linux";
modules = [
nixos-wsl.nixosModules.wsl
./common/personal.nix
./common/nix.nix
./devices/wsl/base.nix
];
};
}; };
homeConfigurations.relms = home-manager.lib.homeManagerConfiguration { homeConfigurations.relms = home-manager.lib.homeManagerConfiguration {