mirror of
https://github.com/CHN-beta/nixos.git
synced 2024-10-23 09:29:02 +08:00
system: only enable envfs and nix-ld on workstation
This commit is contained in:
parent
b3f264a4b6
commit
b2666d1fdf
@ -1,7 +1,10 @@
|
|||||||
inputs:
|
inputs:
|
||||||
{
|
{
|
||||||
options.nixos.system.envfs = let inherit (inputs.lib) mkOption types; in mkOption
|
options.nixos.system.envfs = let inherit (inputs.lib) mkOption types; in mkOption
|
||||||
{ type = types.nullOr (types.submodule {}); default = {}; };
|
{
|
||||||
|
type = types.nullOr (types.submodule {});
|
||||||
|
default = if inputs.config.nixos.packages.packageSet == "workstation" then {} else null;
|
||||||
|
};
|
||||||
config = let inherit (inputs.config.nixos.system) envfs; in inputs.lib.mkIf (envfs != null) (inputs.lib.mkMerge
|
config = let inherit (inputs.config.nixos.system) envfs; in inputs.lib.mkIf (envfs != null) (inputs.lib.mkMerge
|
||||||
[
|
[
|
||||||
(builtins.elemAt inputs.topInputs.envfs.nixosModules.envfs.imports 0 inputs)
|
(builtins.elemAt inputs.topInputs.envfs.nixosModules.envfs.imports 0 inputs)
|
||||||
|
@ -1,7 +1,10 @@
|
|||||||
inputs:
|
inputs:
|
||||||
{
|
{
|
||||||
options.nixos.system.nix-ld = let inherit (inputs.lib) mkOption types; in mkOption
|
options.nixos.system.nix-ld = let inherit (inputs.lib) mkOption types; in mkOption
|
||||||
{ type = types.nullOr (types.submodule {}); default = {}; };
|
{
|
||||||
|
type = types.nullOr (types.submodule {});
|
||||||
|
default = if inputs.config.nixos.packages.packageSet == "workstation" then {} else null;
|
||||||
|
};
|
||||||
config = let inherit (inputs.config.nixos.system) nix-ld; in inputs.lib.mkIf (nix-ld != null)
|
config = let inherit (inputs.config.nixos.system) nix-ld; in inputs.lib.mkIf (nix-ld != null)
|
||||||
{
|
{
|
||||||
programs.nix-ld = { enable = true; libraries = [ inputs.pkgs.steam-run.fhsenv ]; };
|
programs.nix-ld = { enable = true; libraries = [ inputs.pkgs.steam-run.fhsenv ]; };
|
||||||
|
Loading…
Reference in New Issue
Block a user