mirror of
https://github.com/Swarsel/.dotfiles.git
synced 2025-12-06 09:07:21 +01:00
refactor: more sane profile structure
This commit is contained in:
parent
a73f0e843a
commit
2257a42d38
123 changed files with 204 additions and 347 deletions
44
profiles/home/common/settings.nix
Normal file
44
profiles/home/common/settings.nix
Normal file
|
|
@ -0,0 +1,44 @@
|
|||
{ 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 = "[33m$SHLVL:\\w [0m";
|
||||
bash-prompt = "$(if [[ $? -gt 0 ]]; then printf \"[31m\"; else printf \"[32m\"; fi)\[\e[1m\]λ\[\e[0m\] [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";
|
||||
};
|
||||
};
|
||||
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue