From 17db8c152edd352191e9595b465f8f4a992dc754 Mon Sep 17 00:00:00 2001 From: Pim Kunis Date: Sat, 4 Nov 2023 18:00:24 +0100 Subject: [PATCH] enable keepassxc secret agent disable gnome keyring enable ssh agent encrypt keepassxc config because it contains secret agent keys now remove alacritty config --- home-manager/alacritty/config.nix | 63 ----------------------------- home-manager/alacritty/default.nix | 9 ----- home-manager/keepassxc/config.nix | 33 --------------- home-manager/keepassxc/default.nix | 7 +++- nixos/default.nix | 28 ++++++++----- secrets/keepassxc.ini.age | Bin 0 -> 4291 bytes secrets/secrets.nix | 1 + 7 files changed, 23 insertions(+), 118 deletions(-) delete mode 100644 home-manager/alacritty/config.nix delete mode 100644 home-manager/alacritty/default.nix delete mode 100644 home-manager/keepassxc/config.nix create mode 100644 secrets/keepassxc.ini.age diff --git a/home-manager/alacritty/config.nix b/home-manager/alacritty/config.nix deleted file mode 100644 index 997a629..0000000 --- a/home-manager/alacritty/config.nix +++ /dev/null @@ -1,63 +0,0 @@ -pkgs: config: -{ - # Gruvbox theme (https://github.com/alacritty/alacritty-theme/blob/master/themes/gruvbox_dark.yaml) - colors = { - primary = { - background = "0x282828"; - foreground = "0xebdbb2"; - }; - - normal = { - black = "0x282828"; - red = "0xcc241d"; - green = "0x98971a"; - yellow = "0xd79921"; - blue = "0x458588"; - magenta = "0xb16286"; - cyan = "0x689d6a"; - white = "0xa89984"; - }; - - bright = { - black = "0x928374"; - red = "0xfb4934"; - green = "0xb8bb26"; - yellow = "0xfabd2f"; - blue = "0x83a598"; - magenta = "0xd3869b"; - cyan = "0x8ec07c"; - white = "0xebdbb2"; - }; - }; - - font = { - normal = { - family = "Hack Nerd Font Mono"; - style = "Regular"; - }; - - bold = { - family = "Hack Nerd Font Mono"; - style = "Bold"; - }; - - italic = { - family = "Hack Nerd Font Mono"; - style = "Italic"; - }; - - bold_italic = { - family = "Hack Nerd Font Mono"; - style = "Bold Italic"; - }; - }; - - shell = { - program = "${pkgs.bash}/bin/bash"; - args = [ - "--login" - "-c" - "${config.programs.tmux.package}/bin/tmux" - ]; - }; -} diff --git a/home-manager/alacritty/default.nix b/home-manager/alacritty/default.nix deleted file mode 100644 index 97fff22..0000000 --- a/home-manager/alacritty/default.nix +++ /dev/null @@ -1,9 +0,0 @@ -{ pkgs, config, ... }: -{ - config = { - programs.alacritty = { - enable = true; - settings = import ./config.nix pkgs config; - }; - }; -} diff --git a/home-manager/keepassxc/config.nix b/home-manager/keepassxc/config.nix deleted file mode 100644 index 0c574a2..0000000 --- a/home-manager/keepassxc/config.nix +++ /dev/null @@ -1,33 +0,0 @@ -{ - General = { - ConfigVersion = 2; - }; - - Browser = { - CustomProxyLocation = ""; - Enabled = true; - }; - - GUI = { - MinimizeOnClose = true; - MinimizeOnStartup = true; - ShowExpiredEntriesOnDatabaseUnlock = false; - ShowTrayIcon = true; - TrayIconAppearance = "monochrome-light"; - }; - - PasswordGenerator = { - AdditionalChars = ""; - ExcludedChars = ""; - }; - - SSHAgent = { - Enabled = true; - }; - - Security = { - ClearClipboardTimeout = 30; - ClearSearch = false; - EnableCopyOnDoubleClick = true; - }; -} diff --git a/home-manager/keepassxc/default.nix b/home-manager/keepassxc/default.nix index b3a015c..8a560dd 100644 --- a/home-manager/keepassxc/default.nix +++ b/home-manager/keepassxc/default.nix @@ -1,8 +1,11 @@ -{ pkgs, lib, ...}: +{ pkgs, config, ...}: { config = { home.packages = [ pkgs.keepassxc ]; - xdg.configFile."keepassxc/keepassxc.ini".text = lib.generators.toINI {} (import ./config.nix); + homeage.file."keepassxc.ini" = { + source = ../../secrets/keepassxc.ini.age; + symlinks = [ "${config.xdg.configHome}/keepassxc/keepassxc.ini" ]; + }; }; } diff --git a/nixos/default.nix b/nixos/default.nix index 09838af..a9cae4f 100644 --- a/nixos/default.nix +++ b/nixos/default.nix @@ -1,4 +1,4 @@ -{ pkgs, config, ... }: { +{ pkgs, config, lib, ... }: { imports = [ ./hardware-configuration.nix ]; @@ -10,6 +10,8 @@ time.timeZone = "Europe/Amsterdam"; i18n.defaultLocale = "en_US.UTF-8"; + services.gnome.gnome-keyring.enable = lib.mkForce false; + services = { xserver = { enable = true; @@ -65,17 +67,21 @@ system.stateVersion = "23.05"; - programs.ssh.knownHosts = { - dmz = { - hostNames = ["*.dmz"]; - publicKey = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIAX2IhgHNxC6JTvLu9cej+iWuG+uJFMXn4AiRro9533x"; - certAuthority = true; - }; + programs.ssh = { + startAgent = true; - hypervisors = { - hostNames = ["*.hyp"]; - publicKey = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIFzRkH3d/KVJQouswY/DMpenWbDFVOnI3Vut0xR0e1tb"; - certAuthority = true; + knownHosts = { + dmz = { + hostNames = ["*.dmz"]; + publicKey = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIAX2IhgHNxC6JTvLu9cej+iWuG+uJFMXn4AiRro9533x"; + certAuthority = true; + }; + + hypervisors = { + hostNames = ["*.hyp"]; + publicKey = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIFzRkH3d/KVJQouswY/DMpenWbDFVOnI3Vut0xR0e1tb"; + certAuthority = true; + }; }; }; diff --git a/secrets/keepassxc.ini.age b/secrets/keepassxc.ini.age new file mode 100644 index 0000000000000000000000000000000000000000..244daf4889363a6405537d1b95b786f11eef7ad5 GIT binary patch literal 4291 zcmV;!5IpZ;XJsvAZewzJaCB*JZZ2 zL2+1Ec1bH{V>K{kM?x}bXGbz}cw%ozb~breG*n`6L{$ncJ|J^*Xf0)AGBq_ZIUsgI zT52_CAW2wKbyRP0IW=ZXZZ~IkLqkP+Qgu#eNj5b`b8JyfcW_o&Zgn|RNpWjy3Pg4^ zW@U0iZ&X5Pa#n0JOioa8Pfc=Ebb4WWD^zfAQ%Y5LD|L8QQA2V;3N1b$Bx@yIEoX9N zVRL05Ky55CATvlu3TI3N0-yAYo}xbT=_hP&IN!Z9!OcWJgbB zNlkD~adA{)Hdth9YIbonV|7O|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+HA1Lxl#@QMKpyQsW< zD?6(i3OMV6yDeun!O=hg?#*$9R$S8C0Qj42-y_a z*PX-huB16id_g?J<+oi-fzvtW4)73n@ zRH--uF4jbe$U3;BhecK>;9$59WKscZ?$-;;D%&fIHtRdO+Pcy#wTTkHkxu6{;CU?z z1YgyLalvF1O8hg}G#5sl^fKM!6+s*-PO~`Jwsr8tupzk$C#(jTH|Nt__$PPOmwttX z;vP=*DxS7uGi(N2(p`KPC;;=xP8Oxn$^y=fizFVO0LQPBUOhz02+wd-GA?P$WrSb7$JsHEBTiq7KTlIAazK z*Pqc3l>(5Q7xk53i0f|QrVjDbEH*2m!fYM^4q1NVi~kJ$_4~X9px074XMZZwSI0O`!*we98Vt&Cs!tD8C7ac6tmvZv3H^XnPkz+(o}q z8M;NlI*q`G;atM%>Pm-*X?~B`^n{Q>J~0?f_`+W2l1Ijq;|;LGqne*rT+id$4L&1v zz)l1mb6H4$IcJxVu;JHMd3)#d4Js|C`#=pGyCqs7s&1>`3FmvaGykWS{e9QhuvdF& lwnG>BQhn|BwT$0>m0j=FQi_gO;BdPMG7Cm>!wDvEq%PklD24z4 literal 0 HcmV?d00001 diff --git a/secrets/secrets.nix b/secrets/secrets.nix index d38e33a..7b8f80f 100644 --- a/secrets/secrets.nix +++ b/secrets/secrets.nix @@ -14,4 +14,5 @@ in "common-pg-tfbackend.age".publicKeys = publicKeys; "ansible-vault-secret.age".publicKeys = publicKeys; "powerdns-api-key.json.age".publicKeys = publicKeys; + "keepassxc.ini.age".publicKeys = publicKeys; # Secret agent causes private keys in config file. }