mirror of
https://github.com/Swarsel/.dotfiles.git
synced 2025-12-06 09:07:21 +01:00
refactor: make gpg-agent a common setting
This commit is contained in:
parent
5e2aae9558
commit
414ff779b6
10 changed files with 54 additions and 82 deletions
|
|
@ -264,18 +264,6 @@ I also enable the extra socket here for ssh agent forwarding. But I have not ful
|
||||||
|
|
||||||
#+begin_src nix :tangle no :noweb-ref gpgagent
|
#+begin_src nix :tangle no :noweb-ref gpgagent
|
||||||
|
|
||||||
services.gpg-agent = {
|
|
||||||
enable = true;
|
|
||||||
enableSshSupport = true;
|
|
||||||
enableExtraSocket = true;
|
|
||||||
pinentryPackage = pkgs.pinentry.gtk2;
|
|
||||||
defaultCacheTtl = 600;
|
|
||||||
maxCacheTtl = 7200;
|
|
||||||
extraConfig = ''
|
|
||||||
allow-loopback-pinentry
|
|
||||||
allow-emacs-pinentry
|
|
||||||
'';
|
|
||||||
};
|
|
||||||
|
|
||||||
#+end_src
|
#+end_src
|
||||||
|
|
||||||
|
|
@ -2165,7 +2153,6 @@ Mostly just sets some opened ports for several games, enables virtualbox (which
|
||||||
# kernelPackages = pkgs.linuxPackages_latest;
|
# kernelPackages = pkgs.linuxPackages_latest;
|
||||||
};
|
};
|
||||||
|
|
||||||
sops.age.sshKeyPaths = [ "${config.users.users.swarsel.home}/.ssh/sops" ];
|
|
||||||
|
|
||||||
networking = {
|
networking = {
|
||||||
hostName = "fourside"; # Define your hostname.
|
hostName = "fourside"; # Define your hostname.
|
||||||
|
|
@ -2270,9 +2257,6 @@ This is basically just adjusted to the core count, path to the =hwmon= (this was
|
||||||
{ config, pkgs, lib, ... }: with lib;
|
{ config, pkgs, lib, ... }: with lib;
|
||||||
{
|
{
|
||||||
|
|
||||||
<<gpgagent>>
|
|
||||||
sops.age.sshKeyPaths = [ "${config.home.homeDirectory}/.ssh/sops" ];
|
|
||||||
|
|
||||||
# waybar config - TEMPLATE - update for cores and temp
|
# waybar config - TEMPLATE - update for cores and temp
|
||||||
programs.waybar.settings.mainBar = {
|
programs.waybar.settings.mainBar = {
|
||||||
# temperature.hwmon-path = "/sys/devices/pci0000:00/0000:00:18.3/hwmon/hwmon4/temp1_input";
|
# temperature.hwmon-path = "/sys/devices/pci0000:00/0000:00:18.3/hwmon/hwmon4/temp1_input";
|
||||||
|
|
@ -5110,6 +5094,7 @@ I use sops-nix to handle secrets that I want to have available on my machines at
|
||||||
{
|
{
|
||||||
sops = {
|
sops = {
|
||||||
|
|
||||||
|
age.sshKeyPaths = [ "${config.users.users.swarsel.home}/.ssh/sops" ];
|
||||||
defaultSopsFile = "${config.users.users.swarsel.home}/.dotfiles/secrets/general/secrets.yaml";
|
defaultSopsFile = "${config.users.users.swarsel.home}/.dotfiles/secrets/general/secrets.yaml";
|
||||||
validateSopsFiles = false;
|
validateSopsFiles = false;
|
||||||
|
|
||||||
|
|
@ -5566,6 +5551,7 @@ This section sets up all the imports that are used in the home-manager section.
|
||||||
./kdeconnect.nix
|
./kdeconnect.nix
|
||||||
./mako.nix
|
./mako.nix
|
||||||
./sway.nix
|
./sway.nix
|
||||||
|
./gpg-agent.nix
|
||||||
];
|
];
|
||||||
|
|
||||||
nix = {
|
nix = {
|
||||||
|
|
@ -5957,6 +5943,7 @@ I use sops-nix to handle secrets that I want to have available on my machines at
|
||||||
{ config, ... }:
|
{ config, ... }:
|
||||||
{
|
{
|
||||||
sops = {
|
sops = {
|
||||||
|
age.sshKeyPaths = [ "${config.home.homeDirectory}/.ssh/sops" ];
|
||||||
defaultSopsFile = "${config.home.homeDirectory}/.dotfiles/secrets/general/secrets.yaml";
|
defaultSopsFile = "${config.home.homeDirectory}/.dotfiles/secrets/general/secrets.yaml";
|
||||||
validateSopsFiles = false;
|
validateSopsFiles = false;
|
||||||
secrets = {
|
secrets = {
|
||||||
|
|
@ -7532,6 +7519,26 @@ Currently, I am too lazy to explain every option here, but most of it is very se
|
||||||
}
|
}
|
||||||
#+end_src
|
#+end_src
|
||||||
|
|
||||||
|
*** gpg-agent
|
||||||
|
|
||||||
|
#+begin_src nix :tangle profiles/common/home/gpg-agent.nix
|
||||||
|
{ pkgs, ... }:
|
||||||
|
{
|
||||||
|
services.gpg-agent = {
|
||||||
|
enable = true;
|
||||||
|
enableSshSupport = true;
|
||||||
|
enableExtraSocket = true;
|
||||||
|
pinentryPackage = pkgs.pinentry.gtk2;
|
||||||
|
defaultCacheTtl = 600;
|
||||||
|
maxCacheTtl = 7200;
|
||||||
|
extraConfig = ''
|
||||||
|
allow-loopback-pinentry
|
||||||
|
allow-emacs-pinentry
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
}
|
||||||
|
#+end_src
|
||||||
|
|
||||||
** flake.nix template
|
** flake.nix template
|
||||||
:PROPERTIES:
|
:PROPERTIES:
|
||||||
:CUSTOM_ID: h:aee5ec75-7ca6-40d8-b6ac-a3e7e33a474b
|
:CUSTOM_ID: h:aee5ec75-7ca6-40d8-b6ac-a3e7e33a474b
|
||||||
|
|
|
||||||
|
|
@ -3,18 +3,6 @@
|
||||||
{
|
{
|
||||||
|
|
||||||
|
|
||||||
services.gpg-agent = {
|
|
||||||
enable = true;
|
|
||||||
enableSshSupport = true;
|
|
||||||
enableExtraSocket = true;
|
|
||||||
pinentryPackage = pkgs.pinentry.gtk2;
|
|
||||||
defaultCacheTtl = 600;
|
|
||||||
maxCacheTtl = 7200;
|
|
||||||
extraConfig = ''
|
|
||||||
allow-loopback-pinentry
|
|
||||||
allow-emacs-pinentry
|
|
||||||
'';
|
|
||||||
};
|
|
||||||
|
|
||||||
home = {
|
home = {
|
||||||
username = "TEMPLATE";
|
username = "TEMPLATE";
|
||||||
|
|
|
||||||
|
|
@ -26,6 +26,7 @@
|
||||||
./kdeconnect.nix
|
./kdeconnect.nix
|
||||||
./mako.nix
|
./mako.nix
|
||||||
./sway.nix
|
./sway.nix
|
||||||
|
./gpg-agent.nix
|
||||||
];
|
];
|
||||||
|
|
||||||
nix = {
|
nix = {
|
||||||
|
|
|
||||||
15
profiles/common/home/gpg-agent.nix
Normal file
15
profiles/common/home/gpg-agent.nix
Normal file
|
|
@ -0,0 +1,15 @@
|
||||||
|
{ pkgs, ... }:
|
||||||
|
{
|
||||||
|
services.gpg-agent = {
|
||||||
|
enable = true;
|
||||||
|
enableSshSupport = true;
|
||||||
|
enableExtraSocket = true;
|
||||||
|
pinentryPackage = pkgs.pinentry.gtk2;
|
||||||
|
defaultCacheTtl = 600;
|
||||||
|
maxCacheTtl = 7200;
|
||||||
|
extraConfig = ''
|
||||||
|
allow-loopback-pinentry
|
||||||
|
allow-emacs-pinentry
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
@ -1,6 +1,7 @@
|
||||||
{ config, ... }:
|
{ config, ... }:
|
||||||
{
|
{
|
||||||
sops = {
|
sops = {
|
||||||
|
age.sshKeyPaths = [ "${config.home.homeDirectory}/.ssh/sops" ];
|
||||||
defaultSopsFile = "${config.home.homeDirectory}/.dotfiles/secrets/general/secrets.yaml";
|
defaultSopsFile = "${config.home.homeDirectory}/.dotfiles/secrets/general/secrets.yaml";
|
||||||
validateSopsFiles = false;
|
validateSopsFiles = false;
|
||||||
secrets = {
|
secrets = {
|
||||||
|
|
|
||||||
|
|
@ -2,6 +2,7 @@
|
||||||
{
|
{
|
||||||
sops = {
|
sops = {
|
||||||
|
|
||||||
|
age.sshKeyPaths = [ "${config.users.users.swarsel.home}/.ssh/sops" ];
|
||||||
defaultSopsFile = "${config.users.users.swarsel.home}/.dotfiles/secrets/general/secrets.yaml";
|
defaultSopsFile = "${config.users.users.swarsel.home}/.dotfiles/secrets/general/secrets.yaml";
|
||||||
validateSopsFiles = false;
|
validateSopsFiles = false;
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,22 +1,6 @@
|
||||||
{ config, pkgs, lib, ... }: with lib;
|
{ config, pkgs, lib, ... }: with lib;
|
||||||
{
|
{
|
||||||
|
|
||||||
|
|
||||||
services.gpg-agent = {
|
|
||||||
enable = true;
|
|
||||||
enableSshSupport = true;
|
|
||||||
enableExtraSocket = true;
|
|
||||||
pinentryPackage = pkgs.pinentry.gtk2;
|
|
||||||
defaultCacheTtl = 600;
|
|
||||||
maxCacheTtl = 7200;
|
|
||||||
extraConfig = ''
|
|
||||||
allow-loopback-pinentry
|
|
||||||
allow-emacs-pinentry
|
|
||||||
'';
|
|
||||||
};
|
|
||||||
|
|
||||||
sops.age.sshKeyPaths = [ "${config.home.homeDirectory}/.ssh/sops" ];
|
|
||||||
|
|
||||||
# waybar config - TEMPLATE - update for cores and temp
|
# waybar config - TEMPLATE - update for cores and temp
|
||||||
programs.waybar.settings.mainBar = {
|
programs.waybar.settings.mainBar = {
|
||||||
# temperature.hwmon-path = "/sys/devices/pci0000:00/0000:00:18.3/hwmon/hwmon4/temp1_input";
|
# temperature.hwmon-path = "/sys/devices/pci0000:00/0000:00:18.3/hwmon/hwmon4/temp1_input";
|
||||||
|
|
|
||||||
|
|
@ -13,7 +13,6 @@
|
||||||
# kernelPackages = pkgs.linuxPackages_latest;
|
# kernelPackages = pkgs.linuxPackages_latest;
|
||||||
};
|
};
|
||||||
|
|
||||||
sops.age.sshKeyPaths = [ "${config.users.users.swarsel.home}/.ssh/sops" ];
|
|
||||||
|
|
||||||
networking = {
|
networking = {
|
||||||
hostName = "fourside"; # Define your hostname.
|
hostName = "fourside"; # Define your hostname.
|
||||||
|
|
|
||||||
|
|
@ -3,18 +3,6 @@
|
||||||
{
|
{
|
||||||
|
|
||||||
|
|
||||||
services.gpg-agent = {
|
|
||||||
enable = true;
|
|
||||||
enableSshSupport = true;
|
|
||||||
enableExtraSocket = true;
|
|
||||||
pinentryPackage = pkgs.pinentry.gtk2;
|
|
||||||
defaultCacheTtl = 600;
|
|
||||||
maxCacheTtl = 7200;
|
|
||||||
extraConfig = ''
|
|
||||||
allow-loopback-pinentry
|
|
||||||
allow-emacs-pinentry
|
|
||||||
'';
|
|
||||||
};
|
|
||||||
|
|
||||||
|
|
||||||
home = {
|
home = {
|
||||||
|
|
|
||||||
|
|
@ -3,18 +3,6 @@
|
||||||
{
|
{
|
||||||
|
|
||||||
|
|
||||||
services.gpg-agent = {
|
|
||||||
enable = true;
|
|
||||||
enableSshSupport = true;
|
|
||||||
enableExtraSocket = true;
|
|
||||||
pinentryPackage = pkgs.pinentry.gtk2;
|
|
||||||
defaultCacheTtl = 600;
|
|
||||||
maxCacheTtl = 7200;
|
|
||||||
extraConfig = ''
|
|
||||||
allow-loopback-pinentry
|
|
||||||
allow-emacs-pinentry
|
|
||||||
'';
|
|
||||||
};
|
|
||||||
|
|
||||||
home = {
|
home = {
|
||||||
username = "swarsel";
|
username = "swarsel";
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue