bedHedd's NixOS Adventure

On a different note, my pc kept waking itself up from sleep
This post pointed me to the right direction

specifically this line

A quick look on the gigabyte folder

There’s someone who fixed it

I had chatgpt help me fix the issue.

chatgpt session

Here’s a structured summary of the issues encountered, debugging steps, and the solutions that ultimately worked:


Issue #1: Initial Problem – PC immediately wakes up from suspend


Issue #2: Attempted disabling via systemd service initially failed


Issue #3: Confirmation of Successful Wake Flag Disabling


Issue #4: Understanding alternative solution from nixos-hardware


Final Working Solution

You now have two robust solutions that prevent instant wake-up:

  • Systemd service solution (clears ACPI wake flags):
systemd.services.disable-acpi-wakeups = {
  description = "Disable all ACPI wakeup devices";
  wantedBy = [ "multi-bedhedd.target" ];
  after = [ "local-fs.target" ];

  serviceConfig = {
    Type = "oneshot";
    ExecStart = pkgs.writeShellScript "disable-acpi-wakeups" ''
      #!${pkgs.bash}/bin/bash
      for dev in $("${pkgs.gawk}/bin/awk" '/\*enabled/ {print $1}' /proc/acpi/wakeup); do
        echo "$dev" > /proc/acpi/wakeup
      done
    '';
  };
};
  • udev rules solution (disables runtime power-management wakeup):
services.udev.extraRules = ''
  ACTION=="add", SUBSYSTEM=="pci", ATTR{vendor}=="0x1022", ATTR{class}=="0x0604*", ATTR{power/wakeup}="disabled"
  ACTION=="add", SUBSYSTEM=="pci", ATTR{vendor}=="0x1022", ATTR{class}=="0x0c0330", ATTR{power/wakeup}="disabled"
  ACTION=="add", SUBSYSTEM=="pci", ATTR{vendor}=="0x10ec", ATTR{device}=="0x8168", ATTR{power/wakeup}="disabled"
'';

Either of these individually or combined ensures your Gigabyte B550 board properly stays suspended.

While working on it, chatgpt also suggested a fix to the following issue

error: insufficient permission for adding an object to repository database .git/objects
fatal: cannot create an empty blob in the object database
error:

with this command
sudo chown -R $(whoami) .git

chatgpt session


After yesterday’s unproductive initial refactor session, I decided to come back with a fresh set of eyes.

I used git to store my changes from yesterday in case I wanted to come back to

  1. git stash

    • output
      •  Saved working directory and index state WIP on master: 2eb6f7f re configure home manager + setup custom home manager profiles for machines
        
        • explanation: git stash will cache the uncommited changes
  2. git checkout -b broken-refactor

    • output
      •  Switched to a new branch 'broken-refactor'
        
        • explanation: the checkout -b will create a new branch called broken-refactor you can replace broken-refactor with any name with spaces replaced with - and _. The newly created branch will be based on the current you are on, so if you want to branch off another branch, make sure to stash your changes before switching off
        • creating a new branch will separate it from the master branch. You can think of it similar to creating a new folder and putting all the changed files inside of it or creating a new version of all the changed files. If you aren’t certain about something, asking chatgpt or github copilot is a great way before running the commands.
          • in fact I used it yesterday
            using git commit ammend

            To add a file to a past Git commit, your approach depends on how far back that commit is and whether it’s been pushed to a remote. Let’s walk through both common scenarios. I’ll guide you, but you can confirm your intent first:


            :white_check_mark: Quick Clarifier Questions:

            1. Do you want to modify the most recent commit?
            2. Or do you want to modify an older commit further back in history?
            3. Has this commit already been pushed to a remote (e.g. GitHub)?

            :brain: If You Want to Add a File to the Most Recent Commit

            And it hasn’t been pushed, this is safe and simple:

            # Stage the file
            git add path/to/your-file
            
            # Amend the last commit
            git commit --amend
            

            :fire: This will open your editor so you can update the commit message or keep it the same. After saving, the file is added to the previous commit.


            :brain: If You Want to Add a File to an Older Commit

            You’ll need to rebase interactively:

            git rebase -i HEAD~N
            

            Replace N with how many commits back the target commit is.

            1. In the editor that pops up, change pick to edit for the commit you want to add the file to.
            2. Then Git will pause the rebase at that commit.
            3. Add the file:
            git add path/to/your-file
            git commit --amend
            
            1. Then continue the rebase:
            git rebase --continue
            

            :warning: If the Commit Has Been Pushed

            Modifying pushed commits can cause problems for collaborators, since it rewrites history.

            If you’re okay with force-pushing, you can do:

            git push --force
            

            Otherwise, it’s better to make a new commit that adds the file instead of rewriting history.


            Want to try this interactively with a test repo or on a specific commit? I can walk through it with you.

  3. git stash apply

    • output
      •  Auto-merging modules/home.nix
         On branch broken-refactor
         Changes not staged for commit:
         (use "git add <file>..." to update what will be committed)
         (use "git restore <file>..." to discard changes in working directory)
                 modified:   flake.lock
                 modified:   flake.nix
                 modified:   machines/jade-tiger/configuration.nix
                 modified:   machines/jade-tiger/home.nix
                 modified:   modules/home.nix
                 modified:   modules/kde.nix
        
         no changes added to commit (use "git add" and/or "git commit -a")
        
        • explanation: stash apply will apply the changes that stash
  4. commit all the changes with git add and git commit

    • git add vs git add -A the -A will add all files whereas git add relative path/file will add a single file. There might be times where you want to commit a specific change for a limited set of files, in which git add relative path/file would be preferred. In my case I want to cache all my changes, so I use git add -A
    • git commit -m "$message" this is your commit message, you can replace $message with anything, just make it a message you will remember when you go back and look over the log
  5. check your available branches using git branch

    • output
      • git branch
          * broken-refactor
            master
        
        • explanation: git branch will show all branches you can check out the * will tell you which branch you are currently on. If you want to switch to another branch you can use git checkout $branch_name replace $branch_name the name of a branch from the output.

refactoring the repo configuration

I started by creating a new branch off of my master branch using git checkout -b repo-refactor.

Then I asked chatgpt how to do it and provided some context

My goal is to make a universal home.nix manager module that I can share across mutliple machines. I also want to make it so that I can declaratively setup kde with the steam os vapor theme. It took a lot of work and many weekend sessions with Chatgpt.

Since this was over the course of weeks, I don’t quite remember what I did. This probably isn’t the best practice, but it worked for me and might be helpful for anyone else venturing down a similar path

To visualize the changes I asked Chatgpt to give me the git diff command to get the difference between my previous version and my current using git diff

git diff $pre-repo-refactor HEAD | wl-copy

$pre-repo-refactor is the commit hash of the pre-repo-refactor commits, | wl-copy takes the output and copies it to my wayland clipboard

updating the machine specfic home.nix

In my previous update, I learned how to use plasma manager to declaratively set kde themes and settings within home/plasma manager
I wanted to make it so that for a given machine home manager config, it would pull the module.

diff --git a/machines/jade-tiger/home.nix b/machines/jade-tiger/home.nix
index e89f788..b74e500 100644
--- a/machines/jade-tiger/home.nix
+++ b/machines/jade-tiger/home.nix
@@ -3,38 +3,11 @@
 
 {
   # import your global home.nix (fonts, fish, etc.)
-  imports = [ ../../modules/home.nix ];
+  imports = [ 
+    ../../modules/home.nix 
+    ../../modules/kde-home.nix
 
-  # now configure plasma via the plasma-manager HM module:
-  programs.plasma.enable = true;
-
-  programs.plasma.workspace = {
-    clickItemTo = "select";
-    lookAndFeel = "org.kde.breezedark.desktop";
-    # cursor.theme = "Bibata-Modern-Ice";
-    # iconTheme   = "Papirus-Dark";
-    # wallpaper   = "${pkgs.kdePackages.plasma-workspace-wallpapers}/share/wallpapers/Patak/contents/images/1080x1920.png";
-  };
-
-  programs.plasma.hotkeys.commands."launch-konsole" = {
-    name    = "Launch Konsole";
-    key     = "Meta+Alt+K";
-    command = "konsole";
-  };
-
-  programs.plasma.panels = [
-    {
-      location = "bottom";
-      widgets = [
-        "org.kde.plasma.kickoff"
-        "org.kde.plasma.icontasks"
-        "org.kde.plasma.marginsseparator"
-        "org.kde.plasma.systemtray"
-        "org.kde.plasma.digitalclock"
-      ];
-    }
   ];
 
-  # …more programs.plasma.* settings as desired…
 }

As you can see in this first git diff, I cut the kde specific plasma manager settings and moved them to their own file, you’ll see it in the next section.

After cutting the kde settings, I added a import for the kde-home.nix. My goal for this file is to house all my kde specific customizations. Ideally I would have one kde file, but I ran into issues building home manager at the same time as kde.nix (which tells nix to use kde as my desktop manager). Alas it was much easier to separate the files rather than fight nix with imports. It probably is doable, but to make it easier to manage and build. I will keep it separate

creating a generic kde configuration that can be inherited

diff --git a/modules/kde-home.nix b/modules/kde-home.nix
new file mode 100644
index 0000000..e7c5e60
--- /dev/null
+++ b/modules/kde-home.nix
@@ -0,0 +1,36 @@
+# modules/kde-home.nix
+{ pkgs, plasma-manager, lib, ... }:
+
+{
+  programs.plasma = {
+    enable = true;
+    workspace.lookAndFeel = lib.mkForce "com.valve.vapor.deck.desktop";
+
+    panels = lib.mkForce [
+      {
+        location = "bottom";
+        height   = 64;
+        floating = false;
+        hiding   = "autohide";
+
+        widgets = [
+          "org.kde.plasma.kickoff"
+          "org.kde.plasma.pager"
+          "org.kde.plasma.icontasks"
+          "org.kde.plasma.marginsseparator"
+          "org.kde.plasma.systemtray"
+          "org.kde.plasma.digitalclock"
+          "org.kde.plasma.showdesktop"
+        ];
+      }
+    ];
+  };
+
+  # Override Kickoff’s icon at the KConfig level
+  xdg.configFile."plasma-org.kde.plasma.desktop-appletsrc".text = lib.mkForce ''
+    [Containments][1][Applets][1][Configuration][General]
+    icon=distributor-logo-steamdeck
+  '';
+}
+
+

This is pretty straight forward, I just added a new kde-home.nix which were the settings I previously used. Some new changes include using the steamos vapor theme

setting the steamos default theme for kde

I have steam deck and like the default theme they use.

After some research online I came across this nix config for the steamdeck.

I had some difficulty naviating and parsing the source repo for how they setup the kde module and was too lazy to dig further so with the help of chatgpt, I made my own based on this repo

If I understand right, the author effectively pulls tarballs from valve’s arch-linux mirror to effectively create the etc and usr’s folder
https://steamdeck-packages.steamos.cloud/archlinux-mirror/sources/jupiter-main/

My nix module just grabs the repo and adds it to the machine specific configuration.nix file

diff --git a/modules/steamdeck-plasma-system.nix b/modules/steamdeck-plasma-system.nix
new file mode 100644
index 0000000..b814f54
--- /dev/null
+++ b/modules/steamdeck-plasma-system.nix
@@ -0,0 +1,20 @@
+{ lib, pkgs, ... }:
+
+let
+  steamdeckPlasma = pkgs.stdenv.mkDerivation rec {
+    pname = "steamdeck-plasma-assets";
+    version = "0.28";
+    src = pkgs.fetchurl {
+      url    = "https://github.com/Jovian-Experiments/steamdeck-kde-presets/archive/refs/tags/${version}.tar.gz";
+      sha256 = "sha256-g8frzdFqj1ydZNDLrZ9S3Pe1KCHp3B/XaRO+dKjIOKQ=";
+    };
+    installPhase = ''
+      mkdir -p $out
+      cp -r usr/share $out/
+    '';
+  };
+in {
+  environment.systemPackages = [ steamdeckPlasma ];
+  environment.pathsToLink    = [ "/usr/share" ];
+}
+

updating configturation.nix to use the steamos theme

after creating the nix config for pulling the kde presets, I have to add a import for my module.

diff --git a/machines/jade-tiger/configuration.nix b/machines/jade-tiger/configuration.nix
index 1d23d36..8bf6100 100644
--- a/machines/jade-tiger/configuration.nix
+++ b/machines/jade-tiger/configuration.nix
@@ -8,6 +8,7 @@
   imports =
     [
       ../../modules/kde.nix
+      ../../modules/steamdeck-plasma-system.nix
       nixos-hardware.nixosModules.common-gpu-amd
       nixos-hardware.nixosModules.gigabyte-b550
       ./hardware-configuration.nix
@@ -111,7 +112,7 @@
     enable32Bit = true;
   };
   # Enable sound with pipewire.
-  hardware.pulseaudio.enable = false;
+  services.pulseaudio.enable = false;
   security.rtkit.enable = true;
   services.pipewire = {
     enable = true;

While building the config, I ran into some issues with pulse audio. My best guess is that there was some updates that changed pulseaudio from a hardware to a service. Chatgpt suggested the change so that I can complete the build

If you are curious about the questions I asked to chatgpt you can review them below

Chatgpt session to refactor the repo and make the kde home manager settings into a separate module





using steam vapor theme

In the next update, I plan on adding ollama, vscodium, and other apps (obs, kdenlive, gimp, and steam) that I think would be helpful for my dad

adding multiple users

Before I can start adding programs, I need to create users. looking over some guides online, and asking chatgpt, the suggested fix was to use home manager and put it within the configuration.nix.

My vision is to have a users folder with a respective user.nix for each user I want to manage, within the file there is a home manager config for the user and the packages. The machine would get it's own users.nix` index that will specify which users to pull from.

As mentioned, in the previous posts, I want to have configuration.nix to be as short as possible. I would much rather import and define from other places to make it manageable.

This blog post was helpful in influencing my decision
https://jeffkreeftmeijer.com/nix-home-manager/

Jeff Kreeftmeijer's blog post

Specifically this section that defined a individual user

I fed the post and asked chatgpt to help me make the ultimate config.

git diff

I had many updates that I didn’t take notes for, as I was focused getting nix to give a desired outcome, so I’ll do a git diff of the latest version and where we left off.

adding users import to configuration.nix

After getting other accounts setup, removed the initial admin account for home manager. I moved it into it’s own file

diff --git a/machines/jade-tiger/configuration.nix b/machines/jade-tiger/configuration.nix
index 8bf6100..fda1792 100644
--- a/machines/jade-tiger/configuration.nix
+++ b/machines/jade-tiger/configuration.nix
@@ -13,6 +13,7 @@
       nixos-hardware.nixosModules.gigabyte-b550
       ./hardware-configuration.nix
       home-manager.nixosModules.home-manager
+      ./users.nix
     ];
 
   # Bootloader.
@@ -165,15 +166,6 @@
     plasma-manager.homeManagerModules."plasma-manager"
   ];
 
-  home-manager.users.admin = import ./home.nix {
-    inherit pkgs plasma-manager;
-  };
-
-  users.extraUsers.admin = {
-    isNormalUser = true;
-    home = "/home/admin";
-    extraGroups = [ "wheel" ];
-};
   # Open ports in the firewall.
   # networking.firewall.allowedTCPPorts = [ ... ];
   # networking.firewall.allowedUDPPorts = [ ... ];

I also added the users index to import my user specific nix files

diff --git a/machines/jade-tiger/users.nix b/machines/jade-tiger/users.nix
new file mode 100644
index 0000000..dc2155b
--- /dev/null
+++ b/machines/jade-tiger/users.nix
@@ -0,0 +1,8 @@
+{ ... }: {
+  imports = [
+    ../../users/admin.nix
+    ../../users/dev.nix
+    ../../users/bedhedd.nix
+  ];
+}
+

adding the user specific nix files

I had chatgpt write a generic version of this so that I can have a boiler plate user config. All I need to change is the username and the user packages.

diff --git a/users/admin.nix b/users/admin.nix
new file mode 100644
index 0000000..d79189c
--- /dev/null
+++ b/users/admin.nix
@@ -0,0 +1,42 @@
+{ config, pkgs, home-manager, plasma-manager, lib, ... }:
+
+let
+  username     = "admin";
+
+  # 👇 Define exactly the packages this user wants
+  userPackages = with pkgs; [
+    vscodium
+    # add more here, e.g.
+    # docker
+    # firefox
+  ];
+in
+{
+  # 1) Create the UNIX account
+  users.extraUsers.${username} = {
+      isNormalUser = true;
+      home         = "/home/${username}";
+      extraGroups  = [ "wheel" ];
+    };
+  
+
+
+  # 2) Wire up Home-Manager for dev
+  home-manager.users = {
+    "${username}" = {
+      home.username      = username;
+      home.homeDirectory = "/home/${username}";
+
+      imports = [
+        ../modules/home.nix
+        (import ../modules/kde-home.nix { inherit pkgs plasma-manager lib; })
+      ];
+
+      programs.fish.enable = true;
+
+      # 3) Inject your per-user package list here
+      home.packages = userPackages;
+    };
+  };
+}
+
diff --git a/users/bedhedd.nix b/users/bedhedd.nix
new file mode 100644
index 0000000..ea4dad5
--- /dev/null
+++ b/users/bedhedd.nix
@@ -0,0 +1,44 @@
+
+{ config, pkgs, home-manager, plasma-manager, lib, ... }:
+
+let
+  username     = "bedhedd";
+
+  # 👇 Define exactly the packages this user wants
+  userPackages = with pkgs; [
+    vscodium
+    ollama-rocm
+    # add more here, e.g.
+    # docker
+    # firefox
+  ];
+in
+{
+  # 1) Create the UNIX account
+  users.extraUsers.${username} = {
+      isNormalUser = true;
+      home         = "/home/${username}";
+      extraGroups  = [ "wheel" ];
+    };
+  
+
+
+  # 2) Wire up Home-Manager for dev
+  home-manager.users = {
+    "${username}" = {
+      home.username      = username;
+      home.homeDirectory = "/home/${username}";
+
+      imports = [
+        ../modules/home.nix
+        ../modules/kde-home.nix
+      ];
+
+      programs.fish.enable = true;
+
+      # 3) Inject your per-user package list here
+      home.packages = userPackages;
+    };
+  };
+}
+
diff --git a/users/dev.nix b/users/dev.nix
new file mode 100644
index 0000000..4e0fe1a
--- /dev/null
+++ b/users/dev.nix
@@ -0,0 +1,43 @@
+{ config, pkgs, home-manager, plasma-manager, lib, ... }:
+
+let
+  username     = "dev";
+
+  # 👇 Define exactly the packages this user wants
+  userPackages = with pkgs; [
+    vscodium
+    ollama-rocm
+    # add more here, e.g.
+    # docker
+    # firefox
+  ];
+in
+{
+  # 1) Create the UNIX account
+  users.extraUsers.${username} = {
+      isNormalUser = true;
+      home         = "/home/${username}";
+      extraGroups  = [ "wheel" ];
+    };
+  
+
+
+  # 2) Wire up Home-Manager for dev
+  home-manager.users = {
+    "${username}" = {
+      home.username      = username;
+      home.homeDirectory = "/home/${username}";
+
+      imports = [
+        ../modules/home.nix
+        ../modules/kde-home.nix
+      ];
+
+      programs.fish.enable = true;
+
+      # 3) Inject your per-user package list here
+      home.packages = userPackages;
+    };
+  };
+}
+

fixing autohide for the panel

While building the other user accounts, I needed to make changes so that it would apply for each user not just the initial account I created with the pc

diff --git a/modules/kde-home.nix b/modules/kde-home.nix
index e6f66ea..eac3189 100644
--- a/modules/kde-home.nix
+++ b/modules/kde-home.nix
@@ -4,49 +4,31 @@
 {
   programs.plasma = {
     enable = true;
+    workspace.lookAndFeel = lib.mkForce "com.valve.vapor.deck.desktop";
 
-    # — Steam Deck global theme —
-    workspace.lookAndFeel = lib.mkForce "com.valve.vapor.desktop";
-
-    # — Declarative Steam Deck panel (auto‑hide, no floating) —
     panels = lib.mkForce [
       {
         location = "bottom";
-        screen   = 0;
         height   = 64;
         floating = false;
-        hiding   = "autohide";
+        # hiding   = "autoHide";
+        # visibility = "autohide";
+        hiding   = "dodgewindows";
 
         widgets = [
-          {
-            plasmoid = "org.kde.plasma.kickoff";
-            config.General.icon                     = "distributor-logo-steamdeck";
-            config.General.favoritesPortedToKAstats = true;
-          }
-
-          { plasmoid = "org.kde.plasma.pager"; }
-          { plasmoid = "org.kde.plasma.icontasks"; }
-          { plasmoid = "org.kde.plasma.marginsseparator"; }
-
-          {
-            plasmoid = "org.kde.plasma.systemtray";
-            config.General.SystrayContainmentId = 166;
-          }
-
-          { plasmoid = "org.kde.plasma.digitalclock"; }
-          { plasmoid = "org.kde.plasma.showdesktop"; }
+          "org.kde.plasma.kickoff"
+          "org.kde.plasma.pager"
+          "org.kde.plasma.icontasks"
+          "org.kde.plasma.marginsseparator"
+          "org.kde.plasma.systemtray"
+          "org.kde.plasma.digitalclock"
+          "org.kde.plasma.showdesktop"
         ];
       }
     ];
-
-    # Example custom hotkey (unchanged)
-    hotkeys.commands."launch-konsole" = {
-      name    = "Launch Konsole";
-      key     = "Meta+Alt+K";
-      command = "konsole";
-    };
   };
-}
 
