diff options
| author | Simon Parri <simonparri@ganzeria.com> | 2025-11-15 14:45:29 -0600 |
|---|---|---|
| committer | Simon Parri <simonparri@ganzeria.com> | 2025-11-15 14:45:29 -0600 |
| commit | ae8aaaefeb175140fa16ed176ff5c688a4dd0b10 (patch) | |
| tree | 4cb424085f975cec06c2a6e3dccff48c59c60808 /modules | |
| parent | 93c61b2155827281fb7870ce5f1ade32cdf196a7 (diff) | |
| download | nixos-config-ae8aaaefeb175140fa16ed176ff5c688a4dd0b10.tar.gz nixos-config-ae8aaaefeb175140fa16ed176ff5c688a4dd0b10.zip | |
modules/default: Enable nix-ld
Diffstat (limited to 'modules')
| -rw-r--r-- | modules/default.nix | 59 |
1 files changed, 35 insertions, 24 deletions
diff --git a/modules/default.nix b/modules/default.nix index a592966..ac2408e 100644 --- a/modules/default.nix +++ b/modules/default.nix @@ -24,42 +24,53 @@ this.defaults.enable = lib.mkEnableOption "default settings" // { default = true; }; + this.defaults.ld = lib.mkEnableOption "ld" // { + default = true; + }; }; - config = lib.mkIf config.this.defaults.enable { - networking.hostName = hostname; + config = lib.mkMerge [ + (lib.mkIf config.this.defaults.enable { + networking.hostName = hostname; - security.sudo.enable = false; + security.sudo.enable = false; - services.logind.lidSwitch = "ignore"; - services.logind.powerKey = "suspend"; + services.logind.lidSwitch = "ignore"; + services.logind.powerKey = "suspend"; - documentation.man.generateCaches = true; + documentation.man.generateCaches = true; - environment.pathsToLink = [ "/include" ]; - environment.variables = { - PKG_CONFIG_PATH = "/run/current-system/sw/lib/pkgconfig"; - C_INCLUDE_PATH = "/run/current-system/sw/include"; - LIBRARY_PATH = "/run/current-system/sw/lib"; - SASL_PATH = "/run/current-system/sw/lib/sasl2"; - }; + environment.pathsToLink = [ "/include" ]; + environment.variables = { + PKG_CONFIG_PATH = "/run/current-system/sw/lib/pkgconfig"; + C_INCLUDE_PATH = "/run/current-system/sw/include"; + LIBRARY_PATH = "/run/current-system/sw/lib"; + SASL_PATH = "/run/current-system/sw/lib/sasl2"; + }; - services.udev.extraRules = '' + services.udev.extraRules = '' KERNEL=="uinput", MODE="0660", GROUP="input" ''; - programs.bash.shellInit = '' + programs.bash.shellInit = '' HISTIGNORE="*INSIDE_EMACS*:$HISTIGNORE" ''; - nix = { - channel.enable = false; - #registry.nixpkgs.flake = nixpkgs; - nixPath = lib.mkOrder 1000 ["nixpkgs=flake:nixpkgs"]; - settings = { - experimental-features = [ "nix-command" "flakes" ]; - trusted-users = ["simon"]; + nix = { + channel.enable = false; + #registry.nixpkgs.flake = nixpkgs; + nixPath = lib.mkOrder 1000 ["nixpkgs=flake:nixpkgs"]; + settings = { + experimental-features = [ "nix-command" "flakes" ]; + trusted-users = ["simon"]; + }; }; - }; - }; + }) + (lib.mkIf config.this.defaults.ld { + programs.nix-ld.enable = true; + environment.sessionVariables = { + NIX_LD_LIBRARY_PATH = lib.mkForce "/run/current-system/sw/lib"; + }; + }) + ]; } |
