.dotfiles/profiles/home/common/settings.nix
2025-01-01 15:59:58 +01:00

44 lines
1.3 KiB
Nix
Raw Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

{ lib, inputs, config, ... }:
{
nix =
let
flakeInputs = lib.filterAttrs (_: lib.isType "flake") inputs;
in
lib.mkIf (!config.swarselsystems.isNixos) {
settings = {
experimental-features = [
"nix-command"
"flakes"
"ca-derivations"
"cgroups"
"pipe-operators"
];
trusted-users = [ "@wheel" "swarsel" ];
connect-timeout = 5;
bash-prompt-prefix = "$SHLVL:\\w ";
bash-prompt = "$(if [[ $? -gt 0 ]]; then printf \"\"; else printf \"\"; fi)\[\e[1m\]λ\[\e[0m\] ";
fallback = true;
min-free = 128000000;
max-free = 1000000000;
flake-registry = "";
auto-optimise-store = true;
warn-dirty = false;
max-jobs = 1;
use-cgroups = lib.mkIf config.swarselsystems.isLinux true;
};
registry = lib.mapAttrs (_: flake: { inherit flake; }) flakeInputs;
};
programs.home-manager.enable = lib.mkIf (!config.swarselsystems.isNixos) true;
home = {
username = lib.mkDefault "swarsel";
homeDirectory = lib.mkDefault "/home/${config.home.username}";
stateVersion = lib.mkDefault "23.05";
keyboard.layout = "us";
sessionVariables = {
FLAKE = "${config.home.homeDirectory}/.dotfiles";
};
};
}