Add Docker and good wine config

This commit is contained in:
vpochapuis 2024-03-27 22:31:43 +08:00
parent 5296f8f998
commit 46685e2ca0

View File

@ -4,194 +4,220 @@
{ config, pkgs, ... }: { config, pkgs, ... }:
let let
unstable = import unstable = import
(builtins.fetchTarball https://github.com/nixos/nixpkgs/tarball/nixos-unstable) (builtins.fetchTarball https://github.com/nixos/nixpkgs/tarball/nixos-unstable)
# reuse the current configuration # reuse the current configuration
{ config = config.nixpkgs.config; }; { config = config.nixpkgs.config; };
in in
{ {
imports = imports =
[ # Include the results of the hardware scan. [ # Include the results of the hardware scan.
./hardware-configuration.nix ./hardware-configuration.nix
# audio prod musnix channel https://github.com/musnix/musnix # audio prod musnix channel https://github.com/musnix/musnix
<musnix> <musnix>
]; ];
# Bootloader. # Bootloader.
boot.loader.systemd-boot.enable = true; boot.loader.systemd-boot.enable = true;
boot.loader.efi.canTouchEfiVariables = true; boot.loader.efi.canTouchEfiVariables = true;
boot.initrd.luks.devices."luks-54b7aa8e-f52b-47be-82d0-8a51264480af".device = "/dev/disk/by-uuid/54b7aa8e-f52b-47be-82d0-8a51264480af"; boot.initrd.luks.devices."luks-54b7aa8e-f52b-47be-82d0-8a51264480af".device = "/dev/disk/by-uuid/54b7aa8e-f52b-47be-82d0-8a51264480af";
networking.hostName = "vchapuis-taiwan-home-desktop"; # Define your hostname. networking.hostName = "vchapuis-taiwan-home-desktop"; # Define your hostname.
# networking.wireless.enable = true; # Enables wireless support via wpa_supplicant. # networking.wireless.enable = true; # Enables wireless support via wpa_supplicant.
# Configure network proxy if necessary # Configure network proxy if necessary
# networking.proxy.default = "http://user:password@proxy:port/"; # networking.proxy.default = "http://user:password@proxy:port/";
# networking.proxy.noProxy = "127.0.0.1,localhost,internal.domain"; # networking.proxy.noProxy = "127.0.0.1,localhost,internal.domain";
# Enable networking # Enable networking
networking.networkmanager.enable = true; networking.networkmanager.enable = true;
# Set your time zone. # Set your time zone.
time.timeZone = "Asia/Taipei"; time.timeZone = "Asia/Taipei";
# Select internationalisation properties. # Select internationalisation properties.
i18n.defaultLocale = "en_US.UTF-8"; i18n.defaultLocale = "en_US.UTF-8";
i18n.extraLocaleSettings = { i18n.extraLocaleSettings = {
LC_ADDRESS = "zh_TW.UTF-8"; LC_ADDRESS = "zh_TW.UTF-8";
LC_IDENTIFICATION = "zh_TW.UTF-8"; LC_IDENTIFICATION = "zh_TW.UTF-8";
LC_MEASUREMENT = "zh_TW.UTF-8"; LC_MEASUREMENT = "zh_TW.UTF-8";
LC_MONETARY = "zh_TW.UTF-8"; LC_MONETARY = "zh_TW.UTF-8";
LC_NAME = "zh_TW.UTF-8"; LC_NAME = "zh_TW.UTF-8";
LC_NUMERIC = "zh_TW.UTF-8"; LC_NUMERIC = "zh_TW.UTF-8";
LC_PAPER = "zh_TW.UTF-8"; LC_PAPER = "zh_TW.UTF-8";
LC_TELEPHONE = "zh_TW.UTF-8"; LC_TELEPHONE = "zh_TW.UTF-8";
LC_TIME = "zh_TW.UTF-8"; LC_TIME = "zh_TW.UTF-8";
}; };
# Enable the X11 windowing system. i18n.inputMethod = {
services.xserver.enable = true; enabled = "ibus";
services.xserver.videoDrivers = [ "amdgpu" ]; ibus.engines = with pkgs.ibus-engines; [ rime ];
# Vulkan Support };
hardware.opengl.driSupport = true;
hardware.opengl.driSupport32Bit = true;
# Enable the GNOME Desktop Environment. # Enable the X11 windowing system.
services.xserver.displayManager.gdm.enable = true; services.xserver.enable = true;
services.xserver.desktopManager.gnome.enable = true; services.xserver.videoDrivers = [ "amdgpu" ];
# Vulkan Support
hardware.opengl.enable = true;
hardware.opengl.driSupport = true;
hardware.opengl.driSupport32Bit = true;
# Configure keymap in X11 # Enable the GNOME Desktop Environment.
services.xserver = { services.xserver.displayManager.gdm.enable = true;
layout = "us"; services.xserver.desktopManager.gnome.enable = true;
xkbVariant = "altgr-intl";
};
# Enable CUPS to print documents. # Configure keymap in X11
services.printing.enable = true; services.xserver = {
layout = "us";
xkbVariant = "altgr-intl";
};
# Enable sound with pipewire. # Enable CUPS to print documents.
sound.enable = true; services.printing.enable = true;
hardware.pulseaudio.enable = false;
security.rtkit.enable = false;
services.pipewire = {
enable = true;
alsa.enable = true;
alsa.support32Bit = true;
pulse.enable = true;
wireplumber.enable = true;
jack.enable = true;
# use the example session manager (no others are packaged yet so this is enabled by default, # Enable sound with pipewire.
# no need to redefine it in your config for now) sound.enable = true;
#media-session.enable = true; hardware.pulseaudio.enable = false;
}; security.rtkit.enable = false;
services.pipewire = {
enable = true;
alsa.enable = true;
alsa.support32Bit = true;
pulse.enable = true;
wireplumber.enable = true;
jack.enable = true;
# Enable musnix # use the example session manager (no others are packaged yet so this is enabled by default,
musnix.enable = true; # no need to redefine it in your config for now)
#media-session.enable = true;
};
# Enable ISO mounting # Enable musnix
services.udisks2.enable = true; musnix.enable = true;
# Virtualbox virtualization # Enable ISO mounting
virtualisation.virtualbox.host.enable = true; services.udisks2.enable = true;
users.extraGroups.vboxusers.members = [ "vchapuis" ];
virtualisation.virtualbox.guest.enable = true;
virtualisation.virtualbox.guest.x11 = true;
virtualisation.virtualbox.host.enableExtensionPack = true;
# Enable touchpad support (enabled default in most desktopManager). virtualisation = {
# services.xserver.libinput.enable = true; podman = {
enable = true;
# Create a `docker` alias for podman, to use it as a drop-in replacement
dockerCompat = true;
# Required for containers under podman-compose to be able to talk to each other.
defaultNetwork.settings.dns_enabled = true;
};
virtualbox = {
host = {
enable = true;
enableExtensionPack = true;
};
guest = {
enable = true;
x11 = true;
};
};
};
users.extraGroups.vboxusers.members = [ "vchapuis" ];
# Enable touchpad support (enabled default in most desktopManager).
# services.xserver.libinput.enable = true;
# Define a user account. Don't forget to set a password with passwd. # Define a user account. Don't forget to set a password with passwd.
users.users.vchapuis = { users.users.vchapuis = {
isNormalUser = true; isNormalUser = true;
description = "vchapuis"; description = "vchapuis";
extraGroups = [ "networkmanager" "wheel" "audio" "wireshark"]; extraGroups = [ "networkmanager" "wheel" "audio" "wireshark"];
packages = with pkgs; [
firefox-bin
pavucontrol
xorg.xeyes
element-desktop
neofetch
qjackctl
sonobus
blender-hip
gimp
inkscape
kdenlive
ardour
rustup
vscodium
gnome3.gnome-tweaks
yabridge
yabridgectl
# Using unstable wine ( >8.20) because of missing fix for running Kontakt 7 with hdpi screen
unstable.wineWowPackages.staging
unstable.winetricks
obs-studio
wireshark
libreoffice-qt
hunspell
vlc
samba4Full
# thunderbird
];
};
# Allow unfree packages packages = with pkgs; [
nixpkgs.config.allowUnfree = true; firefox-bin
chromium
pavucontrol
xorg.xeyes
element-desktop
neofetch
qjackctl
sonobus
blender-hip
gimp
inkscape
kdenlive
ardour
rustup
vscodium
gnome3.gnome-tweaks
yabridge
yabridgectl
# Using unstable wine ( >8.20) because of missing fix for running Kontakt 7 with hdpi screen
unstable.wineWowPackages.staging
unstable.winetricks
obs-studio
wireshark
libreoffice-qt
hunspell
vlc
samba4Full
godot_4
telegram-desktop
anydesk
# thunderbird
];
};
# Allow unfree packages
nixpkgs.config.allowUnfree = true;
# List packages installed in system profile. To search, run: # List packages installed in system profile. To search, run:
# $ nix search wget # $ nix search wget
environment.systemPackages = with pkgs; [ environment.systemPackages = with pkgs; [
vim vim
wget wget
curl curl
git git
gcc gcc
ttf-tw-moe ttf-tw-moe
noto-fonts-cjk-serif noto-fonts-cjk-serif
]; ];
environment.etc."udisks2/mount_options.conf".text = '' [defaults] environment.etc."udisks2/mount_options.conf".text = '' [defaults]
udf_defaults=uid=$UID,gid=$GID,iocharset=utf8,unhide udf_defaults=uid=$UID,gid=$GID,iocharset=utf8,unhide
''; '';
# Some programs need SUID wrappers, can be configured further or are # Some programs need SUID wrappers, can be configured further or are
# started in user sessions. # started in user sessions.
# programs.mtr.enable = true; # programs.mtr.enable = true;
# programs.gnupg.agent = { # programs.gnupg.agent = {
# enable = true; # enable = true;
# enableSSHSupport = true; # enableSSHSupport = true;
# }; # };
programs.steam = { programs.steam = {
enable = true; enable = true;
remotePlay.openFirewall = true; # Open ports in the firewall for Steam Remote Play remotePlay.openFirewall = true; # Open ports in the firewall for Steam Remote Play
dedicatedServer.openFirewall = true; # Open ports in the firewall for Source Dedicated Server dedicatedServer.openFirewall = true; # Open ports in the firewall for Source Dedicated Server
}; };
# List services that you want to enable: # List services that you want to enable:
# Enable the OpenSSH daemon. # Enable the OpenSSH daemon.
# services.openssh.enable = true; # services.openssh.enable = true;
# Open ports in the firewall. # Open ports in the firewall.
# networking.firewall.allowedTCPPorts = [ ... ]; # networking.firewall.allowedTCPPorts = [ ... ];
# networking.firewall.allowedUDPPorts = [ ... ]; # networking.firewall.allowedUDPPorts = [ ... ];
# Or disable the firewall altogether. # Or disable the firewall altogether.
# networking.firewall.enable = false; # networking.firewall.enable = false;
# This value determines the NixOS release from which the default # This value determines the NixOS release from which the default
# settings for stateful data, like file locations and database versions # settings for stateful data, like file locations and database versions
# on your system were taken. Its perfectly fine and recommended to leave # on your system were taken. Its perfectly fine and recommended to leave
# this value at the release version of the first install of this system. # this value at the release version of the first install of this system.
# Before changing this value read the documentation for this option # Before changing this value read the documentation for this option
# (e.g. man configuration.nix or on https://nixos.org/nixos/options.html). # (e.g. man configuration.nix or on https://nixos.org/nixos/options.html).
system.stateVersion = "23.05"; # Did you read the comment? system.stateVersion = "23.05"; # Did you read the comment?
} }