fix fuse permissions

This commit is contained in:
zuckerberg 2021-09-25 21:54:40 -04:00
parent 1d08d80c60
commit d3909251ca
2 changed files with 5 additions and 0 deletions

View File

@ -55,7 +55,9 @@ in {
group = cfg.group; group = cfg.group;
home = cfg.dataDir; home = cfg.dataDir;
createHome = true; createHome = true;
extraGroups = ["fuse"];
}; };
users.groups."fuse" = {};
users.groups.${cfg.group} = {}; users.groups.${cfg.group} = {};
systemd.services.radio = { systemd.services.radio = {
enable = true; enable = true;
@ -68,6 +70,7 @@ in {
preStart = '' preStart = ''
mkdir -p ${cfg.dataDir} mkdir -p ${cfg.dataDir}
chown ${cfg.user} ${cfg.dataDir} chown ${cfg.user} ${cfg.dataDir}
chown root:fuse /dev/fuse
''; '';
}; };
}; };

View File

@ -154,6 +154,8 @@ in {
options.inputs = lib.mkOption { default = config.inputs; }; options.inputs = lib.mkOption { default = config.inputs; };
options.currentSystem = lib.mkOption { default = config.currentSystem; }; options.currentSystem = lib.mkOption { default = config.currentSystem; };
programs.fuse.userAllowOther = true;
config = { config = {
pia.enable = true; pia.enable = true;
nixpkgs.pkgs = pkgs; nixpkgs.pkgs = pkgs;