nix: switch to lix

Signed-off-by: Bloxx12 <charlie@charlieroot.dev>
Change-Id: I6a6a69641a5c002234e971b698d9164999be08f3
This commit is contained in:
Bloxx12 2025-07-21 00:06:54 +02:00
commit f4790c05ed
Signed by: faukah
SSH key fingerprint: SHA256:jpYIt4Vkz1NBTQcks/N9OPTfTFxE6KF2W/rV7hrfrIw
3 changed files with 33 additions and 117 deletions

View file

@ -1,17 +1,20 @@
# credits to raf
{
config,
sources,
lib,
pkgs,
...
}:
let
inherit (lib.attrsets) mapAttrsToList;
inherit (lib.modules) mkForce;
lix = pkgs.callPackage "${sources.lix}/package.nix" {
stdenv = pkgs.clangStdenv;
};
in
{
nix = {
package = lix;
# Check that Nix can parse the generated nix.conf.
checkConfig = true;
@ -26,10 +29,14 @@ in
# registry =
# lib.mapAttrs (_: v: {flake = v.outPath;}) sources
# // {system.flake = sources.nichts;};
registry.nixpkgs.to = {
type = "path";
source = sources.nixpkgs;
};
# Add inputs to the system's legacy channels
# to make legacy nix commands consistent as well
nixPath = mapAttrsToList (key: _: "${key}=flake:${key}") config.nix.registry;
nixPath = [ "nixpkgs=/etc/nixos/nixpkgs" ];
# Run the Nix daemon on lowest possible priority
daemonCPUSchedPolicy = "idle";
@ -116,7 +123,7 @@ in
"flakes" # flakes
"nix-command" # experimental nix commands
"cgroups" # allow nix to execute builds inside cgroups
"pipe-operators"
"pipe-operator"
];
# Ensures that the result of Nix expressions is fully determined by
@ -168,6 +175,9 @@ in
};
};
environment.etc = {
"nixos/nixpkgs".source = builtins.storePath sources.nixpkgs;
};
systemd.services = {
# WE DONT WANT TO BUILD STUFF ON TMPFS
# ITS NOT A GOOD IDEA