mega north

This commit is contained in:
2024-04-09 22:56:52 +02:00
parent cb121e283c
commit c751220c33
11 changed files with 287 additions and 186 deletions

View File

@@ -13,7 +13,7 @@ in
./system-modules/hsmw.nix ./system-modules/hsmw.nix
./system-modules/docker.nix ./system-modules/docker.nix
./system-modules/health_reminder.nix ./system-modules/health_reminder.nix
./system-modules/davmail.nix # ./system-modules/davmail.nix
./system-modules/ollama.nix ./system-modules/ollama.nix
]; ];
@@ -66,8 +66,6 @@ in
# List packages installed in system profile. To search, run: # List packages installed in system profile. To search, run:
# $ nix search wget # $ nix search wget
environment.systemPackages = with pkgs; [ environment.systemPackages = with pkgs; [
ntfs3g
btrfs-progs
git git
git-crypt git-crypt
wget wget

18
flake.lock generated
View File

@@ -7,11 +7,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1710888565, "lastModified": 1712386041,
"narHash": "sha256-s9Hi4RHhc6yut4EcYD50sZWRDKsugBJHSbON8KFwoTw=", "narHash": "sha256-dA82pOMQNnCJMAsPG7AXG35VmCSMZsJHTFlTHizpKWQ=",
"owner": "nix-community", "owner": "nix-community",
"repo": "home-manager", "repo": "home-manager",
"rev": "f33900124c23c4eca5831b9b5eb32ea5894375ce", "rev": "d6bb9f934f2870e5cbc5b94c79e9db22246141ff",
"type": "github" "type": "github"
}, },
"original": { "original": {
@@ -23,11 +23,11 @@
}, },
"nixpkgs": { "nixpkgs": {
"locked": { "locked": {
"lastModified": 1712168706, "lastModified": 1712588820,
"narHash": "sha256-XP24tOobf6GGElMd0ux90FEBalUtw6NkBSVh/RlA6ik=", "narHash": "sha256-y31s5idk3jMJMAVE4Ud9AdI7HT3CgTAeMTJ0StqKN7Y=",
"owner": "NixOS", "owner": "NixOS",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "1487bdea619e4a7a53a4590c475deabb5a9d1bfb", "rev": "d272ca50d1f7424fbfcd1e6f1c9e01d92f6da167",
"type": "github" "type": "github"
}, },
"original": { "original": {
@@ -38,11 +38,11 @@
}, },
"nixpkgs-unstable": { "nixpkgs-unstable": {
"locked": { "locked": {
"lastModified": 1712163089, "lastModified": 1712608508,
"narHash": "sha256-Um+8kTIrC19vD4/lUCN9/cU9kcOsD1O1m+axJqQPyMM=", "narHash": "sha256-vMZ5603yU0wxgyQeHJryOI+O61yrX2AHwY6LOFyV1gM=",
"owner": "NixOS", "owner": "NixOS",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "fd281bd6b7d3e32ddfa399853946f782553163b5", "rev": "4cba8b53da471aea2ab2b0c1f30a81e7c451f4b6",
"type": "github" "type": "github"
}, },
"original": { "original": {

View File

@@ -48,17 +48,26 @@
secrets = import ./secrets/passwords-and-certificates.nix; secrets = import ./secrets/passwords-and-certificates.nix;
rice = { rice = {
transparency = "0.8"; transparency = "0.9";
colors = rec { color = rec {
main-fg = "#ffffff"; background = "000000"; # #000000
main-bg = "#000000"; foreground = "dddddd"; # #dddddd
bubble-fg = main-fg; black = "282B35"; # #282B35
bubble-bg = "#222222"; bright-black = "686A71"; # #686A71
bubble-border = "#bbbbbb"; blue = "9d00ff"; # #9d00ff
secondary-fg = main-fg; bright-blue = "c76eff"; # #c76eff
secondary-bg = "#111133"; cyan = "00ddff"; # #00ddff
lines = "#bbbbbb"; bright-cyan = "33f9ff"; # #33f9ff
accent = "#ff00ff"; green = "0048ff"; # #0048ff
bright-green = "1166ff"; # #1166ff
magenta = "B21889"; # #B21889
bright-magenta = "ff75f6"; # #ff75f6
red = "ff0044"; # #ff0044
bright-red = "ff4576"; # #ff4576
white = "939599"; # #939599
bright-white = "ffffff"; # #ffffff
yellow = "ff4000"; # #ff4000
bright-yellow = "ff8454"; # #ff8454
}; };
font = { font = {
code = { code = {
@@ -74,19 +83,27 @@
in in
{ {
nixosConfigurations = { nixosConfigurations = {
NxXPS = nixpkgs.lib.nixosSystem { NxXPS =
let
host = "NxXPS";
in
nixpkgs.lib.nixosSystem {
inherit system; inherit system;
modules = [ modules = [
./configuration.nix ./configuration.nix
]; ];
specialArgs = let host = "NxXPS"; in { inherit user host pkgs-unstable allowed secrets rice nvidia; }; specialArgs = { inherit user host pkgs-unstable allowed secrets rice nvidia; };
}; };
NxNORTH = nixpkgs.lib.nixosSystem { NxNORTH =
let
host = "NxNORTH";
in
nixpkgs.lib.nixosSystem {
inherit system; inherit system;
modules = [ modules = [
./configuration.nix ./configuration.nix
]; ];
specialArgs = let host = "NxNORTH"; in { inherit user host pkgs-unstable allowed secrets rice nvidia; }; specialArgs = { inherit user host pkgs-unstable allowed secrets rice nvidia; };
}; };
}; };
@@ -102,6 +119,5 @@
extraSpecialArgs = let host = "NxNORTH"; in { inherit system user host allowed secrets pkgs-unstable rice nvidia; }; extraSpecialArgs = let host = "NxNORTH"; in { inherit system user host allowed secrets pkgs-unstable rice nvidia; };
}; };
}; };
}; };
} }

View File

@@ -2,9 +2,9 @@
let let
animation-speed = "2"; animation-speed = "2";
transparency = rice.transparency; transparency = rice.transparency;
gap-size = 20; gap-size = 10;
rounding = 10; rounding = 10;
border-width = 2; border-width = 3;
monitors = { monitors = {
xps = { xps = {
main = { main = {
@@ -28,15 +28,15 @@ let
scale = "1.0"; scale = "1.0";
}; };
left = { left = {
name = "HDME-A-3"; name = "HDMI-A-3";
resolution = "1920x1080"; resolution = "1920x1080";
position = "0x180"; position = "0x360";
scale = "1.0"; scale = "1.0";
}; };
right = { right = {
name = "HDMI-A-3"; name = "HDMI-A-2";
resolution = "1920x1080"; resolution = "1920x1080";
position = "4480x80"; position = "4480x360";
scale = "1.0"; scale = "1.0";
}; };
}; };
@@ -110,8 +110,8 @@ in
workspace = workspace =
let let
d1 = if host == "NxXPS" then monitors.xps.main.name else monitors.north.main.name; d1 = if host == "NxXPS" then monitors.xps.main.name else monitors.north.main.name;
d3 = if host == "NxXPS" then monitors.xps.second.name else monitors.north.left.name; d2 = if host == "NxXPS" then monitors.xps.second.name else monitors.north.left.name;
d2 = if host == "NxXPS" then monitors.xps.main.name else monitors.north.right.name; d3 = if host == "NxXPS" then monitors.xps.main.name else monitors.north.right.name;
compact = ",gapsin:0,gapsout:0,rounding:0,bordersize:0"; compact = ",gapsin:0,gapsout:0,rounding:0,bordersize:0";
in in
[ [
@@ -175,8 +175,10 @@ in
gaps_in = builtins.div gap-size 2; gaps_in = builtins.div gap-size 2;
gaps_out = gap-size; gaps_out = gap-size;
border_size = border-width; border_size = border-width;
"col.active_border" = "rgba(888888ff)"; "col.active_border" = "rgba(${rice.color.red}ff)";
"col.inactive_border" = "rgba(000000ff)"; "col.inactive_border" = "rgba(${rice.color.black}ff)";
cursor_inactive_timeout = 10;
layout = "dwindle"; layout = "dwindle";
# layout = "master"; # layout = "master";
@@ -189,8 +191,8 @@ in
shadow_range = "20"; shadow_range = "20";
shadow_offset = "0 0"; shadow_offset = "0 0";
shadow_render_power = "4"; shadow_render_power = "4";
"col.shadow" = "rgba(000000ff)"; "col.shadow" = "rgba(${rice.color.red}ff)";
"col.shadow_inactive" = "rgba(00000000)"; "col.shadow_inactive" = "rgba(${rice.color.black}ff)";
active_opacity = "1.0"; active_opacity = "1.0";
inactive_opacity = "1.0"; inactive_opacity = "1.0";
@@ -204,6 +206,7 @@ in
size = "3"; size = "3";
passes = "2"; passes = "2";
xray = false; xray = false;
vibrancy = 0.5;
ignore_opacity = true; ignore_opacity = true;
}; };
}; };
@@ -269,19 +272,19 @@ in
windowrulev2 = [ windowrulev2 = [
"opacity ${transparency},class:^(com.chatterino.*)$" "opacity ${transparency},class:^(com.chatterino.*)$"
"opacity ${transparency},class:^(chatterino)$" "opacity ${transparency},class:^(chatterino)$"
"bordercolor rgba(ff00ffff) rgba(ff00ff66), pinned:1" "bordercolor rgba(${rice.color.bright-magenta}ff) rgba(${rice.color.magenta}), pinned:1"
]; ];
windowrule = [ windowrule = [
"opacity ${transparency}, firefox" # "opacity ${transparency}, firefox"
"opacity ${transparency}, code-oss" "opacity ${transparency}, code-oss"
"opacity ${transparency}, VSCodium" "opacity ${transparency}, VSCodium"
"opacity ${transparency}, Code" "opacity ${transparency}, Code"
"opacity ${transparency}, neovide" "opacity ${transparency}, neovide"
"opacity ${transparency}, obsidian" "opacity ${transparency}, obsidian"
"opacity ${transparency}, zathura" "opacity ${transparency}, zathura"
"bordercolor rgba(ffffffff) rgba(000000b2), Alacritty" "bordercolor rgba(${rice.color.foreground}ff) rgba(${rice.color.background}b2), Alacritty"
"bordercolor rgba(ffffffff) rgba(000000b2), Kitty" "bordercolor rgba(${rice.color.foreground}ff) rgba(${rice.color.background}b2), Kitty"
"opacity ${transparency}, discord" "opacity ${transparency}, discord"
"opacity ${transparency}, vesktop" "opacity ${transparency}, vesktop"
"opacity ${transparency}, Element" "opacity ${transparency}, Element"

View File

@@ -11,25 +11,25 @@ in
enable = true; enable = true;
font = rice.font.code; font = rice.font.code;
settings = { settings = {
background = "#000000"; background = "#${rice.color.background}";
foreground = "#919191"; foreground = "#${rice.color.foreground}";
cursor = "#919191"; cursor = "#${rice.color.foreground}";
color0 = "#303030"; color0 = "#${rice.color.black}";
color8 = "#5e5e5e"; color8 = "#${rice.color.bright-black}";
color1 = "#a43261"; color1 = "#${rice.color.red}";
color9 = "#ff9fc9"; color9 = "#${rice.color.bright-red}";
color2 = "#006ca5"; color2 = "#${rice.color.green}";
color10 = "#3bd6ff"; color10 = "#${rice.color.bright-green}";
color3 = "#0061b1"; color3 = "#${rice.color.yellow}";
color11 = "#93c9ff"; color11 = "#${rice.color.bright-yellow}";
color4 = "#913e88"; color4 = "#${rice.color.blue}";
color12 = "#ffa7f6"; color12 = "#${rice.color.bright-blue}";
color5 = "#007086"; color5 = "#${rice.color.magenta}";
color13 = "#00ddf4"; color13 = "#${rice.color.bright-magenta}";
color6 = "#6751a6"; color6 = "#${rice.color.cyan}";
color14 = "#d5b8ff"; color14 = "#${rice.color.bright-cyan}";
color7 = "#c6c6c6"; color7 = "#${rice.color.white}";
color15 = "#ffffff"; color15 = "#${rice.color.bright-white}";
background_opacity = rice.transparency; background_opacity = rice.transparency;
transparency = true; transparency = true;
scroll_multiplier = 9; scroll_multiplier = 9;
@@ -38,3 +38,5 @@ in
}; };
}; };
} }

View File

@@ -21,10 +21,10 @@
msg=" msg="
$(echo -e "$logo" | sed -n 3p): $(cat /etc/*-release | grep PRETTY_NAME | cut -c 14- | rev | cut -c 2- | rev) $(echo -e "$logo" | sed -n 3p): $(cat /etc/*-release | grep PRETTY_NAME | cut -c 14- | rev | cut -c 2- | rev)
$(echo -e "$logo" | sed -n 4p): ''${DESKTOP_SESSION^} $(echo -e "$logo" | sed -n 4p): ''${XDG_CURRENT_DESKTOP^}
$(echo -e "$logo" | sed -n 5p): ''${TERM^} $(echo -e "$logo" | sed -n 5p): ''${TERM^}
$(echo -e "$logo" | sed -n 6p): ''${SHELL} $(echo -e "$logo" | sed -n 6p): $(bash --version | head --lines 1 | cut -f -4 -d' ')
$(echo -e "$logo" | sed -n 7p): fish $(echo -e "$logo" | sed -n 7p): fish $(fish --version | rev | cut -f 1 -d' ' | rev)
$(echo -e "$logo" | sed -n 8p): ''$(uname -r) $(echo -e "$logo" | sed -n 8p): ''$(uname -r)
$(echo -e "$logo" | sed -n 9p): ''${EDITOR} $(echo -e "$logo" | sed -n 9p): ''${EDITOR}
$(echo -e "$logo" | sed -n 10p): $(yazi --version) $(echo -e "$logo" | sed -n 10p): $(yazi --version)

View File

@@ -12,32 +12,101 @@
enable = true; enable = true;
settings = { settings = {
add_newline = false; add_newline = false;
format = "$jobs\$battery\$username\$hostname\$localip\$shlvl\$singularity\$kubernetes\$directory\$vcsh\$git_branch\$git_commit\$git_state\$git_metrics\$git_status\$hg_branch\$docker_context\$package\$c\$cmake\$cobol\$daml\$dart\$deno\$dotnet\$elixir\$elm\$erlang\$golang\$haskell\$helm\$java\$julia\$kotlin\$lua\$nim\$nodejs\$ocaml\$perl\$php\$pulumi\$purescript\$python\$raku\$rlang\$red\$ruby\$rust\$scala\$swift\$terraform\$vlang\$vagrant\$zig\$buf\$nix_shell\$conda\$meson\$spack\$memory_usage\$aws\$gcloud\$openstack\$azure\$env_var\$crystal\$custom\$sudo\$cmd_duration\$time\$status\$container\$shell\$character"; format = lib.strings.concatMapStrings (x: "$" + x) [
"jobs"
"battery"
"username"
"hostname"
# "localip"
"shlvl"
# "singularity"
# "kubernetes"
"directory"
# "vcsh"
"git_branch"
"git_commit"
"git_state"
"git_metrics"
"git_status"
# "hg_branch"
"docker_context"
# "package"
"c"
"cmake"
# "cobol"
# "daml"
# "dart"
# "deno"
# "dotnet"
"elixir"
# "elm"
# "erlang"
"golang"
"haskell"
# "helm"
# "java"
# "julia"
# "kotlin"
"lua"
"nim"
"nodejs"
# "ocaml"
# "perl"
"php"
# "pulumi"
# "purescript"
"python"
# "raku"
# "rlang"
# "red"
# "ruby"
# "rust"
# "scala"
# "swift"
# "terraform"
# "vlang"
# "vagrant"
"zig"
# "buf"
"nix_shell"
"conda"
# "meson"
# "spack"
# "memory_usage"
# "aws"
# "gcloud"
# "openstack"
# "azure"
"env_var"
# "crystal"
"custom"
"sudo"
"cmd_duration"
"time"
"status"
"container"
"shell"
"character"
];
aws.format = "[\\[$symbol($profile)(\\($region\\))(\\[$duration\\])\\]]($style)"; aws.format = "[\\[$symbol($profile)(\\($region\\))(\\[$duration\\])\\]]($style)";
bun.format = "[\\[$symbol($version)\\]]($style)"; bun.format = "[\\[$symbol($version)\\]]($style)";
c.format = "[\\[$symbol($version(-$name))\\]]($style)"; c.format = "[\\[$symbol($version(-$name))\\]]($style)";
cmake.format = "[\\[$symbol($version)\\]]($style)"; cmake.format = "[\\[$symbol($version)\\]]($style)";
cmd_duration.format = "[\\[󰔛 $duration\\]]($style)"; cmd_duration.format = "[\\[$symbol$duration\\]]($style)";
cobol.format = "[\\[$symbol($version)\\]]($style)"; cobol.format = "[\\[$symbol($version)\\]]($style)";
conda.format = "[\\[$symbol$environment\\]]($style)"; conda.format = "[\\[$symbol$environment\\]]($style)";
crystal.format = "[\\[$symbol($version)\\]]($style)"; crystal.format = "[\\[$symbol($version)\\]]($style)";
daml.format = "[\\[$symbol($version)\\]]($style)"; daml.format = "[\\[$symbol($version)\\]]($style)";
dart.format = "[\\[$symbol($version)\\]]($style)"; dart.format = "[\\[$symbol($version)\\]]($style)";
deno.format = "[\\[$symbol($version)\\]]($style)"; deno.format = "[\\[$symbol($version)\\]]($style)";
docker_context.format = "[\\[$symbol$context\\]]($style)"; docker_context.format = "[\\[$symbol($context)\\]]($style)";
dotnet.format = "[\\[$symbol($version)(🎯 $tfm)\\]]($style)"; dotnet.format = "[\\[$symbol($version)(🎯 $tfm)\\]]($style)";
elixir.format = "[\\[$symbol($version \\(OTP $otp_version\\))\\]]($style)"; elixir.format = "[\\[$symbol($version \\(OTP $otp_version\\))\\]]($style)";
elm.format = "[\\[$symbol($version)\\]]($style)"; elm.format = "[\\[$symbol($version)\\]]($style)";
erlang.format = "[\\[$symbol($version)\\]]($style)"; erlang.format = "[\\[$symbol($version)\\]]($style)";
gcloud.format = "[\\[$symbol$account(@$domain)(\\($region\\))\\]]($style)"; gcloud.format = "[\\[$symbol$account(@$domain)(\\($region\\))\\]]($style)";
git_branch = { git_branch.format = "[\\[$symbol$branch:]($style)";
format = "[\\[$symbol$branch:]($style)"; git_status.format = "([$all_status$ahead_behind]($style))(bold green)[\\]]($style)";
style = "bold green";
};
git_status = {
format = "([$all_status$ahead_behind]($style))(bold green)[\\]]($style)";
style = "blue yellow";
};
golang.format = "[\\[$symbol($version)\\]]($style)"; golang.format = "[\\[$symbol($version)\\]]($style)";
haskell.format = "[\\[$symbol($version)\\]]($style)"; haskell.format = "[\\[$symbol($version)\\]]($style)";
helm.format = "[\\[$symbol($version)\\]]($style)"; helm.format = "[\\[$symbol($version)\\]]($style)";

View File

@@ -56,6 +56,12 @@
version = "1.26.1"; version = "1.26.1";
sha256 = "sha256-WO9vYELNvwmuNeI05sUBE969KAiKYtrJ1fRfdZx3OYU="; sha256 = "sha256-WO9vYELNvwmuNeI05sUBE969KAiKYtrJ1fRfdZx3OYU=";
} }
{
name = "color-highlight";
publisher = "naumovs";
version = "2.8.0";
sha256 = "sha256-mT2P1lEdW66YkDRN6fi0rmmvvyBfXiJjAUHns8a8ipE=";
}
# { # {
# name = "remote-ssh-edit"; # name = "remote-ssh-edit";
# publisher = "ms-vscode-remote"; # publisher = "ms-vscode-remote";

View File

@@ -11,7 +11,7 @@
window { window {
font-family: ${rice.font.code.name}, monospace; font-family: ${rice.font.code.name}, monospace;
font-size: 12pt; font-size: 12pt;
color: ${rice.colors.main-fg}; color: ${rice.color.foreground};
background-color: rgba(0, 0, 0, ${rice.transparency}); background-color: rgba(0, 0, 0, ${rice.transparency});
} }
@@ -19,17 +19,17 @@
transition: box-shadow 0.2s ease-in-out, background-color 0.2s ease-in-out; transition: box-shadow 0.2s ease-in-out, background-color 0.2s ease-in-out;
text-shadow: none; text-shadow: none;
border: none; border: none;
color: ${rice.colors.main-fg}; color: ${rice.color.foreground};
background-color: ${rice.colors.secondary-bg}; background-color: ${rice.color.background};
margin: 5px; margin: 5px;
} }
button:hover { button:hover {
color: ${rice.colors.accent} ; color: ${rice.color.blue} ;
} }
button:focus { button:focus {
color: ${rice.colors.accent} ; color: ${rice.color.blue} ;
} }
''; '';

View File

@@ -86,6 +86,7 @@
defaultApplications = { defaultApplications = {
"default-web-browser" = [ "firefox.desktop" ]; "default-web-browser" = [ "firefox.desktop" ];
"text/html" = [ "firefox.desktop" ]; "text/html" = [ "firefox.desktop" ];
"text/htm" = [ "firefox.desktop" ];
"x-scheme-handler/http" = [ "firefox.desktop" ]; "x-scheme-handler/http" = [ "firefox.desktop" ];
"x-scheme-handler/https" = [ "firefox.desktop" ]; "x-scheme-handler/https" = [ "firefox.desktop" ];
"x-scheme-handler/about" = [ "firefox.desktop" ]; "x-scheme-handler/about" = [ "firefox.desktop" ];
@@ -95,6 +96,7 @@
"image/jpeg" = "imv.desktop"; "image/jpeg" = "imv.desktop";
"image/webp" = "imv.desktop"; "image/webp" = "imv.desktop";
"image/gif" = "imv.desktop"; "image/gif" = "imv.desktop";
"application/pdf" = "zathura.desktop";
}; };
}; };
}; };

View File

@@ -1,28 +1,35 @@
{ config, lib, user, host, pkgs, modulesPath, ... }: { config, lib, user, host, pkgs, modulesPath, ... }:
{ {
imports = [ imports = [
(modulesPath + "/installer/scan/not-detected.nix") (modulesPath + "/installer/scan/not-detected.nix")
]; ];
environment.systemPackages = if host == "NxNORTH" then with pkgs; [
ntfs3g
btrfs-progs
] else with pkgs; [
ntfs3g
];
boot.initrd.availableKernelModules = [ "xhci_pci" "thunderbolt" "vmd" "nvme" "usb_storage" "sd_mod" "rtsx_pci_sdmmc" ]; boot.initrd.availableKernelModules = [ "xhci_pci" "thunderbolt" "vmd" "nvme" "usb_storage" "sd_mod" "rtsx_pci_sdmmc" ];
# boot.initrd.kernelModules = [ ]; # boot.initrd.kernelModules = [ ];
boot.kernelModules = [ "kvm-intel" ]; boot.kernelModules = [ "kvm-intel" ];
boot.extraModulePackages = [ ]; boot.extraModulePackages = [ ];
fileSystems."/" = { # fileSystems = if lib.pathExists /dev/disk/by-label/shared == true then {
device = "/dev/disk/by-label/nixos"; # "/" = { device = "/dev/disk/by-label/nixos"; fsType = "ext4"; };
fsType = "ext4"; # "/boot" = { device = "/dev/disk/by-label/EFI"; fsType = "vfat"; };
# "/home/${user}/shared" = { device = "/dev/disk/by-label/shared"; fsType = if host == "NxXPS" then "ntfs" else "btrfs"; };
# } else {
# "/" = { device = "/dev/disk/by-label/nixos"; fsType = "ext4"; };
# "/boot" = { device = "/dev/disk/by-label/EFI"; fsType = "vfat"; };
# };
fileSystems = {
"/" = { device = "/dev/disk/by-label/nixos"; fsType = "ext4"; };
"/boot" = { device = "/dev/disk/by-label/EFI"; fsType = "vfat"; };
"/home/${user}/shared" = { device = "/dev/disk/by-label/shared"; fsType = if host == "NxXPS" then "ntfs" else "btrfs"; };
}; };
fileSystems."/boot" = {
device = "/dev/disk/by-label/EFI";
fsType = "vfat";
};
#fileSystems."/home/${user}/shared" = if {
# device = "/dev/disk/by-label/shared";
# fsType = if host == "NxXPS" then "ntfs" else "btrfs";
#};
swapDevices = [ swapDevices = [
{ device = "/dev/disk/by-label/swap"; } { device = "/dev/disk/by-label/swap"; }
@@ -35,20 +42,18 @@
# from nixos-hardware # from nixos-hardware
services.thermald.enable = lib.mkDefault true; services.thermald.enable = lib.mkDefault true;
boot.extraModprobeConfig = '' boot.extraModprobeConfig = if host == "NxXPS" then ''
options iwlwifi 11n_disable=8 options iwlwifi 11n_disable=8
''; '' else "";
boot.initrd.kernelModules = [ "i915" ]; boot.initrd.kernelModules = if host == "NxXPS" then [ "i915" ] else [];
environment.variables = { environment.variables = if host == "NxXPS" then {
VDPAU_DRIVER = lib.mkIf config.hardware.opengl.enable (lib.mkDefault "va_gl"); VDPAU_DRIVER = lib.mkIf config.hardware.opengl.enable (lib.mkDefault "va_gl");
}; } else {};
hardware.opengl.extraPackages = with pkgs; [ hardware.opengl.extraPackages = if host == "NxXPS" then with pkgs; [
(if (lib.versionOlder (lib.versions.majorMinor lib.version) "23.11") then vaapiIntel else intel-vaapi-driver) (if (lib.versionOlder (lib.versions.majorMinor lib.version) "23.11") then vaapiIntel else intel-vaapi-driver)
libvdpau-va-gl libvdpau-va-gl
intel-media-driver intel-media-driver
]; ] else [];
} }