mirror of
https://github.com/foo-dogsquared/nixos-config.git
synced 2025-02-07 12:19:07 +00:00
![Gabriel Arazas](/assets/img/avatar_default.png)
I revisited NixOS this week and I've rewritten my NixOS config from scratch. I must say I really like Nix flakes. For whatever reason it just clicked and I understood more programming with Nix despite my previous experience which is not good. Could be just the fact I had a break for a long time from completely using Nix (I still used it on non-NixOS distros). Eh... I still took some things from the original inspiration of this configuration so there's that.
20 lines
508 B
Nix
20 lines
508 B
Nix
# A module that automates setting up agenix for your system.
|
|
{ inputs, lib, options, config, ... }:
|
|
|
|
let
|
|
cfg = config.modules.agenix;
|
|
in {
|
|
options.modules.agenix.enable = lib.mkEnableOption "Enable agenix 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;
|
|
};
|
|
}
|