Wed Jun 5 01:28:56 PM CEST 2024

This commit is contained in:
Thomas Avé 2024-06-05 13:28:56 +02:00
parent 214a6d0a63
commit d092fc690d
4 changed files with 65 additions and 15 deletions

View File

@ -33,8 +33,10 @@
hardware.opengl = {
enable = true;
driSupport = true;
driSupport32Bit = true;
};
security.polkit.enable = true;
nixpkgs.config.allowUnfree = true;
networking.hostName = host;
boot.loader.systemd-boot = {
enable = true;
@ -46,9 +48,11 @@
time.timeZone = "Europe/Brussels";
nix.settings = {
substituters = [ "https://hyprland.cachix.org" ];
substituters = [ "https://hyprland.cachix.org" "https://nix-community.cachix.org" "https://cuda-maintainers.cachix.org"];
trusted-public-keys = [
"hyprland.cachix.org-1:a7pgxzMz7+chwVL3/pzj6jIBMioiJM7ypFP8PwtkuGc="
"nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs="
"cuda-maintainers.cachix.org-1:0dq3bujKpuEPMCX6U4WylrUDZ9JyUG0VpVZa7CNfq5E="
];
experimental-features = [ "nix-command" "flakes" ];
trusted-users = [ "root" "user" ];

View File

@ -171,10 +171,8 @@
border-radius: 7px;
color: #ffffff;
background-color: #1f2430;
margin-left:4px;
margin-right:4px;
margin-top:2px;
margin-bottom:2px;
margin-left:3px;
margin-right:3px;
}
#taskbar button.active {
background-color: #023269;

View File

@ -1,4 +1,4 @@
{ pkgs, ... }:
{ pkgs, config, ... }:
let
mkConnection = name: cfg: {
connection = {
@ -35,10 +35,54 @@ connections = {
in
{
services.pcscd.enable = true;
services.xserver.videoDrivers = ["nvidia"];
hardware.opengl.extraPackages = [
pkgs.intel-compute-runtime
pkgs.intel-media-driver
];
services.thermald.enable = true;
services.fwupd.enable = true;
environment.systemPackages = with pkgs; [
wireguard-tools
# CUDA
pciutils
file
gnumake
gcc
cudatoolkit
];
hardware.nvidia = {
package = config.boot.kernelPackages.nvidiaPackages.stable;
modesetting.enable = true;
powerManagement.enable = false;
powerManagement.finegrained = true;
open = false;
nvidiaSettings = true;
prime = {
intelBusId = "PCI:0:2:0";
nvidiaBusId = "PCI:1:0:0";
offload = {
enable = true;
enableOffloadCmd = true;
};
};
};
systemd.services.nvidia-control-devices = {
wantedBy = [ "multi-user.target" ];
serviceConfig.ExecStart = "${pkgs.linuxPackages.nvidia_x11.bin}/bin/nvidia-smi";
};
specialisation = {
on-the-go.configuration = {
system.nixos.tags = [ "docked" ];
hardware.nvidia = {
powerManagement.finegrained = pkgs.lib.mkForce false;
prime.offload.enable = pkgs.lib.mkForce false;
prime.offload.enableOffloadCmd = pkgs.lib.mkForce false;
prime.sync.enable = pkgs.lib.mkForce true;
};
};
};
services.udev.packages = [ pkgs.yubikey-personalization ];
# Calendar
@ -46,7 +90,6 @@ in
services.gnome.evolution-data-server.enable = true;
services.gnome.gnome-online-accounts.enable = true;
services.gnome.gnome-keyring.enable = true;
environment.systemPackages = with pkgs; [ wireguard-tools ];
# Add the server using gnome-online-accounts:
# nix-shell -p gnome.gnome-control-center --run "gnome-control-center"
@ -90,26 +133,26 @@ in
fileSystems."/home/server" = {
device = "10.1:/home/server";
fsType = "nfs";
options = [ "x-systemd.automount" "x-systemd.mount-timeout=1" "_netdev" ];
options = [ "x-systemd.automount" "x-systemd.mount-timeout=1" "_netdev" "noauto" "timeo=1" ];
};
fileSystems."/home/user/Workspace" = {
device = "10.1:/home/server/Workspace";
fsType = "nfs";
options = [ "x-systemd.automount" "x-systemd.mount-timeout=1" "_netdev" ];
options = [ "x-systemd.automount" "x-systemd.mount-timeout=1" "_netdev" "noauto" "timeo=1" ];
};
fileSystems."/home/user/Documents" = {
device = "10.1:/home/server/Storage/Thomas/Documents";
fsType = "nfs";
options = [ "x-systemd.automount" "x-systemd.mount-timeout=1" "_netdev" ];
options = [ "x-systemd.automount" "x-systemd.mount-timeout=1" "_netdev" "noauto" "timeo=1" ];
};
fileSystems."/home/user/Pictures" = {
device = "10.1:/home/server/Storage/Thomas/Pictures";
fsType = "nfs";
options = [ "x-systemd.automount" "x-systemd.mount-timeout=1" "_netdev" ];
options = [ "x-systemd.automount" "x-systemd.mount-timeout=1" "_netdev" "noauto" "timeo=1" ];
};
fileSystems."/home/user/Videos" = {
device = "10.1:/home/server/Storage/Thomas/Videos";
fsType = "nfs";
options = [ "x-systemd.automount" "x-systemd.mount-timeout=1" "_netdev" ];
options = [ "x-systemd.automount" "x-systemd.mount-timeout=1" "_netdev" "noauto" "timeo=1" ];
};
}

View File

@ -1,8 +1,13 @@
{ inputs, pkgs, ... }:
{ inputs, config, pkgs, ... }:
{
# AMD GPU
boot.initrd.kernelModules = [ "amdgpu" ];
# AMD CPU
boot.blacklistedKernelModules = [ "k10temp" ];
boot.extraModulePackages = [ config.boot.kernelPackages.zenpower ];
boot.kernelModules = [ "zenpower" ];
# AMD CPU & GPU
boot.initrd.kernelModules = [ "amdgpu amd_pstate=active" ];
services.pcscd.enable = true;
services.udev.packages = [ pkgs.yubikey-personalization ];
services.logind.extraConfig = ''