From 7b26c3e2353e693fac27ec52fc894f3dd5eb754d Mon Sep 17 00:00:00 2001 From: cnst Date: Sat, 27 Jul 2024 18:33:03 +0200 Subject: [PATCH] hyprland changes --- flake.lock | 487 +++++++++++++++++- flake.nix | 39 ++ home/core/gui/browsers/default.nix | 12 +- home/core/gui/hypr/default.nix | 5 +- nixos/hosts/adampad/imports.nix | 1 - nixos/hosts/cnix/imports.nix | 1 - .../hosts/toothpc/hardware-configuration.nix | 25 +- nixos/hosts/toothpc/imports.nix | 1 - 8 files changed, 533 insertions(+), 38 deletions(-) diff --git a/flake.lock b/flake.lock index 2d1d3bd9..152f68c1 100644 --- a/flake.lock +++ b/flake.lock @@ -1,5 +1,38 @@ { "nodes": { + "aquamarine": { + "inputs": { + "hyprutils": [ + "hyprland", + "hyprutils" + ], + "hyprwayland-scanner": [ + "hyprland", + "hyprwayland-scanner" + ], + "nixpkgs": [ + "hyprland", + "nixpkgs" + ], + "systems": [ + "hyprland", + "systems" + ] + }, + "locked": { + "lastModified": 1721992626, + "narHash": "sha256-GFDSPWxOqEkNrbuSfyoQHGIaRhJNapn2Rv0EEmBGR9A=", + "owner": "hyprwm", + "repo": "aquamarine", + "rev": "f95d1509370b7f40ef356ff69a332bd0356ab044", + "type": "github" + }, + "original": { + "owner": "hyprwm", + "repo": "aquamarine", + "type": "github" + } + }, "cachix": { "locked": { "lastModified": 1635350005, @@ -214,7 +247,7 @@ }, "flake-utils_3": { "inputs": { - "systems": "systems_2" + "systems": "systems_3" }, "locked": { "lastModified": 1710146030, @@ -232,7 +265,7 @@ }, "flake-utils_4": { "inputs": { - "systems": "systems_3" + "systems": "systems_4" }, "locked": { "lastModified": 1710146030, @@ -250,7 +283,7 @@ }, "flake-utils_5": { "inputs": { - "systems": "systems_5" + "systems": "systems_6" }, "locked": { "lastModified": 1710146030, @@ -430,13 +463,366 @@ "type": "github" } }, + "hyprcursor": { + "inputs": { + "hyprlang": [ + "hyprland", + "hyprlang" + ], + "nixpkgs": [ + "hyprland", + "nixpkgs" + ], + "systems": [ + "hyprland", + "systems" + ] + }, + "locked": { + "lastModified": 1721330371, + "narHash": "sha256-aYlHTWylczLt6ERJyg6E66Y/XSCbVL7leVcRuJmVbpI=", + "owner": "hyprwm", + "repo": "hyprcursor", + "rev": "4493a972b48f9c3014befbbf381ed5fff91a65dc", + "type": "github" + }, + "original": { + "owner": "hyprwm", + "repo": "hyprcursor", + "type": "github" + } + }, + "hypridle": { + "inputs": { + "hyprlang": [ + "hyprland", + "hyprlang" + ], + "hyprutils": "hyprutils", + "nixpkgs": [ + "hyprland", + "nixpkgs" + ], + "systems": [ + "hyprland", + "systems" + ] + }, + "locked": { + "lastModified": 1721332982, + "narHash": "sha256-UiNq9EDnnWXaG7d5AExvPlzapuw4VyWnFHTo38Q3kn4=", + "owner": "hyprwm", + "repo": "hypridle", + "rev": "e5366d34b5e1f06a1233667cded3ef05b482778c", + "type": "github" + }, + "original": { + "owner": "hyprwm", + "repo": "hypridle", + "type": "github" + } + }, + "hyprland": { + "inputs": { + "aquamarine": "aquamarine", + "hyprcursor": "hyprcursor", + "hyprlang": "hyprlang", + "hyprutils": "hyprutils_2", + "hyprwayland-scanner": "hyprwayland-scanner", + "nixpkgs": "nixpkgs", + "systems": "systems_2", + "xdph": "xdph" + }, + "locked": { + "lastModified": 1722096947, + "narHash": "sha256-uMt45fyadfOsfvxd9hGVle/ebsL5Zmu0E6w1th7TEi0=", + "ref": "refs/heads/main", + "rev": "ae638d997d45e6183adafc6942b1b8fcc70f8928", + "revCount": 4996, + "submodules": true, + "type": "git", + "url": "https://github.com/hyprwm/Hyprland" + }, + "original": { + "submodules": true, + "type": "git", + "url": "https://github.com/hyprwm/Hyprland" + } + }, + "hyprland-protocols": { + "inputs": { + "nixpkgs": [ + "hyprland", + "xdph", + "nixpkgs" + ], + "systems": [ + "hyprland", + "xdph", + "systems" + ] + }, + "locked": { + "lastModified": 1718746314, + "narHash": "sha256-HUklK5u86w2Yh9dOkk4FdsL8eehcOZ95jPhLixGDRQY=", + "owner": "hyprwm", + "repo": "hyprland-protocols", + "rev": "1b61f0093afff20ab44d88ad707aed8bf2215290", + "type": "github" + }, + "original": { + "owner": "hyprwm", + "repo": "hyprland-protocols", + "type": "github" + } + }, + "hyprlang": { + "inputs": { + "hyprutils": [ + "hyprland", + "hyprutils" + ], + "nixpkgs": [ + "hyprland", + "nixpkgs" + ], + "systems": [ + "hyprland", + "systems" + ] + }, + "locked": { + "lastModified": 1721324361, + "narHash": "sha256-BiJKO0IIdnSwHQBSrEJlKlFr753urkLE48wtt0UhNG4=", + "owner": "hyprwm", + "repo": "hyprlang", + "rev": "adbefbf49664a6c2c8bf36b6487fd31e3eb68086", + "type": "github" + }, + "original": { + "owner": "hyprwm", + "repo": "hyprlang", + "type": "github" + } + }, + "hyprlock": { + "inputs": { + "hyprlang": [ + "hyprland", + "hyprlang" + ], + "hyprutils": "hyprutils_3", + "nixpkgs": [ + "hyprland", + "nixpkgs" + ], + "systems": [ + "hyprland", + "systems" + ] + }, + "locked": { + "lastModified": 1721855891, + "narHash": "sha256-S70Pif/SaChwtJwV0K4rUh+pU8kyVtzbGtNtsOQ8geo=", + "owner": "hyprwm", + "repo": "hyprlock", + "rev": "cf0e975fedcddde897a75c5b6a2a111177b0baad", + "type": "github" + }, + "original": { + "owner": "hyprwm", + "repo": "hyprlock", + "type": "github" + } + }, + "hyprpaper": { + "inputs": { + "hyprlang": [ + "hyprland", + "hyprlang" + ], + "hyprutils": "hyprutils_4", + "hyprwayland-scanner": "hyprwayland-scanner_2", + "nixpkgs": [ + "hyprland", + "nixpkgs" + ], + "systems": [ + "hyprland", + "systems" + ] + }, + "locked": { + "lastModified": 1721686135, + "narHash": "sha256-Hu2r0BX0/98FzNXI5Nmr+Y0C03iymd+TBiCdR8poW+M=", + "owner": "hyprwm", + "repo": "hyprpaper", + "rev": "f1f7fc60f5ae2609a369964aeb7ddbf6f9277de7", + "type": "github" + }, + "original": { + "owner": "hyprwm", + "repo": "hyprpaper", + "type": "github" + } + }, + "hyprutils": { + "inputs": { + "nixpkgs": [ + "hypridle", + "nixpkgs" + ], + "systems": [ + "hypridle", + "systems" + ] + }, + "locked": { + "lastModified": 1721324102, + "narHash": "sha256-WAZ0X6yJW1hFG6otkHBfyJDKRpNP5stsRqdEuHrFRpk=", + "owner": "hyprwm", + "repo": "hyprutils", + "rev": "962582a090bc233c4de9d9897f46794280288989", + "type": "github" + }, + "original": { + "owner": "hyprwm", + "repo": "hyprutils", + "type": "github" + } + }, + "hyprutils_2": { + "inputs": { + "nixpkgs": [ + "hyprland", + "nixpkgs" + ], + "systems": [ + "hyprland", + "systems" + ] + }, + "locked": { + "lastModified": 1721324102, + "narHash": "sha256-WAZ0X6yJW1hFG6otkHBfyJDKRpNP5stsRqdEuHrFRpk=", + "owner": "hyprwm", + "repo": "hyprutils", + "rev": "962582a090bc233c4de9d9897f46794280288989", + "type": "github" + }, + "original": { + "owner": "hyprwm", + "repo": "hyprutils", + "type": "github" + } + }, + "hyprutils_3": { + "inputs": { + "nixpkgs": [ + "hyprlock", + "nixpkgs" + ], + "systems": [ + "hyprlock", + "systems" + ] + }, + "locked": { + "lastModified": 1721324102, + "narHash": "sha256-WAZ0X6yJW1hFG6otkHBfyJDKRpNP5stsRqdEuHrFRpk=", + "owner": "hyprwm", + "repo": "hyprutils", + "rev": "962582a090bc233c4de9d9897f46794280288989", + "type": "github" + }, + "original": { + "owner": "hyprwm", + "repo": "hyprutils", + "type": "github" + } + }, + "hyprutils_4": { + "inputs": { + "nixpkgs": [ + "hyprpaper", + "nixpkgs" + ], + "systems": [ + "hyprpaper", + "systems" + ] + }, + "locked": { + "lastModified": 1721324102, + "narHash": "sha256-WAZ0X6yJW1hFG6otkHBfyJDKRpNP5stsRqdEuHrFRpk=", + "owner": "hyprwm", + "repo": "hyprutils", + "rev": "962582a090bc233c4de9d9897f46794280288989", + "type": "github" + }, + "original": { + "owner": "hyprwm", + "repo": "hyprutils", + "type": "github" + } + }, + "hyprwayland-scanner": { + "inputs": { + "nixpkgs": [ + "hyprland", + "nixpkgs" + ], + "systems": [ + "hyprland", + "systems" + ] + }, + "locked": { + "lastModified": 1721324119, + "narHash": "sha256-SOOqIT27/X792+vsLSeFdrNTF+OSRp5qXv6Te+fb2Qg=", + "owner": "hyprwm", + "repo": "hyprwayland-scanner", + "rev": "a048a6cb015340bd82f97c1f40a4b595ca85cc30", + "type": "github" + }, + "original": { + "owner": "hyprwm", + "repo": "hyprwayland-scanner", + "type": "github" + } + }, + "hyprwayland-scanner_2": { + "inputs": { + "nixpkgs": [ + "hyprpaper", + "nixpkgs" + ], + "systems": [ + "hyprpaper", + "systems" + ] + }, + "locked": { + "lastModified": 1721324119, + "narHash": "sha256-SOOqIT27/X792+vsLSeFdrNTF+OSRp5qXv6Te+fb2Qg=", + "owner": "hyprwm", + "repo": "hyprwayland-scanner", + "rev": "a048a6cb015340bd82f97c1f40a4b595ca85cc30", + "type": "github" + }, + "original": { + "owner": "hyprwm", + "repo": "hyprwayland-scanner", + "type": "github" + } + }, "lanzaboote": { "inputs": { "crane": "crane", "flake-compat": "flake-compat_2", "flake-parts": "flake-parts", "flake-utils": "flake-utils_3", - "nixpkgs": "nixpkgs", + "nixpkgs": "nixpkgs_2", "pre-commit-hooks-nix": "pre-commit-hooks-nix", "rust-overlay": "rust-overlay" }, @@ -530,16 +916,16 @@ }, "nixpkgs": { "locked": { - "lastModified": 1717794163, - "narHash": "sha256-Ch6ZpFPVvi7Bb6gmmuufpTEFkXqa43pC94XMfU5FEt0=", + "lastModified": 1721924956, + "narHash": "sha256-Sb1jlyRO+N8jBXEX9Pg9Z1Qb8Bw9QyOgLDNMEpmjZ2M=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "121f68ed7c6c32de5a8ce91a08ef25713d1c4755", + "rev": "5ad6a14c6bf098e98800b091668718c336effc95", "type": "github" }, "original": { "owner": "NixOS", - "ref": "nixos-unstable-small", + "ref": "nixos-unstable", "repo": "nixpkgs", "type": "github" } @@ -592,6 +978,22 @@ } }, "nixpkgs_2": { + "locked": { + "lastModified": 1717794163, + "narHash": "sha256-Ch6ZpFPVvi7Bb6gmmuufpTEFkXqa43pC94XMfU5FEt0=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "121f68ed7c6c32de5a8ce91a08ef25713d1c4755", + "type": "github" + }, + "original": { + "owner": "NixOS", + "ref": "nixos-unstable-small", + "repo": "nixpkgs", + "type": "github" + } + }, + "nixpkgs_3": { "locked": { "lastModified": 1721924956, "narHash": "sha256-Sb1jlyRO+N8jBXEX9Pg9Z1Qb8Bw9QyOgLDNMEpmjZ2M=", @@ -607,7 +1009,7 @@ "type": "github" } }, - "nixpkgs_3": { + "nixpkgs_4": { "locked": { "lastModified": 1721466660, "narHash": "sha256-pFSxgSZqZ3h+5Du0KvEL1ccDZBwu4zvOil1zzrPNb3c=", @@ -706,11 +1108,15 @@ "flake-utils": "flake-utils_2", "hardware": "hardware", "home-manager": "home-manager", + "hypridle": "hypridle", + "hyprland": "hyprland", + "hyprlock": "hyprlock", + "hyprpaper": "hyprpaper", "lanzaboote": "lanzaboote", - "nixpkgs": "nixpkgs_2", + "nixpkgs": "nixpkgs_3", "nixpkgs-stable": "nixpkgs-stable_2", "nixvim": "nixvim", - "systems": "systems_4", + "systems": "systems_5", "wezterm": "wezterm" } }, @@ -777,16 +1183,16 @@ }, "systems_2": { "locked": { - "lastModified": 1681028828, - "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=", + "lastModified": 1689347949, + "narHash": "sha256-12tWmuL2zgBgZkdoB6qXZsgJEH9LR3oUgpaQq2RbI80=", "owner": "nix-systems", - "repo": "default", - "rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e", + "repo": "default-linux", + "rev": "31732fcf5e8fea42e59c2488ad31a0e651500f68", "type": "github" }, "original": { "owner": "nix-systems", - "repo": "default", + "repo": "default-linux", "type": "github" } }, @@ -806,6 +1212,21 @@ } }, "systems_4": { + "locked": { + "lastModified": 1681028828, + "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=", + "owner": "nix-systems", + "repo": "default", + "rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e", + "type": "github" + }, + "original": { + "owner": "nix-systems", + "repo": "default", + "type": "github" + } + }, + "systems_5": { "locked": { "lastModified": 1689347949, "narHash": "sha256-12tWmuL2zgBgZkdoB6qXZsgJEH9LR3oUgpaQq2RbI80=", @@ -820,7 +1241,7 @@ "type": "github" } }, - "systems_5": { + "systems_6": { "locked": { "lastModified": 1681028828, "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=", @@ -862,7 +1283,7 @@ "freetype2": "freetype2", "harfbuzz": "harfbuzz", "libpng": "libpng", - "nixpkgs": "nixpkgs_3", + "nixpkgs": "nixpkgs_4", "rust-overlay": "rust-overlay_2", "zlib": "zlib" }, @@ -882,6 +1303,36 @@ "type": "github" } }, + "xdph": { + "inputs": { + "hyprland-protocols": "hyprland-protocols", + "hyprlang": [ + "hyprland", + "hyprlang" + ], + "nixpkgs": [ + "hyprland", + "nixpkgs" + ], + "systems": [ + "hyprland", + "systems" + ] + }, + "locked": { + "lastModified": 1721755049, + "narHash": "sha256-O17b38bQnmfxv7It3OnVYx7fp1seEdI7xxnw5vJFv30=", + "owner": "hyprwm", + "repo": "xdg-desktop-portal-hyprland", + "rev": "5555f467f68ce7cdf1060991c24263073b95e9da", + "type": "github" + }, + "original": { + "owner": "hyprwm", + "repo": "xdg-desktop-portal-hyprland", + "type": "github" + } + }, "zlib": { "flake": false, "locked": { diff --git a/flake.nix b/flake.nix index e3e6f755..0adc9eb2 100644 --- a/flake.nix +++ b/flake.nix @@ -43,6 +43,45 @@ wezterm = { url = "github:wez/wezterm?dir=nix"; }; + # hyprwm + hyprland.url = "git+https://github.com/hyprwm/Hyprland?submodules=1"; + + hypridle = { + url = "github:hyprwm/hypridle"; + inputs = { + hyprlang.follows = "hyprland/hyprlang"; + nixpkgs.follows = "hyprland/nixpkgs"; + systems.follows = "hyprland/systems"; + }; + }; + + # hyprland-contrib = { + # url = "github:hyprwm/contrib"; + # inputs.nixpkgs.follows = "hyprland/nixpkgs"; + # }; + + # hyprland-plugins = { + # url = "github:hyprwm/hyprland-plugins"; + # inputs.hyprland.follows = "hyprland"; + # }; + + hyprlock = { + url = "github:hyprwm/hyprlock"; + inputs = { + hyprlang.follows = "hyprland/hyprlang"; + nixpkgs.follows = "hyprland/nixpkgs"; + systems.follows = "hyprland/systems"; + }; + }; + + hyprpaper = { + url = "github:hyprwm/hyprpaper"; + inputs = { + hyprlang.follows = "hyprland/hyprlang"; + nixpkgs.follows = "hyprland/nixpkgs"; + systems.follows = "hyprland/systems"; + }; + }; }; outputs = { self, diff --git a/home/core/gui/browsers/default.nix b/home/core/gui/browsers/default.nix index 1ed52bdd..469c4ee5 100644 --- a/home/core/gui/browsers/default.nix +++ b/home/core/gui/browsers/default.nix @@ -17,8 +17,18 @@ in { # browsers _firefoxNightly pkgs.firefox-bin - _chromium + # _chromium ] )) ]; + programs.chromium = { + enable = true; + package = pkgs.ungoogled-chromium; + extensions = [ + "gebbhagfogifgggkldgodflihgfeippi" # return youtube dislike + "mnjggcdmjocbbbhaepdhchncahnbgone" # sponsorblock for youtube + "ponfpcnoihfmfllpaingbgckeeldkhle" # enhancer for youtube + "cjpalhdlnbpafiamejdnhcphjbkeiagm" # ublock origin + ]; + }; } diff --git a/home/core/gui/hypr/default.nix b/home/core/gui/hypr/default.nix index dd46580e..9ca7b96f 100644 --- a/home/core/gui/hypr/default.nix +++ b/home/core/gui/hypr/default.nix @@ -1,4 +1,7 @@ -{ +{inputs, ...}: { + imports = [ + inputs.hyprland.homeManagerModules.default + ]; wayland.windowManager.hyprland = { enable = true; settings = { diff --git a/nixos/hosts/adampad/imports.nix b/nixos/hosts/adampad/imports.nix index 4f90a00b..cce7e2a2 100644 --- a/nixos/hosts/adampad/imports.nix +++ b/nixos/hosts/adampad/imports.nix @@ -63,7 +63,6 @@ unrar unzip wget - wlroots xdg-user-dirs xdg-utils diff --git a/nixos/hosts/cnix/imports.nix b/nixos/hosts/cnix/imports.nix index c9f1c1f8..cf1ed95a 100644 --- a/nixos/hosts/cnix/imports.nix +++ b/nixos/hosts/cnix/imports.nix @@ -62,7 +62,6 @@ unrar unzip wget - wlroots xdg-user-dirs xdg-utils zed-editor diff --git a/nixos/hosts/toothpc/hardware-configuration.nix b/nixos/hosts/toothpc/hardware-configuration.nix index 6b48875a..f2d66fd3 100644 --- a/nixos/hosts/toothpc/hardware-configuration.nix +++ b/nixos/hosts/toothpc/hardware-configuration.nix @@ -13,16 +13,16 @@ boot = { initrd = { availableKernelModules = [ - "nvme" "xhci_pci" "ahci" + "nvme" "usbhid" "usb_storage" "sd_mod" ]; - kernelModules = ["amdgpu"]; + kernelModules = []; }; - kernelModules = ["kvm-amd"]; + kernelModules = ["kvm-intel"]; kernelPackages = pkgs.linuxPackages_zen; consoleLogLevel = 3; kernelParams = [ @@ -33,19 +33,16 @@ }; fileSystems."/" = { - device = "/dev/disk/by-uuid/de372c64-89a2-4bbe-ad57-926cdd98e97d"; + device = "/dev/disk/by-uuid/87381342-28b5-4cbb-9e18-5baab7d68b27"; fsType = "ext4"; }; - boot.initrd.luks.devices."luks-60ba815c-481b-4932-94d2-b8d29465d3eb".device = "/dev/disk/by-uuid/60ba815c-481b-4932-94d2-b8d29465d3eb"; + boot.initrd.luks.devices."luks-81dcb5e4-7adb-44ee-99df-69e366f8b735".device = "/dev/disk/by-uuid/81dcb5e4-7adb-44ee-99df-69e366f8b735"; fileSystems."/boot" = { - device = "/dev/disk/by-uuid/0954-2370"; + device = "/dev/disk/by-uuid/CA19-5F2A"; fsType = "vfat"; - options = [ - "fmask=0022" - "dmask=0022" - ]; + options = ["fmask=0022" "dmask=0022"]; }; swapDevices = []; @@ -53,12 +50,10 @@ # 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 - # with explicit per-interface declarations with `networking.interfaces..useDHCP`. + # with explicit per-interface declarations with networking.interfaces..useDHCP. networking.useDHCP = lib.mkDefault true; - # networking.interfaces.enp6s0.useDHCP = lib.mkDefault true; - # networking.interfaces.enp7s0.useDHCP = lib.mkDefault true; - # networking.interfaces.wlp5s0.useDHCP = lib.mkDefault true; + # networking.interfaces.enp4s0.useDHCP = lib.mkDefault true; nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux"; - hardware.cpu.amd.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware; + hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware; } diff --git a/nixos/hosts/toothpc/imports.nix b/nixos/hosts/toothpc/imports.nix index c9272e6b..602853d4 100644 --- a/nixos/hosts/toothpc/imports.nix +++ b/nixos/hosts/toothpc/imports.nix @@ -61,7 +61,6 @@ unrar unzip wget - wlroots xdg-user-dirs xdg-utils