mirror of
https://github.com/Swarsel/.dotfiles.git
synced 2025-12-06 17:17:22 +01:00
feat: central nixpkgs and nix
This commit is contained in:
parent
b4b0b44729
commit
db61149b70
12 changed files with 187 additions and 98 deletions
|
|
@ -1,16 +1,33 @@
|
|||
{ lib, config, pkgs, ... }:
|
||||
{ lib, inputs, config, ... }:
|
||||
{
|
||||
nix = {
|
||||
package = lib.mkDefault pkgs.nix;
|
||||
settings = {
|
||||
experimental-features = [
|
||||
"nix-command"
|
||||
"flakes"
|
||||
"ca-derivations"
|
||||
"pipe-operators"
|
||||
];
|
||||
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;
|
||||
|
||||
|
|
@ -23,4 +40,5 @@
|
|||
FLAKE = "${config.home.homeDirectory}/.dotfiles";
|
||||
};
|
||||
};
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -5,7 +5,7 @@ _:
|
|||
enableZshIntegration = true;
|
||||
settings = {
|
||||
add_newline = false;
|
||||
format = "$character";
|
||||
format = "$shlvl$character";
|
||||
right_format = "$all";
|
||||
command_timeout = 3000;
|
||||
|
||||
|
|
@ -18,7 +18,7 @@ _:
|
|||
|
||||
git_status = {
|
||||
style = "bg:#394260";
|
||||
format = "[[($all_status$ahead_behind )](fg:#769ff0 bg:#394260)]($style)";
|
||||
format = "[[($all_status$ahead_behind)](fg:#769ff0 bg:#394260)]($style) ";
|
||||
};
|
||||
|
||||
character = {
|
||||
|
|
@ -26,7 +26,23 @@ _:
|
|||
error_symbol = "[λ](bold red)";
|
||||
};
|
||||
|
||||
aws.symbol = " ";
|
||||
shlvl = {
|
||||
disabled = false;
|
||||
symbol = "↳";
|
||||
format = "[$symbol]($style) ";
|
||||
repeat = true;
|
||||
repeat_offset = 1;
|
||||
style = "blue";
|
||||
};
|
||||
|
||||
nix_shell = {
|
||||
disabled = false;
|
||||
heuristic = true;
|
||||
format = "[$symbol$name]($style)";
|
||||
symbol = " ";
|
||||
};
|
||||
|
||||
aws.symbol = " ";
|
||||
buf.symbol = " ";
|
||||
c.symbol = " ";
|
||||
conda.symbol = " ";
|
||||
|
|
@ -49,7 +65,6 @@ _:
|
|||
memory_usage.symbol = " ";
|
||||
meson.symbol = " ";
|
||||
nim.symbol = " ";
|
||||
nix_shell.symbol = " ";
|
||||
nodejs.symbol = " ";
|
||||
|
||||
os.symbols = {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue