Last active
November 24, 2023 19:33
-
-
Save Kamek437/b21ed2d25d01299ee5612e73e4b6a418 to your computer and use it in GitHub Desktop.
NixOS Config
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#NOt working right now, going nixos dargonized, this will change | |
# 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, lib, garuda, chaotic, ... }: | |
{ | |
imports = | |
[ # Include the results of the hardware scan. | |
./hardware-configuration.nix | |
]; | |
#Garuda Modee | |
garuda = { | |
dr460nized.enable = true; | |
gaming.enable = true; | |
performance-tweaks = { | |
cachyos-kernel = true; | |
enable = true; | |
}; | |
}; | |
environment.variables = { | |
EDITOR = "lvim"; | |
#QT_QPA_PLATFORMTHEME = "qt5ct"; | |
}; | |
nix.settings = { | |
# Enable flakes and new 'nix' command | |
experimental-features = "nix-command flakes"; | |
# Deduplicate and optimize nix store | |
auto-optimise-store = true; | |
}; | |
#Flakes | |
nix.settings.experimental-features = [ "nix-command" "flakes" ]; | |
nix = { | |
package = pkgs.nixUnstable; | |
extraOptions = "experimental-features = nix-command flakes"; | |
}; | |
#Flatpak | |
#flatpak remote-add --if-not-exists flathub https://dl.flathub.org/repo/flathub.flatpakrepo after nixos-rebuild switch | |
services.flatpak.enable = true; | |
#Bluetooth | |
hardware.bluetooth.enable = true; | |
#Appimage bin registration | |
boot.binfmt.registrations.appimage = { | |
wrapInterpreterInShell = false; | |
interpreter = "${pkgs.appimage-run}/bin/appimage-run"; | |
recognitionType = "magic"; | |
offset = 0; | |
mask = ''\xff\xff\xff\xff\x00\x00\x00\x00\xff\xff\xff''; | |
magicOrExtension = ''\x7fELF....AI\x02''; | |
}; | |
# Bootloader | |
boot.initrd.availableKernelModules = [ "xhci_pci" "usb_storage" "sd_mod" ]; | |
boot.initrd.kernelModules = [ ]; | |
boot.kernelModules = [ "kvm-amd" "hid-playstation" "hid-nintendo" "hid-xbox" ]; | |
boot.kernelPackages = pkgs.linuxPackages_latest; | |
boot.extraModulePackages = with config.boot.kernelPackages; [ | |
v4l2loopback | |
#r8168 | |
]; | |
boot.loader.grub.efiSupport = true; | |
boot.loader.systemd-boot.enable = true; | |
boot.loader.efi.canTouchEfiVariables = true; | |
#Kernel | |
boot.kernel.sysctl = { | |
"kernel.sysrq" = 1; # SysRQ for is rebooting their machine properly if it freezes: SOURCE: https://oglo.dev/tutorials/sysrq/index.html | |
"net.core.rmem_default" = 16777216; # Default socket receive buffer size, improve network performance & applications that use sockets | |
"net.core.rmem_max" = 16777216; # Maximum socket receive buffer size, determin the amount of data that can be buffered in memory for network operations | |
"net.core.wmem_default" = 16777216; # Default socket send buffer size, improve network performance & applications that use sockets | |
"net.core.wmem_max" = 16777216; # Maximum socket send buffer size, determin the amount of data that can be buffered in memory for network operations | |
"net.ipv4.tcp_keepalive_intvl" = 30; # TCP keepalive interval between probes, TCP keepalive probes, which are used to detect if a connection is still alive. | |
"net.ipv4.tcp_keepalive_probes" = 5; # TCP keepalive probes, TCP keepalive probes, which are used to detect if a connection is still alive. | |
"net.ipv4.tcp_keepalive_time" = 300; # TCP keepalive interval (seconds), TCP keepalive probes, which are used to detect if a connection is still alive. | |
"vm.dirty_background_bytes" = 268435456; # 256 MB in bytes, data that has been modified in memory and needs to be written to disk | |
"vm.dirty_bytes" = 1073741824; # 1 GB in bytes, data that has been modified in memory and needs to be written to disk | |
"vm.min_free_kbytes" = 65536; # Minimum free memory for safety (in KB), can help prevent memory exhaustion situations | |
"vm.swappiness" = 1; # how aggressively the kernel swaps data from RAM to disk. Lower values prioritize keeping data in RAM, | |
"vm.vfs_cache_pressure" = 50; # Adjust vfs_cache_pressure (0-1000), how the kernel reclaims memory used for caching filesystem objects | |
}; | |
networking.hostName = "Spellbook"; # 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"; | |
###NUR### | |
nixpkgs.config.packageOverrides = pkgs: { | |
nur = import (builtins.fetchTarball "https://github.com/nix-community/NUR/archive/master.tar.gz") { | |
inherit pkgs; | |
}; | |
}; | |
# Set your time zone. | |
time.timeZone = "America/Los_Angeles"; | |
# Select internationalisation properties. | |
i18n.defaultLocale = "en_US.UTF-8"; | |
i18n.extraLocaleSettings = { | |
LC_ADDRESS = "en_US.UTF-8"; | |
LC_IDENTIFICATION = "en_US.UTF-8"; | |
LC_MEASUREMENT = "en_US.UTF-8"; | |
LC_MONETARY = "en_US.UTF-8"; | |
LC_NAME = "en_US.UTF-8"; | |
LC_NUMERIC = "en_US.UTF-8"; | |
LC_PAPER = "en_US.UTF-8"; | |
LC_TELEPHONE = "en_US.UTF-8"; | |
LC_TIME = "en_US.UTF-8"; | |
}; | |
# Enable the X11 windowing system. | |
services.xserver.enable = true; | |
# Enable the KDE Plasma Desktop Environment. | |
services.xserver.displayManager.sddm.enable = true; | |
services.xserver.desktopManager.plasma5.enable = true; | |
services.xserver.displayManager.sddm.autoNumlock = true; | |
# Power management | |
powerManagement.cpuFreqGovernor = "performance"; | |
#Gnome | |
#services.xserver.displayManager.gdm.enable = true; | |
#services.xserver.desktopManager.gnome.enable = true; | |
# Configure keymap in X11 | |
services.xserver = { | |
layout = "us"; | |
xkbVariant = ""; | |
}; | |
# Enable CUPS to print documents. | |
services.printing.enable = true; | |
# Enable sound with pipewire. | |
sound.enable = true; | |
hardware.pulseaudio.enable = false; | |
security.rtkit.enable = true; | |
security.polkit.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; | |
}; | |
# Logitech unifying receiver | |
hardware.logitech.wireless.enable = true; | |
hardware.logitech.wireless.enableGraphical = true; | |
# Enable touchpad support (enabled default in most desktopManager). | |
#####MAYBE FUCKING MY KEYBOARD!!!!!!!!!!! | |
services.xserver.libinput.enable = true; | |
services.xserver.libinput.touchpad.disableWhileTyping = true; | |
hardware.nvidia = { | |
forceFullCompositionPipeline = true; | |
package = config.boot.kernelPackages.nvidiaPackages.stable; | |
nvidiaPersistenced = true; | |
modesetting.enable = true; | |
nvidiaSettings = true; | |
open = false; | |
powerManagement = { | |
enable = true; | |
finegrained = false; | |
}; | |
prime = { | |
offload = { | |
enable = true; #lib.mkOverride 990 true; | |
enableOffloadCmd = true; #lib.mkIf config.hardware.nvidia.prime.offload.enable true; | |
}; | |
#sync.enable = true; | |
intelBusId = "PCI:0:2:0"; | |
nvidiaBusId = "PCI:1:0:0"; | |
}; | |
}; | |
#For prime offload | |
#environment.variables = { | |
# GBM_BACKEND = "nvidia-drm"; | |
# LIBVA_DRIVER_NAME = "nvidia"; | |
# __GLX_VENDOR_LIBRARY_NAME = "nvidia"; | |
#}; | |
services.xserver.videoDrivers = ["nvidia"]; | |
#services.xserver.videoDrivers = lib.mkDefault [ "nvidia" ]; | |
hardware.opengl.extraPackages = with pkgs; [ | |
vaapiVdpau | |
]; | |
hardware.opengl = { | |
enable = true; | |
driSupport = true; | |
driSupport32Bit = true; | |
}; | |
networking = { | |
networkmanager.enable = true; | |
#networkmanager.packages = [ pkgs.networkmanagerapplet ]; | |
nameservers = [ "127.0.0.1" "::1" ]; | |
# If using dhcpcd: | |
dhcpcd.extraConfig = "nohook resolv.conf"; | |
# If using NetworkManager: | |
networkmanager.dns = "none"; | |
# Open ports in the firewall. | |
firewall.allowedTCPPorts = [ 7656 1488 ]; | |
firewall.allowedUDPPorts = [ 7656 1488 ]; | |
# Or disable the firewall altogether. | |
#nftables.enable = true; | |
firewall.enable = true; | |
nat.enable = true; | |
}; | |
services.i2pd.enable = false; | |
services.i2pd.notransit = false; | |
services.i2pd.port = 7656; | |
services.i2pd.outTunnels = { | |
#ssh-solene = { | |
#enable = true; | |
#name = "ssh"; | |
#destination = "gajcbkoosoztqklad7kosh226tlt5wr2srr2tm4zbcadulxw2o5a.b32.i2p"; | |
#address = "127.0.0.1"; | |
#port = 2222; | |
#}; | |
}; | |
#ZSHHHHHH | |
programs.zsh.enable = true; | |
programs.zsh.ohMyZsh = { | |
enable = true; | |
plugins = [ "git" "python" "man" ]; | |
theme = "agnoster"; | |
}; | |
#Java | |
programs.java = { | |
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 | |
}; | |
programs.git = { | |
enable = true; | |
config = { | |
user.name = "kamek"; | |
user.email = "[email protected]"; | |
credential.helper = "cache --timeout=86400"; | |
}; | |
lfs.enable = true; | |
}; | |
programs.neovim = { | |
enable = true; | |
viAlias = true; | |
vimAlias = true; | |
#vimdiffAlias = true; | |
withNodeJs = true; | |
withPython3 = true; | |
withRuby = true; | |
}; | |
#kdeconnect | |
programs.kdeconnect.enable = true; | |
#for sublime4 I guess | |
nixpkgs.config.permittedInsecurePackages = [ | |
"openssl-1.1.1w" | |
"mailspring-1.12.0" | |
"electron-22.3.27" | |
]; | |
# Define a user account. Don't forget to set a password with ‘passwd’. | |
users.users.kamek = { | |
isNormalUser = true; | |
description = "kamek"; | |
extraGroups = [ "networkmanager" "wheel" "i2pd" "jellyfin" ]; | |
shell = pkgs.fish; | |
packages = with pkgs; [ | |
#user pkgs | |
]; | |
}; | |
#Home Manager | |
# let | |
# home-manager = builtins.fetchTarball "https://github.com/nix-community/home-manager/archive/master.tar.gz"; | |
# in | |
# { | |
# import = [ | |
# (import "${home-manager}/nixos") | |
# ]; | |
# home-manager.users.kamek = { | |
# programs.home-manager.enable = true; | |
# }; | |
programs.fish.enable = true; | |
programs.dconf.enable = true; | |
#????home-manager.useUserPackages = true; | |
# Allow unfree packages | |
nixpkgs.config.allowUnfree = true; | |
# List packages installed in system profile. To search, run: | |
# $ nix search wget | |
environment.systemPackages = with pkgs; [ | |
#pidgin | |
(pidgin.override { plugins = [ | |
purple-hangouts | |
purple-facebook | |
purple-matrix | |
pidgin-otr | |
pidgin-osd | |
purple-discord | |
#purple-discord-unstable | |
#tdlib-purple | |
purple-slack | |
#purple-slack-unstable | |
purple-mm-sms | |
purple-signald | |
pidgin-skypeweb | |
pidgin-indicator | |
purple-plugin-pack | |
purple-googlechat | |
pidgin-window-merge | |
pidgin-opensteamworks | |
purple-xmpp-http-upload | |
pidgin-xmpp-receipts | |
pidgin-opensteamworks | |
pidgin-indicator | |
pidgin-window-merge | |
]; }) | |
#pass | |
gnupg | |
pass | |
pass-git-helper | |
passExtensions.pass-otp | |
passExtensions.pass-otp | |
passExtensions.pass-update | |
passExtensions.pass-import | |
passky-desktop | |
#purple-discord-unstable | |
davinci-resolve | |
mailspring | |
kwalletmanager | |
keepassxc | |
keepass-keetraytotp | |
keepass-qrcodeview | |
#otpkeyprov | |
keepass-charactercopy | |
git-credential-keepassxc | |
buttercup-desktop | |
themechanger | |
discount | |
#qtstyleplugin-kvantum | |
#qtstyleplugin-kvantum-qt4 | |
openssl | |
#glib-networking | |
zoxide | |
#moosync | |
firefox | |
arandr | |
xorg.xrandr | |
retroshare | |
onionshare | |
tor | |
tor-browser | |
wasmer | |
wasmtime | |
wapm-cli | |
element-desktop | |
#yandex-browser-stable | |
barrier | |
bloomrpc | |
#emulation | |
waydroid | |
#gnome | |
gnomeExtensions.appindicator | |
gnome.gnome-settings-daemon | |
gnomeExtensions.prime-helper | |
gnomeExtensions.one-drive-resurrect | |
#home-manager | |
home-manager | |
helix | |
vim-full | |
vim_configurable | |
lunarvim | |
neovide | |
zsh | |
oh-my-zsh | |
#plasma5Packages.kdeGear | |
nur.repos.milahu.spotify-adblock | |
mpv | |
libsForQt5.kdeconnect-kde | |
libsForQt5.krdc | |
xdg-desktop-portal-kde | |
obs-studio | |
kmail | |
#betterbird | |
microsoft-edge | |
sublime4 | |
vscode | |
#mercury-browser | |
anytype | |
gimp | |
yakuake | |
fd | |
ouch | |
eza | |
rustup | |
lsd | |
broot | |
bat | |
zellij | |
kitty | |
htop | |
killall | |
ripgrep | |
unzip | |
#media | |
ytcast | |
deepin.deepin-shortcut-viewer | |
evince | |
pdfstudio2023 | |
#llamma-cpp | |
ollama | |
vlc | |
ffmpeg-full | |
freetube | |
krita | |
kdenlive | |
inkscape | |
handbrake | |
jellyfin | |
xz | |
thermald | |
powertop | |
audacity | |
libreoffice | |
iperf | |
#games | |
retroarchFull | |
protonup-qt | |
lutris | |
#change avatar everywhere | |
yunfaavatar | |
dxvk | |
caerbannog | |
zulip | |
zulip-term | |
obsidian | |
vt-cli | |
droidcam | |
obs-studio-plugins.droidcam-obs | |
xdotool | |
yad | |
xorg.xwininfo | |
#langs | |
bun | |
deno | |
micromamba | |
go | |
vlang | |
zig | |
nodejs | |
haxe | |
dotnet-sdk_8 | |
dotnet-runtime_8 | |
dotnetPackages.Nuget | |
#python | |
python3 | |
python3Packages.pip | |
python3Packages.virtualenv | |
cudaPackages.cudatoolkit | |
#ruby | |
ruby | |
jruby | |
gpu-viewer | |
mesa-demos | |
glxinfo | |
clinfo | |
gwe | |
nvtop-nvidia | |
virtualglLib | |
vulkan-loader | |
vulkan-tools | |
atuin | |
clang | |
gcc | |
rnix-lsp | |
marksman | |
appimage-run | |
fish | |
fishPlugins.done | |
fishPlugins.fzf-fish | |
fishPlugins.forgit | |
fishPlugins.hydro | |
fzf | |
fishPlugins.grc | |
grc | |
silver-searcher | |
##new | |
qt5ct | |
bucklespring | |
#qt5-platform-plugins | |
kontact | |
owncloud-client | |
source-code-pro | |
spectacle | |
youtube-dl | |
unzip | |
gparted | |
zip | |
ispell | |
imagemagick | |
gwenview | |
#backup | |
restic | |
rustic-rs | |
duplicacy | |
#deepin-clone | |
bacula | |
duply | |
duplicati | |
#comms | |
mattermost | |
mattermost-desktop | |
qbittorrent | |
qbittorrent-qt5 | |
i2p | |
i2pd | |
jellyfin | |
riseup-vpn | |
nur.repos.pokon548.rustdesk-bin | |
onedriver | |
onedrivegui | |
onedrive | |
matterbridge | |
xd | |
networkmanager | |
protonvpn-gui | |
onedriver | |
rclone | |
rsync | |
rclone-browser | |
openvpn | |
dig | |
remmina | |
signal-desktop | |
tailscale-systray | |
tailscale | |
trayscale | |
#tribler | |
wget | |
curl | |
gitAndTools.gitFull | |
nextdns | |
beeper | |
#discordo | |
#telepathy | |
telepathy-mission-control | |
telepathy-haze | |
#chatty | |
nheko | |
libsForQt5.neochat | |
##term | |
#kitti3-unstable | |
kitty | |
#i3ish | |
alacritty | |
dmenu | |
git | |
gnome.gnome-keyring | |
nerdfonts | |
networkmanagerapplet | |
nitrogen | |
#pasystray | |
picom | |
polkit_gnome | |
pulseaudioFull | |
rofi | |
unrar | |
unzip | |
#bitlbee | |
bitlbee | |
bitlbee-steam | |
bitlbee-discord | |
bitlbee-mastodon | |
bitlbee-facebook | |
cordless | |
dorion | |
vesktop | |
ripcord | |
telegram-desktop | |
plasma-integration | |
simplescreenrecorder | |
#gpu-screen-recorder | |
#gpu-screen-recorder-gtk | |
shotcut | |
starship | |
glib | |
luajit | |
#video | |
fx_cast_bridge | |
]; | |
#FONTS | |
fonts.packages = with pkgs; [ | |
corefonts | |
ubuntu_font_family | |
fira | |
fira-mono | |
fira-code-nerdfont | |
fira-code-symbols | |
nerd-font-patcher | |
]; | |
# 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: | |
services.fstrim.enable = true; | |
services.nextdns.enable = true; | |
services.avahi.enable = true; | |
services.avahi.nssmdns = true; | |
services.jellyfin = { | |
enable = false; | |
openFirewall = true; | |
}; | |
#services.miniupnpd = { | |
# enable = true; | |
# externalInterface = "enp3s0f1"; | |
# internalInternalIps = "someipshere"; | |
#}; | |
# Enable the OpenSSH daemon. | |
# services.openssh.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 = "23.11"; # Did you read the comment? | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment