From 0efee8cfe086641173f9da5ed5657de0d090b340 Mon Sep 17 00:00:00 2001 From: Andre Date: Wed, 18 Sep 2024 10:15:06 -0400 Subject: [PATCH] Apps: add Element; RAID: Fix keyfile syntax --- flake.lock | 6 +++--- modules/apps/social.nix | 5 ++++- modules/system/raid.nix | 10 +++++----- 3 files changed, 12 insertions(+), 9 deletions(-) diff --git a/flake.lock b/flake.lock index 70f165f..a7c81d6 100644 --- a/flake.lock +++ b/flake.lock @@ -233,11 +233,11 @@ }, "nixos-hardware": { "locked": { - "lastModified": 1726489388, - "narHash": "sha256-JBHtN+n1HzKawpnOQAz6jdgvrtYV9c/kyzgoIdguQGo=", + "lastModified": 1726650330, + "narHash": "sha256-UbHzmaOQ18O/kCizipU70N0UQVFIfv8AiFKXw07oZ9Y=", "owner": "NixOS", "repo": "nixos-hardware", - "rev": "dc8b0296f68f72f3fe77469c549a6f098555c2e9", + "rev": "abb448608a56a60075468e90d8acec2a7cb689b1", "type": "github" }, "original": { diff --git a/modules/apps/social.nix b/modules/apps/social.nix index 802af05..b4c1767 100644 --- a/modules/apps/social.nix +++ b/modules/apps/social.nix @@ -18,7 +18,10 @@ in allowUnfree = true; ui.flatpak = { enable = true; - packages = [ "com.discordapp.Discord" ]; + packages = [ + "com.discordapp.Discord" + "im.riot.Riot" # Element + ]; }; }; diff --git a/modules/system/raid.nix b/modules/system/raid.nix index 6cef64f..bdd95f5 100644 --- a/modules/system/raid.nix +++ b/modules/system/raid.nix @@ -17,9 +17,9 @@ in }; keyFile = lib.mkOption { default = ""; - type = lib.types.path; + type = lib.types.str; description = "Path to the key file to use to auto-unlock the array."; - example = /home/user/storage.key; + example = "/home/user/storage.key"; }; }; }; @@ -35,9 +35,9 @@ in ''; # Auto-unlock RAID array with a key file - environment.etc."crypttab".text = lib.mkIf (cfg.storage.keyFile != "") '' - storage /dev/md/Sapana ${toString cfg.storage.keyFile} nofail,keyfile-timeout=5s - ''; + environment.etc."crypttab" = lib.mkIf (cfg.storage.keyFile != "") { + text = "storage /dev/md/Sapana ${cfg.storage.keyFile} nofail,keyfile-timeout=5s"; + }; fileSystems."/storage" = { device = "/dev/mapper/storage"; # Keep booting even if the array fails to unlock