Initial flocke configuration (warning: may break other systems, will fix shortly)

This commit is contained in:
Dragyx 2024-04-13 13:47:36 +02:00
commit d2725eb0f4
4 changed files with 159 additions and 156 deletions

View file

@ -5,6 +5,7 @@
../../../options/common/pin-registry.nix ../../../options/common/pin-registry.nix
../../../options/common/preserve-system.nix ../../../options/common/preserve-system.nix
../../../options/desktop/fonts.nix ../../../options/desktop/fonts.nix
./packages.nix
]; ];
@ -12,18 +13,16 @@
time.timeZone = "Europe/Zurich"; time.timeZone = "Europe/Zurich";
security.sudo.package = pkgs.sudo.override { withInsults = true; }; security.sudo.package = pkgs.sudo.override { withInsults = true; };
services.xserver = { services.displayManager = {
enable = true;
displayManager = {
sessionPackages = [ pkgs.hyprland ]; # pkgs.gnome.gnome-session.sessions ]; sessionPackages = [ pkgs.hyprland ]; # pkgs.gnome.gnome-session.sessions ];
defaultSession = "hyprland"; defaultSession = "hyprland";
sddm = { sddm = {
enable = true; enable = true;
}; wayland.enable = true;
}; };
windowManager.hypr.enable = true;
}; };
hardware.bluetooth.enable = true; hardware.bluetooth.enable = true;
hardware.bluetooth.powerOnBoot = true; hardware.bluetooth.powerOnBoot = true;
@ -110,18 +109,22 @@
modules = { modules = {
other = { other = {
system = { system = rec {
hostname = "flocke"; hostname = "flocke";
username = "dragyx"; username = "dragyx";
monitors = { gitPath = "/home/${username}/repos/nichts";
name = "LaptopMain"; monitors = [
resolution = { {
x = 2256; name = "LaptopMain";
y = 1504; device = "eDP-1";
}; resolution = {
scale = 1.0; x = 2256;
refresh_rate = 60; y = 1504;
}; };
scale = 1.175;
refresh_rate = 60;
}
];
}; };
home-manager = { home-manager = {
enable = true; enable = true;
@ -134,7 +137,7 @@
mpv.enable = true; mpv.enable = true;
schizofox.enable = true; schizofox.enable = true;
obs.enable = true; obs.enable = true;
neovim.enable = true; # neovim.enable = true;
git = { git = {
enable = true; enable = true;
userName = "Dragyx"; userName = "Dragyx";

View file

@ -28,7 +28,7 @@ in
android-tools android-tools
signal-desktop signal-desktop
nextcloud-client nextcloud-client
etcher # etcher
vlc vlc
audacity audacity
thunderbird thunderbird

View file

@ -15,12 +15,9 @@ in
config = mkIf cfg.enable { config = mkIf cfg.enable {
programs.xwayland.enable = true; programs.xwayland.enable = true;
/*
programs.hyprland = { programs.hyprland = {
enable = true; enable = true;
xwayland = true;
}; };
*/
services.gnome.gnome-keyring.enable = mkDefault cfg.gnome-keyring; services.gnome.gnome-keyring.enable = mkDefault cfg.gnome-keyring;
systemd.user.services.polkit-gnome-authentication-agent-1 = mkIf cfg.gnome-keyring { systemd.user.services.polkit-gnome-authentication-agent-1 = mkIf cfg.gnome-keyring {
description = "polkit-gnome-authentication-agent-1"; description = "polkit-gnome-authentication-agent-1";
@ -48,15 +45,8 @@ in
dunst dunst
# wireplumber # wireplumber
unstable.xwayland xwayland
pciutils # lspci is needed by hyprland pciutils # lspci is needed by hyprland
# from some obscure tutorial on youtube
# xorg.libxcb
# mesa
libglvnd
egl-wayland
libdrm
vulkan-tools
dunst dunst
swww swww
flameshot flameshot
@ -66,15 +56,20 @@ in
wl-clipboard wl-clipboard
]; ];
programs.hyprland = { wayland.windowManager.hyprland = {
enable = true; enable = true;
systemd.enable = true;
xwayland.enable = true;
settings = { settings = {
exec-once = mkIf cfg.gnome-keyring "${pkgs.polkit_gnome}/libexec/polkit-gnome-authentication-agent-1"; exec-once = [
"waybar"
] ++ (if cfg.gnome-keyring then ["${pkgs.polkit_gnome}/libexec/polkit-gnome-authentication-agent-1"]
else []);
monitor = map ( monitor = map (
m: "${m.device},${m.resolution.x}x${m.resolution.y}@${m.refresh_rate},${m.position.x}x${m.position.y},${m.scale},transform,${m.transform}" m: "${m.device},${builtins.toString m.resolution.x}x${builtins.toString m.resolution.y}@${builtins.toString m.refresh_rate},${builtins.toString m.position.x}x${builtins.toString m.position.y},${builtins.toString m.scale},transform,${builtins.toString m.transform}"
) monitors; #TODO: default value ) monitors; #TODO: default value
input = { input = {
kb_layout = console.keyMap; kb_layout = "us";
natural_scroll = true; natural_scroll = true;
sensitivity = 0; sensitivity = 0;
}; };
@ -82,9 +77,9 @@ in
gaps_in = 2; gaps_in = 2;
gaps_out = 1; gaps_out = 1;
border_size = 1; border_size = 1;
col.active_border = "rgba(33ccffee) rgba(00ff99ee) 45deg"; "col.active_border" = "rgba(33ccffee) rgba(00ff99ee) 45deg";
col.inactive_border = "rgba(595959aa)"; "col.inactive_border" = "rgba(595959aa)";
layout = dwindle; layout = "dwindle";
}; };
decoration.rounding = 5; decoration.rounding = 5;
misc.disable_hyprland_logo = true; misc.disable_hyprland_logo = true;
@ -106,77 +101,76 @@ in
gestures.workspace_swipe = true; gestures.workspace_swipe = true;
debug.enable_stdout_logs = true; debug.enable_stdout_logs = true;
bind = [ bind = [
# Example binds, see https://wiki.hyprland.org/Configuring/Binds/ for more
"SUPER, RETURN, exec, alacritty"
"SUPER SHIFT, RETURN, exec, rofi -show drun"
"SUPER SHIFT, Q, killactive,"
"SUPER, M, exit, "
"SUPER, B, exec, firefox"
"SUPER, f, fullscreen"
"SUPER, E, exec, nautilus --new-window "
"SUPER, V, togglefloating, "
"SUPER, P, pseudo, # dwindle"
"SUPER, S, togglesplit, # dwindle"
"SUPER, C, exec, /home/vali/.config/wallpaper/colorscheme-setter"
",PRINT, exec, flameshot"
# Example binds, see https://wiki.hyprland.org/Configuring/Binds/ for more # Move focus with mainMod + arrow keys"
"SUPER, RETURN, exec, alacritty" "SUPER, h, movefocus, l"
"SUPER SHIFT, RETURN, exec, rofi -show drun" "SUPER, l, movefocus, r"
"SUPER SHIFT, Q, killactive," "SUPER, k, movefocus, u"
"SUPER, M, exit, " "SUPER, j, movefocus, d"
"SUPER, B, exec, firefox"
"SUPER, f, fullscreen"
"SUPER, E, exec, nautilus --new-window "
"SUPER, V, togglefloating, "
"SUPER, P, pseudo, # dwindle"
"SUPER, S, togglesplit, # dwindle"
"SUPER, C, exec, /home/vali/.config/wallpaper/colorscheme-setter"
",PRINT, exec, flameshot"
"binde = ,XF86MonBrightnessUp, exec, brightnessctl set 10%+" # move window to next / previous workspace"
"binde = ,XF86MonBrightnessDown, exec, brightnessctl set 10%-" "SUPER CTRL, h, movetoworkspace, -1"
"SUPER CTRL, l, movetoworkspace, +1"
# Example volume button that allows press and hold, volume limited to 150%" # move to next / previous workspace"
"binde = ,XF86AudioRaiseVolume, exec, wpctl set-volume -l 1.5 @DEFAULT_AUDIO_SINK@ 5%+" "SUPER CTRL, h, workspace, -1"
# Example volume button that will activate even while an input inhibitor is active" "SUPER CTRL, l, workspace, +1"
"binde = ,XF86AudioLowerVolume, exec, wpctl set-volume -l 1.5 @DEFAULT_AUDIO_SINK@ 5%-"
",XF86AudioMute, exec, $ wpctl set-mute @DEFAULT_AUDIO_SINK@ toggle"
# Move focus with mainMod + arrow keys"
"SUPER, h, movefocus, l"
"SUPER, l, movefocus, r"
"SUPER, k, movefocus, u"
"SUPER, j, movefocus, d"
# move window to next / previous workspace"
"SUPER CTRL, h, movetoworkspace, -1"
"SUPER CTRL, l, movetoworkspace, +1"
# move to next / previous workspace"
"SUPER CTRL, h, workspace, -1"
"SUPER CTRL, l, workspace, +1"
# Switch workspaces with mainMod + [0-9]" # Switch workspaces with mainMod + [0-9]"
"SUPER, 1, workspace, 1" "SUPER, 1, workspace, 1"
"SUPER, 2, workspace, 2" "SUPER, 2, workspace, 2"
"SUPER, 3, workspace, 3" "SUPER, 3, workspace, 3"
"SUPER, 4, workspace, 4" "SUPER, 4, workspace, 4"
"SUPER, 5, workspace, 5" "SUPER, 5, workspace, 5"
"SUPER, 6, workspace, 6" "SUPER, 6, workspace, 6"
"SUPER, 7, workspace, 7" "SUPER, 7, workspace, 7"
"SUPER, 8, workspace, 8" "SUPER, 8, workspace, 8"
"SUPER, 9, workspace, 9" "SUPER, 9, workspace, 9"
"SUPER, 0, workspace, 10" "SUPER, 0, workspace, 10"
# Move active window to a workspace with mainMod + SHIFT + [0-9]" # Move active window to a workspace with mainMod + SHIFT + [0-9]"
"SUPER SHIFT, 1, movetoworkspace, 1" "SUPER SHIFT, 1, movetoworkspace, 1"
"SUPER SHIFT, 2, movetoworkspace, 2" "SUPER SHIFT, 2, movetoworkspace, 2"
"SUPER SHIFT, 3, movetoworkspace, 3" "SUPER SHIFT, 3, movetoworkspace, 3"
"SUPER SHIFT, 4, movetoworkspace, 4" "SUPER SHIFT, 4, movetoworkspace, 4"
"SUPER SHIFT, 5, movetoworkspace, 5" "SUPER SHIFT, 5, movetoworkspace, 5"
"SUPER SHIFT, 6, movetoworkspace, 6" "SUPER SHIFT, 6, movetoworkspace, 6"
"SUPER SHIFT, 7, movetoworkspace, 7" "SUPER SHIFT, 7, movetoworkspace, 7"
"SUPER SHIFT, 8, movetoworkspace, 8" "SUPER SHIFT, 8, movetoworkspace, 8"
"SUPER SHIFT, 9, movetoworkspace, 9" "SUPER SHIFT, 9, movetoworkspace, 9"
"SUPER SHIFT, 0, movetoworkspace, 10" "SUPER SHIFT, 0, movetoworkspace, 10"
# Scroll through existing workspaces with mainMod + scroll" # Scroll through existing workspaces with mainMod + scroll"
"SUPER, mouse_down, workspace, e+1" "SUPER, mouse_down, workspace, e+1"
"SUPER, mouse_up, workspace, e-1" "SUPER, mouse_up, workspace, e-1"
"
# Move/resize windows with mainMod + LMB/RMB and dragging" # Move/resize windows with mainMod + LMB/RMB and dragging
#bindm = SUPER, mouse:272, movewindow" "SUPER, mouse:272, movewindow"
#bindm = SUPER, mouse:273, resizewindow" # "bindm = SUPER, mouse:273, resizewindow"
];
binde = [
",XF86MonBrightnessUp, exec, brightnessctl set 10%+"
",XF86MonBrightnessDown, exec, brightnessctl set 10%-"
# Example volume button that allows press and hold, volume limited to 150%"
",XF86AudioRaiseVolume, exec, wpctl set-volume -l 1.5 @DEFAULT_AUDIO_SINK@ 5%+"
# Example volume button that will activate even while an input inhibitor is active"
",XF86AudioLowerVolume, exec, wpctl set-volume -l 1.5 @DEFAULT_AUDIO_SINK@ 5%-"
",XF86AudioMute, exec, $ wpctl set-mute @DEFAULT_AUDIO_SINK@ toggle"
]; ];
}; };
}; };

View file

@ -7,63 +7,69 @@ with lib;
List of monitors to use List of monitors to use
"; ";
default = []; default = [];
type = with types; listOf submodule { type = with types; types.listOf (submodule {
name = mkOption { options = {
type = types.str; name = mkOption {
description = "Give your monitor a cute name"; type = types.str;
default = "monitor0(I am lazy)"; description = "Give your monitor a cute name";
}; default = "monitor0(I am lazy)";
device = mkOption { };
type = types.str; device = mkOption {
description = "The actual device name of the monitor"; type = types.str;
}; description = "The actual device name of the monitor";
resolution = mkOption { };
type = types.submodule { resolution = mkOption {
width = mkOption { type = types.submodule {
type = types.int; options = {
description = "monitor width"; x = mkOption {
default = "1920"; type = types.int;
}; description = "monitor width";
height = mkOption { default = "1920";
type = types.int; };
description = "monitor height"; y = mkOption {
default = "1080"; type = types.int;
description = "monitor height";
default = "1080";
};
};
}; };
}; };
}; scale = mkOption {
scale = mkOption { type = types.number;
type = types.number; description = "monitor scale";
description = "monitor scale"; default = 1.0;
default = 1.0; };
}; refresh_rate = mkOption {
refresh_rate = mkOption { type = types.int;
type = types.int; description = "monitor refresh rate (in Hz)";
description = "monitor refresh rate (in Hz)"; default = 60;
default = 60; };
}; position = mkOption {
position = mkOption { type = types.submodule {
type = types.submodule { options = {
x = mkOption { x = mkOption {
type = types.int; type = types.int;
default = 0; default = 0;
};
y = mkOption {
type = types.int;
default = 0;
};
};
}; };
y = mkOption { description = "absolute monitor posititon";
type = types.int; default = {
default = 0; x = 0;
y = 0;
}; };
}; };
description = "absolute monitor posititon"; transform = mkOption {
default = { type = types.ints.between 0 3;
x = 0; description = "Rotation of the monitor counterclockwise";
y = 0; default = 0;
}; };
}; };
transform = mkOption { });
type = types.ints.between 0 3;
description = "Rotation of the monitor counterclockwise";
default = 0;
};
};
}; };
} }