commit 15a7c49613af98364e0cb480bde74909f6ff86cd
parent 6fe47a5e8ee4bf7c6ee05c9953e10a0a0cbb1fca
Author: Vincent Demeester <vincent@sbr.pm>
Date: Fri, 4 Jan 2019 10:26:13 +0100
desktop: split gpg to a new profiles…
… and enable it on hokkaido.
Signed-off-by: Vincent Demeester <vincent@sbr.pm>
Diffstat:
4 files changed, 29 insertions(+), 5 deletions(-)
diff --git a/machines/hokkaido.nix b/machines/hokkaido.nix
@@ -6,6 +6,7 @@
profiles.dev = {
go.enable = true;
};
+ profiles.gpg.enable = true;
profiles.containers.enable = true;
profiles.media.enable = true;
}
diff --git a/modules/module-list.nix b/modules/module-list.nix
@@ -16,6 +16,7 @@
./profiles/gaming.nix
./profiles/gcloud.nix
./profiles/git.nix
+ ./profiles/gpg.nix
./profiles/i3.nix
./profiles/kubernetes.nix
./profiles/laptop.nix
diff --git a/modules/profiles/desktop.nix b/modules/profiles/desktop.nix
@@ -28,6 +28,7 @@ in
};
};
config = mkIf cfg.enable {
+ profiles.gpg.enable = true;
xsession = mkIf cfg.xsession.enable {
enable = true;
initExtra = ''
@@ -62,11 +63,6 @@ in
longitude = "7.5";
tray = true;
};
- gpg-agent = {
- enable = true;
- enableSshSupport = true;
- defaultCacheTtlSsh = 7200;
- };
};
home.file.".XCompose".source = ./assets/xorg/XCompose;
home.file.".Xmodmap".source = ./assets/xorg/Xmodmap;
diff --git a/modules/profiles/gpg.nix b/modules/profiles/gpg.nix
@@ -0,0 +1,26 @@
+{ config, lib, ... }:
+
+with lib;
+let
+ cfg = config.profiles.gpg;
+in
+{
+ options = {
+ profiles.gpg = {
+ enable = mkOption {
+ default = true;
+ description = "Enable gpg profile and configuration";
+ type = types.bool;
+ };
+ };
+ };
+ config = mkIf cfg.enable {
+ services = {
+ gpg-agent = {
+ enable = true;
+ enableSshSupport = true;
+ defaultCacheTtlSsh = 7200;
+ };
+ };
+ };
+}