50 lines
1.0 KiB
Nix
50 lines
1.0 KiB
Nix
{
|
|
config,
|
|
lib,
|
|
pkgs,
|
|
...
|
|
}:
|
|
|
|
{
|
|
imports = [ ];
|
|
|
|
options.me = {
|
|
spaghettikart.enable = lib.mkOption {
|
|
type = lib.types.bool;
|
|
default = false;
|
|
example = true;
|
|
description = "Whether we want to install spaghettikart.";
|
|
};
|
|
};
|
|
|
|
config = lib.mkIf config.me.spaghettikart.enable (
|
|
lib.mkMerge [
|
|
{
|
|
allowedUnfree = [ "spaghettikart" ];
|
|
}
|
|
(lib.mkIf config.me.graphical {
|
|
environment.systemPackages = with pkgs; [
|
|
spaghettikart
|
|
];
|
|
|
|
me.install.user.talexander.file = {
|
|
".local/share/spaghettikart/spaghettify.cfg.json" = {
|
|
source = ./files/spaghettify.cfg.json;
|
|
method = "overwrite";
|
|
};
|
|
};
|
|
|
|
environment.persistence."/persist" = lib.mkIf (!config.me.buildingIso) {
|
|
hideMounts = true;
|
|
users.talexander = {
|
|
files = [
|
|
".local/share/spaghettikart/default.sav"
|
|
".local/share/spaghettikart/mk64.o2r"
|
|
];
|
|
};
|
|
};
|
|
})
|
|
]
|
|
);
|
|
}
|