Add isServer option and conditionally enable Git signing
This commit is contained in:
@@ -12,7 +12,7 @@
|
|||||||
# Basic configuration
|
# Basic configuration
|
||||||
userName = "Menno van Leeuwen";
|
userName = "Menno van Leeuwen";
|
||||||
userEmail = "menno@vleeuwen.me";
|
userEmail = "menno@vleeuwen.me";
|
||||||
signing = {
|
signing = lib.mkIf (!config.isServer) {
|
||||||
key = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIM+sKpcREOUjwMMSzEWAso6830wbOi8kUxqpuXWw5gHr";
|
key = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIM+sKpcREOUjwMMSzEWAso6830wbOi8kUxqpuXWw5gHr";
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -86,14 +86,14 @@
|
|||||||
};
|
};
|
||||||
|
|
||||||
# Security
|
# Security
|
||||||
gpg = {
|
gpg = lib.mkIf (!config.isServer) {
|
||||||
format = "ssh";
|
format = "ssh";
|
||||||
ssh = {
|
ssh = {
|
||||||
program = "/opt/1Password/op-ssh-sign";
|
program = "/opt/1Password/op-ssh-sign";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
commit = {
|
commit = lib.mkIf (!config.isServer) {
|
||||||
gpgsign = true;
|
gpgsign = true;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
34
home.nix
34
home.nix
@@ -1,16 +1,17 @@
|
|||||||
{
|
{
|
||||||
config,
|
config,
|
||||||
|
lib,
|
||||||
isServer ? false,
|
isServer ? false,
|
||||||
opnix,
|
opnix,
|
||||||
...
|
...
|
||||||
}:
|
}:
|
||||||
|
|
||||||
{
|
{
|
||||||
programs.home-manager.enable = true;
|
options = {
|
||||||
|
isServer = lib.mkOption {
|
||||||
nixpkgs.config = {
|
type = lib.types.bool;
|
||||||
allowUnfree = true;
|
default = false;
|
||||||
allowUnfreePredicate = pkg: true;
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
imports = [
|
imports = [
|
||||||
@@ -31,12 +32,23 @@
|
|||||||
]
|
]
|
||||||
);
|
);
|
||||||
|
|
||||||
home = {
|
config = {
|
||||||
username = "menno";
|
isServer = isServer;
|
||||||
homeDirectory = "/home/menno";
|
|
||||||
stateVersion = "25.05";
|
programs.home-manager.enable = true;
|
||||||
sessionVariables = {
|
|
||||||
PATH = "${config.home.homeDirectory}/go/bin:$PATH";
|
nixpkgs.config = {
|
||||||
|
allowUnfree = true;
|
||||||
|
allowUnfreePredicate = pkg: true;
|
||||||
|
};
|
||||||
|
|
||||||
|
home = {
|
||||||
|
username = "menno";
|
||||||
|
homeDirectory = "/home/menno";
|
||||||
|
stateVersion = "25.05";
|
||||||
|
sessionVariables = {
|
||||||
|
PATH = "${config.home.homeDirectory}/go/bin:$PATH";
|
||||||
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user