this repo has no description
0
fork

Configure Feed

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

refactor: reduce inherit statements

+19 -32
+4 -8
modules/core/nix.nix
··· 1 1 { 2 2 inputs, 3 3 lib, 4 - config, 5 4 ... 6 - }: let 7 - inherit (lib) mapAttrsToList; 8 - inherit (builtins) mapAttrs; 9 - in { 5 + }: { 10 6 config = { 11 7 nix = { 12 8 channel.enable = false; 13 - registry = mapAttrs (_: flake: {inherit flake;}) inputs; 14 - nixPath = mapAttrsToList (n: _: "${n}=flake:${n}") inputs; 9 + registry = builtins.mapAttrs (_: flake: {inherit flake;}) inputs; 10 + nixPath = lib.mapAttrsToList (n: _: "${n}=flake:${n}") inputs; 15 11 settings = { 16 12 experimental-features = ["nix-command" "flakes"]; 17 13 auto-optimise-store = true; 18 14 allowed-users = ["@wheel"]; 19 15 trusted-users = ["@wheel"]; 20 16 build-dir = "/var/tmp"; 21 - nix-path = mapAttrsToList (n: _: "${n}=flake:${n}") inputs; 17 + nix-path = lib.mapAttrsToList (n: _: "${n}=flake:${n}") inputs; 22 18 flake-registry = ""; 23 19 warn-dirty = false; 24 20 };
+3 -5
modules/core/user.nix
··· 5 5 pkgs, 6 6 ... 7 7 }: let 8 - inherit (lib) mkOption types modules; 9 8 inherit (config.cfg.core) username; 10 9 in { 11 - options.cfg.core.username = mkOption { 12 - type = types.str; 13 - default = false; 10 + options.cfg.core.username = lib.mkOption { 11 + type = lib.types.str; 14 12 description = "Set the username for your user."; 15 13 }; 16 - imports = [inputs.hjem.nixosModules.default (modules.mkAliasOptionModule ["hj"] ["hjem" "users" username])]; 14 + imports = [inputs.hjem.nixosModules.default (lib.mkAliasOptionModule ["hj"] ["hjem" "users" username])]; 17 15 config = { 18 16 hjem = { 19 17 linker = pkgs.smfh;
+2 -3
modules/core/wsl.nix
··· 5 5 pkgs, 6 6 ... 7 7 }: let 8 - inherit (lib) mkEnableOption mkIf; 9 8 cfg = config.cfg.core.wsl; 10 9 in { 11 - options.cfg.core.wsl.enable = mkEnableOption "wsl"; 10 + options.cfg.core.wsl.enable = lib.mkEnableOption "wsl"; 12 11 imports = [inputs.nixos-wsl.nixosModules.default]; 13 - config = mkIf cfg.enable { 12 + config = lib.mkIf cfg.enable { 14 13 wsl = { 15 14 enable = true; 16 15 defaultUser = config.cfg.core.username;
+2 -3
modules/programs/fish.nix
··· 4 4 config, 5 5 ... 6 6 }: let 7 - inherit (lib) mkEnableOption mkIf; 8 7 cfg = config.cfg.programs.fish; 9 8 in { 10 - options.cfg.programs.fish.enable = mkEnableOption "fish"; 11 - config = mkIf cfg.enable { 9 + options.cfg.programs.fish.enable = lib.mkEnableOption "fish"; 10 + config = lib.mkIf cfg.enable { 12 11 programs.fish = { 13 12 enable = true; 14 13 interactiveShellInit = ''
+6 -9
modules/programs/git.nix
··· 4 4 lib, 5 5 ... 6 6 }: let 7 - inherit (lib) mkEnableOption mkOption types mkIf; 8 7 cfg = config.cfg.programs.git; 9 8 in { 10 9 options.cfg.programs.git = { 11 - enable = mkEnableOption "git"; 12 - name = mkOption { 13 - type = types.str; 14 - default = false; 10 + enable = lib.mkEnableOption "git"; 11 + name = lib.mkOption { 12 + type = lib.types.str; 15 13 description = "Set your username for git."; 16 14 }; 17 - email = mkOption { 18 - type = types.str; 19 - default = false; 15 + email = lib.mkOption { 16 + type = lib.types.str; 20 17 description = "Set your email for git."; 21 18 }; 22 19 }; 23 - config = mkIf cfg.enable { 20 + config = lib.mkIf cfg.enable { 24 21 hj.packages = with pkgs; [gh codeberg-cli]; 25 22 environment.shellAliases = { 26 23 gaa = "git add --all";
+2 -4
modules/programs/nh.nix
··· 1 1 { 2 2 lib, 3 - pkgs, 4 3 config, 5 4 ... 6 5 }: let 7 - inherit (lib) mkEnableOption mkIf; 8 6 cfg = config.cfg.programs.nh; 9 7 in { 10 - options.cfg.programs.nh.enable = mkEnableOption "nh"; 11 - config = mkIf cfg.enable { 8 + options.cfg.programs.nh.enable = lib.mkEnableOption "nh"; 9 + config = lib.mkIf cfg.enable { 12 10 programs.nh = { 13 11 enable = true; 14 12 clean = {