completely refactor and modularize flake

This commit is contained in:
willifan 2024-12-26 23:10:52 +01:00
parent 3b1ed7e281
commit b7210fcf8e
141 changed files with 884 additions and 2605 deletions

View file

@ -61,7 +61,6 @@
specialArgs = { specialArgs = {
hostname = "Lenni"; hostname = "Lenni";
type = "desktop";
inherit attrs; inherit attrs;
inherit system; inherit system;
}; };
@ -78,7 +77,6 @@
attrs.nixvim.nixosModules.nixvim attrs.nixvim.nixosModules.nixvim
attrs.nixos-hardware.nixosModules.framework-12th-gen-intel attrs.nixos-hardware.nixosModules.framework-12th-gen-intel
./hosts/Lenni ./hosts/Lenni
./users/willifan
./pkgs ./pkgs
]; ];
@ -91,7 +89,6 @@
specialArgs = { specialArgs = {
hostname = "Puenktchen"; hostname = "Puenktchen";
type = "desktop";
inherit attrs; inherit attrs;
inherit system; inherit system;
}; };
@ -110,7 +107,6 @@
attrs.nixos-hardware.nixosModules.common-cpu-amd-pstate attrs.nixos-hardware.nixosModules.common-cpu-amd-pstate
attrs.nixos-hardware.nixosModules.common-cpu-amd-zenpower attrs.nixos-hardware.nixosModules.common-cpu-amd-zenpower
./hosts/Puenktchen ./hosts/Puenktchen
./users/willifan
./pkgs ./pkgs
]; ];
@ -123,7 +119,6 @@
specialArgs = { specialArgs = {
hostname = "Anton"; hostname = "Anton";
type = "server";
inherit attrs; inherit attrs;
inherit system; inherit system;
}; };
@ -142,7 +137,6 @@
attrs.nixos-hardware.nixosModules.common-cpu-amd-pstate attrs.nixos-hardware.nixosModules.common-cpu-amd-pstate
attrs.nixos-hardware.nixosModules.common-cpu-amd-zenpower attrs.nixos-hardware.nixosModules.common-cpu-amd-zenpower
./hosts/Anton ./hosts/Anton
./users/willifan
./pkgs ./pkgs
]; ];
@ -155,7 +149,6 @@
specialArgs = { specialArgs = {
hostname = "Lillie"; hostname = "Lillie";
type = "desktop";
inherit attrs; inherit attrs;
inherit system; inherit system;
}; };
@ -172,7 +165,6 @@
attrs.nixvim.nixosModules.nixvim attrs.nixvim.nixosModules.nixvim
attrs.jovian.nixosModules.default attrs.jovian.nixosModules.default
./hosts/Lillie ./hosts/Lillie
./users/willifan
./pkgs ./pkgs
]; ];

View file

