Wed 17 Jul 14:21:03 CEST 2024

This commit is contained in:
Thomas Avé 2024-07-17 14:21:03 +02:00
parent 9b7265babf
commit 40840635fe
3 changed files with 25 additions and 4 deletions

View File

@ -1,4 +1,4 @@
{ inputs, pkgs, ... }: { inputs, config, pkgs, ... }:
{ {
imports = [ inputs.ags.homeManagerModules.default ]; imports = [ inputs.ags.homeManagerModules.default ];
home.packages = [ home.packages = [
@ -14,4 +14,9 @@
accountsservice accountsservice
]; ];
}; };
# home.file."${config.xdg.configHome}/ags" = {
# source = config.lib.file.mkOutOfStoreSymlink ./files;
# recursive = true;
# };
} }

View File

@ -13,7 +13,8 @@ const batteryIndicator = Widget.Box({
Widget.Icon().hook(battery, self => { Widget.Icon().hook(battery, self => {
const thresholds = [...Array(11).keys()].map( i => i * 10); const thresholds = [...Array(11).keys()].map( i => i * 10);
const icon = thresholds.find(threshold => threshold >= battery.percent) const icon = thresholds.find(threshold => threshold >= battery.percent)
self.icon = battery.charging? `battery-level-${icon}-charging-symbolic` : `battery-level-${icon}-symbolic` const charging_name = battery.percent === 100 ? "charging" : "charged"
self.icon = battery.charging? `battery-level-${icon}-${charging_name}-symbolic` : `battery-level-${icon}-symbolic`
self.tooltip_text = `Battery ${battery.percent}%` self.tooltip_text = `Battery ${battery.percent}%`
self.class_name = "battery-item"; self.class_name = "battery-item";
}), }),

View File

@ -18,12 +18,27 @@
zramSwap.enable = true; zramSwap.enable = true;
services.logind.extraConfig = ''HandlePowerKey=ignore''; services.logind.extraConfig = ''HandlePowerKey=ignore'';
networking.wg-quick.interfaces = { networking.wg-quick.interfaces = {
wg0 = { Tunnel = {
address = [ "10.0.0.5/24" "2a02:a03f:83ad:2101::5/128" ]; address = [ "10.0.0.5/24" "2a02:a03f:83ad:2101::5/128" ];
privateKeyFile = "/home/user/.secrets/Wireguard/Aloria.key"; privateKeyFile = "/home/user/.secrets/Wireguard/Aloria.key";
listenPort = 51820; listenPort = 51820;
postUp = "resolvectl dns wg0 10.0.0.1; resolvectl domain wg0 ~thomasave.be;"; autostart = false;
postUp = "resolvectl dns Tunnel 10.0.0.1; resolvectl domain Tunnel ~thomasave.be;";
peers = [{
publicKey = "/9ppjm3yeD0duDvxrqgcHscHmftXko+0s2RbivNEy2c=";
allowedIPs = [ "0.0.0.0/0" "::/0" ];
endpoint = "h.thomasave.be:13231";
persistentKeepalive = 25;
}];
};
OPNsense = {
address = [ "10.0.0.5/24" "2a02:a03f:83ad:2101::5/128" ];
privateKeyFile = "/home/user/.secrets/Wireguard/Aloria.key";
listenPort = 51820;
autostart = true;
postUp = "resolvectl dns OPNsense 10.0.0.1; resolvectl domain OPNsense ~thomasave.be;";
peers = [{ peers = [{
publicKey = "/9ppjm3yeD0duDvxrqgcHscHmftXko+0s2RbivNEy2c="; publicKey = "/9ppjm3yeD0duDvxrqgcHscHmftXko+0s2RbivNEy2c=";
allowedIPs = [ "10.0.0.1/8" "192.168.1.2/32" ]; allowedIPs = [ "10.0.0.1/8" "192.168.1.2/32" ];