mirror of
https://github.com/Swarsel/.dotfiles.git
synced 2025-12-06 09:07:21 +01:00
fix[work,client]: get home-manager working on dgx
Some checks failed
Flake check / Check flake (push) Has been cancelled
Some checks failed
Flake check / Check flake (push) Has been cancelled
This commit is contained in:
parent
c8a49d4f47
commit
64e6a9c159
18 changed files with 972 additions and 889 deletions
|
|
@ -4,68 +4,75 @@ let
|
|||
in
|
||||
{
|
||||
options.swarselmodules.general = lib.mkEnableOption "general nix settings";
|
||||
config = lib.mkIf config.swarselmodules.general {
|
||||
nix = lib.mkIf (!config.swarselsystems.isNixos) {
|
||||
package = lib.mkForce pkgs.nixVersions.nix_2_28;
|
||||
# extraOptions = ''
|
||||
# plugin-files = ${pkgs.dev.nix-plugins}/lib/nix/plugins
|
||||
# extra-builtins-file = ${self + /nix/extra-builtins.nix}
|
||||
# '';
|
||||
extraOptions = ''
|
||||
plugin-files = ${pkgs.nix-plugins.overrideAttrs (o: {
|
||||
buildInputs = [config.nix.package pkgs.boost];
|
||||
patches = o.patches or [];
|
||||
})}/lib/nix/plugins
|
||||
extra-builtins-file = ${self + /nix/extra-builtins.nix}
|
||||
'';
|
||||
settings = {
|
||||
experimental-features = [
|
||||
"nix-command"
|
||||
"flakes"
|
||||
"ca-derivations"
|
||||
"cgroups"
|
||||
"pipe-operators"
|
||||
config =
|
||||
let
|
||||
nix-version = "2_30";
|
||||
in
|
||||
lib.mkIf config.swarselmodules.general {
|
||||
nix = lib.mkIf (!config.swarselsystems.isNixos) {
|
||||
package = lib.mkForce pkgs.nixVersions."nix_${nix-version}";
|
||||
# extraOptions = ''
|
||||
# plugin-files = ${pkgs.dev.nix-plugins}/lib/nix/plugins
|
||||
# extra-builtins-file = ${self + /nix/extra-builtins.nix}
|
||||
# '';
|
||||
extraOptions =
|
||||
let
|
||||
nix-plugins = pkgs.nix-plugins.override {
|
||||
nixComponents = pkgs.nixVersions."nixComponents_${nix-version}";
|
||||
};
|
||||
in
|
||||
''
|
||||
plugin-files = ${nix-plugins}/lib/nix/plugins
|
||||
extra-builtins-file = ${self + /nix/extra-builtins.nix}
|
||||
'';
|
||||
settings = {
|
||||
experimental-features = [
|
||||
"nix-command"
|
||||
"flakes"
|
||||
"ca-derivations"
|
||||
"cgroups"
|
||||
"pipe-operators"
|
||||
];
|
||||
trusted-users = [ "@wheel" "${mainUser}" ];
|
||||
connect-timeout = 5;
|
||||
bash-prompt-prefix = "[33m$SHLVL:\\w [0m";
|
||||
bash-prompt = "$(if [[ $? -gt 0 ]]; then printf \"[31m\"; else printf \"[32m\"; fi)λ [0m";
|
||||
fallback = true;
|
||||
min-free = 128000000;
|
||||
max-free = 1000000000;
|
||||
auto-optimise-store = true;
|
||||
warn-dirty = false;
|
||||
max-jobs = 1;
|
||||
use-cgroups = lib.mkIf config.swarselsystems.isLinux true;
|
||||
};
|
||||
};
|
||||
|
||||
nixpkgs.overlays = lib.mkIf config.swarselsystems.isNixos (lib.mkForce null);
|
||||
|
||||
programs = {
|
||||
home-manager.enable = lib.mkIf (!config.swarselsystems.isNixos) true;
|
||||
man = {
|
||||
enable = true;
|
||||
generateCaches = true;
|
||||
};
|
||||
};
|
||||
|
||||
targets.genericLinux.enable = lib.mkIf (!config.swarselsystems.isNixos) true;
|
||||
|
||||
home = {
|
||||
username = lib.mkDefault mainUser;
|
||||
homeDirectory = lib.mkDefault "/home/${mainUser}";
|
||||
stateVersion = lib.mkDefault "23.05";
|
||||
keyboard.layout = "us";
|
||||
sessionVariables = {
|
||||
FLAKE = "/home/${mainUser}/.dotfiles";
|
||||
};
|
||||
extraOutputsToInstall = [
|
||||
"doc"
|
||||
"info"
|
||||
"devdoc"
|
||||
];
|
||||
trusted-users = [ "@wheel" "${mainUser}" ];
|
||||
connect-timeout = 5;
|
||||
bash-prompt-prefix = "[33m$SHLVL:\\w [0m";
|
||||
bash-prompt = "$(if [[ $? -gt 0 ]]; then printf \"[31m\"; else printf \"[32m\"; fi)λ [0m";
|
||||
fallback = true;
|
||||
min-free = 128000000;
|
||||
max-free = 1000000000;
|
||||
auto-optimise-store = true;
|
||||
warn-dirty = false;
|
||||
max-jobs = 1;
|
||||
use-cgroups = lib.mkIf config.swarselsystems.isLinux true;
|
||||
};
|
||||
};
|
||||
|
||||
nixpkgs.overlays = lib.mkIf config.swarselsystems.isNixos (lib.mkForce null);
|
||||
|
||||
programs = {
|
||||
home-manager.enable = lib.mkIf (!config.swarselsystems.isNixos) true;
|
||||
man = {
|
||||
enable = true;
|
||||
generateCaches = true;
|
||||
};
|
||||
};
|
||||
|
||||
targets.genericLinux.enable = lib.mkIf (!config.swarselsystems.isNixos) true;
|
||||
|
||||
home = {
|
||||
username = lib.mkDefault mainUser;
|
||||
homeDirectory = lib.mkDefault "/home/${mainUser}";
|
||||
stateVersion = lib.mkDefault "23.05";
|
||||
keyboard.layout = "us";
|
||||
sessionVariables = {
|
||||
FLAKE = "/home/${mainUser}/.dotfiles";
|
||||
};
|
||||
extraOutputsToInstall = [
|
||||
"doc"
|
||||
"info"
|
||||
"devdoc"
|
||||
];
|
||||
};
|
||||
};
|
||||
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue