added sops-nix
This commit is contained in:
21
flake.lock
generated
21
flake.lock
generated
@@ -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"
|
||||||
|
|||||||
@@ -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";
|
||||||
|
|||||||
@@ -14,6 +14,7 @@
|
|||||||
networking
|
networking
|
||||||
hyprland
|
hyprland
|
||||||
theming
|
theming
|
||||||
|
sops
|
||||||
];
|
];
|
||||||
in {
|
in {
|
||||||
imports = modules;
|
imports = modules;
|
||||||
|
|||||||
22
modules/features/sops/default.nix
Normal file
22
modules/features/sops/default.nix
Normal 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}";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
@@ -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 = ''
|
||||||
|
|||||||
Reference in New Issue
Block a user