I’m still actively working on my config but I want to ask if there are any problems with it? and no I don’t want to split it into files
System:
Host: NixOS Kernel: 6.11.5-zen1 arch: x86_64 bits: 64
Desktop: Hyprland v: N/A Distro: NixOS 24.11 (Vicuna)
Machine:
Type: Desktop Mobo: ASRock model: B650M PG Lightning
UEFI: American Megatrends LLC. v: 2.08 date: 03/01/2024
CPU:
Info: 6-core model: AMD Ryzen 5 8400F bits: 64 type: MT MCP cache: L2: 6 MiB
Speed (MHz): avg: 1049 min/max: 400/4757 cores: 1: 400 2: 2999 3: 400
4: 3000 5: 400 6: 400 7: 400 8: 400 9: 400 10: 400 11: 2998 12: 400
Graphics:
Device-1: NVIDIA GP107 [GeForce GTX 1050 Ti] driver: nvidia v: 550.40.79
Display: wayland server: X.org v: 1.21.1.13 with: Xwayland v: 24.1.4
compositor: Hyprland driver: gpu: nvidia,nvidia-nvswitch
resolution: 1920x1080~60Hz
API: EGL v: 1.5 drivers: nvidia,swrast,zink
platforms: gbm,wayland,x11,surfaceless,device
API: OpenGL v: 4.6.0 compat-v: 4.5 vendor: nvidia mesa v: 550.40.79
renderer: NVIDIA GeForce GTX 1050 Ti/PCIe/SSE2
Audio:
Device-1: NVIDIA GP107GL High Definition Audio driver: snd_hda_intel
Device-2: AMD Family 17h/19h HD Audio driver: snd_hda_intel
API: ALSA v: k6.11.5-zen1 status: kernel-api
Server-1: PipeWire v: 1.2.5 status: active
Network:
Device-1: Realtek RTL8125 2.5GbE driver: r8169
IF: enp6s0 state: up speed: 1000 Mbps duplex: full
Drives:
Local Storage: total: 927.81 GiB used: 77.02 GiB (8.3%)
ID-1: /dev/nvme0n1 vendor: Lexar model: SSD NM620 256GB size: 238.47 GiB
ID-2: /dev/sda vendor: Seagate model: ST3500413AS size: 465.76 GiB
ID-3: /dev/sdb vendor: Patriot model: Burst size: 223.57 GiB
Partition:
ID-1: / size: 216.66 GiB used: 76.96 GiB (35.5%) fs: ext4
dev: /dev/nvme0n1p2
ID-2: /boot size: 511 MiB used: 63.5 MiB (12.4%) fs: vfat
dev: /dev/nvme0n1p1
Swap:
ID-1: swap-1 type: zram size: 15.25 GiB used: 0 KiB (0.0%) dev: /dev/zram0
ID-2: swap-2 type: partition size: 16.77 GiB used: 0 KiB (0.0%)
dev: /dev/nvme0n1p3
Sensors:
Src: /sys System Temperatures: cpu: 28.0 C mobo: 25.8 C
Fan Speeds (rpm): N/A
Info:
Memory: total: 16 GiB note: est. available: 15.25 GiB used: 3.82 GiB (25.0%)
Processes: 259 Uptime: 0h 20m Shell: Zsh inxi: 3.3.35
{
description = "";
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
nixpkgs-stable.url = "github:NixOS/nixpkgs/nixos-24.05";
alejandra.url = "github:kamadorueda/alejandra/3.0.0";
hyprland.url = "github:hyprwm/Hyprland";
hypr-contrib.url = "github:hyprwm/contrib";
hyprpicker.url = "github:hyprwm/hyprpicker";
hyprmag.url = "github:SIMULATAN/hyprmag";
disko = {
url = "github:nix-community/disko";
inputs.nixpkgs.follows = "nixpkgs";
};
home-manager = {
url = "github:nix-community/home-manager";
inputs.nixpkgs.follows = "nixpkgs";
};
spicetify-nix = {
url = "github:gerg-l/spicetify-nix";
inputs.nixpkgs.follows = "nixpkgs";
};
};
outputs = {
self,
nixpkgs,
home-manager,
nixpkgs-stable,
...
} @ inputs: let
user = "q";
host = "NixOS";
system = "x86_64-linux";
pkgs = import nixpkgs {
inherit system;
config.allowUnfree = true;
};
stable = import nixpkgs-stable {
inherit system;
config.allowUnfree = true;
};
in {
nixosConfigurations.${host} = nixpkgs.lib.nixosSystem {
system = system;
modules = [
({
config,
pkgs,
lib,
...
}: {
xdg.portal = {
enable = true;
xdgOpenUsePortal = true;
wlr.enable = true;
config.common.default = "*";
extraPortals = with pkgs; [
xdg-desktop-portal
xdg-desktop-portal-wlr
xdg-desktop-portal-hyprland
];
};
boot = {
consoleLogLevel = 3;
tmp.cleanOnBoot = true;
plymouth.enable = true;
loader = {
timeout = 2;
systemd-boot.enable = true;
efi.canTouchEfiVariables = true;
};
extraModprobeConfig = ''
options nvidia-drm modeset=1
'';
kernelParams = [
"nvidia.NVreg_UsePageAttributeTable=1"
"nvidia.NVreg_PreserveVideoMemoryAllocations=1"
"nvidia_drm.modeset=1"
];
kernelModules = [
"nvidia"
"nvidia_modeset"
"nvidia_uvm"
"nvidia_drm"
];
blacklistedKernelModules = ["nouveau"];
kernelPackages = pkgs.linuxPackages_zen;
};
hardware = {
graphics = {
enable = true;
extraPackages = with pkgs; [
nvidia-vaapi-driver
vaapiVdpau
mesa
mesa.drivers
vdpauinfo
vulkan-tools
vulkan-loader
libva
];
};
pulseaudio.enable = false;
nvidia = {
modesetting.enable = true;
powerManagement.enable = true;
open = false;
nvidiaSettings = true;
package = config.boot.kernelPackages.nvidiaPackages.vulkan_beta;
};
enableRedistributableFirmware = true;
};
nixpkgs = {
overlays = [
];
config = {
allowUnfree = true;
allowBroken = true;
cudaSupport = true;
allowInsecure = false;
packageOverrides = pkgs: {};
permittedInsecurePackages = [
];
};
};
security = {
sudo = {
enable = true;
execWheelOnly = true;
extraConfig = ''
Defaults targetpw
'';
};
rtkit.enable = true;
polkit.enable = true;
};
services = {
logind.extraConfig = ''
# don’t shutdown when power button is short-pressed
# HandlePowerKey=ignore
'';
ollama = {
enable = true;
acceleration = "cuda";
};
fstrim.enable = true;
greetd = {
enable = true;
settings = {
default_session.command = ''
${pkgs.greetd.tuigreet}/bin/tuigreet \
--time \
--asterisks \
--user-menu \
--cmd Hyprland
'';
};
};
gpm.enable = true;
displayManager = {
ly = {
enable = false;
};
autoLogin = {
enable = false;
user = "${user}";
};
};
clamav = {
scanner.enable = true;
updater.enable = true;
fangfrisch.enable = true;
daemon.enable = true;
};
printing = {
enable = true; # Включает систему печати CUPS
webInterface = true; # Включает веб-интерфейс CUPS
startWhenNeeded = true; # Запускает CUPS при необходимости
openFirewall = true; # Открывает порт для доступа к CUPS из сети
browsing = true; # Включает автоматический поиск принтеров в сети
browsed.enable = true; # Включает дополнительный сервис для поиска принтеров
drivers = [pkgs.cnijfilter_4_00]; # Указывает драйвер для принтера
};
libinput.enable = true;
dbus.enable = true;
gvfs.enable = true;
pipewire = {
enable = true;
audio.enable = true;
jack.enable = true;
wireplumber.enable = true;
alsa.enable = true;
alsa.support32Bit = true;
pulse.enable = true;
};
xserver = {
enable = true;
videoDrivers = ["nvidia"];
};
};
users = {
defaultUserShell = pkgs.zsh;
users = {
${user} = {
description = "Marian";
isNormalUser = true;
extraGroups = [
"wheel"
"input"
"lp"
"libvirtd"
];
hashedPassword = "$y$j9T$Zkw4AsRu8Om.xr/FoKJRz1$rATrla8D9I7lOagPp76BWHcCa1DHBi.uHOlYuKa0W21";
};
};
};
programs = {
thefuck.enable = true;
dconf.enable = true;
xwayland.enable = true;
nano.enable = false;
hyprland = {
enable = true;
xwayland.enable = true;
};
zsh = {
enable = true;
syntaxHighlighting.enable = true;
autosuggestions.enable = true;
enableCompletion = true;
histSize = 10000;
enableLsColors = true;
};
steam = {
enable = true;
protontricks.enable = true;
remotePlay.openFirewall = true;
localNetworkGameTransfers.openFirewall = true;
dedicatedServer.openFirewall = true;
};
nh = {
enable = true;
clean = {
enable = true;
extraArgs = "--keep-since 7d --keep 5";
};
flake = "/etc/nixos";
};
};
networking = {
hostName = "${host}";
networkmanager.enable = true;
nat = {
enable = true;
externalInterface = "enp6s0";
internalInterfaces = ["wg0"];
};
firewall = {
allowedUDPPorts = [21121];
};
};
zramSwap = {
enable = true;
algorithm = "lz4";
memoryPercent = 100;
priority = 999;
};
systemd = {
oomd.enable = true;
};
time = {timeZone = "Europe/Kiev";};
i18n = {
defaultLocale = "en_US.UTF-8";
extraLocaleSettings = {
LC_ADDRESS = "uk_UA.UTF-8";
LC_IDENTIFICATION = "uk_UA.UTF-8";
LC_MEASUREMENT = "uk_UA.UTF-8";
LC_MONETARY = "uk_UA.UTF-8";
LC_NAME = "uk_UA.UTF-8";
LC_NUMERIC = "uk_UA.UTF-8";
LC_PAPER = "uk_UA.UTF-8";
LC_TELEPHONE = "uk_UA.UTF-8";
LC_TIME = "uk_UA.UTF-8";
};
};
nix = {
settings = {
experimental-features = ["nix-command" "flakes"];
auto-optimise-store = true;
allowed-users = ["${user}"];
warn-dirty = true;
substituters = ["https://nix-gaming.cachix.org"];
trusted-public-keys = [
"nix-gaming.cachix.org-1:nbjlureqMbRAxR1gJ/f3hxemL9svXaZF/Ees8vCUUs4="
];
};
};
fonts = {
fontconfig.enable = true;
packages = with pkgs; [
noto-fonts
noto-fonts-cjk-sans
noto-fonts-emoji
liberation_ttf
overpass
iosevka
nerdfonts
jetbrains-mono
font-awesome
];
};
system.stateVersion = config.system.nixos.release;
})
home-manager.nixosModules.home-manager
{
home-manager = {
extraSpecialArgs = {inherit stable;};
useGlobalPkgs = true;
useUserPackages = true;
users.${user} = {
stable,
config,
pkgs,
lib,
...
}: {
imports = [
inputs.spicetify-nix.homeManagerModules.default
inputs.hyprland.homeManagerModules.default
];
home = {
username = "${user}";
homeDirectory = "/home/${user}";
stateVersion = "24.05";
sessionVariables = {
MOZ_ENABLE_WAYLAND = "1";
QT_QPA_PLATFORM = "xcb";
NIXOS_OZONE_WL = "1";
__GL_GSYNC_ALLOWED = "0";
__GL_VRR_ALLOWED = "0";
_JAVA_AWT_WM_NONEREPARENTING = "1";
DISABLE_QT5_COMPAT = "0";
GDK_BACKEND = "wayland";
WLR_DRM_NO_ATOMIC = "1";
QT_AUTO_SCREEN_SCALE_FACTOR = "1";
QT_WAYLAND_DISABLE_WINDOWDECORATION = "1";
QT_QPA_PLATFORMTHEME = "qt5ct";
QT_STYLE_OVERRIDE = "kvantum";
WLR_BACKEND = "vulkan";
WLR_RENDERER = "vulkan";
LIBVA_DRIVER_NAME = "nvidia";
GBM_BACKEND = "nvidia-drm";
WLR_NO_HARDWARE_CURSORS = "1";
XDG_SESSION_TYPE = "wayland";
SDL_VIDEODRIVER = "wayland";
GTK_THEME = "Gruvbox-Green-Dark";
__GLX_VENDOR_LIBRARY_NAME = "nvidia";
__GLX_RENDERER = "nvidia";
STEAM_EXTRA_COMPAT_TOOLS_PATHS = "\${HOME}/.steam/root/compatibilitytools.d";
};
packages = with pkgs;
[
inputs.alejandra.defaultPackage.${system}
inputs.hypr-contrib.packages.${system}.grimblast
(lutris.override {
extraPkgs = pkgs: [
libunwind
];
})
#(pkgs.discord.override {
# withOpenASAR = true;
# withTTS = true;
# withVencord = true;
#})
pavucontrol
okular
vlc
pipes-rs
ani-cli
gtt
imv
ncdu
nitch
toipe
ttyper
unzip
cbonsai
cmatrix
sl
tty-clock
libreoffice
hexdump
eza
nix-tree
go
pulsemixer
vesktop
gitkraken
killall
libnotify
w3m
tiv
fbida
minecraft
heroic
bottles
protonup-ng
mesa-demos
sublime
tor-browser
xorg.xev
zenity
fastfetch
neofetch
aichat
inxi
rofi-wayland
tree
wpsoffice
zram-generator
nvtopPackages.nvidia
fd
xfce.thunar
]
++ (with stable; [
kotatogram-desktop-with-webkit
]);
};
wayland.windowManager.hyprland = let
runOnce = program: "pgrep ${program} || ${program}";
in {
enable = true;
systemd.enable = true;
settings = {
input = {
kb_layout = "us,ru";
kb_options = "grp:alt_shift_toggle";
sensitivity = 0;
};
general = {
"$mod0" = "SUPER";
gaps_in = 0;
gaps_out = 0;
border_size = 0;
layout = "dwindle";
};
animations = {
enabled = false;
};
misc = {
middle_click_paste = false;
};
dwindle = {
force_split = 0;
special_scale_factor = 1.0;
split_width_multiplier = 1.0;
use_active_for_splits = true;
pseudotile = "yes";
preserve_split = "yes";
};
master = {
new_status = "master";
special_scale_factor = 1;
};
bindm = [
"$mod0, mouse:272, movewindow"
"$mod0, mouse:273, resizewindow"
];
bind = [
"$mod0, Return, exec, kitty"
"$mod0, Q, killactive,"
"$mod0, D, exec, rofi -show drun || pkill rofi"
"$mod0, V, exec, cliphist list | rofi -dmenu -theme-str 'window {width: 50%;}' | cliphist decode | wl-copy"
"$mod0, F, togglefloating,"
"$mod0, R, togglesplit,"
", Print, exec, ${runOnce "grimblast"} --notify copysave screen"
"$mod0, Print, exec, ${runOnce "grimblast"} --notify copysave active"
"SHIFT, Print, exec, ${runOnce "grimblast"} --notify copysave area"
"$mod0, mouse_down, workspace, e-1"
"$mod0, mouse_up, workspace, e+1"
"$mod0, left, movefocus, l"
"$mod0, right, movefocus, r"
"$mod0, up, movefocus, u"
"$mod0, down, movefocus, d"
"$mod0 SHIFT, left, movewindow, l"
"$mod0 SHIFT, right, movewindow, r"
"$mod0 SHIFT, up, movewindow, u"
"$mod0 SHIFT, down, movewindow, d"
"$mod0 CTRL, left, resizeactive, -80 0"
"$mod0 CTRL, right, resizeactive, 80 0"
"$mod0 CTRL, up, resizeactive, 0 -80"
"$mod0 CTRL, down, resizeactive, 0 80"
"$mod0 ALT, left, moveactive, -80 0"
"$mod0 ALT, right, moveactive, 80 0"
"$mod0 ALT, up, moveactive, 0 -80"
"$mod0 ALT, down, moveactive, 0 80"
"$mod0, 1, workspace, 1"
"$mod0, 2, workspace, 2"
"$mod0, 3, workspace, 3"
"$mod0, 4, workspace, 4"
"$mod0, 5, workspace, 5"
"$mod0, 6, workspace, 6"
"$mod0, 7, workspace, 7"
"$mod0, 8, workspace, 8"
"$mod0, 9, workspace, 9"
"$mod0, 0, workspace, 10"
# Moving windows to workspaces silently
"$mod0 SHIFT, 1, movetoworkspacesilent, 1"
"$mod0 SHIFT, 2, movetoworkspacesilent, 2"
"$mod0 SHIFT, 3, movetoworkspacesilent, 3"
"$mod0 SHIFT, 4, movetoworkspacesilent, 4"
"$mod0 SHIFT, 5, movetoworkspacesilent, 5"
"$mod0 SHIFT, 6, movetoworkspacesilent, 6"
"$mod0 SHIFT, 7, movetoworkspacesilent, 7"
"$mod0 SHIFT, 8, movetoworkspacesilent, 8"
"$mod0 SHIFT, 9, movetoworkspacesilent, 9"
"$mod0 SHIFT, 0, movetoworkspacesilent, 10"
];
};
};
qt = {
enable = true;
};
services = {
mako = {
enable = true;
};
cliphist.enable = true;
};
programs = {
qutebrowser.enable = true;
mpv.enable = true;
cava.enable = true;
obs-studio.enable = true;
vscode = {
enable = true;
package = pkgs.vscode-fhs;
extensions = with pkgs.vscode-extensions; [
golang.go
github.copilot
github.copilot-chat
svelte.svelte-vscode
ecmel.vscode-html-css
ms-ceintl.vscode-language-pack-ru
];
};
bat = {
enable = true;
config = {
pager = "less -FR";
theme = "gruvbox-dark";
};
extraPackages = with pkgs.bat-extras; [
batman
batpipe
batgrep
# batdiff
];
};
neovim = {
enable = true;
viAlias = true;
vimAlias = true;
defaultEditor = true;
};
btop = {
enable = true;
settings = {
color_theme = "TTY";
theme_background = false;
update_ms = 100;
};
};
fzf = {
enable = true;
enableZshIntegration = true;
};
git = {
enable = true;
userName = "";
userEmail = "";
};
gh = {
enable = true;
};
spicetify = let
spicePkgs =
inputs.spicetify-nix.legacyPackages.${pkgs.system};
in {
enable = false;
theme = spicePkgs.themes.catppuccin;
colorScheme = "mocha";
enabledExtensions = with spicePkgs.extensions; [
adblock
hidePodcasts
shuffle
];
};
zoxide = {
enable = true;
enableZshIntegration = true;
};
firefox.enable = true;
kitty = {
enable = true;
font = {
name = "JetBrainsMono Nerd Font";
size = 9;
};
settings = {
confirm_os_window_close = 0;
window_padding_width = 0;
scrollback_lines = 10000;
enable_audio_bell = false;
mouse_hide_wait = 60;
};
};
};
xdg = {
userDirs = {
enable = true;
createDirectories = true;
extraConfig = {
XDG_VSC_DIR = "${config.home.homeDirectory}/vscode";
};
};
configFile = {
"cava/config".text = ''
[general]
autosens = 1
overshoot = 0
[color]
gradient = 1
gradient_count = 8
gradient_color_1 = '#99991a'
gradient_color_2 = '#a28e00'
gradient_color_3 = '#ab8200'
gradient_color_4 = '#b37400'
gradient_color_5 = '#bb6600'
gradient_color_6 = '#c25400'
gradient_color_7 = '#c8400d'
gradient_color_8 = '#cd231d'
'';
"rofi/config.rasi".text = ''
* {
background: rgba ( 40, 42, 54, 100 % );
current-line: rgba ( 68, 71, 90, 100 % );
selection: rgba ( 68, 71, 90, 100 % );
foreground: rgba ( 248, 248, 242, 100 % );
comment: rgba ( 98, 114, 164, 100 % );
cyan: rgba ( 139, 233, 253, 100 % );
green: rgba ( 80, 250, 123, 100 % );
orange: rgba ( 255, 184, 108, 100 % );
pink: rgba ( 255, 121, 198, 100 % );
purple: rgba ( 189, 147, 249, 100 % );
red: rgba ( 255, 85, 85, 100 % );
yellow: rgba ( 241, 250, 140, 100 % );
}
* {
selected-normal-background: @cyan;
selected-normal-foreground: @normal-background;
normal-background: @background;
normal-foreground: @foreground;
active-foreground: @selected-normal-background;
alternate-normal-background: @normal-background;
alternate-normal-foreground: @foreground;
urgent-foreground: @red;
urgent-background: @normal-background;
alternate-urgent-background: @urgent-background;
alternate-urgent-foreground: @urgent-foreground;
selected-active-foreground: @selected-normal-foreground;
selected-active-background: @selected-normal-background;
selected-urgent-background: @normal-background;
alternate-active-background: @normal-background;
alternate-active-foreground: @selected-normal-background;
border-color: @selected-normal-background;
separatorcolor: @border-color;
spacing: 2;
background-color: @normal-background;
}
#window {
border: 3;
padding: 9;
}
#mainbox {
background-color: inherit;
border: 0;
padding: 0;
}
#textbox {
text-color: @foreground;
}
#element {
border: 0;
padding: 1px ;
}
#element.normal.normal {
background-color: @normal-background;
text-color: @normal-foreground;
}
#element.normal.urgent {
background-color: @urgent-background;
text-color: @urgent-foreground;
}
#element.normal.active {
background-color: @active-background;
text-color: @active-foreground;
}
#element.selected.normal {
background-color: @selected-normal-background;
text-color: @selected-normal-foreground;
}
#element.selected.urgent {
background-color: @selected-urgent-background;
text-color: @selected-urgent-foreground;
}
#element.selected.active {
background-color: @selected-active-background;
text-color: @selected-active-foreground;
}
#element.alternate.normal {
background-color: @alternate-normal-background;
text-color: @alternate-normal-foreground;
}
#element.alternate.urgent {
background-color: @alternate-urgent-background;
text-color: @alternate-urgent-foreground;
}
#element.alternate.active {
background-color: @alternate-active-background;
text-color: @alternate-active-foreground;
}
#scrollbar {
border: 0;
}
#button.selected {
background-color: @selected-normal-background;
text-color: @selected-normal-foreground;
}
#inputbar {
spacing: 0;
text-color: @normal-foreground;
background-color: inherit;
padding: 1px ;
children: [prompt, textbox-prompt-colon, entry, case-indicator];
}
#case-indicator {
spacing: 0;
text-color: @normal-background;
}
#entry {
spacing: 0;
text-color: @normal-foreground;
}
#prompt {
spacing: 0;
text-color: @normal-foreground;
}
#textbox-prompt-colon {
expand: false;
str: ":";
margin: 0px 0.3em 0em 0em ;
text-color: @normal-foreground;
}
'';
};
};
};
};
}
./hardware-configuration.nix
];
};
};
}