From 4d957a817a562c37539a8815eca2dd5ddda0fc9b Mon Sep 17 00:00:00 2001 From: DashieTM Date: Sun, 12 May 2024 23:29:35 +0200 Subject: [PATCH] greetd: use proper package for greetd --- nix/base/base_packages.nix | 1 - nix/base/common_hardware.nix | 40 ++++- nix/base/login_manager.nix | 92 +++++----- nix/flake.lock | 169 +++++++++++++----- nix/flake.nix | 2 + nix/hardware/marmo/configuration.nix | 3 +- nix/hardware/marmo/marmo.nix | 33 ---- nix/hardware/overheating/overheating.nix | 33 ---- nix/hardware/spaceship/configuration.nix | 34 +++- nix/hardware/spaceship/spaceship.nix | 34 ---- nix/modules/boot_params.nix | 11 ++ nix/programs/coding.nix | 53 ++++-- nix/programs/common.nix | 5 +- nix/programs/default.nix | 39 +++-- nix/programs/flatpak.nix | 6 +- nix/programs/gaming/default.nix | 2 +- nix/programs/hyprland/config.nix | 9 +- nix/programs/hyprland/default.nix | 11 +- nix/programs/hyprland/hyprgreet.nix | 23 --- nix/programs/hyprland/hyprlock.nix | 37 ++++ nix/programs/media.nix | 7 +- nix/programs/themes/gtk4.nix | 210 +++++++++++------------ nix/programs/themes/qt.nix | 3 - 23 files changed, 484 insertions(+), 373 deletions(-) create mode 100644 nix/modules/boot_params.nix delete mode 100644 nix/programs/hyprland/hyprgreet.nix create mode 100644 nix/programs/hyprland/hyprlock.nix diff --git a/nix/base/base_packages.nix b/nix/base/base_packages.nix index 502e6de..ebde6aa 100644 --- a/nix/base/base_packages.nix +++ b/nix/base/base_packages.nix @@ -1,5 +1,4 @@ { config, pkgs, ... }: - { environment.systemPackages = with pkgs; [ openssl diff --git a/nix/base/common_hardware.nix b/nix/base/common_hardware.nix index 14879a7..d514dc0 100644 --- a/nix/base/common_hardware.nix +++ b/nix/base/common_hardware.nix @@ -1,4 +1,4 @@ -{ pkgs, ... }: +{ pkgs, config, ... }: { # Bootloader. boot.loader.systemd-boot.enable = true; @@ -55,7 +55,6 @@ packages = with pkgs; [ home-manager xdg-desktop-portal-gtk - xdg-desktop-portal-hyprland ]; # this password will only last for the first login # e.g. login, then change to whatever else, this also ensures no public hash is available @@ -63,4 +62,41 @@ }; system.stateVersion = "unstable"; + boot.initrd.availableKernelModules = [ "nvme" "xhci_pci" "ahci" "usbhid" "usb_storage" "sd_mod" ]; + + fileSystems."/" = + { + device = "/dev/disk/by-label/ROOT"; + fsType = "btrfs"; + options = [ + "noatime" + "nodiratime" + "discard" + ]; + }; + + fileSystems."/boot" = + { + device = "/dev/disk/by-label/BOOT"; + fsType = "vfat"; + options = [ "rw" "fmask=0022" "dmask=0022" "noatime" ]; + }; + + fileSystems."/home" = + { + device = "/dev/disk/by-label/HOME"; + fsType = "btrfs"; + options = [ + "noatime" + "nodiratime" + "discard" + ]; + }; + + swapDevices = + [{ device = "/dev/disk/by-label/SWAP"; }]; + + boot.kernelParams = [ + "resume=\"PARTLABEL=SWAP\"" + ] ++ config.programs.boot.boot_params; } diff --git a/nix/base/login_manager.nix b/nix/base/login_manager.nix index 826d19c..34d3280 100644 --- a/nix/base/login_manager.nix +++ b/nix/base/login_manager.nix @@ -1,53 +1,65 @@ -{ pkgs +{ inputs +, lib +, config +, pkgs , ... -}: { - # greetd display manager - services.greetd = - let - session = { - command = "${pkgs.hyprland}/bin/Hyprland --config /home/dashie/.config/hypr/hyprgreet.conf"; - user = "dashie"; - }; - in +}: +let + regreet_override = pkgs.greetd.regreet.overrideAttrs (final: prev: { + SESSION_DIRS = "${config.services.xserver.displayManager.sessionData.desktops}/share"; + }); + session = { + command = "${lib.getExe pkgs.hyprland} --config /etc/greetd/hyprgreet.conf"; + user = "dashie"; + }; +in +{ + imports = [ + inputs.hyprland.nixosModules.default + ]; + + services.xserver.displayManager.session = [ { - enable = true; - settings = { - terminal.vt = 1; - default_session = session; - initial_session = session; - }; - }; - programs.regreet = { + manage = "desktop"; + name = "Hyprland"; + start = '' + ${lib.getExe pkgs.hyprland} & waitPID=$! + ''; + } + ]; + + # greetd display manager + programs.hyprland.enable = true; + services.greetd = { enable = true; settings = { - - background = { - fit = "Contain"; - }; - - env = { - QT_QPA_PLATFORMTHEME = "qt5ct"; - PATH = "/home/dashie/.cargo/bin:PATH"; - }; - - GTK = { - application_prefer_dark_theme = true; - cursor_theme_name = "Adwaita"; - icon_theme_name = "Adwaita"; - theme_name = "adw-gtk3"; - - command = { - reboot = [ "systemctl" "reboot" ]; - - poweroff = [ "systemctl" "poweroff" ]; - }; - }; + terminal.vt = 1; + default_session = session; }; }; + environment.etc."greetd/environments".text = '' Hyprland ''; + environment.etc."greetd/hyprgreet.conf".text = '' + exec-once=gsettings set org.gnome.desktop.interface color-scheme 'prefer-dark' + + monitor=${config.programs.ironbar.monitor},3440x1440@180,0x0,1 + monitor=_,disable + + input { + force_no_accel = true + } + + misc { + disable_splash_rendering = true + disable_hyprland_logo = true + } + + exec-once=regreet --style /home/dashie/.config/gtk-3.0/gtk.css; hyprctl dispatch exit + ''; + # unlock GPG keyring on login security.pam.services.greetd.enableGnomeKeyring = true; } diff --git a/nix/flake.lock b/nix/flake.lock index 8c947d3..42051be 100644 --- a/nix/flake.lock +++ b/nix/flake.lock @@ -7,11 +7,11 @@ ] }, "locked": { - "lastModified": 1714860465, - "narHash": "sha256-yFR9gBqvuvN5eYjeV3/luZcWGQL/bDU04XWgW+H8RY4=", + "lastModified": 1715376791, + "narHash": "sha256-QKecFhWAB7sagSE+FXztINDqYqLro2nYp94f+ZtE/f4=", "owner": "KZDKM", "repo": "Hyprspace", - "rev": "1b3e07c7ac9ecb4e3486467a2bfb3267ee5043a2", + "rev": "8049b2794ca19d49320093426677d8c2911e7327", "type": "github" }, "original": { @@ -83,7 +83,7 @@ }, "flake-utils": { "inputs": { - "systems": "systems_2" + "systems": "systems_4" }, "locked": { "lastModified": 1705309234, @@ -101,7 +101,7 @@ }, "flake-utils_2": { "inputs": { - "systems": "systems_3" + "systems": "systems_5" }, "locked": { "lastModified": 1705309234, @@ -124,11 +124,11 @@ ] }, "locked": { - "lastModified": 1715077503, - "narHash": "sha256-AfHQshzLQfUqk/efMtdebHaQHqVntCMjhymQzVFLes0=", + "lastModified": 1715380449, + "narHash": "sha256-716+f9Rj3wjSyD1xitCv2FcYbgPz1WIVDj+ZBclH99Y=", "owner": "nix-community", "repo": "home-manager", - "rev": "6e277d9566de9976f47228dd8c580b97488734d4", + "rev": "d7682620185f213df384c363288093b486b2883f", "type": "github" }, "original": { @@ -176,11 +176,11 @@ "xdph": "xdph" }, "locked": { - "lastModified": 1715171420, - "narHash": "sha256-eMkwxLtoVHrIAJlb+xjA0jlFGqEweKwpzqY5uGhc2xA=", + "lastModified": 1715448710, + "narHash": "sha256-ntVaQOHnfejEiqHUY07kWrytdXVlXtg1RLv65T9w2/c=", "ref": "refs/heads/main", - "rev": "36d32973ddc1bd1d4096ec36f3b8cb507009eba4", - "revCount": 4635, + "rev": "494b9415a1157279a1e1782ba635fc2ef6a18155", + "revCount": 4668, "submodules": true, "type": "git", "url": "https://github.com/hyprwm/Hyprland" @@ -205,11 +205,11 @@ ] }, "locked": { - "lastModified": 1714869498, - "narHash": "sha256-vbLVOWvQqo4n1yvkg/Q70VTlPbMmTiCQfNTgcWDCfJM=", + "lastModified": 1691753796, + "narHash": "sha256-zOEwiWoXk3j3+EoF3ySUJmberFewWlagvewDRuWYAso=", "owner": "hyprwm", "repo": "hyprland-protocols", - "rev": "e06482e0e611130cd1929f75e8c1cf679e57d161", + "rev": "0c2ce70625cb30aef199cb388f99e19a61a6ce03", "type": "github" }, "original": { @@ -243,6 +243,48 @@ "type": "github" } }, + "hyprlang_2": { + "inputs": { + "nixpkgs": [ + "hyprlock", + "nixpkgs" + ], + "systems": "systems_2" + }, + "locked": { + "lastModified": 1713121246, + "narHash": "sha256-502X0Q0fhN6tJK7iEUA8CghONKSatW/Mqj4Wappd++0=", + "owner": "hyprwm", + "repo": "hyprlang", + "rev": "78fcaa27ae9e1d782faa3ff06c8ea55ddce63706", + "type": "github" + }, + "original": { + "owner": "hyprwm", + "repo": "hyprlang", + "type": "github" + } + }, + "hyprlock": { + "inputs": { + "hyprlang": "hyprlang_2", + "nixpkgs": "nixpkgs_3", + "systems": "systems_3" + }, + "locked": { + "lastModified": 1714843107, + "narHash": "sha256-89WxndRGO3CGuWE5XCaHKnsV3IKBRdOWqScp6o8enT4=", + "owner": "hyprwm", + "repo": "hyprlock", + "rev": "c87af3aa1f6e6bd06cffaabcc400bd45e26d565a", + "type": "github" + }, + "original": { + "owner": "hyprwm", + "repo": "hyprlock", + "type": "github" + } + }, "hyprwayland-scanner": { "inputs": { "nixpkgs": [ @@ -255,11 +297,11 @@ ] }, "locked": { - "lastModified": 1715090986, - "narHash": "sha256-FXpQvmS9R7alwZ47XK5UIcAbC9YKSxc0+GOVYqwa0jM=", + "lastModified": 1715287423, + "narHash": "sha256-B7AJIjOyWgVMKhu7DlOnWa0VprdhywUVHuB/j+EwSxM=", "owner": "hyprwm", "repo": "hyprwayland-scanner", - "rev": "94e32ec37e7215b16d5c1b41b1773ff6742e704b", + "rev": "e2fc1c0eb8b392110588f478cce644348ead7271", "type": "github" }, "original": { @@ -272,15 +314,15 @@ "inputs": { "crane": "crane", "naersk": "naersk", - "nixpkgs": "nixpkgs_4", + "nixpkgs": "nixpkgs_5", "rust-overlay": "rust-overlay" }, "locked": { - "lastModified": 1715072077, - "narHash": "sha256-5QA9qCtxW6uikNI1+qaWALaf6gRhkHCCoVLthJMviIY=", + "lastModified": 1715272723, + "narHash": "sha256-/pHq16sUYKOpwtSDDlnQ3M3lBy9abQq39UNSzadFd8w=", "owner": "JakeStanger", "repo": "ironbar", - "rev": "4695279d6927d05b6d3ed5a930e53f04d797c379", + "rev": "386955c1ea07869277b646c203f7b976d83db427", "type": "github" }, "original": { @@ -291,7 +333,7 @@ }, "naersk": { "inputs": { - "nixpkgs": "nixpkgs_3" + "nixpkgs": "nixpkgs_4" }, "locked": { "lastModified": 1713520724, @@ -340,11 +382,11 @@ }, "nixpkgs_2": { "locked": { - "lastModified": 1714253743, - "narHash": "sha256-mdTQw2XlariysyScCv2tTE45QSU9v/ezLcHJ22f0Nxc=", + "lastModified": 1715087517, + "narHash": "sha256-CLU5Tsg24Ke4+7sH8azHWXKd0CFd4mhLWfhYgUiDBpQ=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "58a1abdbae3217ca6b702f03d3b35125d88a2994", + "rev": "b211b392b8486ee79df6cdfb1157ad2133427a29", "type": "github" }, "original": { @@ -355,6 +397,22 @@ } }, "nixpkgs_3": { + "locked": { + "lastModified": 1715266358, + "narHash": "sha256-doPgfj+7FFe9rfzWo1siAV2mVCasW+Bh8I1cToAXEE4=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "f1010e0469db743d14519a1efd37e23f8513d714", + "type": "github" + }, + "original": { + "owner": "NixOS", + "ref": "nixos-unstable", + "repo": "nixpkgs", + "type": "github" + } + }, + "nixpkgs_4": { "locked": { "lastModified": 1714314149, "narHash": "sha256-yNAevSKF4krRWacmLUsLK7D7PlfuY3zF0lYnGYNi9vQ=", @@ -368,7 +426,7 @@ "type": "indirect" } }, - "nixpkgs_4": { + "nixpkgs_5": { "locked": { "lastModified": 1714253743, "narHash": "sha256-mdTQw2XlariysyScCv2tTE45QSU9v/ezLcHJ22f0Nxc=", @@ -384,13 +442,13 @@ "type": "github" } }, - "nixpkgs_5": { + "nixpkgs_6": { "locked": { - "lastModified": 1714906307, - "narHash": "sha256-UlRZtrCnhPFSJlDQE7M0eyhgvuuHBTe1eJ9N9AQlJQ0=", + "lastModified": 1715266358, + "narHash": "sha256-doPgfj+7FFe9rfzWo1siAV2mVCasW+Bh8I1cToAXEE4=", "owner": "NixOs", "repo": "nixpkgs", - "rev": "25865a40d14b3f9cf19f19b924e2ab4069b09588", + "rev": "f1010e0469db743d14519a1efd37e23f8513d714", "type": "github" }, "original": { @@ -400,7 +458,7 @@ "type": "github" } }, - "nixpkgs_6": { + "nixpkgs_7": { "locked": { "lastModified": 1706487304, "narHash": "sha256-LE8lVX28MV2jWJsidW13D2qrHU/RUUONendL2Q/WlJg=", @@ -422,9 +480,10 @@ "anyrun": "anyrun", "home-manager": "home-manager", "hyprland": "hyprland", + "hyprlock": "hyprlock", "ironbar": "ironbar", "nix-flatpak": "nix-flatpak", - "nixpkgs": "nixpkgs_5", + "nixpkgs": "nixpkgs_6", "rust-overlay": "rust-overlay_2" } }, @@ -453,11 +512,11 @@ "rust-overlay_2": { "inputs": { "flake-utils": "flake-utils_2", - "nixpkgs": "nixpkgs_6" + "nixpkgs": "nixpkgs_7" }, "locked": { - "lastModified": 1715134005, - "narHash": "sha256-oujsCgNiQnZoQntNkkNkA7BhCmUvf9FLWj+2oGT2Jvc=", + "lastModified": 1715393623, + "narHash": "sha256-nSUFcUqyTQQ/aYFIB05mpCzytcKvfKMy3ZQAe0fP26A=", "type": "tarball", "url": "https://github.com/oxalica/rust-overlay/archive/master.tar.gz" }, @@ -482,6 +541,36 @@ } }, "systems_2": { + "locked": { + "lastModified": 1689347949, + "narHash": "sha256-12tWmuL2zgBgZkdoB6qXZsgJEH9LR3oUgpaQq2RbI80=", + "owner": "nix-systems", + "repo": "default-linux", + "rev": "31732fcf5e8fea42e59c2488ad31a0e651500f68", + "type": "github" + }, + "original": { + "owner": "nix-systems", + "repo": "default-linux", + "type": "github" + } + }, + "systems_3": { + "locked": { + "lastModified": 1689347949, + "narHash": "sha256-12tWmuL2zgBgZkdoB6qXZsgJEH9LR3oUgpaQq2RbI80=", + "owner": "nix-systems", + "repo": "default-linux", + "rev": "31732fcf5e8fea42e59c2488ad31a0e651500f68", + "type": "github" + }, + "original": { + "owner": "nix-systems", + "repo": "default-linux", + "type": "github" + } + }, + "systems_4": { "locked": { "lastModified": 1681028828, "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=", @@ -496,7 +585,7 @@ "type": "github" } }, - "systems_3": { + "systems_5": { "locked": { "lastModified": 1681028828, "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=", @@ -528,11 +617,11 @@ ] }, "locked": { - "lastModified": 1714060055, - "narHash": "sha256-j43TS9wv9luaAlpxcxw0sjxkbcc2mGANVR2RYgo3RCw=", + "lastModified": 1714662532, + "narHash": "sha256-Pj2xGSYhapYbXL7sk7TTlOtCZcTfPQoL3fPbZeg7L4Y=", "owner": "hyprwm", "repo": "xdg-desktop-portal-hyprland", - "rev": "0fe840441e43da12cd7865ed9aa8cdc35a8da85a", + "rev": "1f228ba2f1f254195c0b571302b37482861abee3", "type": "github" }, "original": { diff --git a/nix/flake.nix b/nix/flake.nix index 973d8ca..58f47c2 100644 --- a/nix/flake.nix +++ b/nix/flake.nix @@ -16,6 +16,8 @@ hyprland.url = "git+https://github.com/hyprwm/Hyprland?submodules=1"; + hyprlock.url = "github:hyprwm/hyprlock"; + Hyprspace = { url = "github:KZDKM/Hyprspace"; inputs.hyprland.follows = "hyprland"; diff --git a/nix/hardware/marmo/configuration.nix b/nix/hardware/marmo/configuration.nix index e7188c9..89ca0f6 100644 --- a/nix/hardware/marmo/configuration.nix +++ b/nix/hardware/marmo/configuration.nix @@ -2,9 +2,10 @@ { imports = [ ../../modules/gamemode.nix + ../../modules/boot_params.nix ]; boot.kernelPackages = pkgs.linuxPackages_zen; - boot.kernelParams = [ + programs.boot.boot_params = [ "amdgpu.ppfeaturemask=0xffffffff" ]; networking.hostName = "marmo"; diff --git a/nix/hardware/marmo/marmo.nix b/nix/hardware/marmo/marmo.nix index 7e76815..3969c18 100644 --- a/nix/hardware/marmo/marmo.nix +++ b/nix/hardware/marmo/marmo.nix @@ -5,42 +5,9 @@ (modulesPath + "/installer/scan/not-detected.nix") ]; - boot.initrd.availableKernelModules = [ "nvme" "xhci_pci" "ahci" "usbhid" "usb_storage" "sd_mod" ]; boot.initrd.kernelModules = [ ]; boot.extraModulePackages = [ ]; - fileSystems."/" = - { - device = "/dev/disk/by-label/ROOT"; - fsType = "btrfs"; - options = [ - "noatime" - "nodiratime" - "discard" - ]; - }; - - fileSystems."/boot" = - { - device = "/dev/disk/by-label/BOOT"; - fsType = "vfat"; - options = [ "rw" "fmask=0022" "dmask=0022" "noatime" ]; - }; - - fileSystems."/home" = - { - device = "/dev/disk/by-label/HOME"; - fsType = "btrfs"; - options = [ - "noatime" - "nodiratime" - "discard" - ]; - }; - - swapDevices = - [{ device = "/dev/disk/by-label/SWAP"; }]; - # Enables DHCP on each ethernet and wireless interface. In case of scripted networking # (the default) this is the recommended approach. When using systemd-networkd it's # still possible to use this option, but it's recommended to use it in conjunction diff --git a/nix/hardware/overheating/overheating.nix b/nix/hardware/overheating/overheating.nix index 6371d50..e30f979 100644 --- a/nix/hardware/overheating/overheating.nix +++ b/nix/hardware/overheating/overheating.nix @@ -5,43 +5,10 @@ (modulesPath + "/installer/scan/not-detected.nix") ]; - boot.initrd.availableKernelModules = [ "nvme" "xhci_pci" "ahci" "usbhid" "usb_storage" "sd_mod" ]; boot.initrd.kernelModules = [ ]; boot.kernelModules = [ "kvm-amd" ]; boot.extraModulePackages = [ ]; - fileSystems."/" = - { - device = "/dev/disk/by-label/ROOT"; - fsType = "btrfs"; - options = [ - "noatime" - "nodiratime" - "discard" - ]; - }; - - fileSystems."/boot" = - { - device = "/dev/disk/by-label/BOOT"; - fsType = "vfat"; - options = [ "rw" "fmask=0022" "dmask=0022" "noatime" ]; - }; - - fileSystems."/home" = - { - device = "/dev/disk/by-label/HOME"; - fsType = "btrfs"; - options = [ - "noatime" - "nodiratime" - "discard" - ]; - }; - - swapDevices = - [{ device = "/dev/disk/by-label/SWAP"; }]; - # Enables DHCP on each ethernet and wireless interface. In case of scripted networking # (the default) this is the recommended approach. When using systemd-networkd it's # still possible to use this option, but it's recommended to use it in conjunction diff --git a/nix/hardware/spaceship/configuration.nix b/nix/hardware/spaceship/configuration.nix index 6a5f078..a13352f 100644 --- a/nix/hardware/spaceship/configuration.nix +++ b/nix/hardware/spaceship/configuration.nix @@ -1,7 +1,12 @@ -{ pkgs, ... }: +{ pkgs, lib, ... }: { - boot.kernelPackages = pkgs.linuxPackages_zen; - boot.kernelParams = [ + imports = [ + ../../modules/gamemode.nix + ../../modules/boot_params.nix + ../../modules/ironbar_config.nix + ]; + boot.kernelPackages = pkgs.linuxPackages_xanmod_latest; + programs.boot.boot_params = [ "amdgpu.ppfeaturemask=0xffffffff" ]; networking.hostName = "spaceship"; @@ -9,11 +14,22 @@ programs.gamemode = { device = 0; }; - environment.systemPackages = with pkgs; [ - linuxKernel.packages.linux_zen.virtualbox - ]; - - virtualisation.virtualbox.host.enable = true; users.extraGroups.vboxusers.members = [ "dashie" ]; - virtualisation.virtualbox.guest.enable = true; + virtualisation.virtualbox.host.enable = true; + + # enable hardware acceleration and rocm + hardware.xone.enable = true; + hardware.opengl.extraPackages = with pkgs; [ + libvdpau-va-gl + vaapiVdpau + rocmPackages.clr.icd + rocm-opencl-runtime + ]; + hardware.opengl = { + enable = true; + driSupport = lib.mkDefault true; + driSupport32Bit = lib.mkDefault true; + }; + boot.initrd.kernelModules = [ "amdgpu" ]; + programs.ironbar.monitor = "DP-1"; } diff --git a/nix/hardware/spaceship/spaceship.nix b/nix/hardware/spaceship/spaceship.nix index a38ae70..43ae303 100644 --- a/nix/hardware/spaceship/spaceship.nix +++ b/nix/hardware/spaceship/spaceship.nix @@ -5,40 +5,10 @@ (modulesPath + "/installer/scan/not-detected.nix") ]; - boot.initrd.availableKernelModules = [ "nvme" "xhci_pci" "ahci" "usbhid" "usb_storage" "sd_mod" ]; boot.initrd.kernelModules = [ ]; boot.kernelModules = [ "kvm-amd" ]; boot.extraModulePackages = [ ]; - fileSystems."/" = - { - device = "/dev/disk/by-label/ROOT"; - fsType = "btrfs"; - options = [ - "noatime" - "nodiratime" - "discard" - ]; - }; - - fileSystems."/boot" = - { - device = "/dev/disk/by-label/BOOT"; - fsType = "vfat"; - options = [ "rw" "fmask=0022" "dmask=0022" "noatime" ]; - }; - - fileSystems."/home" = - { - device = "/dev/disk/by-label/HOME"; - fsType = "btrfs"; - options = [ - "noatime" - "nodiratime" - "discard" - ]; - }; - fileSystems."/drive2" = { device = "/dev/disk/by-label/DRIVE2"; @@ -50,10 +20,6 @@ ]; }; - - swapDevices = - [{ device = "/dev/disk/by-label/SWAP"; }]; - # Enables DHCP on each ethernet and wireless interface. In case of scripted networking # (the default) this is the recommended approach. When using systemd-networkd it's # still possible to use this option, but it's recommended to use it in conjunction diff --git a/nix/modules/boot_params.nix b/nix/modules/boot_params.nix new file mode 100644 index 0000000..6df3ee5 --- /dev/null +++ b/nix/modules/boot_params.nix @@ -0,0 +1,11 @@ +{ lib, ... }: { + options.programs.boot = { + boot_params = lib.mkOption { + default = [ ]; + example = [ "resume=something" ]; + description = '' + Boot params + ''; + }; + }; +} diff --git a/nix/programs/coding.nix b/nix/programs/coding.nix index c7658d6..16edde3 100644 --- a/nix/programs/coding.nix +++ b/nix/programs/coding.nix @@ -7,33 +7,62 @@ ]; home.packages = with pkgs; [ + #basics git gcc meson ninja - rustup - go - nodejs_20 - deno - python3 - typst - typst-lsp - typstfmt - neovide tree-sitter - dotnet-sdk unzip pkg-config sqlite plantuml + d-spy + + #editors + neovide + ##fallback vscodium + + #rust + rustup + + #python + python3 + python312Packages.python-lsp-server + python312Packages.python-lsp-ruff + python312Packages.python-lsp-black + + #ts/js + nodejs_20 + deno + typescript + nodePackages.typescript-language-server + nodePackages.prettier + + #go + go + gopls + + #typst + typst + typst-lsp + typstfmt + ltex-ls + + #java gradle maven jdt-language-server adoptopenjdk-jre-bin + + #.! + dotnet-sdk_8 omnisharp-roslyn csharpier - #vscode-extensions.vscjava.vscode-java-test - #vscode-extensions.vscjava.vscode-java-debug + + #zig + zig + zls ]; } diff --git a/nix/programs/common.nix b/nix/programs/common.nix index 0c466b4..b4f59d3 100644 --- a/nix/programs/common.nix +++ b/nix/programs/common.nix @@ -26,8 +26,6 @@ in flatpak networkmanager zoxide - pkgs.greetd.greetd - pkgs.greetd.regreet fastfetch pkgs.gnome.gnome-keyring dbus @@ -42,12 +40,13 @@ in zenith nh amberol - satty pulseaudio playerctl ncspot poppler_utils neofetch + brave + greetd.regreet (callPackage ../override/oxinoti.nix { }) diff --git a/nix/programs/default.nix b/nix/programs/default.nix index 6fcf858..1418c7b 100644 --- a/nix/programs/default.nix +++ b/nix/programs/default.nix @@ -2,19 +2,10 @@ let base_imports = [ inputs.hyprland.homeManagerModules.default + inputs.hyprlock.homeManagerModules.default inputs.anyrun.homeManagerModules.default inputs.ironbar.homeManagerModules.default inputs.nix-flatpak.homeManagerModules.nix-flatpak - ./hyprland/default.nix - ./flatpak.nix - ./common.nix - ./coding.nix - ./xdg.nix - ./media.nix - ./utils.nix - ./oxi/default.nix - ./themes/default.nix - ./individual_configs/default.nix ]; in { @@ -22,16 +13,30 @@ in xdg.portal = { enable = true; extraPortals = [ - pkgs.xdg-desktop-portal-hyprland pkgs.xdg-desktop-portal-gtk ]; }; home-manager.useGlobalPkgs = true; home-manager.useUserPackages = true; - home-manager.users.dashie.imports = [ - { - _module = { args = { inherit inputs; }; }; - } - mod - ] ++ base_imports; + + home-manager.users.dashie = { + #home-manager overlap -> use flake instead + disabledModules = [ "programs/hyprlock.nix" ]; + imports = [ + { + _module = { args = { inherit inputs; }; }; + } + ./hyprland/default.nix + ./flatpak.nix + ./common.nix + ./coding.nix + ./xdg.nix + ./media.nix + ./utils.nix + ./oxi/default.nix + ./themes/default.nix + ./individual_configs/default.nix + mod + ] ++ base_imports; + }; } diff --git a/nix/programs/flatpak.nix b/nix/programs/flatpak.nix index 1e1551b..4abc89d 100644 --- a/nix/programs/flatpak.nix +++ b/nix/programs/flatpak.nix @@ -6,13 +6,9 @@ }]; services.flatpak.uninstallUnmanaged = true; services.flatpak.packages = [ + # fallback if necessary, but generally avoided as nix is superior :) "com.github.tchx84.Flatseal" "io.github.Foldex.AdwSteamGtk" - "org.gnome.dspy" - "org.onlyoffice.desktopeditors" - "org.gtk.Gtk3theme.adw-gtk3" - "com.brave.Browser" - "com.rustdesk.RustDesk" ]; } diff --git a/nix/programs/gaming/default.nix b/nix/programs/gaming/default.nix index 0e0d07b..5216390 100644 --- a/nix/programs/gaming/default.nix +++ b/nix/programs/gaming/default.nix @@ -12,9 +12,9 @@ steam lutris wine + adwsteamgtk ]; - hardware.xone.enable = true; programs.steam.enable = true; programs.gamemode.enable = true; programs.gamemode = { diff --git a/nix/programs/hyprland/config.nix b/nix/programs/hyprland/config.nix index 73fcbed..f3ab6b6 100644 --- a/nix/programs/hyprland/config.nix +++ b/nix/programs/hyprland/config.nix @@ -30,7 +30,7 @@ "$mod SUPER,G,exec,oxicalc" "$mod SUPER,D,exec,oxishut" "$mod SUPER,A,exec,oxipaste" - "$mod SUPERSHIFT,L,exec, playerctl -a pause & swaylock -c 000000 & systemctl suspend" + "$mod SUPERSHIFT,L,exec, playerctl -a pause & hyprlock & systemctl hibernate" # media keys ",XF86AudioMute,exec, $HOME/.config/scripts/audio_control.sh mute" @@ -166,9 +166,12 @@ disable_splash_rendering = true; disable_hyprland_logo = true; swallow_regex = "^(.*)(kitty)(.*)$"; + initial_workspace_tracking = 1; + }; + + cursor = { # conversion seems to be borked right now, i want a smooth bibata :( enable_hyprcursor = false; - initial_workspace_tracking = 1; }; gestures = { @@ -186,7 +189,7 @@ "XCURSOR_THEME,Bibata-Modern-Classic" "XCURSOR_SIZE,24" "QT_QPA_PLATFORM,wayland" - "QT_QPA_PLATFORMTHEME = \"qt5ct\"" + "QT_QPA_PLATFORMTHEME,qt5ct" "QT_WAYLAND_FORCE_DPI,96" "QT_AUTO_SCREEN_SCALE_FACTOR,0" "QT_WAYLAND_DISABLE_WINDOWDECORATION,1" diff --git a/nix/programs/hyprland/default.nix b/nix/programs/hyprland/default.nix index 8b9fcd8..6a444ca 100644 --- a/nix/programs/hyprland/default.nix +++ b/nix/programs/hyprland/default.nix @@ -1,4 +1,5 @@ -{ pkgs +{ inputs +, pkgs , ... }: { imports = [ @@ -6,22 +7,20 @@ ./config.nix ./ironbar.nix ./hyprpaper.nix - ./hyprgreet.nix + ./hyprlock.nix ]; home.packages = with pkgs; [ xorg.xprop grim slurp - swappy + satty xdg-desktop-portal-gtk - xdg-desktop-portal-hyprland - hyprpaper + # xdg-desktop-portal-hyprland copyq gnome.nautilus gnome.sushi wl-clipboard - kooha hyprcursor hyprpaper hyprpicker diff --git a/nix/programs/hyprland/hyprgreet.nix b/nix/programs/hyprland/hyprgreet.nix deleted file mode 100644 index c3011d2..0000000 --- a/nix/programs/hyprland/hyprgreet.nix +++ /dev/null @@ -1,23 +0,0 @@ -{ - xdg.configFile."hypr/hyprgreet.conf" = { - text = - '' - exec-once=gsettings set org.gnome.desktop.interface color-scheme 'prefer-dark' - - monitor=DP-1,3440x1440@180,0x0,1 - monitor=DP-2,disable - monitor=HDMI-A-1,disable - - input { - force_no_accel = true - } - - misc { - disable_splash_rendering = true - disable_hyprland_logo = true - } - - exec-once=regreet --style /home/dashie/.config/gtk-3.0/gtk.css; hyprctl dispatch exit - ''; - }; -} diff --git a/nix/programs/hyprland/hyprlock.nix b/nix/programs/hyprland/hyprlock.nix new file mode 100644 index 0000000..99ed9d9 --- /dev/null +++ b/nix/programs/hyprland/hyprlock.nix @@ -0,0 +1,37 @@ +{ pkgs +, inputs +, config +, ... +}: +{ + programs.hyprlock.enable = true; + programs.hyprlock = { + + backgrounds = [ + { + monitor = ""; + path = ""; + color = "rgba(26, 27, 38, 1.0)"; + } + ]; + + input-fields = [ + { + monitor = "${config.programs.ironbar.monitor}"; + + placeholder_text = "password or something"; + } + ]; + + labels = [ + { + monitor = ""; + text = "$TIME"; + font_size = 50; + valign = "center"; + halign = "center"; + } + ]; + + }; +} diff --git a/nix/programs/media.nix b/nix/programs/media.nix index 7fc5c33..8f6dc12 100644 --- a/nix/programs/media.nix +++ b/nix/programs/media.nix @@ -14,6 +14,7 @@ zathura evince libreoffice-fresh + onlyoffice-bin pdftk # spotify #ncspot @@ -23,7 +24,9 @@ inkscape gimp krita - # recording - obs-studio + ]; + programs.obs-studio.enable = true; + programs.obs-studio.plugins = with pkgs; [ + obs-studio-plugins.obs-vaapi ]; } diff --git a/nix/programs/themes/gtk4.nix b/nix/programs/themes/gtk4.nix index 2884504..e9caa0a 100644 --- a/nix/programs/themes/gtk4.nix +++ b/nix/programs/themes/gtk4.nix @@ -1,109 +1,109 @@ { # TODO: reenable this again # right now its broken because flatpak... - # xdg.configFile."gtk-4.0/gtk.css" = { - # text = - # '' - # /* - # Generated with Gradience - # - # Issues caused by theming should be reported to Gradience repository, and not to upstream - # - # https://github.com/GradienceTeam/Gradience - # */ - # - # @define-color accent_color #a9b1d6; - # @define-color accent_bg_color #a9b1d6; - # @define-color accent_fg_color rgba(0, 0, 0, 0.87); - # @define-color destructive_color #F28B82; - # @define-color destructive_bg_color #F28B82; - # @define-color destructive_fg_color rgba(0, 0, 0, 0.87); - # @define-color success_color #81C995; - # @define-color success_bg_color #81C995; - # @define-color success_fg_color rgba(0, 0, 0, 0.87); - # @define-color warning_color #FDD633; - # @define-color warning_bg_color #FDD633; - # @define-color warning_fg_color rgba(0, 0, 0, 0.87); - # @define-color error_color #F28B82; - # @define-color error_bg_color #F28B82; - # @define-color error_fg_color rgba(0, 0, 0, 0.87); - # @define-color window_bg_color #1a1b26; - # @define-color window_fg_color #c0caf5; - # @define-color view_bg_color #1a1b26; - # @define-color view_fg_color #c0caf5; - # @define-color headerbar_bg_color #1a1b26; - # @define-color headerbar_fg_color #c0caf5; - # @define-color headerbar_border_color rgba(192, 202, 245, 0.12); - # @define-color headerbar_backdrop_color @window_bg_color; - # @define-color headerbar_shade_color rgba(0, 0, 0, 0.36); - # @define-color card_bg_color #1a1b26; - # @define-color card_fg_color #c0caf5; - # @define-color card_shade_color rgba(0, 0, 0, 0.36); - # @define-color dialog_bg_color #1a1b26; - # @define-color dialog_fg_color #c0caf5; - # @define-color popover_bg_color #1a1b26; - # @define-color popover_fg_color #c0caf5; - # @define-color shade_color rgba(0, 0, 0, 0.36); - # @define-color scrollbar_outline_color rgba(0, 0, 0, 0.5); - # @define-color sidebar_bg_color #1a1b26; - # @define-color sidebar_fg_color #c0caf5; - # @define-color secondary_sidebar_bg_color #1a1b26; - # @define-color secondary_sidebar_fg_color #c0caf5; - # @define-color sidebar_shade_color rgba(0, 0, 0, 0.36); - # @define-color secondary_sidebar_shade_color rgba(0, 0, 0, 0.36); - # @define-color thumbnail_bg_color #1a1b26; - # @define-color thumbnail_fg_color #c0caf5; - # @define-color sidebar_backdrop_color @sidebar_bg_color; - # @define-color secondary_sidebar_backdrop_color @sidebar_bg_color; - # @define-color blue_1 #99c1f1; - # @define-color blue_2 #62a0ea; - # @define-color blue_3 #3584e4; - # @define-color blue_4 #1c71d8; - # @define-color blue_5 #1a5fb4; - # @define-color green_1 #8ff0a4; - # @define-color green_2 #57e389; - # @define-color green_3 #33d17a; - # @define-color green_4 #2ec27e; - # @define-color green_5 #26a269; - # @define-color yellow_1 #f9f06b; - # @define-color yellow_2 #f8e45c; - # @define-color yellow_3 #f6d32d; - # @define-color yellow_4 #f5c211; - # @define-color yellow_5 #e5a50a; - # @define-color orange_1 #ffbe6f; - # @define-color orange_2 #ffa348; - # @define-color orange_3 #ff7800; - # @define-color orange_4 #e66100; - # @define-color orange_5 #c64600; - # @define-color red_1 #f66151; - # @define-color red_2 #ed333b; - # @define-color red_3 #e01b24; - # @define-color red_4 #c01c28; - # @define-color red_5 #a51d2d; - # @define-color purple_1 #dc8add; - # @define-color purple_2 #c061cb; - # @define-color purple_3 #9141ac; - # @define-color purple_4 #813d9c; - # @define-color purple_5 #613583; - # @define-color brown_1 #cdab8f; - # @define-color brown_2 #b5835a; - # @define-color brown_3 #986a44; - # @define-color brown_4 #865e3c; - # @define-color brown_5 #63452c; - # @define-color light_1 #ffffff; - # @define-color light_2 #f6f5f4; - # @define-color light_3 #deddda; - # @define-color light_4 #c0bfbc; - # @define-color light_5 #9a9996; - # @define-color dark_1 #77767b; - # @define-color dark_2 #5e5c64; - # @define-color dark_3 #3d3846; - # @define-color dark_4 #241f31; - # @define-color dark_5 #000000; - # - # .navigation-sidebar { - # background-color: #1a1b26; - # } - # ''; - # }; + xdg.configFile."gtk-4.0/gtk.css" = { + text = + '' + /* + Generated with Gradience + + Issues caused by theming should be reported to Gradience repository, and not to upstream + + https://github.com/GradienceTeam/Gradience + */ + + @define-color accent_color #a9b1d6; + @define-color accent_bg_color #a9b1d6; + @define-color accent_fg_color rgba(0, 0, 0, 0.87); + @define-color destructive_color #F28B82; + @define-color destructive_bg_color #F28B82; + @define-color destructive_fg_color rgba(0, 0, 0, 0.87); + @define-color success_color #81C995; + @define-color success_bg_color #81C995; + @define-color success_fg_color rgba(0, 0, 0, 0.87); + @define-color warning_color #FDD633; + @define-color warning_bg_color #FDD633; + @define-color warning_fg_color rgba(0, 0, 0, 0.87); + @define-color error_color #F28B82; + @define-color error_bg_color #F28B82; + @define-color error_fg_color rgba(0, 0, 0, 0.87); + @define-color window_bg_color #1a1b26; + @define-color window_fg_color #c0caf5; + @define-color view_bg_color #1a1b26; + @define-color view_fg_color #c0caf5; + @define-color headerbar_bg_color #1a1b26; + @define-color headerbar_fg_color #c0caf5; + @define-color headerbar_border_color rgba(192, 202, 245, 0.12); + @define-color headerbar_backdrop_color @window_bg_color; + @define-color headerbar_shade_color rgba(0, 0, 0, 0.36); + @define-color card_bg_color #1a1b26; + @define-color card_fg_color #c0caf5; + @define-color card_shade_color rgba(0, 0, 0, 0.36); + @define-color dialog_bg_color #1a1b26; + @define-color dialog_fg_color #c0caf5; + @define-color popover_bg_color #1a1b26; + @define-color popover_fg_color #c0caf5; + @define-color shade_color rgba(0, 0, 0, 0.36); + @define-color scrollbar_outline_color rgba(0, 0, 0, 0.5); + @define-color sidebar_bg_color #1a1b26; + @define-color sidebar_fg_color #c0caf5; + @define-color secondary_sidebar_bg_color #1a1b26; + @define-color secondary_sidebar_fg_color #c0caf5; + @define-color sidebar_shade_color rgba(0, 0, 0, 0.36); + @define-color secondary_sidebar_shade_color rgba(0, 0, 0, 0.36); + @define-color thumbnail_bg_color #1a1b26; + @define-color thumbnail_fg_color #c0caf5; + @define-color sidebar_backdrop_color @sidebar_bg_color; + @define-color secondary_sidebar_backdrop_color @sidebar_bg_color; + @define-color blue_1 #99c1f1; + @define-color blue_2 #62a0ea; + @define-color blue_3 #3584e4; + @define-color blue_4 #1c71d8; + @define-color blue_5 #1a5fb4; + @define-color green_1 #8ff0a4; + @define-color green_2 #57e389; + @define-color green_3 #33d17a; + @define-color green_4 #2ec27e; + @define-color green_5 #26a269; + @define-color yellow_1 #f9f06b; + @define-color yellow_2 #f8e45c; + @define-color yellow_3 #f6d32d; + @define-color yellow_4 #f5c211; + @define-color yellow_5 #e5a50a; + @define-color orange_1 #ffbe6f; + @define-color orange_2 #ffa348; + @define-color orange_3 #ff7800; + @define-color orange_4 #e66100; + @define-color orange_5 #c64600; + @define-color red_1 #f66151; + @define-color red_2 #ed333b; + @define-color red_3 #e01b24; + @define-color red_4 #c01c28; + @define-color red_5 #a51d2d; + @define-color purple_1 #dc8add; + @define-color purple_2 #c061cb; + @define-color purple_3 #9141ac; + @define-color purple_4 #813d9c; + @define-color purple_5 #613583; + @define-color brown_1 #cdab8f; + @define-color brown_2 #b5835a; + @define-color brown_3 #986a44; + @define-color brown_4 #865e3c; + @define-color brown_5 #63452c; + @define-color light_1 #ffffff; + @define-color light_2 #f6f5f4; + @define-color light_3 #deddda; + @define-color light_4 #c0bfbc; + @define-color light_5 #9a9996; + @define-color dark_1 #77767b; + @define-color dark_2 #5e5c64; + @define-color dark_3 #3d3846; + @define-color dark_4 #241f31; + @define-color dark_5 #000000; + + .navigation-sidebar { + background-color: #1a1b26; + } + ''; + }; } diff --git a/nix/programs/themes/qt.nix b/nix/programs/themes/qt.nix index e305cf9..68fb5e5 100644 --- a/nix/programs/themes/qt.nix +++ b/nix/programs/themes/qt.nix @@ -24,9 +24,6 @@ in xdg.configFile."qt5ct/qss/tab.qss" = { text = "${qss}"; }; - xdg.configFile."qt6ct/qss/tab.qss" = { - text = "${qss}"; - }; xdg.configFile."qt5ct/qt5ct.conf" = { text = ''