chore: various big changes

This commit is contained in:
Nydragon 2024-06-25 16:37:50 +00:00
parent 9d3c5f8d8b
commit 4d88e3c115
No known key found for this signature in database
GPG key ID: 14AA30A865EA1209
8 changed files with 177 additions and 22 deletions

18
flake.lock generated
View file

@ -7,11 +7,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1718526747, "lastModified": 1719180626,
"narHash": "sha256-sKrD/utGvmtQALvuDj4j0CT3AJXP1idOAq2p+27TpeE=", "narHash": "sha256-vZAzm5KQpR6RGple1dzmSJw5kPivES2heCFM+ZWkt0I=",
"owner": "nix-community", "owner": "nix-community",
"repo": "home-manager", "repo": "home-manager",
"rev": "0a7ffb28e5df5844d0e8039c9833d7075cdee792", "rev": "6b1f90a8ff92e81638ae6eb48cd62349c3e387bb",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -22,11 +22,11 @@
}, },
"nixos-hardware": { "nixos-hardware": {
"locked": { "locked": {
"lastModified": 1718548414, "lastModified": 1719322773,
"narHash": "sha256-1obyIuQPR/Kq1j5/i/5EuAfQrDwjYnjCDG8iLtXmBhQ=", "narHash": "sha256-BqPxtFwXrpJQDh65NOIHX99pz2rtIMshG9Mt2xnnc5c=",
"owner": "NixOS", "owner": "NixOS",
"repo": "nixos-hardware", "repo": "nixos-hardware",
"rev": "cde8f7e11f036160b0fd6a9e07dc4c8e4061cf06", "rev": "caabc425565bbd5c8640630b0bf6974961a49242",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -38,11 +38,11 @@
}, },
"nixpkgs": { "nixpkgs": {
"locked": { "locked": {
"lastModified": 1718318537, "lastModified": 1719075281,
"narHash": "sha256-4Zu0RYRcAY/VWuu6awwq4opuiD//ahpc2aFHg2CWqFY=", "narHash": "sha256-CyyxvOwFf12I91PBWz43iGT1kjsf5oi6ax7CrvaMyAo=",
"owner": "nixos", "owner": "nixos",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "e9ee548d90ff586a6471b4ae80ae9cfcbceb3420", "rev": "a71e967ef3694799d0c418c98332f7ff4cc5f6af",
"type": "github" "type": "github"
}, },
"original": { "original": {

133
home/hyprland/default.nix Normal file
View file

@ -0,0 +1,133 @@
{
pkgs,
lib,
osConfig,
config,
...
}:
lib.mkIf osConfig.programs.hyprland.enable {
wayland.windowManager.hyprland = {
enable = true;
systemd.variables = [ "--all" ];
settings = {
"$mod" = "SUPER";
monitor = ",preferred,auto,auto";
general = {
gaps_in = 5;
gaps_out = 20;
border_size = 2;
# https://wiki.hyprland.org/Configuring/Variables/#variable-types for info about colors
"col.active_border" = "rgba(33ccffee) rgba(00ff99ee) 45deg";
"col.inactive_border" = "rgba(595959aa)";
# Set to true enable resizing windows by clicking and dragging on borders and gaps
resize_on_border = false;
# Please see https://wiki.hyprland.org/Configuring/Tearing/ before you turn this on
allow_tearing = false;
layout = "dwindle";
};
decoration = {
rounding = 10;
# Change transparency of focused and unfocused windows
active_opacity = 1.0;
inactive_opacity = 1.0;
drop_shadow = true;
shadow_range = 4;
shadow_render_power = 3;
"col.shadow" = "rgba(1a1a1aee)";
# https://wiki.hyprland.org/Configuring/Variables/#blur
blur = {
enabled = true;
size = 3;
passes = 1;
vibrancy = 0.1696;
};
};
# https://wiki.hyprland.org/Configuring/Variables/#animations
animations = {
enabled = true;
# 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"
"windowsOut, 1, 7, default, popin 80%"
"border, 1, 10, default"
"borderangle, 1, 8, default"
"fade, 1, 7, default"
"workspaces, 1, 6, default"
];
};
# See https://wiki.hyprland.org/Configuring/Dwindle-Layout/ for more
dwindle = {
pseudotile = true; # Master switch for pseudotiling. Enabling is bound to mainMod + P in the keybinds section below
preserve_split = true; # You probably want this
};
# See https://wiki.hyprland.org/Configuring/Master-Layout/ for more
#master = {
#new_status = "master";
#};
# https://wiki.hyprland.org/Configuring/Variables/#misc
misc = {
force_default_wallpaper = -1; # Set to 0 or 1 to disable the anime mascot wallpapers
disable_hyprland_logo = false; # If true disables the random hyprland logo / anime girl background. :(
};
bind =
[
"$mod, D, exec, rofi -config ${config.home.homeDirectory}/.config/rofi/config.rasi -show combi -automatic-save-to-history"
"$mod, Return, exec, ${pkgs.alacritty}/bin/alacritty"
"$mod SHIFT, Q, killactive,"
"$mod, left, movefocus, l"
"$mod, right, movefocus, r"
"$mod, up, movefocus, u"
"$mod, down, movefocus, d"
# Example special workspace (scratchpad)
"$mod, S, togglespecialworkspace, magic"
"$mod SHIFT, S, movetoworkspace, special:magic"
"$mod, N, exec, ${pkgs.swaynotificationcenter}/bin/swaync-client -t"
]
++ (
# workspaces
# binds $mod + [shift +] {1..10} to [move to] workspace {1..10}
builtins.concatLists (
builtins.genList (
x:
let
ws =
let
c = (x + 1) / 10;
in
builtins.toString (x + 1 - (c * 10));
in
[
"$mod, ${ws}, workspace, ${toString (x + 1)}"
"$mod SHIFT, ${ws}, movetoworkspace, ${toString (x + 1)}"
]
) 10
)
);
};
};
}

View file

@ -35,6 +35,9 @@
nodejs_22 nodejs_22
clang clang
tree-sitter tree-sitter
fd
luajitPackages.luarocks
wl-clipboard
]; ];
}; };
} }

