mirror of
https://github.com/moons-14/dotfiles.git
synced 2026-10-06 08:28:11 +09:00
feat
This commit is contained in:
@@ -7,4 +7,8 @@
|
|||||||
|
|
||||||
boot.initrd.luks.devices.cryptroot.device =
|
boot.initrd.luks.devices.cryptroot.device =
|
||||||
"/dev/disk/by-partuuid/311d0f9c-f35f-42e6-b6fc-a4d67dd21b2e";
|
"/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
|
let
|
||||||
cfg = config.my.applications.arduino;
|
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
|
in
|
||||||
{
|
{
|
||||||
options.my.applications.arduino = {
|
options.my.applications.arduino = {
|
||||||
@@ -15,7 +23,7 @@ in
|
|||||||
config = lib.mkIf cfg.enable {
|
config = lib.mkIf cfg.enable {
|
||||||
environment.systemPackages = with pkgs; [
|
environment.systemPackages = with pkgs; [
|
||||||
arduino-cli # Arduino command-line interface
|
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 = {
|
options.my.applications.git.homeManager = {
|
||||||
enable = lib.mkEnableOption "git home-manager configuration";
|
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 = {
|
programs.git = {
|
||||||
enable = true;
|
enable = true;
|
||||||
|
|
||||||
ignores = [
|
ignores = [
|
||||||
".direnv/"
|
".direnv/"
|
||||||
".envrc"
|
".envrc"
|
||||||
@@ -24,12 +39,15 @@ in
|
|||||||
];
|
];
|
||||||
|
|
||||||
signing = {
|
signing = {
|
||||||
|
key = hmCfg.signingKey;
|
||||||
|
format = "ssh";
|
||||||
signByDefault = true;
|
signByDefault = true;
|
||||||
};
|
};
|
||||||
|
|
||||||
settings = {
|
settings = {
|
||||||
user.name = cfg.userName;
|
user.name = cfg.userName;
|
||||||
user.email = cfg.userEmail;
|
user.email = cfg.userEmail;
|
||||||
|
|
||||||
push.default = "simple";
|
push.default = "simple";
|
||||||
credential.helper = "cache --timeout=7200";
|
credential.helper = "cache --timeout=7200";
|
||||||
init.defaultBranch = "main";
|
init.defaultBranch = "main";
|
||||||
@@ -37,16 +55,6 @@ in
|
|||||||
log.date = "iso";
|
log.date = "iso";
|
||||||
merge.conflictStyle = "diff3";
|
merge.conflictStyle = "diff3";
|
||||||
|
|
||||||
tag.gpgSign = true;
|
|
||||||
|
|
||||||
gpg = {
|
|
||||||
format = "ssh";
|
|
||||||
|
|
||||||
ssh = {
|
|
||||||
defaultKeyCommand = "ssh-add -L";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
alias = {
|
alias = {
|
||||||
br = "branch --sort=-committerdate";
|
br = "branch --sort=-committerdate";
|
||||||
co = "checkout";
|
co = "checkout";
|
||||||
@@ -59,7 +67,7 @@ in
|
|||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
|
||||||
}
|
}
|
||||||
];
|
];
|
||||||
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user