about summary refs log tree commit diff
path: root/irc.nix
diff options
context:
space:
mode:
authorNguyễn Gia Phong <cnx@loang.net>2024-01-12 02:43:49 +0900
committerNguyễn Gia Phong <cnx@loang.net>2024-01-12 02:43:49 +0900
commita24e8ace06b1f2ec2240dccb21140c8742c70675 (patch)
tree461909976c31ba86aaf0a2c6b23dee5500c9af4e /irc.nix
parente804d8ca42c6f31d485689eb3af6ea7fe9c5851d (diff)
downloadnixos-conf-a24e8ace06b1f2ec2240dccb21140c8742c70675.tar.gz
Use more suitable trivial text builders
Diffstat (limited to 'irc.nix')
-rw-r--r--irc.nix12
1 files changed, 4 insertions, 8 deletions
diff --git a/irc.nix b/irc.nix
index 9f69ec3..04239bc 100644
--- a/irc.nix
+++ b/irc.nix
@@ -21,11 +21,9 @@ let
   inherit (config.networking) domain;
   cert = config.security.acme.certs.${domain};
 in {
-  environment.systemPackages = [ (pkgs.writeTextFile rec {
-    name = "sojupw";
-    text = let htpasswd = "${pkgs.apacheHttpd}/bin/htpasswd";
-    in ''
-      #!/bin/sh
+  environment.systemPackages = let
+    htpasswd = "${pkgs.apacheHttpd}/bin/htpasswd";
+    sojupw = pkgs.writeShellScriptBin "sojupw" ''
       set -e
       printf 'soju password: '
       read -rs password
@@ -46,9 +44,7 @@ in {
         exit 1
       fi
     '';
-    executable = true;
-    destination = "/bin/${name}";
-  }) ];
+  in [ sojupw ];
 
   networking.firewall.allowedTCPPorts = [ 6697 ];