From 06f43053534c63c71c95c3430ce3ece778d4334d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Moritz=20B=C3=B6hme?= Date: Fri, 18 Nov 2022 13:27:12 +0100 Subject: [PATCH 01/23] :sparkles: use sourcehut specific input for howdy --- flake.lock | 38 ++++++++++++-------------------------- flake.nix | 5 ++++- 2 files changed, 16 insertions(+), 27 deletions(-) diff --git a/flake.lock b/flake.lock index cd15729..f4eef20 100644 --- a/flake.lock +++ b/flake.lock @@ -249,21 +249,23 @@ "howdy": { "inputs": { "flake-utils": "flake-utils_2", - "nixpkgs": "nixpkgs", + "nixpkgs": [ + "nixpkgs" + ], "pre-commit-hooks": "pre-commit-hooks" }, "locked": { "lastModified": 1665343480, "narHash": "sha256-mMaZFrDDiBcHDe8+lA87P3iMPea+RGfik5/E4Dyzk8U=", - "ref": "refs/heads/main", + "owner": "~moritzboehme", + "repo": "howdy", "rev": "24a7cfb8c2fef1873275dbdf7c8ad562c22083de", - "revCount": 5, - "type": "git", - "url": "https://git.sr.ht/~moritzboehme/howdy" + "type": "sourcehut" }, "original": { - "type": "git", - "url": "https://git.sr.ht/~moritzboehme/howdy" + "owner": "~moritzboehme", + "repo": "howdy", + "type": "sourcehut" } }, "master": { @@ -304,22 +306,6 @@ } }, "nixpkgs": { - "locked": { - "lastModified": 1665266435, - "narHash": "sha256-vLhkXxNzAIvJNLyjm6fGe9Rwy/lsE9dc5MgV7w1EtCs=", - "owner": "nixos", - "repo": "nixpkgs", - "rev": "8e8b0bd1fd99ac2bdca112f9e2431d7c80b1d655", - "type": "github" - }, - "original": { - "owner": "nixos", - "ref": "nixpkgs-unstable", - "repo": "nixpkgs", - "type": "github" - } - }, - "nixpkgs_2": { "locked": { "lastModified": 1667669848, "narHash": "sha256-nD2dk2A+1zUlUT18ppDFVWwimi26+ultc2QRsulQwQ8=", @@ -335,7 +321,7 @@ "type": "github" } }, - "nixpkgs_3": { + "nixpkgs_2": { "locked": { "lastModified": 1667292599, "narHash": "sha256-7ISOUI1aj6UKMPIL+wwthENL22L3+A9V+jS8Is3QsRo=", @@ -377,7 +363,7 @@ "pre-commit-hooks_2": { "inputs": { "flake-utils": "flake-utils_3", - "nixpkgs": "nixpkgs_3" + "nixpkgs": "nixpkgs_2" }, "locked": { "lastModified": 1667760143, @@ -406,7 +392,7 @@ "home-manager": "home-manager", "howdy": "howdy", "master": "master", - "nixpkgs": "nixpkgs_2", + "nixpkgs": "nixpkgs", "pre-commit-hooks": "pre-commit-hooks_2", "stable": "stable", "utils": "utils_3" diff --git a/flake.nix b/flake.nix index 0291ddd..dd0e546 100644 --- a/flake.nix +++ b/flake.nix @@ -63,7 +63,10 @@ inputs.nixpkgs.follows = "nixpkgs"; }; - howdy.url = "git+https://git.sr.ht/~moritzboehme/howdy"; + howdy = { + url = "sourcehut:~moritzboehme/howdy"; + inputs.nixpkgs.follows = "nixpkgs"; + }; }; outputs = From cf6a2bafaf72dbb3cec843630c769d5ed7fc7999 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Moritz=20B=C3=B6hme?= Date: Fri, 18 Nov 2022 13:29:30 +0100 Subject: [PATCH 02/23] :rocket: add gaming as module for laptop --- flake.nix | 1 + 1 file changed, 1 insertion(+) diff --git a/flake.nix b/flake.nix index dd0e546..2e2363c 100644 --- a/flake.nix +++ b/flake.nix @@ -117,6 +117,7 @@ hosts.nixos-laptop.modules = [ ./hosts/nixos-laptop self.nixosModules.desktop + self.nixosModules.gaming ]; hosts.nixos-desktop.modules = [ From e90fd62f5e177385f854e38b83db1026bf47015e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Moritz=20B=C3=B6hme?= Date: Thu, 24 Nov 2022 13:47:48 +0100 Subject: [PATCH 03/23] :sparkles: clean up --- flake.lock | 121 +------------------------------------- flake.nix | 18 ------ modules/profiles/base.nix | 2 +- modules/programs/fish.nix | 6 -- overlays/default.nix | 1 - 5 files changed, 4 insertions(+), 144 deletions(-) diff --git a/flake.lock b/flake.lock index f4eef20..c98adf4 100644 --- a/flake.lock +++ b/flake.lock @@ -53,65 +53,6 @@ "type": "github" } }, - "base16": { - "inputs": { - "nixpkgs": [ - "nixpkgs" - ] - }, - "locked": { - "lastModified": 1658847131, - "narHash": "sha256-X6Mml7cT0YR3WCD5fkUhpRVV5ZPcwdcDsND8r8xMqTE=", - "owner": "SenchoPens", - "repo": "base16.nix", - "rev": "6b404cda2e04ca3cf5ca7b877af9c469e1386acb", - "type": "github" - }, - "original": { - "owner": "SenchoPens", - "repo": "base16.nix", - "type": "github" - } - }, - "comma": { - "inputs": { - "flake-compat": "flake-compat", - "naersk": "naersk", - "nixpkgs": [ - "nixpkgs" - ], - "utils": "utils" - }, - "locked": { - "lastModified": 1666010793, - "narHash": "sha256-6zhTpR0cfaHrupOXRZAdCzLAGINgsB6h3HQnj7+qHWs=", - "owner": "nix-community", - "repo": "comma", - "rev": "691120d169189f3a9cb29b1c72bcd521ac372b2b", - "type": "github" - }, - "original": { - "owner": "nix-community", - "repo": "comma", - "type": "github" - } - }, - "dracula-fish": { - "flake": false, - "locked": { - "lastModified": 1657833273, - "narHash": "sha256-WywEGAGaRwfHJpT+B3oKoyrnLJZxURTQ+MK9e5Asxl0=", - "owner": "dracula", - "repo": "fish", - "rev": "610147cc384ff161fbabb9a9ebfd22b743f82b67", - "type": "github" - }, - "original": { - "owner": "dracula", - "repo": "fish", - "type": "github" - } - }, "emacs-overlay": { "inputs": { "flake-utils": "flake-utils", @@ -133,22 +74,6 @@ "type": "github" } }, - "flake-compat": { - "flake": false, - "locked": { - "lastModified": 1650374568, - "narHash": "sha256-Z+s0J8/r907g149rllvwhb4pKi8Wam5ij0st8PwAh+E=", - "owner": "edolstra", - "repo": "flake-compat", - "rev": "b4a34015c698c7793d592d66adbab377907a2be8", - "type": "github" - }, - "original": { - "owner": "edolstra", - "repo": "flake-compat", - "type": "github" - } - }, "flake-utils": { "locked": { "lastModified": 1667395993, @@ -230,7 +155,7 @@ "nixpkgs": [ "nixpkgs" ], - "utils": "utils_2" + "utils": "utils" }, "locked": { "lastModified": 1667708081, @@ -283,28 +208,6 @@ "type": "github" } }, - "naersk": { - "inputs": { - "nixpkgs": [ - "comma", - "nixpkgs" - ] - }, - "locked": { - "lastModified": 1662220400, - "narHash": "sha256-9o2OGQqu4xyLZP9K6kNe1pTHnyPz0Wr3raGYnr9AIgY=", - "owner": "nix-community", - "repo": "naersk", - "rev": "6944160c19cb591eb85bbf9b2f2768a935623ed3", - "type": "github" - }, - "original": { - "owner": "nix-community", - "ref": "master", - "repo": "naersk", - "type": "github" - } - }, "nixpkgs": { "locked": { "lastModified": 1667669848, @@ -384,9 +287,6 @@ "agenix": "agenix", "arkenfox-userjs": "arkenfox-userjs", "asus-touchpad-numpad-driver": "asus-touchpad-numpad-driver", - "base16": "base16", - "comma": "comma", - "dracula-fish": "dracula-fish", "emacs-overlay": "emacs-overlay", "forgit-git": "forgit-git", "home-manager": "home-manager", @@ -395,7 +295,7 @@ "nixpkgs": "nixpkgs", "pre-commit-hooks": "pre-commit-hooks_2", "stable": "stable", - "utils": "utils_3" + "utils": "utils_2" } }, "stable": { @@ -415,21 +315,6 @@ } }, "utils": { - "locked": { - "lastModified": 1659877975, - "narHash": "sha256-zllb8aq3YO3h8B/U0/J1WBgAL8EX5yWf5pMj3G0NAmc=", - "owner": "numtide", - "repo": "flake-utils", - "rev": "c0e246b9b83f637f4681389ecabcb2681b4f3af0", - "type": "github" - }, - "original": { - "owner": "numtide", - "repo": "flake-utils", - "type": "github" - } - }, - "utils_2": { "locked": { "lastModified": 1667395993, "narHash": "sha256-nuEHfE/LcWyuSWnS8t12N1wc105Qtau+/OdUAjtQ0rA=", @@ -444,7 +329,7 @@ "type": "github" } }, - "utils_3": { + "utils_2": { "inputs": { "flake-utils": "flake-utils_4" }, diff --git a/flake.nix b/flake.nix index 2e2363c..bdb2968 100644 --- a/flake.nix +++ b/flake.nix @@ -29,17 +29,6 @@ inputs.nixpkgs.follows = "nixpkgs"; }; - comma = { - url = "github:nix-community/comma"; - inputs.nixpkgs.follows = "nixpkgs"; - }; - - # Fish specific - dracula-fish = { - url = "github:dracula/fish"; - flake = false; - }; - # Zsh specific forgit-git = { url = "github:wfxr/forgit"; @@ -57,12 +46,6 @@ flake = false; }; - # Theming - base16 = { - url = "github:SenchoPens/base16.nix"; - inputs.nixpkgs.follows = "nixpkgs"; - }; - howdy = { url = "sourcehut:~moritzboehme/howdy"; inputs.nixpkgs.follows = "nixpkgs"; @@ -110,7 +93,6 @@ }; } inputs.agenix.nixosModules.age - inputs.base16.nixosModule inputs.howdy.nixosModules.default ]; diff --git a/modules/profiles/base.nix b/modules/profiles/base.nix index d00a341..6bccdc3 100644 --- a/modules/profiles/base.nix +++ b/modules/profiles/base.nix @@ -109,6 +109,7 @@ with lib; programs = { mtr.enable = true; command-not-found.enable = true; + starship.enable = true; }; services = { @@ -130,7 +131,6 @@ with lib; # Let Home Manager install and manage itself. home-manager.enable = true; fzf.enable = true; - starship.enable = true; }; home = { username = "moritz"; diff --git a/modules/programs/fish.nix b/modules/programs/fish.nix index a2d64c8..c143217 100644 --- a/modules/programs/fish.nix +++ b/modules/programs/fish.nix @@ -73,12 +73,6 @@ in fish_greeting = ""; cheat = "cht.sh $argv | bat -p"; }; - plugins = [ - { - name = "dracula"; - src = inputs.dracula-fish; - } - ]; }; fzf.enableFishIntegration = true; starship.enableFishIntegration = true; diff --git a/overlays/default.nix b/overlays/default.nix index 5f8d1a9..a31bed2 100644 --- a/overlays/default.nix +++ b/overlays/default.nix @@ -1,5 +1,4 @@ { inputs }: final: prev: { - inherit (inputs.comma.packages."${prev.system}") comma; nixpkgs-review-checks = inputs.nixpkgs-review-checks.defaultPackage."${prev.system}"; agenix = inputs.agenix.defaultPackage."${prev.system}"; master = import inputs.master { From ad7ba759a64b5043da4cc6436216764573d6a334 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Moritz=20B=C3=B6hme?= Date: Thu, 24 Nov 2022 13:45:23 +0100 Subject: [PATCH 04/23] :rocket: make polybar smaller --- modules/config/theming/default.nix | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/modules/config/theming/default.nix b/modules/config/theming/default.nix index eb9180f..deedad2 100644 --- a/modules/config/theming/default.nix +++ b/modules/config/theming/default.nix @@ -41,15 +41,15 @@ in monitor = "\${env:MONITOR}"; bottom = true; width = "100%"; - heigth = 20; + heigth = 15; - border-size = 5; + border-size = 2; separator = " "; - font-0 = "FiraCode Nerd Font:size=9;0"; - font-1 = "FiraCode Nerd Font:size=9;1"; - font-2 = "FiraCode Nerd Font:size=9;2"; + font-0 = "FiraCode Nerd Font:size=8;0"; + font-1 = "FiraCode Nerd Font:size=8;1"; + font-2 = "FiraCode Nerd Font:size=8;2"; modules-left = "cpu memory network battery"; modules-center = "bspwm"; From 9918bfe0c69c426f52a3f36eb64dea28e1668de8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Moritz=20B=C3=B6hme?= Date: Fri, 25 Nov 2022 10:24:29 +0100 Subject: [PATCH 05/23] :rocket: add hyprland module --- flake.lock | 60 ++++++++- flake.nix | 5 + hosts/nixos-desktop/default.nix | 8 +- hosts/nixos-laptop/default.nix | 12 +- modules/config/nix.nix | 2 + modules/profiles/desktop.nix | 2 +- modules/programs/default.nix | 1 + modules/programs/hyprland/default.nix | 71 +++++++++++ modules/programs/hyprland/hyprland.conf | 160 ++++++++++++++++++++++++ modules/programs/rofi/default.nix | 2 +- overlays/default.nix | 6 + 11 files changed, 318 insertions(+), 11 deletions(-) create mode 100644 modules/programs/hyprland/default.nix create mode 100644 modules/programs/hyprland/hyprland.conf diff --git a/flake.lock b/flake.lock index c98adf4..9bcef5d 100644 --- a/flake.lock +++ b/flake.lock @@ -193,6 +193,25 @@ "type": "sourcehut" } }, + "hyprland": { + "inputs": { + "nixpkgs": "nixpkgs", + "wlroots": "wlroots" + }, + "locked": { + "lastModified": 1669309881, + "narHash": "sha256-Au7BTeUe++JCOWwvO4O3xLpWlZlbmsOJK+EurjIbgqE=", + "owner": "hyprwm", + "repo": "Hyprland", + "rev": "379597e78f512ff2d64a83ba3eb21b7a3444d4f9", + "type": "github" + }, + "original": { + "owner": "hyprwm", + "repo": "Hyprland", + "type": "github" + } + }, "master": { "locked": { "lastModified": 1667830549, @@ -209,6 +228,22 @@ } }, "nixpkgs": { + "locked": { + "lastModified": 1668765800, + "narHash": "sha256-rC40+/W6Hio7b/RsY8SvQPKNx4WqNcTgfYv8cUMAvJk=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "52b2ac8ae18bbad4374ff0dd5aeee0fdf1aea739", + "type": "github" + }, + "original": { + "owner": "NixOS", + "ref": "nixos-unstable", + "repo": "nixpkgs", + "type": "github" + } + }, + "nixpkgs_2": { "locked": { "lastModified": 1667669848, "narHash": "sha256-nD2dk2A+1zUlUT18ppDFVWwimi26+ultc2QRsulQwQ8=", @@ -224,7 +259,7 @@ "type": "github" } }, - "nixpkgs_2": { + "nixpkgs_3": { "locked": { "lastModified": 1667292599, "narHash": "sha256-7ISOUI1aj6UKMPIL+wwthENL22L3+A9V+jS8Is3QsRo=", @@ -266,7 +301,7 @@ "pre-commit-hooks_2": { "inputs": { "flake-utils": "flake-utils_3", - "nixpkgs": "nixpkgs_2" + "nixpkgs": "nixpkgs_3" }, "locked": { "lastModified": 1667760143, @@ -291,8 +326,9 @@ "forgit-git": "forgit-git", "home-manager": "home-manager", "howdy": "howdy", + "hyprland": "hyprland", "master": "master", - "nixpkgs": "nixpkgs", + "nixpkgs": "nixpkgs_2", "pre-commit-hooks": "pre-commit-hooks_2", "stable": "stable", "utils": "utils_2" @@ -346,6 +382,24 @@ "repo": "flake-utils-plus", "type": "github" } + }, + "wlroots": { + "flake": false, + "locked": { + "host": "gitlab.freedesktop.org", + "lastModified": 1668785720, + "narHash": "sha256-CX+PYJP2PxZWL380WzyMNsrfRgIb/78brdwvDg/zj28=", + "owner": "wlroots", + "repo": "wlroots", + "rev": "4ff46e6cf9463e594605928feeb7c55cf323b5e7", + "type": "gitlab" + }, + "original": { + "host": "gitlab.freedesktop.org", + "owner": "wlroots", + "repo": "wlroots", + "type": "gitlab" + } } }, "root": "root", diff --git a/flake.nix b/flake.nix index bdb2968..5336489 100644 --- a/flake.nix +++ b/flake.nix @@ -50,6 +50,10 @@ url = "sourcehut:~moritzboehme/howdy"; inputs.nixpkgs.follows = "nixpkgs"; }; + + hyprland = { + url = "github:hyprwm/Hyprland"; + }; }; outputs = @@ -92,6 +96,7 @@ extraSpecialArgs = { inherit inputs self; }; }; } + inputs.hyprland.nixosModules.default inputs.agenix.nixosModules.age inputs.howdy.nixosModules.default ]; diff --git a/hosts/nixos-desktop/default.nix b/hosts/nixos-desktop/default.nix index 32cf357..0bbdc40 100644 --- a/hosts/nixos-desktop/default.nix +++ b/hosts/nixos-desktop/default.nix @@ -4,6 +4,7 @@ { lib , config , pkgs +, inputs , ... }: { imports = [ @@ -13,7 +14,7 @@ # KERNEL # HACK to get nvidia driver to build - # boot.kernelPackages = pkgs.linuxPackages_latest; + boot.kernelPackages = pkgs.linuxPackages_latest; # BOOT boot = { @@ -59,12 +60,13 @@ ''; }; - services.xserver.videoDrivers = [ "nvidia" ]; + # services.xserver.videoDrivers = [ "nvidia" ]; hardware.opengl = { enable = true; driSupport32Bit = true; + driSupport = true; }; - hardware.nvidia.package = config.boot.kernelPackages.nvidiaPackages.legacy_470; + # hardware.nvidia.package = config.boot.kernelPackages.nvidiaPackages.legacy_470; services.xserver.xrandrHeads = [ { output = "HDMI-1"; } { diff --git a/hosts/nixos-laptop/default.nix b/hosts/nixos-laptop/default.nix index 8bb6c1d..4c7130d 100644 --- a/hosts/nixos-laptop/default.nix +++ b/hosts/nixos-laptop/default.nix @@ -11,9 +11,15 @@ ./hardware-configuration.nix ]; - services.howdy = { - enable = true; - certainty = 3.0; + # services.howdy = { + # enable = true; + # certainty = 3.0; + # }; + + + my.programs = { + bspwm.enable = false; + hyprland.enable = true; }; # BOOT diff --git a/modules/config/nix.nix b/modules/config/nix.nix index 0dbd9ff..a932cbb 100644 --- a/modules/config/nix.nix +++ b/modules/config/nix.nix @@ -51,12 +51,14 @@ in "https://jupyterwith.cachix.org" "https://nix-community.cachix.org" "https://pre-commit-hooks.cachix.org" + "https://hyprland.cachix.org" ]; trusted-public-keys = [ "jupyterwith.cachix.org-1:/kDy2B6YEhXGJuNguG1qyqIodMyO4w8KwWH4/vAc7CI=" "nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs=" "cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY=" "pre-commit-hooks.cachix.org-1:Pkk3Panw5AW24TOv6kz3PvLhlH8puAsJTBbOPmBo7Rc=" + "hyprland.cachix.org-1:a7pgxzMz7+chwVL3/pzj6jIBMioiJM7ypFP8PwtkuGc=" ]; trusted-users = [ "root" "@wheel" ]; diff --git a/modules/profiles/desktop.nix b/modules/profiles/desktop.nix index 3334689..b56dd38 100644 --- a/modules/profiles/desktop.nix +++ b/modules/profiles/desktop.nix @@ -20,7 +20,7 @@ with lib; { programs = { adb.enable = true; - bspwm.enable = true; + bspwm.enable = mkDefault true; code.enable = true; emacs.enable = true; firefox = { diff --git a/modules/programs/default.nix b/modules/programs/default.nix index 82e2dd4..abc4c23 100644 --- a/modules/programs/default.nix +++ b/modules/programs/default.nix @@ -32,5 +32,6 @@ ./xmonad ./zathura.nix ./zsh.nix + ./hyprland ]; } diff --git a/modules/programs/hyprland/default.nix b/modules/programs/hyprland/default.nix new file mode 100644 index 0000000..d05ad4c --- /dev/null +++ b/modules/programs/hyprland/default.nix @@ -0,0 +1,71 @@ +{ config +, lib +, pkgs +, inputs +, ... +}: + +with lib; +let + cfg = config.my.programs.hyprland; + + hyprland-default = inputs.hyprland.packages.${pkgs.system}.default; + hyprland-nvidia = hyprland-default.override { nvidiaPatches = true; }; + hyprland = if cfg.nvidiaSupport then hyprland-nvidia else hyprland-default; +in +{ + options.my.programs.hyprland = { + enable = mkEnableOption "hyprland"; + nvidiaSupport = mkEnableOption "enable nvidia Support"; + }; + + config = mkIf cfg.enable { + home-manager.users.moritz = { + imports = [ inputs.hyprland.homeManagerModules.default ]; + programs.waybar = { + enable = true; + package = pkgs.waybar-hyprland; + systemd.enable = true; + settings = { + mainBar = { + layer = "top"; + position = "top"; + height = 30; + output = [ + "eDP-1" + "HDMI-A-1" + ]; + modules-left = [ "wlr/workspaces" ]; + modules-center = [ "hyprland/window" ]; + modules-right = [ "network" "memory" "cpu" "battery" "clock" ]; + modules = { + "wlr/workspaces" = { + on-click = "activate"; + }; + }; + }; + }; + }; + wayland.windowManager.hyprland = { + enable = true; + package = hyprland; + extraConfig = builtins.readFile ./hyprland.conf; + }; + }; + programs.hyprland = { + enable = true; + package = null; + }; + services.xserver = { + enable = true; + displayManager = { + gdm.enable = true; + sessionPackages = [ hyprland ]; + }; + }; + xdg.portal = { + enable = true; + wlr.enable = true; + }; + }; +} diff --git a/modules/programs/hyprland/hyprland.conf b/modules/programs/hyprland/hyprland.conf new file mode 100644 index 0000000..c8ac776 --- /dev/null +++ b/modules/programs/hyprland/hyprland.conf @@ -0,0 +1,160 @@ +# +# Please note not all available settings / options are set here. +# For a full list, see the wiki +# + +# See https://wiki.hyprland.org/Configuring/Monitors/ +monitor=,preferred,auto,1 + + +# See https://wiki.hyprland.org/Configuring/Keywords/ for more + +# Execute your favorite apps at launch +# exec-once = waybar & hyprpaper & firefox + +# Source a file (multi-file configs) +# source = ~/.config/hypr/myColors.conf + +# For all categories, see https://wiki.hyprland.org/Configuring/Variables/ +input { + kb_layout = de + kb_variant = + kb_model = + kb_options = + kb_rules = + + follow_mouse = 1 + + touchpad { + natural_scroll = yes + } + + sensitivity = 0 # -1.0 - 1.0, 0 means no modification. +} + +general { + # See https://wiki.hyprland.org/Configuring/Variables/ for more + + gaps_in = 5 + gaps_out = 5 + border_size = 2 + col.active_border = rgba(1affffee) + col.inactive_border = rgba(595959aa) + + layout = dwindle +} + +decoration { + # See https://wiki.hyprland.org/Configuring/Variables/ for more + + rounding = 5 + inactive_opacity = 0.98 + blur = yes + blur_size = 8 + blur_passes = 1 + blur_new_optimizations = on + + drop_shadow = yes + shadow_range = 4 + shadow_render_power = 3 + col.shadow = rgba(1a1a1aee) +} + +animations { + enabled = yes + + # Some default animations, see https://wiki.hyprland.org/Configuring/Animations/ for more + + bezier = myBezier, 0.45, 0, 0.55, 1 + + animation = windows, 1, 3, myBezier + animation = windowsOut, 1, 3, myBezier + animation = border, 1, 3, myBezier + animation = fade, 1, 3, myBezier + animation = workspaces, 1, 3, myBezier +} + +dwindle { + # See https://wiki.hyprland.org/Configuring/Dwindle-Layout/ for more + pseudotile = yes # master switch for pseudotiling. Enabling is bound to mainMod + P in the keybinds section below + preserve_split = yes # you probably want this +} + +master { + # See https://wiki.hyprland.org/Configuring/Master-Layout/ for more + new_is_master = true +} + +gestures { + # See https://wiki.hyprland.org/Configuring/Variables/ for more + workspace_swipe = on +} + +# Example per-device config +# See https://wiki.hyprland.org/Configuring/Keywords/#executing for more +device:epic mouse V1 { + sensitivity = -0.5 +} + +# Example windowrule v1 +# windowrule = float, ^(kitty)$ +# Example windowrule v2 +# windowrulev2 = float,class:^(kitty)$,title:^(kitty)$ +windowrulev2 = float,class:^(rofi)$ +# See https://wiki.hyprland.org/Configuring/Window-Rules/ for more + + +# See https://wiki.hyprland.org/Configuring/Keywords/ for more +$mainMod = SUPER +$windowMod = ALT + +# Example binds, see https://wiki.hyprland.org/Configuring/Binds/ for more +bind = $mainMod, RETURN, exec, kitty +bind = $mainMod, Q, killactive, +bind = $mainMod, M, exit, +bind = $mainMod, E, exec, emacsclient -c -a emacs +bind = $mainMod, F, togglefloating, +bind = $mainMod, D, exec, rofi -show combi +bind = $mainMod, P, pseudo, # dwindle +bind = $mainMod, T, togglesplit, # dwindle + +# Move focus with mainMod + arrow keys +bind = $mainMod, H, movefocus, l +bind = $mainMod, L, movefocus, r +bind = $mainMod, K, movefocus, u +bind = $mainMod, J, movefocus, d + +# Switch workspaces with mainMod + [0-9] +bind = $mainMod, 1, workspace, 1 +bind = $mainMod, 2, workspace, 2 +bind = $mainMod, 3, workspace, 3 +bind = $mainMod, 4, workspace, 4 +bind = $mainMod, 5, workspace, 5 +bind = $mainMod, 6, workspace, 6 +bind = $mainMod, 7, workspace, 7 +bind = $mainMod, 8, workspace, 8 +bind = $mainMod, 9, workspace, 9 +bind = $mainMod, 0, workspace, 10 + +# Move active window to a workspace with mainMod + SHIFT + [0-9] +bind = $mainMod SHIFT, 1, movetoworkspace, 1 +bind = $mainMod SHIFT, 2, movetoworkspace, 2 +bind = $mainMod SHIFT, 3, movetoworkspace, 3 +bind = $mainMod SHIFT, 4, movetoworkspace, 4 +bind = $mainMod SHIFT, 5, movetoworkspace, 5 +bind = $mainMod SHIFT, 6, movetoworkspace, 6 +bind = $mainMod SHIFT, 7, movetoworkspace, 7 +bind = $mainMod SHIFT, 8, movetoworkspace, 8 +bind = $mainMod SHIFT, 9, movetoworkspace, 9 +bind = $mainMod SHIFT, 0, movetoworkspace, 10 + +# Scroll through existing workspaces with mainMod + scroll +bind = $mainMod, mouse_down, workspace, e+1 +bind = $mainMod, mouse_up, workspace, e-1 + +# Move/resize windows with mainMod + LMB/RMB and dragging +bindm = $mainMod, mouse:272, movewindow +bindm = $mainMod, mouse:273, resizewindow + +exec-once=synology-drive +exec-once=waybar diff --git a/modules/programs/rofi/default.nix b/modules/programs/rofi/default.nix index 56fa79a..1bb06dd 100644 --- a/modules/programs/rofi/default.nix +++ b/modules/programs/rofi/default.nix @@ -21,7 +21,7 @@ in programs.rofi = { enable = true; package = - pkgs.rofi.override { plugins = with pkgs; [ rofi-calc rofi-emoji ]; }; + pkgs.rofi-wayland.override { plugins = with pkgs; [ rofi-calc rofi-emoji ]; }; extraConfig = { combi-modi = "drun,window,emoji"; }; }; xdg = { diff --git a/overlays/default.nix b/overlays/default.nix index a31bed2..505736f 100644 --- a/overlays/default.nix +++ b/overlays/default.nix @@ -1,6 +1,12 @@ { inputs }: final: prev: { nixpkgs-review-checks = inputs.nixpkgs-review-checks.defaultPackage."${prev.system}"; agenix = inputs.agenix.defaultPackage."${prev.system}"; + waybar-hyprland = prev.waybar.overrideAttrs (old: { + postPatch = old.postPatch or "" + '' + ${final.gnused}/bin/sed -i 's,zext_workspace_handle_v1_activate(workspace_handle_);,const std::string command = "${final.hyprland}/bin/hyprctl dispatch workspace " + name_;\n\tsystem(command.c_str());,g' src/modules/wlr/workspace_manager.cpp + ''; + mesonFlags = old.mesonFlags or [ ] ++ [ "-Dexperimental=true" ]; + }); master = import inputs.master { inherit (prev) system; config.allowUnfree = true; From cd1d55d6428501c923d761261c36abd231a8d4b7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Moritz=20B=C3=B6hme?= Date: Sat, 26 Nov 2022 11:37:59 +0100 Subject: [PATCH 06/23] :lock: update inputs --- flake.lock | 128 +++++++++++++++++++++++++---------- flake.nix | 2 +- modules/profiles/desktop.nix | 2 +- modules/programs/emacs.nix | 2 +- 4 files changed, 96 insertions(+), 38 deletions(-) diff --git a/flake.lock b/flake.lock index c98adf4..44334c4 100644 --- a/flake.lock +++ b/flake.lock @@ -23,11 +23,11 @@ "arkenfox-userjs": { "flake": false, "locked": { - "lastModified": 1667741320, - "narHash": "sha256-WB9w/UoFqp/WyRhe87dNqwbMAXa8lmsK/QCeTzRWmj8=", + "lastModified": 1669146650, + "narHash": "sha256-9FCZt15lrL/aeDaUBFh+U2A4PlTj0jUKbjUbGIFUBik=", "owner": "arkenfox", "repo": "user.js", - "rev": "8a65c5a7bad0ec764d968b0941ebdf01bdcd2408", + "rev": "6789dc7fefac5594d958a065463b4dc9d265c089", "type": "github" }, "original": { @@ -61,11 +61,11 @@ ] }, "locked": { - "lastModified": 1667823539, - "narHash": "sha256-AwDCZgUT004T+skxK62ZWAlP+60yomMaHb0/+hHH448=", + "lastModified": 1669439968, + "narHash": "sha256-VlQsxaHruFN29FOvRHUYecySRU9UzFqqpshfgoGxKes=", "owner": "nix-community", "repo": "emacs-overlay", - "rev": "a864e84bd842d00d686e040f552e2fa7030351a0", + "rev": "838bd1e55d9168d2df9dc0331565f884c3be3250", "type": "github" }, "original": { @@ -74,6 +74,22 @@ "type": "github" } }, + "flake-compat": { + "flake": false, + "locked": { + "lastModified": 1668681692, + "narHash": "sha256-Ht91NGdewz8IQLtWZ9LCeNXMSXHUss+9COoqu6JLmXU=", + "owner": "edolstra", + "repo": "flake-compat", + "rev": "009399224d5e398d03b22badca40a37ac85412a1", + "type": "github" + }, + "original": { + "owner": "edolstra", + "repo": "flake-compat", + "type": "github" + } + }, "flake-utils": { "locked": { "lastModified": 1667395993, @@ -106,11 +122,11 @@ }, "flake-utils_3": { "locked": { - "lastModified": 1667077288, - "narHash": "sha256-bdC8sFNDpT0HK74u9fUkpbf1MEzVYJ+ka7NXCdgBoaA=", + "lastModified": 1667395993, + "narHash": "sha256-nuEHfE/LcWyuSWnS8t12N1wc105Qtau+/OdUAjtQ0rA=", "owner": "numtide", "repo": "flake-utils", - "rev": "6ee9ebb6b1ee695d2cacc4faa053a7b9baa76817", + "rev": "5aed5285a952e0b949eb3ba02c12fa4fcfef535f", "type": "github" }, "original": { @@ -137,11 +153,11 @@ "forgit-git": { "flake": false, "locked": { - "lastModified": 1665756353, - "narHash": "sha256-NKL4c4k9Nath8NQ3sWUTGUzp517jRX4v0qVaKMJSMrw=", + "lastModified": 1669300261, + "narHash": "sha256-ca7EM/F0Spsdr3MbjIVwbjLVXg6/qWGczBQHLCcpU5A=", "owner": "wfxr", "repo": "forgit", - "rev": "2872548075e63bc83a0b960e2813b16571998563", + "rev": "98321ef05a10fe1b536ae88e283339e769866e24", "type": "github" }, "original": { @@ -150,6 +166,27 @@ "type": "github" } }, + "gitignore": { + "inputs": { + "nixpkgs": [ + "pre-commit-hooks", + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1660459072, + "narHash": "sha256-8DFJjXG8zqoONA1vXtgeKXy68KdJL5UaXR8NtVMUbx8=", + "owner": "hercules-ci", + "repo": "gitignore.nix", + "rev": "a20de23b925fd8264fd7fad6454652e142fd7f73", + "type": "github" + }, + "original": { + "owner": "hercules-ci", + "repo": "gitignore.nix", + "type": "github" + } + }, "home-manager": { "inputs": { "nixpkgs": [ @@ -158,11 +195,11 @@ "utils": "utils" }, "locked": { - "lastModified": 1667708081, - "narHash": "sha256-FChEy05x4ed/pttjfTeKxjPCnHknMYrUtDyBiYbreT4=", + "lastModified": 1669328018, + "narHash": "sha256-aJRMobnNDEXKwoSZFS4hGjGU1WDNxkQ82BVKAEohOfY=", "owner": "nix-community", "repo": "home-manager", - "rev": "1ef0da321217c6c19b7a30509631c080a19321e5", + "rev": "62cb5bcf93896e4dd6b4507dac7ba2e2e3abc9d7", "type": "github" }, "original": { @@ -195,11 +232,11 @@ }, "master": { "locked": { - "lastModified": 1667830549, - "narHash": "sha256-4ndTwPd+lMMWN/3oJlEBxkVw+8wQs9hB5a2+CvyHHwI=", + "lastModified": 1669458704, + "narHash": "sha256-wpaBMBfjSDCnw4F7A1xBdqy2nW7dvjk3coISy+tTmX4=", "owner": "nixos", "repo": "nixpkgs", - "rev": "1ef74a785480396ba179200196cac8256a67cfce", + "rev": "3200a569242cdc75c191fc28b6adefe60315e921", "type": "github" }, "original": { @@ -210,11 +247,11 @@ }, "nixpkgs": { "locked": { - "lastModified": 1667669848, - "narHash": "sha256-nD2dk2A+1zUlUT18ppDFVWwimi26+ultc2QRsulQwQ8=", + "lastModified": 1669387357, + "narHash": "sha256-z1azVj/5Em5kGhh9OgBOsjTEgMab7hXL/aRilH9tzyI=", "owner": "nixos", "repo": "nixpkgs", - "rev": "1f3ebb2bd1a353a42e8f833895c26d8415c7b791", + "rev": "55b3f68bda6d4f4dc6092eed0508063f154fa4fd", "type": "github" }, "original": { @@ -224,18 +261,36 @@ "type": "github" } }, - "nixpkgs_2": { + "nixpkgs-stable": { "locked": { - "lastModified": 1667292599, - "narHash": "sha256-7ISOUI1aj6UKMPIL+wwthENL22L3+A9V+jS8Is3QsRo=", + "lastModified": 1668984258, + "narHash": "sha256-0gDMJ2T3qf58xgcSbYoXiRGUkPWmKyr5C3vcathWhKs=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "ef2f213d9659a274985778bff4ca322f3ef3ac68", + "rev": "cf63ade6f74bbc9d2a017290f1b2e33e8fbfa70a", "type": "github" }, "original": { - "id": "nixpkgs", - "type": "indirect" + "owner": "NixOS", + "ref": "nixos-22.05", + "repo": "nixpkgs", + "type": "github" + } + }, + "nixpkgs_2": { + "locked": { + "lastModified": 1668994630, + "narHash": "sha256-1lqx6HLyw6fMNX/hXrrETG1vMvZRGm2XVC9O/Jt0T6c=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "af50806f7c6ab40df3e6b239099e8f8385f6c78b", + "type": "github" + }, + "original": { + "owner": "NixOS", + "ref": "nixos-unstable", + "repo": "nixpkgs", + "type": "github" } }, "pre-commit-hooks": { @@ -265,15 +320,18 @@ }, "pre-commit-hooks_2": { "inputs": { + "flake-compat": "flake-compat", "flake-utils": "flake-utils_3", - "nixpkgs": "nixpkgs_2" + "gitignore": "gitignore", + "nixpkgs": "nixpkgs_2", + "nixpkgs-stable": "nixpkgs-stable" }, "locked": { - "lastModified": 1667760143, - "narHash": "sha256-+X5CyeNEKp41bY/I1AJgW/fn69q5cLJ1bgiaMMCKB3M=", + "lastModified": 1669152228, + "narHash": "sha256-FEDReoTLWJHXcNso7aaAlAUU7uOqIR6Hc/C/nqlfooE=", "owner": "cachix", "repo": "pre-commit-hooks.nix", - "rev": "06f48d63d473516ce5b8abe70d15be96a0147fcd", + "rev": "078b0dee35e2da01334af682ec347463b70a9986", "type": "github" }, "original": { @@ -300,16 +358,16 @@ }, "stable": { "locked": { - "lastModified": 1667653703, - "narHash": "sha256-Xow4vx52/g5zkhlgZnMEm/TEXsj+13jTPCc2jIhW1xU=", + "lastModified": 1669379897, + "narHash": "sha256-XM3xBfQD5tOtV4KAhQHyh53cJdqkLwotZa5JJIUjbQc=", "owner": "nixos", "repo": "nixpkgs", - "rev": "f09ad462c5a121d0239fde645aacb2221553a217", + "rev": "8690906c4d80db5d85f52313a8487bf2e7b8d4c5", "type": "github" }, "original": { "owner": "nixos", - "ref": "nixos-22.05", + "ref": "nixos-22.11", "repo": "nixpkgs", "type": "github" } diff --git a/flake.nix b/flake.nix index bdb2968..63bc345 100644 --- a/flake.nix +++ b/flake.nix @@ -8,7 +8,7 @@ inputs = { master.url = "github:nixos/nixpkgs"; nixpkgs.url = "github:nixos/nixpkgs/nixpkgs-unstable"; - stable.url = "github:nixos/nixpkgs/nixos-22.05"; + stable.url = "github:nixos/nixpkgs/nixos-22.11"; pre-commit-hooks.url = "github:cachix/pre-commit-hooks.nix"; diff --git a/modules/profiles/desktop.nix b/modules/profiles/desktop.nix index 3334689..4a01e2c 100644 --- a/modules/profiles/desktop.nix +++ b/modules/profiles/desktop.nix @@ -113,7 +113,7 @@ with lib; { # ripping abcde handbrake - stable.picard # HACK to fix broken picard 2.8.3 + picard # other anki diff --git a/modules/programs/emacs.nix b/modules/programs/emacs.nix index d9e884c..0059324 100644 --- a/modules/programs/emacs.nix +++ b/modules/programs/emacs.nix @@ -55,7 +55,7 @@ in ## :lang # latex & org (latex previews) - stable.texlive.combined.scheme-full # HACK to fix broken perl package + texlive.combined.scheme-full texlab # nix From 1b536e52b5381c1445c409eed86f6ed03a03580e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Moritz=20B=C3=B6hme?= Date: Sat, 26 Nov 2022 16:02:02 +0100 Subject: [PATCH 07/23] :rocket: improve hyprland experience --- flake.nix | 4 +- hosts/nixos-desktop/default.nix | 8 +- hosts/nixos-laptop/default.nix | 6 - modules/profiles/desktop.nix | 7 +- modules/programs/bspwm/default.nix | 6 + modules/programs/hyprland/config.nix | 178 ++++++++++++++++++++++++ modules/programs/hyprland/default.nix | 74 +++++++++- modules/programs/hyprland/hyprland.conf | 160 --------------------- overlays/default.nix | 2 +- 9 files changed, 263 insertions(+), 182 deletions(-) create mode 100644 modules/programs/hyprland/config.nix delete mode 100644 modules/programs/hyprland/hyprland.conf diff --git a/flake.nix b/flake.nix index 7d32d61..5aff38d 100644 --- a/flake.nix +++ b/flake.nix @@ -51,9 +51,7 @@ inputs.nixpkgs.follows = "nixpkgs"; }; - hyprland = { - url = "github:hyprwm/Hyprland"; - }; + hyprland.url = "github:hyprwm/Hyprland"; }; outputs = diff --git a/hosts/nixos-desktop/default.nix b/hosts/nixos-desktop/default.nix index 0bbdc40..377c478 100644 --- a/hosts/nixos-desktop/default.nix +++ b/hosts/nixos-desktop/default.nix @@ -12,8 +12,9 @@ ./hardware-configuration.nix ]; + my.programs.hyprland.nvidiaSupport = true; + # KERNEL - # HACK to get nvidia driver to build boot.kernelPackages = pkgs.linuxPackages_latest; # BOOT @@ -59,14 +60,13 @@ nohook resolv.conf ''; }; - - # services.xserver.videoDrivers = [ "nvidia" ]; + hardware.nvidia.modesetting.enable = true; + services.xserver.videoDrivers = [ "nvidia" ]; hardware.opengl = { enable = true; driSupport32Bit = true; driSupport = true; }; - # hardware.nvidia.package = config.boot.kernelPackages.nvidiaPackages.legacy_470; services.xserver.xrandrHeads = [ { output = "HDMI-1"; } { diff --git a/hosts/nixos-laptop/default.nix b/hosts/nixos-laptop/default.nix index 4c7130d..d89009d 100644 --- a/hosts/nixos-laptop/default.nix +++ b/hosts/nixos-laptop/default.nix @@ -16,12 +16,6 @@ # certainty = 3.0; # }; - - my.programs = { - bspwm.enable = false; - hyprland.enable = true; - }; - # BOOT boot = { supportedFilesystems = [ "btrfs" ]; diff --git a/modules/profiles/desktop.nix b/modules/profiles/desktop.nix index 92d25a9..eaec2b7 100644 --- a/modules/profiles/desktop.nix +++ b/modules/profiles/desktop.nix @@ -20,7 +20,7 @@ with lib; { programs = { adb.enable = true; - bspwm.enable = mkDefault true; + hyprland.enable = true; code.enable = true; emacs.enable = true; firefox = { @@ -101,11 +101,6 @@ with lib; { }; }; - programs.xss-lock = { - enable = true; - lockerCommand = "${pkgs.i3lock-fancy-rapid}/bin/i3lock-fancy-rapid 10 5"; - }; - environment.systemPackages = with pkgs; [ # nix nixpkgs-review diff --git a/modules/programs/bspwm/default.nix b/modules/programs/bspwm/default.nix index ffb5448..4ecf68c 100644 --- a/modules/programs/bspwm/default.nix +++ b/modules/programs/bspwm/default.nix @@ -75,6 +75,12 @@ in }; }; }; + + programs.xss-lock = { + enable = true; + lockerCommand = "${pkgs.i3lock-fancy-rapid}/bin/i3lock-fancy-rapid 10 5"; + }; + environment.systemPackages = with pkgs; [ bc # HACK to get bsp-layout to work brightnessctl diff --git a/modules/programs/hyprland/config.nix b/modules/programs/hyprland/config.nix new file mode 100644 index 0000000..51562a3 --- /dev/null +++ b/modules/programs/hyprland/config.nix @@ -0,0 +1,178 @@ +{ config +, lib +, pkgs +, ... +}: +'' + # + # Please note not all available settings / options are set here. + # For a full list, see the wiki + # + + # See https://wiki.hyprland.org/Configuring/Monitors/ + monitor=,preferred,auto,1 + + + # See https://wiki.hyprland.org/Configuring/Keywords/ for more + + # Execute your favorite apps at launch + # exec-once = waybar & hyprpaper & firefox + + # Source a file (multi-file configs) + # source = ~/.config/hypr/myColors.conf + + # For all categories, see https://wiki.hyprland.org/Configuring/Variables/ + input { + kb_layout = de,us + kb_variant = + kb_model = + kb_options = grp:alt_shift_toggle + kb_rules = + + follow_mouse = 1 + + touchpad { + natural_scroll = yes + } + + sensitivity = 0 # -1.0 - 1.0, 0 means no modification. + } + + general { + # See https://wiki.hyprland.org/Configuring/Variables/ for more + + gaps_in = 5 + gaps_out = 5 + border_size = 2 + col.active_border = rgba(1affffee) + col.inactive_border = rgba(595959aa) + + layout = dwindle + } + + decoration { + # See https://wiki.hyprland.org/Configuring/Variables/ for more + + rounding = 5 + inactive_opacity = 0.98 + blur = yes + blur_size = 8 + blur_passes = 1 + blur_new_optimizations = on + + drop_shadow = yes + shadow_range = 4 + shadow_render_power = 3 + col.shadow = rgba(1a1a1aee) + } + + animations { + enabled = yes + + # Some default animations, see https://wiki.hyprland.org/Configuring/Animations/ for more + + bezier = myBezier, 0.45, 0, 0.55, 1 + + animation = windows, 1, 3, myBezier + animation = windowsOut, 1, 3, myBezier + animation = border, 1, 3, myBezier + animation = fade, 1, 3, myBezier + animation = workspaces, 1, 3, myBezier + } + + dwindle { + # See https://wiki.hyprland.org/Configuring/Dwindle-Layout/ for more + pseudotile = yes # master switch for pseudotiling. Enabling is bound to mainMod + P in the keybinds section below + preserve_split = yes # you probably want this + no_gaps_when_only = true + } + + master { + # See https://wiki.hyprland.org/Configuring/Master-Layout/ for more + no_gaps_when_only = true + } + + gestures { + # See https://wiki.hyprland.org/Configuring/Variables/ for more + workspace_swipe = on + } + + # Example per-device config + # See https://wiki.hyprland.org/Configuring/Keywords/#executing for more + device:epic mouse V1 { + sensitivity = -0.5 + } + + # Example windowrule v1 + # windowrule = float, ^(kitty)$ + # Example windowrule v2 + # windowrulev2 = float,class:^(kitty)$,title:^(kitty)$ + windowrulev2 = float,class:^([rR]ofi)$ + # See https://wiki.hyprland.org/Configuring/Window-Rules/ for more + + + # See https://wiki.hyprland.org/Configuring/Keywords/ for more + $mainMod = SUPER + $windowMod = ALT + + # Example binds, see https://wiki.hyprland.org/Configuring/Binds/ for more + bind = $mainMod, D, exec, hyprctl keyword general:layout dwindle + bind = $mainMod, E, exec, emacsclient -c -a emacs + bind = $mainMod, F, togglefloating, + bind = $mainMod, M, exec, hyprctl keyword general:layout master + bind = $mainMod, P, pseudo, # dwindle + bind = $mainMod, Q, killactive, + bind = $mainMod, R, exec, rofi -show combi + bind = $mainMod, C, exec, rofi -show calc -modi calc -no-show-match -no-sort | xclip -selection clipboard + bind = $mainMod, B, exec, rofi-bluetooth + bind = $mainMod, RETURN, exec, kitty + bind = $mainMod, T, togglesplit, # dwindle + bind = , XF86AudioLowerVolume, exec, pamixer -d 5 + bind = , XF86AudioMute, exec, pamixer -t + bind = , XF86AudioNext, exec, playerctl -p "spotifyd,firefox" next + bind = , XF86AudioPlay, exec, playerctl -p "spotifyd,firefox" play-pause + bind = , XF86AudioPrev, exec, playerctl -p "spotifyd,firefox" previous + bind = , XF86AudioRaiseVolume, exec, pamixer -i 5 + bind = , XF86MonBrightnessDown, exec, brightnessctl s 10%- + bind = , XF86MonBrightnessUp, exec, brightnessctl s 10%+ + + # Move focus with mainMod + hjkl + bind = $mainMod, H, movefocus, l + bind = $mainMod, L, movefocus, r + bind = $mainMod, K, movefocus, u + bind = $mainMod, J, movefocus, d + + # Switch workspaces with mainMod + [0-9] + bind = $mainMod, 1, workspace, 1 + bind = $mainMod, 2, workspace, 2 + bind = $mainMod, 3, workspace, 3 + bind = $mainMod, 4, workspace, 4 + bind = $mainMod, 5, workspace, 5 + bind = $mainMod, 6, workspace, 6 + bind = $mainMod, 7, workspace, 7 + bind = $mainMod, 8, workspace, 8 + bind = $mainMod, 9, workspace, 9 + bind = $mainMod, 0, workspace, 10 + + # Move active window to a workspace with mainMod + SHIFT + [0-9] + bind = $mainMod SHIFT, 1, movetoworkspace, 1 + bind = $mainMod SHIFT, 2, movetoworkspace, 2 + bind = $mainMod SHIFT, 3, movetoworkspace, 3 + bind = $mainMod SHIFT, 4, movetoworkspace, 4 + bind = $mainMod SHIFT, 5, movetoworkspace, 5 + bind = $mainMod SHIFT, 6, movetoworkspace, 6 + bind = $mainMod SHIFT, 7, movetoworkspace, 7 + bind = $mainMod SHIFT, 8, movetoworkspace, 8 + bind = $mainMod SHIFT, 9, movetoworkspace, 9 + bind = $mainMod SHIFT, 0, movetoworkspace, 10 + + # Scroll through existing workspaces with mainMod + scroll + bind = $mainMod, mouse_down, workspace, e+1 + bind = $mainMod, mouse_up, workspace, e-1 + + # Move/resize windows with mainMod + LMB/RMB and dragging + bindm = $mainMod, mouse:272, movewindow + bindm = $mainMod, mouse:273, resizewindow + + exec-once=synology-drive +'' diff --git a/modules/programs/hyprland/default.nix b/modules/programs/hyprland/default.nix index d05ad4c..42dec13 100644 --- a/modules/programs/hyprland/default.nix +++ b/modules/programs/hyprland/default.nix @@ -3,7 +3,7 @@ , pkgs , inputs , ... -}: +} @ args: with lib; let @@ -22,6 +22,7 @@ in config = mkIf cfg.enable { home-manager.users.moritz = { imports = [ inputs.hyprland.homeManagerModules.default ]; + programs.waybar = { enable = true; package = pkgs.waybar-hyprland; @@ -34,6 +35,7 @@ in output = [ "eDP-1" "HDMI-A-1" + "HDMI-A-2" ]; modules-left = [ "wlr/workspaces" ]; modules-center = [ "hyprland/window" ]; @@ -46,23 +48,91 @@ in }; }; }; + wayland.windowManager.hyprland = { enable = true; package = hyprland; - extraConfig = builtins.readFile ./hyprland.conf; + extraConfig = import ./config.nix args; }; + + services.swayidle = { + enable = true; + events = [ + { + event = "before-sleep"; + command = "${pkgs.swaylock-effects}/bin/swaylock -fF"; + } + { + event = "lock"; + command = "${pkgs.swaylock-effects}/bin/swaylock -fF"; + } + ]; + timeouts = [ + { + timeout = 300; + command = "${hyprland}/bin/hyprctl dispatch dpms off"; + resumeCommand = "${hyprland}/bin/hyprctl dispatch dpms on"; + } + { + timeout = 310; + command = "${pkgs.systemd}/bin/loginctl lock-session"; + } + ]; + }; + + # start swayidle as part of hyprland, not sway + systemd.user.services.swayidle.Install.WantedBy = lib.mkForce [ "hyprland-session.target" ]; }; + + users.users.moritz.packages = with pkgs; [ + swayidle + swaylock-effects + pamixer + playerctl + brightnessctl + ]; + + security.pam.services.swaylock = { }; + programs.hyprland = { enable = true; package = null; }; + + environment.sessionVariables = + { + XDG_CURRENT_DESKTOP = "Hyprland"; + XDG_SESSION_TYPE = "wayland"; + XDG_SESSION_DESKTOP = "Hyprland"; + QT_AUTO_SCREEN_SCALE_FACTOR = "1"; + QT_QPA_PLATFORM = "wayland;xcb"; + QT_WAYLAND_DISABLE_WINDOWDECORATION = "1"; + QT_QPA_PLATFORMTHEME = "qt5ct"; + _JAVA_AWT_WM_NONEREPARENTING = "1"; + } // + (if cfg.nvidiaSupport then + { + LIBVA_DRIVER_NAME = "nvidia"; + XDG_SESSION_TYPE = "wayland"; + GBM_BACKEND = "nvidia-drm"; + __GLX_VENDOR_LIBRARY_NAME = "nvidia"; + WLR_NO_HARDWARE_CURSORS = "1"; + __GL_VRR_ALLOWED = "0"; + } else { }); + services.xserver = { enable = true; displayManager = { gdm.enable = true; + autoLogin = { + enable = true; + user = "moritz"; + }; + defaultSession = "hyprland"; sessionPackages = [ hyprland ]; }; }; + xdg.portal = { enable = true; wlr.enable = true; diff --git a/modules/programs/hyprland/hyprland.conf b/modules/programs/hyprland/hyprland.conf deleted file mode 100644 index c8ac776..0000000 --- a/modules/programs/hyprland/hyprland.conf +++ /dev/null @@ -1,160 +0,0 @@ -# -# Please note not all available settings / options are set here. -# For a full list, see the wiki -# - -# See https://wiki.hyprland.org/Configuring/Monitors/ -monitor=,preferred,auto,1 - - -# See https://wiki.hyprland.org/Configuring/Keywords/ for more - -# Execute your favorite apps at launch -# exec-once = waybar & hyprpaper & firefox - -# Source a file (multi-file configs) -# source = ~/.config/hypr/myColors.conf - -# For all categories, see https://wiki.hyprland.org/Configuring/Variables/ -input { - kb_layout = de - kb_variant = - kb_model = - kb_options = - kb_rules = - - follow_mouse = 1 - - touchpad { - natural_scroll = yes - } - - sensitivity = 0 # -1.0 - 1.0, 0 means no modification. -} - -general { - # See https://wiki.hyprland.org/Configuring/Variables/ for more - - gaps_in = 5 - gaps_out = 5 - border_size = 2 - col.active_border = rgba(1affffee) - col.inactive_border = rgba(595959aa) - - layout = dwindle -} - -decoration { - # See https://wiki.hyprland.org/Configuring/Variables/ for more - - rounding = 5 - inactive_opacity = 0.98 - blur = yes - blur_size = 8 - blur_passes = 1 - blur_new_optimizations = on - - drop_shadow = yes - shadow_range = 4 - shadow_render_power = 3 - col.shadow = rgba(1a1a1aee) -} - -animations { - enabled = yes - - # Some default animations, see https://wiki.hyprland.org/Configuring/Animations/ for more - - bezier = myBezier, 0.45, 0, 0.55, 1 - - animation = windows, 1, 3, myBezier - animation = windowsOut, 1, 3, myBezier - animation = border, 1, 3, myBezier - animation = fade, 1, 3, myBezier - animation = workspaces, 1, 3, myBezier -} - -dwindle { - # See https://wiki.hyprland.org/Configuring/Dwindle-Layout/ for more - pseudotile = yes # master switch for pseudotiling. Enabling is bound to mainMod + P in the keybinds section below - preserve_split = yes # you probably want this -} - -master { - # See https://wiki.hyprland.org/Configuring/Master-Layout/ for more - new_is_master = true -} - -gestures { - # See https://wiki.hyprland.org/Configuring/Variables/ for more - workspace_swipe = on -} - -# Example per-device config -# See https://wiki.hyprland.org/Configuring/Keywords/#executing for more -device:epic mouse V1 { - sensitivity = -0.5 -} - -# Example windowrule v1 -# windowrule = float, ^(kitty)$ -# Example windowrule v2 -# windowrulev2 = float,class:^(kitty)$,title:^(kitty)$ -windowrulev2 = float,class:^(rofi)$ -# See https://wiki.hyprland.org/Configuring/Window-Rules/ for more - - -# See https://wiki.hyprland.org/Configuring/Keywords/ for more -$mainMod = SUPER -$windowMod = ALT - -# Example binds, see https://wiki.hyprland.org/Configuring/Binds/ for more -bind = $mainMod, RETURN, exec, kitty -bind = $mainMod, Q, killactive, -bind = $mainMod, M, exit, -bind = $mainMod, E, exec, emacsclient -c -a emacs -bind = $mainMod, F, togglefloating, -bind = $mainMod, D, exec, rofi -show combi -bind = $mainMod, P, pseudo, # dwindle -bind = $mainMod, T, togglesplit, # dwindle - -# Move focus with mainMod + arrow keys -bind = $mainMod, H, movefocus, l -bind = $mainMod, L, movefocus, r -bind = $mainMod, K, movefocus, u -bind = $mainMod, J, movefocus, d - -# Switch workspaces with mainMod + [0-9] -bind = $mainMod, 1, workspace, 1 -bind = $mainMod, 2, workspace, 2 -bind = $mainMod, 3, workspace, 3 -bind = $mainMod, 4, workspace, 4 -bind = $mainMod, 5, workspace, 5 -bind = $mainMod, 6, workspace, 6 -bind = $mainMod, 7, workspace, 7 -bind = $mainMod, 8, workspace, 8 -bind = $mainMod, 9, workspace, 9 -bind = $mainMod, 0, workspace, 10 - -# Move active window to a workspace with mainMod + SHIFT + [0-9] -bind = $mainMod SHIFT, 1, movetoworkspace, 1 -bind = $mainMod SHIFT, 2, movetoworkspace, 2 -bind = $mainMod SHIFT, 3, movetoworkspace, 3 -bind = $mainMod SHIFT, 4, movetoworkspace, 4 -bind = $mainMod SHIFT, 5, movetoworkspace, 5 -bind = $mainMod SHIFT, 6, movetoworkspace, 6 -bind = $mainMod SHIFT, 7, movetoworkspace, 7 -bind = $mainMod SHIFT, 8, movetoworkspace, 8 -bind = $mainMod SHIFT, 9, movetoworkspace, 9 -bind = $mainMod SHIFT, 0, movetoworkspace, 10 - -# Scroll through existing workspaces with mainMod + scroll -bind = $mainMod, mouse_down, workspace, e+1 -bind = $mainMod, mouse_up, workspace, e-1 - -# Move/resize windows with mainMod + LMB/RMB and dragging -bindm = $mainMod, mouse:272, movewindow -bindm = $mainMod, mouse:273, resizewindow - -exec-once=synology-drive -exec-once=waybar diff --git a/overlays/default.nix b/overlays/default.nix index 505736f..300887c 100644 --- a/overlays/default.nix +++ b/overlays/default.nix @@ -3,7 +3,7 @@ agenix = inputs.agenix.defaultPackage."${prev.system}"; waybar-hyprland = prev.waybar.overrideAttrs (old: { postPatch = old.postPatch or "" + '' - ${final.gnused}/bin/sed -i 's,zext_workspace_handle_v1_activate(workspace_handle_);,const std::string command = "${final.hyprland}/bin/hyprctl dispatch workspace " + name_;\n\tsystem(command.c_str());,g' src/modules/wlr/workspace_manager.cpp + sed -i 's,zext_workspace_handle_v1_activate(workspace_handle_);,const std::string command = "${final.hyprland}/bin/hyprctl dispatch workspace " + name_;\n\tsystem(command.c_str());,g' src/modules/wlr/workspace_manager.cpp ''; mesonFlags = old.mesonFlags or [ ] ++ [ "-Dexperimental=true" ]; }); From 6b925636cc22e33114f063aca07d9441a74318ed Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Moritz=20B=C3=B6hme?= Date: Fri, 23 Dec 2022 12:37:57 +0100 Subject: [PATCH 08/23] add logseq wrapped for wayland --- modules/programs/logseq.nix | 2 +- overlays/default.nix | 11 +++++++++++ 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/modules/programs/logseq.nix b/modules/programs/logseq.nix index 948e39c..35349b3 100644 --- a/modules/programs/logseq.nix +++ b/modules/programs/logseq.nix @@ -13,7 +13,7 @@ in config = mkIf cfg.enable { users.users.moritz.packages = with pkgs; [ - logseq + logseq-wayland ]; xdg.mime.defaultApplications."x-scheme-handler/logseq" = "logseq.desktop"; }; diff --git a/overlays/default.nix b/overlays/default.nix index 300887c..f9685ad 100644 --- a/overlays/default.nix +++ b/overlays/default.nix @@ -1,6 +1,17 @@ { inputs }: final: prev: { nixpkgs-review-checks = inputs.nixpkgs-review-checks.defaultPackage."${prev.system}"; agenix = inputs.agenix.defaultPackage."${prev.system}"; + + logseq-wayland = prev.symlinkJoin { + name = "logseq"; + paths = [ prev.logseq ]; + nativeBuildInputs = [ prev.makeWrapper ]; + postBuild = '' + wrapProgram $out/bin/logseq \ + --add-flags "--socket=wayland --enable-features=UseOzonePlatform --ozone-platform=wayland" + ''; + }; + waybar-hyprland = prev.waybar.overrideAttrs (old: { postPatch = old.postPatch or "" + '' sed -i 's,zext_workspace_handle_v1_activate(workspace_handle_);,const std::string command = "${final.hyprland}/bin/hyprctl dispatch workspace " + name_;\n\tsystem(command.c_str());,g' src/modules/wlr/workspace_manager.cpp From 8470cbe18243d8bdd0a27b9705b0785458bd60b3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Moritz=20B=C3=B6hme?= Date: Fri, 23 Dec 2022 12:39:07 +0100 Subject: [PATCH 09/23] update emacs for custom emacs init --- modules/programs/emacs.nix | 67 ++++++-------------------------------- 1 file changed, 10 insertions(+), 57 deletions(-) diff --git a/modules/programs/emacs.nix b/modules/programs/emacs.nix index 0059324..c754558 100644 --- a/modules/programs/emacs.nix +++ b/modules/programs/emacs.nix @@ -8,7 +8,7 @@ with lib; let cfg = config.my.programs.emacs; - myEmacs = with pkgs; ((emacsPackagesFor emacs).emacsWithPackages + myEmacs = with pkgs; ((emacsPackagesFor emacsPgtk).emacsWithPackages (epkgs: [ epkgs.vterm ])); in { @@ -16,72 +16,25 @@ in config = mkIf cfg.enable { my.shell.aliases = { - emacs = "emacsclient -t -a 'emacs -t'"; + emacs = "emacsclient -nw -a 'emacs -nw'"; }; - fonts.fonts = [ pkgs.emacs-all-the-icons-fonts ]; - environment.systemPackages = with pkgs; [ - ### Emacs itself - binutils # native-comp needs 'as', provided by this + fonts.fonts = with pkgs; [ + emacs-all-the-icons-fonts + (iosevka-bin.override { variant = "aile"; }) + ]; + users.users.moritz.packages = with pkgs; [ myEmacs - ### Doom dependencies - git (ripgrep.override { withPCRE2 = true; }) - gnutls # for TLS connectivity - - ### Optional dependencies - fd # faster projectile indexing - imagemagick # for image-dired - zstd # for undo-fu-session/undo-tree compression - - ### Module dependencies - ## :checkers - # spell + # flyspell (hunspellWithDicts [ hunspellDicts.en_GB-ize hunspellDicts.en_US hunspellDicts.de_DE ]) - # grammar - languagetool - - ## : tools - # lookup & org +roam - sqlite - gcc # HACK to get emacsqlite binary - wordnet - graphviz - - ## :lang - # latex & org (latex previews) - texlive.combined.scheme-full - texlab - - # nix - nixfmt # for formating nix - rnix-lsp - - # markdown & org +pandoc - pandoc - - # python - nodePackages.pyright - - # sh - nodePackages.bash-language-server - - ## :email - # mu4e - mu - isync - - ## :app - # everywhere - xdotool - xorg.xwininfo - xclip - xorg.xprop + # language servers + nil ]; home-manager.users.moritz = { home.sessionPath = [ "/home/moritz/.config/emacs/bin/" ]; From a856565ac98611607cda3e5b4d04d85ccf6fe9a1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Moritz=20B=C3=B6hme?= Date: Fri, 23 Dec 2022 12:39:24 +0100 Subject: [PATCH 10/23] update hyprland conf --- flake.nix | 3 ++ modules/programs/hyprland/config.nix | 44 ++++++++++++++++------- modules/programs/hyprland/default.nix | 51 +++++++++++++++++++++------ 3 files changed, 75 insertions(+), 23 deletions(-) diff --git a/flake.nix b/flake.nix index 5aff38d..8710075 100644 --- a/flake.nix +++ b/flake.nix @@ -52,6 +52,8 @@ }; hyprland.url = "github:hyprwm/Hyprland"; + + hyprpaper.url = "github:hyprwm/hyprpaper"; }; outputs = @@ -105,6 +107,7 @@ self.nixosModules.gaming ]; + hosts.nixos-desktop.modules = [ ./hosts/nixos-desktop self.nixosModules.desktop diff --git a/modules/programs/hyprland/config.nix b/modules/programs/hyprland/config.nix index 51562a3..0fcaa86 100644 --- a/modules/programs/hyprland/config.nix +++ b/modules/programs/hyprland/config.nix @@ -3,6 +3,12 @@ , pkgs , ... }: + +with lib; +let + mkRule = rule: windowRegexes: "windowrulev2 = ${rule},${concatStringsSep "," windowRegexes}"; + mkRules = rules: windowRegexes: concatStringsSep "\n" (map (flip mkRule windowRegexes) rules); +in '' # # Please note not all available settings / options are set here. @@ -26,7 +32,7 @@ kb_layout = de,us kb_variant = kb_model = - kb_options = grp:alt_shift_toggle + kb_options = grp:win_space_toggle,caps:escape kb_rules = follow_mouse = 1 @@ -47,29 +53,31 @@ col.active_border = rgba(1affffee) col.inactive_border = rgba(595959aa) + cursor_inactive_timeout = 1 + layout = dwindle } decoration { # See https://wiki.hyprland.org/Configuring/Variables/ for more - rounding = 5 - inactive_opacity = 0.98 + rounding = 3 blur = yes - blur_size = 8 - blur_passes = 1 + blur_size = 3 + blur_passes = 3 blur_new_optimizations = on drop_shadow = yes - shadow_range = 4 - shadow_render_power = 3 - col.shadow = rgba(1a1a1aee) + shadow_range = 10 + shadow_render_power = 2 + + # col.shadow = rgba(1a1a1aee) } animations { enabled = yes - # Some default animations, see https://wiki.hyprland.org/Configuring/Animations/ for more + # Some default Lanimations, see https://wiki.hyprland.org/Configuring/Animations/ for more bezier = myBezier, 0.45, 0, 0.55, 1 @@ -90,6 +98,7 @@ master { # See https://wiki.hyprland.org/Configuring/Master-Layout/ for more no_gaps_when_only = true + new_is_master = false } gestures { @@ -103,13 +112,21 @@ sensitivity = -0.5 } - # Example windowrule v1 - # windowrule = float, ^(kitty)$ # Example windowrule v2 # windowrulev2 = float,class:^(kitty)$,title:^(kitty)$ - windowrulev2 = float,class:^([rR]ofi)$ # See https://wiki.hyprland.org/Configuring/Window-Rules/ for more + # Firefox Sharing Indicator + ${mkRules ["float" "move 49% 40" "noborder"] ["title:^(.*Sharing Indicator)$"]} + + # Rofi + ${mkRules ["float" "opacity 0.95 0.95"] ["class:^([rR]ofi)$"]} + + windowrulev2 = opacity 0.95 0.95,floating:1 + + # Games + # ${mkRules ["opaque" "noblur" "noborder" "noshadow" "forceinput"] ["fullscreen:1"]} + # See https://wiki.hyprland.org/Configuring/Keywords/ for more $mainMod = SUPER @@ -119,10 +136,11 @@ bind = $mainMod, D, exec, hyprctl keyword general:layout dwindle bind = $mainMod, E, exec, emacsclient -c -a emacs bind = $mainMod, F, togglefloating, + bind = $mainMod SHIFT, F, fullscreen, bind = $mainMod, M, exec, hyprctl keyword general:layout master bind = $mainMod, P, pseudo, # dwindle bind = $mainMod, Q, killactive, - bind = $mainMod, R, exec, rofi -show combi + bind = $mainMod, R, exec, rofi -show combi -normal-window bind = $mainMod, C, exec, rofi -show calc -modi calc -no-show-match -no-sort | xclip -selection clipboard bind = $mainMod, B, exec, rofi-bluetooth bind = $mainMod, RETURN, exec, kitty diff --git a/modules/programs/hyprland/default.nix b/modules/programs/hyprland/default.nix index 42dec13..064c538 100644 --- a/modules/programs/hyprland/default.nix +++ b/modules/programs/hyprland/default.nix @@ -79,9 +79,28 @@ in } ]; }; - # start swayidle as part of hyprland, not sway systemd.user.services.swayidle.Install.WantedBy = lib.mkForce [ "hyprland-session.target" ]; + + xdg.configFile."hypr/hyprpaper.conf" = { + text = + let + setWallpaper = wallpaper: '' + preload = ${wallpaper} + wallpaper = ,${wallpaper} + ''; + in + # setWallpaper "/home/moritz/.config/wallpapers/a_short_walk.png"; + setWallpaper "/home/moritz/.config/wallpapers/mario.gif"; + onChange = "${pkgs.systemd}/bin/systemctl restart --user hyprpaper.service"; + }; + }; + systemd.user.services.hyprpaper = { + enable = true; + path = [ pkgs.hyprpaper ]; + wantedBy = [ "display-manager.service" ]; + after = [ "display-manager.service" ]; + script = "hyprpaper"; }; users.users.moritz.packages = with pkgs; [ @@ -90,6 +109,8 @@ in pamixer playerctl brightnessctl + slurp + grim ]; security.pam.services.swaylock = { }; @@ -120,18 +141,28 @@ in __GL_VRR_ALLOWED = "0"; } else { }); - services.xserver = { - enable = true; - displayManager = { - gdm.enable = true; - autoLogin = { - enable = true; - user = "moritz"; + services = { + dbus.enable = true; + pipewire = { + enable = true; + alsa.enable = true; + alsa.support32Bit = true; + pulse.enable = true; + }; + xserver = { + enable = true; + displayManager = { + gdm.enable = true; + autoLogin = { + enable = true; + user = "moritz"; + }; + defaultSession = "hyprland"; + sessionPackages = [ hyprland ]; }; - defaultSession = "hyprland"; - sessionPackages = [ hyprland ]; }; }; + security.rtkit.enable = true; xdg.portal = { enable = true; From 050d6d90c1ec9a31d4f8d73d6d4c1f81036f0676 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Moritz=20B=C3=B6hme?= Date: Fri, 23 Dec 2022 12:40:37 +0100 Subject: [PATCH 11/23] minor changes --- modules/profiles/base.nix | 3 ++- modules/profiles/desktop.nix | 7 ++++++- modules/profiles/gaming.nix | 1 + modules/programs/bspwm/default.nix | 1 + 4 files changed, 10 insertions(+), 2 deletions(-) diff --git a/modules/profiles/base.nix b/modules/profiles/base.nix index 6bccdc3..08e96e6 100644 --- a/modules/profiles/base.nix +++ b/modules/profiles/base.nix @@ -93,6 +93,7 @@ with lib; hut lazygit neofetch + ripgrep tmux ttyper up @@ -102,7 +103,7 @@ with lib; fonts.fonts = with pkgs; [ (nerdfonts.override { - fonts = [ "FiraCode" "DroidSansMono" "JetBrainsMono" ]; + fonts = [ "FiraCode" ]; }) ]; diff --git a/modules/profiles/desktop.nix b/modules/profiles/desktop.nix index eaec2b7..835e14b 100644 --- a/modules/profiles/desktop.nix +++ b/modules/profiles/desktop.nix @@ -122,10 +122,15 @@ with lib; { vlc thunderbird plantuml + + jetbrains.pycharm-professional + + synology-drive-client ]; + programs.chromium.enable = true; + home-manager.users.moritz = { - services.unclutter.enable = true; services.nextcloud-client = { enable = true; startInBackground = true; diff --git a/modules/profiles/gaming.nix b/modules/profiles/gaming.nix index e5b542d..f6d6ac2 100644 --- a/modules/profiles/gaming.nix +++ b/modules/profiles/gaming.nix @@ -8,5 +8,6 @@ lutris legendary-gl heroic + mangohud ]; } diff --git a/modules/programs/bspwm/default.nix b/modules/programs/bspwm/default.nix index 4ecf68c..78c64a6 100644 --- a/modules/programs/bspwm/default.nix +++ b/modules/programs/bspwm/default.nix @@ -51,6 +51,7 @@ in extraConfig = builtins.readFile ./bspwmrc; }; services = { + unclutter.enable = true; sxhkd = { enable = true; extraConfig = builtins.readFile ./sxhkdrc; From 8e70a05d6d227f10991d906334d2b0e3a40baa04 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Moritz=20B=C3=B6hme?= Date: Fri, 23 Dec 2022 12:40:47 +0100 Subject: [PATCH 12/23] update inputs --- flake.lock | 182 ++++++++++++++++++++++++++++++++++++++++++----------- 1 file changed, 145 insertions(+), 37 deletions(-) diff --git a/flake.lock b/flake.lock index 34d141f..1820dfc 100644 --- a/flake.lock +++ b/flake.lock @@ -23,11 +23,11 @@ "arkenfox-userjs": { "flake": false, "locked": { - "lastModified": 1669146650, - "narHash": "sha256-9FCZt15lrL/aeDaUBFh+U2A4PlTj0jUKbjUbGIFUBik=", + "lastModified": 1670266131, + "narHash": "sha256-hf+fLTT67YWJPTkKgLxyP6KRAhiCaxuGY7GLltTyZvc=", "owner": "arkenfox", "repo": "user.js", - "rev": "6789dc7fefac5594d958a065463b4dc9d265c089", + "rev": "e4a85c30c129cf664cc8a39705bb070fce828d33", "type": "github" }, "original": { @@ -61,11 +61,11 @@ ] }, "locked": { - "lastModified": 1669439968, - "narHash": "sha256-VlQsxaHruFN29FOvRHUYecySRU9UzFqqpshfgoGxKes=", + "lastModified": 1670580643, + "narHash": "sha256-1D1mObqPnPJUxDZP2pOEvlYpEHq2oT2wqwwe46Jh24c=", "owner": "nix-community", "repo": "emacs-overlay", - "rev": "838bd1e55d9168d2df9dc0331565f884c3be3250", + "rev": "ff0c1ead7f28972ba4b63ffc9353a132b163386a", "type": "github" }, "original": { @@ -153,11 +153,11 @@ "forgit-git": { "flake": false, "locked": { - "lastModified": 1669300261, - "narHash": "sha256-ca7EM/F0Spsdr3MbjIVwbjLVXg6/qWGczBQHLCcpU5A=", + "lastModified": 1670576098, + "narHash": "sha256-IUM4SbJTzL5pG2gCTkGUPbz+ujv/ENC/Gt0bpJjvUNE=", "owner": "wfxr", "repo": "forgit", - "rev": "98321ef05a10fe1b536ae88e283339e769866e24", + "rev": "bfea8cf48523b3d6fa72d131e81769b68f43e3a7", "type": "github" }, "original": { @@ -195,11 +195,11 @@ "utils": "utils" }, "locked": { - "lastModified": 1669328018, - "narHash": "sha256-aJRMobnNDEXKwoSZFS4hGjGU1WDNxkQ82BVKAEohOfY=", + "lastModified": 1670513770, + "narHash": "sha256-muL74fsbGA8K8WlZSPNWddOiuBnC54kAajncX6nXrh4=", "owner": "nix-community", "repo": "home-manager", - "rev": "62cb5bcf93896e4dd6b4507dac7ba2e2e3abc9d7", + "rev": "054d9e3187ca00479e8036dc0e92900a384f30fd", "type": "github" }, "original": { @@ -232,15 +232,17 @@ }, "hyprland": { "inputs": { + "hyprland-protocols": "hyprland-protocols", "nixpkgs": "nixpkgs", - "wlroots": "wlroots" + "wlroots": "wlroots", + "xdph": "xdph" }, "locked": { - "lastModified": 1669420836, - "narHash": "sha256-5d6hfIs3Rxs2au79yI6JED0/nkqot8NLBgrrZLX+yVk=", + "lastModified": 1670534695, + "narHash": "sha256-YNPiXsaZSQvetwsnrHuRxQnm8t9p5y9Nd3lRW6bPVxM=", "owner": "hyprwm", "repo": "Hyprland", - "rev": "f45ec2497735851cd3d361278abaa7e58ec08b2a", + "rev": "726732244a5d51a0da54219174c13f4428017b79", "type": "github" }, "original": { @@ -249,13 +251,79 @@ "type": "github" } }, + "hyprland-protocols": { + "flake": false, + "locked": { + "lastModified": 1670258048, + "narHash": "sha256-Lm2sXnDVZNE+taHqsqVibvPmSdu65VHvXI507KVX4lg=", + "owner": "hyprwm", + "repo": "hyprland-protocols", + "rev": "0dcff94fc10df2bbb66d3e1b5a1d6cfd3ada5515", + "type": "github" + }, + "original": { + "owner": "hyprwm", + "repo": "hyprland-protocols", + "type": "github" + } + }, + "hyprland-protocols_2": { + "flake": false, + "locked": { + "lastModified": 1670185345, + "narHash": "sha256-hxWGqlPecqEsE6nOHDV29KFBKePbY2Ipeac6lrChMKY=", + "owner": "hyprwm", + "repo": "hyprland-protocols", + "rev": "4623a404c091e64743ba310199bb380ec52f1936", + "type": "github" + }, + "original": { + "owner": "hyprwm", + "repo": "hyprland-protocols", + "type": "github" + } + }, + "hyprpaper": { + "inputs": { + "nixpkgs": "nixpkgs_2" + }, + "locked": { + "lastModified": 1669635788, + "narHash": "sha256-xlJ4hbUm3KULq4daqopi+eAv1u57uLlTare04HL3X/c=", + "owner": "hyprwm", + "repo": "hyprpaper", + "rev": "ab85578dce442b80aa3378fe0304e6cb6f16f593", + "type": "github" + }, + "original": { + "owner": "hyprwm", + "repo": "hyprpaper", + "type": "github" + } + }, + "jetbrains-plugins": { + "locked": { + "lastModified": 1670234247, + "narHash": "sha256-CepwZGno3XkePl3wBbFUcwsf+grnXTbKIujaCVaEnG0=", + "owner": "MoritzBoehme", + "repo": "nixpkgs", + "rev": "96386b1df1ad0099de5f74dea941d0191fbd3800", + "type": "github" + }, + "original": { + "owner": "MoritzBoehme", + "ref": "jetbrains-plugins", + "repo": "nixpkgs", + "type": "github" + } + }, "master": { "locked": { - "lastModified": 1669458704, - "narHash": "sha256-wpaBMBfjSDCnw4F7A1xBdqy2nW7dvjk3coISy+tTmX4=", + "lastModified": 1670583233, + "narHash": "sha256-sa0XbJmnJEmQp/Uvjh8lprAazR0UdCoVv8n6EeeG1aQ=", "owner": "nixos", "repo": "nixpkgs", - "rev": "3200a569242cdc75c191fc28b6adefe60315e921", + "rev": "539954efab2b023064efd3edeb7912b71193acfd", "type": "github" }, "original": { @@ -266,11 +334,11 @@ }, "nixpkgs": { "locked": { - "lastModified": 1668765800, - "narHash": "sha256-rC40+/W6Hio7b/RsY8SvQPKNx4WqNcTgfYv8cUMAvJk=", + "lastModified": 1670064435, + "narHash": "sha256-+ELoY30UN+Pl3Yn7RWRPabykwebsVK/kYE9JsIsUMxQ=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "52b2ac8ae18bbad4374ff0dd5aeee0fdf1aea739", + "rev": "61a8a98e6d557e6dd7ed0cdb54c3a3e3bbc5e25c", "type": "github" }, "original": { @@ -298,11 +366,27 @@ }, "nixpkgs_2": { "locked": { - "lastModified": 1669387357, - "narHash": "sha256-z1azVj/5Em5kGhh9OgBOsjTEgMab7hXL/aRilH9tzyI=", + "lastModified": 1658826464, + "narHash": "sha256-94ZTF0uIX/iZdiD4RJ5f933ak/OM4XLl7hF+gCa4Iuk=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "ce49cb7792a7ffd65ef352dda1110a4e4a204eac", + "type": "github" + }, + "original": { + "owner": "NixOS", + "ref": "nixos-unstable", + "repo": "nixpkgs", + "type": "github" + } + }, + "nixpkgs_3": { + "locked": { + "lastModified": 1670525689, + "narHash": "sha256-YIjGzxrRQa5LYO0zlnH/ardcwXsRgsnHe3TkGkvCxbc=", "owner": "nixos", "repo": "nixpkgs", - "rev": "55b3f68bda6d4f4dc6092eed0508063f154fa4fd", + "rev": "f21f11aa2a02cb78651c6d57546c7d7541f9240c", "type": "github" }, "original": { @@ -312,7 +396,7 @@ "type": "github" } }, - "nixpkgs_3": { + "nixpkgs_4": { "locked": { "lastModified": 1668994630, "narHash": "sha256-1lqx6HLyw6fMNX/hXrrETG1vMvZRGm2XVC9O/Jt0T6c=", @@ -358,15 +442,15 @@ "flake-compat": "flake-compat", "flake-utils": "flake-utils_3", "gitignore": "gitignore", - "nixpkgs": "nixpkgs_3", + "nixpkgs": "nixpkgs_4", "nixpkgs-stable": "nixpkgs-stable" }, "locked": { - "lastModified": 1669152228, - "narHash": "sha256-FEDReoTLWJHXcNso7aaAlAUU7uOqIR6Hc/C/nqlfooE=", + "lastModified": 1670413394, + "narHash": "sha256-M7sWqrKtOqUv9euX1t3HCxis8cPy9MNiZxQmUf0KF1o=", "owner": "cachix", "repo": "pre-commit-hooks.nix", - "rev": "078b0dee35e2da01334af682ec347463b70a9986", + "rev": "1303a1a76e9eb074075bfe566518c413f6fc104e", "type": "github" }, "original": { @@ -385,8 +469,10 @@ "home-manager": "home-manager", "howdy": "howdy", "hyprland": "hyprland", + "hyprpaper": "hyprpaper", + "jetbrains-plugins": "jetbrains-plugins", "master": "master", - "nixpkgs": "nixpkgs_2", + "nixpkgs": "nixpkgs_3", "pre-commit-hooks": "pre-commit-hooks_2", "stable": "stable", "utils": "utils_2" @@ -394,11 +480,11 @@ }, "stable": { "locked": { - "lastModified": 1669379897, - "narHash": "sha256-XM3xBfQD5tOtV4KAhQHyh53cJdqkLwotZa5JJIUjbQc=", + "lastModified": 1670543317, + "narHash": "sha256-4mMR56rtxKr+Gwz399jFr4i76SQZxsLWxxyfQlPXRm0=", "owner": "nixos", "repo": "nixpkgs", - "rev": "8690906c4d80db5d85f52313a8487bf2e7b8d4c5", + "rev": "7a6a010c3a1d00f8470a5ca888f2f927f1860a19", "type": "github" }, "original": { @@ -445,11 +531,11 @@ "flake": false, "locked": { "host": "gitlab.freedesktop.org", - "lastModified": 1668785720, - "narHash": "sha256-CX+PYJP2PxZWL380WzyMNsrfRgIb/78brdwvDg/zj28=", + "lastModified": 1669925104, + "narHash": "sha256-xMHfW+/G9MieN/5tXHUA5/ztE8dkE093cNFTEUgcwxI=", "owner": "wlroots", "repo": "wlroots", - "rev": "4ff46e6cf9463e594605928feeb7c55cf323b5e7", + "rev": "c8eb24d30e18c165728b8788a10716611c3b633d", "type": "gitlab" }, "original": { @@ -458,6 +544,28 @@ "repo": "wlroots", "type": "gitlab" } + }, + "xdph": { + "inputs": { + "hyprland-protocols": "hyprland-protocols_2", + "nixpkgs": [ + "hyprland", + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1670202338, + "narHash": "sha256-StTfshdAoSxO+t0wRbq1I3YESLFIQWFjGJse5ICV8rk=", + "owner": "hyprwm", + "repo": "xdg-desktop-portal-hyprland", + "rev": "af840a9e0947a79a37a95a9f62062653721e43fa", + "type": "github" + }, + "original": { + "owner": "hyprwm", + "repo": "xdg-desktop-portal-hyprland", + "type": "github" + } } }, "root": "root", From fc1084b0caab6f4cca9ac3cce6f48e7dcd633280 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Moritz=20B=C3=B6hme?= Date: Fri, 30 Dec 2022 18:58:13 +0100 Subject: [PATCH 13/23] improve code quality --- flake.nix | 20 +++++++++++++++++--- modules/profiles/desktop.nix | 1 - overlays/default.nix | 7 +++---- 3 files changed, 20 insertions(+), 8 deletions(-) diff --git a/flake.nix b/flake.nix index 8710075..1c93a22 100644 --- a/flake.nix +++ b/flake.nix @@ -61,20 +61,32 @@ utils.lib.mkFlake { inherit self inputs; + supportedSystems = [ "x86_64-linux" ]; + channelsConfig.allowUnfree = true; ################ ### Overlays ### ################ - overlays.default = import ./overlays { inherit inputs; }; + overlay = import ./overlays { inherit inputs; }; + channels.nixpkgs.overlaysBuilder = channels: [ - self.overlays.default - inputs.utils.overlay + self.overlay + inputs.agenix.overlay inputs.emacs-overlay.overlay inputs.howdy.overlays.default + inputs.hyprland.overlays.default + inputs.hyprpaper.overlays.default + inputs.utils.overlay ]; + # overlays = utils.lib.exportOverlays { + # inherit (self) pkgs inputs; + # }; + + overlays.default = self.overlay; + ############### ### Modules ### ############### @@ -139,6 +151,8 @@ shellcheck.enable = true; }; }; + + packages = utils.lib.exportPackages self.overlays channels; }; }; } diff --git a/modules/profiles/desktop.nix b/modules/profiles/desktop.nix index 835e14b..cc97e51 100644 --- a/modules/profiles/desktop.nix +++ b/modules/profiles/desktop.nix @@ -95,7 +95,6 @@ with lib; { mullvad.enable = true; openconnect.enable = true; openvpn.enable = true; - picom.enable = true; printing.enable = true; redshift.enable = true; }; diff --git a/overlays/default.nix b/overlays/default.nix index f9685ad..071a899 100644 --- a/overlays/default.nix +++ b/overlays/default.nix @@ -1,9 +1,6 @@ { inputs }: final: prev: { - nixpkgs-review-checks = inputs.nixpkgs-review-checks.defaultPackage."${prev.system}"; - agenix = inputs.agenix.defaultPackage."${prev.system}"; - logseq-wayland = prev.symlinkJoin { - name = "logseq"; + name = "logseq-wayland"; paths = [ prev.logseq ]; nativeBuildInputs = [ prev.makeWrapper ]; postBuild = '' @@ -13,11 +10,13 @@ }; waybar-hyprland = prev.waybar.overrideAttrs (old: { + pname = "${old.pname}-hyprland"; postPatch = old.postPatch or "" + '' sed -i 's,zext_workspace_handle_v1_activate(workspace_handle_);,const std::string command = "${final.hyprland}/bin/hyprctl dispatch workspace " + name_;\n\tsystem(command.c_str());,g' src/modules/wlr/workspace_manager.cpp ''; mesonFlags = old.mesonFlags or [ ] ++ [ "-Dexperimental=true" ]; }); + master = import inputs.master { inherit (prev) system; config.allowUnfree = true; From 7c90839817b54bb95221b3897c47e20db4b05e71 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Moritz=20B=C3=B6hme?= Date: Fri, 30 Dec 2022 19:01:31 +0100 Subject: [PATCH 14/23] improve hyprland module --- modules/programs/hyprland/default.nix | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/modules/programs/hyprland/default.nix b/modules/programs/hyprland/default.nix index 064c538..b46c677 100644 --- a/modules/programs/hyprland/default.nix +++ b/modules/programs/hyprland/default.nix @@ -9,9 +9,7 @@ with lib; let cfg = config.my.programs.hyprland; - hyprland-default = inputs.hyprland.packages.${pkgs.system}.default; - hyprland-nvidia = hyprland-default.override { nvidiaPatches = true; }; - hyprland = if cfg.nvidiaSupport then hyprland-nvidia else hyprland-default; + hyprland = pkgs.hyprland.override { nvidiaPatches = cfg.nvidiaSupport; }; in { options.my.programs.hyprland = { @@ -26,7 +24,10 @@ in programs.waybar = { enable = true; package = pkgs.waybar-hyprland; - systemd.enable = true; + systemd = { + enable = true; + target = "hyprland-session.target"; + }; settings = { mainBar = { layer = "top"; @@ -90,15 +91,14 @@ in wallpaper = ,${wallpaper} ''; in - # setWallpaper "/home/moritz/.config/wallpapers/a_short_walk.png"; - setWallpaper "/home/moritz/.config/wallpapers/mario.gif"; + setWallpaper "/home/moritz/.config/wallpapers/a_short_walk.png"; onChange = "${pkgs.systemd}/bin/systemctl restart --user hyprpaper.service"; }; }; systemd.user.services.hyprpaper = { enable = true; path = [ pkgs.hyprpaper ]; - wantedBy = [ "display-manager.service" ]; + wantedBy = [ "hyprland-session.target" ]; after = [ "display-manager.service" ]; script = "hyprpaper"; }; @@ -167,6 +167,7 @@ in xdg.portal = { enable = true; wlr.enable = true; + extraPortals = [ pkgs.xdg-desktop-portal-hyprland ]; }; }; } From 5ffc37cb3fadca366b3646eafc52d9e6f7f5ec63 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Moritz=20B=C3=B6hme?= Date: Fri, 30 Dec 2022 19:01:50 +0100 Subject: [PATCH 15/23] expand private ssh conf --- secrets/ssh-home.age | Bin 888 -> 1005 bytes 1 file changed, 0 insertions(+), 0 deletions(-) diff --git a/secrets/ssh-home.age b/secrets/ssh-home.age index 29c15428e52821ca8c4ad65dafe181e97349c788..70909cfddeab92c1fee3d025be14ed22d82331be 100644 GIT binary patch delta 918 zcmWmB>uVbY003~iNhhf~n3ImWYN$e~F(#MC-KAn(FPG$+dnI>C?onDv?k<=2<(kXo zfi4|_12?v66D zHi1%pPXzNx;Vh*lfMhbA1n`J5VzCcdE0v60kzHOd;Il><0WGRlJY1@}lN_WHI7Kva zFdx)YiXW;J<1x5M1BqBub{a)a%$D<-CGFMac(#O7AmzkWs;Y}lg2EF_Rz@6TA`z5; zVN-&V{s=<8_(wMvEj3)QP#1in5-DJX0-_)p2InGJ9jW@#aFyY6zJws4!GLOkJUX9G zF}Rq}B|xA}&QAm!20>C_kWu~eL_&mJEaC)gN__h1j&80lyWIvzqZw4TWkNMlE~083 zMn^!9bcYmCvqggSCKQeoVz8ymnF!%kqktkIbuFL@q^d@INXG%6K)>xN2kN$~6H2n8SO{Mx&XQn8WE6lF zS<;blr&_#>@p>>uNg+ro$A@v#70-<13odt-)+8P!#TqA5qz340v}BPyA;Hau*zkY8 z-EJ)_Uc*^ZK|K;+=%yi=XdHEz0fTAgf(0Rk1sb$N8i73dK-{wW1GY9p?_Js0CiM-x zJor`V%bpJ8HKz5>k-1;brx$O%HBTZm2%ZKmVytLT!eD0O8eQRS&Lo@S}H$Rw7> literal 888 zcmZY4%gfsY008iVmk|XI;&)Ps%7;Sjn)Yj69wyB@&7;kud9h2Hq-ol(Ns}~>hADi9 zIS+!5Ph{d_cu+(TnX>U61{(~g!Up2So3MjB3g-Fcc>7JI6 zKG(vWD432=fk`N29wMWaQ#15RT zwdPbtlK*#ebKI~Mkn2To?VG|3M>dVW(nk(7<{U37oKWL5TbJu;=_z~ThROj^t$5Lz zLwutTGix~O)h>>%Fpn@0p(q#B*z^NgR~^}}{=2cyYaR6IXP#|`S>WaY2yH>E`(kdt zL;x8wQImC&B-nz6XX#7}7X)W!6=g^+#8=Dxd1PAoRBFP8n7bZEX;j2Y^vtS-0Yfnc z!0L>qLb;O+fOfkLDq?D-Oq32|-s`#&Q%)c@3hDx1A#{({CdkrQM@6TkU>?9f-MR7T zYvtP~PaM8{A$!X64wX=7B z|MLD1fA#O(`1Tb5+qt}RbM?gT(LZn9{p7;>x%d3&gM&->FX*Yyv#SS3_3iVgKYLfW zekE{g>Lc_ka`QdApWmT>E&qJ;n|JtgPk!e;eCA{FTy+t-#qOSe@WSqP=jg;8{kMB( Oe|qTl7niR6jQtDqh&*%v From 0e1f606a919c6301471e034e9b7a320b9eb6651f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Moritz=20B=C3=B6hme?= Date: Fri, 30 Dec 2022 19:02:02 +0100 Subject: [PATCH 16/23] update inputs --- flake.lock | 119 +++++++++++++++++++++++------------------------------ 1 file changed, 51 insertions(+), 68 deletions(-) diff --git a/flake.lock b/flake.lock index 1820dfc..2633ff2 100644 --- a/flake.lock +++ b/flake.lock @@ -23,11 +23,11 @@ "arkenfox-userjs": { "flake": false, "locked": { - "lastModified": 1670266131, - "narHash": "sha256-hf+fLTT67YWJPTkKgLxyP6KRAhiCaxuGY7GLltTyZvc=", + "lastModified": 1670682948, + "narHash": "sha256-yFg8U4D+qD9UQXhpAXrl9Ksj16zrCLOgahMtT9QS2Y8=", "owner": "arkenfox", "repo": "user.js", - "rev": "e4a85c30c129cf664cc8a39705bb070fce828d33", + "rev": "7135907b2fe13fa55eb8ebf162603037f83e353c", "type": "github" }, "original": { @@ -61,11 +61,11 @@ ] }, "locked": { - "lastModified": 1670580643, - "narHash": "sha256-1D1mObqPnPJUxDZP2pOEvlYpEHq2oT2wqwwe46Jh24c=", + "lastModified": 1672110422, + "narHash": "sha256-IYR6XGwmgORfSIZYYywZmtRBoWROBjI5rZjgYmQGPJ4=", "owner": "nix-community", "repo": "emacs-overlay", - "rev": "ff0c1ead7f28972ba4b63ffc9353a132b163386a", + "rev": "06d88ea2a783a7c563ce57e62d794313ae1e4855", "type": "github" }, "original": { @@ -153,11 +153,11 @@ "forgit-git": { "flake": false, "locked": { - "lastModified": 1670576098, - "narHash": "sha256-IUM4SbJTzL5pG2gCTkGUPbz+ujv/ENC/Gt0bpJjvUNE=", + "lastModified": 1671476278, + "narHash": "sha256-guAjxFhtybbRyRRXDELDHrM2Xzmi96wPxD2nhL9Ifmk=", "owner": "wfxr", "repo": "forgit", - "rev": "bfea8cf48523b3d6fa72d131e81769b68f43e3a7", + "rev": "ffda73bac3a435a9bbc6f29f2fd98517fbe5d9db", "type": "github" }, "original": { @@ -195,11 +195,11 @@ "utils": "utils" }, "locked": { - "lastModified": 1670513770, - "narHash": "sha256-muL74fsbGA8K8WlZSPNWddOiuBnC54kAajncX6nXrh4=", + "lastModified": 1671966569, + "narHash": "sha256-jbLgfSnmLchARBNFRvCic63CFQ9LAyvlXnBpc2kwjQc=", "owner": "nix-community", "repo": "home-manager", - "rev": "054d9e3187ca00479e8036dc0e92900a384f30fd", + "rev": "c55fa26ce05fee8e063db22918d05a73d430b2ea", "type": "github" }, "original": { @@ -238,11 +238,11 @@ "xdph": "xdph" }, "locked": { - "lastModified": 1670534695, - "narHash": "sha256-YNPiXsaZSQvetwsnrHuRxQnm8t9p5y9Nd3lRW6bPVxM=", + "lastModified": 1672057622, + "narHash": "sha256-UCA9ObYOGpZh5cZi9HO0p35RJVD1i2DT/Djgyx1dOPM=", "owner": "hyprwm", "repo": "Hyprland", - "rev": "726732244a5d51a0da54219174c13f4428017b79", + "rev": "545e63d1dd14c76e9faad7839ad255dc9ead4cd8", "type": "github" }, "original": { @@ -254,11 +254,11 @@ "hyprland-protocols": { "flake": false, "locked": { - "lastModified": 1670258048, - "narHash": "sha256-Lm2sXnDVZNE+taHqsqVibvPmSdu65VHvXI507KVX4lg=", + "lastModified": 1670703428, + "narHash": "sha256-4KUW5SKR0Y9uaYGcYwy53YJ3B/sgiprCL4fRGO+mpOA=", "owner": "hyprwm", "repo": "hyprland-protocols", - "rev": "0dcff94fc10df2bbb66d3e1b5a1d6cfd3ada5515", + "rev": "d0d6db8cb5bef6d93ca3ad8fb2124964173396da", "type": "github" }, "original": { @@ -270,11 +270,11 @@ "hyprland-protocols_2": { "flake": false, "locked": { - "lastModified": 1670185345, - "narHash": "sha256-hxWGqlPecqEsE6nOHDV29KFBKePbY2Ipeac6lrChMKY=", + "lastModified": 1670703428, + "narHash": "sha256-4KUW5SKR0Y9uaYGcYwy53YJ3B/sgiprCL4fRGO+mpOA=", "owner": "hyprwm", "repo": "hyprland-protocols", - "rev": "4623a404c091e64743ba310199bb380ec52f1936", + "rev": "d0d6db8cb5bef6d93ca3ad8fb2124964173396da", "type": "github" }, "original": { @@ -288,11 +288,11 @@ "nixpkgs": "nixpkgs_2" }, "locked": { - "lastModified": 1669635788, - "narHash": "sha256-xlJ4hbUm3KULq4daqopi+eAv1u57uLlTare04HL3X/c=", + "lastModified": 1671404096, + "narHash": "sha256-ls8i+lXweg0udqbd9XuF/ag+rqDSy/i05B6RrMW2BAI=", "owner": "hyprwm", "repo": "hyprpaper", - "rev": "ab85578dce442b80aa3378fe0304e6cb6f16f593", + "rev": "60013ee65566ec7601c367829da2560d7b8638fa", "type": "github" }, "original": { @@ -301,29 +301,13 @@ "type": "github" } }, - "jetbrains-plugins": { - "locked": { - "lastModified": 1670234247, - "narHash": "sha256-CepwZGno3XkePl3wBbFUcwsf+grnXTbKIujaCVaEnG0=", - "owner": "MoritzBoehme", - "repo": "nixpkgs", - "rev": "96386b1df1ad0099de5f74dea941d0191fbd3800", - "type": "github" - }, - "original": { - "owner": "MoritzBoehme", - "ref": "jetbrains-plugins", - "repo": "nixpkgs", - "type": "github" - } - }, "master": { "locked": { - "lastModified": 1670583233, - "narHash": "sha256-sa0XbJmnJEmQp/Uvjh8lprAazR0UdCoVv8n6EeeG1aQ=", + "lastModified": 1672128529, + "narHash": "sha256-VBMP7GZ4lUgEyFJUPu+emFn58kqDXthJRi5zwdBu+cw=", "owner": "nixos", "repo": "nixpkgs", - "rev": "539954efab2b023064efd3edeb7912b71193acfd", + "rev": "813159a4264a1cacd2a0ebed863ac3b041f1ebb9", "type": "github" }, "original": { @@ -334,11 +318,11 @@ }, "nixpkgs": { "locked": { - "lastModified": 1670064435, - "narHash": "sha256-+ELoY30UN+Pl3Yn7RWRPabykwebsVK/kYE9JsIsUMxQ=", + "lastModified": 1671722432, + "narHash": "sha256-ojcZUekIQeOZkHHzR81st7qxX99dB1Eaaq6PU5MNeKc=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "61a8a98e6d557e6dd7ed0cdb54c3a3e3bbc5e25c", + "rev": "652e92b8064949a11bc193b90b74cb727f2a1405", "type": "github" }, "original": { @@ -350,11 +334,11 @@ }, "nixpkgs-stable": { "locked": { - "lastModified": 1668984258, - "narHash": "sha256-0gDMJ2T3qf58xgcSbYoXiRGUkPWmKyr5C3vcathWhKs=", + "lastModified": 1671271954, + "narHash": "sha256-cSvu+bnvN08sOlTBWbBrKaBHQZq8mvk8bgpt0ZJ2Snc=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "cf63ade6f74bbc9d2a017290f1b2e33e8fbfa70a", + "rev": "d513b448cc2a6da2c8803e3c197c9fc7e67b19e3", "type": "github" }, "original": { @@ -382,11 +366,11 @@ }, "nixpkgs_3": { "locked": { - "lastModified": 1670525689, - "narHash": "sha256-YIjGzxrRQa5LYO0zlnH/ardcwXsRgsnHe3TkGkvCxbc=", + "lastModified": 1672057183, + "narHash": "sha256-GN7/10DNNvs1FPj9tlZA2qgNdFuYKKuS3qlHTqAxasQ=", "owner": "nixos", "repo": "nixpkgs", - "rev": "f21f11aa2a02cb78651c6d57546c7d7541f9240c", + "rev": "b139e44d78c36c69bcbb825b20dbfa51e7738347", "type": "github" }, "original": { @@ -398,11 +382,11 @@ }, "nixpkgs_4": { "locked": { - "lastModified": 1668994630, - "narHash": "sha256-1lqx6HLyw6fMNX/hXrrETG1vMvZRGm2XVC9O/Jt0T6c=", + "lastModified": 1671271357, + "narHash": "sha256-xRJdLbWK4v2SewmSStYrcLa0YGJpleufl44A19XSW8k=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "af50806f7c6ab40df3e6b239099e8f8385f6c78b", + "rev": "40f79f003b6377bd2f4ed4027dde1f8f922995dd", "type": "github" }, "original": { @@ -446,11 +430,11 @@ "nixpkgs-stable": "nixpkgs-stable" }, "locked": { - "lastModified": 1670413394, - "narHash": "sha256-M7sWqrKtOqUv9euX1t3HCxis8cPy9MNiZxQmUf0KF1o=", + "lastModified": 1672050129, + "narHash": "sha256-GBQMcvJUSwAVOpDjVKzB6D5mmHI7Y4nFw+04bnS9QrM=", "owner": "cachix", "repo": "pre-commit-hooks.nix", - "rev": "1303a1a76e9eb074075bfe566518c413f6fc104e", + "rev": "67d98f02443b9928bc77f1267741dcfdd3d7b65c", "type": "github" }, "original": { @@ -470,7 +454,6 @@ "howdy": "howdy", "hyprland": "hyprland", "hyprpaper": "hyprpaper", - "jetbrains-plugins": "jetbrains-plugins", "master": "master", "nixpkgs": "nixpkgs_3", "pre-commit-hooks": "pre-commit-hooks_2", @@ -480,11 +463,11 @@ }, "stable": { "locked": { - "lastModified": 1670543317, - "narHash": "sha256-4mMR56rtxKr+Gwz399jFr4i76SQZxsLWxxyfQlPXRm0=", + "lastModified": 1671883564, + "narHash": "sha256-C15oAtyupmLB3coZY7qzEHXjhtUx/+77olVdqVMruAg=", "owner": "nixos", "repo": "nixpkgs", - "rev": "7a6a010c3a1d00f8470a5ca888f2f927f1860a19", + "rev": "dac57a4eccf1442e8bf4030df6fcbb55883cb682", "type": "github" }, "original": { @@ -531,11 +514,11 @@ "flake": false, "locked": { "host": "gitlab.freedesktop.org", - "lastModified": 1669925104, - "narHash": "sha256-xMHfW+/G9MieN/5tXHUA5/ztE8dkE093cNFTEUgcwxI=", + "lastModified": 1671723353, + "narHash": "sha256-G1jiI0SA7eiZusO+iJytErMRNbKbwqJJJGL+sNoBNoQ=", "owner": "wlroots", "repo": "wlroots", - "rev": "c8eb24d30e18c165728b8788a10716611c3b633d", + "rev": "b28a9afd4b0b86e9a66a40f6b44b69f59947b7d6", "type": "gitlab" }, "original": { @@ -554,11 +537,11 @@ ] }, "locked": { - "lastModified": 1670202338, - "narHash": "sha256-StTfshdAoSxO+t0wRbq1I3YESLFIQWFjGJse5ICV8rk=", + "lastModified": 1671837878, + "narHash": "sha256-OmFDyktTc/l+3wHboHeFpAQgPt3r7jjqZf8MrwuUGMo=", "owner": "hyprwm", "repo": "xdg-desktop-portal-hyprland", - "rev": "af840a9e0947a79a37a95a9f62062653721e43fa", + "rev": "e47f4cec698080768821b271510985ab94a37e91", "type": "github" }, "original": { From afbfe9f576ecde189ece40b7f23086cb979f23e6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Moritz=20B=C3=B6hme?= Date: Sun, 1 Jan 2023 15:27:31 +0100 Subject: [PATCH 17/23] hyprland improvements --- flake.nix | 7 +++++-- modules/programs/hyprland/config.nix | 11 ++--------- modules/programs/hyprland/default.nix | 4 ++-- 3 files changed, 9 insertions(+), 13 deletions(-) diff --git a/flake.nix b/flake.nix index 1c93a22..e95fcb4 100644 --- a/flake.nix +++ b/flake.nix @@ -51,9 +51,11 @@ inputs.nixpkgs.follows = "nixpkgs"; }; - hyprland.url = "github:hyprwm/Hyprland"; + # Hyprland + hyprland.url = "github:hyprwm/Hyprland"; hyprpaper.url = "github:hyprwm/hyprpaper"; + hypr-contrib.url = "github:hyprwm/contrib"; }; outputs = @@ -72,13 +74,14 @@ overlay = import ./overlays { inherit inputs; }; channels.nixpkgs.overlaysBuilder = channels: [ - self.overlay inputs.agenix.overlay inputs.emacs-overlay.overlay inputs.howdy.overlays.default + inputs.hypr-contrib.overlays.default inputs.hyprland.overlays.default inputs.hyprpaper.overlays.default inputs.utils.overlay + self.overlay ]; # overlays = utils.lib.exportOverlays { diff --git a/modules/programs/hyprland/config.nix b/modules/programs/hyprland/config.nix index 0fcaa86..038f962 100644 --- a/modules/programs/hyprland/config.nix +++ b/modules/programs/hyprland/config.nix @@ -18,15 +18,8 @@ in # See https://wiki.hyprland.org/Configuring/Monitors/ monitor=,preferred,auto,1 - # See https://wiki.hyprland.org/Configuring/Keywords/ for more - # Execute your favorite apps at launch - # exec-once = waybar & hyprpaper & firefox - - # Source a file (multi-file configs) - # source = ~/.config/hypr/myColors.conf - # For all categories, see https://wiki.hyprland.org/Configuring/Variables/ input { kb_layout = de,us @@ -140,8 +133,8 @@ in bind = $mainMod, M, exec, hyprctl keyword general:layout master bind = $mainMod, P, pseudo, # dwindle bind = $mainMod, Q, killactive, - bind = $mainMod, R, exec, rofi -show combi -normal-window - bind = $mainMod, C, exec, rofi -show calc -modi calc -no-show-match -no-sort | xclip -selection clipboard + bind = $mainMod, R, exec, rofi -x11 -show combi + bind = $mainMod, C, exec, rofi -x11 -show calc -modi calc -no-show-match -no-sort | wl-copy bind = $mainMod, B, exec, rofi-bluetooth bind = $mainMod, RETURN, exec, kitty bind = $mainMod, T, togglesplit, # dwindle diff --git a/modules/programs/hyprland/default.nix b/modules/programs/hyprland/default.nix index b46c677..4f7b32a 100644 --- a/modules/programs/hyprland/default.nix +++ b/modules/programs/hyprland/default.nix @@ -109,8 +109,8 @@ in pamixer playerctl brightnessctl - slurp - grim + grimblast + wl-clipboard ]; security.pam.services.swaylock = { }; From ba33446b5d61730a35677ec2625ea169129d5274 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Moritz=20B=C3=B6hme?= Date: Sun, 1 Jan 2023 15:27:55 +0100 Subject: [PATCH 18/23] update inputs --- flake.lock | 95 +++++++++++++++++++++++++++++++++++++----------------- 1 file changed, 65 insertions(+), 30 deletions(-) diff --git a/flake.lock b/flake.lock index 2633ff2..8c67553 100644 --- a/flake.lock +++ b/flake.lock @@ -61,11 +61,11 @@ ] }, "locked": { - "lastModified": 1672110422, - "narHash": "sha256-IYR6XGwmgORfSIZYYywZmtRBoWROBjI5rZjgYmQGPJ4=", + "lastModified": 1672567750, + "narHash": "sha256-Hz1b1TUJbzuLj0eR+LTSUqoGR2gkQdrm3uxru+0rVuY=", "owner": "nix-community", "repo": "emacs-overlay", - "rev": "06d88ea2a783a7c563ce57e62d794313ae1e4855", + "rev": "524c884484c312b76cb4bc9fbf37eec66e2f8406", "type": "github" }, "original": { @@ -195,11 +195,11 @@ "utils": "utils" }, "locked": { - "lastModified": 1671966569, - "narHash": "sha256-jbLgfSnmLchARBNFRvCic63CFQ9LAyvlXnBpc2kwjQc=", + "lastModified": 1672349765, + "narHash": "sha256-Ul3lSGglgHXhgU3YNqsNeTlRH1pqxbR64h+2hM+HtnM=", "owner": "nix-community", "repo": "home-manager", - "rev": "c55fa26ce05fee8e063db22918d05a73d430b2ea", + "rev": "dd99675ee81fef051809bc87d67eb07f5ba022e8", "type": "github" }, "original": { @@ -230,19 +230,37 @@ "type": "sourcehut" } }, + "hypr-contrib": { + "inputs": { + "nixpkgs": "nixpkgs" + }, + "locked": { + "lastModified": 1672071700, + "narHash": "sha256-Z0pbBVtijv4xbL42rPzMoYFSOqALFRYDMN9iOumSEso=", + "owner": "hyprwm", + "repo": "contrib", + "rev": "37c8121f98d76f57caa00dd7106877876e0d7483", + "type": "github" + }, + "original": { + "owner": "hyprwm", + "repo": "contrib", + "type": "github" + } + }, "hyprland": { "inputs": { "hyprland-protocols": "hyprland-protocols", - "nixpkgs": "nixpkgs", + "nixpkgs": "nixpkgs_2", "wlroots": "wlroots", "xdph": "xdph" }, "locked": { - "lastModified": 1672057622, - "narHash": "sha256-UCA9ObYOGpZh5cZi9HO0p35RJVD1i2DT/Djgyx1dOPM=", + "lastModified": 1672510982, + "narHash": "sha256-fxpb2GM2Zi4DU119b7c1g8RN/jF7WXD5UcjXN7lxPJ8=", "owner": "hyprwm", "repo": "Hyprland", - "rev": "545e63d1dd14c76e9faad7839ad255dc9ead4cd8", + "rev": "7525818097f92a99b2b8d02ea43bd0f8ccabd51c", "type": "github" }, "original": { @@ -285,14 +303,14 @@ }, "hyprpaper": { "inputs": { - "nixpkgs": "nixpkgs_2" + "nixpkgs": "nixpkgs_3" }, "locked": { - "lastModified": 1671404096, - "narHash": "sha256-ls8i+lXweg0udqbd9XuF/ag+rqDSy/i05B6RrMW2BAI=", + "lastModified": 1672266418, + "narHash": "sha256-Xxooxjoymgl65dIMtcBB4/bZx0OcqPZ52G/fw4rozYE=", "owner": "hyprwm", "repo": "hyprpaper", - "rev": "60013ee65566ec7601c367829da2560d7b8638fa", + "rev": "aefd63876d0353e4b25e473708903e6c30054931", "type": "github" }, "original": { @@ -303,11 +321,11 @@ }, "master": { "locked": { - "lastModified": 1672128529, - "narHash": "sha256-VBMP7GZ4lUgEyFJUPu+emFn58kqDXthJRi5zwdBu+cw=", + "lastModified": 1672582743, + "narHash": "sha256-BcHOaoxnUL+DzjGZV+vm8rIDGOFL6DvbPxeCLvzDrN0=", "owner": "nixos", "repo": "nixpkgs", - "rev": "813159a4264a1cacd2a0ebed863ac3b041f1ebb9", + "rev": "3d9c0b6bdb5d6ee7126b6362167550c74590d612", "type": "github" }, "original": { @@ -318,11 +336,11 @@ }, "nixpkgs": { "locked": { - "lastModified": 1671722432, - "narHash": "sha256-ojcZUekIQeOZkHHzR81st7qxX99dB1Eaaq6PU5MNeKc=", + "lastModified": 1658161305, + "narHash": "sha256-X/nhnMCa1Wx4YapsspyAs6QYz6T/85FofrI6NpdPDHg=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "652e92b8064949a11bc193b90b74cb727f2a1405", + "rev": "e4d49de45a3b5dbcb881656b4e3986e666141ea9", "type": "github" }, "original": { @@ -349,6 +367,22 @@ } }, "nixpkgs_2": { + "locked": { + "lastModified": 1671722432, + "narHash": "sha256-ojcZUekIQeOZkHHzR81st7qxX99dB1Eaaq6PU5MNeKc=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "652e92b8064949a11bc193b90b74cb727f2a1405", + "type": "github" + }, + "original": { + "owner": "NixOS", + "ref": "nixos-unstable", + "repo": "nixpkgs", + "type": "github" + } + }, + "nixpkgs_3": { "locked": { "lastModified": 1658826464, "narHash": "sha256-94ZTF0uIX/iZdiD4RJ5f933ak/OM4XLl7hF+gCa4Iuk=", @@ -364,13 +398,13 @@ "type": "github" } }, - "nixpkgs_3": { + "nixpkgs_4": { "locked": { - "lastModified": 1672057183, - "narHash": "sha256-GN7/10DNNvs1FPj9tlZA2qgNdFuYKKuS3qlHTqAxasQ=", + "lastModified": 1672428209, + "narHash": "sha256-eejhqkDz2cb2vc5VeaWphJz8UXNuoNoM8/Op8eWv2tQ=", "owner": "nixos", "repo": "nixpkgs", - "rev": "b139e44d78c36c69bcbb825b20dbfa51e7738347", + "rev": "293a28df6d7ff3dec1e61e37cc4ee6e6c0fb0847", "type": "github" }, "original": { @@ -380,7 +414,7 @@ "type": "github" } }, - "nixpkgs_4": { + "nixpkgs_5": { "locked": { "lastModified": 1671271357, "narHash": "sha256-xRJdLbWK4v2SewmSStYrcLa0YGJpleufl44A19XSW8k=", @@ -426,7 +460,7 @@ "flake-compat": "flake-compat", "flake-utils": "flake-utils_3", "gitignore": "gitignore", - "nixpkgs": "nixpkgs_4", + "nixpkgs": "nixpkgs_5", "nixpkgs-stable": "nixpkgs-stable" }, "locked": { @@ -452,10 +486,11 @@ "forgit-git": "forgit-git", "home-manager": "home-manager", "howdy": "howdy", + "hypr-contrib": "hypr-contrib", "hyprland": "hyprland", "hyprpaper": "hyprpaper", "master": "master", - "nixpkgs": "nixpkgs_3", + "nixpkgs": "nixpkgs_4", "pre-commit-hooks": "pre-commit-hooks_2", "stable": "stable", "utils": "utils_2" @@ -463,11 +498,11 @@ }, "stable": { "locked": { - "lastModified": 1671883564, - "narHash": "sha256-C15oAtyupmLB3coZY7qzEHXjhtUx/+77olVdqVMruAg=", + "lastModified": 1672353432, + "narHash": "sha256-oZfgp/44/o2tWiylV30cR+DLyWTJ+5dhsdWZVpzs3e4=", "owner": "nixos", "repo": "nixpkgs", - "rev": "dac57a4eccf1442e8bf4030df6fcbb55883cb682", + "rev": "913a47cd064cc06440ea84e5e0452039a85781f0", "type": "github" }, "original": { From 0b0fda1dd4a98589163e62b049fc0cee5410b3e7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Moritz=20B=C3=B6hme?= Date: Sun, 1 Jan 2023 15:28:13 +0100 Subject: [PATCH 19/23] rename aliases --- modules/profiles/base.nix | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/modules/profiles/base.nix b/modules/profiles/base.nix index 08e96e6..e8b9533 100644 --- a/modules/profiles/base.nix +++ b/modules/profiles/base.nix @@ -39,9 +39,9 @@ with lib; rm = "rm -i"; mv = "mv -i"; - nix-switch = "sudo nixos-rebuild switch --flake ~/.dotfiles"; - nix-boot = "sudo nixos-rebuild boot --flake ~/.dotfiles"; - nix-lock = "pushd ~/.dotfiles && nix flake update && popd"; + nixos-switch = "sudo nixos-rebuild switch --flake ~/.dotfiles"; + nixos-boot = "sudo nixos-rebuild boot --flake ~/.dotfiles"; + nixos-update = "pushd ~/.dotfiles && nix flake update && popd"; latexwatch = ''find -type f -name "*.tex" | entr -c latexmk -pdf -silent''; }; From e8229815424d84b6c532d5bb25f2c70c2534d786 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Moritz=20B=C3=B6hme?= Date: Sun, 1 Jan 2023 15:28:38 +0100 Subject: [PATCH 20/23] fix private ssh config --- secrets/ssh-home.age | Bin 1005 -> 884 bytes 1 file changed, 0 insertions(+), 0 deletions(-) diff --git a/secrets/ssh-home.age b/secrets/ssh-home.age index 70909cfddeab92c1fee3d025be14ed22d82331be..0922fb521452a41b52668a71a6e7e1f1bf850a1f 100644 GIT binary patch delta 796 zcmWmB-HY1<003~#$tH32!9CpM9i!%SSK0=DTT< zrV0fGWl!6v6UE`j#_oK*G4W|K9O52yIzgBoW5-@Z*(QQt6L*Nef8lp`&+ofWK0EC+ zu_A1E5e^c(j&Y^FO@vYx(Vb;i)6F;^=xzfEnmxmi0n6dr%vw$x&^p8Ak@}D!28kYY za&B%d4|83<%2c2j?jmsu$h?>if_|o_=TH>J)2+6=WE<&HrAnz(Sfk~(7gs4LtoF)+ z1`Z4X>l+^DCsAb}ITNkSatJ_Wm4lpBIrtnnfzDpG!_ ziO6W9iK;kNjp!jo{y#t;IyPEM=!`M!DM2rdsCD*$E&{};s4>o%g?JY8rnKBJP`nFd zGMRLr910UG@}y-Iruwm^;jm&0qEu;hXt=<)Muka|L!4@}M*~;nqmMnay6rxG{Mg2W z@B?t;@}=+%bnEc*VTxQoLHT#D{j`g}`S6`T7f*5zy^eDS>6;6CPaIl-5A*Nry2d4Y z3*WwZ<a&kin-_1GJNEfUr&f3KKJnG< z=Y$_lPyd~}c&>ZrmHK_){dec>_kO-5>|9Q^QU{E;f9&mB{EImI&%tp0>E`0vIV@m!-eMl_M|w KapuDLh5rCx-Y8Z8 delta 918 zcmWmB>uVbY003~iNhhf~n3ImWYN$e~XG|{F+$9z3dbwP#x!fhWJnm6iN$xI}*X44} z<#GwSbO;XI*s7iAI&p%t7MW9ge2`IDLEWqloU1sxmHC9Vb5^I!PKs0if!~+kpY7MS zOg_@$i#0d_#{!9dOKtiPvyn9YI!DP^tR5c<$wmSjmw1XT!9>x9v7FlUvqmf)GCcJx zF{EkZ813(m5fXuy5I`aWQxg4sFO;i za1k6bMI`NyqSW)hce1f^!|mlQ-Y3Y>5>YClGMZyZHcD7%&6oAo7_Q(;@jQkH6dTg7 zbHxlp3MpL#`H0E-!vUuerf3*v6u&f{61?s>>H+~dIrU^)Cu>O%WWW(Dhe<##Sf?Zv zQ!Fnw48s%@lm!il;#Lz0MN0{MW6HQ$a~D ziZ>#D4iQX%Csl&?R1zhTG6H486W2^OuEzc!2>0~@PdG8ip^VGvs%#7Ua>+Oa=LALu zBSM^V=AcZAlL$`76SNpa#7c6AG~LPEaIxfu@)1qsFiNPi5>08K9*>o6VtFV{l!4iw(>o(Ivv@&ys=H} z={q#=W%-M)HuPnt_4X^Xznsf1+e$JR zqhpuH=2p0UcfT5vrcT}evGc&+OAFPm_1BNxYCmr6dd?bHzZcvzFnxOS&QoXp_-2in zS$gTgjb1bO>xGZb{8%)0bgT|eY#BXq{=UOEFL&>q$UJuV^Y|q@c%pT6c@Z77tuN=l zotwP^{Pnm+{C0=@{u{>EuMMnT@7{FMd|)zl?Zc66yH~syI@XTtfAhWU?yvOuJ)hk+ z-y=0I{#4$-etPum$gzzVdY3xi>bdiW@2*}ta?j?)g|24{FOKe89bFupo}0Mw$;{f$ pbn)lOo`>7tiA-(9yRUTIc;@=9r|&wreg4+L5#!?dNB4N2`WL&7V>18% From 1ed4c8295b8ebce4bcfa6fa2fbc9a34fd51c160a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Moritz=20B=C3=B6hme?= Date: Mon, 2 Jan 2023 16:17:38 +0100 Subject: [PATCH 21/23] use hyprland by default --- modules/programs/hyprland/default.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/programs/hyprland/default.nix b/modules/programs/hyprland/default.nix index 4f7b32a..f869398 100644 --- a/modules/programs/hyprland/default.nix +++ b/modules/programs/hyprland/default.nix @@ -152,7 +152,7 @@ in xserver = { enable = true; displayManager = { - gdm.enable = true; + lightdm.enable = true; autoLogin = { enable = true; user = "moritz"; From c3e6687ded298342a36d3a435215ea92b7be4f5d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Moritz=20B=C3=B6hme?= Date: Tue, 3 Jan 2023 17:56:02 +0100 Subject: [PATCH 22/23] tune opacity settings --- modules/programs/hyprland/config.nix | 20 ++++++++++++++++---- 1 file changed, 16 insertions(+), 4 deletions(-) diff --git a/modules/programs/hyprland/config.nix b/modules/programs/hyprland/config.nix index 038f962..0ffe5d1 100644 --- a/modules/programs/hyprland/config.nix +++ b/modules/programs/hyprland/config.nix @@ -109,18 +109,24 @@ in # windowrulev2 = float,class:^(kitty)$,title:^(kitty)$ # See https://wiki.hyprland.org/Configuring/Window-Rules/ for more + # Kitty + windowrulev2 = opacity 0.95 0.95, class:^kitty$ + + windowrulev2 = opacity 0.85 0.85, floating:1 + # Firefox Sharing Indicator ${mkRules ["float" "move 49% 40" "noborder"] ["title:^(.*Sharing Indicator)$"]} # Rofi - ${mkRules ["float" "opacity 0.95 0.95"] ["class:^([rR]ofi)$"]} + ${mkRules ["float" "opacity 0.85 0.85" "noborder"] ["class:^([rR]ofi)$"]} - windowrulev2 = opacity 0.95 0.95,floating:1 + # Emacs + windowrulev2 = opaque, class:^emacs$ - # Games + + # Fullscreen Applications # ${mkRules ["opaque" "noblur" "noborder" "noshadow" "forceinput"] ["fullscreen:1"]} - # See https://wiki.hyprland.org/Configuring/Keywords/ for more $mainMod = SUPER $windowMod = ALT @@ -153,6 +159,12 @@ in bind = $mainMod, K, movefocus, u bind = $mainMod, J, movefocus, d + # Change current active window size with mainMod + hjkl + bind = $mainMod SHIFT, H, resizeactive, -10 0 + bind = $mainMod SHIFT, L, resizeactive, 10 0 + bind = $mainMod SHIFT, K, resizeactive, 0 -10 + bind = $mainMod SHIFT, J, resizeactive, 0 10 + # Switch workspaces with mainMod + [0-9] bind = $mainMod, 1, workspace, 1 bind = $mainMod, 2, workspace, 2 From 513942976e41bed721744be2e110b5be3d60494a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Moritz=20B=C3=B6hme?= Date: Wed, 4 Jan 2023 13:23:21 +0100 Subject: [PATCH 23/23] update gnome settings --- modules/programs/gnome.nix | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) diff --git a/modules/programs/gnome.nix b/modules/programs/gnome.nix index f60df75..f5cba87 100644 --- a/modules/programs/gnome.nix +++ b/modules/programs/gnome.nix @@ -7,6 +7,13 @@ with lib; let cfg = config.my.programs.gnome; + + extensions = with pkgs.gnomeExtensions; [ + gsconnect + vitals + gtile + blur-my-shell + ]; in { options.my.programs.gnome.enable = mkEnableOption "gnome"; @@ -19,7 +26,6 @@ in }; pulseaudio.enable = false; }; - programs.xwayland.enable = true; services.xserver = { layout = "de"; displayManager = { @@ -32,6 +38,14 @@ in enable = true; desktopManager.gnome.enable = true; }; - environment.systemPackages = with pkgs.gnomeExtensions; [ tray-icons-reloaded gsconnect ]; + environment.systemPackages = extensions; + home-manager.users.moritz.dconf.settings = { + "org/gnome/shell" = { + disable-user-extensions = false; + enabled-extensions = map (p: p.extensionUuid or p.uuid) extensions; + }; + "org/gnome/desktop/interface".enable-hot-corners = false; + "org/gnome/desktop/wm/preferences".focus-mode = "sloppy"; + }; }; }