diff --git a/hosts/x1g13/default.nix b/hosts/x1g13/default.nix index 481a888..be9db17 100644 --- a/hosts/x1g13/default.nix +++ b/hosts/x1g13/default.nix @@ -7,4 +7,8 @@ boot.initrd.luks.devices.cryptroot.device = "/dev/disk/by-partuuid/311d0f9c-f35f-42e6-b6fc-a4d67dd21b2e"; + + my.applications.git.homeManager = { + signingKey = "~/.ssh/id_ed25519_sk_rk.pub"; + }; } diff --git a/modules/applications/arduino.nix b/modules/applications/arduino.nix index 6117fed..2945d55 100644 --- a/modules/applications/arduino.nix +++ b/modules/applications/arduino.nix @@ -6,6 +6,14 @@ }: let cfg = config.my.applications.arduino; + arduinoIdeX11 = pkgs.arduino-ide.overrideAttrs (old: { + nativeBuildInputs = (old.nativeBuildInputs or [ ]) ++ [ pkgs.makeWrapper ]; + + postFixup = (old.postFixup or "") + '' + wrapProgram $out/bin/arduino-ide \ + --add-flags "--ozone-platform=x11" + ''; + }); in { options.my.applications.arduino = { @@ -15,7 +23,7 @@ in config = lib.mkIf cfg.enable { environment.systemPackages = with pkgs; [ arduino-cli # Arduino command-line interface - arduino-ide # Arduino IDE (GUI) + arduinoIdeX11 # Arduino IDE with X11 support ]; }; } diff --git a/modules/applications/git/home.nix b/modules/applications/git/home.nix index 18de309..9791d65 100644 --- a/modules/applications/git/home.nix +++ b/modules/applications/git/home.nix @@ -10,13 +10,28 @@ in { options.my.applications.git.homeManager = { enable = lib.mkEnableOption "git home-manager configuration"; + + signingKey = lib.mkOption { + type = lib.types.nullOr lib.types.str; + default = "~/.ssh/id_ed25519_sk_rk.pub"; + example = "~/.ssh/id_ed25519.pub"; + description = "SSH public key path used for Git commit and tag signing."; + }; }; - config.home-manager.sharedModules = [ - { - config = lib.mkIf hmCfg.enable { + config = lib.mkIf hmCfg.enable { + assertions = [ + { + assertion = hmCfg.signingKey != null; + message = "my.applications.git.homeManager.signingKey must be set per host."; + } + ]; + + home-manager.sharedModules = [ + { programs.git = { enable = true; + ignores = [ ".direnv/" ".envrc" @@ -24,12 +39,15 @@ in ]; signing = { + key = hmCfg.signingKey; + format = "ssh"; signByDefault = true; }; settings = { user.name = cfg.userName; user.email = cfg.userEmail; + push.default = "simple"; credential.helper = "cache --timeout=7200"; init.defaultBranch = "main"; @@ -37,16 +55,6 @@ in log.date = "iso"; merge.conflictStyle = "diff3"; - tag.gpgSign = true; - - gpg = { - format = "ssh"; - - ssh = { - defaultKeyCommand = "ssh-add -L"; - }; - }; - alias = { br = "branch --sort=-committerdate"; co = "checkout"; @@ -59,7 +67,7 @@ in }; }; }; - }; - } - ]; + } + ]; + }; }