nix: remove channels fully

This commit is contained in:
Charlie Root 2024-09-22 01:47:19 +02:00
commit 335385ec1d
2 changed files with 17 additions and 23 deletions

View file

@ -6,7 +6,7 @@
pkgs, pkgs,
... ...
}: let }: let
inherit (lib) mapAttrsToList; inherit (lib) mapAttrsToList mkForce;
in { in {
imports = [ imports = [
./documentation.nix # nixos documentation ./documentation.nix # nixos documentation
@ -16,9 +16,14 @@ in {
inputs.lix-module.nixosModules.default inputs.lix-module.nixosModules.default
]; ];
# link a copy of our nixpkgs input as the nixpkgs channel
# environment.etc."nix/flake-channels/nixpkgs".source = inputs.nixpkgs;
nix = { nix = {
package = pkgs.lix; package = pkgs.lix;
# fuck channels, no thanks
channel.enable = mkForce false;
# This will additionally add your inputs to the system's legacy channels # This will additionally add your inputs to the system's legacy channels
# Making legacy nix commands consistent as well # Making legacy nix commands consistent as well
nixPath = mapAttrsToList (key: _: "${key}=flake:${key}") config.nix.registry; nixPath = mapAttrsToList (key: _: "${key}=flake:${key}") config.nix.registry;
@ -147,18 +152,16 @@ in {
}; };
systemd.services = { systemd.services = {
# WE DONT WANT TO BUILD STUFF ON TMPFS
# ITS NOT A GOOD IDEA
nix-daemon = {
environment.TMPDIR = "/var/tmp";
};
# WE DONT WANT TO BUILD STUFF ON TMPFS # Do not run garbage collection on AC power.
# ITS NOT A GOOD IDEA # This makes a quite nice difference in battery life.
nix-daemon = { nix-gc = {
unitConfig.ConditionACPower = true;
environment.TMPDIR = "/var/tmp"; };
};
# Do not run garbage collection on AC power.
# This makes a quite nice difference in battery life.
nix-gc = {
unitConfig.ConditionACPower = true;
};
}; };
} }

View file

@ -1,18 +1,9 @@
{inputs, ...}: let {inputs, ...}: {
inherit (inputs) nixpkgs;
nixpkgsPath = nixpkgs.outPath;
in {
# Big thanks to Dianimo for this! # Big thanks to Dianimo for this!
nix = { nix = {
registry = { registry = {
nixpkgs.flake = inputs.nixpkgs; nixpkgs.flake = inputs.nixpkgs;
default.flake = inputs.nixpkgs; default.flake = inputs.nixpkgs;
}; };
nixPath = [
"nixpkgs=${nixpkgsPath}"
"n=${nixpkgsPath}"
"default=${nixpkgsPath}"
];
}; };
} }