From 415ea15ea08403721b389d2e33ab9760a2b8738e Mon Sep 17 00:00:00 2001 From: Andreas Schaafsma Date: Tue, 31 Dec 2024 17:58:22 +0100 Subject: [PATCH] commit changes --- flake.lock | 66 +++++----- .../graphics-amd-igpu-only/default.nix | 6 +- .../drivebystation-nix/configuration.nix | 119 +++++++++++++----- .../drivebystation-nix/default.nix | 4 +- .../hardware/graphics/nvidia-stable.nix | 3 +- 5 files changed, 125 insertions(+), 73 deletions(-) diff --git a/flake.lock b/flake.lock index dbd08fd..834f31e 100644 --- a/flake.lock +++ b/flake.lock @@ -19,11 +19,11 @@ "flake-compat_2": { "flake": false, "locked": { - "lastModified": 1696426674, - "narHash": "sha256-kvjfFW7WAETZlt09AgDn1MrtKzP7t90Vf7vypd3OL1U=", + "lastModified": 1733328505, + "narHash": "sha256-NeCCThCEP3eCl2l/+27kNNK7QrwZB1IJCrXfrbv5oqU=", "owner": "edolstra", "repo": "flake-compat", - "rev": "0f9255e01c2351cc7d116c072cb317785dd33b33", + "rev": "ff81ac966bb2cae68946d5ed5fc4994f96d0ffec", "type": "github" }, "original": { @@ -53,11 +53,11 @@ "systems": "systems" }, "locked": { - "lastModified": 1726560853, - "narHash": "sha256-X6rJYSESBVr3hBoH0WbKE5KvhPU5bloyZ2L4K60/fPQ=", + "lastModified": 1731533236, + "narHash": "sha256-l0KFg5HjrsfsO/JpG+r7fRrqm12kzFHyUHqHCVpMMbI=", "owner": "numtide", "repo": "flake-utils", - "rev": "c1dfcf08411b08f6b8615f7d8971a2bfa81d5e8a", + "rev": "11707dc2f618dd54ca8739b309ec4fc024de578b", "type": "github" }, "original": { @@ -128,11 +128,11 @@ ] }, "locked": { - "lastModified": 1733484277, - "narHash": "sha256-i5ay20XsvpW91N4URET/nOc0VQWOAd4c4vbqYtcH8Rc=", + "lastModified": 1735381016, + "narHash": "sha256-CyCZFhMUkuYbSD6bxB/r43EdmDE7hYeZZPTCv0GudO4=", "owner": "nix-community", "repo": "home-manager", - "rev": "d00c6f6d0ad16d598bf7e2956f52c1d9d5de3c3a", + "rev": "10e99c43cdf4a0713b4e81d90691d22c6a58bdf2", "type": "github" }, "original": { @@ -149,11 +149,11 @@ "rust-overlay": "rust-overlay" }, "locked": { - "lastModified": 1733621779, - "narHash": "sha256-oeBPiHmg8T/Qsf4qMkUqOrn6/xkJwREGo1jA+4xDssk=", + "lastModified": 1735608992, + "narHash": "sha256-NkzMjar9Sz0pLJxVfp9Hchf48YCuQQ1AnGVYGNfzwVA=", "owner": "lilyinstarlight", "repo": "nixos-cosmic", - "rev": "b9ec66ed4e1430061ca044e938bb10f3ab629ba3", + "rev": "af6900c2f6e68439c5f4aaaa8bb1a6d54bf04025", "type": "github" }, "original": { @@ -169,11 +169,11 @@ "nixpkgs": "nixpkgs_3" }, "locked": { - "lastModified": 1733516684, - "narHash": "sha256-yz3mZyTnPlxZW2f51kJyfofDsBeX7WxAPvTXZtr2lW4=", + "lastModified": 1733854371, + "narHash": "sha256-K9qGHniYBbjqVcEiwXyiofj/IFf78L5F0/FCf+CKyr0=", "owner": "nix-community", "repo": "NixOS-WSL", - "rev": "dd20ebde771edbdececade73dbb8791ff987d0db", + "rev": "dee4425dcee3149475ead0cb6a616b8a028c5888", "type": "github" }, "original": { @@ -201,11 +201,11 @@ }, "nixpkgs-stable": { "locked": { - "lastModified": 1733412085, - "narHash": "sha256-FillH0qdWDt/nlO6ED7h4cmN+G9uXwGjwmCnHs0QVYM=", + "lastModified": 1735531152, + "narHash": "sha256-As8I+ebItDKtboWgDXYZSIjGlKeqiLBvjxsQHUmAf1Q=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "4dc2fc4e62dbf62b84132fe526356fbac7b03541", + "rev": "3ffbbdbac0566a0977da3d2657b89cbcfe9a173b", "type": "github" }, "original": { @@ -217,11 +217,11 @@ }, "nixpkgs_2": { "locked": { - "lastModified": 1733392399, - "narHash": "sha256-kEsTJTUQfQFIJOcLYFt/RvNxIK653ZkTBIs4DG+cBns=", + "lastModified": 1735471104, + "narHash": "sha256-0q9NGQySwDQc7RhAV2ukfnu7Gxa5/ybJ2ANT8DQrQrs=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "d0797a04b81caeae77bcff10a9dde78bc17f5661", + "rev": "88195a94f390381c6afcdaa933c2f6ff93959cb4", "type": "github" }, "original": { @@ -233,11 +233,11 @@ }, "nixpkgs_3": { "locked": { - "lastModified": 1729973466, - "narHash": "sha256-knnVBGfTCZlQgxY1SgH0vn2OyehH9ykfF8geZgS95bk=", + "lastModified": 1733384649, + "narHash": "sha256-K5DJ2LpPqht7K76bsxetI+YHhGGRyVteTPRQaIIKJpw=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "cd3e8833d70618c4eea8df06f95b364b016d4950", + "rev": "190c31a89e5eec80dd6604d7f9e5af3802a58a13", "type": "github" }, "original": { @@ -249,11 +249,11 @@ }, "nixpkgs_4": { "locked": { - "lastModified": 1733392399, - "narHash": "sha256-kEsTJTUQfQFIJOcLYFt/RvNxIK653ZkTBIs4DG+cBns=", + "lastModified": 1735471104, + "narHash": "sha256-0q9NGQySwDQc7RhAV2ukfnu7Gxa5/ybJ2ANT8DQrQrs=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "d0797a04b81caeae77bcff10a9dde78bc17f5661", + "rev": "88195a94f390381c6afcdaa933c2f6ff93959cb4", "type": "github" }, "original": { @@ -300,11 +300,11 @@ ] }, "locked": { - "lastModified": 1733538766, - "narHash": "sha256-FEDfBpM82XGdHDbLDJC4lV+QXSVN1rERt1MqtBGJZds=", + "lastModified": 1735525800, + "narHash": "sha256-pcN8LAL021zdC99a9F7iEiFCI1wmrE4DpIYUgKpB/jY=", "owner": "oxalica", "repo": "rust-overlay", - "rev": "66526479b295ad238843a8a7367d2da7ec102757", + "rev": "10faa81b4c0135a04716cbd1649260d82b2890cd", "type": "github" }, "original": { @@ -342,11 +342,11 @@ ] }, "locked": { - "lastModified": 1733128155, - "narHash": "sha256-m6/qwJAJYcidGMEdLqjKzRIjapK4nUfMq7rDCTmZajc=", + "lastModified": 1735468296, + "narHash": "sha256-ZjUjbvS06jf4fElOF4ve8EHjbpbRVHHypStoY8HGzk8=", "owner": "mic92", "repo": "sops-nix", - "rev": "c6134b6fff6bda95a1ac872a2a9d5f32e3c37856", + "rev": "bcb8b65aa596866eb7e5c3e1a6cccbf5d1560b27", "type": "github" }, "original": { diff --git a/modules/nixos/hardware/graphics-amd-igpu-only/default.nix b/modules/nixos/hardware/graphics-amd-igpu-only/default.nix index be877ef..933f1de 100644 --- a/modules/nixos/hardware/graphics-amd-igpu-only/default.nix +++ b/modules/nixos/hardware/graphics-amd-igpu-only/default.nix @@ -48,12 +48,10 @@ in "nouveau" ]; - hardware.nvidia = { # Modesetting is required. # Add user to extra groups users.users.andreas = { - extraGroups = [ "video" "render" ]; + extraGroups = [ "video" "render" ]; + }; }; - -}; } diff --git a/systems/x86_64-linux/drivebystation-nix/configuration.nix b/systems/x86_64-linux/drivebystation-nix/configuration.nix index a1f95cf..c540286 100644 --- a/systems/x86_64-linux/drivebystation-nix/configuration.nix +++ b/systems/x86_64-linux/drivebystation-nix/configuration.nix @@ -6,7 +6,7 @@ { imports = - [ + [ ./hardware/hardware-configuration.nix ]; @@ -42,37 +42,88 @@ LC_TIME = "nl_NL.UTF-8"; }; - services.xserver = { - enable = true; # Enable the deprecated X11 teletype terminal connection system. - # Specify first device section to use nvidia GPU - #deviceSection = '' - # # Pick the 1070 - # BusID "PCI:1:0:0" - #''; - desktopManager = { - # Disable xterm - xterm.enable = false; - # Enable xfce session - xfce = { - enable = true; + services = { + displayManager.sddm.enable = false; + displayManager.defaultSession = "gnome"; + desktopManager.plasma6.enable = true; + xserver = { + enable = true; # Enable the deprecated X11 teletype terminal connection system. + # Specify first device section to use nvidia GPU + + + + + + # services.xserver.config = lib.mkForce '' + # Section "ServerLayout" + # Identifier "layout" + # Screen 0 "amdgpu" + # Inactive "nvidia" + # Option "AllowNVIDIAGPUScreens" + # EndSection + + # Section "Device" + # Identifier "nvidia" + # Driver "nvidia" + # BusID "PCI:01:0:0" + # EndSection + + # Section "Screen" + # Identifier "nvidia" + # Device "nvidia" + # EndSection + + # Section "Device" + # Identifier "amdgpu" + # Driver "amdgpu" + # BusID "PCI:50:0:0" + # EndSection + + # Section "Screen" + # Identifier "amdgpu" + # Device "amdgpu" + # EndSection + # ''; + + + + + deviceSection = '' + # Pick the 1070 + # BusID "PCI:01:0:0" + # Pick amdgpu + BusID "PCI:50:0:0" + ''; + serverLayoutSection = '' + Identifier "layout" + Screen 0 "amdgpu" + Screen "Screen-amdgpu[0]" + Inactive "nvidia" + Option "AllowNVIDIAGPUScreens" + ''; + + desktopManager = { + # Disable xterm + xterm.enable = false; + # Enable xfce session + xfce = { + enable = true; + }; + # Enable Gnome Session + gnome.enable = true; + # Disable fuckshit plasma + }; + # Configure Display Manager + displayManager = { + gdm.enable = true; + # Enable lightdm + lightdm.enable = false; + }; + # Configure keymap in X11 + xkb = { + layout = "us"; + variant = "intl"; }; - # Enable Gnome Session - gnome.enable = true; - # Disable fuckshit plasma - plasma6.enable = false; - }; - # Configure Display Manager - displayManager = { - gdm.enable = false; - sddm.enable = false; - # Enable lightdm - lightdm.enable = true; - defaultSession = "xfce"; - }; - # Configure keymap in X11 - xkb = { - layout = "us"; - variant = "intl"; }; }; # services.xserver.displayManager.defaultSession = "gnome-x11"; # services.xserver.displayManager.autoLogin.enable = true; @@ -116,8 +167,8 @@ # List packages installed in system profile. To search, run: # $ nix search wget environment.systemPackages = with pkgs; [ - # vim # Do not forget to add an editor to edit configuration.nix! The Nano editor is also installed by default. - # wget + # vim # Do not forget to add an editor to edit configuration.nix! The Nano editor is also installed by default. + # wget xfce.xfce4-whiskermenu-plugin gnome-tweaks ]; @@ -136,7 +187,7 @@ # services.openssh.enable = true; # Open ports in the firewall. - networking.firewall.allowedTCPPorts = [ + networking.firewall.allowedTCPPorts = [ 24800 #Synergy ]; networking.firewall.allowedUDPPorts = [ diff --git a/systems/x86_64-linux/drivebystation-nix/default.nix b/systems/x86_64-linux/drivebystation-nix/default.nix index 3744810..fe397cf 100644 --- a/systems/x86_64-linux/drivebystation-nix/default.nix +++ b/systems/x86_64-linux/drivebystation-nix/default.nix @@ -75,10 +75,12 @@ in networking.firewall.allowedTCPPorts = [ 59010 #SoundWireServer 3389 #RDP + 22 #ssh ]; networking.firewall.allowedUDPPorts = [ 59010 #SoundWireServer 3389 #RDP + 22 #ssh ]; # Or disable the firewall altogether. # networking.firewall.enable = false; @@ -91,7 +93,7 @@ in environment.systemPackages = with pkgs; [ git wine - bottles + # bottles gparted ntfs3g ntfsprogs diff --git a/systems/x86_64-linux/drivebystation-nix/hardware/graphics/nvidia-stable.nix b/systems/x86_64-linux/drivebystation-nix/hardware/graphics/nvidia-stable.nix index 60637df..b374f8f 100644 --- a/systems/x86_64-linux/drivebystation-nix/hardware/graphics/nvidia-stable.nix +++ b/systems/x86_64-linux/drivebystation-nix/hardware/graphics/nvidia-stable.nix @@ -5,6 +5,7 @@ in { my-namespace.hardware = { # graphics-nvidia-prime-amd = enabled; - graphics-nvidia-prime-amd-testing = enabled; + # graphics-nvidia-prime-amd-testing = enabled; + graphics-amd-igpu-only = enabled; }; }