dotfiles

My PC Dotfiles & Website
commit ead83f67f813d0fd1d2de103f4416be13c48747f
parent 73d415ede60509da3da2b82d634745ea58019d0b
Author: maydayv7 <maydayv7@gmail.com>
Date:   Wed,  6 Dec 2023 22:34:46 +0530

refactor!: Overhaul `lib.map`

Also create `checks` directory

Diffstat:

A.github | 2++
MREADME.md | 30++++++++++++++++--------------
Achecks/flake.nix | 30++++++++++++++++++++++++++++++
R.github/ISSUE_TEMPLATE/bug-report.md -> checks/github/ISSUE_TEMPLATE/bug-report.md | 0
R.github/ISSUE_TEMPLATE/feature-request.md -> checks/github/ISSUE_TEMPLATE/feature-request.md | 0
R.github/ISSUE_TEMPLATE/help-request.md -> checks/github/ISSUE_TEMPLATE/help-request.md | 0
R.github/dependabot.yml -> checks/github/dependabot.yml | 0
R.github/workflows/build.yml -> checks/github/workflows/build.yml | 0
R.github/workflows/check.yml -> checks/github/workflows/check.yml | 0
R.github/workflows/release.yml -> checks/github/workflows/release.yml | 0
R.github/workflows/shell.yml -> checks/github/workflows/shell.yml | 0
R.github/workflows/update.yml -> checks/github/workflows/update.yml | 0
R.github/workflows/website.yml -> checks/github/workflows/website.yml | 0
R.gitlab/.gitlab-ci.yml -> checks/gitlab/.gitlab-ci.yml | 0
R.gitlab/.gitlab-webide.yml -> checks/gitlab/.gitlab-webide.yml | 0
R.gitlab/issue_templates/Bug.md -> checks/gitlab/issue_templates/Bug.md | 0
R.gitlab/issue_templates/Feature.md -> checks/gitlab/issue_templates/Feature.md | 0
R.gitlab/issue_templates/Help.md -> checks/gitlab/issue_templates/Help.md | 0
R.gitlab/pipelines/build.yml -> checks/gitlab/pipelines/build.yml | 0
R.gitlab/pipelines/check.yml -> checks/gitlab/pipelines/check.yml | 0
R.gitlab/pipelines/release.yml -> checks/gitlab/pipelines/release.yml | 0
R.gitlab/pipelines/shell.yml -> checks/gitlab/pipelines/shell.yml | 0
R.gitlab/pipelines/update.yml -> checks/gitlab/pipelines/update.yml | 0
R.gitlab/pipelines/website.yml -> checks/gitlab/pipelines/website.yml | 0
Mfiles/flake.nix | 29+++++++++++++++++++++++------
Mflake.nix | 5++---
Mlib/README.md | 10+++++-----
Mlib/map.nix | 95++++++++++++++++++++++++++++++++++++-------------------------------------------
Mmodules/apps/default.nix | 5+++--
Mmodules/apps/git/default.nix | 6+-----
Mmodules/base/default.nix | 2+-
Mmodules/gui/default.nix | 6+++---
Mmodules/gui/desktop/xfce.nix | 9++++++---
Mmodules/hardware/default.nix | 5+++--
Dmodules/nix/format.nix | 30------------------------------
Mmodules/shell/default.nix | 12+++++++++---
Mmodules/user/default.nix | 8+++++---
Mshells/flake.nix | 2+-
Msite/README.md | 2+-
Musers/default.nix | 14+++++++++-----
40 files changed, 163 insertions(+), 139 deletions(-)

