refactor(modules): clean up folder structure

This commit is contained in:
Mohammad Rafiq 2025-07-07 19:24:36 +08:00
parent d8aa7f62b4
commit 03fca8b28b
No known key found for this signature in database
12 changed files with 32 additions and 38 deletions

View file

@ -0,0 +1,17 @@
{ lib, config, ... }:
let
inherit (builtins) elem;
inherit (lib.options) mkOption;
inherit (lib.strings) getName;
inherit (lib.types) listOf str;
predicate = pkg: elem (getName pkg) config.allowedUnfreePackages;
in
{
options.allowedUnfreePackages = mkOption {
type = listOf str;
default = [ ];
};
config.flake.modules.nixos.default = {
nixpkgs.config.allowUnfreePredicate = predicate;
};
}