mirror of
https://github.com/donovanglover/nix-config.git
synced 2024-11-14 12:23:58 +01:00
Add rar container
This puts rar in a rootless container with no access to the network of the host.
This commit is contained in:
parent
f073819dc8
commit
c9bcd57404
55
containers/rar.nix
Normal file
55
containers/rar.nix
Normal 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";
|
||||
};
|
||||
};
|
||||
}
|
Loading…
Reference in New Issue
Block a user