diff --git a/home/home.nix b/home/home.nix index aa7b0db..40e84e1 100755 --- a/home/home.nix +++ b/home/home.nix @@ -12,9 +12,9 @@ in { imports = [ # who are you? - ./bolt.nix + # ./bolt.nix # ./fossil.nix - # ./plank.nix + ./plank.nix ]; nixpkgs.config.packageOverrides = pkgs: { diff --git a/home/plank.nix b/home/plank.nix index 8f67594..73ff8ba 100755 --- a/home/plank.nix +++ b/home/plank.nix @@ -1,15 +1,98 @@ -{ config, pkgs, ... }: +{ config, pkgs, lib, ... }: -{ +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; + + wlogout_style_base = dots/wlogout/style.css; + wlogout_style = pkgs.runCommandLocal "wlogout_style_base" {wlogpath = lib.strings.escape ["/"] "${pkgs.wlogout}";} '' + cp ${wlogout_style_base} $out + sed -i "s/\/usr\/share\/wlogout/$wlogpath\/share\/wlogout/g" $out + sed -i "s/\/etc\/wlogout/$wlogpath\/etc\/wlogout/g" $out + ''; + +in { nixpkgs.overlays = [ (self: super: { kwin-system76-scheduler-integration = pkgs.libsForQt5.callPackage ../system/syspkgs/kwin-system76-scheduler-integration.nix {}; + hyprland-s76 = pkgs.callPackage ../system/syspkgs/hyprland-system76-scheduler-integration.nix {}; + swayosd = pkgs.callPackage ./homepkgs/swayosd.nix {}; }) ]; + imports = [ + hyprland.homeManagerModules.default + ../foreign/dotfiles/home/programs/eww/default.nix + # ../foreign/dotfiles/modules/regreet.nix + ]; + home.username = "plank"; home.homeDirectory = "/home/plank"; + programs.eww-hyprland = { + enable = true; + colors = builtins.readFile dots/eww/colors.scss; + }; + + home.packages = with pkgs; [ + qt5ct + zellij + + glib # for gsettings + + fuzzel + grim + slurp + swaybg + wlogout + wf-recorder + libnotify + xorg.xrdb + swayidle + swaynotificationcenter + swayosd + + playerctl + ]; + + xdg.configFile = builtins.mapAttrs (name: value: { enable=true; text=builtins.readFile value; }) + { + "wlogout/layout" = dots/wlogout/layout; + "wlogout/style.css" = wlogout_style; + "swaync/config.json" = dots/swaync/config.json; + "swaync/configSchema.json" = dots/swaync/configSchema.json; + "swaync/style.css" = dots/swaync/style.css; + "fuzzel/fuzzel.ini" = dots/fuzzel/fuzzel.ini; + }; + + wayland.windowManager.hyprland = { + enable = true; + systemdIntegration = true; + nvidiaPatches = false; + xwayland = { + enable = true; + hidpi = false; + }; + recommendedEnvironment = true; + extraConfig = builtins.readFile dots/hyprland/hyprland.conf; + }; + + systemd.user.services."hyprland-system76" = { + Unit = { + Description = "the hyprland process scheduler hook"; + Requires = [ "dbus.service" ]; + }; + Install = { + WantedBy = [ "graphical-session.target" "default.target" ]; + }; + Service = { + ExecStart = ''${pkgs.hyprland-s76}/bin/hyprland-system76-scheduler-hook.sh''; + }; + }; + systemd.user.startServices = true; systemd.user.services."com.system76.Scheduler.dbusproxy" = { diff --git a/system/adrift.nix b/system/adrift.nix index 4023482..e0c1ac4 100755 --- a/system/adrift.nix +++ b/system/adrift.nix @@ -1,9 +1,19 @@ { config, lib, pkgs, modulesPath, ... }: -{ +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 { + nix.settings = { + substituters = [ "https://hyprland.cachix.org" ]; + trusted-public-keys = ["hyprland.cachix.org-1:a7pgxzMz7+chwVL3/pzj6jIBMioiJM7ypFP8PwtkuGc="]; + }; + imports = - [ (modulesPath + "/installer/scan/not-detected.nix") - ]; + [ hyprland.nixosModules.default ]; nixpkgs.overlays = [ (self: super: { @@ -60,6 +70,16 @@ kwin-system76-scheduler-integration ]; + programs.hyprland = { + enable = true; + xwayland = { + enable = true; + hidpi = false; + }; + nvidiaPatches = true; + }; + programs.xwayland.enable = true; + systemd.services."com.system76.Scheduler" = { wantedBy = [ "multi-user.target" ]; description = "the system76 process scheduler"; @@ -85,4 +105,15 @@ "system76-scheduler".source = "${pkgs.system76-scheduler}/etc/system76-scheduler"; }; + xdg.portal = { + enable = true; + wlr = { + enable = true; + }; + extraPortals = with pkgs; [ + xdg-desktop-portal-kde + xdg-desktop-portal-gtk + ]; + }; + } diff --git a/system/configuration.nix b/system/configuration.nix index 678b3e0..51cab56 100755 --- a/system/configuration.nix +++ b/system/configuration.nix @@ -10,8 +10,8 @@ imports = [ # where are we ? #./wollomi.nix - # ./adrift.nix - ./quiver.nix + ./adrift.nix + # ./quiver.nix # home manager should exist for users @@ -33,24 +33,13 @@ keep-derivations = true ''; - 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"; - EDITOR = "hx"; - }; + hardware.enableRedistributableFirmware = true; environment.pathsToLink = [ "/share/zsh" ]; boot.loader.systemd-boot.enable = true; boot.loader.systemd-boot.consoleMode = "max"; boot.loader.timeout = 3; - boot.kernelPackages = pkgs.linuxPackages_xanmod_latest; - boot.tmpOnTmpfs = true; networking.networkmanager.enable = true; # Easiest to use and most distros use this by default. @@ -71,7 +60,7 @@ hardware.opengl.driSupport32Bit = true; #input stuff - services.xserver.enable = false; + services.xserver.enable = true; services.xserver.xkbOptions = "caps:escape"; services.xserver.layout = "us"; services.xserver.libinput.enable = true; diff --git a/system/quiver.nix b/system/quiver.nix index 3073751..7e4422b 100755 --- a/system/quiver.nix +++ b/system/quiver.nix @@ -23,6 +23,18 @@ in { imports = [ hyprland.nixosModules.default ]; + 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"; + EDITOR = "hx"; + }; + + boot.kernelPackages = pkgs.linuxPackages_xanmod_latest; boot.initrd.availableKernelModules = [ "xhci_pci" "ahci" "usbcore" "sd_mod" ]; boot.initrd.kernelModules = [ ]; boot.kernelModules = [ "kvm-amd" "i2c-dev" ];