Minecraft

This commit is contained in:
Charlotte Van Petegem 2021-03-08 14:57:26 +01:00
parent 2060295da9
commit 3ac380fd61
No known key found for this signature in database
GPG key ID: 019E764B7184435A
10 changed files with 53 additions and 20 deletions

View file

@ -1,7 +1,10 @@
{ ... }: { { ... }: {
chvp.zfs.homeLinks = [ chvp = {
nix.unfreePackages = [ "citrix-workspace" ];
zfs.homeLinks = [
{ path = ".ICAClient"; type = "data"; } { path = ".ICAClient"; type = "data"; }
]; ];
};
home-manager.users.charlotte = { pkgs, ... }: { home-manager.users.charlotte = { pkgs, ... }: {
home.packages = with pkgs; [ citrix_workspace ]; home.packages = with pkgs; [ citrix_workspace ];
}; };

View file

@ -27,4 +27,5 @@
}; };
}; };
}; };
chvp.nix.unfreePackages = [ "dropbox" ];
} }

View file

@ -5,7 +5,10 @@
home.packages = with pkgs; [ teams ]; home.packages = with pkgs; [ teams ];
}; };
chvp.zfs.homeLinks = [ chvp = {
nix.unfreePackages = [ "teams" ];
zfs.homeLinks = [
{ path = ".config/Microsoft"; type = "data"; } { path = ".config/Microsoft"; type = "data"; }
]; ];
};
} }

View file

@ -24,7 +24,6 @@
eid.enable = true; eid.enable = true;
git.email = "charlotte.vanpetegem@ugent.be"; git.email = "charlotte.vanpetegem@ugent.be";
gomuks.enable = true; gomuks.enable = true;
nix.enableUnfree = true;
zfs = { zfs = {
enable = true; enable = true;
encrypted = true; encrypted = true;

View file

@ -24,7 +24,7 @@
eid.enable = true; eid.enable = true;
git.email = "charlotte@vanpetegem.me"; git.email = "charlotte@vanpetegem.me";
gomuks.enable = true; gomuks.enable = true;
nix.enableUnfree = true; minecraft.client = true;
zeroad.enable = true; zeroad.enable = true;
zfs = { zfs = {
enable = true; enable = true;

Binary file not shown.

View file

@ -10,6 +10,7 @@
./git.nix ./git.nix
./global-mailer.nix ./global-mailer.nix
./gomuks.nix ./gomuks.nix
./minecraft.nix
./neovim.nix ./neovim.nix
./nix.nix ./nix.nix
./nginx.nix ./nginx.nix

30
modules/minecraft.nix Normal file
View file

@ -0,0 +1,30 @@
{ config, lib, pkgs, ... }:
{
options.chvp.minecraft = {
client = lib.mkOption {
default = false;
example = true;
};
server = lib.mkOption {
default = false;
example = true;
};
};
config = lib.mkIf (config.chvp.minecraft.client || config.chvp.minecraft.server) {
home-manager.users.charlotte = lib.mkIf config.chvp.minecraft.client ({ ... }: {
home.packages = [ pkgs.minecraft ];
});
chvp.zfs.homeLinks = lib.optional config.chvp.minecraft.client { path = ".minecraft"; type = "cache"; };
services.minecraft-server = lib.mkIf config.chvp.minecraft.server {
enable = true;
dataDir = "${config.chvp.dataPrefix}/var/lib/minecraft-server";
eula = true;
openFirewall = true;
};
chvp.nix.unfreePackages =
(lib.optional config.chvp.minecraft.client "minecraft-launcher") ++
(lib.optional config.chvp.minecraft.server "minecraft-server");
};
}

View file

@ -47,9 +47,9 @@ in
default = true; default = true;
example = false; example = false;
}; };
enableUnfree = lib.mkOption { unfreePackages = lib.mkOption {
default = false; default = [ ];
example = true; example = [ "teams" ];
}; };
# Note that this is only enabled for charlotte, until https://github.com/bennofs/nix-index/issues/143 is resolved. # Note that this is only enabled for charlotte, until https://github.com/bennofs/nix-index/issues/143 is resolved.
enableNixIndex = lib.mkOption { enableNixIndex = lib.mkOption {
@ -84,14 +84,7 @@ in
''); '');
}; };
nixpkgs.config = lib.mkIf config.chvp.nix.enableUnfree { nixpkgs.config.allowUnfreePredicate = pkg: builtins.elem (lib.getName pkg) config.chvp.nix.unfreePackages;
allowUnfreePredicate = pkg: builtins.elem (lib.getName pkg) [
"citrix-workspace"
"dropbox"
"teams"
"google-chrome"
];
};
nixpkgs.overlays = lib.mkIf config.chvp.nix.enableFlakes [ nixpkgs.overlays = lib.mkIf config.chvp.nix.enableFlakes [
(self: super: { (self: super: {
nix = super.nixUnstable; nix = super.nixUnstable;

View file

@ -59,5 +59,8 @@
services.fwupd.enable = true; services.fwupd.enable = true;
chvp.gnupg.pinentryFlavor = "qt"; chvp = {
gnupg.pinentryFlavor = "qt";
nix.unfreePackages = [ "google-chrome" ];
};
} }