From 41acda91f4a1b3a7debe601e521f1fc2aec86ba6 Mon Sep 17 00:00:00 2001 From: Chris Kruining Date: Wed, 30 Jul 2025 22:58:39 +0200 Subject: [PATCH] I ffing give up for today... --- homes/x86_64-linux/chris@manwe/default.nix | 2 +- modules/home/application/obs/default.nix | 2 - modules/home/application/steam/default.nix | 26 ++++----- .../home/application/thunderbird/default.nix | 10 ++-- modules/home/application/zen/default.nix | 4 +- modules/home/default.nix | 2 +- modules/home/editor/nano/default.nix | 32 +++++------ modules/home/editor/nvim/default.nix | 37 ++++++------- modules/home/editor/zed/default.nix | 4 +- modules/home/shell/default.nix | 3 +- modules/home/shell/toolset/fzf/default.nix | 5 +- modules/home/terminal/ghostty/default.nix | 2 +- modules/nixos/application/steam/default.nix | 55 +++++++++++++++++++ .../application/studio/default.nix | 4 +- .../nixos/application/thunderbird/default.nix | 17 ++++++ modules/nixos/editor/nano/default.nix | 28 ++++++++++ modules/nixos/hardware/gpu/nvidia/default.nix | 49 +++++++++++++++++ systems/x86_64-linux/mandos/default.nix | 8 +++ systems/x86_64-linux/manwe/default.nix | 10 ++++ systems/x86_64-linux/orome/default.nix | 12 +++- systems/x86_64-linux/tulkas/default.nix | 8 +++ systems/x86_64-linux/ulmo/default.nix | 8 ++- 22 files changed, 253 insertions(+), 75 deletions(-) create mode 100644 modules/nixos/application/steam/default.nix rename modules/{home => nixos}/application/studio/default.nix (71%) create mode 100644 modules/nixos/application/thunderbird/default.nix create mode 100644 modules/nixos/editor/nano/default.nix create mode 100644 modules/nixos/hardware/gpu/nvidia/default.nix diff --git a/homes/x86_64-linux/chris@manwe/default.nix b/homes/x86_64-linux/chris@manwe/default.nix index cd6fa1a..5f9e1bf 100644 --- a/homes/x86_64-linux/chris@manwe/default.nix +++ b/homes/x86_64-linux/chris@manwe/default.nix @@ -39,7 +39,7 @@ onlyoffice.enable = true; signal.enable = true; steam.enable = true; - studio.enable = true; + # studio.enable = true; teamspeak.enable = true; thunderbird.enable = true; zen.enable = true; diff --git a/modules/home/application/obs/default.nix b/modules/home/application/obs/default.nix index fe84f1c..a2be203 100644 --- a/modules/home/application/obs/default.nix +++ b/modules/home/application/obs/default.nix @@ -26,7 +26,5 @@ in # options v4l2loopback devices=1 video_nr=1 card_label="OBS Cam" exclusive_caps=1 # ''; # }; - - security.polkit.enable = true; }; } diff --git a/modules/home/application/steam/default.nix b/modules/home/application/steam/default.nix index 7bc338d..4e62c41 100644 --- a/modules/home/application/steam/default.nix +++ b/modules/home/application/steam/default.nix @@ -17,20 +17,20 @@ in }; programs = { - steam = { - enable = true; - package = pkgs.steam-small.override { - extraEnv = { - DXVK_HUD = "compiler"; - MANGOHUD = true; - }; - }; + # steam = { + # enable = true; + # package = pkgs.steam-small.override { + # extraEnv = { + # DXVK_HUD = "compiler"; + # MANGOHUD = true; + # }; + # }; - gamescopeSession = { - enable = true; - args = ["--immediate-flips"]; - }; - }; + # gamescopeSession = { + # enable = true; + # args = ["--immediate-flips"]; + # }; + # }; # https://github.com/FeralInteractive/gamemode # gamemode = { diff --git a/modules/home/application/thunderbird/default.nix b/modules/home/application/thunderbird/default.nix index caffe2a..ef38a21 100644 --- a/modules/home/application/thunderbird/default.nix +++ b/modules/home/application/thunderbird/default.nix @@ -10,12 +10,12 @@ in }; config = mkIf cfg.enable { - home.packages = with pkgs; [ thunderbird ]; + # home.packages = with pkgs; [ thunderbird ]; + + # programs.thunderbird = { + # enable = true; + # }; - programs.thunderbird = { - enable = true; - }; - accounts.email.accounts = { kruining = { primary = true; diff --git a/modules/home/application/zen/default.nix b/modules/home/application/zen/default.nix index e07c29d..4723cc3 100644 --- a/modules/home/application/zen/default.nix +++ b/modules/home/application/zen/default.nix @@ -10,9 +10,9 @@ in }; config = mkIf cfg.enable { - home.packages = with inputs.zen.packages.${pkgs.system}.specific; [ zen ]; + home.packages = [ inputs.zen-browser.packages.${pkgs.system}.specific ]; - sessionVariables = { + home.sessionVariables = { MOZ_ENABLE_WAYLAND = "1"; }; }; diff --git a/modules/home/default.nix b/modules/home/default.nix index bd59116..e3185e0 100644 --- a/modules/home/default.nix +++ b/modules/home/default.nix @@ -42,6 +42,6 @@ in { BROWSER = cfg.browser; }; - shell = pkgs.${cfg.shell}; + # home.shell = pkgs.${cfg.shell}; }; } diff --git a/modules/home/editor/nano/default.nix b/modules/home/editor/nano/default.nix index 13eb800..870db8e 100644 --- a/modules/home/editor/nano/default.nix +++ b/modules/home/editor/nano/default.nix @@ -2,29 +2,29 @@ let inherit (lib) mkEnableOption mkIf; - cfg = config.${namespace}.editors.nano; + cfg = config.${namespace}.editor.nano; in { - options.${namespace}.editors.nano = { + options.${namespace}.editor.nano = { enable = mkEnableOption "nano"; }; config = mkIf cfg.enable { home.packages = with pkgs; [ nano ]; - programs.nano = { - enable = true; - syntaxHighlight = true; - nanorc = '' - set autoindent - set jumpyscrolling - set linenumbers - set mouse - set saveonexit - set smarthome - set tabstospaces - set tabsize 2 - ''; - }; + # programs.nano = { + # enable = true; + # syntaxHighlight = true; + # nanorc = '' + # set autoindent + # set jumpyscrolling + # set linenumbers + # set mouse + # set saveonexit + # set smarthome + # set tabstospaces + # set tabsize 2 + # ''; + # }; }; } diff --git a/modules/home/editor/nvim/default.nix b/modules/home/editor/nvim/default.nix index a3fd32a..162772f 100644 --- a/modules/home/editor/nvim/default.nix +++ b/modules/home/editor/nvim/default.nix @@ -5,9 +5,9 @@ let cfg = config.${namespace}.editor.nvim; in { - imports = [ - inputs.nvf.nixosModules.default - ]; + # imports = [ + # inputs.nvf.nixosModules.default + # ]; options.${namespace}.editor.nvim = { enable = mkEnableOption "enable nvim via nvf on user level"; @@ -18,30 +18,29 @@ in imagemagick editorconfig-core-c sqlite - deno pandoc nuspell hunspellDicts.nl_NL hunspellDicts.en_GB-ise ]; - programs.nvf = { - enable = true; - settings.vim = { - statusline.lualine.enable = true; - telescope.enable = true; - autocomplete.nvim-cmp.enable = true; + # programs.nvf = { + # enable = true; + # settings.vim = { + # statusline.lualine.enable = true; + # telescope.enable = true; + # autocomplete.nvim-cmp.enable = true; - lsp.enable = true; + # lsp.enable = true; - languages = { - enableTreesitter = true; + # languages = { + # enableTreesitter = true; - nix.enable = true; - ts.enable = true; - rust.enable = true; - }; - }; - }; + # nix.enable = true; + # ts.enable = true; + # rust.enable = true; + # }; + # }; + # }; }; } diff --git a/modules/home/editor/zed/default.nix b/modules/home/editor/zed/default.nix index 94e63d3..b35acba 100644 --- a/modules/home/editor/zed/default.nix +++ b/modules/home/editor/zed/default.nix @@ -1,9 +1,9 @@ { config, lib, pkgs, namespace, ... }: let inherit (lib) mkIf mkEnableOption; - cfg = config.${namespace}.editors.zed; + cfg = config.${namespace}.editor.zed; in { - options.${namespace}.editors.zed = { + options.${namespace}.editor.zed = { enable = mkEnableOption "zed"; }; diff --git a/modules/home/shell/default.nix b/modules/home/shell/default.nix index 2fbd8e8..d1df4cb 100644 --- a/modules/home/shell/default.nix +++ b/modules/home/shell/default.nix @@ -1,7 +1,6 @@ { config, lib, pkgs, namespace, ... }: let - inherit (lib) attrValues mkIf mkMerge mkOption mkEnableOption mkDefault; - inherit (lib.types) nullOr enum; + inherit (lib) mkIf mkMerge mkEnableOption mkDefault; cfg = config.${namespace}.shell; in diff --git a/modules/home/shell/toolset/fzf/default.nix b/modules/home/shell/toolset/fzf/default.nix index 1536083..e2f0313 100644 --- a/modules/home/shell/toolset/fzf/default.nix +++ b/modules/home/shell/toolset/fzf/default.nix @@ -3,7 +3,6 @@ let inherit (lib) mkIf mkEnableOption; cfg = config.${namespace}.shell.toolset.fzf; - defShell = config.${namespace}.shell.default; in { options.${namespace}.shell.toolset.fzf = { @@ -16,8 +15,8 @@ in programs.fzf = { enable = true; enableBashIntegration = true; - enableZshIntegration = defShell == "zsh"; - enableFishIntegration = defShell == "fish"; + enableZshIntegration = true; + enableFishIntegration = true; tmux.enableShellIntegration = true; tmux.shellIntegrationOptions = ["-d 40%"]; diff --git a/modules/home/terminal/ghostty/default.nix b/modules/home/terminal/ghostty/default.nix index ddb6dd0..00d925c 100644 --- a/modules/home/terminal/ghostty/default.nix +++ b/modules/home/terminal/ghostty/default.nix @@ -10,7 +10,7 @@ in }; config = mkIf cfg.enable { - rograms.ghostty = { + programs.ghostty = { enable = true; settings = { background-blur-radius = 20; diff --git a/modules/nixos/application/steam/default.nix b/modules/nixos/application/steam/default.nix new file mode 100644 index 0000000..0bde133 --- /dev/null +++ b/modules/nixos/application/steam/default.nix @@ -0,0 +1,55 @@ +{ inputs, config, lib, pkgs, namespace, ... }: +let + inherit (lib) mkIf mkEnableOption; + + cfg = config.${namespace}.application.steam; +in +{ + options.${namespace}.application.steam = { + enable = mkEnableOption "enable steam"; + }; + + config = mkIf cfg.enable { + # home.packages = with pkgs; [ protonup ]; + + # home.sessionVariables = { + # STEAM_EXTRA_COMPAT_TOOLS_PATHS = "\${HOME}/.steam/root/compatibilitytools.d"; + # }; + + programs = { + steam = { + enable = true; + package = pkgs.steam-small.override { + extraEnv = { + DXVK_HUD = "compiler"; + MANGOHUD = true; + }; + }; + + gamescopeSession = { + enable = true; + args = ["--immediate-flips"]; + }; + }; + + # https://github.com/FeralInteractive/gamemode + gamemode = { + enable = true; + enableRenice = true; + settings = {}; + }; + + # gamescope = { + # enable = true; + # capSysNice = true; + # env = { + # DXVK_HDR = "1"; + # ENABLE_GAMESCOPE_WSI = "1"; + # WINE_FULLSCREEN_FSR = "1"; + # WLR_RENDERER = "vulkan"; + # }; + # args = ["--hdr-enabled"]; + # }; + }; + }; +} diff --git a/modules/home/application/studio/default.nix b/modules/nixos/application/studio/default.nix similarity index 71% rename from modules/home/application/studio/default.nix rename to modules/nixos/application/studio/default.nix index f515b77..94b07fd 100644 --- a/modules/home/application/studio/default.nix +++ b/modules/nixos/application/studio/default.nix @@ -1,4 +1,4 @@ -{ inputs, config, lib, pkgs, namespace, ... }: +{ config, lib, pkgs, namespace, ... }: let inherit (lib) mkIf mkEnableOption; @@ -10,6 +10,6 @@ in }; config = mkIf cfg.enable { - home.packages = with pkgs; [ studio ]; + environment.systemPackages = with pkgs; [ studio ]; }; } diff --git a/modules/nixos/application/thunderbird/default.nix b/modules/nixos/application/thunderbird/default.nix new file mode 100644 index 0000000..09856ef --- /dev/null +++ b/modules/nixos/application/thunderbird/default.nix @@ -0,0 +1,17 @@ +{ config, lib, namespace, ... }: +let + inherit (lib) mkIf mkEnableOption; + + cfg = config.${namespace}.application.thunderbird; +in +{ + options.${namespace}.application.thunderbird = { + enable = mkEnableOption "enable thunderbird"; + }; + + config = mkIf cfg.enable { + programs.thunderbird = { + enable = true; + }; + }; +} diff --git a/modules/nixos/editor/nano/default.nix b/modules/nixos/editor/nano/default.nix new file mode 100644 index 0000000..1cb7ff1 --- /dev/null +++ b/modules/nixos/editor/nano/default.nix @@ -0,0 +1,28 @@ +{ config, options, lib, pkgs, namespace, ... }: +let + inherit (lib) mkEnableOption mkIf; + + cfg = config.${namespace}.editor.nano; +in +{ + options.${namespace}.editor.nano = { + enable = mkEnableOption "nano"; + }; + + config = mkIf cfg.enable { + programs.nano = { + enable = true; + syntaxHighlight = true; + nanorc = '' + set autoindent + set jumpyscrolling + set linenumbers + set mouse + set saveonexit + set smarthome + set tabstospaces + set tabsize 2 + ''; + }; + }; +} diff --git a/modules/nixos/hardware/gpu/nvidia/default.nix b/modules/nixos/hardware/gpu/nvidia/default.nix new file mode 100644 index 0000000..ab7c087 --- /dev/null +++ b/modules/nixos/hardware/gpu/nvidia/default.nix @@ -0,0 +1,49 @@ +{ pkgs, lib, namespace, config, ... }: +let + inherit (lib) mkIf mkEnableOption; + + cfg = config.${namespace}.hardware.has.gpu; +in +{ + options.${namespace}.hardware.has.gpu.nvidia = mkEnableOption "Enable NVidia gpu configuration"; + + config = mkIf cfg.nvidia { + services.xserver.videoDrivers = [ "nvidia" ]; + + hardware = { + graphics = { + enable = true; + enable32Bit = true; + }; + + nvidia = { + modesetting.enable = true; + open = false; + nvidiaSettings = true; + + powerManagement = { + enable = true; + finegrained = false; + }; + + # package = config.boot.kernelPackages.nvidiaPackages.vulkan_beta; + + # package = let + # rcu_patch = pkgs.fetchpatch { + # url = "https://github.com/gentoo/gentoo/raw/c64caf53/x11-drivers/nvidia-drivers/files/nvidia-drivers-470.223.02-gpl-pfn_valid.patch"; + # hash = "sha256-eZiQQp2S/asE7MfGvfe6dA/kdCvek9SYa/FFGp24dVg="; + # }; + # in config.boot.kernelPackages.nvidiaPackages.mkDriver { + # version = "550.40.07"; + # sha256_64bit = "sha256-KYk2xye37v7ZW7h+uNJM/u8fNf7KyGTZjiaU03dJpK0="; + # sha256_aarch64 = "sha256-AV7KgRXYaQGBFl7zuRcfnTGr8rS5n13nGUIe3mJTXb4="; + # openSha256 = "sha256-mRUTEWVsbjq+psVe+kAT6MjyZuLkG2yRDxCMvDJRL1I="; + # settingsSha256 = "sha256-c30AQa4g4a1EHmaEu1yc05oqY01y+IusbBuq+P6rMCs="; + # persistencedSha256 = "sha256-11tLSY8uUIl4X/roNnxf5yS2PQvHvoNjnd2CB67e870="; + + # patches = [ rcu_patch ]; + # }; + }; + }; + }; +} diff --git a/systems/x86_64-linux/mandos/default.nix b/systems/x86_64-linux/mandos/default.nix index a8a0a76..b1605f8 100644 --- a/systems/x86_64-linux/mandos/default.nix +++ b/systems/x86_64-linux/mandos/default.nix @@ -17,6 +17,14 @@ }; desktop.use = "gamescope"; + + application = { + steam.enable = true; + }; + + editor = { + nano.enable = true; + }; }; system.stateVersion = "23.11"; diff --git a/systems/x86_64-linux/manwe/default.nix b/systems/x86_64-linux/manwe/default.nix index cb01d21..18c18a9 100644 --- a/systems/x86_64-linux/manwe/default.nix +++ b/systems/x86_64-linux/manwe/default.nix @@ -18,6 +18,16 @@ }; desktop.use = "plasma"; + + application = { + steam.enable = true; + thunderbird.enable = true; + studio.enable = true; + }; + + editor = { + nano.enable = true; + }; }; system.stateVersion = "23.11"; diff --git a/systems/x86_64-linux/orome/default.nix b/systems/x86_64-linux/orome/default.nix index 34210ac..48e049b 100644 --- a/systems/x86_64-linux/orome/default.nix +++ b/systems/x86_64-linux/orome/default.nix @@ -1,6 +1,4 @@ { ... }: -let -in { imports = [ ./disks.nix @@ -12,7 +10,15 @@ in bluetooth = true; audio = true; }; + + application = { + steam.enable = true; + }; + + editor = { + nano.enable = true; + }; }; system.stateVersion = "23.11"; -} \ No newline at end of file +} diff --git a/systems/x86_64-linux/tulkas/default.nix b/systems/x86_64-linux/tulkas/default.nix index 66960ce..40d1673 100644 --- a/systems/x86_64-linux/tulkas/default.nix +++ b/systems/x86_64-linux/tulkas/default.nix @@ -18,6 +18,14 @@ }; desktop.use = "gamescope"; + + application = { + steam.enable = true; + }; + + editor = { + nano.enable = true; + }; }; system.stateVersion = "23.11"; diff --git a/systems/x86_64-linux/ulmo/default.nix b/systems/x86_64-linux/ulmo/default.nix index 26df5e1..7a2540f 100644 --- a/systems/x86_64-linux/ulmo/default.nix +++ b/systems/x86_64-linux/ulmo/default.nix @@ -1,6 +1,4 @@ { ... }: -let -in { imports = [ ./disks.nix @@ -12,7 +10,11 @@ in networking.ssh.enable = true; media.enable = true; }; + + editor = { + nano.enable = true; + }; }; system.stateVersion = "23.11"; -} \ No newline at end of file +}