diff --git a/configs/nixos/modules/default.nix b/configs/nixos/modules/default.nix index be827cf..f46e319 100644 --- a/configs/nixos/modules/default.nix +++ b/configs/nixos/modules/default.nix @@ -42,6 +42,10 @@ in users.groups.storage.gid = 10000; + security.sudo.extraConfig = '' + Defaults env_keep += "EDITOR VISUAL" + ''; + time.timeZone = "America/New_York"; i18n.defaultLocale = "en_GB.UTF-8"; @@ -87,6 +91,10 @@ in update = "sudo nixos-rebuild switch --flake .#${config.networking.hostName}"; cleanup = "sudo nix-collect-garbage -d"; + sops-host = { + command = "sudo --preserve-env=EDITOR,VISUAL env SOPS_AGE_KEY_FILE=/var/lib/sops-nix/key.txt nix shell nixpkgs#sops nixpkgs#neovim -c sops"; + abbreviation = false; + }; }; modules.shell.fish.enable = lib.mkDefault true; diff --git a/configs/nixos/modules/shell/fish/default.nix b/configs/nixos/modules/shell/fish/default.nix index 02e7aa0..de7e8cd 100644 --- a/configs/nixos/modules/shell/fish/default.nix +++ b/configs/nixos/modules/shell/fish/default.nix @@ -103,13 +103,6 @@ in body = builtins.readFile ./functions/deploy-to.fish; }; - sops-host = { - description = "Run sops with the host age key"; - body = '' - sudo env SOPS_AGE_KEY_FILE=/var/lib/sops-nix/key.txt nix shell nixpkgs#sops -c sops $argv - ''; - }; - }; # Rendered by home-manager into ~/.config/fish/config.fish.