File tree Expand file tree Collapse file tree 8 files changed +102
-93
lines changed
Expand file tree Collapse file tree 8 files changed +102
-93
lines changed Original file line number Diff line number Diff line change 11{ pkgs , hostName , ... } :
2- let
3- hostId = builtins . substring 0 8 ( builtins . hashString "sha256" hostName ) ;
4- in
52{
63 nix . settings . experimental-features = [
74 "nix-command"
2926
3027 # Configure networking.
3128 networking = {
32- inherit hostId ;
3329 inherit hostName ;
3430 firewall . enable = true ;
3531 nftables . enable = true ;
Original file line number Diff line number Diff line change 88 package = pkgs-unstable . incus ;
99 } ;
1010
11+ users . users . onno . extraGroups = [ "incus-admin" ] ;
12+
1113 networking . firewall = {
1214 trustedInterfaces = [
1315 "incusbr0"
Original file line number Diff line number Diff line change 1+ { pkgs , hostName , ... } :
2+ {
3+ nix . settings . experimental-features = [
4+ "nix-command"
5+ "flakes"
6+ ] ;
7+ nixpkgs . hostPlatform = "x86_64-linux" ;
8+ system . stateVersion = "25.11" ;
9+
10+ # WSL-specific settings.
11+ wsl = {
12+ enable = true ;
13+ defaultUser = "onno" ;
14+ } ;
15+
16+ # Configure time and i18n.
17+ time . timeZone = "Europe/Amsterdam" ;
18+ i18n . defaultLocale = "en_US.UTF-8" ;
19+
20+ # Configure networking.
21+ networking = {
22+ inherit hostName ;
23+ } ;
24+
25+ # Configure security.
26+ security = {
27+ sudo = {
28+ execWheelOnly = true ;
29+ wheelNeedsPassword = false ;
30+ } ;
31+ } ;
32+
33+ # Enable automatic garbage collection.
34+ nix . gc = {
35+ automatic = true ;
36+ dates = "Sat 22:00" ;
37+ options = "--delete-older-than 30d" ;
38+ } ;
39+
40+ # Packages to be installed in system profile.
41+ environment = with pkgs ; {
42+ systemPackages = [
43+ git
44+ vim
45+ ] ;
46+ } ;
47+ }
Original file line number Diff line number Diff line change 2626 inputs . nixpkgs . follows = "nixpkgs-darwin" ;
2727 } ;
2828
29+ nixos-wsl = {
30+ url = "github:nix-community/NixOS-WSL/release-25.11" ;
31+ inputs . nixpkgs . follows = "nixpkgs" ;
32+ } ;
33+
2934 pre-commit-hooks = {
3035 url = "github:cachix/git-hooks.nix" ;
3136 inputs . nixpkgs . follows = "nixpkgs" ;
3944 disko ,
4045 home-manager ,
4146 nix-darwin ,
47+ nixos-wsl ,
4248 nixpkgs ,
4349 nixpkgs-unstable ,
4450 pre-commit-hooks ,
5359 darwinConfigurations =
5460 let
5561 system = "aarch64-darwin" ;
56- pkgs-unstable = nixpkgs-unstable . legacyPackages . ${ system } . pkgs ;
62+ pkgs-unstable = nixpkgs-unstable . legacyPackages . ${ system } ;
5763 in
5864 {
5965 macbook-pro = nix-darwin . lib . darwinSystem {
7783 nixosConfigurations =
7884 let
7985 system = "x86_64-linux" ;
80- pkgs-unstable = nixpkgs-unstable . legacyPackages . ${ system } . pkgs ;
86+ pkgs-unstable = nixpkgs-unstable . legacyPackages . ${ system } ;
8187 in
8288 {
8389 server-vesta = nixpkgs . lib . nixosSystem {
99105 ] ;
100106 } ;
101107
102- server-vulcan = nixpkgs . lib . nixosSystem {
108+ wsl-nixos = nixpkgs . lib . nixosSystem {
103109 inherit system ;
104110 specialArgs = {
105- hostName = "server-vulcan " ;
111+ hostName = "wsl-nixos " ;
106112 inherit catppuccin-hm ;
107113 inherit pkgs-unstable ;
108114 } ;
109115 modules = [
110- disko . nixosModules . disko
111- ./hardware/intel-aipc-devkit.nix
112- ./configurations/nixos/nixos.nix
113- ./configurations/nixos/services/openssh.nix
114- ./configurations/nixos/services/incus.nix
115- ./configurations/nixos/services/tailscale.nix
116+ nixos-wsl . nixosModules . default
117+ ./configurations/wsl/wsl.nix
116118 home-manager . nixosModules . home-manager
117119 ./home/config.nix
118120 ] ;
Load Diff This file was deleted.
Original file line number Diff line number Diff line change 4343 # Linux-specific configuration.
4444 ( lib . mkIf isLinux {
4545 extraGroups = [
46- "incus-admin"
4746 "wheel"
4847 ] ;
4948 home = "/home/onno" ;
Original file line number Diff line number Diff line change 4141
4242 ignores = [
4343 ".DS_Store"
44+ ".agents"
4445 ".env"
4546 ] ;
4647 } ;
You can’t perform that action at this time.
0 commit comments