again try

This commit is contained in:
RingOfStorms (Joshua Bell) 2025-12-14 15:07:20 -06:00
parent e95c4211f2
commit eb0c38f508
6 changed files with 149 additions and 94 deletions

View file

@ -42,14 +42,14 @@
ringofstorms-nvim.includeAllRuntimeDependencies = true;
})
inputs.de_plasma.nixosModules.default
({
ringofstorms.dePlasma = {
enable = true;
gpu.intel.enable = true;
sddm.autologinUser = "luser";
};
})
# inputs.de_plasma.nixosModules.default
# ({
# ringofstorms.dePlasma = {
# enable = true;
# gpu.intel.enable = true;
# sddm.autologinUser = "luser";
# };
# })
inputs.common.nixosModules.essentials
inputs.common.nixosModules.git

View file

@ -6,7 +6,31 @@ let
USB_KEY = "/dev/disk/by-uuid/9985-EBD1";
escape = lib.mkDefault lib.escapeSystemdPath;
inherit (lib)
hasPrefix
removePrefix
removeSuffix
replaceStrings
stringToCharacters
;
inherit (lib.strings) normalizePath escapeC;
# FROM https://github.com/NixOS/nixpkgs/blob/5384341652dc01f8b01a3d227ae29e2dfbe630ba/nixos/lib/utils.nix#L101C1-L120C9
escapeSystemdPath =
s:
let
replacePrefix =
p: r: s:
(if (hasPrefix p s) then r + (removePrefix p s) else s);
trim = s: removeSuffix "/" (removePrefix "/" s);
normalizedPath = normalizePath s;
in
replaceStrings [ "/" ] [ "-" ] (
replacePrefix "." (escapeC [ "." ] ".") (
escapeC (stringToCharacters " !\"#$%&'()*+,;<=>=@[\\]^`{|}~-") (
if normalizedPath == "/" then normalizedPath else trim normalizedPath
)
)
);
in
{
# BOOT
@ -91,12 +115,12 @@ in
# 1. Disable the automatically generated unlock services
boot.initrd.systemd.services = {
# the module creates services named unlock-bcachefs-<escaped-mountpoint>
"unlock-bcachefs-${escape "/"}".enable = false;
"unlock-bcachefs-${escape "/.old_roots"}".enable = false;
"unlock-bcachefs-${escape "/nix"}".enable = false;
"unlock-bcachefs-${escape "/.snapshots"}".enable = false;
"unlock-bcachefs-${escape "/.swap"}".enable = false;
"unlock-bcachefs-${escape "/persist"}".enable = false;
"unlock-bcachefs-${escapeSystemdPath "/"}".enable = false;
"unlock-bcachefs-${escapeSystemdPath "/.old_roots"}".enable = false;
"unlock-bcachefs-${escapeSystemdPath "/nix"}".enable = false;
"unlock-bcachefs-${escapeSystemdPath "/.snapshots"}".enable = false;
"unlock-bcachefs-${escapeSystemdPath "/.swap"}".enable = false;
"unlock-bcachefs-${escapeSystemdPath "/persist"}".enable = false;
# 2. Your single custom unlock unit
unlock-bcachefs-custom = {
@ -120,7 +144,7 @@ in
# cat /key/bcachefs.key | ${pkgs.bcachefs-tools}/bin/bcachefs unlock ${PRIMARY}'
# '';
# We inline a script that roughly mimics tryUnlock + openCommand behavior,
# We inline a script that roughly mimics tryUnlock + openCommand behavior,
# but uses a key file from the USB stick instead of systemd-ask-password.
ExecStart = ''
/bin/sh -eu

36
hosts/lio/flake.lock generated
View file

@ -123,11 +123,11 @@
},
"locked": {
"dir": "flakes/de_plasma",
"lastModified": 1765400596,
"narHash": "sha256-QNLyhnZiQLzCjR3GlkQ4vb1IHQrn4JR4F1zhgV2oIc4=",
"lastModified": 1765571070,
"narHash": "sha256-IG0P76zKSxqjaAltEI3obMwsyurr2FQcwnEboyWc2l0=",
"ref": "refs/heads/master",
"rev": "bccce1dfad455c991093eafb3b0cc556bcdc88fd",
"revCount": 870,
"rev": "e4d26ecb0ca1e982ff7b35a9c57b16dafd7c5e90",
"revCount": 877,
"type": "git",
"url": "https://git.joshuabell.xyz/ringofstorms/dotfiles"
},
@ -321,11 +321,11 @@
},
"nixpkgs_4": {
"locked": {
"lastModified": 1765270179,
"narHash": "sha256-g2a4MhRKu4ymR4xwo+I+auTknXt/+j37Lnf0Mvfl1rE=",
"lastModified": 1765425892,
"narHash": "sha256-jlQpSkg2sK6IJVzTQBDyRxQZgKADC2HKMRfGCSgNMHo=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "677fbe97984e7af3175b6c121f3c39ee5c8d62c9",
"rev": "5d6bdbddb4695a62f0d00a3620b37a15275a5093",
"type": "github"
},
"original": {
@ -1236,11 +1236,11 @@
},
"locked": {
"dir": "flakes/opencode",
"lastModified": 1765400058,
"narHash": "sha256-NRCitp8qptDB6zhM2gGzUp2kbwkKp64OIIEtXpf9G4s=",
"lastModified": 1765640448,
"narHash": "sha256-2UxMcYonJvL//sioMphxXXgXbJNdWZ9oYK3e6CTw4d0=",
"ref": "refs/heads/master",
"rev": "191503db73da572989554b268e3d54ef7e07bce2",
"revCount": 869,
"rev": "daa1188f381f6fa893e41e1b3be892d8387f19ca",
"revCount": 883,
"type": "git",
"url": "https://git.joshuabell.xyz/ringofstorms/dotfiles"
},
@ -1255,11 +1255,11 @@
"nixpkgs": "nixpkgs_4"
},
"locked": {
"lastModified": 1765399732,
"narHash": "sha256-cYLaGukNd9MpJ9tR4Gg/6r2YwySDKB43bTzsYzvDkhM=",
"lastModified": 1765627459,
"narHash": "sha256-6dzzRiN/vwr5sKvEooIWbG3IqcDYG4uL0nvuZKmyr7M=",
"owner": "sst",
"repo": "opencode",
"rev": "6288a032fd5c0ea7085e2f31071212147fed1cfe",
"rev": "d8663a44c285a9165b9aa28061e24ba1fad02d66",
"type": "github"
},
"original": {
@ -1383,11 +1383,11 @@
"rust-overlay": "rust-overlay"
},
"locked": {
"lastModified": 1764777428,
"narHash": "sha256-wFfPnXo1P+NwSK+Y7xYVwt0mbYhe9uBrf80T5KpBV5Q=",
"lastModified": 1765641080,
"narHash": "sha256-AyPi7rZVfjTjQrhPHP+ugpVY8tcUzF3Lw1RjACuxAms=",
"ref": "refs/heads/master",
"rev": "ee642c429fced7d51c5f9c9694034f6222a1186f",
"revCount": 324,
"rev": "224ad4e3ecd9421c7469c4f06ff5faf7f6e8bedb",
"revCount": 325,
"type": "git",
"url": "https://git.joshuabell.xyz/ringofstorms/nvim"
},