diff --git a/flake.lock b/flake.lock index 5069173..9dc0f62 100644 --- a/flake.lock +++ b/flake.lock @@ -22,6 +22,22 @@ "type": "github" } }, + "flake-compat": { + "flake": false, + "locked": { + "lastModified": 1747046372, + "narHash": "sha256-CIVLLkVgvHYbgI2UpXvIIBJ12HWgX+fjA8Xf8PUmqCY=", + "owner": "edolstra", + "repo": "flake-compat", + "rev": "9100a0f413b0c601e0533d1d94ffd501ce2e7885", + "type": "github" + }, + "original": { + "owner": "edolstra", + "repo": "flake-compat", + "type": "github" + } + }, "flake-utils": { "inputs": { "systems": "systems" @@ -77,6 +93,28 @@ "type": "github" } }, + "nixos-wsl": { + "inputs": { + "flake-compat": "flake-compat", + "nixpkgs": [ + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1752199438, + "narHash": "sha256-xSBMmGtq8K4Qv80TMqREmESCAsRLJRHAbFH2T/2Bf1Y=", + "owner": "nix-community", + "repo": "NixOS-WSL", + "rev": "d34d9412556d3a896e294534ccd25f53b6822e80", + "type": "github" + }, + "original": { + "owner": "nix-community", + "ref": "main", + "repo": "NixOS-WSL", + "type": "github" + } + }, "nixpkgs": { "locked": { "lastModified": 1750330365, @@ -115,6 +153,7 @@ "flake-utils": "flake-utils", "home-manager": "home-manager", "nixos-hardware": "nixos-hardware", + "nixos-wsl": "nixos-wsl", "nixpkgs": "nixpkgs", "unstable": "unstable", "update": "update" diff --git a/flake.nix b/flake.nix index 9755dc4..4d9a232 100644 --- a/flake.nix +++ b/flake.nix @@ -15,6 +15,10 @@ url = "github:nix-community/emacs-overlay/master"; inputs.nixpkgs.follows = "nixpkgs"; }; + nixos-wsl = { + url = "github:nix-community/NixOS-WSL/main"; + inputs.nixpkgs.follows = "nixpkgs"; + }; }; outputs = { self, nixpkgs, update, unstable, home-manager, nixos-hardware, emacs-overlay, ... }@inputs: @@ -49,28 +53,37 @@ (map mkSystem ["NixDawn" "NixFrame"])) // { - NixGate = pkgs.lib.nixosSystem { - inherit system; - specialArgs = { inherit inputs; }; - modules = [ - ./common/configuration.nix - ./hosts/NixGate/configuration.nix - ]; - }; + NixWSL = nixpkgs.lib.nixosSystem { + inherit system; + specialArgs = { inherit inputs; }; + modules = [ + ./common/configuration.nix + ./hosts/NixWSL/configuration.nix + ]; + }; - NixSentinel = pkgs.lib.nixosSystem { - inherit system; - specialArgs = { inherit inputs; }; - modules = [ - ./common/configuration.nix - ./hosts/NixSentinel/configuration.nix - ]; - }; + NixGate = nixpkgs.lib.nixosSystem { + inherit system; + specialArgs = { inherit inputs; }; + modules = [ + ./common/configuration.nix + ./hosts/NixGate/configuration.nix + ]; + }; - # LenoNix = nixpkgs.lib.nixosSystem { - # system = "x86_64-linux"; - # modules = [ ./hosts/NixFrame/configuration.nix ]; - # }; + NixSentinel = nixpkgs.lib.nixosSystem { + inherit system; + specialArgs = { inherit inputs; }; + modules = [ + ./common/configuration.nix + ./hosts/NixSentinel/configuration.nix + ]; + }; + + # LenoNix = nixpkgs.lib.nixosSystem { + # system = "x86_64-linux"; + # modules = [ ./hosts/NixFrame/configuration.nix ]; + # }; }; packages."${system}" = { diff --git a/hosts/NixGate/configuration.nix b/hosts/NixGate/configuration.nix index 83a05d5..675e97a 100644 --- a/hosts/NixGate/configuration.nix +++ b/hosts/NixGate/configuration.nix @@ -40,9 +40,9 @@ }; # Configure keymap in X11 - services.xserver = { + services.xserver.xkb = { layout = "us"; - xkbVariant = ""; + variant = ""; }; # Virtualizer Agent diff --git a/hosts/NixWSL/configuration.nix b/hosts/NixWSL/configuration.nix new file mode 100644 index 0000000..bf3e2c8 --- /dev/null +++ b/hosts/NixWSL/configuration.nix @@ -0,0 +1,30 @@ +# Edit this configuration file to define what should be installed on +# your system. Help is available in the configuration.nix(5) man page, on +# https://search.nixos.org/options and in the NixOS manual (`nixos-help`). + +# NixOS-WSL specific options are documented on the NixOS-WSL repository: +# https://github.com/nix-community/NixOS-WSL + +{ config, lib, pkgs, inputs, ... }: + +{ + imports = [ + ../../common/configuration.nix + ../../common/user-facing.nix + ../../common/development-machine.nix + inputs.nixos-wsl.nixosModules.default + ]; + + networking.hostName = "NixWSL"; + + wsl.enable = true; + wsl.defaultUser = "benson"; + + # This value determines the NixOS release from which the default + # settings for stateful data, like file locations and database versions + # on your system were taken. It's perfectly fine and recommended to leave + # this value at the release version of the first install of this system. + # Before changing this value read the documentation for this option + # (e.g. man configuration.nix or on https://nixos.org/nixos/options.html). + system.stateVersion = "24.05"; # Did you read the comment? +}