Nix Flakes configuration for MacOS, NixOS and WSL
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

feat(beryllium): wsl host

+84 -42
+1 -1
README.md
··· 36 36 | `hydrogen` | ASUS ROG STRIX B760-I GAMING WIFI | Intel i5 13600kf | Nvidia 4070ti | 32Go | ❄️ | 🎮️ | 🟢️ | 37 37 | `helium` | - | Apple M2 Pro | Apple M2 Pro | 32Go | 🍎️ | ⌨️ | 🟢️ | 38 38 | `lithium` | Raspberry Pi4 b+ | - | - | 1Go | ❄️ | 🧨️ | 🟠 | 39 - | `beryllium` | WSL | Intel i5-1135G7 | - | 8Go | ❄️ | ⌨️ | 🔴 | 39 + | `beryllium` | WSL | Intel i5-1135G7 | - | 8Go | ❄️ | ⌨️ | 🟢️ | 40 40 | `boron` | Aorus B450 Elite | AMD Ryzen 3 3300X | Nvidia 1060 | 16Go | ❄️ | 🎮️ / ⌨️ | 🔴 | 41 41 | `carbon` | HP ProDesk 400 G1 DM | Intel Pentium G3250T | - | 8Go | ❄️ | 💾️ | 🔴 | 42 42 | `nitrogen` | MSI B450-A Pro Max | AMD Ryzen 5 3600x | Nvidia 1660ti | 16Go | ❄️ | 🎮️ | 🔴 |
+54 -1
flake.lock
··· 20 20 "type": "github" 21 21 } 22 22 }, 23 + "flake-compat": { 24 + "flake": false, 25 + "locked": { 26 + "lastModified": 1733328505, 27 + "narHash": "sha256-NeCCThCEP3eCl2l/+27kNNK7QrwZB1IJCrXfrbv5oqU=", 28 + "owner": "edolstra", 29 + "repo": "flake-compat", 30 + "rev": "ff81ac966bb2cae68946d5ed5fc4994f96d0ffec", 31 + "type": "github" 32 + }, 33 + "original": { 34 + "owner": "edolstra", 35 + "repo": "flake-compat", 36 + "type": "github" 37 + } 38 + }, 23 39 "hardware": { 24 40 "locked": { 25 41 "lastModified": 1741792691, ··· 111 127 "type": "github" 112 128 } 113 129 }, 130 + "nixpkgs_2": { 131 + "locked": { 132 + "lastModified": 1740865531, 133 + "narHash": "sha256-h00vGIh/jxcGl8aWdfnVRD74KuLpyY3mZgMFMy7iKIc=", 134 + "owner": "NixOS", 135 + "repo": "nixpkgs", 136 + "rev": "5ef6c425980847c78a80d759abc476e941a9bf42", 137 + "type": "github" 138 + }, 139 + "original": { 140 + "owner": "NixOS", 141 + "ref": "nixos-24.11", 142 + "repo": "nixpkgs", 143 + "type": "github" 144 + } 145 + }, 114 146 "root": { 115 147 "inputs": { 116 148 "darwin": "darwin", 117 149 "hardware": "hardware", 118 150 "jovian": "jovian", 119 151 "nixpkgs": "nixpkgs", 120 - "nixpkgs-stable": "nixpkgs-stable" 152 + "nixpkgs-stable": "nixpkgs-stable", 153 + "wsl": "wsl" 154 + } 155 + }, 156 + "wsl": { 157 + "inputs": { 158 + "flake-compat": "flake-compat", 159 + "nixpkgs": "nixpkgs_2" 160 + }, 161 + "locked": { 162 + "lastModified": 1742209789, 163 + "narHash": "sha256-D3GWoPC7dbF4LSJ5VfskuD6K77Ej4WyTsynJ06eh9kw=", 164 + "owner": "nix-community", 165 + "repo": "NixOS-WSL", 166 + "rev": "bc827c2924c46f2344d3168fd82c6711aaceb610", 167 + "type": "github" 168 + }, 169 + "original": { 170 + "owner": "nix-community", 171 + "ref": "main", 172 + "repo": "NixOS-WSL", 173 + "type": "github" 121 174 } 122 175 } 123 176 },
+14 -8
flake.nix
··· 19 19 inputs.nixpkgs.follows= "nixpkgs"; 20 20 }; 21 21 22 + # WSL modules 23 + wsl.url = "github:nix-community/NixOS-WSL/main"; 24 + 22 25 # Gaming like a steam machine 23 26 jovian = { 24 27 url = "github:Jovian-Experiments/Jovian-NixOS"; ··· 65 68 }; 66 69 67 70 # Little server for testing things 68 - # beryllium = nixpkgs.lib.nixosSystem { 69 - # system = "x86_64-linux"; 70 - # specialArgs = { 71 - # inherit inputs; 72 - # hostname = "beryllium"; 73 - # }; 74 - # modules = [ ./hosts/nixos/beryllium ] ++ nixosModules; 75 - # }; 71 + beryllium = nixpkgs.lib.nixosSystem { 72 + system = "x86_64-linux"; 73 + specialArgs = { 74 + inherit inputs; 75 + hostname = "beryllium"; 76 + }; 77 + modules = [ 78 + inputs.wsl.nixosModules.default 79 + ./hosts/nixos/beryllium 80 + ] ++ nixosModules; 81 + }; 76 82 77 83 # Rapsberry Pi 3b+ 78 84 lithium = nixpkgs.lib.nixosSystem {
+15 -32
hosts/nixos/beryllium/default.nix
··· 1 1 { self, inputs, pkgs, hostname, ... }: 2 2 { 3 - # imports = [ ./hardware.nix ]; 4 - 5 - # EFI Bootloader 6 - boot.loader.systemd-boot.enable = true; 7 - boot.loader.efi.canTouchEfiVariables = true; 8 - boot.loader.systemd-boot.configurationLimit = 10; 9 - 10 - # Locales 11 - i18n.defaultLocale = "en_US.UTF-8"; 12 - i18n.extraLocaleSettings = { 13 - LC_ADDRESS = "fr_FR.UTF-8"; 14 - LC_IDENTIFICATION = "fr_FR.UTF-8"; 15 - LC_MEASUREMENT = "fr_FR.UTF-8"; 16 - LC_MONETARY = "fr_FR.UTF-8"; 17 - LC_NAME = "fr_FR.UTF-8"; 18 - LC_NUMERIC = "fr_FR.UTF-8"; 19 - LC_PAPER = "fr_FR.UTF-8"; 20 - LC_TELEPHONE = "fr_FR.UTF-8"; 21 - LC_TIME = "fr_FR.UTF-8"; 22 - }; 23 - 24 - # Timezone 25 - time.timeZone = "Europe/Paris"; 26 - 27 - # Keyboard 28 - services.xserver.xkb.layout = "us"; 3 + # WSL configuration 4 + wsl.enable = true; 5 + wsl.docker-desktop.enable = true; 29 6 30 7 # Networking 31 - networking.networkmanager.enable = true; 32 8 networking.hostName = hostname; 33 9 34 - # Disable CUPS since this desktop will not print something. 35 - services.printing.enable = false; 10 + # Global packages 11 + environment.systemPackages = with pkgs; [ 12 + git 13 + wget 14 + ]; 15 + 16 + # Required to use it as vscode remote 17 + programs.nix-ld = { 18 + enable = true; 19 + }; 36 20 37 - # Common system configurations 38 - gems.system.garbageCollector.enable= true; 39 - gems.system.autoUpdate.enable = false; 21 + # Enable flakes and other experimental features 22 + nix.settings.experimental-features = [ "nix-command" "flakes" "pipe-operators" ]; 40 23 41 24 # This value determines the NixOS release from which the default 42 25 # settings for stateful data, like file locations and database versions