From 1d468201352ebd88182c2b4a214729c54fff35c9 Mon Sep 17 00:00:00 2001 From: unexplrd Date: Thu, 20 Mar 2025 19:58:38 +0200 Subject: [PATCH] too lazy to describe Signed-off-by: unexplrd --- flake.lock | 321 +++++-------- flake.nix | 2 + hosts/dunamis/configuration.nix | 2 +- hosts/dunamis/sops.nix | 24 +- .../dunamis/users/user/home-configuration.nix | 6 +- modules/home/desktop/default.nix | 6 +- modules/home/desktop/gnome/default.nix | 206 ++++++++ modules/home/desktop/niri/default.nix | 439 ++++++++++++++++-- modules/home/programs/shell/fish.nix | 1 + modules/home/programs/syncthing.nix | 6 +- modules/nixos/desktop/default.nix | 1 + modules/nixos/desktop/gnome.nix | 30 ++ packages/wl-tray-bridge/default.nix | 45 ++ 13 files changed, 839 insertions(+), 250 deletions(-) create mode 100644 modules/home/desktop/gnome/default.nix create mode 100644 modules/nixos/desktop/gnome.nix create mode 100644 packages/wl-tray-bridge/default.nix diff --git a/flake.lock b/flake.lock index 37557d1..53bff3b 100644 --- a/flake.lock +++ b/flake.lock @@ -108,11 +108,11 @@ "systems": "systems" }, "locked": { - "lastModified": 1742376042, - "narHash": "sha256-sh09UPmrumfAEMeo50JLhGEkN/4FmEA6ad2KV5HXcos=", + "lastModified": 1742457865, + "narHash": "sha256-pSs0DuhXhXgjpIj+R+KitAcFYbHTiHmMqdYYhVPI4+Q=", "owner": "numtide", "repo": "blueprint", - "rev": "33e0f1c491e9f4c446e142f8b9edd23be43d188a", + "rev": "7ae8756a68c662d551e354beb537f365b80e5108", "type": "github" }, "original": { @@ -150,11 +150,11 @@ ] }, "locked": { - "lastModified": 1742347728, - "narHash": "sha256-wpAF+eNdPN21hwVirBXSsRDeWtTflkhsZL5zhGy6uB8=", + "lastModified": 1742387616, + "narHash": "sha256-gZTYYQKZAIkaAWxoKQT8hqYgAmZVXrMCQOKUaxhw3TU=", "owner": "chaotic-cx", "repo": "nyx", - "rev": "f8371934a154aad05f0f8f3f6ddaccb00f1b91e8", + "rev": "f2173f809f677746245e78ba57668f4bf91fdd69", "type": "github" }, "original": { @@ -345,6 +345,24 @@ "type": "github" } }, + "flake-utils_3": { + "inputs": { + "systems": "systems_6" + }, + "locked": { + "lastModified": 1731533236, + "narHash": "sha256-l0KFg5HjrsfsO/JpG+r7fRrqm12kzFHyUHqHCVpMMbI=", + "owner": "numtide", + "repo": "flake-utils", + "rev": "11707dc2f618dd54ca8739b309ec4fc024de578b", + "type": "github" + }, + "original": { + "owner": "numtide", + "repo": "flake-utils", + "type": "github" + } + }, "flakey-profile": { "locked": { "lastModified": 1712898590, @@ -491,11 +509,11 @@ ] }, "locked": { - "lastModified": 1742326330, - "narHash": "sha256-Tumt3tcMXJniSh7tw2gW+WAnVLeB3WWm+E+yYFnLBXo=", + "lastModified": 1742489436, + "narHash": "sha256-891PjWxlkKMEn4dK9rrqTV6py/lf7xFD0d5B2bM0A18=", "owner": "nix-community", "repo": "home-manager", - "rev": "22a36aa709de7dd42b562a433b9cefecf104a6ee", + "rev": "fc189507bc0bc74b3794ee6912a5b80de8dfcc0c", "type": "github" }, "original": { @@ -601,11 +619,11 @@ "xdph": "xdph" }, "locked": { - "lastModified": 1742341588, - "narHash": "sha256-IlkAyfErpnTEUpjGhECfGp3t3HgF8KHBrJquOCdjp3M=", + "lastModified": 1742468927, + "narHash": "sha256-3CBAs8OF0etCIaa4p+VyuXfLrL1cvD5E3Dmigqg2YOo=", "owner": "hyprwm", "repo": "Hyprland", - "rev": "c8d80a292012f036e1a1d3eb3b0501e3e3917872", + "rev": "7ea4fbf0ba034d947339b3a94a10da022eca1988", "type": "github" }, "original": { @@ -877,7 +895,7 @@ "narHash": "sha256-8oUT6D7VlsuLkms3zBsUaPBUoxucmFq62QdtyVpjq0Y=", "rev": "ed7a2fa83145868ecb830d6b3c73ebfd81a9e911", "type": "tarball", - "url": "https://git.lix.systems/api/v1/repos/lix-project/nixos-module/archive/ed7a2fa83145868ecb830d6b3c73ebfd81a9e911.tar.gz?rev=ed7a2fa83145868ecb830d6b3c73ebfd81a9e911" + "url": "https://git.lix.systems/api/v1/repos/lix-project/nixos-module/archive/ed7a2fa83145868ecb830d6b3c73ebfd81a9e911.tar.gz" }, "original": { "type": "tarball", @@ -901,11 +919,11 @@ "mysecrets": { "flake": false, "locked": { - "lastModified": 1742222377, - "narHash": "sha256-Yte1I7I7Zf4eeeIvHgRGNElTUdKEke5L3O3VlAFNxkc=", + "lastModified": 1742817436, + "narHash": "sha256-akQP3zkg+kd7DdK0DP1xD1yrlbYRt5topRksrYi+gfI=", "ref": "refs/heads/main", - "rev": "aa1b7e2fb86c6c9f4557bcbe4071b7da0f3bef6f", - "revCount": 10, + "rev": "6cd790ab268e8680ce13a7a02683b3c139db6194", + "revCount": 11, "type": "git", "url": "ssh://gitea@gitea.linerds.us/unexplrd/nix-secrets" }, @@ -914,35 +932,6 @@ "url": "ssh://gitea@gitea.linerds.us/unexplrd/nix-secrets" } }, -<<<<<<< Conflict 1 of 6 -%%%%%%% Changes from base to side #1 - "neve": { - "inputs": { - "flake-utils": "flake-utils_2", -- "nixpkgs": "nixpkgs", -+ "nixpkgs": [ -+ "nixpkgs" -+ ], - "nixvim": [ - "nixvim" - ] - }, - "locked": { - "lastModified": 1739966521, - "narHash": "sha256-s6CvPfUzrRgeRc1fKd5Vfy9E8BTfURdkt496vBLrWsU=", - "ref": "refs/heads/main", - "rev": "f6e966a7903639b4d019ecca6c0f6c334c6887c8", - "revCount": 9, - "type": "git", - "url": "https://gitea.linerds.us/unexplrd/Neve" - }, - "original": { - "type": "git", - "url": "https://gitea.linerds.us/unexplrd/Neve" - } - }, -+++++++ Contents of side #2 ->>>>>>> Conflict 1 of 6 ends "nix-flatpak": { "locked": { "lastModified": 1741903049, @@ -1004,15 +993,15 @@ "nixos-cosmic": { "inputs": { "flake-compat": "flake-compat_2", - "nixpkgs": "nixpkgs", + "nixpkgs": "nixpkgs_2", "nixpkgs-stable": "nixpkgs-stable" }, "locked": { - "lastModified": 1742351419, - "narHash": "sha256-IC3jdMFJtLnwnjNyCeQ1o9Y8gEmDw5RQ7ZLIXf0u7fs=", + "lastModified": 1742395601, + "narHash": "sha256-WSoI4R/pY/8AY5ulSn03nry9KFGBGFRFcXjhBYYRYtI=", "owner": "lilyinstarlight", "repo": "nixos-cosmic", - "rev": "55c7223b2c739b4d948a4a84a8150cedcb779e53", + "rev": "7f8e9de5c8494d209bd618dad4ad81e98b19fabc", "type": "github" }, "original": { @@ -1023,25 +1012,12 @@ }, "nixpkgs": { "locked": { -<<<<<<< Conflict 2 of 6 -%%%%%%% Changes from base to side #1 -- "lastModified": 0, -+ "lastModified": 1741379970, - "narHash": "sha256-Wh7esNh7G24qYleLvgOSY/7HlDUzWaL/n4qzlBePpiw=", -- "path": "/nix/store/pqgpwakx0m4r75zg34954w5mwi5shg89-source", -- "type": "path" -+ "owner": "NixOS", -+ "repo": "nixpkgs", -+ "rev": "36fd87baa9083f34f7f5027900b62ee6d09b1f2f", -+ "type": "github" -+++++++ Contents of side #2 "lastModified": 1741851582, "narHash": "sha256-cPfs8qMccim2RBgtKGF+x9IBCduRvd/N5F4nYpU0TVE=", "owner": "NixOS", "repo": "nixpkgs", "rev": "6607cf789e541e7873d40d3a8f7815ea92204f32", "type": "github" ->>>>>>> Conflict 2 of 6 ends }, "original": { "owner": "NixOS", @@ -1052,11 +1028,11 @@ }, "nixpkgs-stable": { "locked": { - "lastModified": 1742136038, - "narHash": "sha256-DDe16FJk18sadknQKKG/9FbwEro7A57tg9vB5kxZ8kY=", + "lastModified": 1742268799, + "narHash": "sha256-IhnK4LhkBlf14/F8THvUy3xi/TxSQkp9hikfDZRD4Ic=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "a1185f4064c18a5db37c5c84e5638c78b46e3341", + "rev": "da044451c6a70518db5b730fe277b70f494188f1", "type": "github" }, "original": { @@ -1068,11 +1044,11 @@ }, "nixpkgs_2": { "locked": { - "lastModified": 1742069588, - "narHash": "sha256-C7jVfohcGzdZRF6DO+ybyG/sqpo1h6bZi9T56sxLy+k=", + "lastModified": 1742288794, + "narHash": "sha256-Txwa5uO+qpQXrNG4eumPSD+hHzzYi/CdaM80M9XRLCo=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "c80f6a7e10b39afcc1894e02ef785b1ad0b0d7e5", + "rev": "b6eaf97c6960d97350c584de1b6dcff03c9daf42", "type": "github" }, "original": { @@ -1084,47 +1060,6 @@ }, "nixpkgs_3": { "locked": { -<<<<<<< Conflict 3 of 6 -%%%%%%% Changes from base to side #1 -- "lastModified": 1741379970, -- "narHash": "sha256-Wh7esNh7G24qYleLvgOSY/7HlDUzWaL/n4qzlBePpiw=", -- "owner": "NixOS", -- "repo": "nixpkgs", -- "rev": "36fd87baa9083f34f7f5027900b62ee6d09b1f2f", -- "type": "github" -- }, -- "original": { -- "owner": "NixOS", -- "ref": "nixos-unstable", -- "repo": "nixpkgs", -- "type": "github" -- } -- }, -- "nixpkgs_4": { -- "locked": { - "lastModified": 1738797219, - "narHash": "sha256-KRwX9Z1XavpgeSDVM/THdFd6uH8rNm/6R+7kIbGa+2s=", - "owner": "NixOS", - "repo": "nixpkgs", - "rev": "1da52dd49a127ad74486b135898da2cef8c62665", - "type": "github" - }, - "original": { - "owner": "NixOS", - "ref": "nixpkgs-unstable", - "repo": "nixpkgs", - "type": "github" - } - }, -- "nixpkgs_5": { -+ "nixpkgs_4": { - "locked": { - "lastModified": 1740367490, - "narHash": "sha256-WGaHVAjcrv+Cun7zPlI41SerRtfknGQap281+AakSAw=", - "owner": "NixOS", - "repo": "nixpkgs", - "rev": "0196c0175e9191c474c26ab5548db27ef5d34b05", -+++++++ Contents of side #2 "lastModified": 1742288794, "narHash": "sha256-Txwa5uO+qpQXrNG4eumPSD+hHzzYi/CdaM80M9XRLCo=", "owner": "NixOS", @@ -1146,7 +1081,6 @@ "owner": "NixOS", "repo": "nixpkgs", "rev": "e3e32b642a31e6714ec1b712de8c91a3352ce7e1", ->>>>>>> Conflict 3 of 6 ends "type": "github" }, "original": { @@ -1156,34 +1090,25 @@ "type": "github" } }, + "nixpkgs_5": { + "locked": { + "lastModified": 1736320768, + "narHash": "sha256-nIYdTAiKIGnFNugbomgBJR+Xv5F1ZQU+HfaBqJKroC0=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "4bc9c909d9ac828a039f288cf872d16d38185db8", + "type": "github" + }, + "original": { + "owner": "NixOS", + "ref": "nixpkgs-unstable", + "repo": "nixpkgs", + "type": "github" + } + }, "nur": { "inputs": { "flake-parts": "flake-parts", -<<<<<<< Conflict 4 of 6 -%%%%%%% Changes from base to side #1 -- "nixpkgs": "nixpkgs_4", -+ "nixpkgs": "nixpkgs_3", - "nuschtosSearch": "nuschtosSearch" - }, - "locked": { - "lastModified": 1741098523, - "narHash": "sha256-gXDSXDr6tAb+JgxGMvcEjKC9YO8tVOd8hMMZHJLyQ6Q=", - "owner": "nix-community", - "repo": "nixvim", - "rev": "03065fd4708bfdf47dd541d655392a60daa25ded", - "type": "github" - }, - "original": { - "owner": "nix-community", - "repo": "nixvim", - "type": "github" - } - }, - "nur": { - "inputs": { - "flake-parts": "flake-parts_2", -+++++++ Contents of side #2 ->>>>>>> Conflict 4 of 6 ends "nixpkgs": [ "stylix", "nixpkgs" @@ -1241,17 +1166,10 @@ "nix-flatpak": "nix-flatpak", "nix-index-database": "nix-index-database", "nixos-cosmic": "nixos-cosmic", -<<<<<<< Conflict 5 of 6 -+++++++ Contents of side #1 - "nixpkgs": "nixpkgs_2", - "nixvim": "nixvim", -%%%%%%% Changes from base to side #2 - "nixpkgs": "nixpkgs_3", -- "nixvim": "nixvim", ->>>>>>> Conflict 5 of 6 ends + "nixpkgs": "nixpkgs_3", "sops-nix": "sops-nix", "stylix": "stylix", - "walker": "walker" + "way-edges": "way-edges" } }, "rust-analyzer-src": { @@ -1271,6 +1189,24 @@ "type": "github" } }, + "rust-overlay": { + "inputs": { + "nixpkgs": "nixpkgs_5" + }, + "locked": { + "lastModified": 1741573199, + "narHash": "sha256-A2sln1GdCf+uZ8yrERSCZUCqZ3JUlOv1WE2VFqqfaLQ=", + "owner": "oxalica", + "repo": "rust-overlay", + "rev": "c777dc8a1e35407b0e80ec89817fe69970f4e81a", + "type": "github" + }, + "original": { + "owner": "oxalica", + "repo": "rust-overlay", + "type": "github" + } + }, "sops-nix": { "inputs": { "nixpkgs": [ @@ -1278,11 +1214,11 @@ ] }, "locked": { - "lastModified": 1742239755, - "narHash": "sha256-ptn8dR4Uat3UUadGYNnB7CIH9SQm8mK69D2A/twBUXQ=", + "lastModified": 1742406979, + "narHash": "sha256-r0aq70/3bmfjTP+JZs4+XV5SgmCtk1BLU4CQPWGtA7o=", "owner": "mic92", "repo": "sops-nix", - "rev": "787afce414bcce803b605c510b60bf43c11f4b55", + "rev": "1770be8ad89e41f1ed5a60ce628dd10877cb3609", "type": "github" }, "original": { @@ -1313,11 +1249,11 @@ "tinted-zed": "tinted-zed" }, "locked": { - "lastModified": 1742299802, - "narHash": "sha256-enlpX8hwrfmjv/dHTKWzAB5Cwt1Kr6+ptikjX3Ob+FY=", + "lastModified": 1742496983, + "narHash": "sha256-UpJrU0DEhNLVZwL/RPVOEUHCG6iDOVDoYelkmgS4V38=", "owner": "danth", "repo": "stylix", - "rev": "ff9ae322bcaeccabc65812390000276455331123", + "rev": "7e9906679d384472849272e5a5eef7adbdb1d87f", "type": "github" }, "original": { @@ -1401,55 +1337,21 @@ "type": "github" } }, -<<<<<<< Conflict 6 of 6 -%%%%%%% Changes from base to side #1 - "systems_6": { - "locked": { - "lastModified": 1681028828, - "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=", - "owner": "nix-systems", - "repo": "default", - "rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e", - "type": "github" - }, - "original": { - "owner": "nix-systems", - "repo": "default", - "type": "github" - } - }, - "systems_7": { - "locked": { - "lastModified": 1681028828, - "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=", - "owner": "nix-systems", - "repo": "default", - "rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e", - "type": "github" - }, - "original": { - "owner": "nix-systems", - "repo": "default", - "type": "github" - } - }, -+ "systems_8": { -+ "locked": { -+ "lastModified": 1689347949, -+ "narHash": "sha256-12tWmuL2zgBgZkdoB6qXZsgJEH9LR3oUgpaQq2RbI80=", -+ "owner": "nix-systems", -+ "repo": "default-linux", -+ "rev": "31732fcf5e8fea42e59c2488ad31a0e651500f68", -+ "type": "github" -+ }, -+ "original": { -+ "owner": "nix-systems", -+ "repo": "default-linux", -+ "type": "github" -+ } -+ }, -+++++++ Contents of side #2 ->>>>>>> Conflict 6 of 6 ends + "systems_6": { + "locked": { + "lastModified": 1681028828, + "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=", + "owner": "nix-systems", + "repo": "default", + "rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e", + "type": "github" + }, + "original": { + "owner": "nix-systems", + "repo": "default", + "type": "github" + } + }, "tinted-foot": { "flake": false, "locked": { @@ -1554,24 +1456,25 @@ "type": "github" } }, - "walker": { + "way-edges": { "inputs": { + "flake-utils": "flake-utils_3", "nixpkgs": [ "nixpkgs" ], - "systems": "systems_8" + "rust-overlay": "rust-overlay" }, "locked": { - "lastModified": 1740745001, - "narHash": "sha256-XZEIwnwOYgb1wECvT83HB314bd/JBYwSaTaj2EeqWrc=", - "owner": "abenz1267", - "repo": "walker", - "rev": "350d5e078b997b5ca07eda39e207048ee26bbb9d", + "lastModified": 1742175527, + "narHash": "sha256-h9lxapVT5A1a5iGXvd4iS/xLAcntCxxfSIIzvupJJoc=", + "owner": "way-edges", + "repo": "way-edges", + "rev": "01947f9686a69104f941d9c13f8973f58080fcbb", "type": "github" }, "original": { - "owner": "abenz1267", - "repo": "walker", + "owner": "way-edges", + "repo": "way-edges", "type": "github" } }, diff --git a/flake.nix b/flake.nix index 320cc9d..6b5aac2 100644 --- a/flake.nix +++ b/flake.nix @@ -19,6 +19,7 @@ # nixvim.url = "github:nix-community/nixvim"; sops-nix.url = "github:mic92/sops-nix"; stylix.url = "github:danth/stylix"; + way-edges.url = "github:way-edges/way-edges"; # TODO: somehow reduce the number of *.inputs.nixpkgs.follows = "nixpkgs" stuff, mb a function? blueprint.inputs.nixpkgs.follows = "nixpkgs"; chaotic.inputs.nixpkgs.follows = "nixpkgs"; @@ -33,6 +34,7 @@ # neve.inputs.nixvim.follows = "nixvim"; nix-index-database.inputs.nixpkgs.follows = "nixpkgs"; sops-nix.inputs.nixpkgs.follows = "nixpkgs"; + way-edges.inputs.nixpkgs.follows = "nixpkgs"; }; outputs = inputs: inputs.blueprint {inherit inputs;}; diff --git a/hosts/dunamis/configuration.nix b/hosts/dunamis/configuration.nix index 14af238..89cdcf0 100644 --- a/hosts/dunamis/configuration.nix +++ b/hosts/dunamis/configuration.nix @@ -94,7 +94,7 @@ podman.enable = false; }; - wireless.bluetooth.enableBlueman = true; + wireless.bluetooth.enableBlueman = false; opentabletdriver.enable = false; qmk-vial.enable = true; diff --git a/hosts/dunamis/sops.nix b/hosts/dunamis/sops.nix index 341d31d..cf39eb2 100644 --- a/hosts/dunamis/sops.nix +++ b/hosts/dunamis/sops.nix @@ -19,16 +19,36 @@ in { mode = "0400"; owner = "user"; }; - "ssh-private-dunamis-user" = { + "ssh-dunamis-user" = { path = "/home/user/.ssh/id_ed25519"; mode = "0400"; owner = "user"; }; - "ssh-private-uni" = { + "ssh-dunamis-user.pub" = { + path = "/home/user/.ssh/id_ed25519.pub"; + mode = "0400"; + owner = "user"; + }; + "ssh-unexplrd" = { + path = "/home/user/.ssh/id_unexplrd_ed25519"; + mode = "0400"; + owner = "user"; + }; + "ssh-unexplrd.pub" = { + path = "/home/user/.ssh/id_unexplrd_ed25519.pub"; + mode = "0400"; + owner = "user"; + }; + "ssh-uni" = { path = "/home/user/.ssh/id_uni_ed25519"; mode = "0400"; owner = "user"; }; + "ssh-uni.pub" = { + path = "/home/user/.ssh/id_uni_ed25519.pub"; + mode = "0400"; + owner = "user"; + }; }; }; } diff --git a/hosts/dunamis/users/user/home-configuration.nix b/hosts/dunamis/users/user/home-configuration.nix index fed0aac..ab676c6 100644 --- a/hosts/dunamis/users/user/home-configuration.nix +++ b/hosts/dunamis/users/user/home-configuration.nix @@ -5,9 +5,11 @@ self.homeModules.programs ./programs.nix ./flatpak.nix - ./sops.nix + # ./sops.nix ]; - desktop.niri.enable = true; + desktop = { + niri.enable = true; + }; home = { stateVersion = "25.05"; sessionPath = [ diff --git a/modules/home/desktop/default.nix b/modules/home/desktop/default.nix index 57a9121..128da82 100644 --- a/modules/home/desktop/default.nix +++ b/modules/home/desktop/default.nix @@ -1,7 +1,9 @@ -{ - imports = [ +{inputs, ...}: { + imports = with inputs; [ + way-edges.homeManagerModules.default ./common/xdg-userdirs.nix ./hyprland/default.nix + ./gnome/default.nix ./niri/default.nix ./plasma/default.nix ]; diff --git a/modules/home/desktop/gnome/default.nix b/modules/home/desktop/gnome/default.nix new file mode 100644 index 0000000..3d6479d --- /dev/null +++ b/modules/home/desktop/gnome/default.nix @@ -0,0 +1,206 @@ +{ + config, + pkgs, + lib, + ... +}: +with lib; let + cfg = config.desktop.gnome; + colors = config.lib.stylix.colors; +in { + options = { + desktop.gnome.enable = + mkEnableOption "enable gnome desktop"; + }; + config = mkIf cfg.enable { + home.packages = with pkgs; [ + gnomeExtensions.alphabetical-app-grid + gnomeExtensions.removable-drive-menu + gnomeExtensions.caffeine + gnomeExtensions.space-bar + gnomeExtensions.switcher + gnomeExtensions.tactile + gnomeExtensions.pano + gnomeExtensions.window-is-ready-remover + junction + celluloid + mission-center + dconf + pwvucontrol + wl-clipboard + ]; + programs.gnome-shell.extensions = [ + {package = pkgs.gnomeExtensions.alphabetical-app-grid;} + + {package = pkgs.gnomeExtensions.removable-drive-menu;} + {package = pkgs.gnomeExtensions.caffeine;} + {package = pkgs.gnomeExtensions.space-bar;} + {package = pkgs.gnomeExtensions.switcher;} + {package = pkgs.gnomeExtensions.tactile;} + {package = pkgs.gnomeExtensions.pano;} + {package = pkgs.gnomeExtensions.window-is-ready-remover;} + ]; + dconf.settings = with lib.hm.gvariant; { + "org/gnome/desktop/a11y/applications" = { + screen-reader-enabled = false; + }; + + "org/gnome/desktop/app-folders/folders/Utilities" = { + apps = ["org.gnome.baobab.desktop" "org.gnome.FileRoller.desktop" "org.gnome.DiskUtility.desktop" "org.gnome.Connections.desktop" "org.gnome.seahorse.Application.desktop" "org.gnome.Loupe.desktop" "org.gnome.Evince.desktop" "org.gnome.font-viewer.desktop" "org.freedesktop.GnomeAbrt.desktop" "nm-connection-editor.desktop" "org.gnome.DejaDup.desktop" "org.gnome.tweaks.desktop" "org.gnome.Usage.desktop"]; + categories = ["X-GNOME-Utilities"]; + name = "X-GNOME-Utilities.directory"; + translate = true; + }; + + "org/gnome/desktop/input-sources" = { + mru-sources = [(mkTuple ["xkb" "us"])]; + sources = [(mkTuple ["xkb" "us"]) (mkTuple ["xkb" "ua"]) (mkTuple ["xkb" "us+colemak_dh"])]; + xkb-options = ["terminate:ctrl_alt_bksp"]; + }; + + "org/gnome/desktop/interface" = { + accent-color = "slate"; + clock-show-seconds = true; + color-scheme = "prefer-dark"; + enable-animations = true; + gtk-enable-primary-paste = false; + scaling-factor = mkUint32 1; + toolbar-style = "text"; + toolkit-accessibility = false; + }; + + "org/gnome/desktop/peripherals/mouse" = { + accel-profile = "flat"; + }; + "org/gnome/desktop/peripherals/keyboard" = { + delay = 250; + repeat-interval = 25; + }; + + "org/gnome/desktop/peripherals/touchpad" = { + two-finger-scrolling-enabled = true; + }; + + "org/gnome/desktop/search-providers" = { + disabled = ["org.gnome.Epiphany.desktop"]; + sort-order = ["org.gnome.Settings.desktop" "org.gnome.Contacts.desktop" "org.gnome.Nautilus.desktop"]; + }; + + "org/gnome/desktop/wm/keybindings" = { + close = ["q"]; + move-to-monitor-down = ["Down"]; + move-to-monitor-left = ["Left"]; + move-to-monitor-right = ["Right"]; + move-to-monitor-up = ["Up"]; + move-to-workspace-1 = ["1"]; + move-to-workspace-2 = ["2"]; + move-to-workspace-3 = ["3"]; + move-to-workspace-4 = ["4"]; + move-to-workspace-5 = ["5"]; + move-to-workspace-last = ["End"]; + move-to-workspace-left = ["Left"]; + move-to-workspace-right = ["Right"]; + switch-input-source = ["Escape"]; + switch-input-source-backward = ["Escape"]; + switch-to-workspace-1 = ["1"]; + switch-to-workspace-2 = ["2"]; + switch-to-workspace-3 = ["3"]; + switch-to-workspace-4 = ["4"]; + switch-to-workspace-left = ["Left"]; + switch-to-workspace-right = ["Right"]; + }; + + "org/gnome/desktop/wm/preferences" = { + auto-raise = true; + button-layout = "icon:close"; + }; + + "org/gnome/epiphany" = { + ask-for-default = false; + }; + + "org/gnome/mutter" = { + dynamic-workspaces = true; + experimental-features = ["scale-monitor-framebuffer"]; + workspaces-only-on-primary = true; + }; + + "org/gnome/nm-applet" = { + disable-connected-notifications = true; + }; + + "org/gnome/settings-daemon/plugins/color" = { + night-light-enabled = true; + night-light-schedule-automatic = false; + }; + + "org/gnome/shell" = { + enabled-extensions = ["drive-menu@gnome-shell-extensions.gcampax.github.com" "caffeine@patapon.info" "AlphabeticalAppGrid@stuarthayhurst" "appindicatorsupport@rgcjonas.gmail.com" "user-theme@gnome-shell-extensions.gcampax.github.com" "tactile@lundal.io" "switcher@landau.fi" "pano@elhan.io" "space-bar@luchrioh"]; + }; + + "org/gnome/shell/app-switcher" = { + current-workspace-only = true; + }; + + "org/gnome/shell/extensions/caffeine" = { + indicator-position-max = 1; + }; + + "org/gnome/shell/extensions/space-bar/appearance" = { + application-styles = ".space-bar {n -natural-hpadding: 12px;n}nn.space-bar-workspace-label.active {n margin: 0 4px;n background-color: rgba(255,255,255,0.3);n color: rgba(255,255,255,1);n border-color: rgba(0,0,0,0);n font-weight: 700;n border-radius: 4px;n border-width: 0px;n padding: 3px 8px;n}nn.space-bar-workspace-label.inactive {n margin: 0 4px;n background-color: rgba(0,0,0,0);n color: rgba(255,255,255,1);n border-color: rgba(0,0,0,0);n font-weight: 700;n border-radius: 4px;n border-width: 0px;n padding: 3px 8px;n}nn.space-bar-workspace-label.inactive.empty {n margin: 0 4px;n background-color: rgba(0,0,0,0);n color: rgba(255,255,255,0.5);n border-color: rgba(0,0,0,0);n font-weight: 700;n border-radius: 4px;n border-width: 0px;n padding: 3px 8px;n}"; + }; + + "org/gnome/shell/extensions/space-bar/behavior" = { + show-empty-workspaces = false; + }; + + "org/gnome/shell/extensions/switcher" = { + activate-after-ms = mkUint32 0; + activate-by-key = mkUint32 1; + fade-enable = true; + font-size = mkUint32 24; + icon-size = mkUint32 24; + max-width-percentage = mkUint32 60; + only-current-workspace = true; + show-executables = false; + show-switcher = ["space"]; + workspace-indicator = true; + }; + + "org/gnome/shell/extensions/tactile" = { + background-color = "#${colors.base00}"; + border-color = "#${colors.base0D}"; + border-size = 3; + col-3 = 0; + gap-size = 6; + layout-2-col-1 = 1; + layout-2-row-2 = 0; + layout-3-col-1 = 2; + layout-3-col-2 = 1; + layout-3-col-3 = 0; + layout-3-row-2 = 0; + monitor-1-layout = 3; + text-color = "#${colors.base05}"; + tile-0-2 = ["z"]; + tile-1-1 = ["r"]; + tile-1-2 = ["x"]; + tile-2-0 = ["f"]; + tile-2-1 = ["s"]; + tile-2-2 = ["c"]; + tile-3-0 = ["p"]; + tile-3-1 = ["t"]; + tile-3-2 = ["d"]; + }; + + "org/gnome/software" = { + download-updates = false; + download-updates-notify = false; + first-run = false; + }; + + "org/gnome/tweaks" = { + show-extensions-notice = false; + }; + }; + }; +} diff --git a/modules/home/desktop/niri/default.nix b/modules/home/desktop/niri/default.nix index 300eebc..b2d6285 100644 --- a/modules/home/desktop/niri/default.nix +++ b/modules/home/desktop/niri/default.nix @@ -322,11 +322,11 @@ in { dots_center = true; fade_on_empty = false; font_family = "${config.stylix.fonts.serif.name}"; - font_color = "rgb(${config.lib.stylix.colors.base05})"; - inner_color = "rgb(${config.lib.stylix.colors.base00})"; - outer_color = "rgb(${config.lib.stylix.colors.base0D})"; - check_color = "rgb(${config.lib.stylix.colors.base0A})"; - fail_color = "rgb(${config.lib.stylix.colors.base08})"; + font_color = "rgb(${colors.base05})"; + inner_color = "rgb(${colors.base00})"; + outer_color = "rgb(${colors.base0D})"; + check_color = "rgb(${colors.base0A})"; + fail_color = "rgb(${colors.base08})"; placeholder_text = "locked..."; fail_text = "wrong"; shadow_passes = 0; @@ -336,8 +336,8 @@ in { { rounding = 12; size = "150, 50"; - color = "rgb(${config.lib.stylix.colors.base00})"; - border_color = "rgb(${config.lib.stylix.colors.base0D})"; + color = "rgb(${colors.base00})"; + border_color = "rgb(${colors.base0D})"; position = "-62, 30"; halign = "center"; valign = "center"; @@ -345,8 +345,8 @@ in { { rounding = 12; size = "120, 50"; - color = "rgb(${config.lib.stylix.colors.base00})"; - border_color = "rgb(${config.lib.stylix.colors.base0D})"; + color = "rgb(${colors.base00})"; + border_color = "rgb(${colors.base0D})"; position = "77, 28"; halign = "center"; valign = "center"; @@ -359,8 +359,8 @@ in { text_align = "center"; font_size = 16; font_family = "${config.stylix.fonts.serif.name}"; - outer_color = "rgb(${config.lib.stylix.colors.base00})"; - color = "rgb(${config.lib.stylix.colors.base05})"; + outer_color = "rgb(${colors.base00})"; + color = "rgb(${colors.base05})"; position = "-62, 28"; halign = "center"; valign = "center"; @@ -371,8 +371,8 @@ in { text_align = "center"; font_size = 16; font_family = "${config.stylix.fonts.serif.name}"; - outer_color = "rgb(${config.lib.stylix.colors.base00})"; - color = "rgb(${config.lib.stylix.colors.base05})"; + outer_color = "rgb(${colors.base00})"; + color = "rgb(${colors.base05})"; position = "77, 28"; halign = "center"; valign = "center"; @@ -380,7 +380,6 @@ in { ]; }; }; - # ifLaptop xdg.configFile = { niri = { target = "niri/config.kdl"; @@ -476,8 +475,8 @@ in { // default-column-width { proportion 0.9; } default-column-width {} tab-indicator { - active-color "#${config.lib.stylix.colors.base04}" - inactive-color "#${config.lib.stylix.colors.base03}" + active-color "#${colors.base04}" + inactive-color "#${colors.base03}" width 8 gap 6 corner-radius 4 @@ -489,8 +488,8 @@ in { focus-ring { // off width 3 - active-gradient from="#${config.lib.stylix.colors.base0D}" to="#${config.lib.stylix.colors.base0F}" angle=40 relative-to="workspace-view" - inactive-color "#${config.lib.stylix.colors.base03}" + active-gradient from="#${colors.base0D}" to="#${colors.base0F}" angle=40 relative-to="workspace-view" + inactive-color "#${colors.base03}" } struts { left 52 @@ -511,18 +510,18 @@ in { match is-window-cast-target=true focus-ring { width 3 - active-color "#${config.lib.stylix.colors.base0F}" - inactive-color "#${config.lib.stylix.colors.base03}" + active-color "#${colors.base0F}" + inactive-color "#${colors.base03}" } border { width 3 - active-color "#${config.lib.stylix.colors.base0F}" - inactive-color "#${config.lib.stylix.colors.base03}" + active-color "#${colors.base0F}" + inactive-color "#${colors.base03}" } shadow { on - color "#${config.lib.stylix.colors.base0F}" - inactive-color "#${config.lib.stylix.colors.base03}" + color "#${colors.base0F}" + inactive-color "#${colors.base03}" } } @@ -775,6 +774,365 @@ in { ''; }; }; + programs.way-edges = { + enable = false; + settings = { + "$schema" = "https://raw.githubusercontent.com/way-edges/way-edges/master/config/config.schema.json"; + ensure_load_group = ["niri" "tray" "common"]; + groups = [ + { + name = "niri"; + widgets = [ + { + edge = "top"; + layer = "overlay"; + margins = {left = "25%";}; + monitor = 0; + position = "left"; + widget = { + event_map = { + "272" = "niri msg action focus-column-left"; + "273" = "niri msg action focus-workspace-up"; + }; + length = "25%"; + thickness = 20; + type = "btn"; + }; + } + { + edge = "top"; + layer = "overlay"; + margins = {right = "25%";}; + monitor = 0; + position = "right"; + widget = { + event_map = { + "272" = "niri msg action focus-column-right"; + "273" = "niri msg action focus-workspace-down"; + }; + frame_rate = 144; + length = "25%"; + thickness = 20; + type = "btn"; + }; + } + { + edge = "top"; + layer = "overlay"; + margins = {left = "25%";}; + monitor = 0; + position = "left"; + widget = { + color = "#${colors.base00}"; + event_map = { + "272" = "niri msg action focus-column-left"; + "273" = "niri msg action focus-workspace-up"; + }; + length = "25%"; + thickness = 20; + type = "btn"; + }; + } + { + edge = "top"; + layer = "overlay"; + margins = {right = "25%";}; + monitor = 0; + position = "right"; + widget = { + color = "#${colors.base00}"; + event_map = { + "272" = "niri msg action focus-column-right"; + "273" = "niri msg action focus-workspace-down"; + }; + length = "25%"; + thickness = 20; + type = "btn"; + }; + } + { + edge = "left"; + layer = "overlay"; + monitor = 0; + position = "bottom"; + widget = { + active_increase = 0.5; + default_color = "#${colors.base00}"; + hover_color = "#${colors.base03}"; + focus_color = "#${colors.base0C}"; + length = "20%"; + preset = "niri"; + thickness = 30; + type = "workspace"; + }; + } + ]; + } + { + name = "common"; + widgets = + [ + { + edge = "bottom"; + layer = "overlay"; + monitor = 0; + widget = { + color = "#${colors.base00}"; + event_map = { + "272" = "niri msg action maximize-column"; + # "273" = "sh -c pkill nwg-drawer || nwg-drawer"; + "276" = "niri msg action toggle-column-tabbed-display"; + }; + length = "40%"; + thickness = 20; + type = "btn"; + }; + } + { + edge = "left"; + layer = "overlay"; + margins = {top = 40;}; + monitor = 0; + name = "stats"; + position = "top"; + widget = { + outlook = { + color = "#5d3f3c"; + type = "window"; + }; + type = "wrap-box"; + widgets = [ + { + index = [ + (lib.strings.toInt "-1") + (lib.strings.toInt "-1") + ]; + widget = { + bg_color = "#00000044"; + fg_color = "#82B2E3"; + font_family = config.stylix.fonts.serif.name; + font_size = 20; + prefix = " "; + preset = { + type = "disk"; + update_interval = 500; + }; + suffix = " {preset}"; + suffix_hide = true; + type = "ring"; + }; + } + { + index = [ + (lib.strings.toInt "-1") + (lib.strings.toInt "-1") + ]; + widget = { + bg_color = "#00000044"; + fg_color = "#FFB77B"; + font_family = config.stylix.fonts.serif.name; + font_size = 20; + prefix = " "; + preset = { + type = "battery"; + update_interval = 500; + }; + suffix = " {preset}"; + suffix_hide = true; + type = "ring"; + }; + } + { + index = [ + (lib.strings.toInt "-1") + (lib.strings.toInt "-1") + ]; + widget = { + bg_color = "#00000044"; + fg_color = "#FB8893"; + font_family = config.stylix.fonts.serif.name; + font_size = 20; + prefix = " "; + preset = { + type = "cpu"; + update_interval = 500; + }; + suffix = " {preset}"; + suffix_hide = true; + type = "ring"; + }; + } + { + index = [ + (lib.strings.toInt "-1") + (lib.strings.toInt "-1") + ]; + widget = { + bg_color = "#00000044"; + fg_color = "#BEAFD9"; + font_family = config.stylix.fonts.serif.name; + font_size = 20; + prefix = "󰾶 "; + preset = { + type = "swap"; + update_interval = 500; + }; + suffix = " {preset}"; + suffix_hide = true; + type = "ring"; + }; + } + { + index = [ + (lib.strings.toInt "-1") + (lib.strings.toInt "-1") + ]; + widget = { + bg_color = "#00000044"; + font_family = config.stylix.fonts.serif.name; + font_size = 20; + prefix = " "; + preset = { + type = "ram"; + update_interval = 500; + }; + suffix = " {preset}"; + suffix_hide = true; + type = "ring"; + }; + } + ]; + }; + } + { + edge = "top"; + layer = "overlay"; + monitor = 0; + name = "time"; + position = "right"; + widget = { + font_family = config.stylix.fonts.serif.name; + outlook = { + color = "#${colors.base00}"; + margins = { + bottom = 10; + left = 30; + right = 30; + top = 10; + }; + type = "window"; + }; + type = "wrap-box"; + widgets = [ + { + index = [ + (lib.strings.toInt "-1") + (lib.strings.toInt "-1") + ]; + widget = { + font_family = config.stylix.fonts.serif.name; + fg_color = "#${colors.base07}"; + font_size = 30; + preset = { + format = "%v %T %A"; + type = "time"; + update_interval = 500; + }; + type = "text"; + }; + } + ]; + }; + } + { + edge = "top"; + layer = "overlay"; + monitor = 0; + position = "left"; + preview_size = 7; + widget = { + font_family = config.stylix.fonts.serif.name; + border_width = 4; + length = "12.5%"; + bg_color = "#${colors.base00}"; + fg_color = "#${colors.base0C}"; + mute_color = "#${colors.base0A}"; + preset.type = "speaker"; + redraw_only_on_internal_update = true; + thickness = 30; + type = "slider"; + }; + } + ] + ++ (lib.optionals (hostname + != "dunamis") [ + { + edge = "top"; + layer = "overlay"; + margins = {left = "12.5%";}; + monitor = 0; + position = "left"; + preview_size = 7; + widget = { + font_family = config.stylix.fonts.serif.name; + border_width = 4; + bg_color = "#${colors.base00}"; + fg_color = "#${colors.base0B}"; + length = "12.5%"; + preset.type = "backlight"; + redraw_only_on_internal_update = true; + thickness = 30; + type = "slider"; + }; + } + ]); + } + { + name = "tray"; + widgets = [ + { + edge = "bottom"; + layer = "overlay"; + monitor = 0; + name = "tray"; + position = "right"; + widget = { + align = "bottom_left"; + outlook = { + font_family = config.stylix.fonts.serif.name; + color = "#${colors.base07}"; + type = "window"; + }; + type = "wrap-box"; + widgets = [ + { + index = [ + (lib.strings.toInt "-1") + (lib.strings.toInt "-1") + ]; + widget = { + font_family = config.stylix.fonts.serif.name; + grid_align = "bottom_left"; + header_draw_config = {text_color = "#${colors.base00}";}; + header_menu_align = "left"; + header_menu_stack = "menu_top"; + icon_size = 42; + menu_draw_config = { + border_color = "#${colors.base00}"; + text_color = "#${colors.base00}"; + font_pixel_height = 18; + }; + type = "tray"; + }; + } + ]; + }; + } + ]; + } + ]; + }; + }; programs.waybar = { enable = true; systemd = { @@ -783,8 +1141,8 @@ in { }; settings = { bar-0 = { - layer = "top"; - position = "bottom"; + # layer = "top"; + position = "top"; height = 32; spacing = 4; margin-left = 63; @@ -795,7 +1153,7 @@ in { "niri/workspaces" "wlr/taskbar" ]; - # modules-center = []; + modules-center = ["mpris"]; modules-right = [ "wireplumber" (ifLaptop "group/laptop") @@ -880,6 +1238,17 @@ in { format-alt = "{icon} {time}"; format-icons = ["󰁺" "󰁻" "󰁼" "󰁽" "󰁾" "󰁿" "󰂀" "󰂁" "󰂂" "󰁹"]; }; + mpris = { + format = "{player_icon} {dynamic}"; + format-paused = "{status_icon} {dynamic}"; + playing-len = 30; + playing-paused = 30; + player-icons = { + default = "▶"; + mpv = "🎵"; + }; + status-icons = {paused = "⏸";}; + }; "upower" = { icon-size = 16; format = "{percentage}"; @@ -974,12 +1343,20 @@ in { transition-property: background-color; transition-duration: 0.5s; } + .modules-center { + background-color: transparent; + } + .mpris.stopped { + background-color: transparent; + } + .mpris.playing, + .mpris.paused, .modules-left, .modules-right { - border-top-left-radius: 12px; - border-top-right-radius: 12px; - border-bottom-left-radius: 0px; - border-bottom-right-radius: 0px; + border-bottom-left-radius: 12px; + border-bottom-right-radius: 12px; + border-top-left-radius: 0px; + border-top-right-radius: 0px; background-color: @base00; color: @base05; padding: 0 0.5em; diff --git a/modules/home/programs/shell/fish.nix b/modules/home/programs/shell/fish.nix index b842206..87dae39 100644 --- a/modules/home/programs/shell/fish.nix +++ b/modules/home/programs/shell/fish.nix @@ -40,6 +40,7 @@ in { bind \cH backward-kill-word set fish_greeting set fish_cursor_default block blink + set EDITOR hx ''; }; }; diff --git a/modules/home/programs/syncthing.nix b/modules/home/programs/syncthing.nix index d6d25af..e647e61 100644 --- a/modules/home/programs/syncthing.nix +++ b/modules/home/programs/syncthing.nix @@ -17,7 +17,7 @@ in { settings = { options = { urAccepted = -1; - relaysEnabled = false; + relaysEnabled = true; }; devices = { "dunamis".id = "72VRZFX-65SZUKP-2XL2WLG-75MMKLG-PQLDEZN-G5OI5U7-RLF4OHS-LNCXEQX"; @@ -25,7 +25,7 @@ in { "phone".id = "XBZLA7Y-YOBZHLO-MSTRAGS-6SN5MEZ-FDKR76F-DIX2BKE-FMDNUYR-TMD6UAQ"; }; folders = { - "docs" = { + "kgWDuKXLwWm9dalD" = { path = "/home/user/docs"; devices = [ "dunamis" @@ -33,7 +33,7 @@ in { "phone" ]; }; - "programming" = { + "lPdfBZtxd6fATFp2" = { path = "/home/user/programming"; devices = [ "dunamis" diff --git a/modules/nixos/desktop/default.nix b/modules/nixos/desktop/default.nix index 1920f86..4d669e7 100644 --- a/modules/nixos/desktop/default.nix +++ b/modules/nixos/desktop/default.nix @@ -2,6 +2,7 @@ imports = [ ./niri.nix ./cosmic.nix + ./gnome.nix ./plasma.nix ./hyprland.nix ]; diff --git a/modules/nixos/desktop/gnome.nix b/modules/nixos/desktop/gnome.nix new file mode 100644 index 0000000..f237aba --- /dev/null +++ b/modules/nixos/desktop/gnome.nix @@ -0,0 +1,30 @@ +{ + config, + pkgs, + lib, + ... +}: +with lib; let + cfg = config.desktop.gnome; +in { + imports = [./common/pipewire.nix]; + options = { + desktop.gnome.enable = + mkEnableOption "enable gnome desktop"; + }; + config = mkIf cfg.enable { + services.xserver = { + enable = true; + displayManager.gdm.enable = true; + desktopManager.gnome.enable = true; + }; + programs.dconf.enable = true; + programs.seahorse.enable = true; + services.gnome.gnome-keyring.enable = true; + services.udisks2.enable = true; + services.dbus = { + apparmor = "enabled"; + implementation = "broker"; + }; + }; +} diff --git a/packages/wl-tray-bridge/default.nix b/packages/wl-tray-bridge/default.nix new file mode 100644 index 0000000..8fae677 --- /dev/null +++ b/packages/wl-tray-bridge/default.nix @@ -0,0 +1,45 @@ +{ + lib, + rustPlatform, + fetchFromGitHub, + pkg-config, + cairo, + glib, + pango, + stdenv, + wayland, +}: + +rustPlatform.buildRustPackage rec { + pname = "wl-tray-bridge"; + version = "unstable-2024-10-24"; + + src = fetchFromGitHub { + owner = "mahkoh"; + repo = "wl-tray-bridge"; + rev = "5ea5bbddcf1dbb2ab4836b00b300803c928469c5"; + hash = "sha256-ewoHopL9/hgErshUWZBZ4H6MKt7iQD7x+4MebNzDdXQ="; + }; + + cargoHash = "sha256-YuxLTC7/EiBqqzYrFQDwxJUS7D0M3RvlBrybBZya9/Q="; + + nativeBuildInputs = [ + pkg-config + ]; + + buildInputs = [ + cairo + glib + pango + ] ++ lib.optionals stdenv.isLinux [ + wayland + ]; + + meta = { + description = ""; + homepage = "https://github.com/mahkoh/wl-tray-bridge"; + license = lib.licenses.gpl3Only; + maintainers = with lib.maintainers; [ ]; + mainProgram = "wl-tray-bridge"; + }; +}