Merge branch 'master' of github.com:Kropatz/dotfiles

This commit is contained in:
Kopatz
2023-12-01 18:37:40 +01:00
18 changed files with 625 additions and 260 deletions

166
.config/hypr/hyprland.conf Normal file
View File

@@ -0,0 +1,166 @@
#
# Please note not all available settings / options are set here.
# For a full list, see the wiki
#
# See https://wiki.hyprland.org/Configuring/Monitors/
monitor=,preferred,auto,auto
# See https://wiki.hyprland.org/Configuring/Keywords/ for more
# Execute your favorite apps at launch
# exec-once = waybar & hyprpaper & firefox
# Source a file (multi-file configs)
# source = ~/.config/hypr/myColors.conf
# Some default env vars.
env = XCURSOR_SIZE,24
# For all categories, see https://wiki.hyprland.org/Configuring/Variables/
input {
kb_layout = de
kb_variant =
kb_model =
kb_options =
kb_rules =
follow_mouse = 1
touchpad {
natural_scroll = yes
}
sensitivity = 0 # -1.0 - 1.0, 0 means no modification.
}
general {
# See https://wiki.hyprland.org/Configuring/Variables/ for more
gaps_in = 5
gaps_out = 20
border_size = 2
col.active_border = rgba(33ccffee) rgba(00ff99ee) 45deg
col.inactive_border = rgba(595959aa)
layout = dwindle
}
decoration {
# See https://wiki.hyprland.org/Configuring/Variables/ for more
rounding = 10
#blur = yes
#blur_size = 3
#blur_passes = 1
#blur_new_optimizations = on
drop_shadow = yes
shadow_range = 4
shadow_render_power = 3
col.shadow = rgba(1a1a1aee)
}
animations {
enabled = no
# Some default animations, see https://wiki.hyprland.org/Configuring/Animations/ for more
bezier = myBezier, 0.05, 0.9, 0.1, 1.05
animation = windows, 1, 7, myBezier
animation = windowsOut, 1, 7, default, popin 80%
animation = border, 1, 10, default
animation = borderangle, 1, 8, default
animation = fade, 1, 7, default
animation = workspaces, 1, 6, default
}
dwindle {
# See https://wiki.hyprland.org/Configuring/Dwindle-Layout/ for more
pseudotile = yes # master switch for pseudotiling. Enabling is bound to mainMod + P in the keybinds section below
preserve_split = yes # you probably want this
}
master {
# See https://wiki.hyprland.org/Configuring/Master-Layout/ for more
new_is_master = true
}
gestures {
# See https://wiki.hyprland.org/Configuring/Variables/ for more
workspace_swipe = on
}
# Example per-device config
# See https://wiki.hyprland.org/Configuring/Keywords/#executing for more
device:epic-mouse-v1 {
sensitivity = -0.5
}
# Example windowrule v1
# windowrule = float, ^(kitty)$
# Example windowrule v2
# windowrulev2 = float,class:^(kitty)$,title:^(kitty)$
# See https://wiki.hyprland.org/Configuring/Window-Rules/ for more
# See https://wiki.hyprland.org/Configuring/Keywords/ for more
$mainMod = SUPER
# Example binds, see https://wiki.hyprland.org/Configuring/Binds/ for more
bind = $mainMod, Q, exec, kitty
bind = $mainMod, C, killactive,
bind = $mainMod, M, exit,
bind = $mainMod, E, exec, thunar
bind = $mainMod, V, togglefloating,
bind = $mainMod, R, exec, wofi --show drun
bind = $mainMod, S, exec, rofi -show drun -show-icons
bind = ALT, SPACE, exec, rofi -show combi
bind = $mainMod, P, pseudo, # dwindle
bind = $mainMod, J, togglesplit, # dwindle
# Move focus with mainMod + arrow keys
bind = $mainMod, left, movefocus, l
bind = $mainMod, right, movefocus, r
bind = $mainMod, up, movefocus, u
bind = $mainMod, down, movefocus, d
# Switch workspaces with mainMod + [0-9]
bind = $mainMod, 1, workspace, 1
bind = $mainMod, 2, workspace, 2
bind = $mainMod, 3, workspace, 3
bind = $mainMod, 4, workspace, 4
bind = $mainMod, 5, workspace, 5
bind = $mainMod, 6, workspace, 6
bind = $mainMod, 7, workspace, 7
bind = $mainMod, 8, workspace, 8
bind = $mainMod, 9, workspace, 9
bind = $mainMod, 0, workspace, 10
# Move active window to a workspace with mainMod + SHIFT + [0-9]
bind = $mainMod SHIFT, 1, movetoworkspace, 1
bind = $mainMod SHIFT, 2, movetoworkspace, 2
bind = $mainMod SHIFT, 3, movetoworkspace, 3
bind = $mainMod SHIFT, 4, movetoworkspace, 4
bind = $mainMod SHIFT, 5, movetoworkspace, 5
bind = $mainMod SHIFT, 6, movetoworkspace, 6
bind = $mainMod SHIFT, 7, movetoworkspace, 7
bind = $mainMod SHIFT, 8, movetoworkspace, 8
bind = $mainMod SHIFT, 9, movetoworkspace, 9
bind = $mainMod SHIFT, 0, movetoworkspace, 10
# Scroll through existing workspaces with mainMod + scroll
bind = $mainMod, mouse_down, workspace, e+1
bind = $mainMod, mouse_up, workspace, e-1
# Move/resize windows with mainMod + LMB/RMB and dragging
bindm = $mainMod, mouse:272, movewindow
bindm = $mainMod, mouse:273, resizewindow
bind = ALT, Tab, cyclenext,
bind = ALT, Tab, bringactivetotop,
exec-once= bash ~/.config/hypr/start.sh

