Kieran's opinionated (and probably slightly dumb) nix config

feat: use vic/import-tree

dunkirk.sh c799efa9 3cec15ef

verified
+16
flake.lock
···
"type": "github"
}
},
+
"import-tree": {
+
"locked": {
+
"lastModified": 1752730890,
+
"narHash": "sha256-GES8fapSLGz36MMPRVNkSUWXUTtqvGQNXHjRmRLfJUY=",
+
"owner": "vic",
+
"repo": "import-tree",
+
"rev": "6ebb8cb87987b20264c09296166543fd3761d274",
+
"type": "github"
+
},
+
"original": {
+
"owner": "vic",
+
"repo": "import-tree",
+
"type": "github"
+
}
+
},
"ixx": {
"inputs": {
"flake-utils": [
···
"hardware": "hardware",
"home-manager": "home-manager_2",
"hyprland-contrib": "hyprland-contrib",
+
"import-tree": "import-tree",
"lix-module": "lix-module",
"nix-vscode-extensions": "nix-vscode-extensions",
"nixpkgs": "nixpkgs_5",
+2
flake.nix
···
url = "github:ByteAtATime/flare/feat/nix";
inputs.nixpkgs.follows = "nixpkgs";
};
+
+
import-tree.url = "github:vic/import-tree";
};
outputs =
+2 -1
home-manager/machines/ember/default.nix
···
{
+
inputs,
pkgs,
...
}:
{
imports = [
-
../../modules
+
(inputs.import-tree ../../modules)
];
nixpkgs.enable = true;
+2 -2
home-manager/machines/moonlark/default.nix
···
-
{ ... }:
+
{ inputs, ... }:
{
imports = [
-
../../modules
+
(inputs.import-tree ../../modules)
];
nixpkgs.enable = true;
+1 -1
home-manager/machines/nest/default.nix
···
}:
{
imports = [
-
../../modules
+
(inputs.import-tree ../../modules)
];
nixpkgs.enable = true;
+1 -1
home-manager/machines/tacyon/default.nix
···
}:
{
imports = [
-
../../modules
+
(inputs.import-tree ../../modules)
];
nixpkgs.enable = true;
+26
home-manager/modules/aesthetics/wallpapers.nix
···
+
{ lib, config, ... }:
+
{
+
options.dots.wallpapers.enable = lib.mkEnableOption "symlink a bunch of wallpapers";
+
config = lib.mkIf config.dots.wallpapers.enable {
+
xdg.configFile."wallpapers/randomize.sh".source = ../../dots/randomize-wallpaper.sh;
+
xdg.configFile."wallpapers/acon-pier.jpg".source = ../../dots/wallpapers/acon-pier.jpg;
+
xdg.configFile."wallpapers/acon-forest.jpg".source = ../../dots/wallpapers/acon-forest.jpg;
+
xdg.configFile."wallpapers/acon-gradient-clouds.jpg".source =
+
../../dots/wallpapers/acon-gradient-clouds.jpg;
+
xdg.configFile."wallpapers/acon-fsh.jpg".source = ../../dots/wallpapers/acon-fsh.jpg;
+
xdg.configFile."wallpapers/tongyu-waves.jpg".source = ../../dots/wallpapers/tongyu-waves.jpg;
+
xdg.configFile."wallpapers/acon-rocks.jpg".source = ../../dots/wallpapers/acon-rocks.jpg;
+
xdg.configFile."wallpapers/kailing-comet.jpg".source = ../../dots/wallpapers/kailing-comet.jpg;
+
xdg.configFile."wallpapers/acon-star.jpg".source = ../../dots/wallpapers/acon-star.jpg;
+
xdg.configFile."wallpapers/kailing-canyon.jpg".source = ../../dots/wallpapers/kailing-canyon.jpg;
+
xdg.configFile."wallpapers/kailing-swirls.jpg".source = ../../dots/wallpapers/kailing-swirls.jpg;
+
xdg.configFile."wallpapers/highway.jpg".source = ../../dots/wallpapers/highway.jpg;
+
xdg.configFile."wallpapers/kailing-shooting-star.jpg".source =
+
../../dots/wallpapers/kailing-shooting-star.jpg;
+
xdg.configFile."wallpapers/yessa-cat.jpg".source = ../../dots/wallpapers/yessa-cat.jpg;
+
xdg.configFile."wallpapers/annie-athena.jpg".source = ../../dots/wallpapers/annie-athena.jpg;
+
xdg.configFile."wallpapers/candy-stained-glass.jpg".source =
+
../../dots/wallpapers/candy-stained-glass.jpg;
+
xdg.configFile."wallpapers/tongyu-catcat.jpg".source = ../../dots/wallpapers/tongyu-catcat.jpg;
+
};
+
}
+40
home-manager/modules/apps/alacritty.nix
···
+
{ lib, config, ... }:
+
{
+
options.dots.terminal.alacritty.enable = lib.mkEnableOption "Enable Alacritty terminal config";
+
config = lib.mkIf config.dots.terminal.alacritty.enable {
+
catppuccin.alacritty.flavor = "mocha";
+
programs.alacritty = {
+
enable = true;
+
settings = {
+
general.live_config_reload = true;
+
cursor = {
+
unfocused_hollow = true;
+
style = {
+
blinking = "On";
+
};
+
};
+
window = {
+
opacity = 0.88;
+
padding = {
+
x = 12;
+
y = 12;
+
};
+
};
+
font = {
+
size = 13;
+
normal = {
+
family = "JetBrainsMono Nerd Font";
+
};
+
};
+
colors = {
+
normal = {
+
magenta = lib.mkForce "#db87c5";
+
};
+
primary = {
+
foreground = lib.mkForce "#ABB2BF";
+
};
+
};
+
};
+
};
+
};
+
}
-10
home-manager/modules/apps/default.nix
···
-
{ ... }:
-
{
-
imports = [
-
./irssi.nix
-
./crush.nix
-
./qutebrowser.nix
-
./spotify.nix
-
./vscode.nix
-
];
-
}
+16
home-manager/modules/apps/ghostty.nix
···
+
{ lib, config, ... }:
+
{
+
options.dots.terminal.ghostty.enable = lib.mkEnableOption "Enable Ghostty terminal config";
+
config = lib.mkIf config.dots.terminal.ghostty.enable {
+
home.file.".config/ghostty/config".text = ''
+
foreground = "#a7b1d3"
+
mouse-hide-while-typing = true
+
resize-overlay = "never"
+
theme = "catppuccin-mocha"
+
window-decoration = false
+
window-padding-x = 12
+
window-padding-y = 12
+
keybind = ctrl+shift+w=close_surface
+
'';
+
};
+
}
+43
home-manager/modules/apps/tofi.nix
···
+
{
+
lib,
+
config,
+
...
+
}:
+
{
+
options.dots.apps.tofi.enable = lib.mkEnableOption "Enable tofi config";
+
+
config = lib.mkIf config.dots.apps.tofi.enable {
+
catppuccin.tofi.enable = false;
+
+
# tofi config
+
programs.tofi = {
+
enable = true;
+
settings = {
+
font = "Fira Sans";
+
font-size = 24;
+
+
prompt-text = ''"> "'';
+
placeholder-text = "search for something";
+
hide-cursor = true;
+
+
corner-radius = 10;
+
outline-width = 3;
+
border-width = 0;
+
padding-left = "4%";
+
padding-top = "2%";
+
padding-right = 0;
+
padding-bottom = 0;
+
+
outline-color = "#1E2030";
+
text-color = "#cad3f5";
+
prompt-color = "#ed8796";
+
placeholder-color = "#8087A2";
+
selection-color = "#eed49f";
+
background-color = "#24273a";
+
+
width = "35%";
+
height = "15%";
+
};
+
};
+
};
+
}
-13
home-manager/modules/default.nix
···
-
{ ... }:
-
{
-
imports = [
-
./git.nix
-
./shell.nix
-
./terminal.nix
-
./theming.nix
-
./apps
-
./nixpkgs.nix
-
./wallpapers.nix
-
./wm/hyprland
-
];
-
}
home-manager/modules/git.nix home-manager/modules/apps/git.nix
home-manager/modules/nixpkgs.nix home-manager/modules/system/nixpkgs.nix
home-manager/modules/shell.nix home-manager/modules/system/shell.nix
-55
home-manager/modules/terminal.nix
···
-
{ lib, config, ... }:
-
{
-
options.dots.terminal.alacritty.enable = lib.mkEnableOption "Enable Alacritty terminal config";
-
options.dots.terminal.ghostty.enable = lib.mkEnableOption "Enable Ghostty terminal config";
-
config = lib.mkMerge [
-
(lib.mkIf config.dots.terminal.alacritty.enable {
-
catppuccin.alacritty.flavor = "mocha";
-
programs.alacritty = {
-
enable = true;
-
settings = {
-
general.live_config_reload = true;
-
cursor = {
-
unfocused_hollow = true;
-
style = {
-
blinking = "On";
-
};
-
};
-
window = {
-
opacity = 0.88;
-
padding = {
-
x = 12;
-
y = 12;
-
};
-
};
-
font = {
-
size = 13;
-
normal = {
-
family = "JetBrainsMono Nerd Font";
-
};
-
};
-
colors = {
-
normal = {
-
magenta = lib.mkForce "#db87c5";
-
};
-
primary = {
-
foreground = lib.mkForce "#ABB2BF";
-
};
-
};
-
};
-
};
-
})
-
(lib.mkIf config.dots.terminal.ghostty.enable {
-
home.file.".config/ghostty/config".text = ''
-
foreground = "#a7b1d3"
-
mouse-hide-while-typing = true
-
resize-overlay = "never"
-
theme = "catppuccin-mocha"
-
window-decoration = false
-
window-padding-x = 12
-
window-padding-y = 12
-
keybind = ctrl+shift+w=close_surface
-
'';
-
})
-
];
-
}
+3 -1
home-manager/modules/theming.nix home-manager/modules/aesthetics/theming.nix
···
options.dots.theming.enable = lib.mkEnableOption "Enable Catppuccin and GTK/QT themeing";
config = lib.mkIf config.dots.theming.enable {
-
catppuccin = {
enable = true;
accent = "green";
···
};
qutebrowser.enable = true;
};
+
dconf.settings = {
"org/gnome/desktop/interface" = {
color-scheme = "prefer-dark";
};
};
+
gtk = {
enable = true;
};
+
qt = {
style.name = "kvantum";
platformTheme.name = "kvantum";
-26
home-manager/modules/wallpapers.nix
···
-
{ lib, config, ... }:
-
{
-
options.dots.wallpapers.enable = lib.mkEnableOption "Enable wallpapers config globally";
-
config = lib.mkIf config.dots.wallpapers.enable {
-
xdg.configFile."wallpapers/randomize.sh".source = ../dots/randomize-wallpaper.sh;
-
xdg.configFile."wallpapers/acon-pier.jpg".source = ../dots/wallpapers/acon-pier.jpg;
-
xdg.configFile."wallpapers/acon-forest.jpg".source = ../dots/wallpapers/acon-forest.jpg;
-
xdg.configFile."wallpapers/acon-gradient-clouds.jpg".source =
-
../dots/wallpapers/acon-gradient-clouds.jpg;
-
xdg.configFile."wallpapers/acon-fsh.jpg".source = ../dots/wallpapers/acon-fsh.jpg;
-
xdg.configFile."wallpapers/tongyu-waves.jpg".source = ../dots/wallpapers/tongyu-waves.jpg;
-
xdg.configFile."wallpapers/acon-rocks.jpg".source = ../dots/wallpapers/acon-rocks.jpg;
-
xdg.configFile."wallpapers/kailing-comet.jpg".source = ../dots/wallpapers/kailing-comet.jpg;
-
xdg.configFile."wallpapers/acon-star.jpg".source = ../dots/wallpapers/acon-star.jpg;
-
xdg.configFile."wallpapers/kailing-canyon.jpg".source = ../dots/wallpapers/kailing-canyon.jpg;
-
xdg.configFile."wallpapers/kailing-swirls.jpg".source = ../dots/wallpapers/kailing-swirls.jpg;
-
xdg.configFile."wallpapers/highway.jpg".source = ../dots/wallpapers/highway.jpg;
-
xdg.configFile."wallpapers/kailing-shooting-star.jpg".source =
-
../dots/wallpapers/kailing-shooting-star.jpg;
-
xdg.configFile."wallpapers/yessa-cat.jpg".source = ../dots/wallpapers/yessa-cat.jpg;
-
xdg.configFile."wallpapers/annie-athena.jpg".source = ../dots/wallpapers/annie-athena.jpg;
-
xdg.configFile."wallpapers/candy-stained-glass.jpg".source =
-
../dots/wallpapers/candy-stained-glass.jpg;
-
xdg.configFile."wallpapers/tongyu-catcat.jpg".source = ../dots/wallpapers/tongyu-catcat.jpg;
-
};
-
}
+46 -47
home-manager/modules/wm/hyprland/default.nix
···
}:
{
options.dots.wm.hyprland.enable = lib.mkEnableOption "Enable Hyprland config";
-
config = lib.mkIf config.dots.wm.hyprland.enable (
-
lib.mkMerge [
-
(import ./hypridle.nix { inherit lib pkgs config; })
-
(import ./waybar.nix { inherit lib pkgs config; })
-
(import ./tofi.nix { inherit lib pkgs config; })
-
{
-
dots.wallpapers.enable = true;
-
xdg.configFile."hypr/macchiato.conf".source = ../../../dots/macchiato.conf;
-
xdg.configFile."hypr/hyprland.conf".source = ../../../dots/hyprland.conf;
-
xdg.configFile."hypr/prettify-ss.sh".source = ../../../dots/prettify-ss.sh;
-
xdg.configFile."hypr/tofi-emoji.sh".source = ../../../dots/tofi-emoji.sh;
-
xdg.configFile."hypr/hyprlock.conf".source = ../../../dots/hyprlock.conf;
-
xdg.configFile."face.jpeg".source = ../../../dots/face.jpeg;
-
xdg.configFile."hypr/hyprpaper.conf".source = ../../../dots/hyprpaper.conf;
-
xdg.configFile."hypr/hyprrec.sh".source = ../../../dots/hyprrec.sh;
-
xdg.configFile."hypr/charge-alert.sh".source = ../../../dots/charge-alert.sh;
-
programs.hyprlock.enable = true;
-
xdg.portal = {
-
enable = true;
-
extraPortals = with pkgs; [ xdg-desktop-portal-gtk ];
-
configPackages = with pkgs; [ xdg-desktop-portal-gtk ];
+
config = lib.mkIf config.dots.wm.hyprland.enable {
+
dots.apps.tofi.enable = true;
+
programs.hyprlock.enable = true;
+
+
dots.wallpapers.enable = true;
+
+
xdg.configFile."hypr/macchiato.conf".source = ../../../dots/macchiato.conf;
+
xdg.configFile."hypr/hyprland.conf".source = ../../../dots/hyprland.conf;
+
xdg.configFile."hypr/prettify-ss.sh".source = ../../../dots/prettify-ss.sh;
+
xdg.configFile."hypr/tofi-emoji.sh".source = ../../../dots/tofi-emoji.sh;
+
xdg.configFile."hypr/hyprlock.conf".source = ../../../dots/hyprlock.conf;
+
xdg.configFile."face.jpeg".source = ../../../dots/face.jpeg;
+
xdg.configFile."hypr/hyprpaper.conf".source = ../../../dots/hyprpaper.conf;
+
xdg.configFile."hypr/hyprrec.sh".source = ../../../dots/hyprrec.sh;
+
xdg.configFile."hypr/charge-alert.sh".source = ../../../dots/charge-alert.sh;
+
+
xdg.portal = {
+
enable = true;
+
extraPortals = with pkgs; [ xdg-desktop-portal-gtk ];
+
configPackages = with pkgs; [ xdg-desktop-portal-gtk ];
+
};
+
+
services.mako = {
+
enable = true;
+
settings = {
+
default-timeout = 4000;
+
margin = "58,6";
+
font = "Fira Sans 12";
+
border-radius = 5;
+
};
+
};
+
+
services.udiskie = {
+
enable = true;
+
settings = {
+
program_options = {
+
udisks_version = 2;
+
tray = false;
};
-
services.mako = {
-
enable = true;
-
settings = {
-
default-timeout = 4000;
-
margin = "58,6";
-
font = "Fira Sans 12";
-
border-radius = 5;
-
};
-
};
-
services.udiskie = {
-
enable = true;
-
settings = {
-
program_options = {
-
udisks_version = 2;
-
tray = false;
-
};
-
notifications = {
-
device_unmounted = false;
-
device_added = -1;
-
device_removed = -1;
-
device_mounted = -1;
-
};
-
};
+
notifications = {
+
device_unmounted = false;
+
device_added = -1;
+
device_removed = -1;
+
device_mounted = -1;
};
-
}
-
]
-
);
+
};
+
};
+
};
}
+33 -29
home-manager/modules/wm/hyprland/hypridle.nix
···
{
+
lib,
+
config,
...
}:
{
-
services.hypridle = {
-
enable = true;
-
settings = {
-
general = {
-
after_sleep_cmd = "hyprctl dispatch dpms on";
-
before_sleep_cmd = "hyprlock";
-
ignore_dbus_inhibit = false;
-
lock_cmd = "pidof hyprlock || hyprlock";
-
};
+
config = lib.mkIf config.dots.wm.hyprland.enable {
+
services.hypridle = {
+
enable = true;
+
settings = {
+
general = {
+
after_sleep_cmd = "hyprctl dispatch dpms on";
+
before_sleep_cmd = "hyprlock";
+
ignore_dbus_inhibit = false;
+
lock_cmd = "pidof hyprlock || hyprlock";
+
};
-
listener = [
-
{
-
timeout = 30;
-
on-timeout = "kill $(pidof wluma); brightnessctl -s set 10";
-
on-resume = "brightnessctl -r; wluma &";
-
}
-
{
-
timeout = 45;
-
on-timeout = "loginctl lock-session";
-
}
-
{
-
timeout = 90;
-
on-timeout = "hyprctl dispatch dpms off";
-
on-resume = "hyprctl dispatch dpms on";
-
}
-
{
-
timeout = 150;
-
on-timeout = "systemctl suspend";
-
}
-
];
+
listener = [
+
{
+
timeout = 30;
+
on-timeout = "kill $(pidof wluma); brightnessctl -s set 10";
+
on-resume = "brightnessctl -r; wluma &";
+
}
+
{
+
timeout = 45;
+
on-timeout = "loginctl lock-session";
+
}
+
{
+
timeout = 90;
+
on-timeout = "hyprctl dispatch dpms off";
+
on-resume = "hyprctl dispatch dpms on";
+
}
+
{
+
timeout = 150;
+
on-timeout = "systemctl suspend";
+
}
+
];
+
};
};
};
}
-37
home-manager/modules/wm/hyprland/tofi.nix
···
-
{
-
...
-
}:
-
{
-
catppuccin.tofi.enable = false;
-
-
# tofi config
-
programs.tofi = {
-
enable = true;
-
settings = {
-
font = "Fira Sans";
-
font-size = 24;
-
-
prompt-text = ''"> "'';
-
placeholder-text = "search for something";
-
hide-cursor = true;
-
-
corner-radius = 10;
-
outline-width = 3;
-
border-width = 0;
-
padding-left = "4%";
-
padding-top = "2%";
-
padding-right = 0;
-
padding-bottom = 0;
-
-
outline-color = "#1E2030";
-
text-color = "#cad3f5";
-
prompt-color = "#ed8796";
-
placeholder-color = "#8087A2";
-
selection-color = "#eed49f";
-
background-color = "#24273a";
-
-
width = "35%";
-
height = "15%";
-
};
-
};
-
}
+317 -314
home-manager/modules/wm/hyprland/waybar.nix
···
{
lib,
pkgs,
+
config,
...
}:
let
···
};
in
{
-
# Let it try to start a few more times
-
systemd.user.services.waybar = {
-
Unit.StartLimitBurst = 30;
-
};
-
programs.waybar = {
-
enable = true;
-
package = pkgs.waybar.overrideAttrs (oa: {
-
mesonFlags = (oa.mesonFlags or [ ]) ++ [ "-Dexperimental=true" ];
-
});
-
systemd.enable = true;
-
settings = {
-
primary = {
-
exclusive = false;
-
passthrough = false;
-
height = 46;
-
margin = "6";
-
position = "top";
-
modules-left = [
-
"custom/os"
-
"hyprland/workspaces"
-
"hyprland/submap"
-
];
+
config = lib.mkIf config.dots.wm.hyprland.enable {
+
# Let it try to start a few more times
+
systemd.user.services.waybar = {
+
Unit.StartLimitBurst = 30;
+
};
+
programs.waybar = {
+
enable = true;
+
package = pkgs.waybar.overrideAttrs (oa: {
+
mesonFlags = (oa.mesonFlags or [ ]) ++ [ "-Dexperimental=true" ];
+
});
+
systemd.enable = true;
+
settings = {
+
primary = {
+
exclusive = false;
+
passthrough = false;
+
height = 46;
+
margin = "6";
+
position = "top";
+
modules-left = [
+
"custom/os"
+
"hyprland/workspaces"
+
"hyprland/submap"
+
];
-
modules-center = [
-
"cpu"
-
"memory"
-
"disk"
-
"clock"
-
"pulseaudio"
-
"battery"
-
"idle_inhibitor"
-
];
+
modules-center = [
+
"cpu"
+
"memory"
+
"disk"
+
"clock"
+
"pulseaudio"
+
"battery"
+
"idle_inhibitor"
+
];
-
modules-right = [
-
"network"
-
"bluetooth"
-
"tray"
-
"privacy"
-
"custom/webcam"
-
"custom/hostname"
-
];
+
modules-right = [
+
"network"
+
"bluetooth"
+
"tray"
+
"privacy"
+
"custom/webcam"
+
"custom/hostname"
+
];
-
clock = {
-
interval = 1;
-
format = "{:%d/%m %H:%M:%S}";
-
format-alt = "{:%Y-%m-%d %H:%M:%S %z}";
-
on-click-left = "mode";
-
tooltip-format = ''
-
<big>{:%Y %B}</big>
-
<tt><small>{calendar}</small></tt>'';
-
};
+
clock = {
+
interval = 1;
+
format = "{:%d/%m %H:%M:%S}";
+
format-alt = "{:%Y-%m-%d %H:%M:%S %z}";
+
on-click-left = "mode";
+
tooltip-format = ''
+
<big>{:%Y %B}</big>
+
<tt><small>{calendar}</small></tt>'';
+
};
-
cpu = {
-
format = " {usage}%";
-
};
+
cpu = {
+
format = " {usage}%";
+
};
-
memory = {
-
format = " {}%";
-
interval = 5;
-
};
+
memory = {
+
format = " {}%";
+
interval = 5;
+
};
-
disk = {
-
interval = 5;
-
unit = "GB";
-
format = "󰋊 {percentage_used}%";
-
};
+
disk = {
+
interval = 5;
+
unit = "GB";
+
format = "󰋊 {percentage_used}%";
+
};
-
pulseaudio = {
-
format = "{icon} {volume}%";
-
format-muted = " 0%";
-
format-icons = {
-
headphone = "󰋋 ";
-
headset = "󰋎 ";
-
portable = " ";
-
default = [
-
" "
-
" "
-
" "
-
];
+
pulseaudio = {
+
format = "{icon} {volume}%";
+
format-muted = " 0%";
+
format-icons = {
+
headphone = "󰋋 ";
+
headset = "󰋎 ";
+
portable = " ";
+
default = [
+
" "
+
" "
+
" "
+
];
+
};
+
on-click = lib.getExe pkgs.pavucontrol;
};
-
on-click = lib.getExe pkgs.pavucontrol;
-
};
-
idle_inhibitor = {
-
format = "{icon}";
-
format-icons = {
-
activated = "󰅶 ";
-
deactivated = "󰾫 ";
+
idle_inhibitor = {
+
format = "{icon}";
+
format-icons = {
+
activated = "󰅶 ";
+
deactivated = "󰾫 ";
+
};
+
tooltip-format-activated = "Caffinated! device will not sleep.";
+
tooltip-format-deactivated = "no caffeine :( device will sleep when not in use.";
};
-
tooltip-format-activated = "Caffinated! device will not sleep.";
-
tooltip-format-deactivated = "no caffeine :( device will sleep when not in use.";
-
};
-
battery = {
-
interval = 5;
-
bat = "BAT1";
-
# full-at = 94;
-
format = "{icon} {capacity}%";
-
format-icons = [
-
"󰁺"
-
"󰁻"
-
"󰁼"
-
"󰁽"
-
"󰁾"
-
"󰁿"
-
"󰂀"
-
"󰂁"
-
"󰂂"
-
"󰁹"
-
];
-
states = {
-
battery-10 = 10;
-
battery-20 = 20;
-
battery-30 = 30;
-
battery-40 = 40;
-
battery-50 = 50;
-
battery-60 = 60;
-
battery-70 = 70;
-
battery-80 = 80;
-
battery-90 = 90;
-
battery-100 = 100;
+
battery = {
+
interval = 5;
+
bat = "BAT1";
+
# full-at = 94;
+
format = "{icon} {capacity}%";
+
format-icons = [
+
"󰁺"
+
"󰁻"
+
"󰁼"
+
"󰁽"
+
"󰁾"
+
"󰁿"
+
"󰂀"
+
"󰂁"
+
"󰂂"
+
"󰁹"
+
];
+
states = {
+
battery-10 = 10;
+
battery-20 = 20;
+
battery-30 = 30;
+
battery-40 = 40;
+
battery-50 = 50;
+
battery-60 = 60;
+
battery-70 = 70;
+
battery-80 = 80;
+
battery-90 = 90;
+
battery-100 = 100;
+
};
+
# <https://github.com/Alexays/Waybar/issues/1938>
+
# the wiki lies about this, does not match
+
# /sys/class/power_supply/BAT0/status
+
format-plugged = "󰚥 AC";
+
format-charging-battery-10 = "󰢜 {capacity}%";
+
format-charging-battery-20 = "󰂆 {capacity}%";
+
format-charging-battery-30 = "󰂇 {capacity}%";
+
format-charging-battery-40 = "󰂈 {capacity}%";
+
format-charging-battery-50 = "󰢝 {capacity}%";
+
format-charging-battery-60 = "󰂉 {capacity}%";
+
format-charging-battery-70 = "󰢞 {capacity}%";
+
format-charging-battery-80 = "󰂊 {capacity}%";
+
format-charging-battery-90 = "󰂋 {capacity}%";
+
format-charging-battery-100 = "󰂅 {capacity}%";
};
-
# <https://github.com/Alexays/Waybar/issues/1938>
-
# the wiki lies about this, does not match
-
# /sys/class/power_supply/BAT0/status
-
format-plugged = "󰚥 AC";
-
format-charging-battery-10 = "󰢜 {capacity}%";
-
format-charging-battery-20 = "󰂆 {capacity}%";
-
format-charging-battery-30 = "󰂇 {capacity}%";
-
format-charging-battery-40 = "󰂈 {capacity}%";
-
format-charging-battery-50 = "󰢝 {capacity}%";
-
format-charging-battery-60 = "󰂉 {capacity}%";
-
format-charging-battery-70 = "󰢞 {capacity}%";
-
format-charging-battery-80 = "󰂊 {capacity}%";
-
format-charging-battery-90 = "󰂋 {capacity}%";
-
format-charging-battery-100 = "󰂅 {capacity}%";
-
};
-
"hyprland/workspaces" = {
-
format = "{icon} {windows}";
-
window-rewrite-default = " ";
-
window-rewrite-seperator = "";
-
window-rewrite = {
-
"title<.*github.*>" = "󰊤 ";
-
"title<.*youtube.*>" = " ";
-
"title<*Gmail*>" = "󰊫 ";
-
"class<firefox>" = " ";
-
"obs" = " ";
-
"alacritty" = " ";
-
"class<com.mitchellh.ghostty>" = "󰊠 ";
-
"foot" = " ";
-
"code" = "󰨞 ";
-
"slack" = "󰒱 ";
-
"spotify" = "󰓇 ";
-
"class<org.gnome.Nautilus>" = "󰉓 ";
-
"class<kicad>" = " ";
-
"class<dev.zed.Zed>" = " ";
-
"class<chromium-browser>" = " ";
-
"class<vesktop>" = " ";
+
"hyprland/workspaces" = {
+
format = "{icon} {windows}";
+
window-rewrite-default = " ";
+
window-rewrite-seperator = "";
+
window-rewrite = {
+
"title<.*github.*>" = "󰊤 ";
+
"title<.*youtube.*>" = " ";
+
"title<*Gmail*>" = "󰊫 ";
+
"class<firefox>" = " ";
+
"obs" = " ";
+
"alacritty" = " ";
+
"class<com.mitchellh.ghostty>" = "󰊠 ";
+
"foot" = " ";
+
"code" = "󰨞 ";
+
"slack" = "󰒱 ";
+
"spotify" = "󰓇 ";
+
"class<org.gnome.Nautilus>" = "󰉓 ";
+
"class<kicad>" = " ";
+
"class<dev.zed.Zed>" = " ";
+
"class<chromium-browser>" = " ";
+
"class<vesktop>" = " ";
+
};
};
-
};
-
network = {
-
interval = 3;
-
format-wifi = "{icon} {essid}";
-
format-icons = [
-
"󰤟"
-
"󰤢"
-
"󰤥"
-
"󰤨"
-
];
-
format-ethernet = "󰈁 Connected";
-
format-disconnected = "󱐤 ";
-
tooltip-format = ''
-
{ifname}
-
{ipaddr}/{cidr}
-
Up: {bandwidthUpBits}
-
Down: {bandwidthDownBits}'';
-
on-click = mkScript {
-
deps = [
-
pkgs.wpa_supplicant
-
pkgs.notify-desktop
+
network = {
+
interval = 3;
+
format-wifi = "{icon} {essid}";
+
format-icons = [
+
"󰤟"
+
"󰤢"
+
"󰤥"
+
"󰤨"
];
-
script = ''wpa_cli reconnect; notify-desktop "reconnecting to wifi" -t 1200'';
+
format-ethernet = "󰈁 Connected";
+
format-disconnected = "󱐤 ";
+
tooltip-format = ''
+
{ifname}
+
{ipaddr}/{cidr}
+
Up: {bandwidthUpBits}
+
Down: {bandwidthDownBits}'';
+
on-click = mkScript {
+
deps = [
+
pkgs.wpa_supplicant
+
pkgs.notify-desktop
+
];
+
script = ''wpa_cli reconnect; notify-desktop "reconnecting to wifi" -t 1200'';
+
};
};
-
};
-
bluetooth = {
-
format-on = "󰂯";
-
format-off = "󰂲";
-
format-disabled = "󰂲";
-
format-connected = "󰂱 {num_connections}";
-
format-connected-battery = "󰂱 {device_alias} ({device_battery_percentage}%) ({num_connections})";
-
on-click = "overskride";
-
};
+
bluetooth = {
+
format-on = "󰂯";
+
format-off = "󰂲";
+
format-disabled = "󰂲";
+
format-connected = "󰂱 {num_connections}";
+
format-connected-battery = "󰂱 {device_alias} ({device_battery_percentage}%) ({num_connections})";
+
on-click = "overskride";
+
};
-
"custom/os" = {
-
interval = 1;
-
return-type = "json";
-
exec = mkScriptJson {
-
text = " ";
-
tooltip = ''$(grep PRETTY_NAME /etc/os-release | cut -d '"' -f2)'';
+
"custom/os" = {
+
interval = 1;
+
return-type = "json";
+
exec = mkScriptJson {
+
text = " ";
+
tooltip = ''$(grep PRETTY_NAME /etc/os-release | cut -d '"' -f2)'';
+
};
};
-
};
-
"custom/hostname" = {
-
exec = mkScript { script = ''echo "$USER@$HOSTNAME"''; };
-
on-click = mkScript { script = "systemctl --user restart waybar"; };
-
};
-
-
privacy = {
-
"icon-spacing" = 0;
-
"icon-size" = 18;
-
"transition-duration" = 250;
-
modules = [
-
{
-
type = "screenshare";
-
tooltip = true;
-
"tooltip-icon-size" = 24;
-
}
-
{
-
type = "audio-out";
-
tooltip = true;
-
"tooltip-icon-size" = 24;
-
}
-
{
-
type = "audio-in";
-
tooltip = true;
-
"tooltip-icon-size" = 24;
-
}
-
];
-
};
+
"custom/hostname" = {
+
exec = mkScript { script = ''echo "$USER@$HOSTNAME"''; };
+
on-click = mkScript { script = "systemctl --user restart waybar"; };
+
};
-
"custom/webcam" = {
-
return-type = "json";
-
interval = 2;
-
exec = mkScript {
-
deps = [
-
pkgs.jq
-
pkgs.psmisc
+
privacy = {
+
"icon-spacing" = 0;
+
"icon-size" = 18;
+
"transition-duration" = 250;
+
modules = [
+
{
+
type = "screenshare";
+
tooltip = true;
+
"tooltip-icon-size" = 24;
+
}
+
{
+
type = "audio-out";
+
tooltip = true;
+
"tooltip-icon-size" = 24;
+
}
+
{
+
type = "audio-in";
+
tooltip = true;
+
"tooltip-icon-size" = 24;
+
}
];
-
script = ''
-
# get programs using the video0 endpoint
-
PIDS=$(fuser /dev/video0 2>/dev/null || echo "")
-
if [ -n "$PIDS" ]; then
-
# Using pgrep instead of grepping ps output
-
for pid in $PIDS; do
-
process_info=$(ps -p "$pid" -o pid,cmd --no-headers)
-
if [ -n "$process_info" ]; then
-
echo "$process_info" | awk '{command=$2; for(i=3;i<=NF;i++) command=command" "$i; print "{\"tooltip\": \""command"\"}"}'
-
fi
-
done | grep -v "grep" |\
-
jq -s 'if length > 0 then {text: "󰄀 ", tooltip: (map(.tooltip) | join("\r"))} else {text: "", tooltip: ""} end'
-
else
-
echo '{"text": "", "tooltip": ""}'
-
fi | jq --unbuffered --compact-output
-
'';
+
};
+
+
"custom/webcam" = {
+
return-type = "json";
+
interval = 2;
+
exec = mkScript {
+
deps = [
+
pkgs.jq
+
pkgs.psmisc
+
];
+
script = ''
+
# get programs using the video0 endpoint
+
PIDS=$(fuser /dev/video0 2>/dev/null || echo "")
+
if [ -n "$PIDS" ]; then
+
# Using pgrep instead of grepping ps output
+
for pid in $PIDS; do
+
process_info=$(ps -p "$pid" -o pid,cmd --no-headers)
+
if [ -n "$process_info" ]; then
+
echo "$process_info" | awk '{command=$2; for(i=3;i<=NF;i++) command=command" "$i; print "{\"tooltip\": \""command"\"}"}'
+
fi
+
done | grep -v "grep" |\
+
jq -s 'if length > 0 then {text: "󰄀 ", tooltip: (map(.tooltip) | join("\r"))} else {text: "", tooltip: ""} end'
+
else
+
echo '{"text": "", "tooltip": ""}'
+
fi | jq --unbuffered --compact-output
+
'';
+
};
};
};
};
-
};
-
# Cheatsheet:
-
# x -> all sides
-
# x y -> vertical, horizontal
-
# x y z -> top, horizontal, bottom
-
# w x y z -> top, right, bottom, left
-
style =
-
# css
-
''
-
* {
-
font-family: Fira Sans, FiraCode Nerd Font;
-
font-size: 12pt;
-
padding: 0;
-
margin: 0 0.4em;
-
}
+
# Cheatsheet:
+
# x -> all sides
+
# x y -> vertical, horizontal
+
# x y z -> top, horizontal, bottom
+
# w x y z -> top, right, bottom, left
+
style =
+
# css
+
''
+
* {
+
font-family: Fira Sans, FiraCode Nerd Font;
+
font-size: 12pt;
+
padding: 0;
+
margin: 0 0.4em;
+
}
-
window#waybar {
-
padding: 0;
-
border-radius: 0.5em;
-
background-color: shade(@surface0, 0.7);
-
color: @surface2
-
}
-
.modules-left {
-
margin-left: -0.65em;
-
}
-
.modules-right {
-
margin-right: -0.65em;
-
}
+
window#waybar {
+
padding: 0;
+
border-radius: 0.5em;
+
background-color: shade(@surface0, 0.7);
+
color: @surface2
+
}
+
.modules-left {
+
margin-left: -0.65em;
+
}
+
.modules-right {
+
margin-right: -0.65em;
+
}
-
#workspaces button {
-
background-color: @surface0;
-
color: @surface2;
-
padding-left: 0.2em;
-
padding-right: 0.2em;
-
margin-left: 0.25em;
-
margin-right: 0.25em;
-
margin-top: 0.4em;
-
margin-bottom: 0.4em;
-
}
-
#workspaces button.hidden {
-
background-color: @surface0;
-
color: @surface2;
-
}
-
#workspaces button.focused,
-
#workspaces button.active {
-
background-color: shade(@blue, 0.7);
-
color: @green;
-
}
+
#workspaces button {
+
background-color: @surface0;
+
color: @surface2;
+
padding-left: 0.2em;
+
padding-right: 0.2em;
+
margin-left: 0.25em;
+
margin-right: 0.25em;
+
margin-top: 0.4em;
+
margin-bottom: 0.4em;
+
}
+
#workspaces button.hidden {
+
background-color: @surface0;
+
color: @surface2;
+
}
+
#workspaces button.focused,
+
#workspaces button.active {
+
background-color: shade(@blue, 0.7);
+
color: @green;
+
}
-
#workspaces button:hover {
-
background-color: @surface3;
-
color: @surface1;
-
}
+
#workspaces button:hover {
+
background-color: @surface3;
+
color: @surface1;
+
}
-
#privacy-item {
-
margin-left: 0.1em;
-
margin-right: 0.1em;
-
}
+
#privacy-item {
+
margin-left: 0.1em;
+
margin-right: 0.1em;
+
}
-
#clock {
-
padding-right: 1em;
-
padding-left: 1em;
-
border-radius: 0.5em;
-
}
+
#clock {
+
padding-right: 1em;
+
padding-left: 1em;
+
border-radius: 0.5em;
+
}
-
#custom-os {
-
background-color: @surface3;
-
color: @blue;
-
padding-right: 1em;
-
padding-left: 1em;
-
margin-right: 0;
-
border-radius: 0.5em;
-
}
-
#custom-hostname {
-
background-color: @surface3;
-
color: @blue;
-
padding-right: 1em;
-
padding-left: 1em;
-
margin-left: 0;
-
border-radius: 0.5em;
-
}
-
#custom-gpu, #cpu, #memory {
-
margin-left: 0.05em;
-
margin-right: 0.55em;
-
}
-
'';
+
#custom-os {
+
background-color: @surface3;
+
color: @blue;
+
padding-right: 1em;
+
padding-left: 1em;
+
margin-right: 0;
+
border-radius: 0.5em;
+
}
+
#custom-hostname {
+
background-color: @surface3;
+
color: @blue;
+
padding-right: 1em;
+
padding-left: 1em;
+
margin-left: 0;
+
border-radius: 0.5em;
+
}
+
#custom-gpu, #cpu, #memory {
+
margin-left: 0.05em;
+
margin-right: 0.55em;
+
}
+
'';
+
};
};
}
+1 -1
nixos/machines/moonlark/configuration.nix
···
./home-manager.nix
./disk-config.nix
-
../../modules
+
(inputs.import-tree ../../modules)
];
nixpkgs = {
-6
nixos/modules/apps/default.nix
···
-
{ ... }:
-
{
-
imports = [
-
./tuigreet.nix
-
];
-
}
nixos/modules/authentication.nix nixos/modules/system/authentication.nix
-8
nixos/modules/default.nix
···
-
{ ... }:
-
{
-
imports = [
-
./authentication.nix
-
./apps
-
./network/wifi.nix
-
];
-
}
nixos/modules/network/wifi.nix nixos/modules/system/wifi.nix