diff --git a/machines/stel-xps/default.nix b/machines/stel-xps/default.nix index ecd7e28..e0a3a73 100644 --- a/machines/stel-xps/default.nix +++ b/machines/stel-xps/default.nix @@ -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; [ diff --git a/modules/users.nix b/modules/users.nix index 37be2b9..6ef3a9c 100644 --- a/modules/users.nix +++ b/modules/users.nix @@ -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;