my-nix/hosts/nixos/bunta_desktop/configuration.nix
2023-07-23 01:04:20 +01:00

122 lines
3.2 KiB
Nix

{pkgs, stateVersion, ...}: {
imports = [
./hardware-configuration.nix # Hardware scan
];
# System
system.stateVersion = stateVersion; # Only touch if aware of effects, check manual
# experimental-features = "nix-command flakes";
# Users
users.users.nibunta = {
isNormalUser = true; description = "Nibunta NixOS";
initialPassword = "password";
extraGroups = [ "networkmanager" "wheel" ];
shell = pkgs.fish;
};
programs.fish.enable = true;
nix.extraOptions = ''
experimental-features = nix-command flakes
'';
nixpkgs.config.allowUnfree = true;
environment.systemPackages = with pkgs; [
nix-tree nix-update nix-init
nurl nil
nano kate ventoy-bin-full
# Libs
llvmPackages_7.clangUseLLVM
mold
python311 poetry
];
# Graphical and Windowing environment
services.xserver = {
enable = true; # X11 windowing system.
displayManager = {
sddm.enable = true;
autoLogin = { enable=true; user="nibunta"; };
};
## KDE Plasma
desktopManager.plasma5.enable = true;
};
# Localization and Internationalisation
time.timeZone = "Europe/London";
i18n.defaultLocale = "en_GB.UTF-8";
i18n.extraLocaleSettings = {
LC_ADDRESS = "en_GB.UTF-8";
LC_IDENTIFICATION = "en_GB.UTF-8";
LC_MEASUREMENT = "en_GB.UTF-8";
LC_MONETARY = "en_GB.UTF-8";
LC_NAME = "en_GB.UTF-8";
LC_NUMERIC = "en_GB.UTF-8";
LC_PAPER = "en_GB.UTF-8";
LC_TELEPHONE = "en_GB.UTF-8";
LC_TIME = "en_GB.UTF-8";
};
# Networking
networking.networkmanager.enable = true;
networking.hostName = "nixos";
# networking.wireless.enable = true; # Wireless support via wpa_supplicant
/*
networking.firewall = {
allowedTCPPorts = [ ... ];
allowedUDPPorts = [ ... ];
};
*/
# Input settings
console.keyMap = "pt-latin1";
# Reference: https://nixos.wiki/wiki/Keyboard_Layout_Customization
# Configure keymap in X11
services.xserver = { layout = "pt"; xkbVariant = ""; };
# Plug&Play Devices settings
services.printing.enable = true;
sound.enable = true; # Ssound with pipewire.
hardware.pulseaudio.enable = false;
hardware.pulseaudio.extraConfig = """
# Creates a device where AudioRelay can stream audio into
load-module module-null-sink sink_name=audiorelay-virtual-mic-sink sink_properties=device.description=Virtual-Mic-Sink
# Creates a device usable by communications apps (e.g: voice apps)
load-module module-remap-source master=audiorelay-virtual-mic-sink.monitor source_name=audiorelay-virtual-mic-sink source_properties=device.description=Virtual-Mic
""";
security.rtkit.enable = true;
services.pipewire = {
enable = true;
alsa.enable = true;
alsa.support32Bit = true;
pulse.enable = true;
# jack.enable = true; # JACK applications
# media-session.enable = true;
};
# TODO: Temporarily here because i dont know how to do it in the user section
# virtualisation.virtualbox.host = {
# enable = true; # enableExtensionPack = true;
#};
# virtualisation.virtualbox.guest = {
# enable = true; # x11 = true;
# };
# users.extraGroups.vboxusers.members = [ "nibunta" ];
virtualisation.libvirtd.enable = true;
programs.dconf.enable = true;
}