Skip to content

Commit

Permalink
feat: some cleanup, pypr and i forgor
Browse files Browse the repository at this point in the history
  • Loading branch information
sioodmy committed Oct 30, 2023
1 parent b692798 commit 1031d16
Show file tree
Hide file tree
Showing 15 changed files with 103 additions and 45 deletions.
6 changes: 3 additions & 3 deletions flake.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

25 changes: 0 additions & 25 deletions flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,6 @@
inputs = {
nixpkgs.follows = "nixpkgs";
rust-overlay.follows = "rust-overlay";
parts.follows = "flake-parts";
};
};
rust-overlay = {
Expand Down Expand Up @@ -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,
Expand Down
9 changes: 5 additions & 4 deletions home/misc/default.nix
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
{...}: {
imports = [
./media
./schizofox
./rnnoise
./swayidle
./media.nix
./schizofox.nix
./rnnoise.nix
./syncthing.nix
./swayidle.nix
];
}
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
5 changes: 5 additions & 0 deletions home/misc/syncthing.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{config, ...}: {
services.syncthing = {
enable = true;
};
}
61 changes: 57 additions & 4 deletions home/rice/hyprland/config.nix
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -57,13 +59,20 @@ in {

# foot terminal server
"${lib.optionalString config.programs.foot.server.enable ''run-as-service 'foot --server''}"

# scratchpads
"run-as-service pypr"
];

gestures = {
workspace_swipe = true;
workspace_swipe_forever = true;
};

xwayland = {
force_zero_scaling = true;
};

input = {
# keyboard layout
kb_layout = "pl";
Expand Down Expand Up @@ -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"
Expand Down Expand Up @@ -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)$"

Expand All @@ -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
Expand Down Expand Up @@ -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"
}
}
}
'';
}
17 changes: 16 additions & 1 deletion home/rice/hyprland/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -45,14 +45,29 @@ 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 = {
enable = true;
package = inputs.hyprland.packages.${pkgs.system}.default.override {
enableNvidiaPatches = true;
};
systemdIntegration = true;
systemd.enable = true;
};

services = {
Expand Down
4 changes: 2 additions & 2 deletions home/rice/spotify/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
5 changes: 4 additions & 1 deletion system/core/bootloader.nix
Original file line number Diff line number Diff line change
Expand Up @@ -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";
Expand Down
4 changes: 2 additions & 2 deletions system/core/network.nix
Original file line number Diff line number Diff line change
Expand Up @@ -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;
};
Expand Down
4 changes: 2 additions & 2 deletions system/core/users.nix
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
8 changes: 7 additions & 1 deletion system/wayland/services.nix
Original file line number Diff line number Diff line change
@@ -1,4 +1,10 @@
{pkgs, ...}: {
{
config,
pkgs,
...
}: let
inherit (builtins) getEnv;
in {
systemd.services = {
seatd = {
enable = true;
Expand Down

0 comments on commit 1031d16

Please sign in to comment.