diff --git a/home/bolt.nix b/home/bolt.nix index b3786fb..a457071 100755 --- a/home/bolt.nix +++ b/home/bolt.nix @@ -23,7 +23,6 @@ Unit = { Description = "the system76 process scheduler kwin dbus proxy"; - # Aliases = [ "com.system76.Scheduler.dbusproxy.service" ]; Requires = [ "dbus.service" ]; }; diff --git a/home/home.nix b/home/home.nix index 56a7ce6..9eb918a 100755 --- a/home/home.nix +++ b/home/home.nix @@ -1,10 +1,12 @@ -{ config, pkgs, ... }: +{ pkgs, config, ... }: let - flake-compat = builtins.fetchTarball "https://github.com/edolstra/flake-compat/archive/master.tar.gz"; - hyprland = (import flake-compat { - src = builtins.fetchTarball "https://github.com/hyprwm/Hyprland/archive/master.tar.gz"; - }).defaultNix; + # nix-rice = builtins.fetchGit { + # url = "https://github.com/bertof/nix-rice.git"; + # rev = "ac810023c1bb3d999ab4295ea4eb261412f4b7c0"; + # }; + # nix-rice-overlay = import (nix-rice + "/overlay.nix"); + # pkgs = import { overlays = [ nix-rice-overlay ]; }; kitty_notest = pkgs.kitty.overridePythonAttrs (oldAttrs: { doCheck = false; checkPhase = ""; }); in { @@ -13,7 +15,6 @@ in ./bolt.nix # ./fossil.nix # ./plank.nix - hyprland.homeManagerModules.default ]; nixpkgs.config.packageOverrides = pkgs: { @@ -21,110 +22,6 @@ in inherit pkgs; }; }; - - wayland.windowManager.hyprland = { - enable = true; - systemdIntegration = true; - nvidiaPatches = true; - extraConfig = '' - exec-once = waybar - exec-once = keepassxc - exec-once = mako - exec-once = ckb-next -c -b - exec-once = swaybg -i $HOME/Downloads/00026.png - exec-once = xrdb $HOME/.Xresources - - input { - kb_layout=us - kb_options=caps:escape,escape:caps - } - - general { - no_border_on_floating=true - layout=dwindle - border_size=3 - gaps_in=10 - gaps_out=20 - } - - dwindle { - preserve_split=true - pseudotile=true - use_active_for_splits=true - } - - decoration { - rounding=8 - blur=0 - } - - animations { - enabled=1 - bezier=overshot,0.05,0.9,0.1,1.1 - bezier=smooth,0.06,0.94,0.1,1.0 - bezier=slosmooth,0.1,0.89,0.14,0.96 - animation=windows,1,6,overshot,popin - animation=workspaces,1,6,smooth,slidevert - animation=specialWorkspace,1,6,overshot,slide - } - - misc { - disable_hyprland_logo=true - disable_splash_rendering=true - } - - monitor=,highrr,auto,1 - - bind=SUPER,Return,exec,kitty - bind=SUPER,F,exec,firefox - bind=SUPER,D,exec,fuzzel - - bind=SUPER_SHIFT,Q,killactive - bind=SUPER_SHIFT,space,fullscreen,0 - bind=SUPER,space,togglefloating - - bind=SUPER,h,movefocus,l - bind=SUPER,l,movefocus,r - bind=SUPER,j,movefocus,d - bind=SUPER,k,movefocus,u - bind=SUPER_SHIFT,h,movewindow,l - bind=SUPER_SHIFT,l,movewindow,r - bind=SUPER_SHIFT,j,movewindow,d - bind=SUPER_SHIFT,k,movewindow,u - - bind=SUPER,s,togglesplit - - bind=SUPER,1,workspace,1 - bind=SUPER,2,workspace,2 - bind=SUPER,3,workspace,3 - bind=SUPER,4,workspace,4 - bind=SUPER_SHIFT,1,movetoworkspacesilent,1 - bind=SUPER_SHIFT,2,movetoworkspacesilent,2 - bind=SUPER_SHIFT,3,movetoworkspacesilent,3 - bind=SUPER_SHIFT,4,movetoworkspacesilent,4 - - bind=SUPER_CTRL,h,resizeactive,-40 0 - bind=SUPER_CTRL,l,resizeactive,40 0 - bind=SUPER_CTRL,j,resizeactive,0 -40 - bind=SUPER_CTRL,k,resizeactive,0 40 - - bind=SUPER,minus,togglespecialworkspace - bind=SUPER_SHIFT,minus,movetoworkspace,special - - bind=SUPER_SHIFT,S,exec,grim -g "$(slurp)" -t png -o "$HOME/Pictures/$(date +%F_%H-%m-%S).png" && notify-send "Screenshot taken." - bind=SUPER_SHIFT_CTRL,S,exec,wf-recorder -a -f "$HOME/Videos/recording_($date +%F_%H-%m-%S).mp4" && notify-send "Recording desktop.." - bind=SUPER_SHIFT,E,exec,wlogout - - bind=,XF86AudioMute,exec,pactl set-sink-mute @DEFAULT_SINK@ toggle && notify-send "Audio" "Mute $(if [ $(pactl get-sink-mute @DEFAULT_SINK@ | rg yes | wc -l) -eq 1 ]; then printf on; else printf off; fi)." - bind=,XF86AudioRaiseVolume,exec,pactl set-sink-volume @DEFAULT_SINK@ +5% && notify-send "Audio" "Volume at $(pactl get-sink-volume @DEFAULT_SINK@ | cut -d' ' -f 6)" - bind=,XF86AudioLowerVolume,exec,pactl set-sink-volume @DEFAULT_SINK@ -5% && notify-send "Audio" "Volume at $(pactl get-sink-volume @DEFAULT_SINK@ | cut -d' ' -f 6)" - bind=,XF86AudioStop,exec,cmus-remote -s && notify-send "Music" "Playback stopped." - bind=,XF86AudioPlay,exec,cmus-remote -u && notify-send "Music" "Playback status: $(cmus-remote -Q | head -n 1 | cut -d' ' -f 2)" - bind=,XF86AudioPrev,exec,cmus-remote -r && notify-send "Music" "Now playing:\n$(cmus-remote -Q | rg -e 'artist|title' | cut -d' ' -f 3-)" - bind=,XF86AudioNext,exec,cmus-remote -n && notify-send "Music" "Now playing:\n$(cmus-remote -Q | rg -e 'artist|title' | cut -d' ' -f 3-)" - ''; - }; - nixpkgs.config.allowUnfree = true; home.packages = with pkgs; [ @@ -134,18 +31,6 @@ in clementine inkscape - grim - slurp - mako - swaybg - wlogout - wf-recorder - libnotify - fuzzel - waybar - - pulseaudio # yuck! just for pactl.. - btop bat joshuto @@ -154,7 +39,6 @@ in lazygit fzf - # kdeconnect # maybe once i get an android keepassxc @@ -166,33 +50,26 @@ in zoxide meslo-lgs-nf - libreoffice-qt + # libreoffice-qt libsForQt5.ark libsForQt5.qtstyleplugin-kvantum libsForQt5.bismuth + hackneyed + gtk-engine-murrine - # plasma-browser-integration + plasma-browser-integration (callPackage ./homepkgs/git-credential-keepassxc.nix { }) (callPackage ./homepkgs/culr.nix { }) - (callPackage ./homepkgs/glpaper.nix { }) + # (callPackage ./homepkgs/glpaper.nix { }) ]; xdg.enable = true; - - programs.mako = { - enable = true; - anchor = "bottom-right"; - borderRadius = 8; - borderSize = 2; - defaultTimeout = 3500; - ignoreTimeout = true; - font = "Visby Regular 14"; - }; + xdg.systemDirs.data = [ "${pkgs.hackneyed}/share" ]; programs.vscode = { enable = true; @@ -203,34 +80,34 @@ in mutableExtensionsDir = false; }; - # xdg.desktopEntries = { - # vscodium-url = { - # name = "VsCodium"; - # genericName = "Text Editor"; - # exec = "codium --disable-gpu-sandbox --open-url %U"; - # icon = "code"; - # comment = "Code Editing. Redefined."; - # categories = [ "Utility" "TextEditor" "Development" "IDE" ]; - # # keywords = [ "vscode" ]; - # mimeType = [ "x-scheme-handler/vscode" ]; - # noDisplay = true; - # startupNotify = true; - # type = "Application"; - # }; - # vscodium = { - # categories = [ "Utility" "TextEditor" "Development" "IDE" ]; - # comment = "Code Editing. Redefined."; - # exec = "codium --disable-gpu-sandbox %F"; - # genericName = "Text Editor"; - # icon = "code"; - # # keywords = [ "vscode" ]; - # mimeType = [ "text/plain" "inode/directory" ]; - # name = "VsCodium"; - # startupNotify = true; - # # startupWMClass = "vscodium"; - # type = "Application"; - # }; - # }; + xdg.desktopEntries = { + codium-url = { + name = "VsCodium"; + genericName = "Text Editor"; + exec = "codium --disable-gpu-sandbox --open-url %U"; + icon = "code"; + comment = "Code Editing. Redefined."; + categories = [ "Utility" "TextEditor" "Development" "IDE" ]; + # keywords = [ "vscode" ]; + mimeType = [ "x-scheme-handler/vscode" ]; + noDisplay = true; + startupNotify = true; + type = "Application"; + }; + codium = { + categories = [ "Utility" "TextEditor" "Development" "IDE" ]; + comment = "Code Editing. Redefined."; + exec = "codium --disable-gpu-sandbox %F"; + genericName = "Text Editor"; + icon = "code"; + # keywords = [ "vscode" ]; + mimeType = [ "text/plain" "inode/directory" ]; + name = "VsCodium"; + startupNotify = true; + # startupWMClass = "vscodium"; + type = "Application"; + }; + }; programs.direnv = { enable = true; @@ -241,10 +118,10 @@ in gtk = { enable = true; - # theme = { - # package = (pkgs.callPackage ./homepkgs/simplewaita-gtk.nix {}); - # name = "simplewaita"; - # }; + theme = { + package = (pkgs.callPackage ./homepkgs/simplewaita-gtk.nix {}); + name = "simplewaita"; + }; }; programs.firefox = @@ -511,9 +388,9 @@ fresh theme = "bogster"; }; - # home.sessionVariables = { - # GTK_THEME = "simplewaita"; - # }; + home.sessionVariables = { + GTK_THEME = "simplewaita"; + }; home.stateVersion = "22.11"; diff --git a/home/homepkgs/glpaper.nix b/home/homepkgs/glpaper.nix new file mode 100644 index 0000000..2527eee --- /dev/null +++ b/home/homepkgs/glpaper.nix @@ -0,0 +1,31 @@ +{ lib, stdenv, fetchFromSourcehut, meson, ninja, pkg-config, wlroots, wayland, wayland-protocols +, libX11, libGL }: + +stdenv.mkDerivation rec { + pname = "glpaper"; + version = "unstable-latest"; + + src = fetchFromSourcehut { + owner = "~scoopta"; + repo = pname; + vc = "hg"; + rev = "9ba3806561312d83ed66dc8583c36d70fda8cd7a"; + sha256 = "sha256-//IKW2BfpqwcR2WAPShs0kzn5nkV/yyABPvOYm3zMPU="; + }; + + nativeBuildInputs = [ meson ninja pkg-config ]; + buildInputs = [ + wayland + libX11 # required by libglvnd + libGL + ]; + + meta = with lib; { + description = + "Wallpaper program for wlroots based Wayland compositors such as sway that allows you to render glsl shaders as your wallpaper"; + homepage = "https://hg.sr.ht/~scoopta/glpaper"; + license = licenses.gpl3Plus; + platforms = platforms.linux; + maintainers = with maintainers; [ ccellado ]; + }; +} diff --git a/system/configuration.nix b/system/configuration.nix index 510a50d..95a2e55 100755 --- a/system/configuration.nix +++ b/system/configuration.nix @@ -1,13 +1,7 @@ { config, pkgs, ... }: -let - flake-compat = builtins.fetchTarball "https://github.com/edolstra/flake-compat/archive/master.tar.gz"; - hyprland = (import flake-compat { - src = builtins.fetchTarball "https://github.com/hyprwm/Hyprland/archive/master.tar.gz"; - }).defaultNix; -in -{ +{ imports = [ # where are we ? @@ -23,7 +17,6 @@ in # declarative cachix (import (builtins.fetchTarball "https://github.com/jonascarpay/declarative-cachix/archive/master.tar.gz")) - hyprland.nixosModules.default ]; cachix = [ @@ -38,6 +31,12 @@ in environment.sessionVariables = rec { WLR_NO_HARDWARE_CURSORS = "1"; + GBM_BACKEND = "nvidia-drm"; + NVD_BACKEND = "direct"; + __GLX_VENDOR_LIBRARY_NAME = "nvidia"; + LIBVA_DRIVER_NAME = "nvidia"; + __GL_GSYNC_ALLOWED = "1"; + __GL_VRR_ALLOWED = "1"; }; environment.pathsToLink = [ "/share/zsh" ]; @@ -75,35 +74,23 @@ in services.xserver.libinput.enable = true; # kde time services.xserver.desktopManager.plasma5.enable = true; - services.xserver.displayManager.lightdm.enable = false; - services.xserver.displayManager.sddm.enable = false; - services.xserver.displayManager.gdm.enable = false; - # services.xserver.displayManager.sddm = { - # enable = true; - # theme = "${(pkgs.fetchFromGitHub { - # owner = "EricKotato"; - # repo = "sddm-slice"; - # rev = "763b8f4e01c00c1f8590fc7a103e14f6e8449443"; - # sha256 = "sha256-UW53ZdKb3RSrrcZ9GxZsJyjzS/uKR8lkaLLyi+2o27U="; - # })}"; - # autoNumlock = true; - # settings = { - # General = { - # InputMethod = ""; - # }; - # }; - # }; - # services.xserver.desktopManager.plasma5.runUsingSystemd = true; - services.greetd = { + services.xserver.displayManager.lightdm.enable = false; # gets installed by default.. + services.xserver.displayManager.sddm = { enable = true; + theme = "${(pkgs.fetchFromGitHub { + owner = "EricKotato"; + repo = "sddm-slice"; + rev = "763b8f4e01c00c1f8590fc7a103e14f6e8449443"; + sha256 = "sha256-UW53ZdKb3RSrrcZ9GxZsJyjzS/uKR8lkaLLyi+2o27U="; + })}"; + autoNumlock = true; settings = { - default_session = { - # command = "${pkgs.greetd.tuigreet}/bin/tuigreet --time --cmd 'dbus-run-session startplasma-wayland'"; - command = "${pkgs.greetd.tuigreet}/bin/tuigreet --time --cmd Hyprland"; - user = "greeter"; + General = { + InputMethod = ""; }; }; }; + services.xserver.desktopManager.plasma5.runUsingSystemd = true; programs.dconf.enable = true; xdg.autostart.enable = true; @@ -133,11 +120,6 @@ in users.defaultUserShell = pkgs.zsh; services.tailscale.enable = true; - programs.hyprland = { - enable = true; - package = hyprland.packages.${pkgs.system}.default; - nvidiaPatches = true; - }; environment.systemPackages = with pkgs; [ @@ -186,7 +168,7 @@ in checkReversePath = "loose"; }; - systemd.services.fixNetworkingForTailscaleGodDamnit = { + systemd.services.fixNetworkingForTailscale = { wantedBy = [ "multi-user.target" ]; after = [ "network.target" "wg-quick-mullvad.service" ]; description = "fix the damn routing table"; diff --git a/system/quiver.nix b/system/quiver.nix index 0b3ddea..bde7859 100755 --- a/system/quiver.nix +++ b/system/quiver.nix @@ -1,15 +1,11 @@ { config, lib, pkgs, modulesPath, ... }: -# let -# unstable-small = import { config = { allowUnfree = true; }; }; -# in { nixpkgs.overlays = [ (self: super: { system76-scheduler = pkgs.callPackage ./syspkgs/system76-scheduler.nix {}; kwin-system76-scheduler-integration = pkgs.libsForQt5.callPackage ./syspkgs/kwin-system76-scheduler-integration.nix {}; - # systemd = unstable-small.systemd; }) ]; @@ -18,13 +14,13 @@ ]; boot.initrd.availableKernelModules = [ "xhci_pci" "ahci" "usbcore" "sd_mod" ]; - boot.initrd.kernelModules = []; + boot.initrd.kernelModules = [ "nvidia" "nvidia_modeset" "nvidia_uvm" "nvidia_drm" ]; boot.kernelModules = [ "kvm-amd" "i2c-dev" ]; boot.extraModulePackages = [ ]; - boot.kernelParams = [ "mitigations=off" "acpi_enforce_resources=lax" "preempt=full" ]; + boot.kernelParams = [ "nvidia_drm.modeset=1" "mitigations=off" "acpi_enforce_resources=lax" "preempt=full" ]; boot.loader.efi.canTouchEfiVariables = true; - boot.plymouth.enable = true; + # boot.plymouth.enable = true; boot.supportedFilesystems = [ "ntfs" ]; @@ -45,6 +41,7 @@ services.xserver.videoDrivers = [ "nvidia" ]; hardware.nvidia.package = config.boot.kernelPackages.nvidiaPackages.beta; + # hardware.nvidia.package = config.boot.kernelPackages.nvidiaPackages.stable; hardware.nvidia.modesetting.enable = true; hardware.nvidia.powerManagement.enable = true; programs.xwayland.enable = true; @@ -92,22 +89,19 @@ xdg.portal = { enable = true; - gtkUsePortal = true; wlr = { enable = true; - settings = { - screencast = { - output_name = "DP-1"; - max_fps = 60; - chooser_type = "simple"; - chooser_amd = "${pkgs.slurp}/bin/slurp -f %o -or"; - }; - }; + # settings = { + # screencast = { + # output_name = "DP-1"; + # max_fps = 60; + # chooser_type = "simple"; + # chooser_nvidia = "${pkgs.slurp}/bin/slurp -f %o -or"; + # }; + # }; }; extraPortals = with pkgs; [ - xdg-desktop-portal-wlr xdg-desktop-portal-kde - xdg-desktop-portal-gtk ]; };