Your one-stop-cake-shop for everything Freshly Baked has to offer

refactor(ingredients): rename options

We have options that it'd be nice to bring under our ingredient names to
disambiguate them... the option for "niri.niri.<foo>" is a little weird
but it's better than calling it "niri.<foo>" and having a base either
"development.<foo>" or "jujutsu.<foo>" for the jujutsu options.

This is subject to change in future - for example we might decide that
if the filename and ingredient name are the same we should use it only
once - however options are not commonly added to ingredients so that
would create potential naming conflicts for little benefit so we may
well not decide to do that too...

+17 -17
+2 -2
packetmix/homes/coded/niri.nix
··· 5 5 { 6 6 ingredient.niri.enable = true; 7 7 8 - niri.timers = { 8 + ingredient.niri.niri.timers = { 9 9 lock = 900; 10 10 sleep = 1800; 11 11 }; 12 - niri.wallpaper = ./wallpaper.png; 12 + ingredient.niri.niri.wallpaper = ./wallpaper.png; 13 13 programs.niri.settings = { 14 14 input.mouse.natural-scroll = false; 15 15 outputs = {
+2 -2
packetmix/homes/development/jujutsu.nix
··· 12 12 ... 13 13 }: 14 14 { 15 - options.jujutsu = { 15 + options.ingredient.development.jujutsu = { 16 16 allowedSSHSigners = lib.mkOption { 17 17 type = lib.types.attrsOf (lib.types.listOf lib.types.str); 18 18 description = "A mapping of SSH keys to emails they are valid for"; ··· 374 374 let 375 375 allowedSigners = lib.mapAttrsToList ( 376 376 key: emails: "${builtins.concatStringsSep "," emails} ${key}" 377 - ) config.jujutsu.allowedSSHSigners; 377 + ) config.ingredient.development.jujutsu.allowedSSHSigners; 378 378 allowedSignersContent = builtins.concatStringsSep "\n" allowedSigners; 379 379 allowedSignersFile = builtins.toFile "allowed-signers" allowedSignersContent; 380 380 in
+1 -1
packetmix/homes/freshlybakedcake+development/ssh.nix
··· 4 4 5 5 { 6 6 # Non-packetmixers can be included in this list, but you should have a comment stating where you got the key/email(s) from 7 - jujutsu.allowedSSHSigners = { 7 + ingredient.development.jujutsu.allowedSSHSigners = { 8 8 "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIKpBNIHk/kRhQL7Nl3Fd+UBVRoS2bTpbeerA//vwL2D4 coded" = [ 9 9 "me@thecoded.prof" 10 10
+2 -2
packetmix/homes/maya/niri.nix
··· 20 20 }; 21 21 }; 22 22 23 - niri.wallpaper = ../minion/wallpaper.png; 24 - niri.overviewBackground = pkgs.stdenv.mkDerivation { 23 + ingredient.niri.niri.wallpaper = ../minion/wallpaper.png; 24 + ingredient.niri.niri.overviewBackground = pkgs.stdenv.mkDerivation { 25 25 name = "niri-overview-background"; 26 26 27 27 src = ../minion/overviewBackground.png;
+2 -2
packetmix/homes/minion/niri.nix
··· 65 65 }; 66 66 }; 67 67 68 - niri.wallpaper = ./wallpaper.png; 69 - niri.overviewBackground = pkgs.stdenv.mkDerivation { 68 + ingredient.niri.niri.wallpaper = ./wallpaper.png; 69 + ingredient.niri.niri.overviewBackground = pkgs.stdenv.mkDerivation { 70 70 name = "niri-overview-background"; 71 71 72 72 src = ./overviewBackground.png;
+8 -8
packetmix/homes/niri/niri.nix
··· 15 15 project.inputs.walker.result.homeManagerModules.walker 16 16 ]; 17 17 18 - options.niri = { 18 + options.ingredient.niri.niri = { 19 19 wallpaper = lib.mkOption { 20 20 type = lib.types.path; 21 21 description = "Path to the desktop wallpaper you'd like to use"; ··· 26 26 default = pkgs.stdenv.mkDerivation { 27 27 name = "niri-lock-background"; 28 28 29 - src = config.niri.wallpaper; 29 + src = config.ingredient.niri.niri.wallpaper; 30 30 dontUnpack = true; 31 31 32 32 buildPhase = '' ··· 41 41 default = 300; 42 42 }; 43 43 sleep = lib.mkOption { 44 - type = lib.types.addCheck lib.types.int (x: x >= config.niri.timers.lock); 44 + type = lib.types.addCheck lib.types.int (x: x >= config.ingredient.niri.niri.timers.lock); 45 45 description = "How long while idling before sleeping the device (in seconds)"; 46 46 default = 450; 47 47 }; ··· 52 52 default = pkgs.stdenv.mkDerivation { 53 53 name = "niri-overview-background"; 54 54 55 - src = config.niri.wallpaper; 55 + src = config.ingredient.niri.niri.wallpaper; 56 56 dontUnpack = true; 57 57 58 58 buildPhase = '' ··· 65 65 config = { 66 66 programs.niri = 67 67 let 68 - lock = ''${config.programs.niri.package}/bin/niri msg action do-screen-transition && ${pkgs.swaylock}/bin/swaylock -i ${config.niri.lockscreen} -s fill -f''; 68 + lock = ''${config.programs.niri.package}/bin/niri msg action do-screen-transition && ${pkgs.swaylock}/bin/swaylock -i ${config.ingredient.niri.niri.lockscreen} -s fill -f''; 69 69 in 70 70 { 71 71 enable = true; ··· 311 311 command = [ 312 312 "${pkgs.swaybg}/bin/swaybg" 313 313 "-i" 314 - "${config.niri.wallpaper}" 314 + "${config.ingredient.niri.niri.wallpaper}" 315 315 "-m" 316 316 "fill" 317 317 ]; ··· 321 321 "${pkgs.swayidle}/bin/swayidle" 322 322 "-w" 323 323 "timeout" 324 - (toString config.niri.timers.lock) 324 + (toString config.ingredient.niri.niri.timers.lock) 325 325 lock 326 326 "timeout" 327 - (toString config.niri.timers.sleep) 327 + (toString config.ingredient.niri.niri.timers.sleep) 328 328 "niri msg action power-off-monitors" 329 329 "resume" 330 330 "niri msg action power-on-monitors" # Not sure if this is really needed - niri normally powers on monitors on a movement action anyway, but maybe this can affect resuming in different ways?