added sops
This commit is contained in:
@@ -12,6 +12,10 @@
|
|||||||
url = "github:nix-community/nixGL";
|
url = "github:nix-community/nixGL";
|
||||||
inputs.nixpkgs.follows = "nixpkgs";
|
inputs.nixpkgs.follows = "nixpkgs";
|
||||||
};
|
};
|
||||||
|
sops-nix = {
|
||||||
|
url = "github:Mic92/sops-nix";
|
||||||
|
inputs.nixpkgs.follows = "nixpkgs";
|
||||||
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
outputs = { self, nixpkgs, ... }@inputs:
|
outputs = { self, nixpkgs, ... }@inputs:
|
||||||
|
|||||||
@@ -11,6 +11,7 @@
|
|||||||
|
|
||||||
../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) [
|
||||||
@@ -53,6 +54,7 @@
|
|||||||
btop
|
btop
|
||||||
yazi
|
yazi
|
||||||
sops
|
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
|
||||||
|
|||||||
17
homeManagerModules/sops.nix
Normal file
17
homeManagerModules/sops.nix
Normal file
@@ -0,0 +1,17 @@
|
|||||||
|
{ inputs, config, pkgs, lib, ... }:
|
||||||
|
{
|
||||||
|
sops = {
|
||||||
|
# It's also possible to use a ssh key, but only when it has no password:
|
||||||
|
sshKeyPaths = [ "${config.home.homeDirectory}/.ssh/id_ed25519" ];
|
||||||
|
defaultSopsFile = ./secrets.yaml;
|
||||||
|
secrets.test = {
|
||||||
|
# sopsFile = ./secrets.yml.enc; # optionally define per-secret files
|
||||||
|
|
||||||
|
# %r gets replaced with a runtime directory, use %% to specify a '%'
|
||||||
|
# sign. Runtime dir is $XDG_RUNTIME_DIR on linux and $(getconf
|
||||||
|
# DARWIN_USER_TEMP_DIR) on darwin.
|
||||||
|
path = "%r/test.txt";
|
||||||
|
};
|
||||||
|
|
||||||
|
};
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user