1
0
Fork 0
forked from Bun/nixos-config

Generalize some more files, make hidden use Intel microcode and not AMD

This commit is contained in:
Bun 2025-05-18 04:35:54 -04:00
parent 2e483af205
commit 3f257e006c
8 changed files with 31 additions and 16 deletions

View file

@ -18,5 +18,5 @@
}; };
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux"; nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
hardware.cpu.amd.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware; hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
} }

View file

@ -1,18 +1,14 @@
{ config, lib, ... }: { lib, ... }:
{ {
options.home = with lib; { imports = [
guifull.enable = mkEnableOption "Enable most other GUI profiles"; ./generic
./guifull
];
options.home = with lib; {
desktop.enable = mkEnableOption "Desktop programs and services"; desktop.enable = mkEnableOption "Desktop programs and services";
gaming.enable = mkEnableOption "Gaming apps and programs"; gaming.enable = mkEnableOption "Gaming apps and programs";
production.enable = mkEnableOption "Apps for visual productivity"; production.enable = mkEnableOption "Apps for visual productivity";
school.enable = mkEnableOption "Apps for school and college"; school.enable = mkEnableOption "Apps for school and college";
}; };
config.home = lib.mkIf config.home.guifull.enable {
desktop.enable = true;
gaming.enable = true;
production.enable = true;
};
} }

View file

@ -0,0 +1,8 @@
{ config, lib, ... }:
{
config = lib.mkIf config.targets.genericLinux.enable {
home = {
sessionVariables.PATH = "$HOME/.nix-profile/bin:$PATH";
};
};
}

View file

@ -0,0 +1,12 @@
{ config, lib, ... }:
{
options.home = with lib; {
guifull.enable = mkEnableOption "Enable most other GUI profiles";
};
config.home = lib.mkIf config.home.guifull.enable {
desktop.enable = true;
gaming.enable = true;
production.enable = true;
};
}

View file

@ -3,8 +3,7 @@
imports = [ impermanence.homeManagerModules.default ]; imports = [ impermanence.homeManagerModules.default ];
home.persistence."${config.xdg.userDirs.extraConfig.XDG_PERSIST_DIR}" = { home.persistence."${config.xdg.userDirs.extraConfig.XDG_PERSIST_DIR}" = {
enable = true; enable = !config.targets.genericLinux.enable;
allowOther = if !config.targets.genericLinux.enable then true else false;
removePrefixDirectory = true; removePrefixDirectory = true;
directories = let directories = let
home = config.home.homeDirectory; home = config.home.homeDirectory;

View file

@ -6,7 +6,7 @@
]; ];
nix = { nix = {
package = lib.mkForce pkgs.lix; package = lib.mkForce pkgs.nix;
settings.experimental-features = [ settings.experimental-features = [
"flakes" "flakes"
"nix-command" "nix-command"

View file

@ -1,6 +1,6 @@
{ config, lib, ... }: { config, lib, ... }:
{ {
nixGL = lib.mkIf config.targets.genericLinux.enable { nixGL = {
installScripts = [ installScripts = [
"mesa" "mesa"
"nvidia" "nvidia"

View file

@ -14,7 +14,7 @@
XDG_GAMES_DIR = "${homeDirectory}/Games"; XDG_GAMES_DIR = "${homeDirectory}/Games";
XDG_KEEPERS_DIR = "${homeDirectory}/Keepers"; XDG_KEEPERS_DIR = "${homeDirectory}/Keepers";
XDG_NETWORK_DIR = "${homeDirectory}/Network"; XDG_NETWORK_DIR = "${homeDirectory}/Network";
XDG_PERSIST_DIR = if !config.targets.genericLinux.enable then "/persist${homeDirectory}" else "${homeDirectory}/.stow"; XDG_PERSIST_DIR = "/persist${homeDirectory}";
XDG_PROJECTS_DIR = "${homeDirectory}/Projects"; XDG_PROJECTS_DIR = "${homeDirectory}/Projects";
XDG_SCREENSHOTS_DIR = "${config.xdg.userDirs.pictures}/Screenshots"; XDG_SCREENSHOTS_DIR = "${config.xdg.userDirs.pictures}/Screenshots";
}; };