From ad125134629e421924551ad780f759a9c89b80e2 Mon Sep 17 00:00:00 2001 From: Sakooooo <78461130+Sakooooo@users.noreply.github.com> Date: Thu, 31 Aug 2023 13:35:16 +0400 Subject: [PATCH] add security modules --- default.nix | 1 + modules/security/age.nix | 17 +++++++++++++++++ modules/security/default.nix | 5 +++++ 3 files changed, 23 insertions(+) create mode 100644 modules/security/age.nix create mode 100644 modules/security/default.nix diff --git a/default.nix b/default.nix index 287c3567..82d94b82 100644 --- a/default.nix +++ b/default.nix @@ -20,6 +20,7 @@ outputs.nixosModules.hardware outputs.nixosModules.dev outputs.nixosModules.media + outputs.nixosModules.security ]; # flakes diff --git a/modules/security/age.nix b/modules/security/age.nix new file mode 100644 index 00000000..4ca213c8 --- /dev/null +++ b/modules/security/age.nix @@ -0,0 +1,17 @@ +{ outputs, options, config, lib, pkgs, ...}: +with lib; +let + cfg = config.modules.security.age; +in +{ + options.modules.security.age = { + enable = mkEnableOption false; + }; + + config = mkIf cfg.enable { + environment.systemPackages = with pkgs; [ + age + ]; + + }; +} diff --git a/modules/security/default.nix b/modules/security/default.nix new file mode 100644 index 00000000..6dd419fd --- /dev/null +++ b/modules/security/default.nix @@ -0,0 +1,5 @@ +{ + imports = [ + ./age.nix + ]; +}