Add rar container

This puts rar in a rootless container with no access to the network of
the host.
This commit is contained in:
Donovan Glover 2023-05-31 13:50:11 -04:00
parent f073819dc8
commit c9bcd57404
No known key found for this signature in database
GPG Key ID: EA7408A77AE1BE65
2 changed files with 56 additions and 0 deletions

55
containers/rar.nix Normal file
View File

@ -0,0 +1,55 @@
{
containers.rar = {
autoStart = true;
privateNetwork = true;
bindMounts = {
"/home/user" = {
hostPath = "/home/user/containers/rar";
isReadOnly = false;
};
};
config = { pkgs, lib, ... }: {
programs = {
fish.enable = true;
neovim.enable = true;
starship.enable = true;
};
users = {
defaultUserShell = pkgs.fish;
mutableUsers = false;
allowNoPasswordLogin = true;
users.user = {
isNormalUser = true;
home = "/home/user";
};
};
environment = {
shells = with pkgs; [ fish ];
variables = {
TERM = "xterm-kitty";
};
defaultPackages = [ ];
};
environment.systemPackages = with pkgs; [
kitty
rar
unrar
];
nixpkgs.config.allowUnfreePredicate = pkg: builtins.elem (lib.getName pkg) [
"rar"
"unrar"
];
system.stateVersion = "22.11";
};
};
}

View File

@ -48,6 +48,7 @@
./games
./host
./terminal
./containers/rar.nix
{
hardware.opengl.driSupport32Bit = true;