From 44b8624d201e70c8418ada5db3c46e9ba130ea30 Mon Sep 17 00:00:00 2001 From: Arpit Chakladar Date: Thu, 24 Sep 2026 03:42:34 +0530 Subject: refactor(naming): use kebab-case option names and consistent gopass secret naming --- modules/development/git/default.nix | 34 ++++++++++++++++++++++------------ 1 file changed, 22 insertions(+), 12 deletions(-) (limited to 'modules/development/git/default.nix') diff --git a/modules/development/git/default.nix b/modules/development/git/default.nix index 15dcc80..593c8a3 100644 --- a/modules/development/git/default.nix +++ b/modules/development/git/default.nix @@ -2,8 +2,12 @@ { config, lib, + pkgs, ... }: +let + cfg = config.development.git; +in { imports = [ ./assertions.nix @@ -30,29 +34,35 @@ description = "Git email."; }; - signing = { - key = lib.mkOption { - type = lib.types.nullOr lib.types.str; - default = null; - description = "GPG key ID used for signing commits."; - }; + signing = lib.mkOption { + type = lib.types.submodule { + options = { + key = lib.mkOption { + type = lib.types.nullOr lib.types.str; + default = null; + description = "GPG key ID used for signing commits."; + }; - signByDefault = lib.mkEnableOption "Sign commits by default."; + sign-by-default = lib.mkEnableOption "Sign commits by default."; + }; + }; + default = { }; + description = "Git commit signing configuration."; }; }; - config = lib.mkIf config.development.git.enable { + config = lib.mkIf cfg.enable { programs.git = { enable = true; signing = { - key = config.development.git.signing.key; - signByDefault = config.development.git.signing.signByDefault; + key = cfg.signing.key; + sign-by-default = cfg.signing.sign-by-default; }; settings = lib.mkMerge [ { user = { - name = config.development.git.username; - email = config.development.git.email; + name = cfg.username; + email = cfg.email; }; core = { askPass = ""; -- cgit v1.2.3 From 748669e19daa3afc8f0cfe10eedc19ae9766ed2c Mon Sep 17 00:00:00 2001 From: Arpit Chakladar Date: Thu, 24 Sep 2026 03:59:42 +0530 Subject: refactor: link packaged icons into the hicolor theme --- modules/communication/neomutt/default.nix | 4 +++- modules/development/git/default.nix | 2 +- modules/gaming/heroic/default.nix | 5 ++++- users/arpit/private.example.nix | 2 +- 4 files changed, 9 insertions(+), 4 deletions(-) (limited to 'modules/development/git/default.nix') diff --git a/modules/communication/neomutt/default.nix b/modules/communication/neomutt/default.nix index 385c290..e091a7d 100644 --- a/modules/communication/neomutt/default.nix +++ b/modules/communication/neomutt/default.nix @@ -70,6 +70,8 @@ in xdg.configFile."neomutt/mailcap".text = builtins.replaceStrings [ "@@HTML_VIEWER@@" ] [ (lib.getExe config.web.chawan.package) ] (builtins.readFile ./mailcap); + home.file.".local/share/icons/hicolor/scalable/apps/neomutt.svg".source = + config.lib.file.mkOutOfStoreSymlink "${config.programs.neomutt.package}/share/neomutt/logo/neomutt.svg"; programs.neomutt = { enable = true; package = pkgs.symlinkJoin { @@ -99,7 +101,7 @@ in xdg.desktopEntries."neomutt" = { name = "NeoMutt"; exec = "${lib.getExe config.terminal.kitty.package} --class neomutt -e ${lib.getExe config.programs.neomutt.package}"; - icon = "${config.programs.neomutt.package}/share/neomutt/logo/neomutt.svg"; + icon = "neomutt"; categories = [ "Network" "Email" diff --git a/modules/development/git/default.nix b/modules/development/git/default.nix index 593c8a3..f2a0d64 100644 --- a/modules/development/git/default.nix +++ b/modules/development/git/default.nix @@ -56,7 +56,7 @@ in enable = true; signing = { key = cfg.signing.key; - sign-by-default = cfg.signing.sign-by-default; + signByDefault = cfg.signing.sign-by-default; }; settings = lib.mkMerge [ { diff --git a/modules/gaming/heroic/default.nix b/modules/gaming/heroic/default.nix index 3378932..61eceb5 100644 --- a/modules/gaming/heroic/default.nix +++ b/modules/gaming/heroic/default.nix @@ -34,10 +34,13 @@ in config = lib.mkIf cfg.enable { home.packages = [ cfg.package ]; + home.file.".local/share/icons/hicolor/scalable/apps/com.heroicgameslauncher.hgl.svg".source = + config.lib.file.mkOutOfStoreSymlink "${pkgs.heroic}/share/icons/hicolor/scalable/apps/com.heroicgameslauncher.hgl.svg"; + xdg.desktopEntries."heroic" = { name = "Heroic Games Launcher"; exec = "${lib.getExe' cfg.package "heroic"} %u"; - icon = "${pkgs.heroic}/share/icons/hicolor/scalable/apps/com.heroicgameslauncher.hgl.svg"; + icon = "com.heroicgameslauncher.hgl"; comment = "An Open Source Launcher for GOG, Epic Games and Amazon Games"; categories = [ "Game" ]; mimeType = [ "x-scheme-handler/heroic" ]; diff --git a/users/arpit/private.example.nix b/users/arpit/private.example.nix index 54fd972..c854982 100644 --- a/users/arpit/private.example.nix +++ b/users/arpit/private.example.nix @@ -22,7 +22,7 @@ ''; gpg = { key = "YOUR_GPG_KEY_ID"; - sign-by-default = true; + sign-by-default = false; encrypt-by-default = false; # set true only if you also want auto-encrypt }; }; -- cgit v1.2.3