This commit is contained in:
2025-11-29 16:54:14 +01:00
parent 98737c1550
commit 6aac1fb788
4 changed files with 67 additions and 45 deletions

View File

@@ -1,42 +1,34 @@
# Those are my secrets, encrypted with sops
# You shouldn't import this file, unless you edit it
{
config,
pkgs,
inputs,
...
}: {
imports = [inputs.sops-nix.homeManagerModules.sops];
}:
{
imports = [ inputs.sops-nix.homeManagerModules.sops ];
sops = {
age.keyFile = "/home/hadi/.config/sops/age/keys.txt";
age.keyFile = "${config.xdg.configHome}/sops/age/keys.txt";
defaultSopsFile = ./secrets.yaml;
secrets = {
sshconfig = {path = "/home/hadi/.ssh/config";};
github-key = {path = "/home/hadi/.ssh/github";};
gitlab-key = {path = "/home/hadi/.ssh/gitlab";};
jack-key = {path = "/home/hadi/.ssh/jack";};
signing-key = {path = "/home/hadi/.ssh/key";};
signing-pub-key = {path = "/home/hadi/.ssh/key.pub";};
pia = {path = "/home/hadi/.config/pia/pia.ovpn";};
radicale_pass = { };
university_calendar_url = { };
# sshconfig = { path = "${config.home.homeDirectory}/.ssh/config"; };
};
};
home.file.".config/nixos/.sops.yaml".text = ''
keys:
- &primary age12yvtj49pfh3fqzqflscm0ek4yzrjhr6cqhn7x89gdxnlykq0xudq5c7334
- &primary age122w85pqj508ukv0rd388mahecgfckmpgnsgz0zcyec37ljae2epsdnvxpl
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/polaris/secrets/secrets.yaml$
key_groups:
- age:
- *primary
'';
systemd.user.services.mbsync.Unit.After = ["sops-nix.service"];
home.packages = with pkgs; [sops age];
wayland.windowManager.hyprland.settings.exec-once = ["systemctl --user start sops-nix"];
home.packages = with pkgs; [
sops
age
];
}