mirror of
https://github.com/RGBCube/ncc
synced 2025-07-29 11:07:44 +00:00
Start refactor
This commit is contained in:
parent
99b7ccfadb
commit
06cce18e72
155 changed files with 2139 additions and 3738 deletions
17
modules/common/agenix.nix
Normal file
17
modules/common/agenix.nix
Normal file
|
@ -0,0 +1,17 @@
|
|||
{ config, lib, pkgs, ... }: let
|
||||
inherit (lib) attrNames head mkAliasOptionModule mkIf;
|
||||
in {
|
||||
imports = [(mkAliasOptionModule [ "secrets" ] [ "age" "secrets" ])];
|
||||
|
||||
age.identityPaths = [
|
||||
(if config.isLinux then
|
||||
"/root/.ssh/id"
|
||||
else
|
||||
"/Users/${config.users.users |> attrNames |> head}/.ssh/id")
|
||||
];
|
||||
|
||||
environment = mkIf config.isDesktop {
|
||||
shellAliases.agenix = "agenix --identity ~/.ssh/id";
|
||||
systemPackages = [ pkgs.agenix ];
|
||||
};
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue