summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--hosts/laptop/cfg.nix9
-rw-r--r--hosts/vps/matrix.nix27
-rw-r--r--mixins/sway.nix34
-rw-r--r--profiles/user.nix10
4 files changed, 54 insertions, 26 deletions
diff --git a/hosts/laptop/cfg.nix b/hosts/laptop/cfg.nix
index e7042df..21a27fe 100644
--- a/hosts/laptop/cfg.nix
+++ b/hosts/laptop/cfg.nix
@@ -88,7 +88,14 @@
 
     networking.interfaces.wlp1s0.useDHCP = lib.mkDefault true;
     networking.networkmanager.enable = true;
-    environment.persistence."/nix/persist".directories = ["/etc/NetworkManager/system-connections"];
+    environment.persistence."/nix/persist".directories = [
+      "/etc/NetworkManager/system-connections"
+      {
+        directory = "/home/tzlil/.config/SchildiChat";
+        user = "tzlil";
+        group = "users";
+      }
+    ];
 
     nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
     powerManagement.cpuFreqGovernor = lib.mkDefault "powersave";
diff --git a/hosts/vps/matrix.nix b/hosts/vps/matrix.nix
index f47f149..335d304 100644
--- a/hosts/vps/matrix.nix
+++ b/hosts/vps/matrix.nix
@@ -27,11 +27,11 @@
     # networking.firewall.allowedTCPPorts = [80 443];
 
     age.secrets.matrix = {
-        file = ../../secrets/matrix.age;
-        mode = "600";
-        owner = "root";
-        group = "root";
-      };
+      file = ../../secrets/matrix.age;
+      mode = "600";
+      owner = "root";
+      group = "root";
+    };
 
     services.dendrite = let
       database_config = {
@@ -44,7 +44,6 @@
 
       loadCredential = ["private_key:${config.age.secrets.matrix.path}" "tlsCert:/var/lib/caddy/.local/share/caddy/certificates/acme-v02.api.letsencrypt.org-directory/tzlil.net/tzlil.net.crt" "tlsKey:/var/lib/caddy/.local/share/caddy/certificates/acme-v02.api.letsencrypt.org-directory/tzlil.net/tzlil.net.key"];
 
-
       # tlsCert = "$CREDENTIALS_DIRECTORY/tlsCert";
       # tlsKey = "$CREDENTIALS_DIRECTORY/tlsKey";
 
@@ -100,13 +99,14 @@
       };
     };
 
-    systemd.services.dendrite.serviceConfig.ExecStart = lib.mkForce (lib.strings.concatStringsSep " " ([
-          "${pkgs.dendrite}/bin/dendrite-monolith-server"
-          "--config /run/dendrite/dendrite.yaml"
-          "--http-bind-address :8008"
-          "--https-bind-address :8448"
-          "--tls-cert $CREDENTIALS_DIRECTORY/tlsCert"
-          "--tls-key $CREDENTIALS_DIRECTORY/tlsKey"]));
+    systemd.services.dendrite.serviceConfig.ExecStart = lib.mkForce (lib.strings.concatStringsSep " " [
+      "${pkgs.dendrite}/bin/dendrite-monolith-server"
+      "--config /run/dendrite/dendrite.yaml"
+      "--http-bind-address :8008"
+      "--https-bind-address :8448"
+      "--tls-cert $CREDENTIALS_DIRECTORY/tlsCert"
+      "--tls-key $CREDENTIALS_DIRECTORY/tlsKey"
+    ]);
 
     services.postgresql = {
       enable = true;
@@ -141,7 +141,6 @@
 
     systemd.services.dendrite.after = ["postgresql.service"];
 
-
     services.caddy = {
       # for federation
       virtualHosts."tzlil.net:8448".extraConfig = ''
diff --git a/mixins/sway.nix b/mixins/sway.nix
index d511984..09fc857 100644
--- a/mixins/sway.nix
+++ b/mixins/sway.nix
@@ -26,27 +26,49 @@ in {
     security.pam.services.swaylock = {};
     home-manager.users.tzlil = {
       xdg.configFile."i3status-rust/config.toml".text = ''
+        [icons]
         icons = "awesome6"
 
         [theme]
-        name = "native"
+        theme = "semi-native"
+        [theme.overrides]
+        separator = ""
 
         [[block]]
         block = "music"
-        on_click = "playerctl play-pause"
-        dynamic_width = true
+        [[block.click]]
+        action = "play_pause"
+        button = "left"
 
         [[block]]
-        block = "networkmanager"
+        block = "net"
+        format = " $icon {$ssid |}$ip "
+        [[block]]
+        block = "memory"
+        format = " $icon $mem_total_used_percents.eng(w:2) "
+
+        [[block]]
+        block = "cpu"
+
+        [[block]]
+        block = "load"
+
+        [[block]]
+        block = "battery"
+        interval = 10
+        #format = "$percentage $time"
 
         [[block]]
         block = "sound"
-        on_click = "${pkgs.pavucontrol}/bin/pavucontrol"
+        headphones_indicator=true
+        [[block.click]]
+        cmd = "${pkgs.pavucontrol}/bin/pavucontrol"
+        button = "left"
 
         [[block]]
         block = "time"
         interval = 60
-        format = "%a %Y-%m-%d %H:%M"
+        format = "$icon $timestamp.datetime(f:'%a %Y-%m-%d %H:%M')"
       '';
       services.mako.enable = true;
       home.packages = with pkgs; [
diff --git a/profiles/user.nix b/profiles/user.nix
index 6f1d573..858a36a 100644
--- a/profiles/user.nix
+++ b/profiles/user.nix
@@ -10,11 +10,11 @@
   ];
   config = {
     age.secrets.id_ed25519 = {
-        file = ../secrets/id_ed25519.age;
-        mode = "600";
-        owner = "tzlil";
-        group = "users";
-      };
+      file = ../secrets/id_ed25519.age;
+      mode = "600";
+      owner = "tzlil";
+      group = "users";
+    };
 
     programs.fish.enable = true; # needed now
     users.users.tzlil = {