refactor: Move user config into modules/
This commit is contained in:
@@ -1,24 +1,22 @@
|
||||
{ config, lib, pkgs, ... }:
|
||||
|
||||
with lib;
|
||||
|
||||
let cfg = config.sydnix.sops;
|
||||
in {
|
||||
options = {
|
||||
sydnix.sops = {
|
||||
enable = mkEnableOption "Sops";
|
||||
keyFile = mkOption {
|
||||
enable = lib.mkEnableOption "Sops";
|
||||
keyFile = lib.mkOption {
|
||||
description = "Path to an Age key file.";
|
||||
type = types.path;
|
||||
type = lib.types.path;
|
||||
default = config.home.homeDirectory + "/key.txt";
|
||||
};
|
||||
secrets = mkOption {
|
||||
secrets = lib.mkOption {
|
||||
description = "Secrets passed directly to sops-nix.";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
config = lib.mkIf cfg.enable {
|
||||
home.packages = [
|
||||
pkgs.sops
|
||||
];
|
||||
|
||||
Reference in New Issue
Block a user