init
This commit is contained in:
commit
300f0c30ee
6 changed files with 295 additions and 0 deletions
34
nixos/default.nix
Normal file
34
nixos/default.nix
Normal file
|
@ -0,0 +1,34 @@
|
|||
phps: {
|
||||
lib,
|
||||
config,
|
||||
...
|
||||
}: let
|
||||
cfg = config.programs.phps;
|
||||
inherit (lib) types;
|
||||
in {
|
||||
options.services.phps = {
|
||||
enable = lib.mkEnableOption "phps";
|
||||
phps = lib.mkOption {
|
||||
description = ''
|
||||
PHPs to use.
|
||||
'';
|
||||
default = phps;
|
||||
type = types.attrsOf types.package;
|
||||
};
|
||||
prefix = lib.mkOption {
|
||||
description = ''
|
||||
The prefix for every PHP installation.
|
||||
'';
|
||||
default = "/var/lib/phps";
|
||||
type = types.str;
|
||||
};
|
||||
};
|
||||
|
||||
config = {
|
||||
systemd.tmpfiles.settings =
|
||||
builtins.mapAttrs (name: drv: {
|
||||
"${cfg.prefix}/${name}"."L+".argument = drv.outPath;
|
||||
})
|
||||
phps;
|
||||
};
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue