diff options
| author | adikro <adikro@disroot.org> | 2026-01-19 11:43:42 +0100 |
|---|---|---|
| committer | adikro <adikro@disroot.org> | 2026-01-19 11:43:42 +0100 |
| commit | d2571482b4eb5660fd92727efb4e5254df06e45e (patch) | |
| tree | b94282d6f250a82587c25689cba8a1dc1a2f2d96 /os | |
| parent | 760a0edc2937fab375898bbd2f2a3011eb8c9756 (diff) | |
a lot of changes
Diffstat (limited to 'os')
| -rw-r--r-- | os/core/drivers.nix | 75 | ||||
| -rw-r--r-- | os/core/home-manager.nix | 26 | ||||
| -rw-r--r-- | os/core/networking.nix | 3 | ||||
| -rw-r--r-- | os/srv/gaming.nix | 17 | ||||
| -rw-r--r-- | os/srv/kdeconnect.nix | 19 | ||||
| -rw-r--r-- | os/srv/srv.nix | 1 | ||||
| -rw-r--r-- | os/wm/niri.nix | 13 | ||||
| -rw-r--r-- | os/wm/wm.nix | 25 |
8 files changed, 125 insertions, 54 deletions
diff --git a/os/core/drivers.nix b/os/core/drivers.nix index 3bb2291..b674c9a 100644 --- a/os/core/drivers.nix +++ b/os/core/drivers.nix @@ -1,4 +1,10 @@ -{ config, lib, pkgs, ... }: +{ + config, + lib, + pkgs, + inputs, + ... +}: let cfg = config.os.core.drivers; in @@ -7,41 +13,46 @@ in enable = lib.mkEnableOption "enables hardware drivers"; amdgpu.enable = lib.mkEnableOption "AMD specific drivers and microcode"; stability = lib.mkOption { - type = lib.types.enum [ "stable" "unstable" ]; + type = lib.types.enum [ + "stable" + "unstable" + ]; default = "stable"; }; }; - config = lib.mkIf cfg.enable (lib.mkMerge [ - { - programs.coolercontrol.enable = true; - services.lact.enable = true; - services.smartd.enable = true; - hardware.sensor.iio.enable = true; - hardware.enableAllFirmware = true; - hardware.cpu.amd.updateMicrocode = true; - hardware.graphics = { - enable = true; - enable32Bit = true; - extraPackages = with pkgs; [ - rocmPackages.clr.icd - ]; - }; - environment.systemPackages = [ pkgs.rivalcfg ]; - } + config = lib.mkIf cfg.enable ( + lib.mkMerge [ + { + programs.coolercontrol.enable = true; + services.lact.enable = true; + services.smartd.enable = true; + hardware.sensor.iio.enable = true; + hardware.enableAllFirmware = true; + hardware.cpu.amd.updateMicrocode = true; + hardware.graphics = { + enable = true; + enable32Bit = true; + extraPackages = with pkgs; [ + rocmPackages.clr.icd + ]; + }; + environment.systemPackages = [ pkgs.rivalcfg ]; + } - (lib.mkIf cfg.amdgpu.enable { - hardware.amdgpu = { - initrd.enable = true; - overdrive.enable = true; - }; - # boot.kernelParams = [ "amdgpu.gpu_recovery=1" ]; - }) + (lib.mkIf cfg.amdgpu.enable { + hardware.amdgpu = { + initrd.enable = true; + overdrive.enable = true; + }; + }) - (lib.mkIf (cfg.amdgpu.enable && cfg.stability == "unstable") { - }) + (lib.mkIf (cfg.amdgpu.enable && cfg.stability == "unstable") { + boot.kernelPackages = inputs.kernelv.legacyPackages.x86_64-linux.linuxPackages_6_17; + }) - (lib.mkIf (cfg.amdgpu.enable && cfg.stability == "stable") { - boot.kernelPackages = pkgs.linuxPackages_6_12; - }) - ]); + (lib.mkIf (cfg.amdgpu.enable && cfg.stability == "stable") { + boot.kernelPackages = pkgs.linuxPackages_latest; + }) + ] + ); } diff --git a/os/core/home-manager.nix b/os/core/home-manager.nix index 32b39b8..63f3dfd 100644 --- a/os/core/home-manager.nix +++ b/os/core/home-manager.nix @@ -1,4 +1,10 @@ -{ inputs, config, lib, username, ... }: +{ + inputs, + config, + lib, + username, + ... +}: let cfg = config.os.core.home-manager; in @@ -9,16 +15,18 @@ in enable = lib.mkEnableOption "home Manager configuration"; users = lib.mkOption { - default = {}; + default = { }; description = "Attribute set of users and their home-manager configurations"; - type = lib.types.attrsOf (lib.types.submodule { - options = { - path = lib.mkOption { - type = lib.types.path; - description = "Path to the user's home.nix file"; + type = lib.types.attrsOf ( + lib.types.submodule { + options = { + path = lib.mkOption { + type = lib.types.path; + description = "Path to the user's home.nix file"; + }; }; - }; - }); + } + ); }; }; config = lib.mkIf cfg.enable { diff --git a/os/core/networking.nix b/os/core/networking.nix index 32a5b47..bf611a3 100644 --- a/os/core/networking.nix +++ b/os/core/networking.nix @@ -13,7 +13,8 @@ in }; firewall = { enable = true; - allowedTCPPorts = [ 22 ]; + allowedTCPPorts = [ 7960 ]; + allowedUDPPorts = [ 7960 ]; }; }; systemd.services."NetworkManager-wait-online".enable = false; diff --git a/os/srv/gaming.nix b/os/srv/gaming.nix index 16ef9f1..9ae0efe 100644 --- a/os/srv/gaming.nix +++ b/os/srv/gaming.nix @@ -1,4 +1,10 @@ -{ config, lib, pkgs, username, ... }: +{ + config, + lib, + pkgs, + username, + ... +}: let cfg = config.os.srv.gaming; in @@ -10,7 +16,10 @@ in }; config = lib.mkMerge [ (lib.mkIf cfg.enable { - programs.gamescope.enable = true; + programs.gamescope = { + enable = true; + capSysNice = true; + }; programs.gamemode = { enable = true; @@ -23,8 +32,8 @@ in heroic clinfo (prismlauncher.override { - additionalLibs = with pkgs; [ - ocl-icd + additionalLibs = with pkgs; [ + ocl-icd ]; jdks = with pkgs; [ javaPackages.compiler.temurin-bin.jdk-25 ]; }) diff --git a/os/srv/kdeconnect.nix b/os/srv/kdeconnect.nix new file mode 100644 index 0000000..85bb23e --- /dev/null +++ b/os/srv/kdeconnect.nix @@ -0,0 +1,19 @@ +{ + config, + lib, + username, + ... +}: +let + cfg = config.os.srv.kdeconnect; +in +{ + options.os.srv.kdeconnect.enable = lib.mkEnableOption "enables kde connect"; + config = lib.mkIf cfg.enable { + programs.kdeconnect.enable = true; + home-manager.users.${username}.services.kdeconnect = { + enable = true; + indicator = true; + }; + }; +} diff --git a/os/srv/srv.nix b/os/srv/srv.nix index f9280ab..d4b3eef 100644 --- a/os/srv/srv.nix +++ b/os/srv/srv.nix @@ -9,6 +9,7 @@ ./kvm.nix ./nix-helper.nix ./ollama.nix + ./kdeconnect.nix ./zzz.nix ]; } diff --git a/os/wm/niri.nix b/os/wm/niri.nix index 248ab9e..58d27af 100644 --- a/os/wm/niri.nix +++ b/os/wm/niri.nix @@ -1,4 +1,11 @@ -{ inputs, config, lib, username, ... }: +{ + inputs, + config, + lib, + username, + pkgs, + ... +}: let cfg = config.os.wm.niri; in @@ -8,11 +15,11 @@ in options.os.wm.niri.enable = lib.mkEnableOption "Niri"; config = lib.mkIf cfg.enable { - # nixpkgs.overlays = [ inputs.niri.overlays.niri ]; + nixpkgs.overlays = [ inputs.niri.overlays.niri ]; programs.niri = { enable = true; - # package = pkgs.niri-unstable; + package = pkgs.niri-unstable; }; os.srv.compat.enable = true; diff --git a/os/wm/wm.nix b/os/wm/wm.nix index 3d72103..a9046bb 100644 --- a/os/wm/wm.nix +++ b/os/wm/wm.nix @@ -1,4 +1,9 @@ -{ config, lib, pkgs, ... }: +{ + config, + lib, + pkgs, + ... +}: let cfg = config.os.wm; in @@ -8,16 +13,26 @@ in ]; options.os.wm.enable = lib.mkEnableOption "enables shared wm features"; + config = lib.mkIf cfg.enable { services.dbus.enable = true; xdg.portal = { enable = true; xdgOpenUsePortal = true; - extraPortals = [ pkgs.xdg-desktop-portal-gtk ]; - config.common = { - "org.freedesktop.impl.portal.ScreenCast" = "gnome"; - "default" = [ "gtk" ]; + + extraPortals = [ + pkgs.xdg-desktop-portal-gnome + pkgs.xdg-desktop-portal-gtk + ]; + + config = { + common.default = [ "gtk" ]; + niri = { + "org.freedesktop.impl.portal.ScreenCast" = [ "gnome" ]; + "org.freedesktop.impl.portal.Screenshot" = [ "gnome" ]; + "default" = [ "gtk" ]; + }; }; }; }; |
