mirror of
https://github.com/anotherhadi/nixy.git
synced 2026-08-21 10:45:49 +02:00
Init impermanence
Signed-off-by: Hadi <112569860+anotherhadi@users.noreply.github.com>
This commit is contained in:
@@ -1,62 +1,46 @@
|
||||
# Those are my secrets, encrypted with sops
|
||||
# You shouldn't import this file, unless you edit it
|
||||
{
|
||||
inputs,
|
||||
pkgs,
|
||||
config,
|
||||
...
|
||||
}: let
|
||||
home = config.home.homeDirectory;
|
||||
username = config.var.username;
|
||||
home = "/home/${username}";
|
||||
in {
|
||||
imports = [inputs.sops-nix.homeManagerModules.sops];
|
||||
|
||||
sops = {
|
||||
age.keyFile = "${home}/.config/sops/age/keys.txt";
|
||||
age.keyFile = "${home}/.config/sops-nix/age/keys.txt";
|
||||
defaultSopsFile = ./secrets.yaml;
|
||||
secrets = {
|
||||
ssh-config = {
|
||||
owner = username;
|
||||
path = "${home}/.ssh/config";
|
||||
};
|
||||
github-key = {
|
||||
ssh-github-key = {
|
||||
owner = username;
|
||||
path = "${home}/.ssh/github";
|
||||
};
|
||||
jack-key = {
|
||||
anotherhadi-pgp-key = {
|
||||
owner = username;
|
||||
path = "${home}/.ssh/anotherhadi-priv.asc";
|
||||
};
|
||||
ssh-jack-key = {
|
||||
owner = username;
|
||||
path = "${home}/.ssh/jack";
|
||||
};
|
||||
signing-key = {
|
||||
owner = username;
|
||||
path = "${home}/.ssh/key";
|
||||
};
|
||||
signing-pub-key = {
|
||||
owner = username;
|
||||
path = "${home}/.ssh/key.pub";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
home.file.".config/nixos/.sops.yaml".text = ''
|
||||
keys:
|
||||
- &primary age12yvtj49pfh3fqzqflscm0ek4yzrjhr6cqhn7x89gdxnlykq0xudq5c7334
|
||||
- &work age1c8pawdsxptfslgrz2c56s39mrtnjzc5mm3hfzgr2wdwu2v6vfsdsupjsq6
|
||||
creation_rules:
|
||||
- path_regex: hosts/laptop/secrets/secrets.yaml$
|
||||
key_groups:
|
||||
- age:
|
||||
- *primary
|
||||
- path_regex: hosts/server/secrets/secrets.yaml$
|
||||
key_groups:
|
||||
- age:
|
||||
- *primary
|
||||
- path_regex: hosts/work/secrets/secrets.yaml$
|
||||
key_groups:
|
||||
- age:
|
||||
- *work
|
||||
'';
|
||||
|
||||
home.packages = with pkgs; [
|
||||
environment.systemPackages = with pkgs; [
|
||||
sops
|
||||
age
|
||||
];
|
||||
|
||||
wayland.windowManager.hyprland.settings.exec-once = [
|
||||
"systemctl --user start sops-nix"
|
||||
];
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user