54 lines
1.1 KiB
Nix
54 lines
1.1 KiB
Nix
|
|
{
|
||
|
|
config,
|
||
|
|
lib,
|
||
|
|
pkgs,
|
||
|
|
...
|
||
|
|
}:
|
||
|
|
|
||
|
|
{
|
||
|
|
imports = [ ];
|
||
|
|
|
||
|
|
options.me = {
|
||
|
|
moonlight.enable = lib.mkOption {
|
||
|
|
type = lib.types.bool;
|
||
|
|
default = false;
|
||
|
|
example = true;
|
||
|
|
description = "Whether we want to install moonlight.";
|
||
|
|
};
|
||
|
|
};
|
||
|
|
|
||
|
|
config = lib.mkIf (config.me.moonlight.enable && config.me.graphical) {
|
||
|
|
environment.systemPackages = with pkgs; [
|
||
|
|
moonlight-qt
|
||
|
|
];
|
||
|
|
|
||
|
|
environment.persistence."/persist" = lib.mkIf (config.me.mountPersistence) {
|
||
|
|
hideMounts = true;
|
||
|
|
users.talexander = {
|
||
|
|
directories = [
|
||
|
|
{
|
||
|
|
directory = ".config/Moonlight Game Streaming Project";
|
||
|
|
user = "talexander";
|
||
|
|
group = "talexander";
|
||
|
|
mode = "0755";
|
||
|
|
}
|
||
|
|
];
|
||
|
|
};
|
||
|
|
};
|
||
|
|
|
||
|
|
environment.persistence."/state" = lib.mkIf (config.me.mountPersistence) {
|
||
|
|
hideMounts = true;
|
||
|
|
users.talexander = {
|
||
|
|
directories = [
|
||
|
|
{
|
||
|
|
directory = ".cache/Moonlight Game Streaming Project";
|
||
|
|
user = "talexander";
|
||
|
|
group = "talexander";
|
||
|
|
mode = "0755";
|
||
|
|
}
|
||
|
|
];
|
||
|
|
};
|
||
|
|
};
|
||
|
|
};
|
||
|
|
}
|