nixos/modules/common/default.nix
2025-06-20 11:59:24 -07:00

34 lines
722 B
Nix

{ config, pkgs, lib, ... }: {
options = {
user = lib.mkOption {
default = "${config.user}";
description = "user";
};
host = lib.mkOption {
type = lib.types.str;
description = "host";
};
sops_file = lib.mkOption {
type = lib.types.str;
description = "SOPS filename";
};
};
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};
};
}