started migration to snowfall
This commit is contained in:
parent
e293e87124
commit
c8f6c4d818
100 changed files with 49 additions and 32 deletions
27
_modules/system/options.nix
Normal file
27
_modules/system/options.nix
Normal file
|
@ -0,0 +1,27 @@
|
|||
{ config, lib, ... }:
|
||||
let
|
||||
inherit (lib.types) attrs;
|
||||
inherit (lib.my) mkOpt;
|
||||
in
|
||||
{
|
||||
options = {
|
||||
user = mkOpt attrs {};
|
||||
};
|
||||
|
||||
config = {
|
||||
environment.variables = {
|
||||
NIXPKGS_ALLOW_UNFREE = "1";
|
||||
};
|
||||
|
||||
nix.settings = let
|
||||
inherit (lib) elem attrNames filterAttrs;
|
||||
|
||||
users = (attrNames (filterAttrs (name: user: elem "wheel" (user.extraGroups or [])) config.users.users));# ++ [ "root" ];
|
||||
in
|
||||
{
|
||||
trusted-users = users;
|
||||
allowed-users = users;
|
||||
experimental-features = [ "nix-command" "flakes" ];
|
||||
};
|
||||
};
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue