From 36c5da7e589f794bef4b508e17cfcd107293afa7 Mon Sep 17 00:00:00 2001
From: Thilo Billerbeck <thilo.billerbeck@officerent.de>
Date: Tue, 18 Mar 2025 19:52:41 +0100
Subject: [PATCH] several improvements to nixos config

---
 configs/thilo-pc/home.nix  | 24 +++++++++++++++++++++++
 configs/thilo-pc/nixos.nix | 39 +++++++++-----------------------------
 flake.nix                  |  7 ++-----
 nixos/common.nix           |  1 +
 4 files changed, 36 insertions(+), 35 deletions(-)

diff --git a/configs/thilo-pc/home.nix b/configs/thilo-pc/home.nix
index 2eaea42..e1c0a12 100644
--- a/configs/thilo-pc/home.nix
+++ b/configs/thilo-pc/home.nix
@@ -13,6 +13,11 @@
     extraSpecialArgs = {
       inherit inputs;
     };
+
+    sharedModules = [
+      inputs.distrobox4nix.homeManagerModule
+    ];
+
     users.thilo = {
       imports = [ ./../../home-manager/modules/machine.nix ];
 
@@ -42,6 +47,25 @@
       home.packages = with pkgs; [
         lix
       ];
+
+      programs.distrobox = {
+        enable = true;
+        containers = {
+          arch = {
+            image = "arch-toolbox";
+            additional_packages = "python python-pip nodejs";
+            volume = "/etc/static/profiles/per-user:/etc/profiles/per-user:ro";
+            replace = true;
+          };
+          fedora = {
+            image = "quay.io/fedora/fedora-toolbox:41";
+            additional_packages = "python python-pip code";
+            home = "/home/thilo/.distrobox/fedora";
+            pre_init_hooks = ''rpm --import https://packages.microsoft.com/keys/microsoft.asc && echo -e "[code]\nname=Visual Studio Code\nbaseurl=https://packages.microsoft.com/yumrepos/vscode\nenabled=1\nautorefresh=1\ntype=rpm-md\ngpgcheck=1\ngpgkey=https://packages.microsoft.com/keys/microsoft.asc" | sudo tee /etc/yum.repos.d/vscode.repo > /dev/null'';
+            replace = true;
+          };
+        };
+      };
     };
   };
 }
diff --git a/configs/thilo-pc/nixos.nix b/configs/thilo-pc/nixos.nix
index 0bc6a6a..eb76819 100644
--- a/configs/thilo-pc/nixos.nix
+++ b/configs/thilo-pc/nixos.nix
@@ -1,7 +1,7 @@
 # Edit this configuration file to define what should be installed on
 # your system.  Help is available in the configuration.nix(5) man page
 # and in the NixOS manual (accessible by running ‘nixos-help’).
-{ pkgs, options, ... }:
+{ pkgs, inputs, ... }:
 
 {
   imports = [
@@ -9,6 +9,7 @@
     ./hardware-configuration.nix
     ./../../nixos/common.nix
     ./../../nixos/builders.nix
+    inputs.jovian-nixos.nixosModules.jovian
   ];
 
   # Bootloader.
@@ -43,14 +44,7 @@
       layout = "us";
       variant = "";
     };
-    # AI
-    # ollama = {
-    #   enable = true;
-    #   acceleration = "rocm";
-    # };
-    # open-webui = {
-    #   enable = true;
-    # };
+    envfs.enable = true;
   };
 
   programs.kdeconnect.enable = true;
@@ -167,32 +161,17 @@
   hardware.bluetooth.enable = true;
   hardware.bluetooth.powerOnBoot = true;
 
-  programs.steam.gamescopeSession = {
-    enable = false;
-    env = {
-      WLR_RENDERER = "vulkan";
-      DXVK_HDR = "1";
-      STEAM_GAMESCOPE_VRR_SUPPORTED = "1";
-      SDL_VIDEO_MINIMIZE_ON_FOCUS_LOSS = "0";
-      ENABLE_GAMESCOPE_WSI = "1";
-      WINE_FULLSCREEN_FSR = "1";
+  jovian = {
+    steam = {
+      enable = true;
+      user = "thilo";
     };
-    args = [
-      "-f"
-      "-F fsr"
-      "--rt"
-      "--adaptive-sync"
-      "-w 1920"
-      "-h 1080"
-      "-r 120"
-      "--hdr-enabled"
-      "--hdr-itm-enable"
-      "-O DP-3"
-    ];
   };
 
   programs.gamescope.enable = true;
 
+  networking.firewall.enable = false;
+
   system.stateVersion = "24.11";
 
   environment.systemPackages = with pkgs; [
diff --git a/flake.nix b/flake.nix
index 5a13390..88b5367 100644
--- a/flake.nix
+++ b/flake.nix
@@ -18,12 +18,9 @@
       url = "github:guibou/nixGL";
       inputs.nixpkgs.follows = "nixpkgs";
     };
-    muse-sounds-manager = {
-      url = "github:thilobillerbeck/muse-sounds-manager-nix";
-      inputs.nixpkgs.follows = "nixpkgs";
-    };
-    suyu.url = "github:Noodlez1232/suyu-flake";
     nix-alien.url = "github:thiagokokada/nix-alien";
+    jovian-nixos.url = "github:Jovian-Experiments/Jovian-NixOS/development";
+    distrobox4nix.url = "github:aguirre-matteo/distrobox4nix";
   };
 
   nixConfig = {
diff --git a/nixos/common.nix b/nixos/common.nix
index 0055cac..acac05d 100644
--- a/nixos/common.nix
+++ b/nixos/common.nix
@@ -111,6 +111,7 @@ in
     };
     tailscale = {
       enable = true;
+      useRoutingFeatures = "both";
     };
     flatpak.enable = true;
     avahi = {