diff --git a/flake.lock b/flake.lock index a632be76..5c95299b 100644 --- a/flake.lock +++ b/flake.lock @@ -1325,11 +1325,11 @@ ] }, "locked": { - "lastModified": 1693075322, - "narHash": "sha256-O/qmWiE23pzYMSKNhA74jfY1D5TyiJrHx35PYkRx9Gs=", + "lastModified": 1698468868, + "narHash": "sha256-iTB/ogc6qR08J1zlWVj9sbdgubKqXohXgz64UsvlmQI=", "owner": "the-argus", "repo": "spicetify-nix", - "rev": "78495ade242ad155942c2e33e3930e4a05963f13", + "rev": "1537acd42dad6420d7204323e40eee6fbc16e0a5", "type": "github" }, "original": { diff --git a/flake.nix b/flake.nix index 9268e60f..49ed5b02 100644 --- a/flake.nix +++ b/flake.nix @@ -79,7 +79,6 @@ inputs = { nixpkgs.follows = "nixpkgs"; rust-overlay.follows = "rust-overlay"; - parts.follows = "flake-parts"; }; }; rust-overlay = { @@ -110,30 +109,6 @@ inputs.nixpkgs.follows = "nixpkgs"; }; }; - nixConfig = { - # use binary cache, its not gentoo - extra-substituters = [ - "https://cache.nixos.org" - "https://fortuneteller2k.cachix.org" - "https://nixpkgs-wayland.cachix.org" - "https://nix-community.cachix.org" - "https://hyprland.cachix.org" - "https://nixpkgs-unfree.cachix.org" - "https://anyrun.cachix.org" - "https://viperml.cachix.org" - ]; - - extra-trusted-public-keys = [ - "cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY=" - "fortuneteller2k.cachix.org-1:kXXNkMV5yheEQwT0I4XYh1MaCSz+qg72k8XAi2PthJI=" - "nixpkgs-wayland.cachix.org-1:3lwxaILxMRkVhehr5StQprHdEo4IrE8sRho9R9HOLYA=" - "nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs=" - "hyprland.cachix.org-1:a7pgxzMz7+chwVL3/pzj6jIBMioiJM7ypFP8PwtkuGc=" - "nixpkgs-unfree.cachix.org-1:hqvoInulhbV4nJ9yJOEr+4wxhDV4xq2d1DK7S6Nj6rs=" - "anyrun.cachix.org-1:pqBobmOjI7nKlsUMV25u9QHa9btJK65/C8vnO3p346s=" - "viperml.cachix.org-1:qZhKBMTfmcLL+OG6fj/hzsMEedgKvZVFRRAhq7j8Vh8=" - ]; - }; outputs = { self, nixpkgs, diff --git a/home/misc/default.nix b/home/misc/default.nix index f6e6cc6b..2a9afa78 100644 --- a/home/misc/default.nix +++ b/home/misc/default.nix @@ -1,8 +1,9 @@ {...}: { imports = [ - ./media - ./schizofox - ./rnnoise - ./swayidle + ./media.nix + ./schizofox.nix + ./rnnoise.nix + ./syncthing.nix + ./swayidle.nix ]; } diff --git a/home/misc/media/default.nix b/home/misc/media.nix similarity index 100% rename from home/misc/media/default.nix rename to home/misc/media.nix diff --git a/home/misc/rnnoise/default.nix b/home/misc/rnnoise.nix similarity index 100% rename from home/misc/rnnoise/default.nix rename to home/misc/rnnoise.nix diff --git a/home/misc/schizofox/default.nix b/home/misc/schizofox.nix similarity index 100% rename from home/misc/schizofox/default.nix rename to home/misc/schizofox.nix diff --git a/home/misc/swayidle/default.nix b/home/misc/swayidle.nix similarity index 100% rename from home/misc/swayidle/default.nix rename to home/misc/swayidle.nix diff --git a/home/misc/syncthing.nix b/home/misc/syncthing.nix new file mode 100644 index 00000000..1bf1e96f --- /dev/null +++ b/home/misc/syncthing.nix @@ -0,0 +1,5 @@ +{config, ...}: { + services.syncthing = { + enable = true; + }; +} diff --git a/home/rice/hyprland/config.nix b/home/rice/hyprland/config.nix index db7e1df5..02abe86e 100644 --- a/home/rice/hyprland/config.nix +++ b/home/rice/hyprland/config.nix @@ -47,6 +47,8 @@ in { settings = { # define the mod key "$MOD" = "SUPER"; + "$scratchpad" = "title:^(scratchpad)$"; + "$pavucontrol" = "class:^(pavucontrol)$"; exec-once = [ # set cursor for HL itself @@ -57,6 +59,9 @@ in { # foot terminal server "${lib.optionalString config.programs.foot.server.enable ''run-as-service 'foot --server''}" + + # scratchpads + "run-as-service pypr" ]; gestures = { @@ -64,6 +69,10 @@ in { workspace_swipe_forever = true; }; + xwayland = { + force_zero_scaling = true; + }; + input = { # keyboard layout kb_layout = "pl"; @@ -164,6 +173,13 @@ in { "$MOD,C,killactive" "$MOD,P,pseudo" + # scratchpads + "$MOD,Z,exec, pypr toggle term && hyprctl dispatch bringactivetotop" + "$MOD,B,exec, pypr toggle btm && hyprctl dispatch bringactivetotop" + "$MOD,code:172,exec,pypr toggle pavucontrol && hyprctl dispatch bringactivetotop" + "$MOD,code:21,exec,pypr zoom" + "$MOD,code:21,exec,hyprctl reload" + "$MOD,H,movefocus,l" "$MOD,L,movefocus,r" "$MOD,K,movefocus,u" @@ -227,6 +243,12 @@ in { "fullscreen,class:wlogout" "fullscreen,title:wlogout" + # scratchpad + "float,$scratchpad" + "size 80% 85%,$scratchpad" + "workspace special silent,$scratchpad" + "center,$scratchpad" + # telegram media viewer "float, title:^(Media viewer)$" @@ -242,10 +264,14 @@ in { "float,class:udiskie" # pavucontrol - "float,class:pavucontrol" - "float,title:^(Volume Control)$" - "size 800 600,title:^(Volume Control)$" - "move 75 44%,title:^(Volume Control)$" + "float,$pavucontrol" + "size 86% 40%,$pavucontrol" + "move 50% 6%,$pavucontrol" + "workspace special silent,$pavucontrol" + "opacity 0.80,$pavucontrol" + + "opacity 0.9,class:^(org.keepassxc.KeePassXC)$" + "float, class:^(imv)$" # throw sharing indicators away @@ -299,4 +325,31 @@ in { ''; }; + home.file.".config/hypr/pyprland.json".text = '' + { + "pyprland": { + "plugins": ["scratchpads", "magnify"] + }, + "scratchpads": { + "term": { + "command": "foot --title scratchpad", + "margin": 50 + }, + "btm": { + "command": "foot --title scratchpad -e btm", + "margin": 50 + }, + "geary": { + "command": "geary", + "margin": 50 + }, + "pavucontrol": { + "command": "pavucontrol", + "margin": 50, + "unfocus": "hide", + "animation": "fromTop" + } + } + } + ''; } diff --git a/home/rice/hyprland/default.nix b/home/rice/hyprland/default.nix index eb3167b0..8e16de88 100644 --- a/home/rice/hyprland/default.nix +++ b/home/rice/hyprland/default.nix @@ -45,6 +45,21 @@ in { kill $picker_proc '') + (pkgs.python3Packages.buildPythonPackage rec { + pname = "pyprland"; + version = "1.4.1"; + src = pkgs.fetchPypi { + inherit pname version; + sha256 = "sha256-JRxUn4uibkl9tyOe68YuHuJKwtJS//Pmi16el5gL9n8="; + }; + format = "pyproject"; + propagatedBuildInputs = with pkgs; [ + python3Packages.setuptools + python3Packages.poetry-core + poetry + ]; + doCheck = false; + }) ]; wayland.windowManager.hyprland = { @@ -52,7 +67,7 @@ in { package = inputs.hyprland.packages.${pkgs.system}.default.override { enableNvidiaPatches = true; }; - systemdIntegration = true; + systemd.enable = true; }; services = { diff --git a/home/rice/spotify/default.nix b/home/rice/spotify/default.nix index 33a81d30..47aa2276 100644 --- a/home/rice/spotify/default.nix +++ b/home/rice/spotify/default.nix @@ -9,9 +9,9 @@ in { enable = true; - theme = spicePkgs.themes.catppuccin-mocha; + theme = spicePkgs.themes.catppuccin; - colorScheme = "pink"; + colorScheme = "mocha"; enabledExtensions = with spicePkgs.extensions; [ fullAppDisplay diff --git a/system/core/bootloader.nix b/system/core/bootloader.nix index a5f260df..cfe41c70 100644 --- a/system/core/bootloader.nix +++ b/system/core/bootloader.nix @@ -52,7 +52,10 @@ extraModprobeConfig = "options hid_apple fnmode=1"; bootspec.enable = true; - loader.systemd-boot.enable = true; + loader = { + systemd-boot.enable = true; + timeout = 0; + }; lanzaboote = { enable = false; pkiBundle = "/etc/secureboot"; diff --git a/system/core/network.nix b/system/core/network.nix index e2ac7895..c521b8f6 100644 --- a/system/core/network.nix +++ b/system/core/network.nix @@ -19,8 +19,8 @@ enable = true; # if your minecraft server is not worky # this is probably why - allowedTCPPorts = [2137 33703]; - allowedUDPPorts = [33703]; + allowedTCPPorts = [2137 33703 22000]; + allowedUDPPorts = [33703 22000]; allowPing = false; logReversePathDrops = true; }; diff --git a/system/core/users.nix b/system/core/users.nix index f08aecc3..2260923c 100644 --- a/system/core/users.nix +++ b/system/core/users.nix @@ -7,10 +7,10 @@ users = { mutableUsers = false; users = { - root.passwordFile = "/persist/secrets/root"; + root.hashedPasswordFile = "/persist/secrets/root"; sioodmy = { isNormalUser = true; - passwordFile = "/persist/secrets/sioodmy"; + hashedPasswordFile = "/persist/secrets/sioodmy"; extraGroups = [ "wheel" "gitea" diff --git a/system/wayland/services.nix b/system/wayland/services.nix index 95372fec..92e84040 100644 --- a/system/wayland/services.nix +++ b/system/wayland/services.nix @@ -1,4 +1,10 @@ -{pkgs, ...}: { +{ + config, + pkgs, + ... +}: let + inherit (builtins) getEnv; +in { systemd.services = { seatd = { enable = true;