Compare commits

...

3 commits

Author SHA1 Message Date
Nickiel12
8b3c0c2445 git flake update 2024-07-05 01:18:30 +00:00
Nickiel12
8f2cb9501d added kitty for gui wsl 2024-07-05 01:17:14 +00:00
Nickiel12
78361944cb Added WSL host 2024-07-04 23:30:56 +00:00
4 changed files with 219 additions and 52 deletions

View file

@ -10,11 +10,11 @@
]
},
"locked": {
"lastModified": 1719347071,
"narHash": "sha256-RWhQWZ6RVZaJlkzpPkoKPKcOgfc4nB/DJ7NYWa3SFW0=",
"lastModified": 1719991445,
"narHash": "sha256-0zSXPres0wlhS9n6h44ZzV0TOeWdMsICMlHAGjqkWGE=",
"owner": "atuinsh",
"repo": "atuin",
"rev": "fd3aca7cb3394d895d27e8cea26a02948b06d6f1",
"rev": "a67cfc82fe0dc907a01f07a0fd625701e062a33b",
"type": "github"
},
"original": {
@ -25,7 +25,7 @@
},
"devshell": {
"inputs": {
"flake-utils": "flake-utils_4",
"flake-utils": "flake-utils_5",
"nixpkgs": [
"nixvim",
"nixpkgs"
@ -73,11 +73,11 @@
"rust-analyzer-src": "rust-analyzer-src"
},
"locked": {
"lastModified": 1717827974,
"narHash": "sha256-ixopuTeTouxqTxfMuzs6IaRttbT8JqRW5C9Q/57WxQw=",
"lastModified": 1719728857,
"narHash": "sha256-TW68WegsA2KLjQMHTaP2//tLgXSaFiRdZKxKUc7vEtY=",
"owner": "nix-community",
"repo": "fenix",
"rev": "ab655c627777ab5f9964652fe23bbb1dfbd687a8",
"rev": "2c06f54eb102f325f88472a9713f6d779726c2f7",
"type": "github"
},
"original": {
@ -103,6 +103,22 @@
}
},
"flake-compat_2": {
"flake": false,
"locked": {
"lastModified": 1696426674,
"narHash": "sha256-kvjfFW7WAETZlt09AgDn1MrtKzP7t90Vf7vypd3OL1U=",
"owner": "edolstra",
"repo": "flake-compat",
"rev": "0f9255e01c2351cc7d116c072cb317785dd33b33",
"type": "github"
},
"original": {
"owner": "edolstra",
"repo": "flake-compat",
"type": "github"
}
},
"flake-compat_3": {
"locked": {
"lastModified": 1696426674,
"narHash": "sha256-kvjfFW7WAETZlt09AgDn1MrtKzP7t90Vf7vypd3OL1U=",
@ -116,7 +132,7 @@
"url": "https://flakehub.com/f/edolstra/flake-compat/1.tar.gz"
}
},
"flake-compat_3": {
"flake-compat_4": {
"flake": false,
"locked": {
"lastModified": 1696426674,
@ -140,11 +156,11 @@
]
},
"locked": {
"lastModified": 1717285511,
"narHash": "sha256-iKzJcpdXih14qYVcZ9QC9XuZYnPc6T8YImb6dX166kw=",
"lastModified": 1719877454,
"narHash": "sha256-g5N1yyOSsPNiOlFfkuI/wcUjmtah+nxdImJqrSATjOU=",
"owner": "hercules-ci",
"repo": "flake-parts",
"rev": "2a55567fcf15b1b1c7ed712a2c6fadaec7412ea8",
"rev": "4e3583423212f9303aa1a6337f8dffb415920e4f",
"type": "github"
},
"original": {
@ -211,6 +227,24 @@
"inputs": {
"systems": "systems_4"
},
"locked": {
"lastModified": 1710146030,
"narHash": "sha256-SZ5L6eA7HJ/nmkzGG7/ISclqe6oZdOZTNoesiInkXPQ=",
"owner": "numtide",
"repo": "flake-utils",
"rev": "b1d9ab70662946ef0850d488da1c9019f3a9752a",
"type": "github"
},
"original": {
"owner": "numtide",
"repo": "flake-utils",
"type": "github"
}
},
"flake-utils_5": {
"inputs": {
"systems": "systems_5"
},
"locked": {
"lastModified": 1701680307,
"narHash": "sha256-kAuep2h5ajznlPMD9rnQyffWG8EM/C73lejGofXvdM8=",
@ -227,7 +261,7 @@
},
"git-hooks": {
"inputs": {
"flake-compat": "flake-compat_3",
"flake-compat": "flake-compat_4",
"gitignore": "gitignore",
"nixpkgs": [
"nixvim",
@ -305,11 +339,11 @@
]
},
"locked": {
"lastModified": 1719180626,
"narHash": "sha256-vZAzm5KQpR6RGple1dzmSJw5kPivES2heCFM+ZWkt0I=",
"lastModified": 1720135141,
"narHash": "sha256-1GHh1/WO+f42TXxb1WiZFMuepM7ITA9iT+6yJBbBNsY=",
"owner": "nix-community",
"repo": "home-manager",
"rev": "6b1f90a8ff92e81638ae6eb48cd62349c3e387bb",
"rev": "c514e862cd5705e51edb6fe8d01146fdeec661f2",
"type": "github"
},
"original": {
@ -326,11 +360,11 @@
]
},
"locked": {
"lastModified": 1719180626,
"narHash": "sha256-vZAzm5KQpR6RGple1dzmSJw5kPivES2heCFM+ZWkt0I=",
"lastModified": 1719827439,
"narHash": "sha256-tneHOIv1lEavZ0vQ+rgz67LPNCgOZVByYki3OkSshFU=",
"owner": "nix-community",
"repo": "home-manager",
"rev": "6b1f90a8ff92e81638ae6eb48cd62349c3e387bb",
"rev": "59ce796b2563e19821361abbe2067c3bb4143a7d",
"type": "github"
},
"original": {
@ -386,11 +420,11 @@
]
},
"locked": {
"lastModified": 1719128254,
"narHash": "sha256-I7jMpq0CAOZA/i70+HDQO/ulLttyQu/K70cSESiMX7A=",
"lastModified": 1719845423,
"narHash": "sha256-ZLHDmWAsHQQKnmfyhYSHJDlt8Wfjv6SQhl2qek42O7A=",
"owner": "lnl7",
"repo": "nix-darwin",
"rev": "50581970f37f06a4719001735828519925ef8310",
"rev": "ec12b88104d6c117871fad55e931addac4626756",
"type": "github"
},
"original": {
@ -399,6 +433,27 @@
"type": "github"
}
},
"nixos-wsl": {
"inputs": {
"flake-compat": "flake-compat_2",
"flake-utils": "flake-utils_4",
"nixpkgs": "nixpkgs_6"
},
"locked": {
"lastModified": 1719220171,
"narHash": "sha256-xywM6JoGT8AwfoOFJBTv8GRlvNu8LYqqqMS/OQ6uCgE=",
"owner": "nix-community",
"repo": "NixOS-WSL",
"rev": "269411cfed6aab694e46f719277c972de96177bb",
"type": "github"
},
"original": {
"owner": "nix-community",
"ref": "main",
"repo": "NixOS-WSL",
"type": "github"
}
},
"nixpkgs": {
"locked": {
"lastModified": 1699099776,
@ -417,11 +472,11 @@
},
"nixpkgs-stable": {
"locked": {
"lastModified": 1719360816,
"narHash": "sha256-M+Y8bpqGFpQ6lqyEanI6n3PQyof0C10PtwFFnVKX5u8=",
"lastModified": 1719957072,
"narHash": "sha256-gvFhEf5nszouwLAkT9nWsDzocUTqLWHuL++dvNjMp9I=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "8f1ca02fb2097f3e724f8cf6057ddbbdefa7c6cc",
"rev": "7144d6241f02d171d25fba3edeaf15e0f2592105",
"type": "github"
},
"original": {
@ -497,11 +552,27 @@
},
"nixpkgs_6": {
"locked": {
"lastModified": 1719254875,
"narHash": "sha256-ECni+IkwXjusHsm9Sexdtq8weAq/yUyt1TWIemXt3Ko=",
"lastModified": 1718835956,
"narHash": "sha256-wM9v2yIxClRYsGHut5vHICZTK7xdrUGfrLkXvSuv6s4=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "dd457de7e08c6d06789b1f5b88fc9327f4d96309",
"type": "github"
},
"original": {
"owner": "NixOS",
"ref": "nixos-24.05",
"repo": "nixpkgs",
"type": "github"
}
},
"nixpkgs_7": {
"locked": {
"lastModified": 1720031269,
"narHash": "sha256-rwz8NJZV+387rnWpTYcXaRNvzUSnnF9aHONoJIYmiUQ=",
"owner": "nixos",
"repo": "nixpkgs",
"rev": "2893f56de08021cffd9b6b6dfc70fd9ccd51eb60",
"rev": "9f4128e00b0ae8ec65918efeba59db998750ead6",
"type": "github"
},
"original": {
@ -511,13 +582,13 @@
"type": "github"
}
},
"nixpkgs_7": {
"nixpkgs_8": {
"locked": {
"lastModified": 1719254875,
"narHash": "sha256-ECni+IkwXjusHsm9Sexdtq8weAq/yUyt1TWIemXt3Ko=",
"lastModified": 1719848872,
"narHash": "sha256-H3+EC5cYuq+gQW8y0lSrrDZfH71LB4DAf+TDFyvwCNA=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "2893f56de08021cffd9b6b6dfc70fd9ccd51eb60",
"rev": "00d80d13810dbfea8ab4ed1009b09100cca86ba8",
"type": "github"
},
"original": {
@ -530,20 +601,20 @@
"nixvim": {
"inputs": {
"devshell": "devshell",
"flake-compat": "flake-compat_2",
"flake-compat": "flake-compat_3",
"flake-parts": "flake-parts",
"git-hooks": "git-hooks",
"home-manager": "home-manager_2",
"nix-darwin": "nix-darwin",
"nixpkgs": "nixpkgs_7",
"nixpkgs": "nixpkgs_8",
"treefmt-nix": "treefmt-nix"
},
"locked": {
"lastModified": 1719349326,
"narHash": "sha256-siY3ck/6Ey2VyUpzziZ7XreM9h672CHEwTNuSqqnarA=",
"lastModified": 1720126856,
"narHash": "sha256-xtRwIUKv7EpuyGtvq+rO7PoZZIpD55AYe6rl+plEhY8=",
"owner": "nix-community",
"repo": "nixvim",
"rev": "1a46075dfe8dbbd2c99980b59af7860a1de010db",
"rev": "92e9f5466dcfd51e8e2e7627e992c1c9d5fc6fd6",
"type": "github"
},
"original": {
@ -560,7 +631,8 @@
"home-manager": "home-manager",
"kmonad": "kmonad",
"nicks_nextcloud_integrations": "nicks_nextcloud_integrations",
"nixpkgs": "nixpkgs_6",
"nixos-wsl": "nixos-wsl",
"nixpkgs": "nixpkgs_7",
"nixpkgs-stable": "nixpkgs-stable",
"nixvim": "nixvim",
"utils": "utils"
@ -569,11 +641,11 @@
"rust-analyzer-src": {
"flake": false,
"locked": {
"lastModified": 1717583671,
"narHash": "sha256-+lRAmz92CNUxorqWusgJbL9VE1eKCnQQojglRemzwkw=",
"lastModified": 1719576535,
"narHash": "sha256-YzF4P6YVInAjcR5eJHWefkKEu5t70KYVZMvdLODv8CM=",
"owner": "rust-lang",
"repo": "rust-analyzer",
"rev": "48bbdd6a74f3176987d5c809894ac33957000d19",
"rev": "9463d9eea4b87e651e7d8ed8425a9c92f23b1cdf",
"type": "github"
},
"original": {
@ -696,6 +768,21 @@
"type": "github"
}
},
"systems_6": {
"locked": {
"lastModified": 1681028828,
"narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=",
"owner": "nix-systems",
"repo": "default",
"rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e",
"type": "github"
},
"original": {
"owner": "nix-systems",
"repo": "default",
"type": "github"
}
},
"treefmt-nix": {
"inputs": {
"nixpkgs": [
@ -704,11 +791,11 @@
]
},
"locked": {
"lastModified": 1719243788,
"narHash": "sha256-9T9mSY35EZSM1KAwb7K9zwQ78qTlLjosZgtUGnw4rn4=",
"lastModified": 1719887753,
"narHash": "sha256-p0B2r98UtZzRDM5miGRafL4h7TwGRC4DII+XXHDHqek=",
"owner": "numtide",
"repo": "treefmt-nix",
"rev": "065a23edceff48f948816b795ea8cc6c0dee7cdf",
"rev": "bdb6355009562d8f9313d9460c0d3860f525bc6c",
"type": "github"
},
"original": {
@ -719,7 +806,7 @@
},
"utils": {
"inputs": {
"systems": "systems_5"
"systems": "systems_6"
},
"locked": {
"lastModified": 1710146030,

View file

@ -9,6 +9,8 @@
# url = "github:NixOS/nixpkgs/b477b25191fc94ce764428520b83b6b64366e3c8";
};
nixos-wsl.url = "github:nix-community/NixOS-WSL/main";
nixpkgs-stable = {
url = "github:NixOS/nixpkgs/release-23.11";
};
@ -43,6 +45,7 @@
ewwtilities,
kmonad,
atuin,
nixos-wsl,
...
}:
let
@ -90,6 +93,46 @@
];
};
# To change username after installing: https://nix-community.github.io/NixOS-WSL/how-to/change-username.html
NicksNixWSL = lib.nixosSystem {
inherit system;
modules = [
nixos-wsl.nixosModules.default
./hosts/WSL
{
networking.hostName = "NicksNixWSL";
system.stateVersion = "24.05";
# https://nix-community.github.io/NixOS-WSL/options.html
wsl = {
enable = true;
defaultUser = "nixolas";
# startMenuLaunchers = true;
useWindowsDriver = true;
};
}
#./hosts/WSL
home-manager.nixosModules.home-manager {
home-manager = {
useGlobalPkgs = true;
useUserPackages = true;
extraSpecialArgs = {
inherit user ewwtilities atuin pkgs-stable;
};
users.${user} = {
imports = [
(import ./home.nix)
# Add nixvim to the homemanager
inputs.nixvim.homeManagerModules.nixvim
];
};
};
}
];
};
NicksNixLaptop = lib.nixosSystem {
inherit system;
specialArgs = {

View file

@ -13,6 +13,7 @@ let
commandline_only_hosts = [
"Alaska"
"NicksNixWSL"
];
install_packages = with pkgs; [
@ -85,26 +86,28 @@ let
# Drawing tablet driver
opentabletdriver
];
filterNulls = list: builtins.filter (x: x != null) list;
in
{
imports = [
imports = filterNulls [
./modules/atuin.nix
./modules/discord.nix
#./modules/emacs.nix
./modules/fusuma.nix
./modules/git.nix
./modules/hyprland
./modules/kitty.nix
./modules/neovim.nix
./modules/rofi.nix
./modules/tmux.nix
./modules/wezterm.nix
./modules/xdg.nix
./modules/yazi.nix
./modules/zsh.nix
./modules/kitty.nix
(if (! builtins.elem osConfig.networking.hostName commandline_only_hosts ) then ./modules/hyprland else null)
(if (! builtins.elem osConfig.networking.hostName commandline_only_hosts ) then ./modules/discord.nix else null)
#./modules/emacs.nix
(if (! builtins.elem osConfig.networking.hostName commandline_only_hosts ) then ./modules/fusuma.nix else null)
(if (! builtins.elem osConfig.networking.hostName commandline_only_hosts ) then ./modules/rofi.nix else null)
];
# Let Home Manager install and manage itself.
programs.home-manager.enable = true;

34
hosts/WSL/default.nix Normal file
View file

@ -0,0 +1,34 @@
{ config, pkgs, ... }:
{
# See https://nix-community.github.io/NixOS-WSL/how-to/change-username.html
# to reset default WSL login
environment = {
shells = [
"/etc/profiles/per-user/nixolas/bin/zsh"
];
};
fonts.packages = with pkgs; [
(nerdfonts.override { fonts = ["DejaVuSansMono"]; })
dejavu_fonts
xkcd-font
];
nixpkgs.config.allowUnfree = true;
nix = {
gc = {
automatic = true;
options = "--delete-generations 20d";
};
settings = {
auto-optimise-store = true;
# max cores used per derivation
cores = 8;
# max derivations that can be built at once
# nix.settings.max-jobs = 2;
};
package = pkgs.nixVersions.stable;
extraOptions = "experimental-features = nix-command flakes";
};
}