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

View file

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

View file

@ -15,12 +15,9 @@ in
config = mkIf cfg.enable {
programs.xwayland.enable = true;
/*
programs.hyprland = {
enable = true;
xwayland = true;
};
*/
services.gnome.gnome-keyring.enable = mkDefault cfg.gnome-keyring;
systemd.user.services.polkit-gnome-authentication-agent-1 = mkIf cfg.gnome-keyring {
description = "polkit-gnome-authentication-agent-1";
@ -48,15 +45,8 @@ in
dunst
# wireplumber
unstable.xwayland
xwayland
pciutils # lspci is needed by hyprland
# from some obscure tutorial on youtube
# xorg.libxcb
# mesa
libglvnd
egl-wayland
libdrm
vulkan-tools
dunst
swww
flameshot
@ -66,15 +56,20 @@ in
wl-clipboard
];
programs.hyprland = {
wayland.windowManager.hyprland = {
enable = true;
systemd.enable = true;
xwayland.enable = true;
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 (
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
input = {
kb_layout = console.keyMap;
kb_layout = "us";
natural_scroll = true;
sensitivity = 0;
};
@ -82,9 +77,9 @@ in
gaps_in = 2;
gaps_out = 1;
border_size = 1;
col.active_border = "rgba(33ccffee) rgba(00ff99ee) 45deg";
col.inactive_border = "rgba(595959aa)";
layout = dwindle;
"col.active_border" = "rgba(33ccffee) rgba(00ff99ee) 45deg";
"col.inactive_border" = "rgba(595959aa)";
layout = "dwindle";
};
decoration.rounding = 5;
misc.disable_hyprland_logo = true;
@ -106,8 +101,6 @@ in
gestures.workspace_swipe = true;
debug.enable_stdout_logs = true;
bind = [
# Example binds, see https://wiki.hyprland.org/Configuring/Binds/ for more
"SUPER, RETURN, exec, alacritty"
"SUPER SHIFT, RETURN, exec, rofi -show drun"
@ -122,14 +115,6 @@ in
"SUPER, C, exec, /home/vali/.config/wallpaper/colorscheme-setter"
",PRINT, exec, flameshot"
"binde = ,XF86MonBrightnessUp, exec, brightnessctl set 10%+"
"binde = ,XF86MonBrightnessDown, exec, brightnessctl set 10%-"
# Example volume button that allows press and hold, volume limited to 150%"
"binde = ,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"
"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"
@ -173,10 +158,19 @@ in
# Scroll through existing workspaces with mainMod + scroll"
"SUPER, mouse_down, workspace, e+1"
"SUPER, mouse_up, workspace, e-1"
"
# Move/resize windows with mainMod + LMB/RMB and dragging"
#bindm = SUPER, mouse:272, movewindow"
#bindm = SUPER, mouse:273, resizewindow"
# Move/resize windows with mainMod + LMB/RMB and dragging
"SUPER, mouse:272, movewindow"
# "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,7 +7,8 @@ with lib;
List of monitors to use
";
default = [];
type = with types; listOf submodule {
type = with types; types.listOf (submodule {
options = {
name = mkOption {
type = types.str;
description = "Give your monitor a cute name";
@ -19,18 +20,20 @@ with lib;
};
resolution = mkOption {
type = types.submodule {
width = mkOption {
options = {
x = mkOption {
type = types.int;
description = "monitor width";
default = "1920";
};
height = mkOption {
y = mkOption {
type = types.int;
description = "monitor height";
default = "1080";
};
};
};
};
scale = mkOption {
type = types.number;
description = "monitor scale";
@ -43,6 +46,7 @@ with lib;
};
position = mkOption {
type = types.submodule {
options = {
x = mkOption {
type = types.int;
default = 0;
@ -52,6 +56,7 @@ with lib;
default = 0;
};
};
};
description = "absolute monitor posititon";
default = {
x = 0;
@ -64,6 +69,7 @@ with lib;
default = 0;
};
};
});
};
}