aboutsummaryrefslogtreecommitdiffhomepage
path: root/nixos.nix
diff options
context:
space:
mode:
authorOphestra <cat@gensokyo.uk>2025-11-04 08:00:37 +0900
committerOphestra <cat@gensokyo.uk>2025-11-04 08:24:41 +0900
commitcb9ebf0e1541c0e49380cda6d4c2d619a0e9933f (patch)
tree8bd0bfe3714fd5975dcacb69c0a2afcd2e04c687 /nixos.nix
parent9a2a7b749f41f73c2c11e4a4557516307838457b (diff)
hst/grp_pwd: specify new uid format
This leaves slots available for additional uid ranges in Rosa OS. This breaks all existing installations! Users are required to fix ownership manually. Closes #18. Signed-off-by: Ophestra <cat@gensokyo.uk>
Diffstat (limited to 'nixos.nix')
-rw-r--r--nixos.nix7
1 files changed, 4 insertions, 3 deletions
diff --git a/nixos.nix b/nixos.nix
index b8759a9e..b23be279 100644
--- a/nixos.nix
+++ b/nixos.nix
@@ -20,9 +20,10 @@ let
cfg = config.environment.hakurei;
- getsubuid = fid: aid: 1000000 + fid * 10000 + aid;
- getsubname = fid: aid: "u${toString fid}_a${toString aid}";
- getsubhome = fid: aid: "${cfg.stateDir}/u${toString fid}/a${toString aid}";
+ # userid*userOffset + appStart + appid
+ getsubuid = userid: appid: userid * 100000 + 10000 + appid;
+ getsubname = userid: appid: "u${toString userid}_a${toString appid}";
+ getsubhome = userid: appid: "${cfg.stateDir}/u${toString userid}/a${toString appid}";
in
{