mirror of
https://github.com/moons-14/dotfiles.git
synced 2026-10-06 01:18:30 +09:00
feat
This commit is contained in:
@@ -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";
|
||||
};
|
||||
}
|
||||
|
||||
@@ -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
|
||||
];
|
||||
};
|
||||
}
|
||||
|
||||
@@ -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 {
|
||||
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
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
];
|
||||
};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user