@ -15,12 +15,12 @@
./nfs.nix ./nfs.nix
./radicale.nix ./radicale.nix
../../modules/DEFAULT/COMMON ../../modules/default
../../modules/DEFAULT/SERVER
../../modules/HOME-MANAGER/COMMON
]; ];
server.enable = true;
common.syncthing = { common.syncthing = {
enable = true; enable = true;
devices = { devices = {

View file

@ -1,14 +1,20 @@
{ ... }: { ... }:
{ {
imports = [ imports = [
./auto-cpufreq.nix
./backlight.nix
./hardware-configuration.nix ./hardware-configuration.nix
#./disko.nix #./disko.nix
../../modules/DEFAULT/COMMON ../../modules/default
../../modules/DEFAULT/DESKTOP
../../modules/HOME-MANAGER/COMMON
]; ];
desktop = {
enable = true;
hyprland.hardware.Lenni.enable = true;
};
common.syncthing = { common.syncthing = {
enable = true; enable = true;
devices = { devices = {
@ -16,4 +22,7 @@
}; };
}; };
hardware.bluetooth.enable = true;
services.hardware.bolt.enable = true;
} }

View file

@ -3,10 +3,20 @@
imports = [ imports = [
./hardware-configuration.nix ./hardware-configuration.nix
./disko.nix ./disko.nix
./jovian.nix
../../modules/DEFAULT/COMMON ../../modules/default
../../modules/DEFAULT/DESKTOP
../../modules/HOME-MANAGER/COMMON
]; ];
desktop = {
enable = true;
autostart.enable = false;
hyprland = {
hardware.Lillie = true;
};
};
} }

View file

@ -4,12 +4,20 @@
./hardware-configuration.nix ./hardware-configuration.nix
./disko.nix ./disko.nix
../../modules/DEFAULT/COMMON ../../modules/default
../../modules/DEFAULT/DESKTOP
../../modules/HOME-MANAGER/COMMON
]; ];
desktop = {
enable = true;
hyprlock.enable = false;
hypridle.enable = false;
hyprland = {
hardware.Puenktchen = true;
};
};
common.syncthing = { common.syncthing = {
enable = true; enable = true;
devices = { devices = {

View file

@ -1,15 +0,0 @@
{ pkgs, ... }:
{
imports = [
./bash.nix
./eza.nix
./hyfetch.nix
./nushell.nix
./ssh.nix
./starship.nix
./zoxide.nix
];
}

View file

@ -1,8 +0,0 @@
{ ... }:
{
programs.tmux = {
enable = true;
};
}

View file

@ -1,9 +0,0 @@
{ ... }:
{
services.avizo.enable = true;
programs.bat.enable = true;
programs.btop.enable = true;
programs.yazi.enable = true;
}

View file

@ -1,15 +1,22 @@
{ hostname, ... }: { lib, config, hostname, ... }:
{ {
imports = [ imports = [
./desktop
./nixvim ./nixvim
./server
./autoupdate.nix ./autoupdate.nix
./boot.nix
./envvar.nix ./envvar.nix
./garbage-collect.nix ./garbage-collect.nix
./keyd.nix ./keyd.nix
./locales.nix ./locales.nix
./mimetype.nix ./mimetype.nix
./optimise.nix ./optimise.nix
./options.nix
./packages.nix ./packages.nix
./sops.nix ./sops.nix
./stylix.nix ./stylix.nix

View file

@ -1,5 +1,5 @@
{ pkgs, attrs, system, ... }: { lib, config, pkgs, attrs, system, ... }:
{ lib.mkIf config.desktop.enable {
environment.systemPackages = environment.systemPackages =
(with pkgs; [ (with pkgs; [

View file

@ -1,9 +1,6 @@
{ ... }: { lib, config, ... }:
{ lib.mkIf config.desktop.enable {
boot = { boot = {
loader.systemd-boot.enable = true;
loader.efi.canTouchEfiVariables = true;
initrd.systemd.enable = true;
plymouth = { plymouth = {
enable = true; enable = true;
# theme = "bgrt"; # theme = "bgrt";

View file

@ -1,16 +1,20 @@
{ hostname, ... }: { ... }:
{ {
networking.hostName = hostname;
imports = [ imports = [
./applications.nix
./boot.nix ./boot.nix
./emulation.nix
./hyprland.nix
./keyboard.nix
./nfs-client.nix ./nfs-client.nix
./nix-ld.nix ./nix-ld.nix
./pipewire.nix
./polkit.nix
./printers.nix ./printers.nix
./remoteBuilder.nix ./remoteBuilder.nix
./ssh-server.nix ./ssh-server.nix
./thunar.nix
]; ];
hardware.bluetooth.enable = true;
services.hardware.bolt.enable = true;
} }

View file

@ -1,6 +1,5 @@
{ pkgs, ... }: { lib, config, pkgs, ... }:
{ lib.mkIf config.desktop.enable {
environment.systemPackages = with pkgs; [ environment.systemPackages = with pkgs; [
melonDS melonDS
dolphin-emu dolphin-emu

View file

@ -1,5 +1,5 @@
{ pkgs, ... }: { lib, config, pkgs, ... }:
{ lib.mkIf config.desktop.enable {
services.udev.extraRules = '' services.udev.extraRules = ''
# Disable mouse as gamepad # Disable mouse as gamepad

View file

@ -3,10 +3,10 @@
imports = [ imports = [
./ROG_Pugio_II_fixes.nix
./mangohud.nix ./mangohud.nix
./minecraft.nix ./minecraft.nix
./moonlight.nix ./moonlight.nix
./ROG_Pugio_II_fixes.nix
./steam.nix ./steam.nix
./tetrio.nix ./tetrio.nix
./yuzu.nix ./yuzu.nix

View file

@ -1,5 +1,5 @@
{ pkgs, ... }: { lib, config, pkgs, ... }:
{ lib.mkIf config.desktop.enable {
environment.systemPackages = with pkgs; [ environment.systemPackages = with pkgs; [
mangohud mangohud
]; ];

View file

@ -1,5 +1,5 @@
{ pkgs, ... }: { lib, config, pkgs, ... }:
{ lib.mkIf config.desktop.enable {
environment.systemPackages = with pkgs; [ environment.systemPackages = with pkgs; [
prismlauncher prismlauncher
]; ];

View file

@ -1,5 +1,5 @@
{ pkgs, ... }: { lib, config, pkgs, ... }:
{ lib.mkIf config.desktop.enable {
environment.systemPackages = [ environment.systemPackages = [
pkgs.moonlight-qt pkgs.moonlight-qt

View file

@ -1,5 +1,5 @@
{ ... }: { lib, config, ... }:
{ lib.mkIf config.desktop.enable {
programs.steam = { programs.steam = {
enable = true; enable = true;
gamescopeSession = { gamescopeSession = {

View file

@ -1,5 +1,5 @@
{ pkgs, ... }: { lib, config, pkgs, ... }:
{ lib.mkIf config.desktop.enable {
environment.systemPackages = [ environment.systemPackages = [
pkgs.tetrio-desktop pkgs.tetrio-desktop

View file

@ -0,0 +1,6 @@
{ lib, config, pkgs, ... }:
lib.mkIf config.desktop.enable {
environment.systemPackages = with pkgs; [
yuzu
];
}

View file

@ -1,5 +1,9 @@
{ ... }: { lib, config, ... }:
{ lib.mkIf config.desktop.autologin.enable {
security.pam.services.hyprlock = {};
services.greetd = { services.greetd = {
enable = true; enable = true;
settings = rec { settings = rec {
@ -10,4 +14,5 @@
default_session = initial_session; default_session = initial_session;
}; };
}; };
} }

View file

@ -1,5 +1,5 @@
{ pkgs, ... }: { lib, config, pkgs, ... }:
{ lib.mkIf config.desktop.enable {
environment.systemPackages = with pkgs; [ environment.systemPackages = with pkgs; [
qmk-udev-rules qmk-udev-rules
vial vial

View file

@ -1,5 +1,5 @@
{ pkgs, ... }: { lib, config, pkgs, ... }:
{ lib.mkIf config.desktop.enable {
environment.systemPackages = with pkgs; [ environment.systemPackages = with pkgs; [
nfs-utils nfs-utils

View file

@ -1,5 +1,5 @@
{ pkgs, ... }: { lib, config, pkgs, ... }:
{ lib.mkIf config.desktop.enable {
programs.nix-ld.enable = true; programs.nix-ld.enable = true;
programs.nix-ld.libraries = with pkgs; [ programs.nix-ld.libraries = with pkgs; [

View file

@ -1,5 +1,5 @@
{ ... }: { lib, config, ... }:
{ lib.mkIf config.desktop.enable {
security.rtkit.enable = true; security.rtkit.enable = true;
services.pipewire = { services.pipewire = {
enable = true; enable = true;

View file

@ -1,5 +1,5 @@
{ pkgs, ... }: { lib, config, pkgs, ... }:
{ lib.mkIf config.desktop.enable {
environment.systemPackages = with pkgs; [ environment.systemPackages = with pkgs; [
polkit_gnome polkit_gnome

View file

@ -1,5 +1,5 @@
{ pkgs, ... }: { lib, config, pkgs, ... }:
{ lib.mkIf config.desktop.enable {
services.printing = { services.printing = {
enable = true; enable = true;
drivers = [ pkgs.gutenprint pkgs.gutenprintBin ]; drivers = [ pkgs.gutenprint pkgs.gutenprintBin ];

View file

@ -1,6 +1,5 @@
{ ... }: { lib, config, ... }:
lib.mkIf config.desktop.enable {
{
nix.buildMachines = [ { nix.buildMachines = [ {
hostName = "Anton"; hostName = "Anton";
sshUser = "builder"; sshUser = "builder";
@ -19,4 +18,5 @@
nix.extraOptions = '' nix.extraOptions = ''
builders-use-substitutes = true builders-use-substitutes = true
''; '';
boot.binfmt.emulatedSystems = [ "aarch64-linux" ];
} }

View file

@ -1,5 +1,5 @@
{ ... }: { lib, config, ... }:
{ lib.mkIf config.desktop.enable {
services.openssh = { services.openssh = {
enable = true; enable = true;

View file

@ -1,5 +1,5 @@
{ pkgs, ... }: { lib, config, pkgs, ... }:
{ lib.mkIf config.desktop.enable {
services.gvfs.enable = true; services.gvfs.enable = true;
services.tumbler.enable = true; services.tumbler.enable = true;

View file

@ -0,0 +1,13 @@
{ lib, ... }:
{
options = {
desktop.enable = lib.mkOption {
default = false;
type = lib.types.bool;
};
server.enable = lib.mkOption {
default = false;
type = lib.types.bool;
};
};
}

View file

@ -1,5 +1,5 @@
{ config, ... }: { lib, config, ... }:
{ lib.mkIf config.server.enable {
users.users.builder = { users.users.builder = {
group = "builder"; group = "builder";
isNormalUser = true; isNormalUser = true;

View file

@ -1,8 +1,7 @@
{ ... }: { lib, config, ... }:
{ {
imports = [ imports = [
./boot.nix
./builder.nix ./builder.nix
./ssh-server.nix ./ssh-server.nix
]; ];

View file

@ -1,5 +1,5 @@
{ ... }: { lib, config, ... }:
{ lib.mkIf config.server.enable {
services.openssh = { services.openssh = {
enable = true; enable = true;

View file

@ -0,0 +1,7 @@
{ ... }:
{
imports = [
./common
./home-manager
];
}

View file

@ -1,15 +1,19 @@
{ ... }: { ... }:
{ {
home-manager.users.willifan = {
imports = [ imports = [
./desktop
./shell ./shell
./tmux ./tmux
./utils ./utils
./git.nix ./git.nix
./stylix.nix ./stylix.nix
]; ];
home-manager.users.willifan = {
imports = [
];
home.stateVersion = "23.11"; home.stateVersion = "23.11";
}; };

View file

@ -0,0 +1,17 @@
{ ... }:
{
imports = [
./hyprland
./options.nix
./kitty.nix
./vscodium.nix
];
home-manager.users.willifan = {
imports = [
];
};
}

View file

@ -0,0 +1,21 @@
{ ... }:
{
#home-manager.users.willifan = {
imports = [
./fuzzel.nix
./hyprexit.nix
./hypridle.nix
./hyprlock.nix
./hyprpaper.nix
./mako.nix
./utils.nix
./wlogout.nix
./options.nix
./hyprland.nix
];
#};
}

View file

@ -0,0 +1,15 @@
{ lib, config, ... }:
{
home-manager.users.willifan = {
programs.fuzzel = lib.mkIf config.desktop.fuzzel.enable {
enable = true;
settings = {
main = {
lines = 12;
width = 45;
line-height = 20;
};
};
};
};
}

View file

@ -0,0 +1,11 @@
{ lib, config, pkgs, ... }:
{
home-manager.users.willifan = {
home.packages = lib.mkIf config.desktop.hyprexit.enable [
(pkgs.writeShellScriptBin "hyprexit" ''
${pkgs.hyprland}/bin/hyprctl dispatch exit
${pkgs.systemd}/bin/loginctl terminate-user willifan
'')
];
};
}

View file

@ -0,0 +1,40 @@
{ lib, config, ... }:
{
home-manager.users.willifan = {
services.hypridle = lib.mkIf config.desktop.hypridle.enable {
enable = true;
settings = {
general = {
lock_cmd = "pidof hyprlock || hyprlock"; # avoid starting multiple hyprlock instances.
before_sleep_cmd = "loginctl lock-session && sleep 2"; # lock before suspend.
after_sleep_cmd = "hyprctl dispatch dpms on"; # to avoid having to press a key twice to turn on the display.
};
listener = [
#{
# timeout = 150; # 2.5min.
# on-timeout = brightnessctl -s set 10; # set monitor backlight to minimum, avoid 0 on OLED monitor.
# on-resume = brightnessctl -r; # monitor backlight restor.
#}
{
timeout = 300; # 5min
on-timeout = "loginctl lock-session"; # lock screen when timeout has passed
}
{
timeout = 380; # 5.5min
on-timeout = "hyprctl dispatch dpms off"; # screen off when timeout has passed
on-resume = "hyprctl dispatch dpms on"; # screen on when activity is detected after timeout has fired.
}
{
timeout = 600; # 30min
on-timeout = "systemctl suspend-then-hibernate"; # suspend pc
}
];
};
};
};
}

View file

@ -0,0 +1,263 @@
{ pkgs, lib, config, ...}:
lib.mkIf config.desktop.hyprland.enable {
home-manager.users.willifan = {
wayland.windowManager.hyprland = {
enable = true;
systemd.variables = ["--all"];
package = pkgs.hyprland;
settings = {
"$SCRIPTS" = "$XDG_CONFIG_HOME/desktop-utils/scripts";
misc = {
disable_hyprland_logo=true;
};
monitor = [
", preffered, auto, 1"
] ++ lib.optionals config.desktop.hyprland.hardware.Lenni.enable [
"eDP-1, preferred, 0x0, 1.6"
] ++ lib.optionals config.desktop.hyprland.hardware.Puenktchen.enable [
"desc:ViewSonic Corporation VX2705-2KP W6Z205100250, 2560x1440@144Hz, 0x384, 1.25"
"desc:ViewSonic Corporation VX2705-2KP W6Z210400766, 2560x1440@144Hz, 2048x384, 1.25"
"desc:BNQ BenQ BL2283 CAM01567019, 1920x1080@60Hz, 4096x0, 1.0, transform, 3"
];
# Execute your favorite apps at launch
exec-once = [
''hyprctl dispatch exec "[workspace 1 silent] zen"''
''hyprctl dispatch exec "[workspace 2 silent] kitty"''
#''hyprctl dispatch exec "[workspace 3 silent] "''
#''hyprctl dispatch exec "[workspace 4 silent] "''
#''hyprctl dispatch exec "[workspace 8 silent] "''
''hyprctl dispatch exec "[workspace 9 silent] vesktop"''
''hyprctl dispatch exec "[workspace special:ctrl silent] thunar"''
''hyprctl dispatch exec "[workspace special:alt silent] obsidian"''
#''hyprctl dispatch exec "[workspace special:altgr silent]"''
#''hyprctl dispatch exec "[workspace special:strg silent] "''
];
xwayland.force_zero_scaling = true;
input = {
kb_layout = "us";
kb_variant = "";
kb_model = "";
kb_options = "compose:menu";
kb_rules = "";
follow_mouse = 1;
touchdevice.transform = lib.mkIf config.desktop.hyprland.hardware.Lillie.enable 3;
touchpad.natural_scroll = "yes";
sensitivity = -0.8; # -1.0 - 1.0, 0 means no modification.
numlock_by_default = 1;
special_fallthrough = true;
};
general = {
gaps_in = 2;
gaps_out = 5;
border_size = 2;
# "col.active_border" = "rgba(ffa44bee)";
# "col.inactive_border" = "rgba(595959aa)";
layout = "dwindle";
resize_on_border = true;
};
decoration = {
rounding = 10;
blur = {
enabled = false;
size = 3;
passes = 1;
new_optimizations = 1;
};
shadow.enabled = true;
shadow.range = 4;
shadow.render_power = 3;
# "col.shadow" = "rgba(1a1a1aee)";
};
misc = {
vfr = true;
mouse_move_enables_dpms = true;
};
animations = {
enabled = "yes";
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"
"specialWorkspace, 1, 8, default, slidefadevert 20%"
];
};
dwindle = {
pseudotile = "yes"; # master switch for pseudotiling. Enabling is bound to mainMod + P in the keybinds section below
preserve_split = "yes"; # you probably want this
};
gestures = {
workspace_swipe = "on";
workspace_swipe_create_new = "false";
workspace_swipe_touch = lib.mkIf config.desktop.hyprland.hardware.Lillie.enable "true";
};
device = lib.mkIf config.desktop.hyprland.hardware.Lenni.enable {
name = "pixa3854:00-093a:0274-touchpad";
sensitivity = 0;
natural_scroll = "yes";
};
windowrule = [
"idleinhibit fullscreen, ^(firefox)$"
"float, ^(thunar)$"
"stayfocused, title:^(Enpass Assistant)$"
"pin, title:^(Enpass Assistant)$"
"center, title:^(Enpass Assistant)$"
"float, ^(Enpass)$"
"center, ^(Enpass)$"
];
windowrulev2 = [
"center, xwayland:(1)"
"nofocus,class:^jetbrains-(?!toolbox),floating:1,title:^win\d+$"
''workspace +0, workspace:name:special:ctrl, floating:0''
''float, workspace:name:special:altgr, onworkspace:w[2]''
''float, workspace:name:special:strg, onworkspace:w[1]''
''workspace +0, workspace:name:special:strg, floating:0''
];
"$mainMod" = "SUPER";
bind = [
''$mainMod, Q, exec, kitty''
''$mainMod, C, killactive, ''
''$mainMod, M, exit, ''
''$mainMod, E, exec, thunar''
''$mainMod, V, togglefloating, ''
''$mainMod, R, exec, fuzzel''
''$mainMod, P, exec, Enpass''
''$mainMod, F, fullscreen''
# Move focus with mainMod + arrow keys
''$mainMod, h, movefocus, l''
''$mainMod, l, movefocus, r''
''$mainMod, k, movefocus, u''
''$mainMod, j, movefocus, d''
'', XF86AudioMute, exec, wpctl set-mute @DEFAULT_AUDIO_SINK@ toggle''
'', XF86AudioPrev, exec, playerctl previous''
'', XF86AudioPlay, exec, playerctl play-pause''
'', XF86AudioNext, exec, playerctl next''
'', print, exec, grim -g "$(slurp)" - | wl-copy -t image/png''
# Switch workspaces with mainMod + [0-9]
''$mainMod, 1, exec, $SCRIPTS/workspaces.sh 1''
''$mainMod, 2, exec, $SCRIPTS/workspaces.sh 2''
''$mainMod, 3, exec, $SCRIPTS/workspaces.sh 3''
''$mainMod, 4, exec, $SCRIPTS/workspaces.sh 4''
''$mainMod, 5, exec, $SCRIPTS/workspaces.sh 5''
''$mainMod, 6, exec, $SCRIPTS/workspaces.sh 6''
''$mainMod, 7, exec, $SCRIPTS/workspaces.sh 7''
''$mainMod, 8, exec, $SCRIPTS/workspaces.sh 8''
''$mainMod, 9, exec, $SCRIPTS/workspaces.sh 9''
# 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''
# Monitor focus
''$mainMod ALT, 1, focusmonitor, 0''
''$mainMod ALT, 2, focusmonitor, 1''
''$mainMod ALT, 3, focusmonitor, 2''
''$mainMod ALT, 4, focusmonitor, 3''
''$mainMod ALT, 5, focusmonitor, 4''
''$mainMod ALT, 6, focusmonitor, 5''
''$mainMod ALT, 7, focusmonitor, 6''
''$mainMod ALT, 8, focusmonitor, 7''
''$mainMod ALT, 9, focusmonitor, 8''
''$mainMod ALT, 0, focusmonitor, 9''
# Scroll through existing workspaces with mainMod + scroll
''$mainMod, mouse_down, workspace, e+1''
''$mainMod, mouse_up, workspace, e-1''
];
binde = [
'', XF86AudioLowerVolume, exec, $SCRIPTS/volume.sh -5''
'', XF86AudioRaiseVolume, exec, $SCRIPTS/volume.sh 5''
];
bindel = [
'', XF86MonBrightnessDown, exec, $SCRIPTS/brightness.sh -4800''
'', XF86MonBrightnessUp, exec, $SCRIPTS/brightness.sh 4800''
];
bindr = [
''SUPERCTRL, Control_L, togglespecialworkspace, ctrl''
''SUPERALT, Alt_L, togglespecialworkspace, alt''
''SUPERALT, ALT_R, togglespecialworkspace, altgr''
''SUPERCTRL, Control_R, togglespecialworkspace, strg''
];
bindm = [
# Move/resize windows with mainMod + LMB/RMB and dragging
''$mainMod, mouse:272, movewindow''
''$mainMod, mouse:273, resizewindow''
];
# ------------------------------------------
# ########################################
# ####### Workspaces ###########
# ########################################
# ------------------------------------------
workspace = [
"1, persistent:true"
"2, persistent:true"
"3, persistent:true"
"4, persistent:true"
"5, persistent:true"
"6, persistent:true"
"7, persistent:true"
"8, persistent:true"
"8, persistent:true"
"9, persistent:true"
"name:special:ctrl, persistent:true"
"name:special:alt, persistent:true"
"name:special:altgr, persistent:true"
"name:special:strg, persistent:true"
];
};
};
};
}

View file

@ -0,0 +1,56 @@
{ lib, config, ... }:
{
home-manager.users.willifan = {
programs.hyprlock = lib.mkIf config.desktop.hyprlock.enable {
enable = true;
settings = {
background = {
monitor = "";
# all these options are taken from hyprland, see https://wiki.hyprland.org/Configuring/Variables/#blur for explanations
blur_passes = 3; # 0 disables blurring
blur_size = 7;
noise = 0.0117;
contrast = 0.8916;
brightness = 0.8172;
vibrancy = 0.1696;
vibrancy_darkness = 0.0;
};
input-field = {
monitor = "";
size = "300, 75";
outline_thickness = 3;
dots_size = 0.33; # Scale of input-field height, 0.2 - 0.8
dots_spacing = 0.15; # Scale of dots' absolute size, 0.0 - 1.0
dots_center = false;
dots_rounding = -1; # -1 default circle, -2 follow input-field rounding
fade_on_empty = true;
fade_timeout = 1000; # Milliseconds before fade_on_empty is triggered.
placeholder_text = "<i>Input Password...</i>"; # Text rendered in the input box when it's empty.
hide_input = false;
rounding = -1; # -1 means complete rounding (circle/oval)
fail_text = "<i>$FAIL <b>($ATTEMPTS)</b></i>"; # can be set to empty
fail_transition = 300; # transition time in ms between normal outer_color and fail_color
capslock_color = -1;
numlock_color = -1;
bothlock_color = -1; # when both locks are active. -1 means don't change outer color (same for above)
invert_numlock = false; # change color if numlock is off
position = "0, -20";
halign = "center";
valign = "center";
};
label = {
monitor = "";
text = "Hi there, $USER";
color = "rgba(200, 200, 200, 1.0)";
font_size = 25;
font_family = "Noto Sans";
position = "0, 80";
halign = "center";
valign = "center";
};
};
};
};
}

View file

@ -0,0 +1,15 @@
{ lib, config, ... }:
{
home-manager.users.willifan = {
services.hyprpaper = lib.mkIf config.desktop.hyprpaper.enable {
enable = true;
settings = {
splash = true;
ipc = "off";
};
};
};
}

View file

@ -0,0 +1,11 @@
{ lib, config, ... }:
{
home-manager.users.willifan = {
services.mako = lib.mkIf config.desktop.mako.enable {
enable = true;
borderRadius = 10;
borderSize = 2;
};
};
}

View file

@ -0,0 +1,65 @@
{ lib, config, ... }:
{
options = {
desktop = {
autologin.enable = lib.mkOption {
default = config.desktop.enable;
type = lib.types.bool;
};
fuzzel.enable = lib.mkOption {
default = config.desktop.enable;
type = lib.types.bool;
};
hyprexit.enable = lib.mkOption {
default = config.desktop.enable;
type = lib.types.bool;
};
hypridle.enable = lib.mkOption {
default = config.desktop.enable;
type = lib.types.bool;
};
hyprland = {
enable = lib.mkOption {
default = config.desktop.enable;
type = lib.types.bool;
};
hardware = {
Lenni.enable = lib.mkOption {
default = false;
type = lib.types.bool;
};
Puenktchen.enable = lib.mkOption {
default = false;
type = lib.types.bool;
};
Lillie.enable = lib.mkOption{
default = false;
type = lib.types.bool;
};
};
};
hyprlock.enable = lib.mkOption {
default = config.desktop.enable;
type = lib.types.bool;
};
hyprpaper.enable = lib.mkOption {
default = config.desktop.enable;
type = lib.types.bool;
};
mako.enable = lib.mkOption {
default = config.desktop.enable;
type = lib.types.bool;
};
utils.enable = lib.mkOption {
default = config.desktop.enable;
type = lib.types.bool;
};
wlogout.enable = lib.mkOption {
default = config.desktop.enable;
type = lib.types.bool;
};
};
};
}

View file

@ -0,0 +1,24 @@
{ lib, config, pkgs, ... }:
{
home-manager.users.willifan = {
home.packages = lib.mkIf config.desktop.utils.enable [
pkgs.hyprpicker
pkgs.hyprcursor
pkgs.grim
pkgs.slurp
pkgs.wl-clipboard
pkgs.playerctl
pkgs.dconf
pkgs.jq
pkgs.pulseaudio
pkgs.inotify-tools
pkgs.papirus-icon-theme
pkgs.eww
];
};
}

View file

@ -0,0 +1,83 @@
{ lib, config, ... }:
{
home-manager.users.willifan = {
programs.wlogout = lib.mkIf config.desktop.wlogout.enable {
enable = true;
layout = [
{
label = "shutdown";
action = "systemctl poweroff";
text = "Shutdown";
}
{
label = "hyprland";
action = "hyprctl dispatch exit";
text = "Exit Hyprland";
}
{
label = "whatever";
action = "";
text = "whatever";
}
{
label = "reboot";
action = "systemctl reboot";
text = "Reboot";
}
{
label = "suspend";
action = "systemctl suspend";
text = "Suspend";
}
{
label = "hibernate";
action = "systemctl hibernate";
text = "Hibernate";
}
];
style = ''
@import url("file:///home/willifan/.config/gtk-4.0/gtk.css");
* {
background-image: none;
box-shadow: none;
}
window {
background-color: rgba(12, 12, 12, 0.9);
}
button {
border-radius: 10px;
border-color: #ffa44b;
border-style: solid;
border-width: 2px;
background-repeat: no-repeat;
background-position: center;
background-size: 25%;
}
button:focus, button:active, button:hover {
/*background-color: #3700B3;*/
outline-style: none;
}
#suspend {
background-image: image(url("/home/willifan/.config/desktop-utils/images/suspend.png"));
}
#hibernate {
background-image: image(url("/home/willifan/.config/desktop-utils/images/hibernate.png"));
}
#shutdown {
background-image: image(url("/home/willifan/.config/desktop-utils/images/shutdown.png"));
}
#reboot {
background-image: image(url("/home/willifan/.config/desktop-utils/images/reboot.png"));
}
'';
};
};
}

View file

@ -0,0 +1,11 @@
{ lib, config, ... }:
{
home-manager.users.willifan = {
programs.kitty = lib.mkIf config.desktop.kitty.enable {
enable = true;
settings = {
enable_audio_bell = false;
};
};
};
}

View file

@ -0,0 +1,9 @@
{ lib, config, ... }:
{
options = {
desktop = {
kitty.enable = lib.mkEnableOption { default = config.desktop.enable; };
vscodium.enable = lib.mkEnableOption { default = config.desktop.enable; };
};
};
}

View file

@ -0,0 +1,62 @@
{ lib, config, pkgs, ... }:
{
home-manager.users.willifan = {
programs.vscode = lib.mkIf config.desktop.vscodium.enable {
enable = true;
package = pkgs.vscodium;
userSettings = {
"[nix]"."editor.tabSize" = 2;
"explorer.confirmDragAndDrop" = false;
"cmake.showOptionsMovedNotification" = false;
"extensions.autoUpdate" = false;
};
extensions = with pkgs.vscode-extensions; [
# System
arrterian.nix-env-selector
bbenoist.nix
#fireblast.hyprlang-vscode
#eww-yuck.yuck
#Rust
rust-lang.rust-analyzer
serayuzgur.crates
bungcip.better-toml
vadimcn.vscode-lldb
usernamehw.errorlens
#C/C++
ms-vscode.cpptools
twxs.cmake
ms-vscode.cmake-tools
#Shell
timonwong.shellcheck
mads-hartmann.bash-ide-vscode
#Git
#phil294.git-log--graph
] ++ pkgs.vscode-utils.extensionsFromVscodeMarketplace [
{
name = "hyprlang-vscode";
publisher = "fireblast";
version = "0.0.1";
sha256 = "lSMihMIue0qu9+97EgT5dqjbzsey0TLZDpJby+Piip4=";
}
{
name = "yuck";
publisher = "eww-yuck";
version = "0.0.3";
sha256 = "DITgLedaO0Ifrttu+ZXkiaVA7Ua5RXc4jXQHPYLqrcM=";
}
{
name = "git-log--graph";
publisher = "phil294";
version = "0.1.15";
sha256 = "lvjDkvXSX7rw7HyyK3WWQLnGezvL6FPEgtjIi8KWkU0=";
}
];
};
};
}

View file

@ -1,5 +1,6 @@
{ pkgs, ... }: { pkgs, ... }:
{ {
home-manager.users.willifan = {
programs.git = { programs.git = {
enable = true; enable = true;
package = pkgs.gitAndTools.gitFull; package = pkgs.gitAndTools.gitFull;
@ -9,4 +10,5 @@
init.defaultBranch = "main"; init.defaultBranch = "main";
}; };
}; };
};
} }

View file

@ -0,0 +1,5 @@
{ lib, ... }:
{
}

View file

@ -0,0 +1,16 @@
{ pkgs, ... }:
{
home-manager.users.willifan = {
imports = [
./bash.nix
./eza.nix
./hyfetch.nix
./nushell.nix
./ssh.nix
./starship.nix
./zoxide.nix
];
};
}

View file

@ -7,6 +7,7 @@ let
in in
{ {
home-manager.users.willifan = {
stylix = { stylix = {
enable = true; enable = true;
@ -62,5 +63,6 @@ in
}; };
}; };
};
} }

View file

@ -1,11 +1,10 @@
{ ... }: { ... }:
{ {
home-manager.users.willifan = {
services.mako = {
enable = true;
borderRadius = 10;
borderSize = 2;
home-manager.users.willifan = {
programs.tmux = {
enable = true;
}; };
}; };
} }

View file

@ -0,0 +1,9 @@
{ ... }:
{
home-manager.users.willifan = {
services.avizo.enable = true;
programs.bat.enable = true;
programs.btop.enable = true;
programs.yazi.enable = true;
};
}

View file

@ -1,2 +0,0 @@
{ ... }:
{}

View file

@ -1,7 +0,0 @@
{ ... }:
{
imports = [
./auto-cpufreq.nix
./backlight.nix
];
}

View file

@ -1,8 +0,0 @@
{ ... }:
{
imports = [
./emulation.nix
./jovian.nix
];
}

View file

@ -1,2 +0,0 @@
{ ... }:
{}

View file

@ -1,7 +0,0 @@
{ type, hostname, ... }:
{
imports = [
./${hostname}
./${type}
];
}

Some files were not shown because too many files have changed in this diff Show more