moved sops stuff into sops.nix
This commit is contained in:
@@ -12,7 +12,6 @@
|
|||||||
|
|
||||||
../nixosModules/options.nix
|
../nixosModules/options.nix
|
||||||
inputs._1password-shell-plugins.hmModules.default
|
inputs._1password-shell-plugins.hmModules.default
|
||||||
inputs.sops-nix.homeManagerModules.sops
|
|
||||||
];
|
];
|
||||||
|
|
||||||
nixpkgs.config.allowUnfreePredicate = pkg: builtins.elem (lib.getName pkg) [
|
nixpkgs.config.allowUnfreePredicate = pkg: builtins.elem (lib.getName pkg) [
|
||||||
@@ -54,8 +53,6 @@
|
|||||||
lazygit
|
lazygit
|
||||||
btop
|
btop
|
||||||
yazi
|
yazi
|
||||||
sops
|
|
||||||
age
|
|
||||||
(writeShellScriptBin "nhmu" ''
|
(writeShellScriptBin "nhmu" ''
|
||||||
nix flake update --flake ~/.config/home-manager
|
nix flake update --flake ~/.config/home-manager
|
||||||
nix run home-manager -- switch --flake ~/.config/home-manager --impure
|
nix run home-manager -- switch --flake ~/.config/home-manager --impure
|
||||||
|
|||||||
@@ -1,9 +1,12 @@
|
|||||||
{ config, pkgs, lib, ... }:
|
{ inputs, config, pkgs, lib, ... }:
|
||||||
let
|
let
|
||||||
sopsConfigPath = "${config.home.homeDirectory}/.config/home-manager/jsl-home/.sops.yaml";
|
sopsConfigPath = "${config.home.homeDirectory}/.config/home-manager/jsl-home/.sops.yaml";
|
||||||
sopsSecretsPath = "${config.home.homeDirectory}/.config/home-manager/jsl-home/keys/secrets.yaml";
|
sopsSecretsPath = "${config.home.homeDirectory}/.config/home-manager/jsl-home/keys/secrets.yaml";
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
|
imports = [
|
||||||
|
inputs.sops-nix.homeManagerModules.sops
|
||||||
|
];
|
||||||
sops = {
|
sops = {
|
||||||
# It's also possible to use a ssh key, but only when it has no password:
|
# It's also possible to use a ssh key, but only when it has no password:
|
||||||
age.sshKeyPaths = [ "${config.home.homeDirectory}/.ssh/id_ed25519" ];
|
age.sshKeyPaths = [ "${config.home.homeDirectory}/.ssh/id_ed25519" ];
|
||||||
@@ -14,6 +17,8 @@ in
|
|||||||
(writeShellScriptBin "edit-secrets" ''
|
(writeShellScriptBin "edit-secrets" ''
|
||||||
sops --config ${sopsConfigPath} ${sopsSecretsPath}
|
sops --config ${sopsConfigPath} ${sopsSecretsPath}
|
||||||
'')
|
'')
|
||||||
|
sops
|
||||||
|
age
|
||||||
];
|
];
|
||||||
programs.zsh.shellAliases.sops = lib.mkIf config.enableShell "sops --config ${sopsConfigPath}";
|
programs.zsh.shellAliases.sops = lib.mkIf config.enableShell "sops --config ${sopsConfigPath}";
|
||||||
}
|
}
|
||||||
Reference in New Issue
Block a user