summaryrefslogtreecommitdiff
path: root/nix/modules
diff options
context:
space:
mode:
Diffstat (limited to 'nix/modules')
-rw-r--r--nix/modules/conduit.nix2
-rw-r--r--nix/modules/configuration.nix2
-rw-r--r--nix/modules/home/git.nix5
-rw-r--r--nix/modules/home/user.nix39
-rw-r--r--nix/modules/home/zsh.nix3
-rw-r--r--nix/modules/maddy.nix2
-rw-r--r--nix/modules/vars.nix7
-rw-r--r--nix/modules/znc.nix2
8 files changed, 56 insertions, 6 deletions
diff --git a/nix/modules/conduit.nix b/nix/modules/conduit.nix
index ce2c23e..e47c7a2 100644
--- a/nix/modules/conduit.nix
+++ b/nix/modules/conduit.nix
@@ -10,7 +10,7 @@
];
address = "0.0.0.0";
port = 6167;
- allow_registration = true;
+ allow_registration = false;
};
};
}
diff --git a/nix/modules/configuration.nix b/nix/modules/configuration.nix
index 7234333..27002ff 100644
--- a/nix/modules/configuration.nix
+++ b/nix/modules/configuration.nix
@@ -284,7 +284,7 @@
xdg.portal = {
enable = (! config.monorepo.profiles.ttyonly.enable);
- wlr.enable = true;
+ wlr.enable = (! config.monorepo.profiles.ttyonly.enable);
extraPortals = with pkgs; if (! config.monorepo.profiles.ttyonly.enable) then [
xdg-desktop-portal-gtk
xdg-desktop-portal
diff --git a/nix/modules/home/git.nix b/nix/modules/home/git.nix
index 9c15aac..0e6e66c 100644
--- a/nix/modules/home/git.nix
+++ b/nix/modules/home/git.nix
@@ -14,10 +14,13 @@
};
aliases = {
+ pl = "pull";
+ ps = "push";
co = "checkout";
c = "commit";
a = "add";
- s = "switch";
+ st = "status";
+ sw = "switch";
b = "branch";
};
};
diff --git a/nix/modules/home/user.nix b/nix/modules/home/user.nix
index d0cad9a..24b61da 100644
--- a/nix/modules/home/user.nix
+++ b/nix/modules/home/user.nix
@@ -29,6 +29,7 @@
mupdf
zathura
+ fzf
# passwords
age sops
@@ -64,6 +65,44 @@
pfetch
libnotify
htop
+
+ (pkgs.writeShellScriptBin "help"
+ ''
+#!/usr/bin/env sh
+# Portable, colored, nicely aligned alias list
+
+# Generate uncolored alias pairs
+aliases=$(cat <<'EOF'
+${let aliases = config.programs.zsh.shellAliases;
+ in lib.concatStringsSep "\n" (lib.mapAttrsToList (name: value:
+ "${name} -> ${value}"
+ ) aliases)}
+EOF
+ )
+
+# Align and color using awk
+echo "$aliases" | awk '
+BEGIN {
+ GREEN="\033[0;32m";
+ YELLOW="\033[0;33m";
+ RESET="\033[0m";
+ maxlen=0;
+ }
+{
+ # Split line on " -> "
+ split($0, parts, / -> /);
+ name[NR]=parts[1];
+ cmd[NR]=parts[2];
+ if(length(parts[1])>maxlen) maxlen=length(parts[1]);
+}
+END {
+ for(i=1;i<=NR;i++) {
+ # printf with fixed width for alias name
+ printf "%s%-*s%s -> %s%s%s\n", GREEN, maxlen, name[i], RESET, YELLOW, cmd[i], RESET;
+ }
+}'
+'')
+
(writeShellScriptBin "remote-build"
''
#!/bin/bash
diff --git a/nix/modules/home/zsh.nix b/nix/modules/home/zsh.nix
index e12a2d8..cb4f1b0 100644
--- a/nix/modules/home/zsh.nix
+++ b/nix/modules/home/zsh.nix
@@ -21,6 +21,9 @@
};
shellAliases = {
+ se = "sops edit";
+ f = "vim $(fzf)";
+ e = "cd $(find . -type d -print | fzf)";
c = "clear";
g = "git";
v = "vim";
diff --git a/nix/modules/maddy.nix b/nix/modules/maddy.nix
index 158b6b5..f97ba05 100644
--- a/nix/modules/maddy.nix
+++ b/nix/modules/maddy.nix
@@ -3,7 +3,7 @@
services.maddy = {
enable = lib.mkDefault config.monorepo.profiles.server.enable;
openFirewall = true;
- primaryDomain = "ret2pop.net";
+ primaryDomain = "${config.monorepo.vars.remoteHost}";
tls = {
loader = "acme";
};
diff --git a/nix/modules/vars.nix b/nix/modules/vars.nix
index 4b7c894..de9736e 100644
--- a/nix/modules/vars.nix
+++ b/nix/modules/vars.nix
@@ -8,6 +8,13 @@
description = "device that NixOS is installed to";
};
+ fileSystem = lib.mkOption {
+ type = lib.types.str;
+ default = "ext4";
+ example = "btrfs";
+ description = "filesystem to install with disko";
+ };
+
diskoSpec = lib.mkOption {
type = lib.types.attrs;
description = "retains a copy of the disko spec for reflection";
diff --git a/nix/modules/znc.nix b/nix/modules/znc.nix
index d32d564..c2e2079 100644
--- a/nix/modules/znc.nix
+++ b/nix/modules/znc.nix
@@ -10,8 +10,6 @@
Method = sha256
Hash = d4abdd69aa24de69693885c5bd83a4a0e9ee989e1a69a905041b0dad9abc06ea
Salt = sDY,?H5AxC-!gH3a.:)D
- Hash = ${config.sops.secrets.znc_password_hash}
- Salt = ${config.sops.secrets.znc_password_salt}
</Pass>
'';
modules = [