View file

@ -5,7 +5,7 @@
"clock" "clock"
"sway/mode" "sway/mode"
]; ];
modules-center = [ "sway/workspaces" ]; modules-center = [ "hyprland/workspaces" ];
modules-right = [ modules-right = [
"backlight" "backlight"
"pulseaudio" "pulseaudio"
@ -169,11 +169,11 @@
scroll-step = 1; scroll-step = 1;
tooltip = false; tooltip = false;
}; };
"sway/mode" = { #"sway/mode" = {
format = "{}"; #format = "{}";
max-length = 50; #max-length = 50;
}; #};
"sway/workspaces" = { "hyprland/workspaces" = {
all-outputs = true; all-outputs = true;
disable-scroll = true; disable-scroll = true;
format = "{name}"; format = "{name}";

View file

@ -21,14 +21,20 @@ in
]; ];
boot.loader.systemd-boot.enable = true; boot.loader.systemd-boot.enable = true;
boot.loader.efi.canTouchEfiVariables = true; boot.loader.efi.canTouchEfiVariables = true;
# Enable the X11 windowing system.
services.xserver.enable = true;
networking.hostName = hostname; networking.hostName = hostname;
services.blueman.enable = true;
# Enable the GNOME Desktop Environment. services.greetd = {
services.xserver.displayManager.gdm.enable = true; enable = true;
services.xserver.desktopManager.gnome.enable = true; settings = rec {
initial_session = {
command = "${pkgs.greetd.greetd}/bin/agreety --cmd ${pkgs.hyprland}/bin/hyprland";
user = "${username}";
};
default_session = initial_session;
};
};
programs = { programs = {
steam.enable = true; steam.enable = true;
@ -37,6 +43,7 @@ in
thunderbird.enable = true; thunderbird.enable = true;
}; };
home-manager.backupFileExtension = "backup";
home-manager.users.${username} = { home-manager.users.${username} = {
imports = [ imports = [
../../home/firefox ../../home/firefox
@ -44,6 +51,10 @@ in
../../home/neovim ../../home/neovim
../../home/thunderbird ../../home/thunderbird
../../home/git ../../home/git
../../home/rofi
../../home/sway/swaync
../../home/sway/waybar
../../home/hyprland
]; ];
programs.direnv = { programs.direnv = {
@ -62,6 +73,7 @@ in
programs = with pkgs; [ programs = with pkgs; [
keepassxc keepassxc
nextcloud-client nextcloud-client
cliphist
]; ];
in in
programs ++ scripts; programs ++ scripts;
@ -95,6 +107,7 @@ in
eza eza
bat bat
kdeconnect kdeconnect
swaynotificationcenter
]; ];
system.stateVersion = stateVersion; system.stateVersion = stateVersion;

View file

@ -10,5 +10,6 @@
./programs/sway.nix ./programs/sway.nix
./programs/lazygit.nix ./programs/lazygit.nix
./programs/steam.nix ./programs/steam.nix
./programs/hyprland.nix
]; ];
} }

View file

@ -0,0 +1 @@
{ programs.hyprland.enable = true; }

View file

@ -1,7 +1,11 @@
{ pkgs, ... }:
{ {
pkgs,
config,
lib,
...
}:
lib.mkIf config.programs.firefox.enable {
programs.sway = { programs.sway = {
enable = true;
wrapperFeatures.gtk = true; wrapperFeatures.gtk = true;
extraPackages = with pkgs; [ extraPackages = with pkgs; [
waybar waybar