diff --git a/flake.lock b/flake.lock index 8bc5435..30eeaba 100644 --- a/flake.lock +++ b/flake.lock @@ -1,26 +1,5 @@ { "nodes": { - "crane": { - "inputs": { - "nixpkgs": [ - "ironbar", - "nixpkgs" - ] - }, - "locked": { - "lastModified": 1698166613, - "narHash": "sha256-y4rdN4flxRiROqNi1waMYIZj/Fs7L2OrszFk/1ry9vU=", - "owner": "ipetkov", - "repo": "crane", - "rev": "b7db46f0f1751f7b1d1911f6be7daf568ad5bc65", - "type": "github" - }, - "original": { - "owner": "ipetkov", - "repo": "crane", - "type": "github" - } - }, "emacs-overlay": { "inputs": { "flake-utils": [ @@ -32,11 +11,11 @@ "nixpkgs-stable": "nixpkgs-stable" }, "locked": { - "lastModified": 1699407189, - "narHash": "sha256-k5naceprGqk1fRpYNgO5a08Z73zHYAT7VGTQOBEuNIo=", + "lastModified": 1704157128, + "narHash": "sha256-BAna+70nf43RJ5wOOl4grL4W/o4FRNtgWZtwt/LTZvE=", "owner": "nix-community", "repo": "emacs-overlay", - "rev": "b3e43b61c5ffa8fd51ef0d2746f57f8183610ffd", + "rev": "575fcd2ddb0e7c40611ba68d4a977e0cdc729669", "type": "github" }, "original": { @@ -53,11 +32,11 @@ ] }, "locked": { - "lastModified": 1698882062, - "narHash": "sha256-HkhafUayIqxXyHH1X8d9RDl1M2CkFgZLjKD3MzabiEo=", + "lastModified": 1701473968, + "narHash": "sha256-YcVE5emp1qQ8ieHUnxt1wCZCC3ZfAS+SRRWZ2TMda7E=", "owner": "hercules-ci", "repo": "flake-parts", - "rev": "8c9fa2545007b49a5db5f650ae91f227672c3877", + "rev": "34fed993f1674c8d06d58b37ce1e0fe5eebcb9f5", "type": "github" }, "original": { @@ -71,11 +50,11 @@ "systems": "systems" }, "locked": { - "lastModified": 1694529238, - "narHash": "sha256-zsNZZGTGnMOf9YpHKJqMSsa0dXbfmxeoJ7xHlrt+xmY=", + "lastModified": 1701680307, + "narHash": "sha256-kAuep2h5ajznlPMD9rnQyffWG8EM/C73lejGofXvdM8=", "owner": "numtide", "repo": "flake-utils", - "rev": "ff7b65b44d01cf9ba6a71320833626af21126384", + "rev": "4022d587cbbfd70fe950c1e2083a02621806a725", "type": "github" }, "original": { @@ -96,11 +75,11 @@ ] }, "locked": { - "lastModified": 1698165573, - "narHash": "sha256-cnMTgCDnZiQKsf+wVzigpexskqRCFTKgS58Wx2rNU1c=", + "lastModified": 1701009247, + "narHash": "sha256-GuX16rzRze2y7CsewJLTV6qXkXWyEwp6VCZXi8HLruU=", "owner": "hercules-ci", "repo": "hercules-ci-effects", - "rev": "300e0af24a1bbe32d115beb182efb01785582c45", + "rev": "31b6cd7569191bfcd0a548575b0e2ef953ed7d09", "type": "github" }, "original": { @@ -116,11 +95,11 @@ ] }, "locked": { - "lastModified": 1699368917, - "narHash": "sha256-nUtGIWf86BOkUbtksWtfglvCZ/otP0FTZlQH8Rzc7PA=", + "lastModified": 1704100519, + "narHash": "sha256-SgZC3cxquvwTN07vrYYT9ZkfvuhS5Y1k1F4+AMsuflc=", "owner": "nix-community", "repo": "home-manager", - "rev": "6a8444467c83c961e2f5ff64fb4f422e303c98d3", + "rev": "6e91c5df192395753d8e6d55a0352109cb559790", "type": "github" }, "original": { @@ -129,6 +108,27 @@ "type": "github" } }, + "hyprfocus": { + "inputs": { + "hyprland": [ + "hyprland" + ], + "nix-filter": "nix-filter" + }, + "locked": { + "lastModified": 1698854678, + "narHash": "sha256-JuUNQXUetKIUGGwzEA5dQmKtpFvYSZzG/IV373aKd6U=", + "owner": "VortexCoyote", + "repo": "hyprfocus", + "rev": "ec3b45482f651c2b1f0e4df90a41d24a1afa5a74", + "type": "github" + }, + "original": { + "owner": "VortexCoyote", + "repo": "hyprfocus", + "type": "github" + } + }, "hyprland": { "inputs": { "hyprland-protocols": "hyprland-protocols", @@ -140,11 +140,11 @@ "xdph": "xdph" }, "locked": { - "lastModified": 1699391198, - "narHash": "sha256-HrnlCdZBqqE37gFORapfSGEGcqhCyhX2aSMRnDEmR0k=", + "lastModified": 1704146726, + "narHash": "sha256-MS/VO4Bv2N0yAUrWxCmwTU7+g5GhI6lEMy7R3ZzmswU=", "owner": "hyprwm", "repo": "Hyprland", - "rev": "751d2851cc270c3322ffe2eb83c156e4298a0c0e", + "rev": "1607e967041fd3311411de0def8cdc0610274f98", "type": "github" }, "original": { @@ -160,11 +160,11 @@ ] }, "locked": { - "lastModified": 1699433832, - "narHash": "sha256-/GFH0NrZ+TOmmfNE5tTHy7kGEzWg+QkJ2rw0vw/MJJM=", + "lastModified": 1704027000, + "narHash": "sha256-sMJguaGNfwmzkyRLwBuQhyFBs2CB08O6dIUwJ51eoJU=", "owner": "outfoxxed", "repo": "hy3", - "rev": "47cb4a9930b604dd0bbaf04bd156a41cbb973779", + "rev": "a92314b57a1c611e3e24cfa31c14c4dc3ea638e5", "type": "github" }, "original": { @@ -200,16 +200,14 @@ }, "hyprpaper": { "inputs": { - "nixpkgs": [ - "nixpkgs" - ] + "nixpkgs": "nixpkgs" }, "locked": { - "lastModified": 1698097178, - "narHash": "sha256-W4W3pAYNpXp0jLZwK0Bxw6R7n2/UYxp+lnT5mD2/xEM=", + "lastModified": 1703524093, + "narHash": "sha256-qqF3NyarX6ZSCBmhzO4r0BEcy6FHj6DsvF0hIMkwz/Q=", "owner": "hyprwm", "repo": "Hyprpaper", - "rev": "d6856adaffb77a9cc1aac3d04d98276eaa5602a4", + "rev": "ef0e051255af1b96155b222da94c94ecad1f7708", "type": "github" }, "original": { @@ -233,46 +231,18 @@ "type": "github" } }, - "ironbar": { - "inputs": { - "crane": "crane", - "naersk": "naersk", - "nixpkgs": [ - "nixpkgs" - ], - "rust-overlay": [ - "rust-overlay" - ] - }, + "nix-filter": { "locked": { - "lastModified": 1699376527, - "narHash": "sha256-ODtyJTPFPKrkXLdsgsD/mWDO6Eajw3pSMJKDnmtZ8+k=", - "owner": "JakeStanger", - "repo": "ironbar", - "rev": "0d9e4545aa827a204d6fad17f52d14dff2d40231", + "lastModified": 1694857738, + "narHash": "sha256-bxxNyLHjhu0N8T3REINXQ2ZkJco0ABFPn6PIe2QUfqo=", + "owner": "numtide", + "repo": "nix-filter", + "rev": "41fd48e00c22b4ced525af521ead8792402de0ea", "type": "github" }, "original": { - "owner": "JakeStanger", - "repo": "ironbar", - "type": "github" - } - }, - "naersk": { - "inputs": { - "nixpkgs": "nixpkgs" - }, - "locked": { - "lastModified": 1698420672, - "narHash": "sha256-/TdeHMPRjjdJub7p7+w55vyABrsJlt5QkznPYy55vKA=", - "owner": "nix-community", - "repo": "naersk", - "rev": "aeb58d5e8faead8980a807c840232697982d47b9", - "type": "github" - }, - "original": { - "owner": "nix-community", - "repo": "naersk", + "owner": "numtide", + "repo": "nix-filter", "type": "github" } }, @@ -285,11 +255,11 @@ ] }, "locked": { - "lastModified": 1698894002, - "narHash": "sha256-y1B0YhL8AS3xtcLYI8sPuMlNdq4Wy2dmv8TxsAgQ3iU=", + "lastModified": 1703730102, + "narHash": "sha256-oXEu4FYhIgS0+qMMf1YfnseMmOStK/45S4k6XUcGi4M=", "owner": "nixpak", "repo": "nixpak", - "rev": "abcc460251d7e13a38ec335588c8f8d8f34a6967", + "rev": "39e3350f9d473422c8cf9e7cb362241f8ed2b974", "type": "github" }, "original": { @@ -300,41 +270,43 @@ }, "nixpkgs": { "locked": { - "lastModified": 1698553279, - "narHash": "sha256-T/9P8yBSLcqo/v+FTOBK+0rjzjPMctVymZydbvR/Fak=", - "owner": "NixOS", + "lastModified": 1702645756, + "narHash": "sha256-qKI6OR3TYJYQB3Q8mAZ+DG4o/BR9ptcv9UnRV2hzljc=", + "owner": "nixos", "repo": "nixpkgs", - "rev": "90e85bc7c1a6fc0760a94ace129d3a1c61c3d035", + "rev": "40c3c94c241286dd2243ea34d3aef8a488f9e4d0", "type": "github" }, "original": { - "id": "nixpkgs", - "type": "indirect" + "owner": "NixOS", + "ref": "nixos-unstable", + "repo": "nixpkgs", + "type": "github" } }, "nixpkgs-stable": { "locked": { - "lastModified": 1699291058, - "narHash": "sha256-5ggduoaAMPHUy4riL+OrlAZE14Kh7JWX4oLEs22ZqfU=", + "lastModified": 1703992652, + "narHash": "sha256-C0o8AUyu8xYgJ36kOxJfXIroy9if/G6aJbNOpA5W0+M=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "41de143fda10e33be0f47eab2bfe08a50f234267", + "rev": "32f63574c85fbc80e4ba1fbb932cde9619bad25e", "type": "github" }, "original": { "owner": "NixOS", - "ref": "nixos-23.05", + "ref": "nixos-23.11", "repo": "nixpkgs", "type": "github" } }, "nixpkgs_2": { "locked": { - "lastModified": 1699099776, - "narHash": "sha256-X09iKJ27mGsGambGfkKzqvw5esP1L/Rf8H3u3fCqIiU=", + "lastModified": 1703961334, + "narHash": "sha256-M1mV/Cq+pgjk0rt6VxoyyD+O8cOUiai8t9Q6Yyq4noY=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "85f1ba3e51676fa8cc604a3d863d729026a6b8eb", + "rev": "b0d36bd0a420ecee3bc916c91886caca87c894e9", "type": "github" }, "original": { @@ -345,11 +317,11 @@ }, "nur": { "locked": { - "lastModified": 1699433556, - "narHash": "sha256-wkMetUfKWfjjSHO9D0UQcTVXgG4AdeBhSKd1T6I8ecU=", + "lastModified": 1704160731, + "narHash": "sha256-EKeiL8TgXcoOVfbc0QUpY0nCw1IIiQtWNWB57/dMAx4=", "owner": "nix-community", "repo": "NUR", - "rev": "25c6efd08f98ed2e4799097f0dd1c4eb3570cbb2", + "rev": "820a4b9b2f9111fb71d41794b38ffd46bb7e81ed", "type": "github" }, "original": { @@ -363,11 +335,11 @@ "emacs-overlay": "emacs-overlay", "flake-utils": "flake-utils", "home-manager": "home-manager", + "hyprfocus": "hyprfocus", "hyprland": "hyprland", "hyprland-hy3": "hyprland-hy3", "hyprpaper": "hyprpaper", "impurity": "impurity", - "ironbar": "ironbar", "nixpak": "nixpak", "nixpkgs": "nixpkgs_2", "nur": "nur", @@ -385,11 +357,11 @@ ] }, "locked": { - "lastModified": 1699409596, - "narHash": "sha256-L3g1smIol3dGTxkUQOlNShJtZLvjLzvtbaeTRizwZBU=", + "lastModified": 1704075545, + "narHash": "sha256-L3zgOuVKhPjKsVLc3yTm2YJ6+BATyZBury7wnhyc8QU=", "owner": "oxalica", "repo": "rust-overlay", - "rev": "58240e1ac627cef3ea30c7732fedfb4f51afd8e7", + "rev": "a0df72e106322b67e9c6e591fe870380bd0da0d5", "type": "github" }, "original": { @@ -400,11 +372,11 @@ }, "stable": { "locked": { - "lastModified": 1699291058, - "narHash": "sha256-5ggduoaAMPHUy4riL+OrlAZE14Kh7JWX4oLEs22ZqfU=", + "lastModified": 1704018918, + "narHash": "sha256-erjg/HrpC9liEfm7oLqb8GXCqsxaFwIIPqCsknW5aFY=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "41de143fda10e33be0f47eab2bfe08a50f234267", + "rev": "2c9c58e98243930f8cb70387934daa4bc8b00373", "type": "github" }, "original": { @@ -447,18 +419,18 @@ "flake": false, "locked": { "host": "gitlab.freedesktop.org", - "lastModified": 1697909146, - "narHash": "sha256-jU0I6FoCKnj4zIBL4daosFWh81U1fM719Z6cae8PxSY=", + "lastModified": 1703963193, + "narHash": "sha256-ke8drv6PTrdQDruWbajrRJffP9A9PU6FRyjJGNZRTs4=", "owner": "wlroots", "repo": "wlroots", - "rev": "47bf87ade2bd32395615a385ebde1fefbcdf79a2", + "rev": "f81c3d93cd6f61b20ae784297679283438def8df", "type": "gitlab" }, "original": { "host": "gitlab.freedesktop.org", "owner": "wlroots", "repo": "wlroots", - "rev": "47bf87ade2bd32395615a385ebde1fefbcdf79a2", + "rev": "f81c3d93cd6f61b20ae784297679283438def8df", "type": "gitlab" } }, @@ -478,11 +450,11 @@ ] }, "locked": { - "lastModified": 1697981233, - "narHash": "sha256-y8q4XUwx+gVK7i2eLjfR32lVo7TYvEslyzrmzYEaPZU=", + "lastModified": 1703514399, + "narHash": "sha256-VRr5Xc4S/VPr/gU3fiOD3vSIL2+GJ+LUrmFTWTwnTz4=", "owner": "hyprwm", "repo": "xdg-desktop-portal-hyprland", - "rev": "22e7a65ff9633e1dedfa5317fdffc49f68de2ff2", + "rev": "0a318a7a217a6402b0b705837cd5b50b0e94b31b", "type": "github" }, "original": { diff --git a/flake.nix b/flake.nix index da4c31f..d799d63 100755 --- a/flake.nix +++ b/flake.nix @@ -32,15 +32,14 @@ inputs.hyprland.follows = "hyprland"; }; - hyprpaper = { - url = "github:hyprwm/Hyprpaper"; - inputs.nixpkgs.follows = "nixpkgs"; + hyprfocus = { + url = "github:VortexCoyote/hyprfocus"; + inputs.hyprland.follows = "hyprland"; }; - ironbar = { - url = "github:JakeStanger/ironbar"; - inputs.nixpkgs.follows = "nixpkgs"; - inputs.rust-overlay.follows = "rust-overlay"; + hyprpaper = { + url = "github:hyprwm/Hyprpaper"; + #inputs.nixpkgs.follows = "nixpkgs"; }; nur.url = "github:nix-community/NUR"; diff --git a/modules/core/default.nix b/modules/core/default.nix index ad7951b..e4ea8e1 100644 --- a/modules/core/default.nix +++ b/modules/core/default.nix @@ -6,6 +6,11 @@ nixpkgs.config.allowUnfree = true; + nixpkgs.config.permittedInsecurePackages = [ + "electron-24.8.6" + "electron-25.9.0" + ]; + documentation = { enable = true; doc.enable = true; diff --git a/modules/hyprland/default.nix b/modules/hyprland/default.nix index 3b6038f..b51baac 100644 --- a/modules/hyprland/default.nix +++ b/modules/hyprland/default.nix @@ -1,11 +1,12 @@ { system, inputs, impurity, lib, config, pkgs, ... }: let inherit (inputs) hyprland hyprpaper hyprland-hy3; - wrapper = pkgs.writeShellScriptBin "hyprland" '' + # I blame home manager + wrapper = pkgs.callPackage ({ ... }: pkgs.writeShellScriptBin "hyprland" '' ${builtins.readFile ./session.sh} ${config.hyprland-session.prerun} ${hyprland.packages.${system}.default}/bin/Hyprland $@ - ''; + '') {}; in { imports = [ hyprland.nixosModules.default ]; @@ -31,10 +32,15 @@ in { xdg.portal = { enable = true; - wlr.enable = true; + extraPortals = with pkgs; [ xdg-desktop-portal-kde ]; + + config.common.default = [ + "hyprland" + "kde" + ]; }; security.pam.services.swaylock = {}; @@ -44,6 +50,7 @@ in { home.packages = with pkgs; [ wrapper + hyprpaper # environment programs wl-clipboard @@ -68,7 +75,7 @@ in { enable = true; package = wrapper; - plugins = [ hyprland-hy3.packages.${system}.default ]; + plugins = [ hyprland-hy3.packages.${system}.default inputs.hyprfocus.packages.${system}.default ]; extraConfig = '' exec-once = ${hyprpaper.packages.${system}.default}/bin/hyprpaper diff --git a/modules/hyprland/hyprland.conf b/modules/hyprland/hyprland.conf index b384f73..8f7e991 100644 --- a/modules/hyprland/hyprland.conf +++ b/modules/hyprland/hyprland.conf @@ -83,12 +83,30 @@ plugin { trigger_height = 500 } } + + hyprfocus { + enabled = false + + keyboard_focus_animation = shrink + + bezier = bezIn, 0.5,0.0,1.0,0.5 + bezier = bezOut, 0.0,0.5,0.5,1.0 + + shrink { + shrink_percentage = 0.99 + + in_bezier = bezIn + in_speed = 1 + + out_bezier = bezOut + out_speed = 3 + } + } } monitor = , preferred, auto, 1 layerrule = blur, wofi -layerrule = blur, ironbar windowrulev2 = float, class:^(opensnitch_ui)$ windowrulev2 = dimaround, class:^(opensnitch_ui)$ diff --git a/modules/ironbar/config.corn b/modules/ironbar/config.corn deleted file mode 100644 index 1eb1e95..0000000 --- a/modules/ironbar/config.corn +++ /dev/null @@ -1,13 +0,0 @@ -{ - position = "left" - - margin = { - top = 3 - bottom = 3 - right = 5 - } - - start = [ - { type = "workspaces" } - ] -} diff --git a/modules/ironbar/default.nix b/modules/ironbar/default.nix deleted file mode 100644 index 7c5438a..0000000 --- a/modules/ironbar/default.nix +++ /dev/null @@ -1,16 +0,0 @@ -{ system, inputs, config, lib, impurity, ... }: { - home-manager.users.${config.main-user} = { - imports = [ inputs.ironbar.homeManagerModules.default ]; - - programs.ironbar = { - enable = true; - package = inputs.ironbar.packages.${system}.default; - }; - - xdg.configFile = { - "ironbar/config.json".enable = false; - "ironbar/config.corn".source = (impurity.link ./config.corn); - "ironbar/style.css".source = (impurity.link ./style.css); - }; - }; -} diff --git a/modules/ironbar/style.css b/modules/ironbar/style.css deleted file mode 100644 index b1c0caf..0000000 --- a/modules/ironbar/style.css +++ /dev/null @@ -1,47 +0,0 @@ -* { - background: transparent; - border: none; - padding: 0; -} - -.background { - background-color: rgba(0x00, 0x10, 0x17, 0.4); - - border-width: 2px; - border-style: solid; - border-left-width: 0; - border-radius: 10px; - border-top-left-radius: 0; - border-bottom-left-radius: 0; - border-color: rgba(0x59, 0x59, 0x59, 0.7); -} - -#bar { - margin: 7px; - margin-left: 0; -} - -.popup { - margin-left: 0; -} - -.workspaces > .item { - padding: 4px 0; - border-radius: 0; - border-left-width: 4px; - border-style: solid; - border-color: transparent; - padding-right: 4px; -} - -.workspaces > .item.focused { - border-color: rgba(0x59, 0x59, 0x59, 0.5); - background-color: rgba(0xff, 0xff, 0xff, 0.1); - border-top-right-radius: 5px; - border-bottom-right-radius: 5px; -} - -.clock { - border-radius: 0; - box-shadow: none; -} diff --git a/modules/polkit.nix b/modules/polkit.nix new file mode 100644 index 0000000..7129df1 --- /dev/null +++ b/modules/polkit.nix @@ -0,0 +1,20 @@ +{ + security.polkit = { + enable = true; + }; + + systemd = { + user.services.polkit-agent = { + wants = [ "graphical-session.target" ]; + wantedBy = [ "graphical-session.target" ]; + after = [ "graphical-session.target" ]; + serviceConfig = { + Type = "simple"; + ExecStart = "${pkgs.polkit-kde-agent}/libexec/polkit-kde-authentication-agent-1"; + Restart = "on-failure"; + RestartSec = 1; + TimeoutStopSec = 10; + }; + }; + }; +} diff --git a/modules/user/general.nix b/modules/user/general.nix index 794d080..a7defcb 100644 --- a/modules/user/general.nix +++ b/modules/user/general.nix @@ -1,8 +1,4 @@ { system, inputs, pkgs, config, ... }: { - imports = [ - ../ironbar - ]; - system.extraDependencies = with pkgs; [ ungoogled-chromium ]; fonts = {