+  # Override Kickoff’s icon at the KConfig level
+}

fixing librewolf

while configuring librewolf across all user accounts, I ran into issues where the config setting privacy.clearOnShutdown.cookies didn’t apply.

turns out the config I followed off of nixos.wiki was incorrect
https://nixos.wiki/wiki/Librewolf
the correct entry is
https://wiki.nixos.org/wiki/Librewolf

diff --git a/modules/home.nix b/modules/home.nix
index 1e07328..50c0fc9 100644
--- a/modules/home.nix
+++ b/modules/home.nix
@@ -92,11 +98,10 @@
     };
     firefox = {
       enable = true;
-      package = pkgs.librewolf;
       policies = {
         DisableTelemetry = true;
         DisableFirefoxStudies = true;
-        Preferences = {
+        settings = {
           "cookiebanners.service.mode.privateBrowsing" = 2; # Block cookie banners in private browsing
           "cookiebanners.service.mode" = 2; # Block cookie banners
           "privacy.donottrackheader.enabled" = true;
@@ -121,6 +126,37 @@
         };
       };
     };
+    librewolf = {
+      enable = true;
+      package = pkgs.librewolf;
+      settings = {
+          "cookiebanners.service.mode.privateBrowsing" = 2; # Block cookie banners in private browsing
+          "cookiebanners.service.mode" = 2; # Block cookie banners
+          "privacy.donottrackheader.enabled" = true;
+          "privacy.fingerprintingProtection" = true;
+          "privacy.resistFingerprinting" = true;
+          "privacy.trackingprotection.emailtracking.enabled" = true;      
+          "privacy.trackingprotection.enabled" = true;
+          "privacy.trackingprotection.fingerprinting.enabled" = true;
+          "privacy.trackingprotection.socialtracking.enabled" = true;
+
+          # do not clear cookies and logins
+          "privacy.clearOnShutdown.cookies" = false;
+          "privacy.clearOnShutdown.siteSettings" = false;
+          "network.cookie.lifetimePolicy" = 0; # 0 = accept normally
+          "privacy.sanitize.sanitizeOnShutdown" = false;
+        };
+      policies = {
+        DisableTelemetry = true;
+        DisableFirefoxStudies = true;
+        ExtensionSettings = {
+          "[email protected]" = {
+            install_url = "https://addons.mozilla.org/firefox/downloads/latest/ublock-origin/latest.xpi";
+            installation_mode = "force_installed";
+          };
+        };
+      };
+    };    

Also while I was at it, I moved my system packages as well

diff --git a/modules/home.nix b/modules/home.nix
index 1e07328..50c0fc9 100644
--- a/modules/home.nix
+++ b/modules/home.nix
@@ -22,6 +22,12 @@
       # dictionaries
       # aspell
       # aspellDicts.en
+
+      # system packages
+      vim # Do not forget to add an editor to edit configuration.nix! The Nano editor is also installed by default.
+      wget
+      wl-clipboard
+      xclip
     ];
     stateVersion = "22.05";
   };

interactions with chatgpt

figuring out kde autohide with chatgpt
home manager debugging

Turns out the issue occurred if you didn’t login and setup the account






adding a user declartively



figuring out how to get kde layout theme to apply across multiple years

Certainly! Here’s our full interaction formatted in the [quote] structure:






figuring out librewolf's configuration issues

getting uv to be my python environment manager in nix

I wanted uv to manage my python environments rather than nix. While trying to use a uv venv with the a vscodium jupyter notebook, I kept getting these errors

^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/bedhedd/Documents/development-projects/.venv/lib/python3.12/site-packages/zmq/backend/cython/__init__.py", line 6, in <module>
    from . import _zmq
ImportError: libstdc++.so.6: cannot open shared object file: No such file or directory

When I run find /nix/store -name 'libstdc++.so.6', the package shows up, but for whatever reason uv couldn’t get it working.

This page was helpful in configuring it to resolve
https://wiki.nixos.org/wiki/Python#Using_nix-ld

specifically this block, where they set a environment variable called LD_LIBRARY_PATH which points a valid libstdc++.so.6 path found with the find command

to apply these changes

{
  programs.nix-ld = {
    enable = true;
    libraries = with pkgs; [
      zlib zstd stdenv.cc.cc curl openssl attr libssh bzip2 libxml2 acl libsodium util-linux xz systemd
    ];
  };
  # https://github.com/nix-community/nix-ld?tab=readme-ov-file#my-pythonnodejsrubyinterpreter-libraries-do-not-find-the-libraries-configured-by-nix-ld
  environment.systemPackages = [
    (pkgs.writeShellScriptBin "python" ''
      export LD_LIBRARY_PATH=$NIX_LD_LIBRARY_PATH
      exec ${pkgs.python3}/bin/python "$@"
    '')
  ];
  # another (dangerous) solution
  # environment.systemPackages = with pkgs; [ python3 ];
  # programs.bash = {
  #   enable = true;
  #   initExtra = ''
  #     export LD_LIBRARY_PATH=$LD_LIBRARY_PATH''${LD_LIBRARY_PATH:+:}$NIX_LD_LIBRARY_PATH
  #   '';
  # };
}

I had chatgpt rewrite the solution to work with my config. There was a lot of trial and error, but this is the solution that ultimately worked.

While researching solutions, I came across this post.

While the author is correct of using the nix way, the post was not helpful as the suggestion to use devshells, but did not link a best practice or reference. Furthermore, I wanted uv to manage all my python environments it is much faster than nix at building dependencies.

git diffs

Here’s the git diff of the changes that I applied to get it working with my environment.

fish config

I added the pkgs inheritance so that the environment variable UV_PYTHON would be able to point to the nix package. I also added a fish function so that if vscodium creates a terminal, it will be able to activate into the fish file rather than get stuck on the bash version

diff --git a/dotfiles/fish-config.nix b/dotfiles/fish-config.nix
index eb09839..20a6d61 100644
--- a/dotfiles/fish-config.nix
+++ b/dotfiles/fish-config.nix
@@ -1,4 +1,4 @@
-{ }:
+{ pkgs }:
 ''
 # Custom Fish configuration extras
 set -g fish_key_bindings fish_default_key_bindings
