1
0
forked from extern/nix-config
donovanglover-nix-config/containers/wine.nix
Donovan Glover 6985903631
Add base wine container
I figured out how to get wine working on Nix, and it works surprisingly
well, however I'd like to avoid programs from writing wherever they want
and don't want to rely on a solution like firejail.

As it turns out, systemd-nspawn containers enable us to run wine applications
in a reasonably private container without access to neither the files of the
host nor its internet connection.
2023-06-03 15:29:50 -04:00

51 lines
923 B
Nix

{
containers.wine = {
autoStart = true;
privateNetwork = true;
bindMounts = {
"/home/user" = {
hostPath = "/home/user/containers/wine";
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
wine-staging
winetricks
];
system.stateVersion = "22.11";
};
};
}