Added nixos configs
This commit is contained in:
@@ -0,0 +1,97 @@
|
||||
{ config, lib, pkgs, ... }:
|
||||
|
||||
let
|
||||
moduleName = "hm-backgrounds";
|
||||
src = ../home-manager/conf/backgrounds;
|
||||
video = "${config.home.homeDirectory}/backgrounds/videos/191684-891315375.mp4";
|
||||
startWallpaper = pkgs.writeShellScript "start-video-wallpaper" ''
|
||||
set -euo pipefail
|
||||
|
||||
VIDEO="${video}"
|
||||
MPVPAPER="${pkgs.mpvpaper}/bin/mpvpaper"
|
||||
HYPRCTL="${pkgs.hyprland}/bin/hyprctl"
|
||||
PKILL="${pkgs.procps}/bin/pkill"
|
||||
AWK="${pkgs.gawk}/bin/awk"
|
||||
|
||||
# Avoid stacking multiple instances on rebuild / relogin
|
||||
$PKILL -x mpvpaper || true
|
||||
|
||||
# Wait until Hyprland is ready
|
||||
for i in $(seq 1 30); do
|
||||
if $HYPRCTL monitors >/dev/null 2>&1; then
|
||||
break
|
||||
fi
|
||||
sleep 1
|
||||
done
|
||||
|
||||
# If the file doesn't exist, don't crash-loop forever
|
||||
if [ ! -f "$VIDEO" ]; then
|
||||
echo "Wallpaper video not found: $VIDEO"
|
||||
exit 0
|
||||
fi
|
||||
|
||||
# Detect monitors
|
||||
MONITORS="$($HYPRCTL monitors | $AWK '/^Monitor/ {print $2}')"
|
||||
if [ -z "$MONITORS" ]; then
|
||||
echo "No monitors detected by hyprctl."
|
||||
exit 0
|
||||
fi
|
||||
|
||||
# Start mpvpaper per monitor
|
||||
for m in $MONITORS; do
|
||||
$MPVPAPER -o "--loop --no-audio --panscan=1.0 --video-aspect-override=yes" "$m" "$VIDEO" &
|
||||
done
|
||||
|
||||
wait
|
||||
'';
|
||||
in
|
||||
{
|
||||
# 0) Make HM reliably manage/restart user services on switch
|
||||
# (prevents having to run systemctl --user daemon-reload manually)
|
||||
systemd.user.startServices = "sd-switch";
|
||||
|
||||
# 1) Put the whole repo folder into ~/backgrounds
|
||||
home.file."backgrounds".source = src;
|
||||
|
||||
# 2) Ensure dependencies exist
|
||||
home.packages = with pkgs; [
|
||||
mpv
|
||||
mpvpaper
|
||||
procps
|
||||
gawk
|
||||
];
|
||||
|
||||
# 3) Run video wallpaper on ALL monitors
|
||||
#
|
||||
# IMPORTANT:
|
||||
# - Do NOT tie to graphical-session.target / hyprland-session.target, because in your setup
|
||||
# those targets were inactive/missing.
|
||||
# - Instead, start on user login via default.target, and the script itself waits for Hyprland.
|
||||
systemd.user.services.video-wallpaper = {
|
||||
Unit = {
|
||||
Description = "Video wallpaper (mpvpaper) on all Hyprland monitors";
|
||||
};
|
||||
|
||||
Service = {
|
||||
Type = "simple";
|
||||
Restart = "on-failure";
|
||||
RestartSec = 2;
|
||||
|
||||
ExecStart = startWallpaper;
|
||||
};
|
||||
|
||||
Install = {
|
||||
WantedBy = [ "default.target" ];
|
||||
};
|
||||
};
|
||||
|
||||
# 4) Restart on switch so new /nix/store script paths are picked up
|
||||
# (kept, but now it won’t break boot/login if the user bus isn’t ready)
|
||||
home.activation.restartVideoWallpaper =
|
||||
lib.hm.dag.entryAfter [ "writeBoundary" ] ''
|
||||
${pkgs.systemd}/bin/systemctl --user daemon-reload || true
|
||||
${pkgs.systemd}/bin/systemctl --user reset-failed video-wallpaper || true
|
||||
${pkgs.systemd}/bin/systemctl --user restart video-wallpaper || true
|
||||
'';
|
||||
home.file.".nixlog/loaded.${moduleName}-module-loaded".text = "loaded\n";
|
||||
}
|
||||
@@ -0,0 +1,39 @@
|
||||
{ pkgs, ... }:
|
||||
|
||||
let
|
||||
moduleName = "hm-base";
|
||||
in
|
||||
{
|
||||
imports = [
|
||||
./packages.nix
|
||||
./flatpak.nix
|
||||
./greeter.nix
|
||||
./terminal.nix
|
||||
./default-apps.nix
|
||||
./backgrounds.nix
|
||||
./hyprland.nix
|
||||
./hyprshell.nix
|
||||
./waybar.nix
|
||||
];
|
||||
|
||||
programs.vscode = {
|
||||
# enable = true;
|
||||
|
||||
profiles.default.extensions = with pkgs.vscode-extensions; [
|
||||
ms-vscode.cpptools
|
||||
ms-vscode.cmake-tools
|
||||
bbenoist.nix
|
||||
];
|
||||
};
|
||||
|
||||
programs.home-manager.enable = true;
|
||||
wayland.windowManager.hyprland.systemd.enable = true;
|
||||
systemd.user.startServices = "sd-switch";
|
||||
|
||||
home.activation.cleanNixlog = pkgs.lib.hm.dag.entryBefore [ "writeBoundary" ] ''
|
||||
rm -rf "$HOME/.nixlog"
|
||||
mkdir -p "$HOME/.nixlog"
|
||||
'';
|
||||
|
||||
home.file.".nixlog/loaded.${moduleName}-module-loaded".text = "loaded\n";
|
||||
}
|
||||
@@ -0,0 +1,19 @@
|
||||
{ pkgs, ... }:
|
||||
|
||||
let
|
||||
moduleName = "hm-bindings";
|
||||
in
|
||||
{
|
||||
xdg.enable = true;
|
||||
|
||||
# Home Manager version of "put a config file in the right XDG place".
|
||||
# This becomes: ~/.config/hypr/bindings.conf
|
||||
xdg.configFile."hypr/bindings.conf".source = ./conf/bindings.conf;
|
||||
|
||||
# Optional: your "loaded" marker
|
||||
home.file.".nixlog/loaded.${moduleName}-module-loaded".text = "loaded\n";
|
||||
|
||||
# NOTE:
|
||||
# keyd is a system daemon; configure it in NixOS (configuration.nix),
|
||||
# not in Home Manager.
|
||||
}
|
||||
@@ -0,0 +1,13 @@
|
||||
alias ll='ls -lah'
|
||||
alias gs='git status'
|
||||
alias ga='git add'
|
||||
alias gc='git commit'
|
||||
alias rebuild='sudo nixos-rebuild switch --flake ~/nixos#traveldroid'
|
||||
alias rb='systemctl reboot'
|
||||
alias fpl='flatpak search'
|
||||
alias fpi='flatpak install'
|
||||
alias fpr='flatpak run'
|
||||
alias nxc='ssh henrov@nextcloud.data-pro.nu'
|
||||
alias nps='xdg-open https://search.nixos.org'
|
||||
alias vs= 'code'
|
||||
|
||||
Binary file not shown.
@@ -0,0 +1,122 @@
|
||||
###############
|
||||
# Keybindings #
|
||||
###############
|
||||
|
||||
$mod = SUPER
|
||||
|
||||
# Terminal / launcher / kill / reload
|
||||
bind = $mod, RETURN, exec, kitty
|
||||
bind = $mod, D, exec, wofi --show drun
|
||||
bind = $mod, Q, killactive,
|
||||
bind = $mod SHIFT, Q, exit,
|
||||
bind = $mod SHIFT, R, exec, hyprctl reload
|
||||
|
||||
# Default browser
|
||||
bind = $mod, W, exec, xdg-open https://about:blank
|
||||
# Focus movement
|
||||
bind = $mod, H, movefocus, l
|
||||
bind = $mod, L, movefocus, r
|
||||
bind = $mod, K, movefocus, u
|
||||
bind = $mod, J, movefocus, d
|
||||
bind = $mod, left, movefocus, l
|
||||
bind = $mod, right, movefocus, r
|
||||
bind = $mod, up, movefocus, u
|
||||
bind = $mod, down, movefocus, d
|
||||
|
||||
# Move windows
|
||||
bind = $mod SHIFT, H, movewindow, l
|
||||
bind = $mod SHIFT, L, movewindow, r
|
||||
bind = $mod SHIFT, K, movewindow, u
|
||||
bind = $mod SHIFT, J, movewindow, d
|
||||
bind = $mod SHIFT, left, movewindow, l
|
||||
bind = $mod SHIFT, right, movewindow, r
|
||||
bind = $mod SHIFT, up, movewindow, u
|
||||
bind = $mod SHIFT, down, movewindow, d
|
||||
|
||||
# Resize windows
|
||||
bind = $mod CTRL, H, resizeactive, -30 0
|
||||
bind = $mod CTRL, L, resizeactive, 30 0
|
||||
bind = $mod CTRL, K, resizeactive, 0 -30
|
||||
bind = $mod CTRL, J, resizeactive, 0 30
|
||||
|
||||
# Floating / fullscreen
|
||||
bind = $mod, V, togglefloating,
|
||||
bind = $mod, F, fullscreen, 0
|
||||
bind = $mod SHIFT, F, fullscreen, 1
|
||||
|
||||
# Workspaces
|
||||
bind = $mod, 1, workspace, 1
|
||||
bind = $mod, 2, workspace, 2
|
||||
bind = $mod, 3, workspace, 3
|
||||
bind = $mod, 4, workspace, 4
|
||||
bind = $mod, 5, workspace, 5
|
||||
bind = $mod, 6, workspace, 6
|
||||
bind = $mod, 7, workspace, 7
|
||||
bind = $mod, 8, workspace, 8
|
||||
bind = $mod, 9, workspace, 9
|
||||
bind = $mod, 0, workspace, 10
|
||||
|
||||
bind = $mod SHIFT, 1, movetoworkspace, 1
|
||||
bind = $mod SHIFT, 2, movetoworkspace, 2
|
||||
bind = $mod SHIFT, 3, movetoworkspace, 3
|
||||
bind = $mod SHIFT, 4, movetoworkspace, 4
|
||||
bind = $mod SHIFT, 5, movetoworkspace, 5
|
||||
bind = $mod SHIFT, 6, movetoworkspace, 6
|
||||
bind = $mod SHIFT, 7, movetoworkspace, 7
|
||||
bind = $mod SHIFT, 8, movetoworkspace, 8
|
||||
bind = $mod SHIFT, 9, movetoworkspace, 9
|
||||
bind = $mod SHIFT, 0, movetoworkspace, 10
|
||||
|
||||
# Cycle workspaces
|
||||
bind = $mod, mouse_down, workspace, e+1
|
||||
bind = $mod, mouse_up, workspace, e-1
|
||||
|
||||
# Mouse drag
|
||||
bindm = $mod, mouse:272, movewindow
|
||||
bindm = $mod, mouse:273, resizewindow
|
||||
|
||||
#########################
|
||||
# Screenshots
|
||||
#########################
|
||||
bind = $mod SHIFT, s, exec, grim -g "$(slurp)" - | wl-copy
|
||||
bind = , XF86Screenshot, exec, grim - | wl-copy
|
||||
|
||||
#########################
|
||||
# Audio (pamixer)
|
||||
#########################
|
||||
bind = , XF86AudioRaiseVolume, exec, pamixer -i 5
|
||||
bind = , XF86AudioLowerVolume, exec, pamixer -d 5
|
||||
bind = , XF86AudioMute, exec, pamixer -t
|
||||
bind = , XF86AudioMicMute, exec, pamixer --default-source -t
|
||||
|
||||
#########################
|
||||
# Media (playerctl)
|
||||
#########################
|
||||
bind = , XF86AudioPlay, exec, playerctl play-pause
|
||||
bind = , XF86AudioPause, exec, playerctl pause
|
||||
bind = , XF86AudioNext, exec, playerctl next
|
||||
bind = , XF86AudioPrev, exec, playerctl previous
|
||||
bind = , XF86AudioStop, exec, playerctl stop
|
||||
|
||||
#########################
|
||||
# Brightness (brightnessctl)
|
||||
#########################
|
||||
bind = , XF86MonBrightnessUp, exec, brightnessctl set +10%
|
||||
bind = , XF86MonBrightnessDown, exec, brightnessctl set 10%-
|
||||
bind = , XF86KbdBrightnessUp, exec, brightnessctl -d '*kbd_backlight*' set +10%
|
||||
bind = , XF86KbdBrightnessDown, exec, brightnessctl -d '*kbd_backlight*' set 10%-
|
||||
|
||||
#########################
|
||||
# Power / session
|
||||
#########################
|
||||
bind = , XF86Sleep, exec, systemctl suspend
|
||||
bind = , XF86PowerOff, exec, systemctl poweroff
|
||||
bind = , XF86WakeUp, exec, systemctl suspend
|
||||
|
||||
#########################
|
||||
# Start apps
|
||||
#########################
|
||||
bind = $mod, E, exec, dolphin
|
||||
bind = CTRLALT, B, exec, flatpak run eu.betterbird.Betterbird
|
||||
bind = CTRLALT, S, exec, spotify
|
||||
bind = CTRLALT, z, exec, flatpak run app.zen_browser.zen
|
||||
@@ -0,0 +1,11 @@
|
||||
# Minimal Hyprland config for greetd
|
||||
|
||||
monitor = , preferred, auto, 1
|
||||
|
||||
misc {
|
||||
disable_hyprland_logo = true
|
||||
disable_splash_rendering = true
|
||||
}
|
||||
|
||||
# Start qtgreet and point it at the correct session paths for NixOS
|
||||
exec-once = sh -lc 'source /etc/greetd/qtgreet-session-paths; exec qtgreet -w "$WAYLAND_SESSIONS" -x "$X11_SESSIONS"'
|
||||
@@ -0,0 +1,61 @@
|
||||
# =========================
|
||||
# Hyprland config (generated by Nix)
|
||||
# =========================
|
||||
|
||||
# --- Variables ---
|
||||
$mod = SUPER
|
||||
$term = kitty
|
||||
$menu = hyprshell run
|
||||
|
||||
|
||||
# --- Environment ---
|
||||
env = XDG_CURRENT_DESKTOP,Hyprland
|
||||
env = XDG_SESSION_TYPE,wayland
|
||||
env = XDG_SESSION_DESKTOP,Hyprland
|
||||
env = MOZ_ENABLE_WAYLAND,1
|
||||
|
||||
# --- Monitor (safe default) ---
|
||||
monitor = , preferred, auto, 1
|
||||
|
||||
# --- Input ---
|
||||
input {
|
||||
kb_layout = us
|
||||
follow_mouse = 1
|
||||
touchpad {
|
||||
natural_scroll = true
|
||||
}
|
||||
}
|
||||
|
||||
# --- General ---
|
||||
general {
|
||||
gaps_in = 5
|
||||
gaps_out = 10
|
||||
border_size = 2
|
||||
layout = dwindle
|
||||
}
|
||||
|
||||
animations {
|
||||
enabled = true
|
||||
}
|
||||
|
||||
decoration {
|
||||
blur {
|
||||
enabled = true
|
||||
size = 8
|
||||
passes = 2
|
||||
new_optimizations = true
|
||||
}
|
||||
}
|
||||
|
||||
misc {
|
||||
disable_hyprland_logo = false
|
||||
disable_splash_rendering = false
|
||||
}
|
||||
|
||||
# --- Keybindings live here ---
|
||||
source = /etc/xdg/hypr/bindings.conf
|
||||
|
||||
|
||||
# --- Autostart ---
|
||||
exec-once = waybar
|
||||
#exec-once = sleep 2 & /run/current-system/sw/bin/hyprshell run
|
||||
@@ -0,0 +1,71 @@
|
||||
// Edit with `hyprshell config edit` <-- GUI app, resize!
|
||||
(
|
||||
version: 3,
|
||||
windows: (
|
||||
scale: 8.5,
|
||||
items_per_row: 5 ,
|
||||
overview: (
|
||||
launcher: (
|
||||
default_terminal: None,
|
||||
launch_modifier: "ctrl",
|
||||
width: 800,
|
||||
max_items: 5,
|
||||
show_when_empty: true,
|
||||
plugins: (
|
||||
applications: (
|
||||
run_cache_weeks: 8,
|
||||
show_execs: true,
|
||||
show_actions_submenu: true,
|
||||
),
|
||||
terminal: None,
|
||||
shell: None,
|
||||
websearch: None,
|
||||
calc: (),
|
||||
path: (),
|
||||
actions: (
|
||||
actions: [
|
||||
lock_screen,
|
||||
hibernate,
|
||||
logout,
|
||||
reboot,
|
||||
shutdown,
|
||||
suspend,
|
||||
custom(
|
||||
names: [
|
||||
"Kill",
|
||||
"Stop",
|
||||
],
|
||||
details: "Kill or stop a process by name",
|
||||
command: "pkill \"{}\" && notify-send hyprshell \"stopped {}\"",
|
||||
icon: "remove",
|
||||
),
|
||||
custom(
|
||||
names: [
|
||||
"Reload Hyprshell",
|
||||
],
|
||||
details: "Reload Hyprshell",
|
||||
command: "sleep 1; hyprshell socat \'\"Restart\"\'",
|
||||
icon: "system-restart",
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
),
|
||||
key: "Super_L",
|
||||
modifier: "super",
|
||||
filter_by: [],
|
||||
hide_filtered: false,
|
||||
exclude_special_workspaces: "",
|
||||
),
|
||||
switch: (
|
||||
modifier: "alt",
|
||||
key: "Tab",
|
||||
filter_by: [
|
||||
current_monitor,
|
||||
],
|
||||
switch_workspaces: false,
|
||||
exclude_special_workspaces: "",
|
||||
),
|
||||
switch_2: None,
|
||||
),
|
||||
)
|
||||
@@ -0,0 +1,8 @@
|
||||
window {
|
||||
background: rgba(20, 20, 20, 0.92);
|
||||
border-radius: 18px;
|
||||
}
|
||||
|
||||
* {
|
||||
background-color: unset;
|
||||
}
|
||||
@@ -0,0 +1,80 @@
|
||||
{ pkgs }:
|
||||
|
||||
{
|
||||
# Packages to be installed in the *user* profile via Home Manager
|
||||
packages = with pkgs; [
|
||||
# system
|
||||
waybar
|
||||
wofi
|
||||
dunst
|
||||
xdg-utils
|
||||
desktop-file-utils
|
||||
playerctl
|
||||
pamixer
|
||||
brightnessctl
|
||||
rofi
|
||||
home-manager
|
||||
|
||||
# hyprland
|
||||
hyprpaper
|
||||
|
||||
# utils
|
||||
wget
|
||||
flatpak
|
||||
nextcloud-client
|
||||
kdePackages.okular
|
||||
kdePackages.gwenview
|
||||
kdePackages.kdeconnect-kde
|
||||
_1password-gui
|
||||
docker
|
||||
tree
|
||||
ripgrep
|
||||
gparted
|
||||
file
|
||||
htop
|
||||
wev
|
||||
solaar
|
||||
|
||||
# terminal
|
||||
kitty
|
||||
starship
|
||||
kdePackages.konsole
|
||||
kdePackages.yakuake
|
||||
|
||||
# office
|
||||
obsidian
|
||||
onlyoffice-desktopeditors
|
||||
|
||||
# development
|
||||
git
|
||||
vscode-with-extensions
|
||||
kdePackages.kate
|
||||
jetbrains.pycharm
|
||||
python3
|
||||
|
||||
# communication
|
||||
nextcloud-talk-desktop
|
||||
signal-desktop
|
||||
|
||||
# multimedia
|
||||
spotify
|
||||
vlc
|
||||
|
||||
# graphic
|
||||
gimp2
|
||||
];
|
||||
|
||||
# Keeping these here as "data" (optional to use later)
|
||||
flatpakRemote = {
|
||||
name = "flathub";
|
||||
url = "https://dl.flathub.org/repo/flathub.flatpakrepo";
|
||||
};
|
||||
|
||||
flatpakApps = [
|
||||
"app.zen_browser.zen"
|
||||
"org.mozilla.firefox"
|
||||
"com.github.tchx84.Flatseal"
|
||||
"eu.betterbird.Betterbird"
|
||||
"com.todoist.Todoist"
|
||||
];
|
||||
}
|
||||
@@ -0,0 +1,279 @@
|
||||
"$schema" = 'https://starship.rs/config-schema.json'
|
||||
|
||||
format = """
|
||||
[](red)\
|
||||
$os\
|
||||
$username\
|
||||
[](bg:peach fg:red)\
|
||||
$directory\
|
||||
[](bg:yellow fg:peach)\
|
||||
$git_branch\
|
||||
$git_status\
|
||||
[](fg:yellow bg:green)\
|
||||
$c\
|
||||
$rust\
|
||||
$golang\
|
||||
$nodejs\
|
||||
$php\
|
||||
$java\
|
||||
$kotlin\
|
||||
$haskell\
|
||||
$python\
|
||||
[](fg:green bg:sapphire)\
|
||||
$conda\
|
||||
[](fg:sapphire bg:lavender)\
|
||||
$time\
|
||||
[ ](fg:lavender)\
|
||||
$cmd_duration\
|
||||
$line_break\
|
||||
$character"""
|
||||
|
||||
palette = 'catppuccin_mocha'
|
||||
|
||||
[os]
|
||||
disabled = false
|
||||
style = "bg:red fg:crust"
|
||||
|
||||
[os.symbols]
|
||||
Windows = ""
|
||||
Ubuntu = ""
|
||||
SUSE = ""
|
||||
Raspbian = ""
|
||||
Mint = ""
|
||||
Macos = ""
|
||||
Manjaro = ""
|
||||
Linux = ""
|
||||
Gentoo = ""
|
||||
Fedora = ""
|
||||
Alpine = ""
|
||||
Amazon = ""
|
||||
Android = ""
|
||||
AOSC = ""
|
||||
Arch = ""
|
||||
Artix = ""
|
||||
CentOS = ""
|
||||
Debian = ""
|
||||
Redhat = ""
|
||||
RedHatEnterprise = ""
|
||||
|
||||
[username]
|
||||
show_always = true
|
||||
style_user = "bg:red fg:crust"
|
||||
style_root = "bg:red fg:crust"
|
||||
format = '[ $user]($style)'
|
||||
|
||||
[directory]
|
||||
style = "bg:peach fg:crust"
|
||||
format = "[ $path ]($style)"
|
||||
truncation_length = 3
|
||||
truncation_symbol = "…/"
|
||||
|
||||
[directory.substitutions]
|
||||
"Documents" = " "
|
||||
"Downloads" = " "
|
||||
"Music" = " "
|
||||
"Pictures" = " "
|
||||
"Developer" = " "
|
||||
|
||||
[git_branch]
|
||||
symbol = ""
|
||||
style = "bg:yellow"
|
||||
format = '[[ $symbol $branch ](fg:crust bg:yellow)]($style)'
|
||||
|
||||
[git_status]
|
||||
style = "bg:yellow"
|
||||
format = '[[($all_status$ahead_behind )](fg:crust bg:yellow)]($style)'
|
||||
|
||||
[nodejs]
|
||||
symbol = ""
|
||||
style = "bg:green"
|
||||
format = '[[ $symbol( $version) ](fg:crust bg:green)]($style)'
|
||||
|
||||
[c]
|
||||
symbol = " "
|
||||
style = "bg:green"
|
||||
format = '[[ $symbol( $version) ](fg:crust bg:green)]($style)'
|
||||
|
||||
[rust]
|
||||
symbol = ""
|
||||
style = "bg:green"
|
||||
format = '[[ $symbol( $version) ](fg:crust bg:green)]($style)'
|
||||
|
||||
[golang]
|
||||
symbol = ""
|
||||
style = "bg:green"
|
||||
format = '[[ $symbol( $version) ](fg:crust bg:green)]($style)'
|
||||
|
||||
[php]
|
||||
symbol = ""
|
||||
style = "bg:green"
|
||||
format = '[[ $symbol( $version) ](fg:crust bg:green)]($style)'
|
||||
|
||||
[java]
|
||||
symbol = " "
|
||||
style = "bg:green"
|
||||
format = '[[ $symbol( $version) ](fg:crust bg:green)]($style)'
|
||||
|
||||
[kotlin]
|
||||
symbol = ""
|
||||
style = "bg:green"
|
||||
format = '[[ $symbol( $version) ](fg:crust bg:green)]($style)'
|
||||
|
||||
[haskell]
|
||||
symbol = ""
|
||||
style = "bg:green"
|
||||
format = '[[ $symbol( $version) ](fg:crust bg:green)]($style)'
|
||||
|
||||
[python]
|
||||
symbol = ""
|
||||
style = "bg:green"
|
||||
format = '[[ $symbol( $version)(\(#$virtualenv\)) ](fg:crust bg:green)]($style)'
|
||||
|
||||
[docker_context]
|
||||
symbol = ""
|
||||
style = "bg:sapphire"
|
||||
format = '[[ $symbol( $context) ](fg:crust bg:sapphire)]($style)'
|
||||
|
||||
[conda]
|
||||
symbol = " "
|
||||
style = "fg:crust bg:sapphire"
|
||||
format = '[$symbol$environment ]($style)'
|
||||
ignore_base = false
|
||||
|
||||
[time]
|
||||
disabled = false
|
||||
time_format = "%R"
|
||||
style = "bg:lavender"
|
||||
format = '[[ $time ](fg:crust bg:lavender)]($style)'
|
||||
|
||||
[line_break]
|
||||
disabled = false
|
||||
|
||||
[character]
|
||||
disabled = false
|
||||
success_symbol = '[❯](bold fg:green)'
|
||||
error_symbol = '[❯](bold fg:red)'
|
||||
vimcmd_symbol = '[❮](bold fg:green)'
|
||||
vimcmd_replace_one_symbol = '[❮](bold fg:lavender)'
|
||||
vimcmd_replace_symbol = '[❮](bold fg:lavender)'
|
||||
vimcmd_visual_symbol = '[❮](bold fg:yellow)'
|
||||
|
||||
[cmd_duration]
|
||||
show_milliseconds = true
|
||||
format = " in $duration "
|
||||
style = "bg:lavender"
|
||||
disabled = false
|
||||
show_notifications = true
|
||||
min_time_to_notify = 45000
|
||||
|
||||
[palettes.catppuccin_mocha]
|
||||
rosewater = "#f5e0dc"
|
||||
flamingo = "#f2cdcd"
|
||||
pink = "#f5c2e7"
|
||||
mauve = "#cba6f7"
|
||||
red = "#f38ba8"
|
||||
maroon = "#eba0ac"
|
||||
peach = "#fab387"
|
||||
yellow = "#f9e2af"
|
||||
green = "#a6e3a1"
|
||||
teal = "#94e2d5"
|
||||
sky = "#89dceb"
|
||||
sapphire = "#74c7ec"
|
||||
blue = "#89b4fa"
|
||||
lavender = "#b4befe"
|
||||
text = "#cdd6f4"
|
||||
subtext1 = "#bac2de"
|
||||
subtext0 = "#a6adc8"
|
||||
overlay2 = "#9399b2"
|
||||
overlay1 = "#7f849c"
|
||||
overlay0 = "#6c7086"
|
||||
surface2 = "#585b70"
|
||||
surface1 = "#45475a"
|
||||
surface0 = "#313244"
|
||||
base = "#1e1e2e"
|
||||
mantle = "#181825"
|
||||
crust = "#11111b"
|
||||
|
||||
[palettes.catppuccin_frappe]
|
||||
rosewater = "#f2d5cf"
|
||||
flamingo = "#eebebe"
|
||||
pink = "#f4b8e4"
|
||||
mauve = "#ca9ee6"
|
||||
red = "#e78284"
|
||||
maroon = "#ea999c"
|
||||
peach = "#ef9f76"
|
||||
yellow = "#e5c890"
|
||||
green = "#a6d189"
|
||||
teal = "#81c8be"
|
||||
sky = "#99d1db"
|
||||
sapphire = "#85c1dc"
|
||||
blue = "#8caaee"
|
||||
lavender = "#babbf1"
|
||||
text = "#c6d0f5"
|
||||
subtext1 = "#b5bfe2"
|
||||
subtext0 = "#a5adce"
|
||||
overlay2 = "#949cbb"
|
||||
overlay1 = "#838ba7"
|
||||
overlay0 = "#737994"
|
||||
surface2 = "#626880"
|
||||
surface1 = "#51576d"
|
||||
surface0 = "#414559"
|
||||
base = "#303446"
|
||||
mantle = "#292c3c"
|
||||
crust = "#232634"
|
||||
|
||||
[palettes.catppuccin_latte]
|
||||
rosewater = "#dc8a78"
|
||||
flamingo = "#dd7878"
|
||||
pink = "#ea76cb"
|
||||
mauve = "#8839ef"
|
||||
red = "#d20f39"
|
||||
maroon = "#e64553"
|
||||
peach = "#fe640b"
|
||||
yellow = "#df8e1d"
|
||||
green = "#40a02b"
|
||||
teal = "#179299"
|
||||
sky = "#04a5e5"
|
||||
sapphire = "#209fb5"
|
||||
blue = "#1e66f5"
|
||||
lavender = "#7287fd"
|
||||
text = "#4c4f69"
|
||||
subtext1 = "#5c5f77"
|
||||
subtext0 = "#6c6f85"
|
||||
overlay2 = "#7c7f93"
|
||||
overlay1 = "#8c8fa1"
|
||||
overlay0 = "#9ca0b0"
|
||||
surface2 = "#acb0be"
|
||||
surface1 = "#bcc0cc"
|
||||
surface0 = "#ccd0da"
|
||||
base = "#eff1f5"
|
||||
mantle = "#e6e9ef"
|
||||
crust = "#dce0e8"
|
||||
|
||||
[palettes.catppuccin_macchiato]
|
||||
rosewater = "#f4dbd6"
|
||||
flamingo = "#f0c6c6"
|
||||
pink = "#f5bde6"
|
||||
mauve = "#c6a0f6"
|
||||
red = "#ed8796"
|
||||
maroon = "#ee99a0"
|
||||
peach = "#f5a97f"
|
||||
yellow = "#eed49f"
|
||||
green = "#a6da95"
|
||||
teal = "#8bd5ca"
|
||||
sky = "#91d7e3"
|
||||
sapphire = "#7dc4e4"
|
||||
blue = "#8aadf4"
|
||||
lavender = "#b7bdf8"
|
||||
text = "#cad3f5"
|
||||
subtext1 = "#b8c0e0"
|
||||
subtext0 = "#a5adcb"
|
||||
overlay2 = "#939ab7"
|
||||
overlay1 = "#8087a2"
|
||||
overlay0 = "#6e738d"
|
||||
surface2 = "#5b6078"
|
||||
surface1 = "#494d64"
|
||||
surface0 = "#363a4f"
|
||||
base = "#24273a"
|
||||
mantle = "#1e2030"
|
||||
crust = "#181926"
|
||||
@@ -0,0 +1,13 @@
|
||||
{
|
||||
"layer": "top",
|
||||
"position": "top",
|
||||
"height": 30,
|
||||
|
||||
"modules-left": ["hyprland/workspaces"],
|
||||
"modules-center": ["clock"],
|
||||
"modules-right": ["network", "pulseaudio", "tray"],
|
||||
|
||||
"clock": {
|
||||
"format": "{:%a %d %b %H:%M}"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,58 @@
|
||||
{ config, lib, pkgs, ... }:
|
||||
|
||||
let
|
||||
moduleName = "hm-deefault-apps";
|
||||
in
|
||||
{
|
||||
# Ensure update-mime-database is available
|
||||
home.packages = with pkgs; [
|
||||
shared-mime-info
|
||||
];
|
||||
|
||||
# Teach the MIME DB that *.nix files are text/x-nix
|
||||
xdg.dataFile."mime/packages/nix.xml".text = ''
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<mime-info xmlns="http://www.freedesktop.org/standards/shared-mime-info">
|
||||
<mime-type type="text/x-nix">
|
||||
<comment>Nix expression</comment>
|
||||
<glob pattern="*.nix"/>
|
||||
</mime-type>
|
||||
</mime-info>
|
||||
'';
|
||||
|
||||
# Rebuild user MIME database after HM writes xdg.dataFile files
|
||||
home.activation.updateMimeDatabase =
|
||||
lib.hm.dag.entryAfter [ "writeBoundary" ] ''
|
||||
${pkgs.shared-mime-info}/bin/update-mime-database ${config.xdg.dataHome}/mime
|
||||
'';
|
||||
|
||||
xdg.mimeApps.enable = true;
|
||||
|
||||
xdg.mimeApps.defaultApplications = {
|
||||
# Nix files
|
||||
"text/x-nix" = [ "org.kde.kate.desktop" ];
|
||||
"text/plain" = [ "org.kde.kate.desktop" ];
|
||||
"text/x-ini" = [ "org.kde.kate.desktop" ];
|
||||
"application/x-desktop" = [ "org.kde.kate.desktop" ];
|
||||
|
||||
# Zen Browser (Flatpak)
|
||||
"x-scheme-handler/http" = [ "app.zen_browser.zen.desktop" ];
|
||||
"x-scheme-handler/https" = [ "app.zen_browser.zen.desktop" ];
|
||||
"text/html" = [ "app.zen_browser.zen.desktop" ];
|
||||
|
||||
# Email
|
||||
"x-scheme-handler/mailto" = [ "eu.betterbird.Betterbird.desktop" ];
|
||||
"message/rfc822" = [ "eu.betterbird.Betterbird.desktop" ];
|
||||
|
||||
# Calendar (common handlers)
|
||||
"text/calendar" = [ "eu.betterbird.Betterbird.desktop" ];
|
||||
"application/ics" = [ "eu.betterbird.Betterbird.desktop" ];
|
||||
"application/calendar" = [ "eu.betterbird.Betterbird.desktop" ];
|
||||
"x-scheme-handler/webcal" = [ "eu.betterbird.Betterbird.desktop" ];
|
||||
"x-scheme-handler/webcals" = [ "eu.betterbird.Betterbird.desktop" ];
|
||||
|
||||
# File manager
|
||||
"inode/directory" = [ "org.kde.dolphin.desktop" ];
|
||||
};
|
||||
home.file.".nixlog/loaded.${moduleName}-module-loaded".text = "loaded\n";
|
||||
}
|
||||
@@ -0,0 +1,58 @@
|
||||
{ config, pkgs, lib, ... }:
|
||||
|
||||
let
|
||||
p = import ./conf/packages.conf { inherit pkgs; };
|
||||
remote = p.flatpakRemote;
|
||||
apps = p.flatpakApps;
|
||||
q = lib.escapeShellArg;
|
||||
appArgs = lib.concatStringsSep " " (map q apps);
|
||||
moduleName = "hm-flatpak";
|
||||
in
|
||||
{
|
||||
services.flatpak.enable = true;
|
||||
|
||||
# Make network-online.target meaningful on NetworkManager systems
|
||||
systemd.services.NetworkManager-wait-online.enable = true;
|
||||
|
||||
systemd.services.flatpak-sync = {
|
||||
description = "Sync Flatpak remote and apps";
|
||||
wantedBy = [ "multi-user.target" ];
|
||||
|
||||
wants = [ "network-online.target" ];
|
||||
after = [ "network-online.target" ];
|
||||
|
||||
# re-run when system changes (useful when app list changes)
|
||||
#restartTriggers = [ config.system.build.toplevel ];
|
||||
|
||||
serviceConfig = {
|
||||
Type = "oneshot";
|
||||
TimeoutStartSec = 300;
|
||||
};
|
||||
|
||||
script = ''
|
||||
set -euo pipefail
|
||||
FLATPAK=${pkgs.flatpak}/bin/flatpak
|
||||
|
||||
# wait for DNS (prevents your exact error)
|
||||
for i in $(seq 1 30); do
|
||||
if ${pkgs.getent}/bin/getent hosts dl.flathub.org >/dev/null 2>&1; then
|
||||
break
|
||||
fi
|
||||
sleep 1
|
||||
done
|
||||
|
||||
"$FLATPAK" remote-add --system --if-not-exists ${q remote.name} ${q remote.url} || true
|
||||
|
||||
installed="$("$FLATPAK" list --system --app --columns=application 2>/dev/null || true)"
|
||||
for app in ${appArgs}; do
|
||||
if echo "$installed" | grep -qx "$app"; then
|
||||
echo "flatpak: already installed: $app"
|
||||
else
|
||||
echo "flatpak: installing: $app"
|
||||
"$FLATPAK" install --system -y ${q remote.name} "$app"
|
||||
fi
|
||||
done
|
||||
'';
|
||||
};
|
||||
home.file.".nixlog/loaded.${moduleName}-module-loaded".text = "loaded\n";
|
||||
}
|
||||
@@ -0,0 +1,50 @@
|
||||
{ config, pkgs, ... }:
|
||||
|
||||
let
|
||||
waylandSessions = "${config.services.displayManager.sessionData.desktops}/share/wayland-sessions";
|
||||
x11Sessions = "${config.services.displayManager.sessionData.desktops}/share/xsessions";
|
||||
moduleName = "hm-greeter";
|
||||
in
|
||||
{
|
||||
|
||||
users.users.greeter = {
|
||||
isSystemUser = true;
|
||||
group = "greeter";
|
||||
};
|
||||
users.groups.greeter = {};
|
||||
|
||||
|
||||
services.greetd = {
|
||||
enable = true;
|
||||
|
||||
settings = {
|
||||
terminal.vt = 1;
|
||||
|
||||
default_session = {
|
||||
# Run Hyprland as the greeter compositor
|
||||
command = "${pkgs.dbus}/bin/dbus-run-session ${pkgs.hyprland}/bin/start-hyprland -- --config /etc/greetd/greeter.conf";
|
||||
user = "greeter";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
# Install the greeter Hyprland config file
|
||||
environment.etc."greetd/greeter.conf".source = ./conf/greeter.conf;
|
||||
|
||||
# Give qtgreet access to session files on NixOS
|
||||
environment.etc."greetd/qtgreet-session-paths".text = ''
|
||||
WAYLAND_SESSIONS=${waylandSessions}
|
||||
X11_SESSIONS=${x11Sessions}
|
||||
'';
|
||||
|
||||
# Needed for Wayland logins in many setups
|
||||
services.seatd.enable = true;
|
||||
|
||||
environment.systemPackages = with pkgs; [
|
||||
qtgreet
|
||||
qt6Packages.qt6ct
|
||||
kdePackages.breeze
|
||||
kdePackages.breeze-icons
|
||||
];
|
||||
home.file.".nixlog/loaded.${moduleName}-module-loaded".text = "loaded\n";
|
||||
}
|
||||
@@ -0,0 +1,31 @@
|
||||
{ pkgs, ... }:
|
||||
|
||||
let
|
||||
moduleName = "hm-hyprland";
|
||||
in
|
||||
{
|
||||
imports = [
|
||||
./bindings.nix
|
||||
];
|
||||
|
||||
# Home Manager Hyprland configuration (user-level)
|
||||
# This installs Hyprland in the user environment and can manage config under ~/.config/hypr/
|
||||
wayland.windowManager.hyprland = {
|
||||
enable = true;
|
||||
# You can optionally set package = pkgs.hyprland; if you want a specific one.
|
||||
};
|
||||
|
||||
# Put your hyprland.conf in the standard Hyprland location:
|
||||
xdg.enable = true;
|
||||
xdg.configFile."hypr/hyprland.conf".source = ./conf/hyprland.conf;
|
||||
|
||||
# Session variables that *belong in Home Manager* (user session scope)
|
||||
home.sessionVariables = {
|
||||
XDG_CURRENT_DESKTOP = "Hyprland";
|
||||
XDG_SESSION_DESKTOP = "Hyprland";
|
||||
XDG_SESSION_TYPE = "wayland";
|
||||
};
|
||||
|
||||
# Marker file
|
||||
home.file.".nixlog/loaded.${moduleName}-module-loaded".text = "loaded\n";
|
||||
}
|
||||
@@ -0,0 +1,37 @@
|
||||
{ pkgs, ... }:
|
||||
|
||||
let
|
||||
moduleName = "hm-hyprshell";
|
||||
in
|
||||
{
|
||||
# Make sure XDG base dirs are used (so xdg.configFile writes into ~/.config)
|
||||
xdg.enable = true;
|
||||
|
||||
# Hyprshell config files
|
||||
xdg.configFile."hyprshell/config.ron".source = ./conf/hyprshell/config.ron;
|
||||
xdg.configFile."hyprshell/styles.css".source = ./conf/hyprshell/styles.css;
|
||||
|
||||
# Install hyprshell
|
||||
home.packages = [ pkgs.hyprshell ];
|
||||
|
||||
# Run hyprshell as a user service when your graphical session starts
|
||||
systemd.user.services.hyprshell = {
|
||||
Unit = {
|
||||
Description = "Hyprshell";
|
||||
PartOf = [ "graphical-session.target" ];
|
||||
After = [ "graphical-session.target" ];
|
||||
};
|
||||
|
||||
Service = {
|
||||
ExecStart = "${pkgs.hyprshell}/bin/hyprshell run";
|
||||
Restart = "on-failure";
|
||||
RestartSec = 1;
|
||||
};
|
||||
|
||||
Install = {
|
||||
WantedBy = [ "graphical-session.target" ];
|
||||
};
|
||||
};
|
||||
|
||||
home.file.".nixlog/loaded.${moduleName}-module-loaded".text = "loaded\n";
|
||||
}
|
||||
@@ -0,0 +1,21 @@
|
||||
{ pkgs, ... }:
|
||||
|
||||
let
|
||||
cfg = import ../../conf/packages.conf { inherit pkgs; };
|
||||
moduleName = "hm-packages";
|
||||
in
|
||||
{
|
||||
# Unfree should be set at NixOS level
|
||||
nixpkgs.config.allowUnfree = true;
|
||||
|
||||
# Install packages via Home Manager (integrated into NixOS)
|
||||
home-manager.users.henrov = {
|
||||
home.packages = cfg.packages;
|
||||
};
|
||||
|
||||
# Optional: keep these available in the NixOS config namespace if you want
|
||||
# to use them with nix-flatpak later.
|
||||
# (No effect unless you wire them to a flatpak module.)
|
||||
_module.args.packagesConf = cfg;
|
||||
home.file.".nixlog/loaded.${moduleName}-module-loaded".text = "loaded\n";
|
||||
}
|
||||
@@ -0,0 +1,62 @@
|
||||
{ config, pkgs, ... }:
|
||||
|
||||
let
|
||||
moduleName = "hm-terminal";
|
||||
in
|
||||
{
|
||||
# -----BASH --------------
|
||||
programs.bash = {
|
||||
enable = true;
|
||||
|
||||
# Load aliases from ~/.config/zsh/aliases.conf
|
||||
bashrcExtra = ''
|
||||
if [ -f "$HOME/.config/zsh/aliases.conf" ]; then
|
||||
source "$HOME/.config/zsh/aliases.conf"
|
||||
fi
|
||||
'';
|
||||
};
|
||||
|
||||
# ------ KITTY -----
|
||||
programs.kitty = {
|
||||
enable = true;
|
||||
settings = {
|
||||
background_opacity = 0.60;
|
||||
dynamic_background_opacity = true;
|
||||
};
|
||||
};
|
||||
|
||||
# -------ZSH------------
|
||||
programs.zsh = {
|
||||
enable = true;
|
||||
dotDir = ".config/zsh";
|
||||
enableCompletion = true;
|
||||
autosuggestion.enable = true;
|
||||
syntaxHighlighting.enable = true;
|
||||
initContent= ''
|
||||
if [ -f "$HOME/.config/zsh/aliases.conf" ]; then
|
||||
source "$HOME/.config/zsh/aliases.conf"
|
||||
fi
|
||||
'';
|
||||
|
||||
oh-my-zsh = {
|
||||
enable = true;
|
||||
theme = "";
|
||||
plugins = [ "git" "sudo" "docker" ];
|
||||
};
|
||||
};
|
||||
|
||||
# Put the aliases file into ~/.config/zsh/aliases.conf
|
||||
xdg.configFile."zsh/aliases.conf".source = ./conf/aliases.conf;
|
||||
|
||||
# -----STARSHIP--------------
|
||||
programs.starship = {
|
||||
enable = true;
|
||||
enableBashIntegration = true;
|
||||
enableZshIntegration = true;
|
||||
};
|
||||
|
||||
xdg.configFile."starship.toml".text =
|
||||
builtins.readFile ./conf/starship.toml;
|
||||
|
||||
home.file.".nixlog/loaded.${moduleName}-module-loaded".text = "loaded\n";
|
||||
}
|
||||
@@ -0,0 +1,22 @@
|
||||
{ config, pkgs, ... }:
|
||||
|
||||
let
|
||||
moduleName = "hm-waybar";
|
||||
in
|
||||
{
|
||||
# Installs + enables Waybar
|
||||
programs.waybar = {
|
||||
enable = true;
|
||||
|
||||
# Explicit install (optional, but you asked for it)
|
||||
package = pkgs.waybar;
|
||||
};
|
||||
|
||||
# Your config file is named waybar.conf in your repo,
|
||||
# but Waybar expects it as ~/.config/waybar/config
|
||||
xdg.configFile."waybar/config".source = .conf/waybar/waybar.conf;
|
||||
|
||||
# CSS styling
|
||||
xdg.configFile."waybar/style.css".source = ./waybar/style.css;
|
||||
home.file.".nixlog/loaded.${moduleName}-module-loaded".text = "loaded\n";
|
||||
}
|
||||
Reference in New Issue
Block a user