diff options
Diffstat (limited to 'hm/conf')
| -rw-r--r-- | hm/conf/git.nix | 18 | ||||
| -rw-r--r-- | hm/conf/xdg-mime.nix | 58 |
2 files changed, 37 insertions, 39 deletions
diff --git a/hm/conf/git.nix b/hm/conf/git.nix index 67fcaa4..0e4b805 100644 --- a/hm/conf/git.nix +++ b/hm/conf/git.nix @@ -2,10 +2,12 @@ config, lib, pkgs, + osConfig, ... }: let cfg = config.hm.conf.git; + isOCI = osConfig.networking.hostName == "oci"; in { options.hm.conf.git.enable = lib.mkEnableOption "enables git vcs"; @@ -14,14 +16,15 @@ in enable = true; lfs.enable = true; signing = { - key = "EF69F2FB25C8B5A66918EA91A38ACEAB9656CD94"; signByDefault = true; + key = if isOCI then "~/.ssh/id_ed25519.pub" else "EF69F2FB25C8B5A66918EA91A38ACEAB9656CD94"; }; settings = { user = { name = "adikro"; email = "adikro@disroot.org"; }; + gpg.format = if isOCI then "ssh" else "openpgp"; init.defaultBranch = "main"; push.autoSetupRemote = true; pull.rebase = true; @@ -33,19 +36,6 @@ in ".direnv/" "secrets/*.tmp" ]; - hooks.pre-commit = pkgs.writeShellScript "sops-pre-commit" '' - for file in secrets/*.yaml; do - if [[ -f "$file" ]]; then - if ! ${pkgs.ripgrep}/bin/rg -q "sops" "$file"; then - echo "--------------------------------------------------------" - echo "ABORTING COMMIT: Unencrypted file detected: $file" - echo "Please run 'sops -e -i $file' before committing." - echo "--------------------------------------------------------" - exit 1 - fi - fi - done - ''; }; }; } diff --git a/hm/conf/xdg-mime.nix b/hm/conf/xdg-mime.nix index e024a89..cbf353d 100644 --- a/hm/conf/xdg-mime.nix +++ b/hm/conf/xdg-mime.nix @@ -7,35 +7,43 @@ in enable = lib.mkEnableOption "sets the default applications"; }; config = lib.mkIf cfg.enable { - xdg.mimeApps = { - enable = true; - defaultApplications = { - "application/pdf" = [ "org.pwmt.zathura.desktop" ]; - "application/x-bzpdf" = [ "org.pwmt.zathura.desktop" ]; - "application/x-gzpdf" = [ "org.pwmt.zathura.desktop" ]; - "application/epub+zip" = [ "org.pwmt.zathura.desktop" ]; + xdg = { + mimeApps = { + enable = true; + defaultApplications = { + "application/pdf" = [ "org.pwmt.zathura.desktop" ]; + "application/x-bzpdf" = [ "org.pwmt.zathura.desktop" ]; + "application/x-gzpdf" = [ "org.pwmt.zathura.desktop" ]; + "application/epub+zip" = [ "org.pwmt.zathura.desktop" ]; - "image/png" = [ "nsxiv.desktop" ]; - "image/jpeg" = [ "nsxiv.desktop" ]; - "image/gif" = [ "nsxiv.desktop" ]; - "image/webp" = [ "nsxiv.desktop" ]; - "image/bmp" = [ "nsxiv.desktop" ]; + "image/png" = [ "nsxiv.desktop" ]; + "image/jpeg" = [ "nsxiv.desktop" ]; + "image/gif" = [ "nsxiv.desktop" ]; + "image/webp" = [ "nsxiv.desktop" ]; + "image/bmp" = [ "nsxiv.desktop" ]; - "video/mp4" = [ "mpv.desktop" ]; - "video/x-matroska" = [ "mpv.desktop" ]; - "video/webm" = [ "mpv.desktop" ]; - "video/quicktime" = [ "mpv.desktop" ]; + "video/mp4" = [ "mpv.desktop" ]; + "video/x-matroska" = [ "mpv.desktop" ]; + "video/webm" = [ "mpv.desktop" ]; + "video/quicktime" = [ "mpv.desktop" ]; - "audio/mpeg" = [ "mpv.desktop" ]; - "audio/flac" = [ "mpv.desktop" ]; - "audio/wav" = [ "mpv.desktop" ]; - "audio/ogg" = [ "mpv.desktop" ]; + "audio/mpeg" = [ "mpv.desktop" ]; + "audio/flac" = [ "mpv.desktop" ]; + "audio/wav" = [ "mpv.desktop" ]; + "audio/ogg" = [ "mpv.desktop" ]; - "text/html" = [ "firefox.desktop" ]; - "x-scheme-handler/terminal" = [ "foot.desktop" ]; - "x-scheme-handler/http" = [ "firefox.desktop" ]; - "x-scheme-handler/https" = [ "firefox.desktop" ]; - "inode/directory" = [ "thunar.desktop" ]; + "text/html" = [ "firefox.desktop" ]; + "x-scheme-handler/terminal" = [ "foot.desktop" ]; + "x-scheme-handler/http" = [ "firefox.desktop" ]; + "x-scheme-handler/https" = [ "firefox.desktop" ]; + "inode/directory" = [ "thunar.desktop" ]; + }; + }; + terminal-exec = { + enable = true; + settings = { + default = [ "foot.desktop" ]; + }; }; }; home.sessionVariables = { |
