mirror of
https://github.com/Jokiller230/puzzlevision.git
synced 2025-09-09 20:30:05 +00:00
✨ Add tons of missing system, desktop and home modules
This commit is contained in:
parent
01367c4222
commit
fa3bbb2f6f
15 changed files with 453 additions and 7 deletions
50
modules/nixos/system/nix/default.nix
Normal file
50
modules/nixos/system/nix/default.nix
Normal file
|
@ -0,0 +1,50 @@
|
|||
{
|
||||
lib,
|
||||
pkgs,
|
||||
self,
|
||||
config,
|
||||
...
|
||||
}: let
|
||||
inherit (lib) mkEnableOption mkIf;
|
||||
inherit (self) namespace;
|
||||
|
||||
cfg = config.${namespace}.system.nix;
|
||||
in {
|
||||
options.${namespace}.system.nix = {
|
||||
enable = mkEnableOption "Nix configuration overrides.";
|
||||
use-lix = mkEnableOption "Lix as an alternative to CppNix.";
|
||||
use-nixld = mkEnableOption "the use of dynamically linked executables on nix based systems.";
|
||||
};
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
nix = {
|
||||
settings = {
|
||||
auto-optimise-store = true;
|
||||
builders-use-substitutes = true;
|
||||
experimental-features = ["nix-command" "flakes"];
|
||||
keep-derivations = true;
|
||||
keep-outputs = true;
|
||||
max-jobs = "auto";
|
||||
warn-dirty = false;
|
||||
};
|
||||
|
||||
# Garbage collection configuration.
|
||||
gc = {
|
||||
automatic = true;
|
||||
dates = "daily";
|
||||
options = "--delete-older-than 3d";
|
||||
};
|
||||
|
||||
package = mkIf cfg.use-lix pkgs.lix; # Enable LIX
|
||||
};
|
||||
|
||||
# Dynamic libraries for unpackaged programs
|
||||
programs.nix-ld = mkIf cfg.use-nixld {
|
||||
enable = true;
|
||||
libraries = with pkgs; [
|
||||
glibc
|
||||
libcxx
|
||||
];
|
||||
};
|
||||
};
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue