this repo has no description
0
fork

Configure Feed

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

Fully migrate to nixpkgs-unstable

Simplifies some nixpkgs stuff between darwin + nixos, but requires some
patching for yadm and other packages to work.

+265 -352
+21 -69
.config/flake.lock
··· 109 109 ] 110 110 }, 111 111 "locked": { 112 - "lastModified": 1725547597, 113 - "narHash": "sha256-Jo7IqIcNAfema1VIwUyEhamepjaP3woKMLs6+3ZabQ8=", 112 + "lastModified": 1736376026, 113 + "narHash": "sha256-m08PcOubafB3tIliK8FuvtSPjoOZlY58Ub11h6p34PA=", 114 114 "owner": "ian-h-chamberlain", 115 115 "repo": "home-manager", 116 - "rev": "a2a67db3ff99a8703fe566a1f83e4ad890e33451", 116 + "rev": "e48030e9a75fe1ed8e09dedd7884f76c12f23915", 117 117 "type": "github" 118 118 }, 119 119 "original": { ··· 148 148 "lix" 149 149 ], 150 150 "nixpkgs": [ 151 - "nixos-unstable" 151 + "nixos" 152 152 ] 153 153 }, 154 154 "locked": { ··· 166 166 "nix-darwin": { 167 167 "inputs": { 168 168 "nixpkgs": [ 169 - "nixpkgs-darwin" 169 + "nixpkgs" 170 170 ] 171 171 }, 172 172 "locked": { 173 - "lastModified": 1738033138, 174 - "narHash": "sha256-qlIM8A3bdL9c6PexhpS+QyZLO9y/8a3V75HVyJgDE5Q=", 173 + "lastModified": 1742013980, 174 + "narHash": "sha256-34YbfwABU5nb0F5eaaJE3ujldaNDhmyxw7CWqhXJV08=", 175 175 "owner": "LnL7", 176 176 "repo": "nix-darwin", 177 - "rev": "349a74c66c596ef97ee97b4d80a3ca61227b6120", 177 + "rev": "9175b4bb5f127fb7b5784b14f7e01abff24c378f", 178 178 "type": "github" 179 179 }, 180 180 "original": { ··· 191 191 "nix-darwin" 192 192 ], 193 193 "nixpkgs": [ 194 - "nixpkgs-darwin" 194 + "nixpkgs" 195 195 ] 196 196 }, 197 197 "locked": { ··· 208 208 "type": "github" 209 209 } 210 210 }, 211 - "nixos-unstable": { 211 + "nixos": { 212 212 "locked": { 213 - "lastModified": 1739736696, 214 - "narHash": "sha256-zON2GNBkzsIyALlOCFiEBcIjI4w38GYOb+P+R4S8Jsw=", 213 + "lastModified": 1741851582, 214 + "narHash": "sha256-cPfs8qMccim2RBgtKGF+x9IBCduRvd/N5F4nYpU0TVE=", 215 215 "owner": "NixOS", 216 216 "repo": "nixpkgs", 217 - "rev": "d74a2335ac9c133d6bbec9fc98d91a77f1604c1f", 217 + "rev": "6607cf789e541e7873d40d3a8f7815ea92204f32", 218 218 "type": "github" 219 219 }, 220 220 "original": { ··· 228 228 "inputs": { 229 229 "flake-compat": "flake-compat", 230 230 "flake-utils": "flake-utils_3", 231 - "nixpkgs": "nixpkgs" 231 + "nixpkgs": [ 232 + "nixos" 233 + ] 232 234 }, 233 235 "locked": { 234 236 "lastModified": 1728588346, ··· 247 249 }, 248 250 "nixpkgs": { 249 251 "locked": { 250 - "lastModified": 1728193676, 251 - "narHash": "sha256-PbDWAIjKJdlVg+qQRhzdSor04bAPApDqIv2DofTyynk=", 252 - "owner": "NixOS", 253 - "repo": "nixpkgs", 254 - "rev": "ecbc1ca8ffd6aea8372ad16be9ebbb39889e55b6", 255 - "type": "github" 256 - }, 257 - "original": { 258 - "owner": "NixOS", 259 - "ref": "nixos-24.05", 260 - "repo": "nixpkgs", 261 - "type": "github" 262 - } 263 - }, 264 - "nixpkgs-darwin": { 265 - "locked": { 266 - "lastModified": 1735564410, 267 - "narHash": "sha256-HB/FA0+1gpSs8+/boEavrGJH+Eq08/R2wWNph1sM1Dg=", 252 + "lastModified": 1741513245, 253 + "narHash": "sha256-7rTAMNTY1xoBwz0h7ZMtEcd8LELk9R5TzBPoHuhNSCk=", 268 254 "owner": "NixOS", 269 255 "repo": "nixpkgs", 270 - "rev": "1e7a8f391f1a490460760065fa0630b5520f9cf8", 271 - "type": "github" 272 - }, 273 - "original": { 274 - "owner": "NixOS", 275 - "ref": "nixpkgs-24.05-darwin", 276 - "repo": "nixpkgs", 277 - "type": "github" 278 - } 279 - }, 280 - "nixpkgs-unstable": { 281 - "locked": { 282 - "lastModified": 1738136902, 283 - "narHash": "sha256-pUvLijVGARw4u793APze3j6mU1Zwdtz7hGkGGkD87qw=", 284 - "owner": "NixOS", 285 - "repo": "nixpkgs", 286 - "rev": "9a5db3142ce450045840cc8d832b13b8a2018e0c", 256 + "rev": "e3e32b642a31e6714ec1b712de8c91a3352ce7e1", 287 257 "type": "github" 288 258 }, 289 259 "original": { ··· 293 263 "type": "github" 294 264 } 295 265 }, 296 - "nixpkgs_2": { 297 - "locked": { 298 - "lastModified": 1735563628, 299 - "narHash": "sha256-OnSAY7XDSx7CtDoqNh8jwVwh4xNL/2HaJxGjryLWzX8=", 300 - "owner": "NixOS", 301 - "repo": "nixpkgs", 302 - "rev": "b134951a4c9f3c995fd7be05f3243f8ecd65d798", 303 - "type": "github" 304 - }, 305 - "original": { 306 - "owner": "NixOS", 307 - "ref": "nixos-24.05", 308 - "repo": "nixpkgs", 309 - "type": "github" 310 - } 311 - }, 312 266 "root": { 313 267 "inputs": { 314 268 "home-manager": "home-manager", ··· 316 270 "lix-module": "lix-module", 317 271 "nix-darwin": "nix-darwin", 318 272 "nix-homebrew": "nix-homebrew", 319 - "nixos-unstable": "nixos-unstable", 273 + "nixos": "nixos", 320 274 "nixos-wsl": "nixos-wsl", 321 - "nixpkgs": "nixpkgs_2", 322 - "nixpkgs-darwin": "nixpkgs-darwin", 323 - "nixpkgs-unstable": "nixpkgs-unstable" 275 + "nixpkgs": "nixpkgs" 324 276 } 325 277 }, 326 278 "systems": {
+144 -187
.config/flake.nix
··· 12 12 ''; 13 13 14 14 inputs = { 15 - # Gah there's so many of these!!! 16 - nixpkgs.url = "github:NixOS/nixpkgs/nixos-24.05"; 17 - nixos-unstable.url = "github:NixOS/nixpkgs/nixos-unstable"; 15 + # Nixpkgs 16 + nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable"; 17 + nixos.url = "github:NixOS/nixpkgs/nixos-unstable"; 18 18 19 - nixpkgs-darwin.url = "github:NixOS/nixpkgs/nixpkgs-24.05-darwin"; 20 - nixpkgs-unstable.url = "github:NixOS/nixpkgs/nixpkgs-unstable"; 21 - 22 - nixos-wsl.url = "github:nix-community/NixOS-WSL/main"; 23 - 24 - nix-darwin = { 25 - url = "github:LnL7/nix-darwin"; 26 - inputs.nixpkgs.follows = "nixpkgs-darwin"; 19 + # Nix itself, i.e. Lix 20 + lix = { 21 + url = "git+https://git.lix.systems/lix-project/lix.git?ref=main"; 22 + flake = false; 27 23 }; 24 + lix-module = { 25 + url = "https://git.lix.systems/lix-project/nixos-module/archive/main.tar.gz"; 26 + inputs.nixpkgs.follows = "nixos"; 27 + inputs.lix.follows = "lix"; 28 + }; 29 + 30 + # Home-manager, OS-specific modules, etc. 28 31 home-manager = { 29 32 # Until I get around to upstreaming this patch for 30 33 # https://github.com/nix-community/home-manager/issues/5602 31 34 url = "github:ian-h-chamberlain/home-manager?ref=feature/fish-session-vars-pkg"; 32 35 inputs.nixpkgs.follows = "nixpkgs"; 33 36 }; 37 + nixos-wsl = { 38 + url = "github:nix-community/NixOS-WSL/main"; 39 + inputs.nixpkgs.follows = "nixos"; 40 + }; 41 + nix-darwin = { 42 + url = "github:LnL7/nix-darwin"; 43 + inputs.nixpkgs.follows = "nixpkgs"; 44 + }; 34 45 nix-homebrew = { 35 46 url = "github:zhaofengli/nix-homebrew"; 36 - inputs.nixpkgs.follows = "nixpkgs-darwin"; 47 + inputs.nixpkgs.follows = "nixpkgs"; 37 48 inputs.nix-darwin.follows = "nix-darwin"; 38 49 }; 39 - 40 - lix = { 41 - url = "git+https://git.lix.systems/lix-project/lix.git?ref=main"; 42 - flake = false; 43 - }; 44 - lix-module = { 45 - url = "https://git.lix.systems/lix-project/nixos-module/archive/main.tar.gz"; 46 - inputs.nixpkgs.follows = "nixos-unstable"; 47 - inputs.lix.follows = "lix"; 48 - }; 49 50 }; 50 51 51 52 outputs = 52 - inputs@{ 53 - self, 54 - nixpkgs, 55 - nix-darwin, 56 - home-manager, 57 - nix-homebrew, 58 - ... 53 + inputs@{ self 54 + , nixpkgs 55 + , nix-darwin 56 + , home-manager 57 + , nix-homebrew 58 + , ... 59 59 }: 60 60 let 61 61 inherit (builtins) mapAttrs; ··· 117 117 118 118 systemPkgsFor = 119 119 host: 120 - if isDarwin host.system then 121 - inputs.nixpkgs-darwin.legacyPackages.${host.system} 122 - else 123 - inputs.nixpkgs.legacyPackages.${host.system}; 124 - 125 - unstablePkgsFor = 126 - host: 127 - if isNixOS host then 128 - inputs.nixos-unstable.legacyPackages.${host.system} 129 - else 130 - inputs.nixpkgs-unstable.legacyPackages.${host.system}; 120 + inputs.nixpkgs.legacyPackages.${host.system}; 131 121 132 122 specialArgsFor = 133 123 hostname: 134 - let 135 - # Since nixpkgs.pkgs is using 24.05, the nixosModule from lix-module is 136 - # unusable (depends on newer things), so we just manually apply this overlay on unstable: 137 - unstable = (unstablePkgsFor hosts.${hostname}).extend inputs.lix-module.overlays.default; 138 - 139 - in 140 124 { 141 - inherit self unstable; 142 - host = hosts.${hostname} // { 143 - name = hostname; 144 - }; 125 + inherit self; 126 + host = { name = hostname; wsl = false; } // hosts.${hostname}; 145 127 }; 146 128 in 147 129 { 148 130 lib = import ./nix/lib.nix (inputs // { inherit lib; }); 149 131 150 - darwinConfigurations = mapAttrs ( 151 - hostname: 152 - { system, user, ... }: 153 - nix-darwin.lib.darwinSystem { 154 - inherit system; 155 - specialArgs = specialArgsFor hostname; 132 + darwinConfigurations = mapAttrs 133 + ( 134 + hostname: 135 + { system, user, ... }: 136 + nix-darwin.lib.darwinSystem { 137 + inherit system; 138 + specialArgs = specialArgsFor hostname; 156 139 157 - modules = [ 158 - ./nix-darwin/configuration.nix 159 - nix-homebrew.darwinModules.nix-homebrew 160 - { 161 - nix-homebrew = { 162 - enable = true; 163 - enableRosetta = true; 164 - inherit user; 140 + modules = [ 141 + ./nix-darwin/configuration.nix 142 + nix-homebrew.darwinModules.nix-homebrew 143 + { 144 + nix-homebrew = { 145 + enable = true; 146 + enableRosetta = true; 147 + inherit user; 148 + }; 149 + } 150 + home-manager.darwinModules.home-manager 151 + { 152 + # home-manager module expects this to be set: 153 + users.users.${user}.home = "/Users/${user}"; 154 + home-manager = { 155 + useGlobalPkgs = true; 156 + users.${user} = import ./home-manager/home.nix; 157 + extraSpecialArgs = specialArgsFor hostname; 158 + }; 159 + } 160 + ./nixpkgs/flake-overlays.nix 161 + ]; 162 + } 163 + ) 164 + darwinSystems; 165 165 166 - # bundlerGemGroups = [ "livecheck" "style" "audit" ]; 167 - # TODO: Declarative tap management 168 - }; 169 - } 170 - home-manager.darwinModules.home-manager 171 - { 172 - # home-manager module expects this to be set: 173 - users.users.${user}.home = "/Users/${user}"; 174 - home-manager = { 175 - useGlobalPkgs = true; 176 - users.${user} = import ./home-manager/home.nix; 177 - extraSpecialArgs = specialArgsFor hostname; 178 - }; 179 - } 180 - ./nixpkgs/flake-overlays.nix 181 - ]; 182 - } 183 - ) darwinSystems; 166 + nixosConfigurations = mapAttrs 167 + ( 168 + hostname: 169 + { system 170 + , user 171 + , wsl ? false 172 + , ... 173 + }: 174 + nixpkgs.lib.nixosSystem { 175 + inherit system; 176 + specialArgs = { 177 + inherit (inputs) lix-module; 178 + } // specialArgsFor hostname; 184 179 185 - nixosConfigurations = mapAttrs ( 186 - hostname: 187 - { 188 - system, 189 - user, 190 - wsl ? false, 191 - ... 192 - }: 193 - nixpkgs.lib.nixosSystem { 194 - inherit system; 195 - specialArgs = { 196 - inherit (inputs) lix-module; 197 - } // specialArgsFor hostname; 180 + modules = [ 181 + # Disabled for now: https://git.lix.systems/lix-project/lix/issues/652 182 + # inputs.lix-module.nixosModules.default 183 + inputs.nixos-wsl.nixosModules.default 184 + home-manager.nixosModules.home-manager 185 + { 186 + home-manager = { 187 + useGlobalPkgs = true; 188 + useUserPackages = true; 189 + users.${user} = import ./home-manager/home.nix; 190 + extraSpecialArgs = specialArgsFor hostname; 191 + }; 192 + } 193 + ./nixos/configuration.nix 194 + ./nixpkgs/flake-overlays.nix 195 + ]; 196 + } 197 + ) 198 + nixosSystems; 198 199 199 - modules = [ 200 - # Disabled for now: https://git.lix.systems/lix-project/lix/issues/652 201 - # inputs.lix-module.nixosModules.default 202 - inputs.nixos-wsl.nixosModules.default 203 - home-manager.nixosModules.home-manager 204 - { 205 - home-manager = { 206 - useGlobalPkgs = true; 207 - useUserPackages = true; 208 - users.${user} = import ./home-manager/home.nix; 200 + homeConfigurations = lib.mapAttrs' 201 + ( 202 + hostname: 203 + { system, user, ... }: 204 + lib.nameValuePair "${user}@${hostname}" ( 205 + if isDarwin system then 206 + # Expose the home configuration built by darwinModules.home-manager: 207 + let 208 + homeCfg = self.darwinConfigurations.${hostname}.config.home-manager.users.${user}; 209 + in 210 + { 211 + inherit (homeCfg.home) activationPackage; 212 + config = homeCfg; 213 + } 214 + else 215 + let pkgs = nixpkgs.legacyPackages.${system}; in 216 + home-manager.lib.homeManagerConfiguration { 217 + inherit pkgs; 209 218 extraSpecialArgs = specialArgsFor hostname; 210 - }; 211 - } 212 - ./nixos/configuration.nix 213 - ./nixpkgs/flake-overlays.nix 214 - ]; 215 - } 216 - ) nixosSystems; 219 + modules = [ 220 + ./home-manager/home.nix 221 + ./nixpkgs/flake-overlays.nix 222 + # nixos and darwin get this from the host configuration 223 + { nix.package = pkgs.lix; } 224 + ]; 225 + } 226 + ) 227 + ) 228 + hosts; 217 229 218 - homeConfigurations = lib.mapAttrs' ( 219 - hostname: 220 - { system, user, ... }: 221 - lib.nameValuePair "${user}@${hostname}" ( 222 - if isDarwin system then 223 - # Expose the home configuration built by darwinModules.home-manager: 230 + # Used for bootstrapping 231 + devShells = lib.mapAttrs' 232 + ( 233 + _: host: 224 234 let 225 - homeCfg = self.darwinConfigurations.${hostname}.config.home-manager.users.${user}; 235 + pkgs = systemPkgsFor host; 226 236 in 227 - { 228 - inherit (homeCfg.home) activationPackage; 229 - config = homeCfg; 230 - } 231 - else 232 - home-manager.lib.homeManagerConfiguration { 233 - pkgs = nixpkgs.legacyPackages.${system}; 234 - extraSpecialArgs = specialArgsFor hostname; 235 - modules = [ 236 - ./home-manager/home.nix 237 - { 238 - # nixos and darwin get this from the host configuration 239 - nix.package = inputs.unstable.lix; 240 - } 241 - ./nixpkgs/flake-overlays.nix 242 - ]; 237 + lib.nameValuePair host.system { 238 + default = pkgs.mkShell { 239 + packages = with pkgs; [ 240 + cacert 241 + git 242 + git-crypt 243 + git-lfs 244 + gnupg 245 + yadm 246 + ]; 247 + }; 243 248 } 244 249 ) 245 - ) hosts; 246 - 247 - darwinOptions = 248 - let 249 - config = nix-darwin.lib.darwinSystem { 250 - pkgs = inputs.nixpkgs-darwin; 251 - system = "x86_64-darwin"; 252 - modules = [ 253 - # nix-homebrew.darwinModules.nix-homebrew 254 - # home-manager.darwinModules.home-manager 255 - ]; 256 - }; 257 - in 258 - config.options; 259 - 260 - homeOptions = 261 - let 262 - config = home-manager.lib.homeManagerConfiguration { 263 - pkgs = inputs.nixpkgs-darwin.legacyPackages.aarch64-darwin; 264 - modules = [ 265 - { 266 - home.username = "dummy"; 267 - home.homeDirectory = /home/dummy; 268 - home.stateVersion = "20.09"; # TODO reference self 269 - } 270 - ]; 271 - }; 272 - in 273 - config.options; 250 + hosts; 274 251 275 - # Used for bootstrapping 276 - devShells = lib.mapAttrs' ( 277 - _: host: 278 - let 279 - pkgs = systemPkgsFor host; 280 - in 281 - lib.nameValuePair host.system { 282 - default = pkgs.mkShell { 283 - packages = with pkgs; [ 284 - cacert 285 - git 286 - git-crypt 287 - git-lfs 288 - gnupg 289 - yadm 290 - ]; 291 - }; 292 - } 293 - ) hosts; 294 - 295 - formatter = lib.mapAttrs' ( 296 - _: host: lib.nameValuePair host.system (unstablePkgsFor host).nixfmt-rfc-style 297 - ) hosts; 252 + formatter = lib.mapAttrs' 253 + (_: host: lib.nameValuePair host.system (systemPkgsFor host).nixfmt-rfc-style) 254 + hosts; 298 255 }; 299 256 }
+1 -1
.config/gh/config.yml
··· 1 1 # The current version of the config schema 2 - version: 1 2 + version: "1" 3 3 # What protocol to use when performing git operations. Supported values: ssh, https 4 4 git_protocol: https 5 5 # What editor gh should run when creating issues, pull requests, etc. If blank, will refer to environment.
+2 -2
.config/home-manager/direnv/default.nix
··· 1 - { config, unstable, ... }: 1 + { config, pkgs, ... }: 2 2 { 3 3 programs.direnv = { 4 4 enable = true; 5 5 nix-direnv = { 6 6 enable = true; 7 - package = unstable.nix-direnv.override { 7 + package = pkgs.nix-direnv.override { 8 8 nix = config.nix.package; 9 9 }; 10 10 };
+12 -14
.config/home-manager/home.nix
··· 2 2 , config 3 3 , lib 4 4 , pkgs 5 - , unstable ? import <nixos-unstable> { } 6 - , # backwards compat for non-flake 7 - homeDirectory ? "/home/${config.home.user}" 5 + , homeDirectory ? "/home/${config.home.user}" 8 6 , host 9 7 , ... 10 8 }: ··· 18 16 # ugh this will be different between nixos and others won't it 19 17 20 18 packpathDirs = config.programs.neovim.finalPackage.packpathDirs; 21 - finalPackdir = (unstable.neovimUtils.packDir packpathDirs); 19 + finalPackdir = (pkgs.neovimUtils.packDir packpathDirs); 22 20 packdirPackage = 23 21 pkgs.runCommand "pack" { } # bash 24 22 '' ··· 78 76 bat = { 79 77 enable = true; 80 78 # Not working for whatever reason: 81 - extraPackages = with unstable.bat-extras; [ 79 + extraPackages = with pkgs.bat-extras; [ 82 80 batdiff 83 81 batman 84 82 batgrep ··· 91 89 gpg.enable = true; 92 90 helix = { 93 91 enable = true; 94 - package = unstable.helix; 92 + package = pkgs.helix; 95 93 settings = { 96 94 theme = "monokai"; 97 95 }; ··· 100 98 neovim = { 101 99 enable = true; 102 100 # https://github.com/NixOS/nixpkgs/issues/137829 103 - package = unstable.neovim-unwrapped; 101 + package = pkgs.neovim-unwrapped; 104 102 105 103 plugins = [ 106 - (unstable.vimPlugins.nvim-treesitter.withPlugins ( 104 + (pkgs.vimPlugins.nvim-treesitter.withPlugins ( 107 105 # Include default bundled languages as well here: 108 106 # https://github.com/nvim-treesitter/nvim-treesitter/issues/3092 109 107 plugins: with plugins; [ ··· 220 218 with pkgs; 221 219 [ 222 220 buildifier 223 - # unstable.bacon # also available as a flake if I need bleeding-edge 221 + # bacon # also available as a flake if I need bleeding-edge 224 222 clang-tools 225 - comby 226 223 difftastic 227 224 docker 228 225 docker-compose ··· 238 235 ncurses # Newer version including tset/reset, can understand tmux terminfo etc. 239 236 nil 240 237 nixpkgs-fmt 241 - unstable.nixfmt-rfc-style 238 + nixfmt-rfc-style 242 239 openssh 243 240 python3 244 241 rustup 245 242 shellcheck 246 - thefuck 247 243 tmux 248 244 tree 249 - unstable.lnav 250 - unstable.nixd 245 + lnav 246 + nixd 251 247 unzip 252 248 watch 253 249 yadm ··· 267 263 ] 268 264 ++ lib.optionals stdenv.isLinux [ 269 265 pinentry-curses 266 + comby # failing to build on macOS: https://github.com/NixOS/nixpkgs/issues/359193 267 + thefuck # also failing on macOS can't quite figure why 270 268 ] 271 269 ++ lib.optionals host.wsl [ 272 270 podman # use podman --remote to access host WSL podman instance
+14 -18
.config/nix-darwin/configuration.nix
··· 1 - { 2 - self, 3 - lib, 4 - config, 5 - pkgs, 6 - unstable, 7 - host, 8 - ... 1 + { self 2 + , lib 3 + , config 4 + , pkgs 5 + , host 6 + , ... 9 7 }: 10 8 let 11 9 # https://discourse.nixos.org/t/ssl-ca-cert-error-on-macos/31171/6 ··· 40 38 ]; 41 39 42 40 shells = [ pkgs.fish ]; 43 - loginShell = "${lib.getExe pkgs.fish}"; 44 41 45 42 etc = 46 43 let ··· 54 51 variables = mkIfWork systemCABundleEnv; 55 52 }; 56 53 57 - # Auto upgrade nix package and the daemon service. 58 - services.nix-daemon.enable = true; 59 - 60 - nix.package = unstable.lix; 54 + nix.package = pkgs.lix; 61 55 # Necessary for using flakes on this system. 62 56 nix.settings.experimental-features = [ 63 57 "nix-command" ··· 71 65 72 66 #region macOS settings 73 67 74 - security.pam.enableSudoTouchIdAuth = true; 68 + security.pam.services.sudo_local.touchIdAuth = true; 75 69 security.sudo.extraConfig = lib.mkIf (host.class == "work") '' 76 70 # workaround for sudo awkwardness caused by BeyondTrust. 77 71 # It doesn't make sudo touchID work, but at least `darwin-rebuild switch` works ··· 121 115 "${appdir}/Stretchly.app" 122 116 "${appdir}/Syncthing.app" 123 117 ]; 124 - appEntries = map (app: { 125 - path = app; 126 - hidden = true; 127 - }) apps; 118 + appEntries = map 119 + (app: { 120 + path = app; 121 + hidden = true; 122 + }) 123 + apps; 128 124 129 125 # This somehow seems to be the only way to add apps to "Open at Login" that doesn't 130 126 # involve launchd, and there doesn't seem to be any `defaults` for it anymore
+3 -2
.config/nix-darwin/homebrew.nix
··· 10 10 cleanupCmd = builtins.concatStringsSep " " ( 11 11 # Basically copied from ${nix-darwin}/modules/homebrew.nix: 12 12 lib.optional (!config.homebrew.onActivation.autoUpdate) "HOMEBREW_NO_AUTO_UPDATE=1" 13 - ++ [ "brew bundle cleanup --file='${brewfileFile}' --no-lock" ] 13 + ++ [ "brew bundle cleanup --file='${brewfileFile}'" ] 14 14 ); 15 15 in 16 16 { ··· 28 28 # sense to define this as an alternative to `cleanup = "uninstall" instead of 29 29 # a complement to it? 30 30 system.checks.text = '' 31 - if test ''${checkActivation:-0} -eq 1; then 31 + if test "''${checkActivation:-0}" -eq 1; then 32 32 if ! PATH="${config.homebrew.brewPrefix}":$PATH ${cleanupCmd}; then 33 33 # Make it easy to run the cleanup command with --force to apply changes 34 34 echo '${cleanupCmd} --force' ··· 63 63 brews = [ 64 64 "curl" 65 65 "ian-h-chamberlain/dotfiles/neovim@0.9.5" 66 + "mas" 66 67 "pre-commit" 67 68 "pyenv-virtualenv" # doesn't seem to be in nixpkgs 68 69 "pyenv" # use same installation method as pyenv-virtualenv
+2 -1
.config/nix-darwin/vscode.nix
··· 118 118 "corewa-rs.redcode" 119 119 "github.vscode-github-actions" 120 120 "ian-h-chamberlain.pica200" 121 - "mesonbuild.mesonbuild" 122 121 "karunamurti.tera" 122 + "mesonbuild.mesonbuild" 123 123 "nico-castell.linux-desktop-file" 124 124 "PolyMeilex.wgsl" 125 125 "slevesque.shader" 126 + "vgalaktionov.moonscript" 126 127 ]; 127 128 }; 128 129
+7 -18
.config/nixos/configuration.nix
··· 1 - { 2 - config, 3 - lib, 4 - pkgs, 5 - unstable, 6 - host, 7 - lix-module, 8 - ... 1 + { config 2 + , lib 3 + , pkgs 4 + , host 5 + , lix-module 6 + , ... 9 7 }: 10 8 { 11 9 # TODO: when converting prismo, will probably import ./prismo.nix or something ··· 23 21 # This might make more sense in home.nix to work on darwin etc too 24 22 flake-registry = null; 25 23 }; 26 - package = unstable.lix; 27 - 28 - # TODO: figure out a way to add registry entries so I can do e.g. 29 - # `nix run pkgs#htop` and get my custom htop instead of upstream 30 - registry.unstable.to = { 31 - type = "github"; 32 - owner = "NixOS"; 33 - repo = "nixpkgs"; 34 - ref = "nixos-unstable"; 35 - }; 24 + package = pkgs.lix; 36 25 }; 37 26 38 27 time.timeZone = "America/New_York";
+1 -1
.config/nixos/prismo/configuration.nix
··· 188 188 wget 189 189 ]; 190 190 191 - # TODO: use podman from unstable instead of docker? 191 + # TODO: use podman instead of docker? 192 192 virtualisation.docker = { 193 193 enable = true; 194 194 };
+58 -39
.config/nixpkgs/flake-overlays.nix
··· 8 8 It's *not* named overlays.nix so that it isn't picked up automatically by nix 9 9 commands. 10 10 */ 11 - { 12 - lib, 13 - unstable, 14 - pkgs, 15 - ... 16 - }: 11 + { host, lib, ... }: 17 12 let 18 13 appendPatches = 19 14 pkg: patches: 20 15 pkg.overrideAttrs (old: { 21 16 patches = (old.patches or [ ]) ++ patches; 22 17 }); 18 + 23 19 in 24 20 { 25 21 nixpkgs.overlays = [ ··· 28 24 ./patches/htop/0001-Re-title-the-main-menu-bar-for-its-shortcuts.patch 29 25 ]; 30 26 31 - # Pulling from unsable is probably not _really_ how overlays are meant to be used 32 - # and I should be calling unstable.extend or something, but meh it's fine for now 33 - nil = unstable.nil.overrideAttrs ( 34 - prev: 35 - let 36 - src = pkgs.fetchFromGitHub { 27 + nil = prev.nil.overrideAttrs 28 + (old: { 29 + version = "2024-11-19"; 30 + src = prev.fetchFromGitHub { 37 31 owner = "oxalica"; 38 32 repo = "nil"; 39 33 rev = "2e24c9834e3bb5aa2a3701d3713b43a6fb106362"; 40 34 hash = "sha256-DCIVdlb81Fct2uwzbtnawLBC/U03U2hqx8trqTJB7WA="; 41 35 }; 42 - in 43 - { 44 - version = "2024-11-19"; 45 - inherit src; 46 - 47 36 # https://wiki.nixos.org/wiki/Overlays#Rust_packages 48 - cargoDeps = prev.cargoDeps.overrideAttrs (_: { 49 - name = "oxalica-nil-vendor.tar.gz"; 50 - inherit src; 51 - outputHash = "sha256-qW6xqYVQbvZUL5mJAzh8T6udUYIpk8nKoOihoD1UmXA="; 52 - }); 53 - } 54 - ); 37 + cargoDeps = prev.rustPlatform.fetchCargoVendor { 38 + inherit (final.nil) src; 39 + name = "nil-cargo-vendor-deps"; 40 + hash = "sha256-Q4wBZtX77v8CjivCtyw4PdRe4OZbW00iLgExusbHbqc="; 41 + }; 42 + }); 55 43 56 44 # Some packages (mainly bash-based) get built as a wrapped "resholve" script, so we 57 45 # actually want to patch the source of the unwrapped pre-resholve derivation (i.e. 58 - # the src attribute on the final derivation). 46 + # the unresholved package's src attribute). 47 + nix-direnv = prev.nix-direnv.overrideAttrs 48 + (unresholved: { 49 + src = appendPatches unresholved.src [ 50 + ./patches/nix-direnv/0001-Supress-stderr-for-nix-flake-archive.patch 51 + ]; 52 + }); 53 + 54 + yadm = 55 + let 56 + # Sheesh, patching this is kinda messy; upstream nixpkgs is only on 3.3.0 57 + version = "3.5.0"; 58 + src = prev.fetchFromGitHub { 59 + owner = "yadm-dev"; 60 + repo = "yadm"; 61 + rev = "366c3ec418547af2837e5f486669a838cc99563c"; 62 + hash = "sha256-5TUL4aQ/i+RNp5PtcoTSWJa8RSiB042zc8xoJSpWVMQ="; 63 + }; 64 + # TODO: upstream this patch in a PR for 3.5.1 or 3.6.0 65 + patches = [ 66 + (prev.fetchpatch { 67 + url = "https://github.com/yadm-dev/yadm/commit/3fa4b3cf60cc9befb2b3a5b740aca2674bc6ac35.patch"; 68 + hash = "sha256-87XqVBu9OB6RsQaWfJJ2MCaEAGnxLtvslQ8NNt+J2N4="; 69 + }) 70 + ]; 71 + patchedYadm = prev.yadm.overrideAttrs (unresholved: { 72 + src = appendPatches 73 + (unresholved.src.overrideAttrs { inherit src version; }) 74 + patches; 75 + }); 76 + # 3.5.0 had some refactors which requires more resholve directives: 77 + mkResholve = args @ { solutions, ... }: 78 + prev.resholve.mkDerivation (args // { 79 + # Helpful post: https://t-ravis.com/post/nix/advanced_shell_packaging_resholve_yadm/ 80 + solutions = lib.recursiveUpdate solutions { 81 + yadm.keep = { 82 + "$processor" = true; 83 + "$log" = true; 84 + }; 85 + }; 86 + }); 87 + in 88 + patchedYadm.override { 89 + inherit (prev.python311Packages) j2cli; 90 + resholve = prev.resholve // { mkDerivation = mkResholve; }; 91 + }; 59 92 60 - yadm = prev.yadm.overrideAttrs (unresholved: { 61 - src = appendPatches unresholved.src [ 62 - (prev.fetchpatch { 63 - url = "https://github.com/TheLocehiliosan/yadm/pull/495.patch"; 64 - hash = "sha256-xIXqXo8pQywufvcfY+j3jne5WdYnS9/t5DQdpXAkZbo="; 65 - excludes = [ "test/*" ]; 66 - }) 67 - ]; 68 - }); 69 93 70 - nix-direnv = unstable.nix-direnv.overrideAttrs (unresholved: { 71 - src = appendPatches unresholved.src [ 72 - ./patches/nix-direnv/0001-Supress-stderr-for-nix-flake-archive.patch 73 - ]; 74 - }); 75 94 }) 76 95 ]; 77 96 }