Skip to content

Instantly share code, notes, and snippets.

@liberodark
Last active July 5, 2024 09:43
Show Gist options
  • Save liberodark/800c754212256e8d2fb5f055bac8c34b to your computer and use it in GitHub Desktop.
Save liberodark/800c754212256e8d2fb5f055bac8c34b to your computer and use it in GitHub Desktop.
NixOS KDE Install
# Edit this configuration file to define what should be installed on
# your system. Help is available in the configuration.nix(5) man page
# and in the NixOS manual (accessible by running ‘nixos-help’).
{ config, pkgs, ... }:
{
imports =
[ # Include the results of the hardware scan.
./hardware-configuration.nix
];
# Bootloader.
boot.loader.systemd-boot.enable = true;
boot.loader.efi.canTouchEfiVariables = true;
boot.kernelPackages = pkgs.linuxPackages_6_6;
# Avoid touchpad click to tap (clickpad) bug. For more detail see:
# https://wiki.archlinux.org/title/Touchpad_Synaptics#Touchpad_does_not_work_after_resuming_from_hibernate/suspend
boot.kernelParams = [ "psmouse.synaptics_intertouch=0" ];
networking.hostName = "nixos"; # Define your hostname.
# networking.wireless.enable = true; # Enables wireless support via wpa_supplicant.
# Configure network proxy if necessary
# networking.proxy.default = "http://user:password@proxy:port/";
# networking.proxy.noProxy = "127.0.0.1,localhost,internal.domain";
# Enable networking
networking.networkmanager.enable = true;
# Hosts
networking.extraHosts =
''
# My Hosts
192.168.1.1 local.ovh.lan
'';
# VPN WireGuard
# networking.wg-quick.interfaces = {
# wg0 = {
# address = [ "IP_CLIENT/32" ];
# dns = [ "1.1.1.1" ];
# privateKeyFile = "/root/.wireguard/private.key";
#
# peers = [
# {
# publicKey = "PUBLIC_KEY";
# #presharedKeyFile = "/root/wireguard-keys/preshared_from_peer0_key";
# allowedIPs = [ "0.0.0.0/24" ];
# endpoint = "SERVER_IP:PORT";
# persistentKeepalive = 25;
# }
# ];
# };
# };
# Set your time zone.
time.timeZone = "Europe/Paris";
# Select internationalisation properties.
i18n.defaultLocale = "fr_FR.UTF-8";
i18n.extraLocaleSettings = {
LC_ADDRESS = "fr_FR.UTF-8";
LC_IDENTIFICATION = "fr_FR.UTF-8";
LC_MEASUREMENT = "fr_FR.UTF-8";
LC_MONETARY = "fr_FR.UTF-8";
LC_NAME = "fr_FR.UTF-8";
LC_NUMERIC = "fr_FR.UTF-8";
LC_PAPER = "fr_FR.UTF-8";
LC_TELEPHONE = "fr_FR.UTF-8";
LC_TIME = "fr_FR.UTF-8";
};
# Enable the X11 windowing system.
services.xserver.enable = true;
# Enable the KDE Plasma Desktop Environment.
services.displayManager.sddm.enable = true;
services.xserver.desktopManager.plasma5.enable = true;
services.displayManager.defaultSession = "plasmawayland";
programs.dconf.enable = true;
# Enable automatic login for the user.
#services.xserver.displayManager.autoLogin.enable = true;
#services.xserver.displayManager.autoLogin.user = "pc";
services.xserver.videoDrivers = [ "modesettings" ];
# Configure keymap in X11
services.xserver = {
xkb.layout = "fr";
xkb.variant = "azerty";
};
# Configure console keymap
console.keyMap = "fr";
# Enable CUPS to print documents.
services.printing.enable = false;
# Enable Bluetooth
hardware.bluetooth.enable = true;
hardware.bluetooth.powerOnBoot = true;
#services.blueman.enable = true;
# Enable OpenGL
hardware.opengl.enable = true;
hardware.opengl.driSupport32Bit = true;
hardware.opengl.extraPackages32 = with pkgs.pkgsi686Linux; [ gnutls ];
# Enable sound with pipewire.
#sound.enable = true;
security.rtkit.enable = true;
services.pipewire = {
enable = true;
alsa.enable = true;
alsa.support32Bit = true;
pulse.enable = true;
#jack.enable = true;
wireplumber.enable = true;
};
# 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’.
users.users.pc = {
isNormalUser = true;
description = "pc";
extraGroups = [ "networkmanager" "wheel" "docker" ];
shell = pkgs.fish;
packages = with pkgs; [
#filezilla
];
};
# Allow unfree packages
nixpkgs.config.allowUnfree = true;
# Fish
programs.fish.enable = true;
# Flatpak
xdg.portal.enable = true; # only needed if you are not doing Gnome
services.flatpak.enable = true;
# Docker
virtualisation.docker.enable = true;
virtualisation.docker.storageDriver = "overlay2";
virtualisation.docker.rootless = {
enable = true;
setSocketVariable = true;
};
# Nomachine Server
#services.nxserver.enable = true;
# Samba Browsing
services.avahi = {
enable = true;
nssmdns4 = true;
};
# Fwupd
services.fwupd.enable = true;
# Battery
services.power-profiles-daemon.enable = false;
services.auto-cpufreq.enable = true;
# VMware
virtualisation.vmware.host.enable = true;
# Insecure Packages
nixpkgs.config.permittedInsecurePackages = [
"electron-19.1.9"
];
# List packages installed in system profile. To search, run:
# $ nix search wget
environment.systemPackages = with pkgs; [
# Core
nano
fish
wget
inxi
xdg-user-dirs
htop
btop
linux-firmware
spectre-meltdown-checker
fwupd
fwupd-efi
wireplumber
lm_sensors
appimage-run
patchelf
dmidecode
avahi
samba
cifs-utils
#(pkgs.uutils-coreutils.override { prefix = ""; })
auto-cpufreq
unzip
# Tools
gparted
angryipscanner
#etcher
caligula
fd
sshx
timeshift
libsForQt5.kalk
wrk
# Vmware
linuxKernel.packages.linux_6_6.vmware
vmware-workstation
# Docker
docker
docker-compose
docker-buildx
# Dev
git
pre-commit
shfmt
bats
parallel
shellcheck
vscode.fhs
haskellPackages.ShellCheck
sublime-merge
jq
# Web
filezilla
firefox
element-desktop
discord
thunderbird
riseup-vpn
nodePackages_latest.webtorrent-cli
transmission_4-qt
# Video
mpv
# VPN
wireguard-tools
# Vulkan
vulkan-tools
vulkan-headers
vulkan-loader
# Driver
mesa
glxinfo
# Wayland
wayland
wayland-protocols
xwayland
libsForQt5.xdg-desktop-portal-kde
libsForQt5.qt5.qttranslations
libsForQt5.plasma-pa
libsForQt5.sddm-kcm
libsForQt5.plasma-wayland-protocols
xorg.xdpyinfo
# GPU
intel-gpu-tools
intel-media-driver
vaapiIntel
vaapiVdpau
libvdpau-va-gl
xorg.xf86videointel
libva
# Language
poppler_data
hunspell
hunspellDicts.fr-any
hyphen
# Office
softmaker-office
# Game
airshipper
minetest
# Wine
gnutls
libxcrypt
mangohud
fontconfig
faudio
freetype
xorg.libXft
flex
fluidsynth
mpg123
xorg.libXrandr
xorg.libXcomposite
xorg.libXi
xorg.libXinerama
xorg.libXScrnSaver
openal
krb5
giflib
#haskellPackages.gstreamer
gst123
gst_all_1.gst-vaapi
gst_all_1.gst-libav
gst_all_1.gst-plugins-bad
gst_all_1.gst-plugins-base
gst_all_1.gst-plugins-good
gst_all_1.gst-plugins-ugly
gst_all_1.gstreamer
libpng
v4l-utils
libgpg-error
libjpeg
libgcrypt
ncurses
ocl-icd
libxslt
libGLU
sqlite
gamemode
vkbasalt
cabextract
];
# Steam
programs.steam.enable = true;
# Some programs need SUID wrappers, can be configured further or are
# started in user sessions.
# programs.mtr.enable = true;
# programs.gnupg.agent = {
# enable = true;
# enableSSHSupport = true;
# };
# List services that you want to enable:
# Enable the OpenSSH daemon.
# services.openssh.enable = true;
# Open ports in the firewall.
# networking.firewall.allowedTCPPorts = [ ... ];
# networking.firewall.allowedUDPPorts = [ ... ];
# Or disable the firewall altogether.
# networking.firewall.enable = false;
# This value determines the NixOS release from which the default
# settings for stateful data, like file locations and database versions
# on your system were taken. It‘s perfectly fine and recommended to leave
# this value at the release version of the first install of this system.
# Before changing this value read the documentation for this option
# (e.g. man configuration.nix or on https://nixos.org/nixos/options.html).
system.autoUpgrade.enable = true;
#system.autoUpgrade.allowReboot = true;
system.stateVersion = "23.05"; # Did you read the comment?
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment