Hello,
I am a complete beginner when it comes to nixos (I switched from endeavour not long ago). When I switched I used kde plasma and everything worked great but then I switched to try hyprland and for some reason my pc now randomly crashes. I haven’t been able to find any sort of pattern as to why it may crash nor have I been able to find any logs which might show where the crash lies. Here are my config files:
#flake.nix
{
description = "My personal Hyprland NixOS config";
inputs = {
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
nvf.url = "github:notashelf/nvf";
rust-overlay = {
url = "github:oxalica/rust-overlay";
inputs.nixpkgs.follows = "nixpkgs";
};
home-manager.url = "github:nix-community/home-manager";
home-manager.inputs.nixpkgs.follows = "nixpkgs";
hyprland.url = "github:hyprwm/Hyprland";
hyprland-plugins = {
url = "github:hyprwm/hyprland-plugins";
inputs.hyprland.follows = "hyprland";
};
hyprpanel = {
url = "github:Jas-SinghFSU/HyprPanel";
inputs.nixpkgs.follows = "nixpkgs";
};
stylix.url = "github:danth/stylix";
};
outputs = { self, nixpkgs, ... } @ inputs: {
nixosConfigurations.max-main = nixpkgs.lib.nixosSystem {
system = "x86_64-linux";
specialArgs = {
inherit inputs;
};
modules = [
./configuration.nix
./hardware-configuration.nix
inputs.home-manager.nixosModules.default
inputs.stylix.nixosModules.stylix
];
};
};
}
#configuration.nix
{
pkgs,
inputs,
...
}: {
nix.settings.experimental-features = ["nix-command" "flakes"];
nixpkgs.config.allowUnfree = true;
nixpkgs.overlays = [
inputs.hyprpanel.overlay
inputs.rust-overlay.overlays.default
];
environment.systemPackages = [
pkgs.nushell
pkgs.wl-clipboard
pkgs.rust-bin.stable.latest.default
pkgs.xdg-desktop-portal-hyprland
pkgs.xdg-desktop-portal-gtk
pkgs.kdePackages.xdg-desktop-portal-kde
pkgs.gvfs
];
services.gvfs.enable = true;
services.devmon.enable = true;
programs.firefox.enable = true;
programs.hyprland = {
enable = true;
package = inputs.hyprland.packages.${pkgs.system}.hyprland;
portalPackage = inputs.hyprland.packages.${pkgs.system}.xdg-desktop-portal-hyprland;
withUWSM = true;
};
boot.loader.systemd-boot.enable = true;
boot.loader.efi.canTouchEfiVariables = true;
boot.kernelPackages = pkgs.linuxPackages_latest;
networking.hostName = "max-main";
networking.proxy.noProxy = "127.0.0.1,localhost,internal.domain";
networking.networkmanager.enable = true;
environment.sessionVariables = {
XDG_CURRENT_DESKTOP = "Hyprland";
};
time.timeZone = "Europe/Prague";
i18n.defaultLocale = "en_US.UTF-8";
i18n.extraLocaleSettings = {
LC_ADDRESS = "cs_CZ.UTF-8";
LC_IDENTIFICATION = "cs_CZ.UTF-8";
LC_MEASUREMENT = "cs_CZ.UTF-8";
LC_MONETARY = "cs_CZ.UTF-8";
LC_NAME = "cs_CZ.UTF-8";
LC_NUMERIC = "cs_CZ.UTF-8";
LC_PAPER = "cs_CZ.UTF-8";
LC_TELEPHONE = "cs_CZ.UTF-8";
LC_TIME = "cs_CZ.UTF-8";
};
services.xserver.enable = true;
services.printing.enable = true;
services.displayManager.sddm.enable = true;
services.xserver.xkb = {
layout = "cz";
variant = "";
options = "caps:escape";
};
console.keyMap = "cz-lat2";
security.rtkit.enable = true;
services.pipewire = {
enable = true;
alsa.enable = true;
alsa.support32Bit = true;
pulse.enable = true;
jack.enable = true;
};
system.activationScripts.cleanBackups = ''
echo "Removing .backup_nix files..."
find /home/maxag -type f -name "*.backup_nix" -delete
'';
users.users.maxag = {
isNormalUser = true;
description = "Max Ag";
extraGroups = ["networkmanager" "wheel" "video"];
shell = pkgs.nushell;
};
home-manager = {
useUserPackages = true;
useGlobalPkgs = true;
extraSpecialArgs = {inherit inputs;};
backupFileExtension = "backup_nix";
users.maxag = {
imports = [
./home.nix
];
};
};
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
};
system.stateVersion = "25.05";
}
#home.nix
{
pkgs,
inputs,
...
}: {
home.username = "maxag";
home.homeDirectory = "/home/maxag";
imports = [
inputs.hyprpanel.homeManagerModules.hyprpanel
inputs.nvf.homeManagerModules.default
];
programs.home-manager.enable = true;
home.stateVersion = "25.05";
home.sessionVariables.NIXOS_OZONE_WL = "1";
wayland.windowManager.hyprland = {
enable = true;
systemd.enable = true;
systemd.variables = ["--all"];
package = null;
xwayland.enable = true;
settings = {
exec-once = [
"dbus-update-activation-environment --all --systemd WAYLAND_DISPLAY XDG_CURRENT_DESKTOP"
"systemctl --user restart xdg-desktop-portal"
"wl-clip-persist --clipboard both &"
"wl-paste --watch cliphist store &"
];
input = {
kb_layout = "cz";
kb_options = "caps:escape";
numlock_by_default = true;
sensitivity = 0;
touchpad = {
natural_scroll = true;
};
};
misc = {
disable_hyprland_logo = true;
layers_hog_keyboard_focus = true;
animate_manual_resizes = true;
enable_swallow = true;
focus_on_activate = true;
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";
};
general = {
"$mainMod" = "SUPER";
layout = "dwindle";
gaps_in = 5;
gaps_out = 5;
border_size = 3;
no_border_on_floating = false;
};
decoration = {
rounding = 7;
active_opacity = 1.0;
inactive_opacity = 1.0;
fullscreen_opacity = 1.0;
blur.enabled = false;
shadow.enabled = false;
};
animations = {
enabled = true;
bezier = [
"myBezier, 0.05, 0.9, 0.1, 1.05"
];
animation = [
"windows, 1, 7, myBezier"
"windowsOut, 1, 7, default, popin 80%"
"border, 1, 10, default"
"borderangle, 1, 8, default"
"fade, 1, 7, default"
"workspaces, 1, 6, default"
];
};
binds = {
movefocus_cycles_fullscreen = true;
};
bind = [
# keybindings
"$mainMod, Return, exec, foot"
"$mainMod, B, exec, firefox"
"$mainMod, Q, killactive,"
"$mainMod, F, fullscreen, 0"
"$mainMod SHIFT, F, fullscreen, 1"
"$mainMod, W, togglefloating"
"$mainMod, A, exec, fuzzel"
"$mainMod, P, pseudo,"
"$mainMod, E, exec, dolphin"
"$mainMod, C, exec, hyprpicker -a"
"$mainMod, code:23, swapsplit"
"$mainMod, code:66, togglesplit"
# switch focus
"$mainMod, left, movefocus, l"
"$mainMod, right, movefocus, r"
"$mainMod, up, movefocus, u"
"$mainMod, down, movefocus, d"
"$mainMod, h, movefocus, l"
"$mainMod, j, movefocus, d"
"$mainMod, k, movefocus, u"
"$mainMod, l, movefocus, r"
"$mainMod, left, alterzorder, top"
"$mainMod, right, alterzorder, top"
"$mainMod, up, alterzorder, top"
"$mainMod, down, alterzorder, top"
"$mainMod, h, alterzorder, top"
"$mainMod, j, alterzorder, top"
"$mainMod, k, alterzorder, top"
"$mainMod, l, alterzorder, top"
# switch workspace
"$mainMod, code:10, workspace, 1"
"$mainMod, code:11, workspace, 2"
"$mainMod, code:12, workspace, 3"
"$mainMod, code:13, workspace, 4"
"$mainMod, code:14, workspace, 5"
"$mainMod, code:15, workspace, 6"
"$mainMod, code:16, workspace, 7"
"$mainMod, code:17, workspace, 8"
"$mainMod, code:18, workspace, 9"
"$mainMod, code:19, workspace, 10"
# same as above, but switch to the workspace
"$mainMod SHIFT, code:10, movetoworkspacesilent, 1"
"$mainMod SHIFT, code:11, movetoworkspacesilent, 2"
"$mainMod SHIFT, code:12, movetoworkspacesilent, 3"
"$mainMod SHIFT, code:13, movetoworkspacesilent, 4"
"$mainMod SHIFT, code:14, movetoworkspacesilent, 5"
"$mainMod SHIFT, code:15, movetoworkspacesilent, 6"
"$mainMod SHIFT, code:16, movetoworkspacesilent, 7"
"$mainMod SHIFT, code:17, movetoworkspacesilent, 8"
"$mainMod SHIFT, code:18, movetoworkspacesilent, 9"
"$mainMod SHIFT, code:19, movetoworkspacesilent, 10"
# window control
"$mainMod SHIFT, left, movewindow, l"
"$mainMod SHIFT, right, movewindow, r"
"$mainMod SHIFT, up, movewindow, u"
"$mainMod SHIFT, down, movewindow, d"
"$mainMod SHIFT, h, movewindow, l"
"$mainMod SHIFT, j, movewindow, d"
"$mainMod SHIFT, k, movewindow, u"
"$mainMod SHIFT, l, movewindow, r"
"$mainMod CTRL, left, resizeactive, -80 0"
"$mainMod CTRL, right, resizeactive, 80 0"
"$mainMod CTRL, up, resizeactive, 0 -80"
"$mainMod CTRL, down, resizeactive, 0 80"
"$mainMod CTRL, h, resizeactive, -80 0"
"$mainMod CTRL, j, resizeactive, 0 80"
"$mainMod CTRL, k, resizeactive, 0 -80"
"$mainMod CTRL, l, resizeactive, 80 0"
"$mainMod ALT, left, moveactive, -80 0"
"$mainMod ALT, right, moveactive, 80 0"
"$mainMod ALT, up, moveactive, 0 -80"
"$mainMod ALT, down, moveactive, 0 80"
"$mainMod ALT, h, moveactive, -80 0"
"$mainMod ALT, j, moveactive, 0 80"
"$mainMod ALT, k, moveactive, 0 -80"
"$mainMod ALT, l, moveactive, 80 0"
# media and volume controls
# ",XF86AudioMute,exec, pamixer -t"
",XF86AudioPlay,exec, playerctl play-pause"
",XF86AudioNext,exec, playerctl next"
",XF86AudioPrev,exec, playerctl previous"
",XF86AudioStop,exec, playerctl stop"
];
# mouse binding
bindm = [
"$mainMod, mouse:272, movewindow"
"$mainMod, mouse:273, resizewindow"
];
windowrule = [
# "float,class:^(mpv)$"
];
workspace = [
"1, monitor:DP-1"
"2, monitor:DP-2"
];
};
extraConfig = "
monitor=DP-1,2560x1440@120,0x0,1
monitor=DP-2,1920x1080@60,-1920x300,1
debug:disable_logs = false
xwayland {
force_zero_scaling = true
}
";
};
programs.hyprpanel = {
enable = true;
hyprland.enable = true;
overwrite.enable = true;
settings = {
bar.launcher.autoDetectIcon = true;
bar.workspaces.show_icons = true;
menus.clock = {
time = {
military = true;
hideSeconds = true;
};
weather.unit = "metric";
};
menus.dashboard.directories.enabled = false;
menus.dashboard.stats.enable_gpu = true;
theme.bar.transparent = true;
};
};
home.packages = [
pkgs.libreoffice
pkgs.hyprpicker
pkgs.wl-clip-persist
pkgs.cliphist
pkgs.wf-recorder
pkgs.slurp
pkgs.grim
pkgs.wl-clipboard
pkgs.fuzzel
pkgs.kdePackages.kate
pkgs.kdePackages.dolphin
pkgs.kdePackages.ark
pkgs.trilium-next-desktop
pkgs.dotnetCorePackages.sdk_8_0_3xx-bin
pkgs.oh-my-posh
pkgs.zellij
pkgs.gcc
pkgs.wineWowPackages.staging
pkgs.btop
pkgs.fastfetch
pkgs.krita
pkgs.mpv
pkgs.inkscape
pkgs.discord
pkgs.heroic
(pkgs.prismlauncher.override {
jdks = [
pkgs.temurin-bin-21
pkgs.temurin-bin-8
pkgs.temurin-bin-17
];
})
pkgs.godot
];
programs.fuzzel.enable = true;
programs.btop.enable = true;
stylix = {
enable = true;
base16Scheme = "${pkgs.base16-schemes}/share/themes/catppuccin-macchiato.yaml";
cursor = {
package = pkgs.bibata-cursors;
name = "Bibata-Modern-Ice";
size = 14;
};
fonts = {
sizes = {
applications = 10;
desktop = 10;
terminal = 9;
popups = 8;
};
monospace = {
package = pkgs.nerd-fonts.jetbrains-mono;
name = "JetBrainsMono Nerd Font Mono";
};
sansSerif = {
package = pkgs.dejavu_fonts;
name = "DejaVu Sans";
};
serif = {
package = pkgs.dejavu_fonts;
name = "DejaVu Serif";
};
};
polarity = "dark";
image = ./assets/wallpaper.png;
};
programs.zellij.enable = true;
programs.zellij.enableBashIntegration = false;
programs.nvf = {
enable = true;
settings.vim = {
useSystemClipboard = true;
diagnostics.config.virtual_text = true;
options = {
tabstop = 2;
autoindent = true;
shiftwidth = 2;
};
statusline.lualine.enable = true;
telescope.enable = true;
autocomplete.nvim-cmp.enable = true;
languages = {
enableLSP = true;
enableTreesitter = true;
enableFormat = true;
html.enable = true;
html.treesitter.autotagHtml = true;
nix.enable = true;
rust.enable = true;
ts.enable = true;
csharp.enable = true;
zig.enable = true;
};
};
};
programs.foot = {
enable = true;
settings.main = {
term = "xterm-256color";
};
};
programs.git = {
enable = true;
userEmail = ""; # intentionally deleted
userName = ""; # intentionally deleted
extraConfig.credential.helper = "store";
extraConfig.credential."https://github.com".username = "maxstrb";
extraConfig = {
init.defaultBranch = "main";
};
};
programs.nushell = {
enable = true;
extraConfig = ''
if "ZELLIJ" in $env == false {
zellij
exit
}
def garbage [] {
sudo nix-collect-garbage --delete-old
sudo nixos-rebuild switch --flake /home/maxag/.nix-config
}
'';
settings = {
show_banner = false;
};
shellAliases = {
c = "clear";
zel = "zellij";
rebuild = "sudo nixos-rebuild switch --flake /home/maxag/.nix-config";
home = "nvim /home/maxag/.nix-config/home.nix";
config = "nvim /home/maxag/.nix-config/configuration.nix";
};
};
programs.oh-my-posh = {
enable = true;
useTheme = "catppuccin_macchiato";
enableNushellIntegration = true;
enableBashIntegration = true;
};
programs.bash.enable = true;
home.file.".config/kdeglobals".text = ''
[General]
TerminalApplication=foot
'';
}
I am posting the whole thing because I have no idea why the crash my occur so I don’t want to leave anything out.
Also anytime I rebuild I get this message
evaluation warning: maxag profile: xdg-desktop-portal 1.17 reworked how portal implementations are loaded, you
should either set `xdg.portal.config` or `xdg.portal.configPackages`
to specify which portal backend to use for the requested interface.
https://github.com/flatpak/xdg-desktop-portal/blob/37a6f7c8b8e08b9861f05e172cd4e0d07a832c4d/doc/portals.conf.rst.in
If you simply want to keep the behaviour in < 1.17, which uses the first
portal implementation found in lexicographical order, use the following:
xdg.portal.config.common.default = "*";
I would be grateful to anyone who might suggest where to look or what to check.
(Also if you think I should change something about my config files as a whole I would love any tips from more experienced nixos users)