summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTim Keller <tjkeller.xyz>2025-01-09 10:30:58 -0600
committerTim Keller <tjkeller.xyz>2025-01-09 10:30:58 -0600
commit7f7b84548461de85cb1e9b464c6bf8c69fa772a4 (patch)
treec73eb5f763dca405123e15838c0d6078d213dee9
parent5a5db9ba8dd772d748b56630a9c08ccdfaa6c8db (diff)
downloadnixos-7f7b84548461de85cb1e9b464c6bf8c69fa772a4.tar.xz
nixos-7f7b84548461de85cb1e9b464c6bf8c69fa772a4.zip
fix automount
-rw-r--r--derivations/st/default.nix47
-rw-r--r--modules/hosts/T495/configuration.nix1
-rw-r--r--modules/root/nas.nix2
3 files changed, 49 insertions, 1 deletions
diff --git a/derivations/st/default.nix b/derivations/st/default.nix
new file mode 100644
index 0000000..cf463ab
--- /dev/null
+++ b/derivations/st/default.nix
@@ -0,0 +1,47 @@
+{
+ lib,
+ stdenv,
+ fontconfig,
+ libX11,
+ libXext,
+ libXft,
+ ncurses,
+ pkg-config,
+}:
+
+stdenv.mkDerivation rec {
+ pname = "st";
+ version = "tj-0.9.2.0";
+
+ src = pkgs.fetchZip {
+ url = "https://git.tjkeller.xyz/${pname}/snapshot/${pname}-${version}.tar.xz";
+ sha256 = "sha256-xsUHdmicHX/fQQgojVjWfzI82e4NezkmlACOpdPxLE0=";
+ };
+
+ nativeBuildInputs = [
+ pkg-config
+ ];
+ buildInputs = [
+ fontconfig
+ libX11
+ libXext
+ libXft
+ ncurses
+ ];
+
+ installPhase = ''
+ runHook preInstall
+
+ TERMINFO=$out/share/terminfo make install PREFIX=$out
+
+ runHook postInstall
+ '';
+
+ meta = with lib; {
+ homepage = "https://git.tjkeller.xyz/st";
+ description = "My st with various patches";
+ mainProgram = "st";
+ license = licenses.mit;
+ maintainers = [ maintainers.tjkeller ];
+ };
+}
diff --git a/modules/hosts/T495/configuration.nix b/modules/hosts/T495/configuration.nix
index a3bad32..526b7bb 100644
--- a/modules/hosts/T495/configuration.nix
+++ b/modules/hosts/T495/configuration.nix
@@ -25,6 +25,7 @@
# Enable network drives
nas.enable = true;
nas.office.enable = true;
+ nas.office.automount = false;
networking.hosts = {
"192.168.77.3" = [ "devel" ];
diff --git a/modules/root/nas.nix b/modules/root/nas.nix
index 525456e..0116ba3 100644
--- a/modules/root/nas.nix
+++ b/modules/root/nas.nix
@@ -3,7 +3,7 @@ let
mkNetworkFileSystem = device: automount: {
device = "${device}";
fsType = "nfs";
- options = [ "defaults" ] ++ lib.optionals automount [ "noauto" ];
+ options = [ "defaults" ] ++ lib.optionals (!automount) [ "noauto" ];
};
in {
options = {