diff --git a/.github b/.github @@ -0,0 +1 @@ +checks/github +\ No newline at end of file diff --git a/README.md b/README.md @@ -136,21 +136,22 @@ github:maydayv7/dotfiles ┌── flake.nix ├── flake.lock ├── files -├── secrets -├── shells ├── site -├── users ├── devices │ ├── systems.nix │ └── vm -├── scripts -│ └── nixos.nix -├── packages -│ └── overlays +├── users +├── secrets +├── shells +├── checks ├── lib │ ├── build.nix │ ├── map.nix │ └── pack.nix +├── scripts +│ └── nixos.nix +├── packages +│ └── overlays └── modules ├── configuration.nix ├── apps @@ -167,17 +168,18 @@ github:maydayv7/dotfiles [`flake-parts`](https://github.com/hercules-ci/flake-parts) is used for modularization - [`files`](./files/README.md): `dotfiles` and program configuration -- [`secrets`](./secrets/README.md): authentication credentials management using [`sops-nix`](https://github.com/Mic92/sops-nix) -- `shells`: sand-boxed shells for development purposes - [`site`](./site/README.md): personal website generated using [`zola`](https://www.getzola.org/) -- [`users`](./users/README.md): individual user-specific configuration - [`devices`](./devices/README.md): system configuration for various devices - `systems.nix`: list of supported system architectures - [`vm`](./devices/vm/README.md): declarative configuration to build multiple virtual machines +- [`users`](./users/README.md): individual user-specific configuration +- [`secrets`](./secrets/README.md): authentication credentials management using [`sops-nix`](https://github.com/Mic92/sops-nix) +- `shells`: sand-boxed shells for development purposes +- `checks`: configuration checks and continuous integration +- [`lib`](./lib/README.md): custom functions designed for conveniently defining configuration - [`scripts`](./scripts/README.md): useful system management scripts - [`packages`](./packages/README.md): locally built custom packages - `overlays`: overrides for pre-built packages -- [`lib`](./lib/README.md): custom functions designed for conveniently defining configuration - [`modules`](./modules/README.md): custom configuration modules for additional functionality - `configuration.nix`: builds system configuration @@ -317,11 +319,11 @@ The system build cache is publicly hosted using [Cachix](https://www.cachix.org) #### Continuous Integration -This repository makes use of [`GitHub Actions`](./.github/workflows) in order to automatically check the configuration syntax on every commit (using and [`statix`](https://github.com/nerdypepper/statix)) and format it (using [`treefmt`](https://github.com/numtide/treefmt)), update the `inputs` every week, build the configuration and upload the build cache to [Cachix](https://app.cachix.org/cache/maydayv7-dotfiles) as well as publish the Install Media `.iso` to a draft Release upon creation of a tag (You can also find `GitLab CI/CD` configuration in [`.gitlab`](./.gitlab/.gitlab-ci.yml)). A `git` [hook](./.git-hooks) is used to check the commit message to adhere to the [`Conventional Commits`](https://www.conventionalcommits.org) specification +This repository makes use of [`GitHub Actions`](./checks/github/workflows) in order to automatically check the configuration syntax on every commit (using and [`statix`](https://github.com/nerdypepper/statix)) and format it (using [`treefmt`](https://github.com/numtide/treefmt)), update the `inputs` every week, build the configuration and upload the build cache to [Cachix](https://app.cachix.org/cache/maydayv7-dotfiles) as well as publish the Install Media `.iso` to a draft Release upon creation of a tag (You can also find `GitLab CI/CD` configuration in [`.gitlab`](./checks/gitlab/.gitlab-ci.yml)). A `git` [hook](./.git-hooks) is used to check the commit message to adhere to the [`Conventional Commits`](https://www.conventionalcommits.org) specification ###### Variables -- [`ACCESS_TOKEN`](./modules/apps/git/secrets/gitlab-token.secret): Personal Access Token (To create one - [GitHub](https://docs.github.com/en/authentication/keeping-your-account-and-data-secure/creating-a-personal-access-token), [GitLab](https://docs.gitlab.com/ee/user/profile/personal_access_tokens.html)) +- [`ACCESS_TOKEN`](./devices/Vortex/secrets/github-token.secret): Personal Access Token (To create one - [GitHub](https://docs.github.com/en/authentication/keeping-your-account-and-data-secure/creating-a-personal-access-token), [GitLab](https://docs.gitlab.com/ee/user/profile/personal_access_tokens.html)) - [`CACHIX_TOKEN`](./secrets/cachix-token.secret): Cachix Authentication Token ### Home Manager @@ -437,7 +439,7 @@ You can navigate to the `README`s present in the various directories to know mor - Refactor GNOME Experience - Use `blackbox` as default terminal - Use [`forge`](https://github.com/forge-ext/forge) for tiling - - Add keyboard shortcuts window using []`shortcuts`](https://gitlab.com/paddatrapper/shortcuts-gnome-extension) + - Add keyboard shortcuts window using [`shortcuts`](https://gitlab.com/paddatrapper/shortcuts-gnome-extension) - Improve XFCE Configuration and Handling - Improve Automatic Package Update Script - Enable ZFS encryption diff --git a/checks/flake.nix b/checks/flake.nix @@ -0,0 +1,30 @@ +{inputs, ...}: { + ## Configuration Checks ## + imports = [inputs.formatter.flakeModule]; + + perSystem = {pkgs, ...}: { + ## Code Formatter + treefmt.config = rec { + package = pkgs.treefmt; + + projectRoot = ../.; + projectRootFile = "${projectRoot}/flake.nix"; + settings.global.excludes = [ + "_*" + "result/**" + "flake.lock" + ]; + + programs = { + alejandra.enable = true; + statix.enable = true; + shellcheck.enable = false; + stylua.enable = true; + prettier = { + enable = true; + settings.bracketSameLine = true; + }; + }; + }; + }; +} diff --git a/.github/ISSUE_TEMPLATE/bug-report.md b/checks/github/ISSUE_TEMPLATE/bug-report.md diff --git a/.github/ISSUE_TEMPLATE/feature-request.md b/checks/github/ISSUE_TEMPLATE/feature-request.md diff --git a/.github/ISSUE_TEMPLATE/help-request.md b/checks/github/ISSUE_TEMPLATE/help-request.md diff --git a/.github/dependabot.yml b/checks/github/dependabot.yml diff --git a/.github/workflows/build.yml b/checks/github/workflows/build.yml diff --git a/.github/workflows/check.yml b/checks/github/workflows/check.yml diff --git a/.github/workflows/release.yml b/checks/github/workflows/release.yml diff --git a/.github/workflows/shell.yml b/checks/github/workflows/shell.yml diff --git a/.github/workflows/update.yml b/checks/github/workflows/update.yml diff --git a/.github/workflows/website.yml b/checks/github/workflows/website.yml diff --git a/.gitlab/.gitlab-ci.yml b/checks/gitlab/.gitlab-ci.yml diff --git a/.gitlab/.gitlab-webide.yml b/checks/gitlab/.gitlab-webide.yml diff --git a/.gitlab/issue_templates/Bug.md b/checks/gitlab/issue_templates/Bug.md diff --git a/.gitlab/issue_templates/Feature.md b/checks/gitlab/issue_templates/Feature.md diff --git a/.gitlab/issue_templates/Help.md b/checks/gitlab/issue_templates/Help.md diff --git a/.gitlab/pipelines/build.yml b/checks/gitlab/pipelines/build.yml diff --git a/.gitlab/pipelines/check.yml b/checks/gitlab/pipelines/check.yml diff --git a/.gitlab/pipelines/release.yml b/checks/gitlab/pipelines/release.yml diff --git a/.gitlab/pipelines/shell.yml b/checks/gitlab/pipelines/shell.yml diff --git a/.gitlab/pipelines/update.yml b/checks/gitlab/pipelines/update.yml diff --git a/.gitlab/pipelines/website.yml b/checks/gitlab/pipelines/website.yml diff --git a/files/flake.nix b/files/flake.nix @@ -1,5 +1,4 @@ { - lib, util, inputs, ... @@ -19,10 +18,17 @@ }; # ASCII Art - ascii = map.files' ./ascii lib.id ""; + ascii = map.files { + directory = ./ascii; + extension = ""; + recursive = true; + }; # Base16 Color Schemes - colors = map.files ./colors lib.id ".yaml"; + colors = map.files { + directory = ./colors; + extension = ".yaml"; + }; # Neofetch fetch = readFile ./neofetch/config.conf; @@ -40,7 +46,10 @@ iso = readFile ./gnome/iso; tiling = ./gnome/tiling.css; } - // map.files ./gnome lib.id ".json"; + // map.files { + directory = ./gnome; + extension = ".json"; + }; # GPG Keys Directory gpg = "/etc/gpg"; @@ -72,7 +81,11 @@ repl = ./repl.nix; # Bash Scripts - scripts = map.files ../scripts build.script ".sh"; + scripts = map.files { + directory = ../scripts; + apply = build.script; + extension = ".sh"; + }; # 'sops' Encrypted Secrets sops = ../secrets/secrets.yaml; @@ -81,7 +94,11 @@ templates = ./templates; # Visual Studio Code Editor - vscode = map.files ./vscode (file: fromJSON (readFile file)) ".json"; + vscode = map.files { + directory = ./vscode; + apply = file: fromJSON (readFile file); + extension = ".json"; + }; # XDG Settings xdg.mime = import ./xdg/mime.nix; diff --git a/flake.nix b/flake.nix @@ -157,7 +157,7 @@ debug = false; _module.args = {util = self.lib;}; - imports = map.flake ./. ++ [modules/nix/format.nix]; + imports = map.flake ./.; flake = { # Supported Architectures @@ -172,8 +172,7 @@ path = filter { root = ./.; exclude = [ - ./.github - ./.gitlab + ./checks ./site (matchExt "md") (matchExt "secret") diff --git a/lib/README.md b/lib/README.md @@ -14,12 +14,12 @@ The `lib` directory contains custom-made utility functions (exposed as `util`), - `array`: Maps required parameter to all elements present in `list` - `filter`: Filters out unneeded `attrs` and maps required ones to specified function - `list`: Lists all toplevel `attrs` of `attrset` and returns a space-separated string - - `file`: Maps all files with a particular extension adhering to a particular condition stored in a directory as an `attrset` acted upon by specified function. Use `file'` in order to recursively search inside directories - - `files`: Same as `file` but without additional conditional - - `patches`: Maps all file patches stored in a directory, if available + - `file`: Maps all files with a particular extension adhering to a particular condition stored in a directory as an `attrset` acted upon by specified function. Enable `recursive` in order to recursively search inside directories + - `modules`: Maps all configuration modules stored in a directory as an `attrset` acted upon by specified function + - `list`: Maps all configuration files stored in a directory into a list for easy import + - `name`: Same as `list`, but maps file names instead of paths - `flake`: Maps all subflakes stored in a directory into a list for easy import - - `module`: Maps all configuration files stored in a directory into a list for easy import. Use `module'` in order to map file names instead of paths - - `modules`: Maps all configuration modules stored in a directory as an `attrset` acted upon by specified function. Use `modules'` in order to recursively search inside directories + - `patches`: Maps all file patches stored in a directory, if available - `secrets`: Maps binary `sops` encrypted secrets stored in a directory - [`pack`](./pack.nix): Utility packager functions used to conveniently perform package management functions - diff --git a/lib/map.nix b/lib/map.nix @@ -22,7 +22,6 @@ lib: let id mapAttrs' mapAttrsToList - mkIf nameValuePair removeSuffix ; @@ -40,53 +39,62 @@ in rec { list = func: foldl' (x: y: x + y + " ") "" (attrNames func); ## Files Map - # Top Level - files = dir: func: ext: file dir func ext (_: true); - file = dir: func: ext: cond: + files = { + directory, + recursive ? false, + apply ? id, + extension, + check ? (_: true), + }: filter checkName (name: type: let - path = "${toString dir}/${name}"; + path = "${toString directory}/${name}"; in - if + if (type == "directory" || type == "symlink") && recursive + then nameValuePair name (files {inherit path apply;}) + else if (type == "directory" || type == "symlink") && ( - if (ext == ".nix") + if (extension == ".nix") then pathExists "${path}/default.nix" else true ) - then nameValuePair name (func path) + then nameValuePair name (apply path) else if type == "regular" && ( - if (ext == ".nix") + if (extension == ".nix") then name != "default.nix" && name != "flake.nix" else true ) - && hasSuffix ext name - && (cond path) - then nameValuePair (removeSuffix ext name) (func path) - else nameValuePair "" null) (readDir dir); + && hasSuffix extension name + && (check path) + then nameValuePair (removeSuffix extension name) (apply path) + else nameValuePair "" null) (readDir directory); - # Recursive - files' = dir: func: ext: file' dir func ext (_: true); - file' = dir: func: ext: cond: - filter checkName (name: type: let - path = "${toString dir}/${name}"; + # Module Imports + modules = { + __functor = _: directory: apply: + files { + inherit directory apply; + extension = ".nix"; + check = checkAttr; + }; + + list = path: attrValues (modules path id); + name = path: attrNames (modules path id); + }; + + # Flake Imports + flake = directory: + attrValues (filter checkName (name: type: let + path = "${toString directory}/${name}"; in - if (type == "directory" || type == "symlink") - then nameValuePair name (file' path func) - else if - type - == "regular" - && ( - if (ext == ".nix") - then name != "default.nix" && name != "flake.nix" - else true - ) - && hasSuffix ext name - && (cond path) - then nameValuePair (removeSuffix ext name) (func path) - else nameValuePair "" null) (readDir dir); + if + (type == "directory" || type == "symlink") + && (pathExists "${path}/flake.nix") + then nameValuePair name "${path}/flake.nix" + else nameValuePair "" null) (readDir directory)); # Package Patches patches = patch: @@ -101,32 +109,15 @@ in rec { else null) (readDir patch)) else patch; - # Flake Imports - flake = dir: - attrValues (filter checkName (name: type: let - path = "${toString dir}/${name}"; - in - if - (type == "directory" || type == "symlink") - && (pathExists "${path}/flake.nix") - then nameValuePair name "${path}/flake.nix" - else nameValuePair "" null) (readDir dir)); - - # Module Imports - module = dir: attrValues (modules dir id); - module' = dir: attrNames (modules dir id); - modules = dir: func: file dir func ".nix" checkAttr; - modules' = dir: func: file' dir func ".nix" checkAttr; - # 'sops' Encrypted Secrets - secrets = dir: neededForUsers: + secrets = directory: neededForUsers: filter checkName (name: type: if type == "regular" && hasSuffix ".secret" name then nameValuePair name { - sopsFile = dir + "/${name}"; + sopsFile = directory + "/${name}"; format = "binary"; inherit neededForUsers; } - else nameValuePair "" null) (readDir dir); + else nameValuePair "" null) (readDir directory); } diff --git a/modules/apps/default.nix b/modules/apps/default.nix @@ -3,13 +3,14 @@ util, ... }: let + inherit (util.map) modules; inherit (lib) mkOption types; in { - imports = util.map.module ./.; + imports = modules.list ./.; options.apps.list = mkOption { description = "List of Enabled Applications"; - type = types.listOf (types.enum (util.map.module' ./.)); + type = types.listOf (types.enum (modules.name ./.)); default = []; }; } diff --git a/modules/apps/git/default.nix b/modules/apps/git/default.nix @@ -79,12 +79,8 @@ # Additional Parameters extraConfig = { - core = { - hooksPath = "~/.git-hooks"; - fileMode = "false"; - }; - color.ui = "auto"; + core.hooksPath = "~/.git-hooks"; credential.helper = "libsecret"; diff.colorMoved = "default"; init.defaultBranch = "main"; diff --git a/modules/base/default.nix b/modules/base/default.nix @@ -3,7 +3,7 @@ pkgs, ... }: { - imports = util.map.module ./.; + imports = util.map.modules.list ./.; ## Base Configuration ## config = { diff --git a/modules/gui/default.nix b/modules/gui/default.nix @@ -6,14 +6,14 @@ ... }: let inherit (builtins) map; - inherit (util.map) module module'; + inherit (util.map.modules) list name; inherit (lib) mkOption optional types; in { - imports = module ./. ++ module ./desktop; + imports = list ./. ++ list ./desktop; options.gui.desktop = mkOption { description = "GUI Desktop Choice"; - type = types.enum ((module' ./desktop) ++ map (x: x + "-minimal") (module' ./desktop) ++ [""]); + type = types.enum ((name ./desktop) ++ map (x: x + "-minimal") (name ./desktop) ++ [""]); default = ""; }; diff --git a/modules/gui/desktop/xfce.nix b/modules/gui/desktop/xfce.nix @@ -159,10 +159,13 @@ in { // mapAttrs' (name: value: nameValuePair ".config/xfce4/xfconf/xfce-perchannel-xml/${name}.xml" {text = value;}) - (util.map.files xfce.settings - (file: + (util.map.files { + directory = xfce.settings; + extension = ".xml"; + apply = file: replaceStrings ["@system" "@wallpaper"] - [path.system wallpaper] (builtins.readFile file)) ".xml"); + [path.system wallpaper] (builtins.readFile file); + }); ## 3rd Party Apps Configuration # Code Editor diff --git a/modules/hardware/default.nix b/modules/hardware/default.nix @@ -3,9 +3,10 @@ util, ... }: let + inherit (util.map) modules; inherit (lib) mkOption types; in { - imports = util.map.module ./.; + imports = modules.list ./.; options.hardware = with types; { cores = mkOption { @@ -22,7 +23,7 @@ in { support = mkOption { description = "List of Additional Supported Hardware"; - type = listOf (enum (util.map.module' ./.)); + type = listOf (enum (modules.name ./.)); default = []; }; }; diff --git a/modules/nix/format.nix b/modules/nix/format.nix @@ -1,30 +0,0 @@ -{inputs, ...}: { - ## Code Formatter ## - imports = [inputs.formatter.flakeModule]; - - perSystem = {pkgs, ...}: { - treefmt.config = rec { - package = pkgs.treefmt; - - projectRoot = ../../.; - projectRootFile = "${projectRoot}/flake.nix"; - settings.global.excludes = [ - "_*" - "result/**" - "flake.lock" - ]; - - # Formatters - programs = { - alejandra.enable = true; - statix.enable = true; - shellcheck.enable = false; - stylua.enable = true; - prettier = { - enable = true; - settings.bracketSameLine = true; - }; - }; - }; - }; -} diff --git a/modules/shell/default.nix b/modules/shell/default.nix @@ -7,10 +7,11 @@ ... }: with files; let + inherit (util.map) modules; inherit (builtins) listToAttrs map; inherit (lib) mkEnableOption mkBefore mkIf mkMerge nameValuePair; in { - imports = util.map.module ./.; + imports = modules.list ./.; options.shell.utilities = mkEnableOption "Enable Additional Shell Utilities"; @@ -55,13 +56,17 @@ in { }; user = { - persist.directories = [".local/share/direnv"]; + persist = { + files = [".hstr_favorites"]; + directories = [".local/share/direnv"]; + }; + home = { programs = listToAttrs (map (shell: nameValuePair shell {initExtra = mkBefore ''eval $(${pkgs.thefuck}/bin/thefuck --alias "fix")'';}) - (util.map.module' ./.)) + (modules.name ./.)) // { hstr.enable = true; # Command History Browser @@ -96,6 +101,7 @@ in { colors = "${scripts.colors}"; grep = "grep --color"; edit = "sudo $EDITOR"; + history = "hstr"; l = "eza -b -h -l -F --octal-permissions --icons --time-style iso"; sike = "neofetch"; }; diff --git a/modules/user/default.nix b/modules/user/default.nix @@ -6,7 +6,7 @@ files, ... }: let - inherit (config.user) groups home settings; + inherit (util.map) modules; inherit (builtins) all attrNames attrValues mapAttrs pathExists; inherit (lib) @@ -22,13 +22,15 @@ types ; + inherit (config.user) groups home settings; + # Merged Sets Type mergedAttrs = mkOptionType { name = "mergedAttrs"; merge = _: getValues; }; in { - imports = util.map.module ./. ++ [inputs.home-manager.nixosModules.home-manager]; + imports = modules.list ./. ++ [inputs.home-manager.nixosModules.home-manager]; options = { # Global Home Manager Configuration @@ -74,7 +76,7 @@ in { }; shells = mkOption { description = "List of Additional Supported Shells"; - type = listOf (enum (util.map.module' ../shell)); + type = listOf (enum (modules.name ../shell)); default = ["bash"]; }; homeConfig = mkOption { diff --git a/shells/flake.nix b/shells/flake.nix @@ -10,7 +10,7 @@ ... }: { devShells = - util.map.modules' ./. (file: pkgs.mkShell (import file pkgs)) + util.map.modules ./. (file: pkgs.mkShell (import file pkgs)) // { default = import ./. {inherit pkgs;}; website = import ../site/shell.nix {inherit pkgs;}; diff --git a/site/README.md b/site/README.md @@ -23,7 +23,7 @@ To build the site, run `nix build`. In order to override the Base URL, <code>nix #### Continuous Integration -[`GitHub Actions`](../.github/workflows/website.yml) is used in order to automatically build the site and publish it to the main domain using GitHub Pages. [Netlify](https://netlify.com) automatically deploys to [maydayv7.netlify.app](https://maydayv7.netlify.app) on every commit and allows for PR previews +[`GitHub Actions`](../checks/github/workflows/website.yml) is used in order to automatically build the site and publish it to the main domain using GitHub Pages. [Netlify](https://netlify.com) automatically deploys to [maydayv7.netlify.app](https://maydayv7.netlify.app) on every commit and allows for PR previews ### Features diff --git a/users/default.nix b/users/default.nix @@ -5,7 +5,7 @@ ... }: let inherit (builtins) attrValues map; - inherit (lib) id mkIf mkOption types; + inherit (lib) mkIf mkOption types; cfg = config.credentials.key; in { options.credentials = { @@ -52,10 +52,14 @@ in { keyserver-options = "honor-keyserver-url"; }; - publicKeys = map (source: { - inherit source; - trust = "ultimate"; - }) (attrValues (util.map.files ../secrets/keys id ".gpg")); + publicKeys = + map (source: { + inherit source; + trust = "ultimate"; + }) (attrValues (util.map.files { + directory = ../secrets/keys; + extension = ".gpg"; + })); }; # XDG Configuration