nixos/modules/common/default.nix

35 lines
748 B
Nix
Raw Permalink Normal View History

2025-06-20 11:59:24 -07:00
{ config, pkgs, lib, ... }: {
2025-08-12 11:58:29 -07:00
options = {
user = lib.mkOption {
default = "${config.user}";
description = "user";
};
2025-06-20 11:59:24 -07:00
2025-08-12 11:58:29 -07:00
host = lib.mkOption {
type = lib.types.str;
description = "host";
};
2025-06-20 11:59:24 -07:00
2025-08-12 11:58:29 -07:00
sops_file = lib.mkOption {
type = lib.types.str;
description = "SOPS filename";
};
2025-06-20 11:59:24 -07:00
};
config = {
nix.settings.experimental-features = [ "nix-command" "flakes" ];
nixpkgs.config.allowUnfree = true;
home-manager.useGlobalPkgs = true;
services.cron.enable = true;
# sops
environment.systemPackages = with pkgs; [ sops ];
sops.age.keyFile = "${config.users.users.${config.user}.home}/.config/sops/age/keys.txt";
sops.defaultSopsFile = ../../secrets/${config.sops_file};
};
}