hyprland and dms

This commit is contained in:
William 2025-10-09 21:53:56 -03:00
parent f07aa71366
commit 3614169a29
9 changed files with 169 additions and 95 deletions

View file

@ -14,11 +14,6 @@
inputs.nixpkgs.follows = "nixpkgs-stable"; inputs.nixpkgs.follows = "nixpkgs-stable";
}; };
stylix = {
url = "github:danth/stylix";
inputs.nixpkgs.follows = "nixpkgs";
};
agenix = { agenix = {
url = "github:ryantm/agenix"; url = "github:ryantm/agenix";
inputs.nixpkgs.follows = "nixpkgs-stable"; inputs.nixpkgs.follows = "nixpkgs-stable";
@ -29,6 +24,11 @@
inputs.nixpkgs.follows = "nixpkgs-stable"; inputs.nixpkgs.follows = "nixpkgs-stable";
}; };
dms = {
url = "github:AvengeMedia/DankMaterialShell";
inputs.nixpkgs.follows = "nixpkgs";
};
nixos-cli.url = "github:nix-community/nixos-cli"; nixos-cli.url = "github:nix-community/nixos-cli";
nix-flatpak.url = "github:gmodena/nix-flatpak/main"; nix-flatpak.url = "github:gmodena/nix-flatpak/main";
@ -43,8 +43,8 @@
nixpkgs-stable, nixpkgs-stable,
home-manager, home-manager,
home-manager-stable, home-manager-stable,
stylix,
disko, disko,
dms,
agenix, agenix,
nixos-cli, nixos-cli,
nix-flatpak, nix-flatpak,
@ -91,7 +91,6 @@
hm.nixosModules.default hm.nixosModules.default
impermanence.nixosModules.impermanence impermanence.nixosModules.impermanence
nix-flatpak.nixosModules.nix-flatpak nix-flatpak.nixosModules.nix-flatpak
stylix.nixosModules.stylix
nixos-cli.nixosModules.nixos-cli nixos-cli.nixosModules.nixos-cli
{ {
nixpkgs.overlays = [ nixpkgs.overlays = [
@ -100,6 +99,7 @@
} }
]; ];
workstationModules = [ workstationModules = [
dms.nixosModules.greeter
{ {
nixpkgs.overlays = [ nixpkgs.overlays = [
self.overlays.workstationOverlay self.overlays.workstationOverlay

View file

@ -13,7 +13,6 @@
./programs.nix ./programs.nix
./security.nix ./security.nix
./services.nix ./services.nix
./stylix.nix
./users.nix ./users.nix
./virtualisation.nix ./virtualisation.nix
]; ];

View file

@ -19,10 +19,6 @@
(lib.mkIf hostType.isWorkstation { (lib.mkIf hostType.isWorkstation {
services = { services = {
displayManager = { displayManager = {
autoLogin = {
enable = true;
user = "user";
};
sddm = { sddm = {
enable = true; enable = true;
wayland = { wayland = {
@ -31,7 +27,6 @@
}; };
}; };
}; };
desktopManager.plasma6.enable = true;
pipewire = { pipewire = {
enable = true; enable = true;
alsa.enable = true; alsa.enable = true;
@ -42,6 +37,11 @@
}; };
}; };
programs.hyprland = {
enable = true;
withUWSM = true;
};
hardware = { hardware = {
xpadneo.enable = true; xpadneo.enable = true;
bluetooth.enable = true; bluetooth.enable = true;

View file

@ -2,10 +2,7 @@
{ {
hardware = { hardware = {
amdgpu = { amdgpu.opencl.enable = true;
opencl.enable = true;
amdvlk.enable = true;
};
graphics.extraPackages = with pkgs; [ rocmPackages.clr.icd ]; graphics.extraPackages = with pkgs; [ rocmPackages.clr.icd ];
}; };
} }

View file

@ -1,63 +0,0 @@
{
config,
hostType,
lib,
pkgs,
...
}:
{
config = lib.mkMerge [
# Common configuration
{
}
# Server specific configuration
(lib.mkIf hostType.isServer {
})
# Workstation specific configuration
(lib.mkIf hostType.isWorkstation {
stylix = {
enable = true;
polarity = "dark";
base16Scheme = "${pkgs.base16-schemes}/share/themes/catppuccin-mocha.yaml";
cursor = {
package = pkgs.kdePackages.breeze-icons;
name = "Breeze_Light";
size = 24;
};
opacity = {
applications = 1.0;
desktop = 0.8;
popups = config.stylix.opacity.desktop;
terminal = 1.0;
};
fonts = {
serif = {
package = pkgs.source-serif;
name = "Source Serif 4 Display";
};
sansSerif = {
package = pkgs.inter;
name = "Inter";
};
monospace = {
package = pkgs.nerd-fonts.fira-code;
name = "FiraCode Nerd Font";
};
emoji = {
package = pkgs.noto-fonts-emoji;
name = "Noto Color Emoji";
};
sizes = {
applications = 11;
desktop = config.stylix.fonts.sizes.applications;
popups = config.stylix.fonts.sizes.applications;
terminal = 12;
};
};
};
})
];
}

View file

@ -62,7 +62,6 @@ stdenv.mkDerivation rec {
hicolor-icon-theme hicolor-icon-theme
libdrm libdrm
libnotify libnotify
libsForQt5.kde-cli-tools
libxkbcommon libxkbcommon
nspr nspr
nss nss

View file

@ -93,15 +93,7 @@
# Workstation specific configuration # Workstation specific configuration
(lib.mkIf hostType.isWorkstation { (lib.mkIf hostType.isWorkstation {
programs.rio = {
enable = true;
settings = {
window = {
width = 1121;
height = 633;
};
};
};
}) })
]; ];
} }

View file

@ -112,13 +112,9 @@
# Workstation specific configuration # Workstation specific configuration
(lib.mkIf hostType.isWorkstation { (lib.mkIf hostType.isWorkstation {
fonts.fontconfig.enable = true;
programs = { programs = {
password-store.package = pkgs.pass-wayland; password-store.package = pkgs.pass-wayland;
mangohud.enable = true; mangohud.enable = true;
obs-studio = { obs-studio = {
enable = true; enable = true;
plugins = [ plugins = [
@ -127,7 +123,160 @@
pkgs.obs-studio-plugins.obs-pipewire-audio-capture pkgs.obs-studio-plugins.obs-pipewire-audio-capture
]; ];
}; };
dankMaterialShell = {
enable = true;
enableVPN = false;
}; };
rio = {
enable = true;
settings = {
window = {
width = 1121;
height = 633;
};
};
};
};
wayland.windowManager.hyprland = {
enable = true;
extraConfig = ''
################
### MONITORS ###
################
monitor=,preferred,auto,auto
################
### START-UP ###
################
exec-once = bash -c "wl-paste --watch cliphist store &"
exec-once = /usr/lib/mate-polkit/polkit-mate-authentication-agent-1
exec-once = dms run
#####################
### LOOK AND FEEL ###
#####################
general {
gaps_in = 5
gaps_out = 20
border_size = 2
resize_on_border = true
allow_tearing = false
layout = dwindle
}
decoration {
rounding = 10
rounding_power = 2
dim_inactive = true
dim_strength = 0.3
shadow {
enabled = true
range = 4
render_power = 3
}
blur {
enabled = true
size = 8
passes = 1
vibrancy = 0.1696
}
}
animations {
enabled = yes, please :)
bezier = easeOutQuint,0.23,1,0.32,1
bezier = easeInOutCubic,0.65,0.05,0.36,1
bezier = linear,0,0,1,1
bezier = almostLinear,0.5,0.5,0.75,1.0
bezier = quick,0.15,0,0.1,1
animation = global, 1, 1, default
animation = border, 1, 1, easeOutQuint
animation = windows, 1, 1, easeOutQuint
animation = windowsIn, 1, 0.3, quick, popin 95% # Much faster: 30ms with quick bezier
animation = windowsOut, 1, 1, linear, popin 87%
animation = fadeIn, 1, 1, almostLinear
animation = fadeOut, 1, 1, almostLinear
animation = fade, 1, 1, quick
animation = layers, 1, 1, easeOutQuint
animation = layersIn, 1, 1, easeOutQuint, fade
animation = layersOut, 1, 1, linear, fade
animation = fadeLayersIn, 1, 1, almostLinear
animation = fadeLayersOut, 1, 1, almostLinear
animation = workspaces, 1, 1, almostLinear, slidevert
}
misc {
force_default_wallpaper = 0
disable_hyprland_logo = true
}
#############
### INPUT ###
#############
input {
kb_layout = us
kb_variant = altgr-intl
follow_mouse = 1
sensitivity = 0
accel_profile = flat
natural_scroll = true
touchpad {
natural_scroll = true
clickfinger_behavior = true
}
}
###################
### KEYBINDINGS ###
###################
$mainMod = SUPER
$terminal = rio
$menu = dms ipc call spotlight toggle
# APP SHORTCUTS
bind = ALT, SPACE, exec, $menu
bind = $mainMod, RETURN, exec, $terminal
# SESSION MANAGEMENT
bind = CTRL ALT, DELETE, exit,
bind = $mainMod, mouse_up, exec, hyprnome
bind = $mainMod, mouse_down, exec, hyprnome --previous
bind = CTRL ALT, j, exec, hyprnome
bind = CTRL ALT, k, exec, hyprnome --previous
bind = $mainMod CTRL ALT, j, exec, hyprnome --move
bind = $mainMod CTRL ALT, k, exec, hyprnome --move --previous
bindel = ,XF86AudioRaiseVolume, exec, wpctl set-volume @DEFAULT_AUDIO_SINK@ 5%+
bindel = ,XF86AudioLowerVolume, exec, wpctl set-volume @DEFAULT_AUDIO_SINK@ 5%-
bindel = ,XF86AudioMute, exec, wpctl set-mute @DEFAULT_AUDIO_SINK@ toggle
bindel = ,XF86AudioMicMute, exec, wpctl set-mute @DEFAULT_AUDIO_SOURCE@ toggle
bindel = ,XF86MonBrightnessUp, exec, brightnessctl s 10%+
bindel = ,XF86MonBrightnessDown, exec, brightnessctl s 10%-
bindl = , XF86AudioNext, exec, playerctl next
bindl = , XF86AudioPause, exec, playerctl play-pause
bindl = , XF86AudioPlay, exec, playerctl play-pause
bindl = , XF86AudioPrev, exec, playerctl previous
bind = CTRL ALT SHIFT, a, exec, bash /home/user/.local/bin/toggle-audio-output.sh
# WINDOW MANAGEMENT
bind = ALT, F4, killactive,
bind = $mainMod, space, togglefloating,
bind = $mainMod, f, fullscreen
bindm = $mainMod, mouse:272, movewindow
bindm = $mainMod, mouse:273, resizewindow
bind = SUPER, h, movefocus, l
bind = SUPER, l, movefocus, r
bind = SUPER, k, movefocus, u
bind = SUPER, j, movefocus, d
bind = $mainMod CTRL, h, movewindow, l
bind = $mainMod CTRL, l, movewindow, r
bind = $mainMod CTRL, k, movewindow, u
bind = $mainMod CTRL, j, movewindow, d
# bind = $mainMod, r, scroller:cyclewidth, next
# bind = $mainMod CTRL, r, scroller:cyclewidth, prev
# bind = $mainMod, p, scroller:pin,
# bind = $mainMod, c, scroller:alignwindow, center
# bind = $mainMod CTRL, f, scroller:fitsize, all
####################
### WINDOW RULES ###
####################
windowrulev2 = suppressevent maximize, class:.*
windowrulev2 = nofocus,class:^$,title:^$,xwayland:1,floating:1,fullscreen:0,pinned:0
'';
};
fonts.fontconfig.enable = true;
}) })
]; ];
} }

View file

@ -1,4 +1,4 @@
{ ... }: { inputs, ... }:
{ {
home = { home = {
@ -10,5 +10,6 @@
imports = [ imports = [
./modules ./modules
./modules/user ./modules/user
inputs.dms.homeModules.dankMaterialShell.default
]; ];
} }