mirror of
https://github.com/foo-dogsquared/nixos-config.git
synced 2025-01-31 04:58:01 +00:00
profiles/agenix: move into default config
This commit is contained in:
parent
7ad9a62f2c
commit
30c7ee0203
@ -110,6 +110,7 @@
|
||||
# Only use imports as minimally as possible with the absolute
|
||||
# requirements of a host.
|
||||
imports = [
|
||||
inputs.agenix.nixosModules.age
|
||||
inputs.home-manager.nixosModules.home-manager
|
||||
];
|
||||
|
||||
@ -187,6 +188,14 @@
|
||||
home-manager.sharedModules =
|
||||
lib'.modulesToList (lib'.filesToAttr ./modules/home-manager);
|
||||
home-manager.extraSpecialArgs = { inherit inputs system self; };
|
||||
|
||||
# Enabling some things for agenix.
|
||||
programs.gnupg.agent = {
|
||||
enable = true;
|
||||
enableSSHSupport = true;
|
||||
};
|
||||
services.sshd.enable = true;
|
||||
services.openssh.enable = true;
|
||||
};
|
||||
|
||||
mkUser = { system ? defaultSystem, extraModules ? [ ] }:
|
||||
|
@ -24,7 +24,6 @@
|
||||
|
||||
# My custom configuration with my custom modules starts here.
|
||||
profiles = {
|
||||
agenix.enable = true;
|
||||
archiving.enable = true;
|
||||
system = {
|
||||
enable = true;
|
||||
|
@ -1,19 +0,0 @@
|
||||
# A module that automates setting up agenix for your system.
|
||||
{ inputs, lib, options, config, system, ... }:
|
||||
|
||||
let cfg = config.profiles.agenix;
|
||||
in {
|
||||
options.profiles.agenix.enable =
|
||||
lib.mkEnableOption "agenix-related config on your system";
|
||||
|
||||
imports = [ inputs.agenix.nixosModules.age ];
|
||||
config = lib.mkIf cfg.enable {
|
||||
# Enable all relevant services.
|
||||
programs.gnupg.agent = {
|
||||
enable = true;
|
||||
enableSSHSupport = true;
|
||||
};
|
||||
services.sshd.enable = true;
|
||||
services.openssh.enable = true;
|
||||
};
|
||||
}
|
@ -41,14 +41,6 @@ in {
|
||||
lib.mkEnableOption "backup setup with BorgBackup";
|
||||
|
||||
config = lib.mkIf cfg.enable {
|
||||
assertions = [{
|
||||
assertion = config.profiles.agenix.enable;
|
||||
message = ''
|
||||
Agenix module is not enabled. This is needed for the borg configuration
|
||||
we're using.
|
||||
'';
|
||||
}];
|
||||
|
||||
age.secrets.borg-password.file = lib.getSecret "archive/password";
|
||||
age.secrets.borg-patterns.file = lib.getSecret "archive/borg-patterns";
|
||||
age.secrets.borg-patterns-local.file =
|
||||
|
Loading…
Reference in New Issue
Block a user