Compare commits

...

2 commits

Author SHA1 Message Date
0bbd6d47e3 feat(hyprland): replace gtklock with swaylock 2023-12-06 15:04:52 -05:00
f4b2a970b1 feat(oksys): finish pihole config 2023-12-06 13:59:14 -05:00
12 changed files with 105 additions and 61 deletions

View file

@ -4,7 +4,7 @@
services.pihole = { services.pihole = {
enable = true; enable = true;
dnsPort = 5353; dnsPort = 53;
webPort = 8080; webPort = 8080;
piholeConfig = { piholeConfig = {
@ -22,6 +22,13 @@
password = "password"; password = "password";
}; };
# Declaratively set the DNS settings
# in Settings -> DNS -> Interface settings
dnsmasq.extraConfig = ''
interface=tailscale0
except-interface=nonexisting
'';
# Handle it with unbound # Handle it with unbound
dns.upstreamServers = [ dns.upstreamServers = [
"127.0.0.1#5335" "127.0.0.1#5335"

View file

@ -282,8 +282,7 @@ const SecondRow = () => Row({
GridButton({ GridButton({
command: () => { command: () => {
execAsync(['bash', '-c', '$LOCK_PATH/lock.sh']) execAsync(['lock']).catch(print);
.catch(print);
}, },
secondaryCommand: () => App.openWindow('powermenu'), secondaryCommand: () => App.openWindow('powermenu'),
icon: 'system-lock-screen-symbolic', icon: 'system-lock-screen-symbolic',

View file

@ -1,5 +0,0 @@
#!/usr/bin/env bash
grim -t jpeg /tmp/image.jpeg
convert /tmp/image.jpeg -blur 0x8 /tmp/image.jpeg

View file

@ -1,4 +0,0 @@
#!/usr/bin/env bash
ags -r 'Tablet.setLaptopMode()'
$LOCK_PATH/blur.sh
gtklock

View file

@ -1,17 +0,0 @@
@define-color accent rgba(189, 147, 249, 0.8);
@define-color background rgb(40, 42, 54);
window {
background-image: url("/tmp/image.jpeg");
background-size: cover;
background-repeat: no-repeat;
background-position: center;
background-color: rgba(0, 0, 0, 0);
}
#window-box {
padding: 64px;
border: 2px solid @accent;
border-radius: 30px;
background-color: @background;
}

View file

@ -22,7 +22,7 @@ exec-once = ags
exec-once = sleep 3; ags -t applauncher exec-once = sleep 3; ags -t applauncher
## Change HandleLidSwitch to lock in logind.conf ## Change HandleLidSwitch to lock in logind.conf
exec-once = swayidle -w lock $LOCK_PATH/lock.sh exec-once = swayidle -w lock lock
## Special window apps ## Special window apps
exec-once = [workspace special:thunder silent] thunderbird exec-once = [workspace special:thunder silent] thunderbird
@ -55,7 +55,6 @@ binde =, XF86MonBrightnessDown, exec, ags -r 'Brightness.screen -= 0.05'
bindr = CAPS, Caps_Lock, exec, ags -r 'Brightness.fetchCapsState()' bindr = CAPS, Caps_Lock, exec, ags -r 'Brightness.fetchCapsState()'
## Ags & co ## Ags & co
bind = $mainMod , L , exec, $LOCK_PATH/lock.sh
bindn = , Escape, exec, ags run-js 'closeAll()' bindn = , Escape, exec, ags run-js 'closeAll()'
bind = $mainMod SHIFT, E , exec, ags -t powermenu bind = $mainMod SHIFT, E , exec, ags -t powermenu
bind = $mainMod , D , exec, ags -t applauncher bind = $mainMod , D , exec, ags -t applauncher

View file

@ -1,8 +1,4 @@
{ {config, ...}: let
config,
pkgs,
...
}: let
configDir = config.vars.configDir; configDir = config.vars.configDir;
symlink = config.lib.file.mkOutOfStoreSymlink; symlink = config.lib.file.mkOutOfStoreSymlink;
in { in {
@ -11,21 +7,11 @@ in {
env = [ env = [
"AGS_PATH, ${configDir}/ags/bin" "AGS_PATH, ${configDir}/ags/bin"
"HYPR_PATH, ${configDir}/hypr/scripts" "HYPR_PATH, ${configDir}/hypr/scripts"
"LOCK_PATH, ${configDir}/gtklock/scripts"
]; ];
}; };
}; };
xdg.configFile = { xdg.configFile = {
"gtklock/config.ini".text = ''
[main]
modules=${builtins.concatStringsSep ";" [
"${pkgs.gtklock-powerbar-module}/lib/gtklock/powerbar-module.so"
"${pkgs.gtklock-playerctl-module}/lib/gtklock/playerctl-module.so"
]}
'';
"gtklock/style.css".source = symlink "${configDir}/gtklock/style.css";
"dolphinrc".source = symlink "${configDir}/dolphinrc"; "dolphinrc".source = symlink "${configDir}/dolphinrc";
"kdeglobals".source = symlink "${configDir}/kdeglobals"; "kdeglobals".source = symlink "${configDir}/kdeglobals";
"kiorc".source = symlink "${configDir}/kiorc"; "kiorc".source = symlink "${configDir}/kiorc";

View file

@ -23,8 +23,6 @@ in {
''; '';
security.pam.services = { security.pam.services = {
gtklock = {};
# all the changes in /etc/pam.d/* # all the changes in /etc/pam.d/*
sddm.text = lib.mkBefore '' sddm.text = lib.mkBefore ''
auth [success=1 new_authtok_reqd=1 default=ignore] pam_unix.so try_first_pass likeauth nullok auth [success=1 new_authtok_reqd=1 default=ignore] pam_unix.so try_first_pass likeauth nullok

View file

@ -358,11 +358,11 @@
"xdph": "xdph" "xdph": "xdph"
}, },
"locked": { "locked": {
"lastModified": 1701819597, "lastModified": 1701881246,
"narHash": "sha256-X0K2v/SOMQj18/O9daDlizlnlGRDMWuuGoU3jm06b7k=", "narHash": "sha256-p7el5oQZPy9l1zyIrlHu6nA4BAu59eLoSqBjhkw2jaw=",
"owner": "hyprwm", "owner": "hyprwm",
"repo": "Hyprland", "repo": "Hyprland",
"rev": "8bd86cf37e245088433156796f1bc72542ca09ad", "rev": "d74607e414dcd16911089a6d4b6aeb661c880923",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -568,11 +568,11 @@
"nixpkgs": "nixpkgs_3" "nixpkgs": "nixpkgs_3"
}, },
"locked": { "locked": {
"lastModified": 1701216885, "lastModified": 1701883891,
"narHash": "sha256-O3eB154BtGwYv2uQPCrekK0zEyx8KI6vvMLsQyzWct4=", "narHash": "sha256-Qc+jSg3PbeCsnf0yPw/9GU+ZcqXcX3C+V/jbfPDm1FQ=",
"owner": "nix-community", "owner": "nix-community",
"repo": "nix-melt", "repo": "nix-melt",
"rev": "4ca0f9248bed9f9f85a89adf684ae487e8494967", "rev": "09ee04cd3737207797d1ff184b4ea2a91b1f22e2",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -765,11 +765,11 @@
}, },
"nur": { "nur": {
"locked": { "locked": {
"lastModified": 1701842485, "lastModified": 1701887101,
"narHash": "sha256-XiLWxtXbDCzI0NPXIl6pQr5WdXkxS/485D7uWbcwxDc=", "narHash": "sha256-noDEwz+/eMQ3wdVML9XJOu9MiN40IoDDMOvsqSi83Pk=",
"owner": "nix-community", "owner": "nix-community",
"repo": "NUR", "repo": "NUR",
"rev": "e61ecd3426fdbeeecdc137da715343ae9ca33868", "rev": "d2163cf91fb3fd644539aeddd9ca8af12ac97e70",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -803,11 +803,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1701843242, "lastModified": 1701888235,
"narHash": "sha256-nMNWFfjC2y2ZRIPXHMZ/9tGuMAOi2/9tO1MsG6tLCxI=", "narHash": "sha256-zb4HZYYcvrdRmlHbhks0hU3epV6ekT8IIG82JDrRIpw=",
"owner": "matt1432", "owner": "matt1432",
"repo": "pihole-flake", "repo": "pihole-flake",
"rev": "e870c2dd653bd5c839a90229af7ea67327cf1e17", "rev": "a3bc199be4a9b5a2de8808adeb1032e90581f02b",
"type": "github" "type": "github"
}, },
"original": { "original": {

View file

@ -30,6 +30,11 @@
nixosConfigurations = { nixosConfigurations = {
wim = mkNixOS [./devices/wim]; wim = mkNixOS [./devices/wim];
binto = mkNixOS [./devices/binto]; binto = mkNixOS [./devices/binto];
oksys = mkNixOS [
./devices/oksys
secrets.nixosModules.oksys
];
}; };
formatter = perSystem (_: pkgs: pkgs.alejandra); formatter = perSystem (_: pkgs: pkgs.alejandra);

73
home/swaylock.nix Normal file
View file

@ -0,0 +1,73 @@
{
pkgs,
...
}: {
home.packages = [
(pkgs.writeShellScriptBin "lock" ''
ags -r 'Tablet.setLaptopMode()'
swaylock
'')
];
programs.swaylock = {
enable = true;
package = pkgs.swaylock-effects;
settings = {
font = "Ubuntu";
clock = true;
timestr = "%R";
datestr = "%a, %e of %B";
screenshots = true;
# FIXME: doesn't work
submit-on-touch = true;
# Very delayed for some reason
#fade-in = 0.1;
effect-blur = "20x2";
#effect-greyscale = true;
#effect-scale = 0.3;
indicator = true;
indicator-radius = 240;
indicator-thickness = 20;
indicator-caps-lock = true;
key-hl-color = "880033";
separator-color = "00000000";
inside-color = "00000099";
inside-clear-color = "ffd20400";
inside-caps-lock-color = "009ddc00";
inside-ver-color = "d9d8d800";
inside-wrong-color = "ee2e2400";
ring-color = "231f20D9";
ring-clear-color = "231f20D9";
ring-caps-lock-color = "231f20D9";
ring-ver-color = "231f20D9";
ring-wrong-color = "231f20D9";
line-color = "00000000";
line-clear-color = "ffd204FF";
line-caps-lock-color = "009ddcFF";
line-ver-color = "d9d8d8FF";
line-wrong-color = "ee2e24FF";
text-color = "CBA6F7FF";
text-clear-color = "ffd20400";
text-ver-color = "d9d8d800";
text-wrong-color = "ee2e2400";
bs-hl-color = "ee2e24FF";
caps-lock-key-hl-color = "ffd204FF";
caps-lock-bs-hl-color = "ee2e24FF";
disable-caps-lock-text = true;
text-caps-lock-color = "009ddc";
};
};
}

View file

@ -19,6 +19,8 @@ in {
../dolphin.nix ../dolphin.nix
]; ];
security.pam.services.swaylock = {};
programs = { programs = {
kdeconnect.enable = true; kdeconnect.enable = true;
dconf.enable = true; dconf.enable = true;
@ -44,6 +46,7 @@ in {
../../home/alacritty.nix ../../home/alacritty.nix
../../home/dconf.nix ../../home/dconf.nix
../../home/obs.nix ../../home/obs.nix
../../home/swaylock.nix
../../home/theme.nix ../../home/theme.nix
../../home/wofi ../../home/wofi
]; ];
@ -135,6 +138,7 @@ in {
bind = [ bind = [
# Defaults # Defaults
"$mainMod, L, exec, lock"
"$mainMod, Q, exec, alacritty" "$mainMod, Q, exec, alacritty"
"$mainMod, F, fullscreen" "$mainMod, F, fullscreen"
"$mainMod, C, killactive, " "$mainMod, C, killactive, "
@ -245,7 +249,6 @@ in {
gnome.seahorse gnome.seahorse
p7zip # for reshade p7zip # for reshade
gtklock # FIXME: find replacement
swww swww
## libs ## libs