@@ -22,4 +22,25 @@ set -gx EDITOR nvim
 set -gx VISUAL nvim
 
 
+set -x UV_PYTHON_PREFERENCE only-system
+set -x UV_PYTHON ${pkgs.python312Full}/bin/python
+
+function source --wraps=source
+    set -l file $argv[1]
+    if test -n "$file"
+        if string match -q "*.venv/bin/activate" "$file"
+            set -l fish_file "$file.fish"
+            if test -f "$fish_file"
+                echo "activating environment: $fish_file"
+                builtin source "$fish_file"
+                return $status
+            else
+                echo "No fish activation script found!" 1>&2
+                return 1
+            end
+        end
+    end
+    builtin source $argv
+end
+
 ''

home changes

I also moved uv from a user specific to a system wide install. I also applied the changes to update python to include the environment variable for LD_LIBRARY_PATH.

While searching for jupyter on nixpkgs I came across the vscode extensions. I added them because it made sense to have for all users.

The last change is making sure fish is able to import/inherit the pkgs so that the environment variable works

diff --git a/modules/home.nix b/modules/home.nix
index b3fcfc8..f18c43e 100644
--- a/modules/home.nix
+++ b/modules/home.nix
@@ -29,6 +29,15 @@
       tree
       fastfetch
       tealdeer
+      
+      gcc
+      uv
+      (pkgs.writeShellScriptBin "python3" ''
+        export LD_LIBRARY_PATH=$NIX_LD_LIBRARY_PATH
+        exec ${pkgs.python3}/bin/python3 "$@"
+      '')
+      vscode-extensions.ms-toolsai.jupyter
+      vscode-extensions.ms-python.python
 
       # dictionaries
       # aspell
@@ -43,6 +52,11 @@
     stateVersion = "22.05";
   };
 
+  home.sessionVariables = {          # <── needs the `home.` prefix
+    LD_LIBRARY_PATH =
+      "${pkgs.lib.makeLibraryPath [ pkgs.stdenv.cc.cc.lib ]}:$LD_LIBRARY_PATH";
+  };
+  
   #nix = {
     #package = pkgs.nixUnstable;
     #settings = {
