Compare commits

...

2 Commits

Author SHA1 Message Date
507b4fcefd added sops-nix 2026-11-14 17:04:25 +00:00
f08d778a56 added secrets 2026-11-14 16:44:58 +00:00
7 changed files with 70 additions and 0 deletions

3
age.txt Normal file
View File

@@ -0,0 +1,3 @@
# created: 2026-11-14T16:38:56Z
# public key: age1xxeh8ju80rcct7k349jx338ylav04a44cnmp924plxnhkjvhmfcqmas62n
AGE-SECRET-KEY-1WTP26ZUF85T79Q9VEQTP7U5L83M7QQHWFTUPXPPLY2YP6QYF8S2QCQ6XYU

21
flake.lock generated
View File

@@ -178,9 +178,30 @@
"nixpkgs": "nixpkgs", "nixpkgs": "nixpkgs",
"nixpkgs-unstable": "nixpkgs-unstable", "nixpkgs-unstable": "nixpkgs-unstable",
"nvim": "nvim", "nvim": "nvim",
"sops-nix": "sops-nix",
"wrappers": "wrappers_2" "wrappers": "wrappers_2"
} }
}, },
"sops-nix": {
"inputs": {
"nixpkgs": [
"nixpkgs"
]
},
"locked": {
"lastModified": 1794624949,
"narHash": "sha256-3q/hxp/flW1PnV3Dx+H3p8kHGEHJ7251BqVMNsAAB9E=",
"owner": "Mic92",
"repo": "sops-nix",
"rev": "11e5885d241743ff0193465d533b20e754bc3ce0",
"type": "github"
},
"original": {
"owner": "Mic92",
"repo": "sops-nix",
"type": "github"
}
},
"wrappers": { "wrappers": {
"inputs": { "inputs": {
"nixpkgs": "nixpkgs_3" "nixpkgs": "nixpkgs_3"

View File

@@ -15,6 +15,11 @@
# My Nvim config # My Nvim config
nvim.url = "git+https://git.voidarc.co.uk/voidarc/nvim"; nvim.url = "git+https://git.voidarc.co.uk/voidarc/nvim";
sops-nix = {
url = "github:Mic92/sops-nix";
inputs.nixpkgs.follows = "nixpkgs";
};
# Hyprland Configuration # Hyprland Configuration
hyprland = { hyprland = {
url = "git+https://git.voidarc.co.uk/adumh00man/hyprland-dendritic"; url = "git+https://git.voidarc.co.uk/adumh00man/hyprland-dendritic";

View File

@@ -14,6 +14,7 @@
networking networking
hyprland hyprland
theming theming
sops
]; ];
in { in {
imports = modules; imports = modules;

View File

@@ -0,0 +1,22 @@
{inputs, ...}: {
flake.nixosModules.sops = {
pkgs,
config,
...
}: {
imports = [inputs.sops-nix.nixosModules.default];
sops = {
age.keyFile = "/home/user01/Projects/dendritic-tutorial/age.txt";
defaultSopsFile = ./secrets.yaml;
secrets = {
secret = {};
something = {};
};
templates = {
"secret-value.env".content = "${config.sops.placeholder.something}";
};
};
};
}

View File

@@ -0,0 +1,17 @@
secret: ENC[AES256_GCM,data:2W9fC2QMVuctXc7kkX6a++ee,iv:igaTggUUKodYheKF4oxBwzfVjKJMAp/XNt+idd4xfek=,tag:Avv1hkngS7OAFAfMrbrD6A==,type:str]
something: ENC[AES256_GCM,data:rNfYkLtWVEgvU9Xrfg==,iv:v6q7846C+fWKz0gOo2xWcb0SGkha+dJMTZ2/4+uud10=,tag:FZhiU7NuReIk4BLlnquMhA==,type:str]
sops:
age:
- enc: |
-----BEGIN AGE ENCRYPTED FILE-----
YWdlLWVuY3J5cHRpb24ub3JnL3YxCi0+IFgyNTUxOSBUa0orV3o0Qm82MUo3NlNG
YitrcGNUUWZQUkszc096VlI5SWxrTkxNdVZRCjZLelZaV1p2MzNDRjVNS3lNMnVw
SWl5NkVHSWNrOHVaa3YySWVzZVhNcFEKLS0tIEdVU0RYY2ZDcUorK0cvT1lYTjhw
ekE0QjBkSnVWYWE1LzN1VHphZWtWMHcKc83T1EyVzmQHtGA2Mdt4uRsYx89AbNkg
Ng3b82VcxZQzR9HadM55MFy2BKGqpjOed+iBwesliU2JPcbkQb75dg==
-----END AGE ENCRYPTED FILE-----
recipient: age1xxeh8ju80rcct7k349jx338ylav04a44cnmp924plxnhkjvhmfcqmas62n
lastmodified: "2026-11-14T16:43:47Z"
mac: ENC[AES256_GCM,data:+RcPJKJrejXkEw17qmYDFSb62Cc4QxsQdZ1j7UkMaPenoebzgQl6kQIbPAlK14rDldmRnSGm0A3YOrB8Y6S0URu+H4R2e+PdXEo4xJKnIHfWufCmJj+k++d8Sueh3030JJuDJvjKGm6/l4/CkUDXELnVQGKlaF3Rux31ORHDvtI=,iv:1gEnVSC8r10qEMUATcoukvd0GuqxIYtXlJi+yirAl5k=,tag:Q3sOasF4i9wEySR02L4U1g==,type:str]
unencrypted_suffix: _unencrypted
version: 3.13.3

View File

@@ -81,6 +81,7 @@
v = lib.getExe inputs'.nvim.packages.default; v = lib.getExe inputs'.nvim.packages.default;
ff = lib.getExe pkgs.fastfetch; ff = lib.getExe pkgs.fastfetch;
cat = lib.getExe pkgs.bat; cat = lib.getExe pkgs.bat;
secret = "cat /run/secrets/secret-value";
}; };
# Can also be zshrc.path, and path will take precedence over content. # Can also be zshrc.path, and path will take precedence over content.
zshrc.content = '' zshrc.content = ''