From d639c293ad1ba71008aeb5c54c40f59a076018dc Mon Sep 17 00:00:00 2001 From: Freya Murphy Date: Tue, 24 Jun 2025 11:51:39 -0400 Subject: redo lib, make global vars for key lists --- home/gpg.nix | 9 +++------ home/neovim/config.nix | 4 ++-- home/neovim/default.nix | 4 ++-- home/ssh/config | 9 ++++----- 4 files changed, 11 insertions(+), 15 deletions(-) (limited to 'home') diff --git a/home/gpg.nix b/home/gpg.nix index a2deed2..e40ad92 100644 --- a/home/gpg.nix +++ b/home/gpg.nix @@ -2,12 +2,9 @@ config, lib, pkgs, + self, ... -}: let - keysDir = ../files/keys; - keys = lib.attrsets.mapAttrsToList (name: type: "${keysDir}/${name}") (builtins.readDir keysDir); - gpgKeys = builtins.filter (path: lib.strings.hasSuffix "asc" path) keys; -in { +}: { home-manager.users.${config.user} = { # install keys into gpg keyring programs.gpg = { @@ -17,7 +14,7 @@ in { source = path; trust = 5; }) - gpgKeys; + self.lib.gpgKeys; }; # global gpg agent diff --git a/home/neovim/config.nix b/home/neovim/config.nix index ae10243..4ded0e9 100644 --- a/home/neovim/config.nix +++ b/home/neovim/config.nix @@ -1,8 +1,8 @@ { config, - inputs, + self, }: -inputs.self.lib.lua.fmt { +self.lib.toLua { # Width of tabs in the editor tabwidth = 4; # If tabs should be expanded to spaces diff --git a/home/neovim/default.nix b/home/neovim/default.nix index c1ed000..559bdf0 100644 --- a/home/neovim/default.nix +++ b/home/neovim/default.nix @@ -1,11 +1,11 @@ { - inputs, config, lib, pkgs, + self, ... }: let - lua_cfg = import ./config.nix {inherit config inputs;}; + lua_cfg = import ./config.nix {inherit config self;}; lua = builtins.readFile ./init.lua; in { environment.variables.EDITOR = "nvim"; diff --git a/home/ssh/config b/home/ssh/config index d1a3d1d..f240610 100644 --- a/home/ssh/config +++ b/home/ssh/config @@ -1,3 +1,7 @@ +HostkeyAlgorithms +ssh-rsa +PubkeyAcceptedKeyTypes +ssh-rsa +KexAlgorithms -sntrup761x25519-sha512@openssh.com + Match Host * exec "gpg-connect-agent UPDATESTARTUPTTY /bye" Host *.in.freya.cat cid.freya.cat alivemc.net @@ -8,8 +12,3 @@ Host *.cs.rit.edu Host *.redcom.com User fmurphy - -Host * - HostkeyAlgorithms +ssh-rsa - PubkeyAcceptedKeyTypes +ssh-rsa - KexAlgorithms -sntrup761x25519-sha512@openssh.com -- cgit v1.2.3-freya