@@ -56,7 +70,7 @@
     direnv.enable = true;
     fish = {
       enable = true;
-      interactiveShellInit = import ../dotfiles/fish-config.nix {};
+      interactiveShellInit = import ../dotfiles/fish-config.nix { inherit pkgs; };
       plugins = [
         #{ name = "grc"; src = pkgs.fishPlugins.grc.src; }
         #{

If you want to replicate my environment, you can find it at this git repo

While deploying my dad’s local LLM PC this weekend, he wanted to remote into the desktop since he travels. Naturally I installed rust desk, but a issue we encountered was that when reconnecting, KDE would ask to grant screen sharing permissions. This is particularly annoying because no one will physically be able to grant the permissions

Some research online points to this being a Wayland issue

I’m going to try this solution posted here

@YamiYukiSenpai did you end up getting it working on Wayland?

After setting up nix for my dad, I wanted to start porting my fedora desktop to nix, but I wanted to first check what packages I have currently installed.

To check I used the command dnf repoquery --userinstalled --qf "%{name}\n"
https://old.reddit.com/r/Fedora/comments/174vfu3/how_to_get_a_list_of_explicitly_installed/k4ey3gb/

repo query output
dnf repoquery --userinstalled --qf "%{name}\n" 
ICAClient
ModemManager
NetworkManager
NetworkManager-adsl
NetworkManager-bluetooth
NetworkManager-config-connectivity-fedora
NetworkManager-iodine-gnome
NetworkManager-l2tp-gnome
NetworkManager-openconnect-gnome
NetworkManager-openvpn-gnome
NetworkManager-ppp
NetworkManager-pptp-gnome
NetworkManager-ssh-gnome
NetworkManager-vpnc-gnome
NetworkManager-wifi
NetworkManager-wwan
PackageKit-command-not-found
PackageKit-gstreamer-plugin
PackageKit-gtk3-module
R
aajohan-comfortaa-fonts
aalib-libs
abattis-cantarell-fonts
abattis-cantarell-vf-fonts
abrt-cli
abrt-desktop
abrt-java-connector
abrt-tui
acl
add-determinism
adobe-source-code-pro-fonts
adwaita-gtk2-theme
adwaita-qt4
akonadi-server
akonadi-server-mysql
akregator
alsa-sof-firmware
alsa-ucm
alsa-utils
amd-gpu-firmware
amd-ucode-firmware
amtk
anaconda
anaconda-install-env-deps
anaconda-live
android-tools
appimagelauncher
argyllcms-data
aribb25
ark
asunder
at
at-spi2-atk
at-spi2-core
atheros-firmware
atmel-firmware
attr
audiocd-kio
audit
authselect
autoconf
automake
avahi
avahi-compat-libdns_sd-devel
b43-fwcutter
b43-openfwwf
baobab
basesystem
bash
bash-color-prompt
bash-completion
bat
bc
beets
beets-doc
beets-plugins
bind-utils
bitstream-vera-sans-fonts
blueberry
bluedevil
blueman
bluez-cups
brcmfmac-firmware
breeze-icon-theme
breeze-icon-theme-fedora
bridge-utils
brltty
btrfs-progs
build-reproducibility-srpm-macros
bzip2
caca-utils
caribou
catimg
cdparanoia
cheese
chkconfig
chromium-common
chrony
cifs-utils
cinnamon
cinnamon-control-center
cinnamon-screensaver
cirrus-audio-firmware
clang-resource-filesystem
cldr-emoji-annotation-dtd
clinfo
cmake
cmake-filesystem
codium
colord
colord-kde
compat-lua-libs
compsize
conda
containerd.io
containers-common
coreutils
cpio
crontabs
crypto-policies-scripts
cryptsetup
cups
cups-browsed
cups-filters
cups-pk-helper
curl
cyrus-sasl-plain
dbus
dconf
ddrescue
default-editor
default-fonts-cjk-mono
default-fonts-cjk-sans
default-fonts-cjk-serif
default-fonts-core-emoji
default-fonts-core-math
default-fonts-core-mono
default-fonts-core-sans
default-fonts-core-serif
default-fonts-other-mono
default-fonts-other-sans
default-fonts-other-serif
dejavu-sans-fonts
dejavu-sans-mono-fonts
dejavu-serif-fonts
deltarpm
desktop-backgrounds-gnome
device-mapper-multipath
devscripts-checkbashisms
dhcp-client
digikam
distribution-gpg-keys
dmraid
dmraid-libs
dnf-plugins-core
dnf-utils
dnf5
dnf5-plugins
dnfdaemon
dnfdaemon-selinux
dnfdragora
dnfdragora-updater
dnsmasq
dolphin
dos2unix
dosfstools
dracut-config-rescue
dracut-live
dracut-network
dragon
e2fsprogs
earlyoom
ed
efibootmgr
element
elfutils-debuginfod-client-devel
elfutils-devel
elisa-player
eog
eom
ethtool
evince
evince-djvu
evince-thumbnailer
exfatprogs
extundelete
f3
f32-backgrounds-animated
f32-backgrounds-base
f32-backgrounds-gnome
f33-backgrounds-base
f33-backgrounds-gnome
f41-backgrounds-base
f41-backgrounds-gnome
faad2-libs
fahclient
fahcontrol
fahviewer
fcoe-utils
fd-find
fedora-bookmarks
fedora-chromium-config
fedora-flathub-remote
fedora-icon-theme
fedora-logos
fedora-release-identity-workstation
fedora-release-workstation
fedora-workstation-backgrounds
fedora-workstation-repositories
ffmpeg-free
ffmpegthumbs
fftw-libs-double
fftw-libs-single
file
file-roller
file-roller-nautilus
filelight
filesystem
firefox
firewall-config
firewalld
fish
flatpak
flatpak-kcm
flatpak-selinux
flexiblas
flexiblas-netlib
flexiblas-openblas-openmp
fluidsynth-libs
fontawesome4-fonts
foomatic
foomatic-db-ppds
fpaste
fprintd-pam
freeglut
freeglut-devel
fros-gnome
fwupd
game-music-emu
gamemode
gawk-all-langpacks
gcc-c++
gdk-pixbuf2-xlib
gdm
gdouros-symbola-fonts
gedit
genisoimage
ghostscript
ghostscript-tools-fonts
ghostscript-tools-printing
giflib
gimp
git
glib-networking
glibc
glibc-all-langpacks
glx-utils
gnome-app-list
gnome-backgrounds
gnome-bluetooth
gnome-boxes
gnome-browser-connector
gnome-calculator
gnome-calendar
gnome-characters
gnome-classic-session
gnome-classic-session-xsession
gnome-clocks
gnome-color-manager
gnome-connections
gnome-contacts
gnome-control-center
gnome-disk-utility
gnome-epub-thumbnailer
gnome-font-viewer
gnome-initial-setup
gnome-logs
gnome-maps
gnome-photos
gnome-remote-desktop
gnome-screenshot
gnome-session-wayland-session
gnome-session-xsession
gnome-settings-daemon
gnome-shell
gnome-shell-extension-background-logo
gnome-software
gnome-subtitles
gnome-system-monitor
gnome-terminal
gnome-terminal-nautilus
gnome-text-editor
gnome-themes-extra
gnome-tour
gnome-tweaks
gnome-user-docs
gnome-user-share
gnome-weather
gnu-free-mono-fonts
gnu-free-sans-fonts
gnu-free-serif-fonts
gnupg2
golang
google-carlito-fonts
google-chrome-stable
google-crosextra-caladea-fonts
google-droid-sans-fonts
google-noto-color-emoji-fonts
google-noto-naskh-arabic-vf-fonts
google-noto-sans-cjk-vf-fonts
google-noto-sans-gurmukhi-fonts
google-noto-sans-gurmukhi-vf-fonts
google-noto-sans-math-fonts
google-noto-sans-meetei-mayek-vf-fonts
google-noto-sans-sinhala-vf-fonts
google-noto-sans-symbols-2-fonts
gpm-libs
graphene
graphviz-libs
grub2-efi-ia32
grub2-efi-ia32-cdboot
grub2-efi-x64
grub2-efi-x64-cdboot
grub2-pc
grub2-tools
grub2-tools-efi
grub2-tools-extra
grubby
gst-editing-services
gstreamer1-devel
gstreamer1-plugin-dav1d
gstreamer1-plugin-gtk4
gstreamer1-plugin-libav
gstreamer1-plugin-openh264
gstreamer1-plugins-bad-free
gstreamer1-plugins-bad-free-fluidsynth
gstreamer1-plugins-bad-free-wildmidi
gstreamer1-plugins-bad-free-zbar
gstreamer1-plugins-bad-freeworld
gstreamer1-plugins-base-devel
gstreamer1-plugins-good
gstreamer1-plugins-good-extras
gstreamer1-plugins-ugly
gstreamer1-plugins-ugly-free
gstreamer1-vaapi
gtk-sharp3
gtk2-immodule-xim
gtk3-immodule-xim
guake
gutenprint
gutenprint-cups
gvfs-afc
gvfs-afp
gvfs-archive
gvfs-fuse
gvfs-goa
gvfs-gphoto2
gvfs-mtp
gvfs-smb
gwenview
harfbuzz-cairo
hddtemp
hdparm
hexchat
hexedit
hfsplus-tools
hostname
hplip
hunspell
hyperv-daemons
ibus-anthy
ibus-cangjie-engine-cangjie
ibus-chewing
ibus-gtk2
ibus-gtk3
ibus-gtk4
ibus-hangul
ibus-kkc
ibus-libpinyin
ibus-libzhuyin
ibus-m17n
ibus-qt
ibus-typing-booster
ibus-xinit
icu
im-chooser
ima-evm-utils-libs
imath
imsettings
imsettings-cinnamon
imsettings-gsettings
imsettings-plasma
imsettings-qt
inih-cpp
initial-setup
initial-setup-gui
initscripts
intel-audio-firmware
intel-gpu-firmware
intel-media-driver
intel-vsc-firmware
iproute
iptables-nft
iptstate
iputils
ipw2100-firmware
ipw2200-firmware
irqbalance
iscsi-initiator-utils
iwlegacy-firmware
iwlwifi-dvm-firmware
iwlwifi-mvm-firmware
java-11-openjdk-headless
jomolhari-fonts
jq
julietaula-montserrat-fonts
jwhois
k3b
kaccounts-integration-qt6
kaccounts-providers
kaddressbook
kamera
kamoso
kbd
kbd-legacy
kcalc
kcharselect
kde-connect
kde-gtk-config
kde-inotify-survey
kde-partitionmanager
kde-settings-pulseaudio
kdebugsettings
kdegraphics-thumbnailers
kdenetwork-filesharing
kdeplasma-addons
kdialog
kdnssd
kdump-anaconda-addon
keditbookmarks
kernel
kernel-core
kernel-devel
kernel-devel-matched
kernel-modules
kernel-modules-core
kernel-modules-extra
kernel-srpm-macros
kernel-tools
kernel-tools-libs
kexec-tools
kf6-baloo-file
kfind
kgpg
khelpcenter
khmer-os-content-fonts
khmer-os-system-fonts
kinfocenter
kio-admin
kio-gdrive
kjournald
kmahjongg
kmail
kmenuedit
kmines
kmod-nvidia-6.14.5-200.fc41.x86_64
kmod-nvidia-6.14.6-200.fc41.x86_64
kmod-nvidia-6.14.9-200.fc41.x86_64
kmouth
kolourpaint
konsole
kontact
korganizer
kpat
krdc
krdp
krfb
krusader
kscreen
kscreenlocker
ksshaskpass
ktorrent
kwalletmanager5
kwebkitpart
kwin
kwrite
ladspa
lame
langpacks-en
lato-fonts
lensfun
less
libXi-devel
libXmu-devel
libappindicator-gtk3
libaribcaption
libarrow-acero-libs
libarrow-dataset-libs
libatomic
libavcodec-freeworld
libblockdev-smart
libblockdev-smartmontools
libbrotli
libcaca
libcamera
libcamera-ipa
libcanberra-gtk2
libcanberra-gtk3
libcbor
libcddb
libchewing
libcurl-devel
libdbusmenu-gtk3
libdc1394
libdca
libdeflate
libdnf5
libdnf5-cli
libdvbpsi
libebml
libeconf
liberation-fonts-all
liberation-mono-fonts
liberation-sans-fonts
liberation-serif-fonts
libertas-firmware
libevent-devel
libfdt
libffi-devel
libfido2
libgbinder
libgdiplus
libgfapi0
libgfchangelog0
libgfrpc0
libgfxdr0
libglibutil
libglusterfs0
libglvnd-gles
libidn2-devel
libindicator-gtk3
libjcat
libkate
libkcapi-fipscheck
liblrdf
libmad
libmatroska
libmicrodns
libmodplug
libmpcdec
libmysofa
libnghttp2-devel
libopenmpt
liborc2
libphonenumber
libplacebo
libplist-devel
libportal
libpsl-devel
libqrcodegencpp
libreoffice-calc
libreoffice-data
libreoffice-draw
libreoffice-emailmerge
libreoffice-graphicfilter
libreoffice-impress
libreoffice-math
libreoffice-ogltrans
libreoffice-opensymbol-fonts
libreoffice-pyuno
libreoffice-ure-common
libreoffice-writer
librewolf
librsvg2
libsane-hpaio
libsbc
libshaderc
libspelling
libssh-devel
libtiger
libtool
libtraceevent
libubsan
libunibreak
libunwind-devel
libupnp
liburing
libusb-compat-0.1
libva-intel-media-driver
libva-utils
libva-vdpau-driver
libvirt
libvirt-daemon-config-network
libvirt-ssh-proxy
libyui
libyui-gtk
libyui-mga
libyui-mga-gtk
libyui-mga-ncurses
libyui-mga-qt
libyui-ncurses
libyui-qt
libzip
libzstd-devel
linux-atm
linux-firmware
lirc-libs
live555
logrotate
lohit-assamese-fonts
lohit-bengali-fonts
lohit-devanagari-fonts
lohit-gujarati-fonts
lohit-kannada-fonts
lohit-marathi-fonts
lohit-odia-fonts
lohit-tamil-fonts
lohit-telugu-fonts
loupe
low-memory-monitor
lrzsz
lshw
lsof
lua-lgi-compat
luajit
lv2
lvm2
lxc
lxc-libs
lxc-templates
lxcfs
mactel-boot
madan-fonts
mailcap
man-db
man-pages
mcelog
mdadm
mdevctl
mediawriter
memstrack
memtest86+
mesa-dri-drivers
mesa-libEGL
mesa-libGLU
mesa-libGLU-devel
mesa-libOSMesa
mesa-vulkan-drivers
metacity
microcode_ctl
mingw-binutils-generic
mingw-filesystem-base
mingw64-FAudio
mingw64-SDL2
mingw64-crt
mingw64-filesystem
mingw64-lcms2
mingw64-libgcc
mingw64-libjpeg-turbo
mingw64-libpng
mingw64-libstdc++
mingw64-libtiff
mingw64-libxml2
mingw64-libxslt
mingw64-vkd3d
mingw64-win-iconv
mingw64-winpthreads
mingw64-zlib
minicom
minizip-ng-compat
mkvtoolnix
moby-engine
moby-filesystem
mono-complete
mono-core
mono-data
mono-data-sqlite
mono-extras
mono-locale-extras
mono-mvc
mono-wcf
mono-web
mono-winforms
mousetweaks
mozilla-fira-mono-fonts
mozilla-fira-sans-fonts
mozjs128
mozjs68
mozjs78
mpage
mt7xxx-firmware
mtr
nano
nano-default-editor
nautilus
nautilus-sendto
ncurses
nemo-fileroller
nemo-image-converter
nemo-preview
neochat
neofetch
neovim
net-tools
network-manager-applet
nfs-utils
nginx
nm-connection-editor
nmap
nmap-ncat
nss-mdns
ntfs-3g
ntfs2btrfs
ntfsprogs
numix-icon-theme-square
nvautoinstall
nvidia-gpu-firmware
nvme-cli
nxpwireless-firmware
ocl-icd-devel
okular
onlyoffice-repo
open-sans-fonts
open-vm-tools-desktop
openblas-openmp
openexr-libs
openjpeg
openpace
opensc
openssh-clients
openssh-server
openssl-devel
openssl1.1
orca
paktype-naskh-basic-fonts
pam-kwallet
pam_afs_session
pam_krb5
paper-icon-theme
paps
parted
passwdqc
pciutils
pcre-cpp
pcsc-lite
pcsc-lite-ccid
perl-AutoLoader
perl-B
perl-Class-Struct
perl-DynaLoader
perl-Fcntl
perl-File-Basename
perl-File-Compare
perl-File-Copy
perl-File-Find
perl-File-stat
perl-FileHandle
perl-Getopt-Std
perl-Hash-Util-FieldHash
perl-I18N-LangTags
perl-I18N-Langinfo
perl-IPC-Open3
perl-MIME-Base32
perl-NDBM_File
perl-NKF
perl-Opcode
perl-POSIX
perl-Safe
perl-SelectSaver
perl-Symbol
perl-Sys-Hostname
perl-Tie
perl-Unicode-UCD
perl-base
perl-deprecate
perl-if
perl-lib
perl-locale
perl-macros
perl-meta-notation
perl-mro
perl-overload
perl-overloading
perl-sigtrap
perl-subs
perl-vars
phonon-qt6-backend-vlc
php-cli
php-common
picosat-libs
pidgin
pinentry-gnome3
pinentry-qt
pinfo
pipewire
pipewire-alsa
pipewire-codec-aptx
pipewire-gstreamer
pipewire-jack-audio-connection-kit
pipewire-plugin-libcamera
pipewire-pulseaudio
pipewire-utils
pipewire0.2-libs
pipx
plasma-breeze
plasma-desktop
plasma-desktop-doc
plasma-discover
plasma-discover-notifier
plasma-disks
plasma-drkonqi
plasma-nm
plasma-nm-l2tp
plasma-nm-openconnect
plasma-nm-openswan
plasma-nm-openvpn
plasma-nm-pptp
plasma-nm-vpnc
plasma-pa
plasma-print-manager
plasma-systemmonitor
plasma-thunderbolt
plasma-vault
plasma-welcome
plasma-workspace
plasma-workspace-wallpapers
plasma-workspace-wayland
plocate
plymouth
plymouth-system-theme
policycoreutils
policycoreutils-python-utils
polkit
polkit-kde
postgresql
postgresql-server
powerline
ppp
pptp
procps-ng
protobuf
protobuf-compiler
protobuf-lite
psacct
psmisc
pt-sans-fonts
ptyxis
publicsuffix-list
pulseaudio-utils
pygtk2
pypy
pypy-libs
python-rpm-macros
python2.7
python3-abrt-addon
python3-beautifulsoup4
python3-click
python3-conda
python3-conda-package-handling
python3-cpuinfo
python3-crypt-r
python3-cytoolz
python3-dasbus
python3-devel
python3-dnf-plugins-core
python3-dnfdaemon
python3-docker+ssh
python3-dotenv
python3-dotenv+cli
python3-fluidity-sm
python3-gbinder
python3-invoke
python3-lexicon
python3-libarchive-c
python3-linux-procfs
python3-lxml
python3-mock
python3-nftables
python3-perf
python3-progressbar2
python3-pyasn1
python3-pyclip
python3-pycosat
python3-pyyaml
python3-requests-download
python3-responses
python3-rpm-generators
python3-ruamel-yaml
python3-ruamel-yaml-clib
python3-soupsieve
python3-tkinter
python3-toolz
python3-tqdm
python3-utils
python3-yui
qadwaitadecorations-qt5
qemu-char-baum
qemu-device-display-qxl
qemu-device-usb-redirect
qemu-device-usb-smartcard
qemu-guest-agent
qemu-ui-spice-app
qt
qt-settings
qt-x11
qt5-qtbase
qt5-qtbase-gui
qt5-qtdeclarative
qt5-qtsvg
qt5-qtxmlpatterns
quota
rav1e-libs
rdist
realmd
realtek-firmware
redshift-gtk
remarkable
rhythmbox
rit-meera-new-fonts
rit-rachana-fonts
rng-tools
rocm-clinfo
rocm-opencl
rocminfo
rootfiles
rp-pppoe
rpm
rpmfusion-free-release
rpmfusion-nonfree-release
rsync
rsyslog
rtl-sdr
ruby-default-gems
rubygem-bundler
rygel
samba-client
samba-usershares
sane-backends-drivers-scanners
schroedinger
scl-utils
sdbus-cpp
sddm
sddm-breeze
sddm-kcm
sddm-wayland-plasma
selinux-policy-targeted
setroubleshoot
setup
shadow-utils
shairplay
shim-ia32
shim-x64
shotwell
signon-kwallet-extension
sil-abyssinica-fonts
sil-mingzat-fonts
sil-nuosu-fonts
sil-padauk-fonts
simple-scan
skanpage
skopeo
slang
slick-greeter
slick-greeter-cinnamon
smartmontools
snapshot
sos
sox
spectacle
speech-dispatcher
spice-vdagent
spice-webdavd
spirv-tools-libs
sssd
sssd-common
sssd-kcm
sssd-proxy
stix-fonts
strawberry
sudo
sushi
svt-hevc-libs
switchdesk
switchdesk-gui
symlinks
sysfsutils
syslinux
syslinux-extlinux
system-config-language
system-config-printer
system-config-printer-udev
systemd
systemd-networkd
systemd-oomd-defaults
systemd-resolved
systemd-udev
tar
tcpdump
teamd
telnet
tesseract-libs
testdisk
texlive
texlive-collection-xetex
texlive-hyperxmp
thermald
time
tini-static
tiwilink-firmware
tix
tk
tldr
tlwg-waree-fonts
tmux
tmux-powerline
totem
totem-video-thumbnailer
traceroute
tracker
tracker-miners
transmission
tree
tuned
tuned-ppd
uchardet
udica
udisks2
unoconv
unzip
uresourced
urw-base35-bookman-fonts
urw-base35-c059-fonts
urw-base35-d050000l-fonts
urw-base35-fonts
urw-base35-gothic-fonts
urw-base35-nimbus-mono-ps-fonts
urw-base35-nimbus-roman-fonts
urw-base35-nimbus-sans-fonts
urw-base35-p052-fonts
urw-base35-standard-symbols-ps-fonts
urw-base35-z003-fonts
usb_modeswitch
usbutils
util-linux
uv
vapoursynth-libs
vazirmatn-vf-fonts
vconfig
vdpauinfo
vim-minimal
vim-powerline
virt-what
virtualbox-guest-additions
vlc
vlc-cli
vlc-plugin-gstreamer
vorbis-tools
vte291-gtk4
w3m
w3m-img
wayland-devel
weston
wget2-wget
which
whipper
whois
wine-core
wine-filesystem
wireless-tools
wireplumber
words
workrave
wpa_supplicant
wvdial
xawtv
xclip
xdg-desktop-portal
xdg-desktop-portal-gnome
xdg-desktop-portal-gtk
xdg-user-dirs-gtk
xdpyinfo
xed
xev
xfburn
xfsprogs
xlsatoms
xlsclients
xlsfonts
xorg-x11-drv-amdgpu
xorg-x11-drv-ati
xorg-x11-drv-evdev
xorg-x11-drv-intel
xorg-x11-drv-libinput
xorg-x11-drv-nouveau
xorg-x11-drv-nvidia
xorg-x11-drv-nvidia-libs
xorg-x11-drv-openchrome
xorg-x11-drv-qxl
xorg-x11-drv-vmware
xorg-x11-drv-wacom
xorg-x11-server-Xorg
xorg-x11-xauth
xorg-x11-xinit
xprop
xreader
xvinfo
xwaylandvideobridge
xwininfo
xxhash-libs
yarn
yelp
youtube-dl
yt-dlp
zd1211-firmware
zip
zix
zoxide
zram-generator
zram-generator-defaults

I had chatgpt group it up

I’m in love with specialisations. Specialisation - NixOS Wiki

I’m not a gamer. I am sometimes but I’m more than happy to play on a PS5 or a Steam deck. Sometimes something comes up and I want to play on PC with decent graphics and games.

I only have one general x86 computer (not counting the deck) at home which happens to be my MS-01 home server. It has a 9060XT attached to it through USB4 but setting virtual machines with thunderbolt passthrough seem to be more problem than its worth. Dual boot is a big no since all NVMEs are part of the same raidz and I don’t want to maintain 2 OSs.

With specialisation I’ve setup a thunderbolt attached 9060 XT into the machine and using bootctl set-oneshot I boot into a version with the intel gpu disabled and sunshine running on it. Its still my same server but now its roleplaying as a remote gaming PC until I reboot it again. And it’s all controlled from my flake.nix. Plus all normal server services are still running.

So it’s less like playing MMO and more like when playing MMO and your character can respec when you need or want it. I love it. Now if I could power on the Thunderbolt enclosure automatically it would be great.

1 Like

How did the nixos wiki entry compare to the one of wiki.nixos.org?
Specialisation - NixOS Wiki

So if I read the entry and your setup correctly, you can effectively share your GPU in a external Thunderbolt enclosure between two systems and have the is hand off seamlessly? You should share your setup with @wendell.

No. It’s the same system with multiple profiles.

Imagine dual boot as having a main and alt character. Specialisations is more like a single character that can switch to multiple specs.

1 Like

Gotcha, now how is the hardware setup?