You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
nix/configuration.nix

323 lines
8.9 KiB

# 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, riderpkgs, ... }:
{ 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.supportedFilesystems = [ "ntfs" ];
fileSystems."/mnt/windows-d" =
{ device = "/dev/disk/by-label/windows-d";
fsType = "ntfs-3g";
options = [ "rw" "uid=1000"];
};
fileSystems."/mnt/windows-c" =
{ device = "/dev/disk/by-label/windows-c";
fsType = "ntfs-3g";
options = [ "rw" "uid=1000" ];
};
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;
# Set your time zone.
time.timeZone = "Asia/Jakarta";
# Select internationalisation properties.
i18n.defaultLocale = "en_US.UTF-8";
# Enable the X11 windowing system.
services.xserver.enable = true;
# Enable the GNOME Desktop Environment.
# services.xserver.displayManager.gdm.enable = true;
# services.xserver.desktopManager.gnome.enable = true;
services.displayManager = {
autoLogin = {
enable = true;
user = "bandeng";
};
sddm = {
enable = true;
wayland.enable = true;
theme = "${pkgs.sddm-sugar-dark}/share/sddm/themes/sugar-dark";
};
defaultSession = "hyprland";
};
# services.xserver.windowManager.i3.enable = true;
services.xserver.wacom.enable = true;
# Configure keymap in X11
services.xserver.xkb = {
layout = "us";
variant = "";
};
# Enable CUPS to print documents.
services.printing.enable = true;
# Enable sound with pipewire.
hardware.pulseaudio.enable = false;
hardware.bluetooth.enable = true;
hardware.xpadneo.enable = true;
hardware.xone.enable = true;
hardware.opentabletdriver = {
enable = true;
daemon.enable = true;
};
security.rtkit.enable = true;
services.pipewire = {
enable = true;
alsa.enable = true;
alsa.support32Bit = true;
pulse.enable = true;
# If you want to use JACK applications, uncomment this
#jack.enable = true;
# use the example session manager (no others are packaged yet so this is enabled by default,
# no need to redefine it in your config for now)
#media-session.enable = true;
};
services.syncthing = {
enable = true;
user = "bandeng";
dataDir = "/home/bandeng/Sync"; # Default folder for new synced folders
};
services.tailscale.enable = true;
# Enable OpenGL
hardware.graphics = {
enable = true;
};
# Load nvidia driver for Xorg and Wayland
# services.xserver.videoDrivers = ["nvidia"];
#
# hardware.nvidia = {
#
# # Modesetting is required.
# modesetting.enable = true;
#
# # Nvidia power management. Experimental, and can cause sleep/suspend to fail.
# # Enable this if you have graphical corruption issues or application crashes after waking
# # up from sleep. This fixes it by saving the entire VRAM memory to /tmp/ instead
# # of just the bare essentials.
# powerManagement.enable = false;
#
# # Fine-grained power management. Turns off GPU when not in use.
# # Experimental and only works on modern Nvidia GPUs (Turing or newer).
# powerManagement.finegrained = false;
#
# # Use the NVidia open source kernel module (not to be confused with the
# # independent third-party "nouveau" open source driver).
# # Support is limited to the Turing and later architectures. Full list of
# # supported GPUs is at:
# # https://github.com/NVIDIA/open-gpu-kernel-modules#compatible-gpus
# # Only available from driver 515.43.04+
# # Currently alpha-quality/buggy, so false is currently the recommended setting.
# open = false;
#
# # Enable the Nvidia settings menu,
# # accessible via `nvidia-settings`.
# nvidiaSettings = true;
#
# # Optionally, you may need to select the appropriate driver version for your specific GPU.
# package = config.boot.kernelPackages.nvidiaPackages.stable;
# };
# hardware.nvidia-container-toolkit.enable = true;
# Enable touchpad support (enabled default in most desktopManager).
# services.xserver.libinput.enable = true;
services.flatpak.enable = true;
# Define a user account. Don't forget to set a password with ‘passwd’.
users.users.bandeng = {
isNormalUser = true;
description = "Bandeng";
extraGroups = [ "networkmanager" "wheel" "docker" "autologin" ];
packages = with pkgs; [
# thunderbird
opera
];
};
users.defaultUserShell = pkgs.fish;
# Install firefox.
# programs.firefox = {
# enable = true;
# package = pkgs.firefox-devedition-bin;
# };
programs.hyprland.enable = true;
programs.fish.enable = true;
programs.kdeconnect = {
enable = true;
};
programs.steam = {
enable = true;
remotePlay.openFirewall = true; # Open ports in the firewall for Steam Remote Play
dedicatedServer.openFirewall = true; # Open ports in the firewall for Source Dedicated Server
localNetworkGameTransfers.openFirewall = true; # Open ports in the firewall for Steam Local Network Game Transfers
};
programs.nix-ld.enable = true;
programs.nix-ld.libraries = with pkgs; [
# Add any missing dynamic libraries for unpackaged programs
# here, NOT in environment.systemPackages
jdk21
];
qt.enable = true;
xdg.portal = {
enable = true;
extraPortals = with pkgs; [
xdg-desktop-portal-gtk
xdg-desktop-portal-hyprland
];
};
# Allow unfree packages
nixpkgs.config.allowUnfree = true;
# List packages installed in system profile. To search, run:
# $ nix search wget
environment.systemPackages = with pkgs; [
neovim # Do not forget to add an editor to edit configuration.nix! The Nano editor is also installed by default.
wget
fzf
ripgrep
eza
git
alacritty
tmux
chezmoi
libqalculate
rustup
go
distrobox
docker
obsidian
gcc
llvm
lazygit
android-tools
rust-analyzer
lua-language-server
glibc
jdk21
devbox
ffmpeg
just
direnv
openssl
nodejs
corepack
gopls
libreoffice-fresh
waybar
wofi
dunst hyprpaper
zoxide
libsForQt5.qt5ct
qt6ct
networkmanagerapplet
bluez
pavucontrol
nwg-look
swaylock-effects
playerctl
blueman
libsForQt5.xp-pen-deco-01-v2-driver
libsForQt5.qt5.qtgraphicaleffects
egl-wayland
adwaita-qt
adwaita-qt6
xdg-desktop-portal-gtk
xdg-desktop-portal-hyprland
nemo-with-extensions
gvfs
hyprcursor
loupe
microsoft-edge
asdf-vm
kdePackages.kdeconnect-kde
file-roller
gnome-system-monitor
obs-studio
vlc
handbrake
grim
slurp
wl-clipboard
cliphist
mission-center
zellij
swww
jstest-gtk
bottles
sddm-sugar-dark
killall
# riderpkgs.jetbrains.rider
];
fonts.packages = with pkgs; [
noto-fonts
noto-fonts-cjk-sans
noto-fonts-cjk-serif
noto-fonts-emoji
noto-fonts-extra
cantarell-fonts
inter
(nerdfonts.override { fonts = [ "Iosevka" "FiraCode" ]; })
];
fonts.fontDir.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;
networking.firewall.allowedTCPPorts = [ 22000 ];
networking.firewall.allowedUDPPorts = [ 22000 21027 ];
networking.interfaces.enp4s0.wakeOnLan.enable = true;
nix.settings.experimental-features = [ "nix-command" "flakes" ];
virtualisation.docker.enable = true;
# 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.stateVersion = "24.05"; # Did you read the comment?
}