diff --git a/README.md b/README.md index e1c0ac8..84bd067 100644 --- a/README.md +++ b/README.md @@ -12,11 +12,13 @@ GNU GPL3 This configuration was only made possible through the help of some amazing people! Below are all the repositories I took inspiration from, check them out! -[jacekpoz](https://git.jacekpoz.pl/jacekpoz/niksos.git) -[dragyx](https://github.com/dragyx/nichts) -[sioodmy](https://github.com/sioodmy/dotfiles) -[Henrik Lissner](https://github.com/hlissner/dotfiles) -[diniamo](https://github.com/diniamo/niqs) [fufexan](https://github.com/fufexan) -[lokasku](https://github.com/lokasku/nix-config) -[NotAShelf](https://github.com/notashelf/nyx) -[viperML](https://github.com/viperml/dotfiles) +- [jacekpoz](https://git.jacekpoz.pl/jacekpoz/niksos.git) +- [dragyx](https://github.com/dragyx/nichts) +- [sioodmy](https://github.com/sioodmy/dotfiles) +- [Henrik Lissner](https://github.com/hlissner/dotfiles) +- [diniamo](https://github.com/diniamo/niqs) +- [fufexan](https://github.com/fufexan) +- [lokasku](https://github.com/lokasku/nix-config) +- [NotAShelf](https://github.com/notashelf/nyx) +- [viperML](https://github.com/viperml/dotfiles) +- [atagen](https://git.atagen.co/atagen/nix) diff --git a/hosts/hermit/configuration.nix b/hosts/hermit/configuration.nix index 7a512ae..e6582de 100644 --- a/hosts/hermit/configuration.nix +++ b/hosts/hermit/configuration.nix @@ -10,10 +10,8 @@ i18n.defaultLocale = "en_US.UTF-8"; console.keyMap = "uk"; boot.kernelPackages = pkgs.linuxPackages_xanmod_latest; - services = { - fstrim.enable = lib.mkDefault true; - thermald.enable = true; - }; + services.fstrim.enable = lib.mkDefault true; + programs = { nix-ld.enable = false; gnupg.agent = { @@ -22,6 +20,12 @@ }; }; + meta.system = { + isWorkstation = true; + isGraphical = true; + isLaptop = true; + }; + modules = { wms.wayland.enable = true; # desktops.niri.enable = true; @@ -39,7 +43,6 @@ systemd-boot.enable = true; lanzaboote.enable = true; }; - impermanence.enable = false; services = { owncloud.enable = true; }; @@ -52,9 +55,7 @@ }; }; programs = { - editors = { - helix.enable = true; - }; + editors.helix.enable = true; steam.enable = true; }; sound.enable = true; @@ -65,14 +66,12 @@ uwsm.enable = false; greetd.enable = false; cups.enable = true; + media.mpd.enable = true; - media.mpd = { - enable = true; - }; - }; - other = { - system.username = "cr"; }; + + other.system.username = "cr"; + programs = { ssh.enable = true; nh.enable = true; diff --git a/hosts/hermit/hardware-configuration.nix b/hosts/hermit/hardware-configuration.nix index e9442b8..01d9cc1 100644 --- a/hosts/hermit/hardware-configuration.nix +++ b/hosts/hermit/hardware-configuration.nix @@ -40,19 +40,20 @@ ''; }; - services.udev.extraRules = '' - # Remove NVIDIA USB xHCI Host Controller devices, if present - ACTION=="add", SUBSYSTEM=="pci", ATTR{vendor}=="0x10de", ATTR{class}=="0x0c0330", ATTR{power/control}="auto", ATTR{remove}="1" + # Not setting these udev rules seems to improve Zed's performance by a bit. + # services.udev.extraRules = '' + # # Remove NVIDIA USB xHCI Host Controller devices, if present + # ACTION=="add", SUBSYSTEM=="pci", ATTR{vendor}=="0x10de", ATTR{class}=="0x0c0330", ATTR{power/control}="auto", ATTR{remove}="1" - # Remove NVIDIA USB Type-C UCSI devices, if present - ACTION=="add", SUBSYSTEM=="pci", ATTR{vendor}=="0x10de", ATTR{class}=="0x0c8000", ATTR{power/control}="auto", ATTR{remove}="1" + # # Remove NVIDIA USB Type-C UCSI devices, if present + # ACTION=="add", SUBSYSTEM=="pci", ATTR{vendor}=="0x10de", ATTR{class}=="0x0c8000", ATTR{power/control}="auto", ATTR{remove}="1" - # Remove NVIDIA Audio devices, if present - ACTION=="add", SUBSYSTEM=="pci", ATTR{vendor}=="0x10de", ATTR{class}=="0x040300", ATTR{power/control}="auto", ATTR{remove}="1" + # # Remove NVIDIA Audio devices, if present + # ACTION=="add", SUBSYSTEM=="pci", ATTR{vendor}=="0x10de", ATTR{class}=="0x040300", ATTR{power/control}="auto", ATTR{remove}="1" - # Remove NVIDIA VGA/3D controller devices - ACTION=="add", SUBSYSTEM=="pci", ATTR{vendor}=="0x10de", ATTR{class}=="0x03[0-9]*", ATTR{power/control}="auto", ATTR{remove}="1" - ''; + # # Remove NVIDIA VGA/3D controller devices + # ACTION=="add", SUBSYSTEM=="pci", ATTR{vendor}=="0x10de", ATTR{class}=="0x03[0-9]*", ATTR{power/control}="auto", ATTR{remove}="1" + # ''; # swapDevices = # [ { device = "/dev/disk/by-uuid/3518272e-1051-41e2-a7f0-f5c744e46789"; } diff --git a/hosts/hermit/programs.nix b/hosts/hermit/programs.nix index 7b3e61c..268228f 100644 --- a/hosts/hermit/programs.nix +++ b/hosts/hermit/programs.nix @@ -9,7 +9,6 @@ anki asciinema bacon - brave cachix calc cargo-info diff --git a/modules/other/xdg.mod.nix b/modules/other/xdg.mod.nix index a08b632..d7d131e 100644 --- a/modules/other/xdg.mod.nix +++ b/modules/other/xdg.mod.nix @@ -6,13 +6,13 @@ let inherit (config.meta.mainUser) username; - primary_browser = "Librewolf.desktop"; + primary_browser = "zen-beta.desktop"; mail_client = "thunderbird.desktop"; file_manager = "nautilus.desktop"; media_player = "mpv.desktop"; image_viewer = "imv.desktop"; text_editor = "helix.desktop"; - terminal = "foot.desktop"; + terminal = "com.mitchellh.ghostty"; pdf_viewer = "zathura.desktop"; in { @@ -28,6 +28,14 @@ in autostart.enable = true; menus.enable = true; icons.enable = true; + terminal-exec = { + enable = true; + settings = { + default = [ + "com.mitchellh.ghostty.desktop" + ]; + }; + }; mime = { enable = true; defaultApplications = { diff --git a/modules/packages/packages.mod.nix b/modules/packages/packages.mod.nix index 5ccabc0..7b03fc6 100644 --- a/modules/packages/packages.mod.nix +++ b/modules/packages/packages.mod.nix @@ -108,6 +108,8 @@ in ty python3 comma + radicle-tui + radicle-node ] ++ [ nil diff --git a/modules/programs/cli/jj.mod.nix b/modules/programs/cli/jj.mod.nix index 4ec0a1c..1e04814 100644 --- a/modules/programs/cli/jj.mod.nix +++ b/modules/programs/cli/jj.mod.nix @@ -88,6 +88,7 @@ let }; ui = { default-command = "log"; + diff-editor = singleton ":builtin"; diff-formatter = [ "${getExe pkgs.difftastic}" "--color" diff --git a/modules/programs/gui/brave.mod.nix b/modules/programs/gui/brave.mod.nix index ebf9db9..e69cfe7 100644 --- a/modules/programs/gui/brave.mod.nix +++ b/modules/programs/gui/brave.mod.nix @@ -32,10 +32,10 @@ let in { environment.systemPackages = [ - brave-wrapped + # brave-wrapped ]; programs.chromium = { - enable = true; + enable = false; # This sets a bunch of flags to make Brave usable. # This was made possible through several similar projects, diff --git a/modules/programs/other/nix-index.mod.nix b/modules/programs/other/nix-index.mod.nix index 86c94b1..15bf72b 100644 --- a/modules/programs/other/nix-index.mod.nix +++ b/modules/programs/other/nix-index.mod.nix @@ -1,9 +1,8 @@ { programs = { - # We have to disable this and use nix-index instead. (Rust >>> Pearl) - command-not-found = { - enable = false; - }; + # We disable this and use nix-index instead. (Rust >>> Pearl) + command-not-found.enable = false; + nix-index = { enable = true; }; diff --git a/modules/style/qt.mod.nix b/modules/style/qt.mod.nix index 76769ed..ba4c93f 100644 --- a/modules/style/qt.mod.nix +++ b/modules/style/qt.mod.nix @@ -41,5 +41,11 @@ in enable = true; platformTheme = "qt5ct"; }; + environment.systemPackages = with pkgs; [ + qt6.qtwayland + kdePackages.breeze + kdePackages.breeze-icons + qt6.qtsvg # needed to load breeze icons + ]; }; } diff --git a/modules/system/hardware/graphics.mod.nix b/modules/system/hardware/graphics.mod.nix index 063e26e..797553a 100644 --- a/modules/system/hardware/graphics.mod.nix +++ b/modules/system/hardware/graphics.mod.nix @@ -8,6 +8,8 @@ let inherit (lib.modules) mkDefault mkIf; inherit (lib.options) mkEnableOption; + inherit (config.meta.system) isGraphical; + cfg = config.modules.system.hardware; in { @@ -17,11 +19,14 @@ in }; amd.enable = mkEnableOption "AMD graphics drivers"; }; - config = { + config = mkIf isGraphical { hardware = { graphics = { enable = true; - extraPackages = [ pkgs.nvidia-vaapi-driver ]; + extraPackages = [ + pkgs.nvidia-vaapi-driver + pkgs.intel-media-driver + ]; }; nvidia = mkIf cfg.nvidia.enable { @@ -30,13 +35,13 @@ in # Whether to enable kernel modesetting when using the NVIDIA proprietary driver. # Enabling this causes the proprietary NVIDIA driver to provide its own # framebuffer device, which can cause Wayland compositors to work when - # they otherwise wouldn’t. . + # they otherwise wouldn’t. modesetting.enable = true; # nvidia-settings is useless on NixOS. nvidiaSettings = false; - # fixes sleep on nvidia devices + # Fixes sleep on nvidia devices. powerManagement = { enable = true; finegrained = false; diff --git a/modules/wms/niri/config.nix b/modules/wms/niri/config.nix index 5bdc799..85748bc 100644 --- a/modules/wms/niri/config.nix +++ b/modules/wms/niri/config.nix @@ -6,7 +6,7 @@ leaf, flag, tagctl, - + zen-browser, }: let inherit (lib.meta) getExe getExe'; @@ -112,7 +112,6 @@ in ]) (leaf "background-color" "transparent") ]) - (leaf "spawn-at-startup" "waybar") (plain "environment" [ (leaf "DISPLAY" ":0") ]) @@ -224,23 +223,81 @@ in (plain "Mod+Shift+Slash" [ (flag "show-hotkey-overlay") ]) (plain "Mod+Return" [ (leaf "spawn" <| getExe pkgs.ghostty) ]) (plain "Mod+Shift+Return" [ - (leaf "spawn" [ - (getExe pkgs.bash) - "-c" + (leaf "spawn-sh" [ "${getExe pkgs.niri} msg action spawn -- ${getExe pkgs.ghostty}; sleep 0.2; ${getExe pkgs.niri} msg action consume-or-expel-window-left" ]) ]) - (plain "Mod+0" [ (leaf "spawn" [tagctl "toggle-tag" "0"]) ]) - (plain "Mod+1" [ (leaf "spawn" [tagctl "toggle-tag" "1"]) ]) - (plain "Mod+2" [ (leaf "spawn" [tagctl "toggle-tag" "2"]) ]) - (plain "Mod+3" [ (leaf "spawn" [tagctl "toggle-tag" "3"]) ]) - (plain "Mod+4" [ (leaf "spawn" [tagctl "toggle-tag" "4"]) ]) - (plain "Mod+5" [ (leaf "spawn" [tagctl "toggle-tag" "5"]) ]) - (plain "Mod+6" [ (leaf "spawn" [tagctl "toggle-tag" "6"]) ]) - (plain "Mod+7" [ (leaf "spawn" [tagctl "toggle-tag" "7"]) ]) - (plain "Mod+8" [ (leaf "spawn" [tagctl "toggle-tag" "8"]) ]) - (plain "Mod+9" [ (leaf "spawn" [tagctl "toggle-tag" "9"]) ]) + (plain "Mod+0" [ + (leaf "spawn" [ + tagctl + "toggle-tag" + "0" + ]) + ]) + (plain "Mod+1" [ + (leaf "spawn" [ + tagctl + "toggle-tag" + "1" + ]) + ]) + (plain "Mod+2" [ + (leaf "spawn" [ + tagctl + "toggle-tag" + "2" + ]) + ]) + (plain "Mod+3" [ + (leaf "spawn" [ + tagctl + "toggle-tag" + "3" + ]) + ]) + (plain "Mod+4" [ + (leaf "spawn" [ + tagctl + "toggle-tag" + "4" + ]) + ]) + (plain "Mod+5" [ + (leaf "spawn" [ + tagctl + "toggle-tag" + "5" + ]) + ]) + (plain "Mod+6" [ + (leaf "spawn" [ + tagctl + "toggle-tag" + "6" + ]) + ]) + (plain "Mod+7" [ + (leaf "spawn" [ + tagctl + "toggle-tag" + "7" + ]) + ]) + (plain "Mod+8" [ + (leaf "spawn" [ + tagctl + "toggle-tag" + "8" + ]) + ]) + (plain "Mod+9" [ + (leaf "spawn" [ + tagctl + "toggle-tag" + "9" + ]) + ]) # (plain "Mod+0" [ (leaf "focus-workspace" 0) ]) # (plain "Mod+1" [ (leaf "focus-workspace" 1) ]) @@ -252,17 +309,77 @@ in # (plain "Mod+7" [ (leaf "focus-workspace" 7) ]) # (plain "Mod+8" [ (leaf "focus-workspace" 8) ]) # (plain "Mod+9" [ (leaf "focus-workspace" 9) ]) - # - (plain "Mod+Shift+0" [ (leaf "spawn" [tagctl "toggle" "0"]) ]) - (plain "Mod+Shift+1" [ (leaf "spawn" [tagctl "toggle" "1"]) ]) - (plain "Mod+Shift+2" [ (leaf "spawn" [tagctl "toggle" "2"]) ]) - (plain "Mod+Shift+3" [ (leaf "spawn" [tagctl "toggle" "3"]) ]) - (plain "Mod+Shift+4" [ (leaf "spawn" [tagctl "toggle" "4"]) ]) - (plain "Mod+Shift+5" [ (leaf "spawn" [tagctl "toggle" "5"]) ]) - (plain "Mod+Shift+6" [ (leaf "spawn" [tagctl "toggle" "6"]) ]) - (plain "Mod+Shift+7" [ (leaf "spawn" [tagctl "toggle" "7"]) ]) - (plain "Mod+Shift+8" [ (leaf "spawn" [tagctl "toggle" "8"]) ]) - (plain "Mod+Shift+9" [ (leaf "spawn" [tagctl "toggle" "9"]) ]) + # + (plain "Mod+Shift+0" [ + (leaf "spawn" [ + tagctl + "toggle" + "0" + ]) + ]) + (plain "Mod+Shift+1" [ + (leaf "spawn" [ + tagctl + "toggle" + "1" + ]) + ]) + (plain "Mod+Shift+2" [ + (leaf "spawn" [ + tagctl + "toggle" + "2" + ]) + ]) + (plain "Mod+Shift+3" [ + (leaf "spawn" [ + tagctl + "toggle" + "3" + ]) + ]) + (plain "Mod+Shift+4" [ + (leaf "spawn" [ + tagctl + "toggle" + "4" + ]) + ]) + (plain "Mod+Shift+5" [ + (leaf "spawn" [ + tagctl + "toggle" + "5" + ]) + ]) + (plain "Mod+Shift+6" [ + (leaf "spawn" [ + tagctl + "toggle" + "6" + ]) + ]) + (plain "Mod+Shift+7" [ + (leaf "spawn" [ + tagctl + "toggle" + "7" + ]) + ]) + (plain "Mod+Shift+8" [ + (leaf "spawn" [ + tagctl + "toggle" + "8" + ]) + ]) + (plain "Mod+Shift+9" [ + (leaf "spawn" [ + tagctl + "toggle" + "9" + ]) + ]) # (plain "Mod+Shift+0" [ (leaf "move-column-to-workspace" 0) ]) # (plain "Mod+Shift+1" [ (leaf "move-column-to-workspace" 1) ]) @@ -275,20 +392,80 @@ in # (plain "Mod+Shift+8" [ (leaf "move-column-to-workspace" 8) ]) # (plain "Mod+Shift+9" [ (leaf "move-column-to-workspace" 9) ]) - (plain "Mod+Ctrl+0" [ (leaf "spawn" [tagctl "exclusive-tag" "0"]) ]) - (plain "Mod+Ctrl+1" [ (leaf "spawn" [tagctl "exclusive-tag" "1"]) ]) - (plain "Mod+Ctrl+2" [ (leaf "spawn" [tagctl "exclusive-tag" "2"]) ]) - (plain "Mod+Ctrl+3" [ (leaf "spawn" [tagctl "exclusive-tag" "3"]) ]) - (plain "Mod+Ctrl+4" [ (leaf "spawn" [tagctl "exclusive-tag" "4"]) ]) - (plain "Mod+Ctrl+5" [ (leaf "spawn" [tagctl "exclusive-tag" "5"]) ]) - (plain "Mod+Ctrl+6" [ (leaf "spawn" [tagctl "exclusive-tag" "6"]) ]) - (plain "Mod+Ctrl+7" [ (leaf "spawn" [tagctl "exclusive-tag" "7"]) ]) - (plain "Mod+Ctrl+8" [ (leaf "spawn" [tagctl "exclusive-tag" "8"]) ]) - (plain "Mod+Ctrl+9" [ (leaf "spawn" [tagctl "exclusive-tag" "9"]) ]) - + (plain "Mod+Ctrl+0" [ + (leaf "spawn" [ + tagctl + "exclusive-tag" + "0" + ]) + ]) + (plain "Mod+Ctrl+1" [ + (leaf "spawn" [ + tagctl + "exclusive-tag" + "1" + ]) + ]) + (plain "Mod+Ctrl+2" [ + (leaf "spawn" [ + tagctl + "exclusive-tag" + "2" + ]) + ]) + (plain "Mod+Ctrl+3" [ + (leaf "spawn" [ + tagctl + "exclusive-tag" + "3" + ]) + ]) + (plain "Mod+Ctrl+4" [ + (leaf "spawn" [ + tagctl + "exclusive-tag" + "4" + ]) + ]) + (plain "Mod+Ctrl+5" [ + (leaf "spawn" [ + tagctl + "exclusive-tag" + "5" + ]) + ]) + (plain "Mod+Ctrl+6" [ + (leaf "spawn" [ + tagctl + "exclusive-tag" + "6" + ]) + ]) + (plain "Mod+Ctrl+7" [ + (leaf "spawn" [ + tagctl + "exclusive-tag" + "7" + ]) + ]) + (plain "Mod+Ctrl+8" [ + (leaf "spawn" [ + tagctl + "exclusive-tag" + "8" + ]) + ]) + (plain "Mod+Ctrl+9" [ + (leaf "spawn" [ + tagctl + "exclusive-tag" + "9" + ]) + ]) + (plain "Ctrl+Print" [ (flag "screenshot-screen") ]) (plain "Mod+Alt+L" [ (leaf "spawn" <| getExe pkgs.swaylock) ]) - (plain "Mod+B" [ (leaf "spawn" <| getExe pkgs.brave) ]) + (plain "Mod+B" [ (leaf "spawn" <| getExe zen-browser) ]) (plain "Mod+BracketLeft" [ (flag "consume-or-expel-window-left") ]) (plain "Mod+BracketRight" [ (flag "consume-or-expel-window-right") ]) (plain "Mod+C" [ (flag "center-column") ]) diff --git a/modules/wms/niri/niri.mod.nix b/modules/wms/niri/niri.mod.nix index dc56fed..d09e4ec 100644 --- a/modules/wms/niri/niri.mod.nix +++ b/modules/wms/niri/niri.mod.nix @@ -14,6 +14,7 @@ let inherit (lib) getFlakePkg'; niri-tag = inputs.niri-tag.packages.${builtins.currentSystem}.unstable; + zen-browser = getFlakePkg' inputs.zen-browser-flake "beta"; tagctl = getExe' niri-tag "tagctl"; cfg = config.modules.desktops.niri; @@ -57,6 +58,7 @@ let lib pkgs tagctl + zen-browser ; } ); diff --git a/modules/wms/portal.mod.nix b/modules/wms/portal.mod.nix index cfe7b3f..e126203 100644 --- a/modules/wms/portal.mod.nix +++ b/modules/wms/portal.mod.nix @@ -6,7 +6,7 @@ }: let inherit (lib.modules) mkIf; - inherit (lib.lists) optional; + inherit (lib.lists) singleton; in { xdg.portal = { @@ -29,15 +29,20 @@ in "gnome" "gtk" ]; + "org.freedesktop.impl.portal.Access" = "gtk"; + "org.freedesktop.impl.portal.Notification" = "gtk"; "org.freedesktop.impl.portal.Secret" = [ "gnome-keyring" ]; }; }; }; - - environment.pathsToLink = [ - "/share/xdg-desktop-portal" - "/share/applications" - ]; + environment = { + # Needed for xdg-desktop-portal-gnome. + systemPackages = singleton pkgs.nautilus; + pathsToLink = [ + "/share/xdg-desktop-portal" + "/share/applications" + ]; + }; }