Non stop entertainment! The wackiest NixOS configuration to-date. thevoid.cafe/projects/puzzlevision
nixos flake flake-parts dotfiles home-manager nix

♻️ lib.(mkOpt,mkBool) -> lib.options.(mkOpt,mkBool)

thevoid.cafe 3818dd25 973e9ed9

verified
+32 -31
+2 -6
homes/x86_64-linux/cyn/default.nix
··· 1 1 { 2 - pkgs, 3 2 config, 4 3 ... 5 4 }: ··· 10 9 email = "system@thevoid.cafe"; 11 10 sshKeyFile = "${config.home.homeDirectory}/.ssh/id_ed25519"; 12 11 }; 13 - }; 14 12 15 - home.packages = with pkgs; [ 16 - ### Tools 17 - git 18 - ]; 13 + cli.git.enable = true; 14 + }; 19 15 }
+5 -2
lib/options/default.nix
··· 2 2 lib, 3 3 ... 4 4 }: 5 - { 5 + let 6 6 # Create a NixOS module option on a single line. 7 7 mkOpt = 8 8 type: default: description: 9 9 lib.mkOption { inherit type default description; }; 10 10 11 - # Create a simple bool options 11 + # Create a simple boolean option. 12 12 mkBool = 13 13 default: description: 14 14 lib.mkOption { 15 15 inherit default description; 16 16 type = lib.types.bool; 17 17 }; 18 + in 19 + { 20 + options = { inherit mkOpt mkBool; }; 18 21 }
+1 -1
modules/home/apps/firefox/default.nix
··· 6 6 ... 7 7 }: 8 8 let 9 - inherit (self.lib) mkOpt; 9 + inherit (self.lib.options) mkOpt; 10 10 inherit (lib) mkEnableOption types mkIf; 11 11 12 12 cfg = config.${namespace}.apps.firefox;
+1 -1
modules/home/cli/git/default.nix
··· 8 8 }: 9 9 let 10 10 inherit (lib) mkEnableOption mkIf; 11 - inherit (self.lib) mkBool; 11 + inherit (self.lib.options) mkBool; 12 12 13 13 cfg = config.${namespace}.cli.git; 14 14 profile = config.${namespace}.profile;
+1 -1
modules/home/desktop/gnome/default.nix
··· 9 9 }: 10 10 let 11 11 inherit (lib) mkIf; 12 - inherit (self.lib) mkOpt; 12 + inherit (self.lib.options) mkOpt; 13 13 14 14 cfg = config.${namespace}.desktop.gnome; 15 15 in
+1 -1
modules/home/profile/default.nix
··· 6 6 ... 7 7 }: 8 8 let 9 - inherit (self.lib) mkOpt; 9 + inherit (self.lib.options) mkOpt; 10 10 inherit (lib) types; 11 11 12 12 cfg = config.${namespace}.profile;
+3 -1
modules/home/security/ssh/default.nix
··· 7 7 }: 8 8 let 9 9 inherit (lib) mkEnableOption mkIf types; 10 - inherit (self.lib) mkOpt; 10 + inherit (self.lib.options) mkOpt; 11 11 12 12 cfg = config.${namespace}.security.ssh; 13 13 profile = config.${namespace}.profile; ··· 23 23 services.ssh-agent.enable = true; 24 24 programs.ssh = { 25 25 enable = true; 26 + enableDefaultConfig = false; 26 27 27 28 matchBlocks = { 28 29 "*" = { 30 + userKnownHostsFile = "~/.ssh/known_hosts"; 29 31 identityFile = profile.sshKeyFile; 30 32 addKeysToAgent = "yes"; 31 33 };
+1 -1
modules/home/themes/catppuccin/default.nix
··· 9 9 }: 10 10 let 11 11 inherit (lib) mkEnableOption types mkIf; 12 - inherit (self.lib) mkOpt; 12 + inherit (self.lib.options) mkOpt; 13 13 14 14 palette = 15 15 (pkgs.lib.importJSON (config.catppuccin.sources.palette + "/palette.json"))
+1 -1
modules/nixos/services/atticd/default.nix
··· 7 7 }: 8 8 let 9 9 inherit (lib) mkEnableOption mkIf types; 10 - inherit (self.lib) mkOpt; 10 + inherit (self.lib.options) mkOpt; 11 11 12 12 cfg = config.${namespace}.services.atticd; 13 13 in
+1 -1
modules/nixos/services/default.nix
··· 6 6 }: 7 7 let 8 8 inherit (lib) types; 9 - inherit (self.lib) mkOpt; 9 + inherit (self.lib.options) mkOpt; 10 10 in 11 11 { 12 12 options.${namespace}.services = {
+1 -1
modules/nixos/services/duckdns/default.nix
··· 7 7 }: 8 8 let 9 9 inherit (lib) mkEnableOption mkIf types; 10 - inherit (self.lib) mkOpt; 10 + inherit (self.lib.options) mkOpt; 11 11 12 12 cfg = config.${namespace}.services.duckdns; 13 13 in
+1 -1
modules/nixos/services/homepage/default.nix
··· 7 7 }: 8 8 let 9 9 inherit (lib) mkEnableOption mkIf types; 10 - inherit (self.lib) mkOpt; 10 + inherit (self.lib.options) mkOpt; 11 11 12 12 cfg = config.${namespace}.services.homepage; 13 13 in
+1 -1
modules/nixos/services/traefik/default.nix
··· 7 7 }: 8 8 let 9 9 inherit (lib) mkEnableOption mkIf types; 10 - inherit (self.lib) mkOpt; 10 + inherit (self.lib.options) mkOpt; 11 11 12 12 cfg = config.${namespace}.services.traefik; 13 13 in
+1 -1
modules/nixos/services/vaultwarden/default.nix
··· 7 7 }: 8 8 let 9 9 inherit (lib) mkEnableOption mkIf types; 10 - inherit (self.lib) mkOpt; 10 + inherit (self.lib.options) mkOpt; 11 11 12 12 cfg = config.${namespace}.services.vaultwarden; 13 13 in
+1 -1
modules/nixos/system/kernel/default.nix
··· 8 8 }: 9 9 let 10 10 inherit (lib) mkEnableOption mkIf; 11 - inherit (self.lib) mkOpt; 11 + inherit (self.lib.options) mkOpt; 12 12 13 13 cfg = config.${namespace}.system.kernel; 14 14 in
+1 -1
modules/nixos/system/nix/default.nix
··· 8 8 }: 9 9 let 10 10 inherit (lib) mkEnableOption mkIf types; 11 - inherit (self.lib) mkOpt; 11 + inherit (self.lib.options) mkOpt; 12 12 13 13 cfg = config.${namespace}.system.nix; 14 14 in
+1 -1
modules/nixos/system/shell/default.nix
··· 8 8 }: 9 9 let 10 10 inherit (lib) mkEnableOption mkIf types; 11 - inherit (self.lib) mkOpt; 11 + inherit (self.lib.options) mkOpt; 12 12 13 13 cfg = config.${namespace}.system.shell; 14 14 in
+8 -8
modules/nixos/users/default.nix
··· 14 14 mkOption 15 15 mkIf 16 16 ; 17 - inherit (self.lib) filesystem; 17 + inherit (self.lib) filesystem options; 18 18 19 19 # The identifier of the current system type, e.g. "x86_64-linux" or "aarch64-darwin" 20 20 system = pkgs.stdenv.hostPlatform.system; ··· 23 23 userSubmodule = types.submodule { 24 24 options = { 25 25 enable = mkEnableOption "this user."; 26 - isNormalUser = self.lib.mkBool true "Whether this user is considered a normal user."; 27 - isSystemUser = self.lib.mkBool false "Whether this user is considered a system user."; 26 + isNormalUser = options.mkBool true "Whether this user is considered a normal user."; 27 + isSystemUser = options.mkBool false "Whether this user is considered a system user."; 28 28 initialPassword = 29 - self.lib.mkOpt (types.nullOr types.str) null 29 + options.mkOpt (types.nullOr types.str) null 30 30 "Plaintext insecure initial user password, generally not recommended."; 31 31 password = 32 - self.lib.mkOpt (types.nullOr types.str) null 32 + options.mkOpt (types.nullOr types.str) null 33 33 "Plaintext insecure user password, generally not recommended."; 34 34 hashedPasswordFile = 35 - self.lib.mkOpt (types.nullOr types.str) null 35 + options.mkOpt (types.nullOr types.str) null 36 36 "Secure, hashed user password stored in a separate file, recommended for production."; 37 37 hashedPassword = 38 - self.lib.mkOpt (types.nullOr types.str) null 38 + options.mkOpt (types.nullOr types.str) null 39 39 "Hashed password, stored in plaintext, generally not recommended."; 40 40 extraGroups = 41 - self.lib.mkOpt (types.listOf types.str) [ ] 41 + options.mkOpt (types.listOf types.str) [ ] 42 42 "List of additional groups this user belongs to."; 43 43 }; 44 44 };