10
.config/hypr/start.sh Executable file
View File

@@ -0,0 +1,10 @@
#!/usr/bin/env bash
# wallpaper daemon
swww init &
nm-applet --indicator &
waybar &
dunst &

24
flake.lock generated
View File

@@ -138,11 +138,11 @@
},
"nixos-hardware": {
"locked": {
"lastModified": 1699159446,
"narHash": "sha256-cL63IjsbPl2otS7R4kdXbVOJOXYMpGw5KGZoWgdCuCM=",
"lastModified": 1701020860,
"narHash": "sha256-NwnRn04C8s+hH+KdVtGmVB1FFNIG7DtPJmQSCBDaET4=",
"owner": "NixOS",
"repo": "nixos-hardware",
"rev": "627bc9b88256379578885a7028c9e791c29fb581",
"rev": "b006ec52fce23b1d57f6ab4a42d7400732e9a0a2",
"type": "github"
},
"original": {
@@ -161,11 +161,11 @@
]
},
"locked": {
"lastModified": 1698222534,
"narHash": "sha256-iF9C7C7eT8LVVWx5IOZ/8KKJT8AIw9A5aBA6vqS18l8=",
"lastModified": 1700665566,
"narHash": "sha256-+AU2AdpA2eHlVwH3LL1qCWCTJyOJwCw/7pwampP3Jy8=",
"owner": "nix-community",
"repo": "NixOS-WSL",
"rev": "a058cff4b09b3a398d8caa379b4dc96cfedd98c9",
"rev": "a9287f7191467138d6203ea44b3a0b9c745cb145",
"type": "github"
},
"original": {
@@ -192,11 +192,11 @@
},
"nixpkgs-unstable": {
"locked": {
"lastModified": 1699099776,
"narHash": "sha256-X09iKJ27mGsGambGfkKzqvw5esP1L/Rf8H3u3fCqIiU=",
"lastModified": 1700794826,
"narHash": "sha256-RyJTnTNKhO0yqRpDISk03I/4A67/dp96YRxc86YOPgU=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "85f1ba3e51676fa8cc604a3d863d729026a6b8eb",
"rev": "5a09cb4b393d58f9ed0d9ca1555016a8543c2ac8",
"type": "github"
},
"original": {
@@ -223,11 +223,11 @@
},
"nixpkgs_3": {
"locked": {
"lastModified": 1700671922,
"narHash": "sha256-XPh/AHD14O+oaztjSb53c3Gh9K1JQHNBOTdn0dvtJpM=",
"lastModified": 1701058557,
"narHash": "sha256-fux7HlrnoNs93MN0kET4AfiYwg/expoasndRCFeDRyk=",
"owner": "nixos",
"repo": "nixpkgs",
"rev": "4784a12198f7434971d5bb8aa6f111acef662ff4",
"rev": "070b5cf9f70bc7ef2dfd739a1f7d6c563fe64bd1",
"type": "github"
},
"original": {

View File

@@ -23,7 +23,7 @@
nixpkgs-unstable,
agenix,
home-manager,
nixinate
nixinate,
}@inputs:
let
system = "x86_64-linux";
@@ -68,6 +68,7 @@
./modules/kavita.nix
./modules/netdata.nix
./modules/tmpfs.nix
./modules/anki.nix
### Hardware ###
./modules/hardware/ssd.nix
home-manager.nixosModules.home-manager
@@ -84,21 +85,26 @@
];
specialArgs = {
## Custom variables (e.g. ip, interface, etc)
vars = (import ./systems/server/userdata.nix);
vars = import ./systems/userdata-default.nix // import ./systems/server/userdata.nix;
inherit inputs ;
};
};
nixosConfigurations."kop-pc" = nixpkgs.lib.nixosSystem {
inherit system;
specialArgs = {
vars = import ./systems/userdata-default.nix // import ./systems/pc/userdata.nix;
inherit inputs ;
};
modules = [
./users/kopatz.nix
./modules/graphical/plasma.nix
./modules/graphical/hyprland.nix
./modules/graphical/shared.nix
./modules/hardware/nvidia.nix
./modules/hardware/ssd.nix
./modules/hardware/firmware.nix
# use latest kernel
./modules/kernel.nix
./modules/nix/settings.nix
./modules/nix/index.nix
./modules/nix/ld.nix
@@ -120,13 +126,15 @@
inherit system;
specialArgs = {
## Custom variables (e.g. ip, interface, etc)
vars = (import ./systems/laptop/userdata.nix);
vars = import ./systems/userdata-default.nix // import ./systems/laptop/userdata.nix;
inherit inputs;
};
modules = [
./users/kopatz.nix
({ config, pkgs, ... }: { nixpkgs.overlays = [ overlay-unstable ]; })
# Todo: refactor file layout
./modules/graphical/gnome.nix
./modules/graphical/hyprland.nix
./modules/graphical/shared.nix
./laptop/configuration.nix
./modules/virt-manager.nix
./modules/ssh.nix
@@ -136,6 +144,7 @@
./modules/thunderbolt.nix
./modules/rdp.nix
./modules/tmpfs.nix
./modules/nix/settings.nix
nixos-hardware.nixosModules.dell-xps-15-7590-nvidia
agenix.nixosModules.default
home-manager.nixosModules.home-manager
@@ -150,13 +159,16 @@
};
modules = [
./users/kopatz.nix
({ config, pkgs, ... }: { nixpkgs.overlays = [ overlay-unstable ]; })
./laptop/configuration.nix
./modules/graphical/shared.nix
./modules/virt-manager.nix
./modules/ssh.nix
./modules/wake-on-lan.nix
./modules/static-ip.nix
./modules/no-sleep-lid-closed.nix
./modules/thunderbolt.nix
./modules/nix/settings.nix
nixos-hardware.nixosModules.dell-xps-15-7590
agenix.nixosModules.default
home-manager.nixosModules.home-manager

View File

@@ -125,6 +125,7 @@ bind = $mainMod, E, exec, dolphin
bind = $mainMod, V, togglefloating,
bind = $mainMod, R, exec, wofi --show drun
bind = $mainMod, S, exec, rofi -show drun -show-icons
bind = ALT, SPACE, exec, rofi -show combi
bind = $mainMod, P, pseudo, # dwindle
bind = $mainMod, J, togglesplit, # dwindle

View File

@@ -5,6 +5,7 @@
imports =
[
./main.nix
./gnome.nix
];
services.xserver = {
@@ -12,48 +13,5 @@
xkbVariant = "";
enable = true;
displayManager.gdm.enable = true;
desktopManager.gnome.enable = true;
};
environment.gnome.excludePackages = (with pkgs; [
gnome-photos
gnome-tour
]) ++ (with pkgs.gnome; [
cheese # webcam tool
gnome-music
gnome-terminal
gedit # text editor
epiphany # web browser
#geary # email reader
evince # document viewer
gnome-characters
totem # video player
tali # poker game
iagno # go game
hitori # sudoku game
atomix # puzzle game
]);
environment.systemPackages = with pkgs; [
wmctrl
gnome.mutter
gnome.adwaita-icon-theme
gnome.gnome-settings-daemon
gnome.gnome-tweaks
gnome.dconf-editor
gruvbox-gtk-theme
colloid-icon-theme
gnomeExtensions.appindicator
gnomeExtensions.just-perfection
gnomeExtensions.system-monitor
gnomeExtensions.dash2dock-lite
gnomeExtensions.dash-to-dock
gnomeExtensions.vitals
gnomeExtensions.rounded-window-corners
gnomeExtensions.wallpaper-switcher
gnomeExtensions.backslide
gnomeExtensions.nextcloud-folder
gnomeExtensions.tray-icons-reloaded
gnomeExtensions.blur-my-shell
];
}

View File

@@ -1,17 +1,10 @@
{ config, pkgs, ... }:
{
imports =
[
./main.nix
];
services.xserver = {
layout = "at";
xkbVariant = "";
enable = true;
displayManager.gdm.enable = true;
desktopManager.gnome.enable = true;
};

View File

@@ -1,69 +0,0 @@
{ config, pkgs, ... }:
let
patchedWaybar = pkgs.waybar.overrideAttrs (oldAttrs: {
mesonFlags = oldAttrs.mesonFlags ++ [ "-Dexperimental=true" ];
});
in
{
imports =
[ # Include the results of the hardware scan.
./main.nix
];
services.xserver = {
layout = "at";
xkbVariant = "";
enable = true;
displayManager.sddm.enable = true;
};
programs.hyprland = {
enable = true;
nvidiaPatches = true;
xwayland.enable = true;
};
environment.sessionVariables = {
# If your cursor becomes invisible
#WLR_NO_HARDWARE_CURSORS = "1";
# Hint electron apps to use wayland
NIXOS_OZONE_WL = "1";
WLR_DRM_DEVICES = "/dev/dri/card0";
};
hardware = {
# Opengl
opengl.enable = true;
# Most wayland compositors need this
nvidia.modesetting.enable = true;
};
# XDG portal
xdg.portal.enable = true;
xdg.portal.extraPortals = [ pkgs.xdg-desktop-portal-gtk ];
# List packages installed in system profile. To search, run:
# $ nix search wget
environment.systemPackages = with pkgs; [
# hyprland stuff
patchedWaybar
dunst
swww
kitty
rofi-wayland
libnotify
networkmanagerapplet
wayland
#qt5.qtwayland
#qt6.qmake
#qt6.qtwayland
#waybar
#xdg-desktop-portal-hyprland
#xdg-desktop-portal-gtk
#xdg-utils
#xwayland
];
}

View File

@@ -3,16 +3,6 @@
# and in the NixOS manual (accessible by running nixos-help).
{ config, pkgs, inputs, ... }:
let
keepassWithPlugins = pkgs.keepass.override {
plugins = [
pkgs.keepass-keepassrpc
];
};
in
{
imports =
[ # Include the results of the hardware scan.
@@ -24,9 +14,6 @@ in
#<home-manager/nixos>
];
# storage optimization
nix.optimise.automatic = true;
# Bootloader.
boot.loader.systemd-boot.enable = true;
boot.loader.efi.canTouchEfiVariables = true;
@@ -83,76 +70,6 @@ in
# Enable touchpad support (enabled default in most desktopManager).
services.xserver.libinput.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.kdeconnect.enable = true;
fonts.fontDir.enable = true;
fonts.fonts = with pkgs; [
nerdfonts
#font-awesome
];
networking.firewall = {
enable = true;
allowedTCPPortRanges = [
{ from = 1714; to = 1764; } # KDE Connect
];
allowedUDPPortRanges = [
{ from = 1714; to = 1764; } # KDE Connect
];
};
# Allow unfree packages
nixpkgs.config.allowUnfree = true;
nix.settings.experimental-features = [ "nix-command" "flakes" ];
# List packages installed in system profile. To search, run:
# $ nix search wget
environment.systemPackages = with pkgs; [
# vim # Do not forget to add an editor to edit configuration.nix! The Nano editor is also installed by default.
# wget
wget
nixos-option
kate
keepassWithPlugins
jetbrains.idea-ultimate
jetbrains.rider
dotnet-sdk_7
dotnet-runtime_7
neovim
htop
btop
git
xfce.thunar
killall
xclip
usbutils
bun
inputs.agenix.packages."x86_64-linux".default
insomnia
remmina
nextcloud-client
#podman-compose
#arion # docker
neofetch
thunderbird
rofi
pdfgrep
taisei
ncdu
localsend
element-desktop
];
environment.sessionVariables = {
DOTNET_ROOT = "${pkgs.dotnet-sdk_7}";
};
### docker
virtualisation.docker.enable = true;

7
modules/anki.nix Normal file
View File

@@ -0,0 +1,7 @@
{
services.ankisyncd = {
enable = true;
port = 27701;
openFirewall = true;
};
}

View File

@@ -0,0 +1,347 @@
{ config, pkgs, lib, inputs, vars, ... }:
let
patchedWaybar = pkgs.waybar.overrideAttrs (oldAttrs: {
mesonFlags = oldAttrs.mesonFlags ++ [ "-Dexperimental=true" ];
});
patchedHyprland = pkgs.hyprland.overrideAttrs (oldAttrs: {
version = "0.28.0";
});
in
{
services.xserver = {
layout = vars.layout;
xkbVariant = vars.variant;
enable = true;
displayManager = lib.mkIf (!config.services.xserver.displayManager.gdm.enable) {
sddm.enable = true;
};
};
environment.sessionVariables = {
# If your cursor becomes invisible
#WLR_NO_HARDWARE_CURSORS = "1";
# Hint electron apps to use wayland
NIXOS_OZONE_WL = "1";
WLR_NO_HARDWARE_CURSORS="1";
WLR_DRM_DEVICES = "/dev/dri/card0";
};
hardware = {
# Opengl
opengl.enable = true;
# Most wayland compositors need this
nvidia.modesetting.enable = true;
};
programs.hyprland = {
enable = true;
enableNvidiaPatches = true;
xwayland.enable = true;
package = patchedHyprland;
};
home-manager.users.kopatz = {
#systemd.user.services.waybar.Service.ExecStart = lib.mkForce "${pkgs.waybar}/bin/waybar -b 0";
wayland.windowManager.hyprland = {
enable = true;
package = patchedHyprland;
settings = {
#
# Please note not all available settings / options are set here.
# For a full list, see the wiki
#
# See https://wiki.hyprland.org/Configuring/Monitors/
monitor = [
"HDMI-A-1,1920x1080@60,0x0,1"
"DP-1,2560x1440@144,1920x0,1"
",preferred,auto,auto"
];
# See https://wiki.hyprland.org/Configuring/Keywords/ for more
# Execute your favorite apps at launch
# exec-once = waybar & hyprpaper & firefox
# Source a file (multi-file configs)
# source = ~/.config/hypr/myColors.conf
# Some default env vars.
env = "XCURSOR_SIZE,24";
# For all categories, see https://wiki.hyprland.org/Configuring/Variables/
input = {
kb_layout = vars.layout;
kb_variant = vars.variant;
kb_model = "";
kb_options = "";
kb_rules = "";
follow_mouse = 1;
touchpad = {
natural_scroll = true;
};
sensitivity = 0; # -1.0 - 1.0, 0 means no modification.
};
general = {
# See https://wiki.hyprland.org/Configuring/Variables/ for more
gaps_in = 5;
gaps_out = 20;
border_size = 2;
"col.active_border" = "rgba(33ccffee) rgba(00ff99ee) 45deg";
"col.inactive_border" = "rgba(595959aa)";
layout = "dwindle";
};
decoration = {
# See https://wiki.hyprland.org/Configuring/Variables/ for more
rounding = 10;
#blur = yes
#blur_size = 3
#blur_passes = 1
#blur_new_optimizations = on
drop_shadow = true;
shadow_range = 4;
shadow_render_power = 3;
"col.shadow" = "rgba(1a1a1aee)";
};
animations = {
enabled = false;
# Some default animations, see https://wiki.hyprland.org/Configuring/Animations/ for more
#bezier = myBezier, 0.05, 0.9, 0.1, 1.05
#animation = windows, 1, 7, myBezier
#animation = windowsOut, 1, 7, default, popin 80%
#animation = border, 1, 10, default
#animation = borderangle, 1, 8, default
#animation = fade, 1, 7, default
#animation = workspaces, 1, 6, default
};
dwindle = {
# See https://wiki.hyprland.org/Configuring/Dwindle-Layout/ for more
pseudotile = true; # master switch for pseudotiling. Enabling is bound to mainMod + P in the keybinds section below
preserve_split = true; # you probably want this
};
master = {
# See https://wiki.hyprland.org/Configuring/Master-Layout/ for more
new_is_master = true;
};
gestures = {
# See https://wiki.hyprland.org/Configuring/Variables/ for more
workspace_swipe = true;
};
# Example per-device config
# See https://wiki.hyprland.org/Configuring/Keywords/#executing for more
#"device:epic-mouse-v1" = {
# sensitivity = -0.5;
#};
# Example windowrule v1
# windowrule = float, ^(kitty)$
# Example windowrule v2
# float,class:^(kitty)$,title:^(kitty)$
# See https://wiki.hyprland.org/Configuring/Window-Rules/ for more
# See https://wiki.hyprland.org/Configuring/Keywords/ for more
"$mainMod" = "SUPER";
# Example binds, see https://wiki.hyprland.org/Configuring/Binds/ for more
bind = let
rofi = "${pkgs.rofi-wayland}/bin/rofi";
kitty = "${pkgs.kitty}/bin/kitty";
thunar = "${pkgs.xfce.thunar}/bin/thunar";
wl-copy = "${pkgs.wl-clipboard}/bin/wl-copy";
grim = "${pkgs.grim}/bin/grim";
slurp = "${pkgs.slurp}/bin/slurp";
in [
"$mainMod, Q, exec, ${kitty}"
"$mainMod, C, killactive"
"$mainMod, M, exit,"
"$mainMod, E, exec, ${thunar}"
"$mainMod, V, togglefloating"
"$mainMod, S, exec, ${rofi} -show drun -show-icons"
" , Print, exec, ${grim} -g \"$(${slurp} -d)\" - | ${wl-copy}"
"ALT, SPACE, exec, ${rofi} -show combi"
"$mainMod, P, pseudo" # dwindle
"$mainMod, J, togglesplit" # dwindle
# Move focus with mainMod + arrow keys
"$mainMod, left, movefocus, l"
"$mainMod, right, movefocus, r"
"$mainMod, up, movefocus, u"
"$mainMod, down, movefocus, d"
# Switch workspaces with mainMod + [0-9]
"$mainMod, 1, workspace, 1"
"$mainMod, 2, workspace, 2"
"$mainMod, 3, workspace, 3"
"$mainMod, 4, workspace, 4"
"$mainMod, 5, workspace, 5"
"$mainMod, 6, workspace, 6"
"$mainMod, 7, workspace, 7"
"$mainMod, 8, workspace, 8"
"$mainMod, 9, workspace, 9"
"$mainMod, 0, workspace, 10"
# Move active window to a workspace with mainMod + SHIFT + [0-9]
"$mainMod SHIFT, 1, movetoworkspace, 1"
"$mainMod SHIFT, 2, movetoworkspace, 2"
"$mainMod SHIFT, 3, movetoworkspace, 3"
"$mainMod SHIFT, 4, movetoworkspace, 4"
"$mainMod SHIFT, 5, movetoworkspace, 5"
"$mainMod SHIFT, 6, movetoworkspace, 6"
"$mainMod SHIFT, 7, movetoworkspace, 7"
"$mainMod SHIFT, 8, movetoworkspace, 8"
"$mainMod SHIFT, 9, movetoworkspace, 9"
"$mainMod SHIFT, 0, movetoworkspace, 10"
# Scroll through existing workspaces with mainMod + scroll
"$mainMod, mouse_down, workspace, e+1"
"$mainMod, mouse_up, workspace, e-1"
"ALT, Tab, cyclenext,"
"ALT, Tab, bringactivetotop,"
];
bindm = [
# Move/resize windows with mainMod + LMB/RMB and dragging
"$mainMod, mouse:272, movewindow"
"$mainMod, mouse:273, resizewindow"
];
windowrulev2 = [
# -- Fix odd behaviors in IntelliJ IDEs --
#! Fix focus issues when dialogs are opened or closed
"windowdance,class:^(jetbrains-.*)$,floating:1"
#! Fix splash screen showing in weird places and prevent annoying focus takeovers
"center,class:^(jetbrains-.*)$,title:^(splash)$,floating:1"
"nofocus,class:^(jetbrains-.*)$,title:^(splash)$,floating:1"
"noborder,class:^(jetbrains-.*)$,title:^(splash)$,floating:1"
#! Center popups/find windows
"center,class:^(jetbrains-.*)$,title:^( )$,floating:1"
"stayfocused,class:^(jetbrains-.*)$,title:^( )$,floating:1"
"noborder,class:^(jetbrains-.*)$,title:^( )$,floating:1"
#! Disable window flicker when autocomplete or tooltips appear
"nofocus,class:^(jetbrains-.*)$,title:^(win.*)$,floating:1"
];
exec-once = [
"${pkgs.swww}/bin/swww init; sleep 1;"
"${pkgs.networkmanagerapplet}/bin/nm-applet --indicator &"
"${pkgs.waybar}/bin/waybar &"
"${pkgs.dunst}/bin/dunst &"
];
};
};
programs.waybar = {
enable = true;
#systemd.enable = true;
#systemd.target = "sway-session.target";
settings.main = {
layer = "top";
position = "bottom";
#output = lib.mapAttrsToList (n: v: v.monitor) outputs;
height = 25;
spacing = 4;
modules-left = [
"hyprland/workspaces"
];
modules-center = [];
modules-right = [
"network"
"cpu"
"memory"
"temperature"
"backlight"
"pulseaudio"
"battery"
"clock"
"tray"
];
"network".format-wifi = "{essid} ({signalStrength}%) ";
"network".format-ethernet = "{ifname}: {ipaddr}/{cidr} ";
"network".format-disconnected = "Disconnected ";
"network".interval = 7;
"cpu".format = "CPU: {usage}% ";
"memory".format = "MEM: {}% ";
"temperature".critical-threshold = 80;
"temperature".format = "{temperatureC}°C ";
"backlight".format = "{percent}% {icon}";
"backlight".states = [0 50];
"backlight".format-icons = ["" ""];
"pulseaudio".format = "{volume}% {icon}";
"pulseaudio".format-bluetooth = ": {volume}% {icon}";
"pulseaudio".format-muted = "";
"pulseaudio".format-icons.headphones = "";
"pulseaudio".format-icons.handsfree = "";
"pulseaudio".format-icons.headset = "";
"pulseaudio".format-icons.phone = "";
"pulseaudio".format-icons.portable = "";
"pulseaudio".format-icons.car = "";
"pulseaudio".format-icons.default = ["" ""];
"pulseaudio".on-click = "${pkgs.pavucontrol}/bin/pavucontrol";
"battery".states.good = 95;
"battery".states.warning = 30;
"battery".states.critical = 15;
"battery".format = "{capacity}% / {power:.2}W {icon}";
"battery".format-icons = ["" "" "" "" ""];
"clock".format = "{:%F %H:%M}";
"tray".icon-size = 21;
"tray".spacing = 10;
"hyprland/workspaces" = {
"disable-scroll" = true;
"all-outputs" = true;
"active-only" = false;
"on-click" = "activate";
};
};
};
};
# XDG portal
xdg.portal.enable = true;
xdg.portal.extraPortals = lib.mkDefault [ pkgs.xdg-desktop-portal-gtk ];
# List packages installed in system profile. To search, run:
# $ nix search wget
environment.systemPackages = with pkgs; [
# hyprland stuff
patchedWaybar
dunst
swww
kitty
rofi-wayland
libnotify
networkmanagerapplet
wayland
#qt5.qtwayland
#qt6.qmake
#qt6.qtwayland
#waybar
#xdg-desktop-portal-hyprland
#xdg-desktop-portal-gtk
#xdg-utils
#xwayland
];
}

View File

@@ -20,12 +20,12 @@ in
programs.kdeconnect.enable = true;
fonts.fontDir.enable = true;
fonts.fonts = with pkgs; [
fonts.packages = with pkgs; [
nerdfonts
];
networking.firewall = {
enable = true;
enable = false;
allowedTCPPortRanges = [
{ from = 1714; to = 1764; } # KDE Connect
];
@@ -36,7 +36,6 @@ in
# Allow unfree packages
nixpkgs.config.allowUnfree = true;
nix.settings.experimental-features = [ "nix-command" "flakes" ];
# List packages installed in system profile. To search, run:
# $ nix search wget
@@ -49,17 +48,13 @@ in
keepassWithPlugins
jetbrains.idea-ultimate
jetbrains.rider
dotnet-sdk_7
dotnet-runtime_7
neovim
htop
btop
git
xfce.thunar
killall
xclip
usbutils
bun
inputs.agenix.packages."x86_64-linux".default
insomnia
remmina
@@ -81,11 +76,12 @@ in
screenshot
glxinfo
vulkan-tools
anki
];
environment.sessionVariables = {
DOTNET_ROOT = "${pkgs.dotnet-sdk_7}";
};
#environment.sessionVariables = {
# DOTNET_ROOT = "${pkgs.dotnet-sdk_7}";
#};
### docker
virtualisation.docker.enable = true;

View File

@@ -0,0 +1,33 @@
{config, pkgs, ...}:
{
# Enable OpenGL
hardware.opengl = {
enable = true;
driSupport = true;
driSupport32Bit = true;
};
services.xserver.videoDrivers = ["nvidia"];
hardware.nvidia = {
# Modesetting is required.
modesetting.enable = true;
# Nvidia power management. Experimental, and can cause sleep/suspend to fail.
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.production;
};
}

4
modules/kernel.nix Normal file
View File

@@ -0,0 +1,4 @@
{pkgs, ...}:
{
boot.kernelPackages = pkgs.linuxPackages_latest;
}

View File

@@ -14,36 +14,6 @@
boot.loader.systemd-boot.enable = true;
boot.loader.efi.canTouchEfiVariables = true;
# Enable OpenGL
hardware.opengl = {
enable = true;
driSupport = true;
driSupport32Bit = true;
};
services.xserver.videoDrivers = ["nvidia"];
hardware.nvidia = {
# Modesetting is required.
modesetting.enable = true;
# Nvidia power management. Experimental, and can cause sleep/suspend to fail.
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;
};
networking.hostName = "kop-pc"; # Define your hostname.
# Enable networking

5
systems/pc/userdata.nix Normal file
View File

@@ -0,0 +1,5 @@
{
layout = "de";
variant = "us";
}

View File

@@ -0,0 +1,4 @@
{
layout = "de";
variant = "";
}

View File

@@ -19,6 +19,18 @@ in
};
useUserPackages = true;
users.${user} = {
gtk = {
enable = true;
theme = {
name = "palenight";
package = pkgs.palenight-theme;
};
cursorTheme = {
package = pkgs.libsForQt5.breeze-gtk;
name = "Breeze-gtk";
};
};
programs.zsh = {
enable = true;
enableCompletion = true;
@@ -52,7 +64,6 @@ in
packages = with pkgs; [
(discord.override { withVencord = true; })
librewolf
ungoogled-chromium
brave
];
openssh.authorizedKeys.keys = [