1
0
mirror of https://github.com/ellmau/nixos.git synced 2025-12-19 09:29:36 +01:00

Add meta value for machine-based git user preferences

This commit is contained in:
Stefan Ellmauthaler 2022-05-16 10:37:43 +02:00
parent 1f7a6a4606
commit 8eb8df1637
Failed to extract signature
2 changed files with 33 additions and 11 deletions

View File

@ -1,4 +1,4 @@
{ config, pkgs, ...}:
{ config, pkgs, inputs, ...}:
{
imports = [
../../common/users.nix
@ -20,18 +20,17 @@
enable = true;
admins = [ "ellmau" ];
users = [ ];
meta = {
ellmau.git = {
key = "0x4998BEEE";
gpgsm = true;
signDefault = true;
};
};
};
};
variables = {
hostName = "stel-xps";
graphical = true;
git = {
key = "0x4998BEEE";
gpgsm = true;
signDefault = true;
};
};
#networking.hostName = "stel-xps"; # define the hostname
environment.systemPackages = with pkgs; [

View File

@ -34,11 +34,34 @@ with lib; {
type = types.str;
description = "Email address of the user";
};
git = mkOption {
type = types.attrsOf
(types.submodule {
options = {
key = mkOption {
type = types.str;
example = "0xBEEE1234";
default = "C804A9C1B7AF8256";
description = "Signkey for git commits";
};
gpgsm = mkOption {
type = types.bool;
default = false;
description = "Whether to use gpgsm for commit signatures";
};
signDefault = mkOption {
type = types.bool;
default = false;
description = "Whether to force signing commits or not";
};
};
});
};
};
});
};
};
config =
let
cfg = config.elss.users;