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(vali): wsl basic config

cosmeak bd0acb79 a04e4190

+117 -1
+72
flake.lock
··· 20 20 "type": "github" 21 21 } 22 22 }, 23 + "flake-compat": { 24 + "flake": false, 25 + "locked": { 26 + "lastModified": 1696426674, 27 + "narHash": "sha256-kvjfFW7WAETZlt09AgDn1MrtKzP7t90Vf7vypd3OL1U=", 28 + "owner": "edolstra", 29 + "repo": "flake-compat", 30 + "rev": "0f9255e01c2351cc7d116c072cb317785dd33b33", 31 + "type": "github" 32 + }, 33 + "original": { 34 + "owner": "edolstra", 35 + "repo": "flake-compat", 36 + "type": "github" 37 + } 38 + }, 23 39 "flake-parts": { 24 40 "inputs": { 25 41 "nixpkgs-lib": "nixpkgs-lib" ··· 38 54 "type": "github" 39 55 } 40 56 }, 57 + "flake-utils": { 58 + "inputs": { 59 + "systems": "systems" 60 + }, 61 + "locked": { 62 + "lastModified": 1726560853, 63 + "narHash": "sha256-X6rJYSESBVr3hBoH0WbKE5KvhPU5bloyZ2L4K60/fPQ=", 64 + "owner": "numtide", 65 + "repo": "flake-utils", 66 + "rev": "c1dfcf08411b08f6b8615f7d8971a2bfa81d5e8a", 67 + "type": "github" 68 + }, 69 + "original": { 70 + "owner": "numtide", 71 + "repo": "flake-utils", 72 + "type": "github" 73 + } 74 + }, 41 75 "home-manager": { 42 76 "inputs": { 43 77 "nixpkgs": [ ··· 79 113 "type": "github" 80 114 } 81 115 }, 116 + "nixos-wsl": { 117 + "inputs": { 118 + "flake-compat": "flake-compat", 119 + "flake-utils": "flake-utils", 120 + "nixpkgs": [ 121 + "nixpkgs" 122 + ] 123 + }, 124 + "locked": { 125 + "lastModified": 1729494942, 126 + "narHash": "sha256-c/WV0R0WWuK2UAjTCGntaa+y1UVPsTUJZXqwwKxcmYs=", 127 + "owner": "nix-community", 128 + "repo": "NixOS-WSL", 129 + "rev": "f26ca94fdcfc1a3adfee70e4ed5e2d8b1bab4317", 130 + "type": "github" 131 + }, 132 + "original": { 133 + "owner": "nix-community", 134 + "repo": "NixOS-WSL", 135 + "type": "github" 136 + } 137 + }, 82 138 "nixpkgs": { 83 139 "locked": { 84 140 "lastModified": 1728538411, ··· 144 200 "darwin": "darwin", 145 201 "home-manager": "home-manager", 146 202 "nix-gaming": "nix-gaming", 203 + "nixos-wsl": "nixos-wsl", 147 204 "nixpkgs": "nixpkgs_2", 148 205 "nixpkgs-unstable": "nixpkgs-unstable" 206 + } 207 + }, 208 + "systems": { 209 + "locked": { 210 + "lastModified": 1681028828, 211 + "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=", 212 + "owner": "nix-systems", 213 + "repo": "default", 214 + "rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e", 215 + "type": "github" 216 + }, 217 + "original": { 218 + "owner": "nix-systems", 219 + "repo": "default", 220 + "type": "github" 149 221 } 150 222 }, 151 223 "umu": {
+15 -1
flake.nix
··· 10 10 inputs.nixpkgs.follows= "nixpkgs"; 11 11 }; 12 12 13 + nixos-wsl = { 14 + url = "github:nix-community/NixOS-WSL"; 15 + inputs.nixpkgs.follows= "nixpkgs"; 16 + }; 17 + 13 18 nix-gaming.url = "github:fufexan/nix-gaming"; 14 19 15 20 home-manager = { ··· 18 23 }; 19 24 }; 20 25 21 - outputs = inputs@{ self, nixpkgs, nixpkgs-unstable, darwin, home-manager, ... }: 26 + outputs = inputs@{ self, nixpkgs, nixpkgs-unstable, darwin, nixos-wsl, home-manager, ... }: 22 27 let 23 28 inherit (self) outputs; 24 29 # Currently supported systems ··· 50 55 cosmeak = import ./homes/cosmeak-loki/home.nix; 51 56 }; 52 57 } 58 + ]; 59 + }; 60 + 61 + vali = nixpkgs.lib.nixosSystem { 62 + specialArgs = { inherit inputs outputs; }; 63 + system = "x86_64-linux"; 64 + modules = [ 65 + nixos-wsl.nixosModules.wsl 66 + ./hosts/vali/configuration.nix 53 67 ]; 54 68 }; 55 69
+30
hosts/vali/configuration.nix
··· 1 + # Edit this configuration file to define what should be installed on 2 + # your system. Help is available in the configuration.nix(5) man page, on 3 + # https://search.nixos.org/options and in the NixOS manual (`nixos-help`). 4 + 5 + # NixOS-WSL specific options are documented on the NixOS-WSL repository: 6 + # https://github.com/nix-community/NixOS-WSL 7 + 8 + { config, lib, pkgs, ... }: 9 + 10 + { 11 + wsl.enable = true; 12 + wsl.defaultUser = "vali"; 13 + 14 + environment.systemPackages = with pkgs; [ 15 + wget 16 + git 17 + lazygit 18 + php83 19 + php83Packages.composer 20 + nodejs_20 21 + ]; 22 + 23 + # This value determines the NixOS release from which the default 24 + # settings for stateful data, like file locations and database versions 25 + # on your system were taken. It's perfectly fine and recommended to leave 26 + # this value at the release version of the first install of this system. 27 + # Before changing this value read the documentation for this option 28 + # (e.g. man configuration.nix or on https://nixos.org/nixos/options.html). 29 + system.stateVersion = "24.05"; # Did you read the comment? 30 + }