Compare commits

..

12 Commits

40 changed files with 434 additions and 373 deletions

View File

@@ -67,10 +67,11 @@ nomarchy.home.terminal = "kitty";
``` ```
### Applying Changes ### Applying Changes
After editing your files, apply them instantly: After editing your files, apply them instantly. **IMPORTANT:** Nomarchy requires the `--impure` flag for evaluation. You **MUST** use the following aliases rather than standard NixOS commands:
```bash ```bash
sys-update # Rebuilds the NixOS system sys-update # Rebuilds the NixOS system (Runs: sudo nixos-rebuild switch --flake .#default --impure)
env-update # Reloads your Home Manager environment env-update # Reloads your Home Manager environment (Runs: home-manager switch --flake .#default --impure)
``` ```
--- ---

View File

@@ -4,6 +4,13 @@ Window.SetBackgroundTopColor(0.101, 0.105, 0.149);
Window.SetBackgroundBottomColor(0.101, 0.105, 0.149); Window.SetBackgroundBottomColor(0.101, 0.105, 0.149);
logo.image = Image("logo.png"); logo.image = Image("logo.png");
# Calculate scale factor to make logo ~15% of screen height
logo_scale_factor = (Window.GetHeight() * 0.15) / logo.image.GetHeight();
logo_width = logo.image.GetWidth() * logo_scale_factor;
logo_height = logo.image.GetHeight() * logo_scale_factor;
logo.image = logo.image.Scale(logo_width, logo_height);
logo.sprite = Sprite(logo.image); logo.sprite = Sprite(logo.image);
logo.sprite.SetX (Window.GetWidth() / 2 - logo.image.GetWidth() / 2); logo.sprite.SetX (Window.GetWidth() / 2 - logo.image.GetWidth() / 2);
logo.sprite.SetY (Window.GetHeight() / 2 - logo.image.GetHeight() / 2); logo.sprite.SetY (Window.GetHeight() / 2 - logo.image.GetHeight() / 2);
@@ -148,7 +155,7 @@ fun display_normal_callback ()
mode = Plymouth.GetMode(); mode = Plymouth.GetMode();
# Only show progress bar for boot and resume modes # Only show progress bar for boot and resume modes
if ((mode == "boot" || mode == "resume") && global.password_shown == 1) if (mode == "boot" || mode == "resume")
{ {
show_progress_bar(); show_progress_bar();
start_fake_progress(); start_fake_progress();
@@ -255,3 +262,10 @@ fun hide_message_callback (text)
Plymouth.SetDisplayMessageFunction (display_message_callback); Plymouth.SetDisplayMessageFunction (display_message_callback);
Plymouth.SetHideMessageFunction (hide_message_callback); Plymouth.SetHideMessageFunction (hide_message_callback);
# Initialize progress bar immediately for normal boots
if (Plymouth.GetMode() == "boot" || Plymouth.GetMode() == "resume")
{
show_progress_bar();
start_fake_progress();
}

View File

@@ -1,6 +0,0 @@
@define-color selected-text {{ accent }};
@define-color text {{ foreground }};
@define-color base {{ background }};
@define-color border {{ foreground }};
@define-color foreground {{ foreground }};
@define-color background {{ background }};

View File

@@ -1,2 +0,0 @@
@define-color foreground {{ foreground }};
@define-color background {{ background }};

View File

@@ -1,39 +1,20 @@
#!/bin/bash #!/usr/bin/env bash
# Sync Nomarchy theme to VS Code, VSCodium, and Cursor # Nomarchy VS Code Theme Setter
# This script only updates the global state.json.
# Home Manager (modules/home/vscode.nix) handles the declarative settings injection.
VS_CODE_THEME="$HOME/.config/nomarchy/current/theme/vscode.json" STATE_DIR="$HOME/.config/home-manager"
STATE_FILE="$STATE_DIR/state.json"
set_theme() { mkdir -p "$STATE_DIR"
local editor_cmd="$1" [[ ! -f $STATE_FILE ]] && echo "{}" > "$STATE_FILE"
local settings_path="$2"
nomarchy-cmd-present "$editor_cmd" && [[ $NNOMARCHY_TOGGLE_SKIP_VSCODE_THEME != "true" ]] || return 0 # Theme is already set in state.json by nomarchy-theme-set.
# This script is now mostly a placeholder to maintain the same workflow,
# triggering an env-update if needed to apply the declarative changes.
if [[ -f $VS_CODE_THEME ]]; then if [[ $NOMARCHY_TOGGLE_SKIP_VSCODE_THEME != "true" ]]; then
theme_name=$(jq -r '.name' "$VS_CODE_THEME") # We trigger env-update to apply the new VSCode theme declaratively.
extension=$(jq -r '.extension' "$VS_CODE_THEME") env-update
if [[ -n $extension ]] && ! "$editor_cmd" --list-extensions | grep -Fxq "$extension"; then
"$editor_cmd" --install-extension "$extension" >/dev/null
fi fi
mkdir -p "$(dirname "$settings_path")"
[[ -f $settings_path ]] || printf '{\n}\n' >"$settings_path"
if ! grep -q '"workbench.colorTheme"' "$settings_path"; then
sed -i --follow-symlinks -E '0,/\{/{s/\{/{\ "workbench.colorTheme": "",/}' "$settings_path"
fi
sed -i --follow-symlinks -E \
"s/(\"workbench.colorTheme\"[[:space:]]*:[[:space:]]*\")[^\"]*(\")/\1$theme_name\2/" \
"$settings_path"
elif [[ -f $settings_path ]]; then
sed -i --follow-symlinks -E 's/\"workbench\.colorTheme\"[[:space:]]*:[^,}]*,?//' "$settings_path"
fi
}
set_theme "code" "$HOME/.config/Code/User/settings.json"
set_theme "code-insiders" "$HOME/.config/Code - Insiders/User/settings.json"
set_theme "codium" "$HOME/.config/VSCodium/User/settings.json"
set_theme "cursor" "$HOME/.config/Cursor/User/settings.json"

View File

@@ -0,0 +1,83 @@
#!/usr/bin/env bash
# Nomarchy Pre-flight State Migration
# Migrates legacy state files into the unified state.json before Nix evaluation
STATE_DIR="$HOME/.config/home-manager"
OLD_TOGGLES_DIR="$HOME/.local/state/nomarchy/toggles"
IDLE_STATE_FILE="$STATE_DIR/idle-state.json"
NIGHTLIGHT_STATE_FILE="$STATE_DIR/hyprsunset-state.json"
HYPRLAND_STATE_FILE="$STATE_DIR/hyprland-state.json"
THEME_STATE_FILE="$STATE_DIR/theme-state.nix"
WALLPAPER_STATE_FILE="$STATE_DIR/wallpaper-state.nix"
FONT_STATE_FILE="$STATE_DIR/font-state.nix"
NEW_STATE_FILE="$STATE_DIR/state.json"
# We expect jq to be in PATH (it's a dependency of nomarchy-scripts)
JQ="jq"
mkdir -p "$(dirname "$NEW_STATE_FILE")"
[[ ! -f $NEW_STATE_FILE ]] && echo "{}" > "$NEW_STATE_FILE"
# 1. Migrate .local/state/nomarchy/toggles
if [[ -d $OLD_TOGGLES_DIR ]]; then
for file in "$OLD_TOGGLES_DIR"/*; do
[[ -e "$file" ]] || continue
filename=$(basename "$file")
case "$filename" in
suspend-off)
$JQ '.suspend = false' "$NEW_STATE_FILE" > "$NEW_STATE_FILE.tmp" && mv "$NEW_STATE_FILE.tmp" "$NEW_STATE_FILE"
;;
screensaver-off)
$JQ '.screensaver = false' "$NEW_STATE_FILE" > "$NEW_STATE_FILE.tmp" && mv "$NEW_STATE_FILE.tmp" "$NEW_STATE_FILE"
;;
skip-vscode-theme-changes)
$JQ '.skipVsCodeTheme = true' "$NEW_STATE_FILE" > "$NEW_STATE_FILE.tmp" && mv "$NEW_STATE_FILE.tmp" "$NEW_STATE_FILE"
;;
esac
rm "$file"
done
rmdir "$OLD_TOGGLES_DIR" 2>/dev/null || true
fi
# 2. Migrate existing JSON state files
if [[ -f $IDLE_STATE_FILE ]]; then
ENABLED=$($JQ '.enabled' "$IDLE_STATE_FILE")
if [[ "$ENABLED" == "true" || "$ENABLED" == "false" ]]; then
$JQ ".idle = $ENABLED" "$NEW_STATE_FILE" > "$NEW_STATE_FILE.tmp" && mv "$NEW_STATE_FILE.tmp" "$NEW_STATE_FILE"
fi
rm "$IDLE_STATE_FILE"
fi
if [[ -f $NIGHTLIGHT_STATE_FILE ]]; then
ENABLED=$($JQ '.enabled' "$NIGHTLIGHT_STATE_FILE")
TEMP=$($JQ '.temperature' "$NIGHTLIGHT_STATE_FILE")
$JQ ".nightlight = $ENABLED | .nightlightTemperature = $TEMP" "$NEW_STATE_FILE" > "$NEW_STATE_FILE.tmp" && mv "$NEW_STATE_FILE.tmp" "$NEW_STATE_FILE"
rm "$NIGHTLIGHT_STATE_FILE"
fi
if [[ -f $HYPRLAND_STATE_FILE ]]; then
GAPS_OUT=$($JQ '.gaps_out' "$HYPRLAND_STATE_FILE")
GAPS_IN=$($JQ '.gaps_in' "$HYPRLAND_STATE_FILE")
BORDER_SIZE=$($JQ '.border_size' "$HYPRLAND_STATE_FILE")
$JQ ".hyprland = {\"gaps_out\": $GAPS_OUT, \"gaps_in\": $GAPS_IN, \"border_size\": $BORDER_SIZE}" "$NEW_STATE_FILE" > "$NEW_STATE_FILE.tmp" && mv "$NEW_STATE_FILE.tmp" "$NEW_STATE_FILE"
rm "$HYPRLAND_STATE_FILE"
fi
# 3. Migrate plaintext string state files
if [[ -f $THEME_STATE_FILE ]]; then
THEME=$(cat "$THEME_STATE_FILE" | tr -d '\n')
$JQ ".theme = \"$THEME\"" "$NEW_STATE_FILE" > "$NEW_STATE_FILE.tmp" && mv "$NEW_STATE_FILE.tmp" "$NEW_STATE_FILE"
rm "$THEME_STATE_FILE"
fi
if [[ -f $WALLPAPER_STATE_FILE ]]; then
WALLPAPER=$(cat "$WALLPAPER_STATE_FILE" | tr -d '\n')
$JQ ".wallpaper = \"$WALLPAPER\"" "$NEW_STATE_FILE" > "$NEW_STATE_FILE.tmp" && mv "$NEW_STATE_FILE.tmp" "$NEW_STATE_FILE"
rm "$WALLPAPER_STATE_FILE"
fi
if [[ -f $FONT_STATE_FILE ]]; then
FONT=$(cat "$FONT_STATE_FILE" | tr -d '\n')
$JQ ".font = \"$FONT\"" "$NEW_STATE_FILE" > "$NEW_STATE_FILE.tmp" && mv "$NEW_STATE_FILE.tmp" "$NEW_STATE_FILE"
rm "$FONT_STATE_FILE"
fi

View File

@@ -1,28 +0,0 @@
general {
lock_cmd = nomarchy-lock-screen # lock screen and 1password
before_sleep_cmd = loginctl lock-session # lock before suspend.
after_sleep_cmd = sleep 1 && hyprctl dispatch dpms on # delay for PAM readiness, then turn on display.
inhibit_sleep = 3 # wait until screen is locked
}
listener {
timeout = 150 # 2.5min
on-timeout = pidof hyprlock || nomarchy-launch-screensaver # start screensaver (if we haven't locked already)
}
listener {
timeout = 151 # 5min
on-timeout = loginctl lock-session # lock screen when timeout has passed
}
listener {
timeout = 330 # 5.5min
on-timeout = brightnessctl -sd '*::kbd_backlight' set 0 # save state and turn off keyboard backlight
on-resume = brightnessctl -rd '*::kbd_backlight' # restore keyboard backlight
}
listener {
timeout = 330 # 5.5min
on-timeout = hyprctl dispatch dpms off # screen off when timeout has passed
on-resume = hyprctl dispatch dpms on && brightnessctl -r # screen on when activity is detected
}

View File

@@ -4,7 +4,6 @@ exec-once = uwsm-app -- waybar
exec-once = uwsm-app -- fcitx5 --disable notificationitem exec-once = uwsm-app -- fcitx5 --disable notificationitem
exec-once = uwsm-app -- swaybg -i ~/.config/nomarchy/current/background -m fill exec-once = uwsm-app -- swaybg -i ~/.config/nomarchy/current/background -m fill
exec-once = uwsm-app -- swayosd-server exec-once = uwsm-app -- swayosd-server
exec-once = /usr/lib/polkit-gnome/polkit-gnome-authentication-agent-1
exec-once = nomarchy-cmd-first-run exec-once = nomarchy-cmd-first-run
# Slow app launch fix -- set systemd vars # Slow app launch fix -- set systemd vars

View File

@@ -124,8 +124,6 @@ misc {
disable_splash_rendering = true disable_splash_rendering = true
disable_scale_notification = true disable_scale_notification = true
focus_on_activate = true focus_on_activate = true
anr_missed_pings = 3
on_focus_under_fullscreen = 1
} }
# https://wiki.hypr.land/Configuring/Variables/#cursor # https://wiki.hypr.land/Configuring/Variables/#cursor
@@ -145,3 +143,4 @@ env = GUM_CONFIRM_SELECTED_FOREGROUND,0 # Black
env = GUM_CONFIRM_SELECTED_BACKGROUND,2 # Green env = GUM_CONFIRM_SELECTED_BACKGROUND,2 # Green
env = GUM_CONFIRM_UNSELECTED_FOREGROUND,7 # White env = GUM_CONFIRM_UNSELECTED_FOREGROUND,7 # White
env = GUM_CONFIRM_UNSELECTED_BACKGROUND,8 # Dark grey env = GUM_CONFIRM_UNSELECTED_BACKGROUND,8 # Dark grey
# Dark grey

View File

@@ -1,6 +1,6 @@
# See https://wiki.hyprland.org/Configuring/Window-Rules/ for more # See https://wiki.hyprland.org/Configuring/Window-Rules/ for more
# Hyprland 0.53+ syntax # Hyprland 0.53+ syntax
windowrulev2 = suppress_event, maximize, class:.* windowrulev2 = suppressevent maximize, class:.*
# Tag all windows for default opacity (apps can override with -default-opacity tag) # Tag all windows for default opacity (apps can override with -default-opacity tag)
windowrulev2 = tag +default-opacity, class:.* windowrulev2 = tag +default-opacity, class:.*

View File

@@ -72,6 +72,7 @@ child:hover .item-box {
} }
child:selected .item-box { child:selected .item-box {
background-color: @selected-background;
} }
child:selected .item-box * { child:selected .item-box * {

View File

@@ -1,4 +0,0 @@
[server]
show_percentage = true
max_volume = 100
style = "~/.config/swayosd/style.css"

View File

@@ -1,28 +0,0 @@
@import "../nomarchy/current/theme/swayosd.css";
window {
border-radius: 0;
opacity: 0.97;
border: 2px solid @border-color;
background-color: @background-color;
}
label {
font-family: 'JetBrainsMono Nerd Font';
font-size: 11pt;
color: @label;
}
image {
color: @image;
}
progressbar {
border-radius: 0;
}
progress {
background-color: @progress;
}

View File

@@ -1,9 +0,0 @@
[Unit]
Description=Nomarchy Battery Monitor Check
After=graphical-session.target
[Service]
Type=oneshot
ExecStart=%h/.local/share/nomarchy/bin/nomarchy-battery-monitor
Environment=DISPLAY=:0
LogLevelMax=warning

View File

@@ -1,11 +0,0 @@
[Unit]
Description=Nomarchy Battery Monitor Timer
Requires=nomarchy-battery-monitor.service
[Timer]
OnBootSec=1min
OnUnitActiveSec=30sec
AccuracySec=10sec
[Install]
WantedBy=timers.target

View File

@@ -1,49 +0,0 @@
force_keyboard_focus = true # forces keyboard forcus to stay in Walker
selection_wrap = true # wrap list if at bottom or top
theme = "nomarchy-default" # theme to use
additional_theme_location = "~/.config/nomarchy/default/walker/themes/"
hide_action_hints = true # globally hide the action hints
[placeholders]
"default" = { input = " Search...", list = "No Results" } # placeholders for input and empty list, key is the providers name, so f.e. "desktopapplications" or "menus:other"
[keybinds]
quick_activate = []
[columns]
symbols = 1 # providers to be queried by default
[providers]
max_results = 256 # 256 should be enough for everyone
default = [
"desktopapplications",
"websearch",
]
[[providers.prefixes]]
prefix = "/"
provider = "providerlist"
[[providers.prefixes]]
prefix = "."
provider = "files"
[[providers.prefixes]]
prefix = ":"
provider = "symbols"
[[providers.prefixes]]
prefix = "="
provider = "calc"
[[providers.prefixes]]
prefix = "@"
provider = "websearch"
[[providers.prefixes]]
prefix = "$"
provider = "clipboard"
[[emergencies]]
text = "Restart Walker"
command = "nomarchy-restart-walker"

View File

@@ -40,7 +40,7 @@
} }
}, },
"custom/nomarchy": { "custom/nomarchy": {
"format": "<span font='nomarchy'>\ue900</span>", "format": "<span font='nomarchy'>a</span>",
"on-click": "nomarchy-menu", "on-click": "nomarchy-menu",
"on-click-right": "xdg-terminal-exec", "on-click-right": "xdg-terminal-exec",
"tooltip-format": "Nomarchy Menu\n\nSuper + Alt + Space" "tooltip-format": "Nomarchy Menu\n\nSuper + Alt + Space"
@@ -150,7 +150,7 @@
}, },
"custom/notification-silencing-indicator": { "custom/notification-silencing-indicator": {
"on-click": "nomarchy-toggle-notification-silencing", "on-click": "nomarchy-toggle-notification-silencing",
"exec": "$OMARCHY_PATH/default/waybar/indicators/notification-silencing.sh", "exec": "~/.config/nomarchy/default/waybar/indicators/notification-silencing.sh",
"signal": 10, "signal": 10,
"return-type": "json" "return-type": "json"
}, },

View File

@@ -3,7 +3,7 @@
inputs = { inputs = {
nixpkgs.url = "github:nixos/nixpkgs/nixos-25.11"; nixpkgs.url = "github:nixos/nixpkgs/nixos-25.11";
nixos-hardware.url = "github:NixOS/nixos-hardware/master"; nixos-hardware.url = "github:NixOS/nixos-hardware";
disko = { disko = {
url = "github:nix-community/disko"; url = "github:nix-community/disko";
@@ -64,7 +64,8 @@
modules = [ modules = [
{ nixpkgs.hostPlatform = "x86_64-linux"; } { nixpkgs.hostPlatform = "x86_64-linux"; }
./hosts/live-iso.nix ./hosts/live-iso.nix
./modules/system ./modules/system/default.nix
./modules/system/vm-guest.nix
home-manager.nixosModules.home-manager home-manager.nixosModules.home-manager
{ {
system.stateVersion = "25.11"; system.stateVersion = "25.11";
@@ -74,29 +75,18 @@
services.displayManager.autoLogin.enable = true; services.displayManager.autoLogin.enable = true;
services.displayManager.autoLogin.user = "nixos"; services.displayManager.autoLogin.user = "nixos";
virtualisation.vmVariant.virtualisation.memorySize = 2048;
virtualisation.vmVariant.virtualisation.cores = 2;
home-manager.useGlobalPkgs = false; home-manager.useGlobalPkgs = false;
home-manager.useUserPackages = true; home-manager.useUserPackages = true;
home-manager.users.nixos = { home-manager.users.nixos = {
imports = [ ./modules/home ]; imports = [ ./modules/home/default.nix ];
home.username = "nixos"; home.username = "nixos";
home.homeDirectory = "/home/nixos"; home.homeDirectory = "/home/nixos";
home.stateVersion = "25.11"; home.stateVersion = "25.11";
}; };
# VM specific settings to enable graphical boot
virtualisation.vmVariant = {
virtualisation.memorySize = 2048;
virtualisation.cores = 2;
virtualisation.graphics = true;
virtualisation.qemu.options = [ "-device virtio-vga" ];
};
# Use a dummy hardware config for VM
fileSystems."/" = { device = "/dev/disk/by-label/nixos"; };
boot.loader.grub.device = "/dev/vda";
boot.initrd.availableKernelModules = [ "virtio_pci" "virtio_blk" "virtio_gpu" "virtio_net" "virtio_mmio" ];
boot.kernelParams = nixpkgs.lib.mkForce [ "video=1280x800" "quiet" "splash" "boot.shell_on_fail" ];
# Ensure the user has the right groups for graphical environment # Ensure the user has the right groups for graphical environment
users.users.nixos = { users.users.nixos = {
isNormalUser = true; isNormalUser = true;
@@ -111,26 +101,16 @@
specialArgs = { inherit inputs; }; specialArgs = { inherit inputs; };
modules = [ modules = [
{ nixpkgs.hostPlatform = "x86_64-linux"; } { nixpkgs.hostPlatform = "x86_64-linux"; }
./modules/system ./modules/system/default.nix
./modules/system/hardware.nix ./modules/system/vm-guest.nix
home-manager.nixosModules.home-manager home-manager.nixosModules.home-manager
{ {
system.stateVersion = "25.11"; system.stateVersion = "25.11";
networking.hostName = "nomarchy"; networking.hostName = "nomarchy";
home-manager.extraSpecialArgs = { inherit inputs; }; home-manager.extraSpecialArgs = { inherit inputs; };
# VM specific settings
virtualisation.vmVariant = {
virtualisation.memorySize = 4096;
virtualisation.cores = 2;
virtualisation.graphics = true;
virtualisation.qemu.options = [ "-device virtio-vga" ];
};
# Use a dummy hardware config for VM virtualisation.vmVariant.virtualisation.memorySize = 4096;
fileSystems."/" = { device = "/dev/disk/by-label/nixos"; }; virtualisation.vmVariant.virtualisation.cores = 2;
boot.loader.grub.device = "/dev/vda";
boot.initrd.availableKernelModules = [ "virtio_pci" "virtio_blk" "virtio_gpu" "virtio_net" "virtio_mmio" ];
boot.kernelParams = nixpkgs.lib.mkForce [ "video=1280x800" "quiet" "splash" "boot.shell_on_fail" ];
# Setup default user for testing # Setup default user for testing
users.users.nomarchy = { users.users.nomarchy = {
@@ -145,7 +125,7 @@
home-manager.useGlobalPkgs = false; home-manager.useGlobalPkgs = false;
home-manager.useUserPackages = true; home-manager.useUserPackages = true;
home-manager.users.nomarchy = { home-manager.users.nomarchy = {
imports = [ ./modules/home ]; imports = [ ./modules/home/default.nix ];
home.username = "nomarchy"; home.username = "nomarchy";
home.homeDirectory = "/home/nomarchy"; home.homeDirectory = "/home/nomarchy";
home.stateVersion = "25.11"; home.stateVersion = "25.11";

View File

@@ -1,4 +1,4 @@
{ config, pkgs, inputs, ... }: { config, pkgs, inputs, lib, ... }:
{ {
environment.systemPackages = with pkgs; [ environment.systemPackages = with pkgs; [
@@ -14,6 +14,9 @@
}) })
]; ];
# Ensure the live environment user has the necessary groups for graphical acceleration and audio
users.users.nixos.extraGroups = [ "wheel" "video" "render" "audio" "networkmanager" ];
environment.etc."install-nomarchy.sh" = { environment.etc."install-nomarchy.sh" = {
source = ../installer/install-nomarchy.sh; source = ../installer/install-nomarchy.sh;
mode = "0755"; mode = "0755";

View File

@@ -124,6 +124,14 @@ section "User & Localization"
USERNAME=$(gum input --placeholder "Enter target username (no spaces)") USERNAME=$(gum input --placeholder "Enter target username (no spaces)")
if [ -z "$USERNAME" ]; then exit 1; fi if [ -z "$USERNAME" ]; then exit 1; fi
USER_PASSWORD=$(gum input --password --placeholder "Enter password for $USERNAME")
USER_PASSWORD_CONFIRM=$(gum input --password --placeholder "Confirm password")
if [ "$USER_PASSWORD" != "$USER_PASSWORD_CONFIRM" ]; then
gum style --foreground 9 "Error: Passwords do not match."
exit 1
fi
echo "Select Timezone:" echo "Select Timezone:"
TIMEZONES=$(timedatectl list-timezones || echo "UTC") TIMEZONES=$(timedatectl list-timezones || echo "UTC")
TIMEZONE=$(echo "$TIMEZONES" | gum filter --placeholder "Type to search...") TIMEZONE=$(echo "$TIMEZONES" | gum filter --placeholder "Type to search...")
@@ -206,6 +214,15 @@ cat <<EOF > /mnt/etc/nixos/system.nix
{ pkgs, ... }: { pkgs, ... }:
{ {
\$(echo -e \"$PROFILE_SYSTEM_CONFIG\") \$(echo -e \"$PROFILE_SYSTEM_CONFIG\")
users.users.\"$USERNAME\" = {
isNormalUser = true;
initialPassword = \"$USER_PASSWORD\";
extraGroups = [ \"networkmanager\" \"wheel\" \"video\" \"audio\" ];
};
system.stateVersion = \"25.11\";
environment.systemPackages = with pkgs; []; environment.systemPackages = with pkgs; [];
} }
EOF EOF
@@ -246,6 +263,7 @@ cat <<EOF > /mnt/etc/nixos/flake.nix
{ {
home-manager.useGlobalPkgs = true; home-manager.useGlobalPkgs = true;
home-manager.useUserPackages = true; home-manager.useUserPackages = true;
home-manager.extraSpecialArgs = { inherit inputs; };
home-manager.users.$USERNAME = { home-manager.users.$USERNAME = {
imports = [ nomarchy.nixosModules.home ./home.nix ]; imports = [ nomarchy.nixosModules.home ./home.nix ];
home.username = \"$USERNAME\"; home.username = \"$USERNAME\";

View File

@@ -4,19 +4,12 @@
programs.alacritty = { programs.alacritty = {
enable = true; enable = true;
settings = { settings = {
general.import = [ "~/.config/nomarchy/current/theme/alacritty.toml" ];
env = { env = {
TERM = "xterm-256color"; TERM = "xterm-256color";
}; };
terminal = { terminal = {
osc52 = "CopyPaste"; osc52 = "CopyPaste";
}; };
font = {
normal = { family = config.nomarchy.fonts.monospace; style = "Regular"; };
bold = { family = config.nomarchy.fonts.monospace; style = "Bold"; };
italic = { family = config.nomarchy.fonts.monospace; style = "Italic"; };
size = lib.mkForce 9;
};
window = { window = {
padding = { x = 14; y = 14; }; padding = { x = 14; y = 14; };
decorations = "None"; decorations = "None";

45
modules/home/bash.nix Normal file
View File

@@ -0,0 +1,45 @@
{ config, lib, ... }:
{
programs.bash = {
enable = true;
# Safely append user's custom RC file after NixOS setup
bashrcExtra = ''
if [[ -f ~/.config/nomarchy/default/bash/rc ]]; then
source ~/.config/nomarchy/default/bash/rc
fi
'';
# Import aliases from the static file logic
shellAliases = lib.mkDefault {
# File system
lsa = "ls -a";
# Directories
".." = "cd ..";
"..." = "cd ../..";
"...." = "cd ../../..";
# Tools
c = "opencode";
d = "docker";
r = "rails";
t = "tmux attach || tmux new -s Work";
# Git
g = "git";
gcm = "git commit -m";
gcam = "git commit -a -m";
gcad = "git commit -a --amend";
# NixOS specific (inherited from default.nix but keeping here for consistency)
sys-update = "sudo nixos-rebuild switch --flake /etc/nixos#default --impure";
env-update = "nomarchy-preflight-migration && home-manager switch --flake /etc/nixos#default --impure";
};
};
# Ensure the directory exists in the user's home via xdg.configFile
# This mapping is likely already handled in configs.nix, but we ensure it here
# or in the main config mapping.
}

View File

@@ -0,0 +1,34 @@
{ pkgs, ... }:
{
systemd.user.services.nomarchy-battery-monitor = {
Unit = {
Description = "Nomarchy Battery Monitor Check";
After = [ "graphical-session.target" ];
};
Service = {
Type = "oneshot";
# The script is packaged in nomarchy-scripts which is in the home profile
ExecStart = "nomarchy-battery-monitor";
Environment = [ "DISPLAY=:0" ];
LogLevelMax = "warning";
};
};
systemd.user.timers.nomarchy-battery-monitor = {
Unit = {
Description = "Nomarchy Battery Monitor Timer";
};
Timer = {
OnBootSec = "1min";
OnUnitActiveSec = "30sec";
AccuracySec = "10sec";
};
Install = {
WantedBy = [ "timers.target" ];
};
};
}

View File

@@ -30,11 +30,14 @@ in
./scripts.nix ./scripts.nix
./configs.nix ./configs.nix
./swayosd.nix ./swayosd.nix
./security.nix
./battery-monitor.nix
./bash.nix
]; ];
colorScheme = palettes.${config.nomarchy.theme} or palettes.nord; colorScheme = lib.mkDefault (palettes.${config.nomarchy.theme} or palettes.nord);
home.packages = with pkgs; [ home.packages = lib.mkDefault (with pkgs; [
firefox firefox
xfce.thunar xfce.thunar
imv imv
@@ -55,10 +58,7 @@ in
nerd-fonts.roboto-mono nerd-fonts.roboto-mono
nerd-fonts.fira-code nerd-fonts.fira-code
nerd-fonts.ubuntu-mono nerd-fonts.ubuntu-mono
] ++ userPackages; ] ++ userPackages);
home.shellAliases = { # Shell aliases are now managed in bash.nix
sys-update = "sudo nixos-rebuild switch --flake /etc/nixos#default --impure";
env-update = "home-manager switch --flake /etc/nixos#default --impure";
};
} }

View File

@@ -24,20 +24,9 @@ in
"col.active_border" = "rgb(${config.colorScheme.palette.base0E})"; "col.active_border" = "rgb(${config.colorScheme.palette.base0E})";
"col.inactive_border" = "rgb(${config.colorScheme.palette.base03})"; "col.inactive_border" = "rgb(${config.colorScheme.palette.base03})";
}; };
"exec-once" = [
"swww-daemon & sleep 0.5 && swww img ${activeWallpaper} --transition-type none"
"nomarchy-on-boot"
"nomarchy-welcome"
] ++ (lib.optional config.nomarchy.toggles.waybar "waybar");
"bind" = [
"SUPER, Space, exec, walker"
"SUPER ALT, Space, exec, nomarchy-theme-selector"
"SUPER CTRL, Space, exec, nomarchy-font-selector"
"SUPER SHIFT, Space, exec, nomarchy-wallpaper-selector"
"SUPER, Return, exec, alacritty"
"SUPER, Q, killactive,"
"SUPER, M, exit,"
];
}; };
extraConfig = ''
source = ~/.config/hypr/hyprland.conf
'';
}; };
} }

View File

@@ -3,5 +3,35 @@
{ {
services.hypridle = { services.hypridle = {
enable = config.nomarchy.toggles.idle; enable = config.nomarchy.toggles.idle;
extraConfig = ''
general {
lock_cmd = nomarchy-lock-screen # lock screen and 1password
before_sleep_cmd = loginctl lock-session # lock before suspend.
after_sleep_cmd = sleep 1 && hyprctl dispatch dpms on # delay for PAM readiness, then turn on display.
inhibit_sleep = 3 # wait until screen is locked
}
listener {
timeout = 150 # 2.5min
on-timeout = pidof hyprlock || nomarchy-launch-screensaver # start screensaver (if we haven't locked already)
}
listener {
timeout = 151 # 5min
on-timeout = loginctl lock-session # lock screen when timeout has passed
}
listener {
timeout = 330 # 5.5min
on-timeout = brightnessctl -sd '*::kbd_backlight' set 0 # save state and turn off keyboard backlight
on-resume = brightnessctl -rd '*::kbd_backlight' # restore keyboard backlight
}
listener {
timeout = 330 # 5.5min
on-timeout = hyprctl dispatch dpms off # screen off when timeout has passed
on-resume = hyprctl dispatch dpms on && brightnessctl -r # screen on when activity is detected
}
'';
}; };
} }

View File

@@ -41,7 +41,10 @@ let
mkdir -p $out/bin mkdir -p $out/bin
find . -type f -exec cp {} $out/bin/ \; find . -type f -exec cp {} $out/bin/ \;
chmod +x $out/bin/* chmod +x $out/bin/*
patchShebangs $out/bin
'';
postFixup = ''
# Wrap every script to ensure dependencies are in PATH and inject configuration # Wrap every script to ensure dependencies are in PATH and inject configuration
for file in $out/bin/*; do for file in $out/bin/*; do
if [ -f "$file" ]; then if [ -f "$file" ]; then

22
modules/home/security.nix Normal file
View File

@@ -0,0 +1,22 @@
{ pkgs, ... }:
{
systemd.user.services.polkit-gnome-authentication-agent-1 = {
Unit = {
Description = "Polkit GNOME Authentication Agent";
After = [ "graphical-session.target" ];
PartOf = [ "graphical-session.target" ];
};
Service = {
ExecStart = "${pkgs.polkit_gnome}/libexec/polkit-gnome-authentication-agent-1";
Restart = "on-failure";
RestartSec = 1;
TimeoutStopSec = 10;
};
Install = {
WantedBy = [ "graphical-session.target" ];
};
};
}

View File

@@ -22,83 +22,6 @@ let
in in
{ {
config = { config = {
home.activation.migrateNomarchyState = lib.hm.dag.entryAfter ["writeBoundary"] ''
OLD_TOGGLES_DIR="${config.home.homeDirectory}/.local/state/nomarchy/toggles"
IDLE_STATE_FILE="${stateDir}/idle-state.json"
NIGHTLIGHT_STATE_FILE="${stateDir}/hyprsunset-state.json"
HYPRLAND_STATE_FILE="${stateDir}/hyprland-state.json"
THEME_STATE_FILE="${stateDir}/theme-state.nix"
WALLPAPER_STATE_FILE="${stateDir}/wallpaper-state.nix"
FONT_STATE_FILE="${stateDir}/font-state.nix"
NEW_STATE_FILE="${stateDir}/state.json"
JQ="${pkgs.jq}/bin/jq"
mkdir -p "$(dirname "$NEW_STATE_FILE")"
[[ ! -f $NEW_STATE_FILE ]] && echo "{}" > "$NEW_STATE_FILE"
# 1. Migrate .local/state/nomarchy/toggles (empty 'off' flag files)
if [[ -d $OLD_TOGGLES_DIR ]]; then
for file in "$OLD_TOGGLES_DIR"/*; do
[[ -e "$file" ]] || continue
filename=$(basename "$file")
case "$filename" in
suspend-off)
$JQ '.suspend = false' "$NEW_STATE_FILE" > "$NEW_STATE_FILE.tmp" && mv "$NEW_STATE_FILE.tmp" "$NEW_STATE_FILE"
;;
screensaver-off)
$JQ '.screensaver = false' "$NEW_STATE_FILE" > "$NEW_STATE_FILE.tmp" && mv "$NEW_STATE_FILE.tmp" "$NEW_STATE_FILE"
;;
skip-vscode-theme-changes)
$JQ '.skipVsCodeTheme = true' "$NEW_STATE_FILE" > "$NEW_STATE_FILE.tmp" && mv "$NEW_STATE_FILE.tmp" "$NEW_STATE_FILE"
;;
esac
rm "$file"
done
rmdir "$OLD_TOGGLES_DIR" 2>/dev/null || true
fi
# 2. Migrate existing JSON state files
if [[ -f $IDLE_STATE_FILE ]]; then
ENABLED=$($JQ '.enabled' "$IDLE_STATE_FILE")
$JQ ".idle = $ENABLED" "$NEW_STATE_FILE" > "$NEW_STATE_FILE.tmp" && mv "$NEW_STATE_FILE.tmp" "$NEW_STATE_FILE"
rm "$IDLE_STATE_FILE"
fi
if [[ -f $NIGHTLIGHT_STATE_FILE ]]; then
ENABLED=$($JQ '.enabled' "$NIGHTLIGHT_STATE_FILE")
TEMP=$($JQ '.temperature' "$NIGHTLIGHT_STATE_FILE")
$JQ ".nightlight = $ENABLED | .nightlightTemperature = $TEMP" "$NEW_STATE_FILE" > "$NEW_STATE_FILE.tmp" && mv "$NEW_STATE_FILE.tmp" "$NEW_STATE_FILE"
rm "$NIGHTLIGHT_STATE_FILE"
fi
if [[ -f $HYPRLAND_STATE_FILE ]]; then
GAPS_OUT=$($JQ '.gaps_out' "$HYPRLAND_STATE_FILE")
GAPS_IN=$($JQ '.gaps_in' "$HYPRLAND_STATE_FILE")
BORDER_SIZE=$($JQ '.border_size' "$HYPRLAND_STATE_FILE")
$JQ ".hyprland = {\"gaps_out\": $GAPS_OUT, \"gaps_in\": $GAPS_IN, \"border_size\": $BORDER_SIZE}" "$NEW_STATE_FILE" > "$NEW_STATE_FILE.tmp" && mv "$NEW_STATE_FILE.tmp" "$NEW_STATE_FILE"
rm "$HYPRLAND_STATE_FILE"
fi
# 3. Migrate plaintext string state files
if [[ -f $THEME_STATE_FILE ]]; then
THEME=$(cat "$THEME_STATE_FILE" | tr -d '\n')
$JQ ".theme = \"$THEME\"" "$NEW_STATE_FILE" > "$NEW_STATE_FILE.tmp" && mv "$NEW_STATE_FILE.tmp" "$NEW_STATE_FILE"
rm "$THEME_STATE_FILE"
fi
if [[ -f $WALLPAPER_STATE_FILE ]]; then
WALLPAPER=$(cat "$WALLPAPER_STATE_FILE" | tr -d '\n')
$JQ ".wallpaper = \"$WALLPAPER\"" "$NEW_STATE_FILE" > "$NEW_STATE_FILE.tmp" && mv "$NEW_STATE_FILE.tmp" "$NEW_STATE_FILE"
rm "$WALLPAPER_STATE_FILE"
fi
if [[ -f $FONT_STATE_FILE ]]; then
FONT=$(cat "$FONT_STATE_FILE" | tr -d '\n')
$JQ ".font = \"$FONT\"" "$NEW_STATE_FILE" > "$NEW_STATE_FILE.tmp" && mv "$NEW_STATE_FILE.tmp" "$NEW_STATE_FILE"
rm "$FONT_STATE_FILE"
fi
'';
nomarchy = { nomarchy = {
toggles = { toggles = {
suspend = togglesState.suspend or true; suspend = togglesState.suspend or true;

View File

@@ -6,8 +6,9 @@ let
activeThemeName = config.nomarchy.theme; activeThemeName = config.nomarchy.theme;
activeWallpaper = if config.nomarchy.wallpaper != "" then activeWallpaper = if config.nomarchy.wallpaper != "" then
# Use the absolute path from the state file (string format to avoid Nix Store copy)
config.nomarchy.wallpaper config.nomarchy.wallpaper
else "${../../assets/themes/catppuccin/backgrounds/1-totoro.png}"; # Fallback else ../../assets/themes/catppuccin/backgrounds/1-totoro.png; # Fallback path object (copied to store)
# Map nix-colors palette to a format Stylix expects (attrset of hex strings) # Map nix-colors palette to a format Stylix expects (attrset of hex strings)
currentPalette = (palettes.${activeThemeName} or palettes.nord).palette; currentPalette = (palettes.${activeThemeName} or palettes.nord).palette;

View File

@@ -1,5 +1,41 @@
{ config, pkgs, ... }: { config, pkgs, ... }:
{ {
services.swayosd.enable = true; services.swayosd = {
enable = true;
stylePath = "${config.home.homeDirectory}/.config/swayosd/style.css";
};
xdg.configFile."swayosd/style.css".text = ''
@define-color background-color #${config.colorScheme.palette.base00};
@define-color border-color #${config.colorScheme.palette.base0E};
@define-color label #${config.colorScheme.palette.base05};
@define-color image #${config.colorScheme.palette.base05};
@define-color progress #${config.colorScheme.palette.base0B};
window {
border-radius: 0;
opacity: 0.97;
border: 2px solid @border-color;
background-color: @background-color;
}
label {
font-family: '${config.nomarchy.fonts.monospace}';
font-size: 11pt;
color: @label;
}
image {
color: @image;
}
progressbar {
border-radius: 0;
}
progress {
background-color: @progress;
}
'';
} }

View File

@@ -1,4 +1,4 @@
{ config, ... }: { config, lib, ... }:
{ {
xdg.configFile."nomarchy/current/theme" = { xdg.configFile."nomarchy/current/theme" = {
@@ -16,7 +16,20 @@
xdg.configFile."nomarchy/branding/icon.txt".source = ../../assets/branding/icon.txt; xdg.configFile."nomarchy/branding/icon.txt".source = ../../assets/branding/icon.txt;
# Expose all themes to the system via local share for script accessibility # Expose all themes to the system via local share for script accessibility
xdg.dataFile."nomarchy/themes".source = ../../assets/themes; # We filter out images to prevent Nix Store bloat
xdg.dataFile."nomarchy/themes".source = builtins.path {
name = "nomarchy-themes-no-images";
path = ../../assets/themes;
filter = path: type:
let
baseName = baseNameOf path;
in
! (type == "regular" && (
lib.hasSuffix ".jpg" baseName ||
lib.hasSuffix ".png" baseName ||
lib.hasSuffix ".jpeg" baseName
));
};
# Nautilus python extensions # Nautilus python extensions
xdg.dataFile."nautilus-python/extensions/localsend.py".source = ../../assets/nautilus-python/extensions/localsend.py; xdg.dataFile."nautilus-python/extensions/localsend.py".source = ../../assets/nautilus-python/extensions/localsend.py;

View File

@@ -13,7 +13,7 @@ let
fi fi
''; '';
nomarchy-font-selector = pkgs.writeShellScriptBin "nomarchy-font-selector" '' nomarchy-font-selector = pkgs.writeShellScriptBin "nomarchy-font-selector" ''
STATE_DIR="$HOME/.config/home-manager" STATE_DIR="${config.home.homeDirectory}/.config/home-manager"
STATE_FILE="$STATE_DIR/state.json" STATE_FILE="$STATE_DIR/state.json"
mkdir -p "$STATE_DIR" mkdir -p "$STATE_DIR"
@@ -30,18 +30,23 @@ let
fi fi
''; '';
nomarchy-wallpaper-selector = pkgs.writeShellScriptBin "nomarchy-wallpaper-selector" '' nomarchy-wallpaper-selector = pkgs.writeShellScriptBin "nomarchy-wallpaper-selector" ''
STATE_DIR="$HOME/.config/home-manager" STATE_DIR="${config.home.homeDirectory}/.config/home-manager"
STATE_FILE="$STATE_DIR/state.json" STATE_FILE="$STATE_DIR/state.json"
THEMES_DIR="$HOME/.local/share/nomarchy/themes" THEMES_DIR="${config.xdg.dataHome}/nomarchy/themes"
mkdir -p "$STATE_DIR" mkdir -p "$STATE_DIR"
[[ ! -f $STATE_FILE ]] && echo "{}" > "$STATE_FILE" [[ ! -f $STATE_FILE ]] && echo "{}" > "$STATE_FILE"
# List all images in all themes backgrounds # List all images in all themes backgrounds
WALLPAPERS=$(find "$THEMES_DIR" -type f \( -name "*.jpg" -o -name "*.png" \)) # We search in the system-wide flake source for distro wallpapers to avoid Nix Store bloat
WALLPAPERS=$(find "${config.xdg.dataHome}/nomarchy/themes" -type f \( -name "*.jpg" -o -name "*.png" \) 2>/dev/null)
DISTRO_THEMES="/etc/nixos/nomarchy/assets/themes"
if [ -d "$DISTRO_THEMES" ]; then
WALLPAPERS="$WALLPAPERS\n$(find "$DISTRO_THEMES" -type f \( -name "*.jpg" -o -name "*.png" \))"
fi
# Include user themes if they exist # Include user themes if they exist
if [ -d "$HOME/.config/nomarchy/themes" ]; then if [ -d "${config.home.homeDirectory}/.config/nomarchy/themes" ]; then
WALLPAPERS="$WALLPAPERS\n$(find "$HOME/.config/nomarchy/themes" -type f \( -name "*.jpg" -o -name "*.png" \))" WALLPAPERS="$WALLPAPERS\n$(find "${config.home.homeDirectory}/.config/nomarchy/themes" -type f \( -name "*.jpg" -o -name "*.png" \))"
fi fi
SELECTED_WP=$(echo -e "$WALLPAPERS" | walker --dmenu) SELECTED_WP=$(echo -e "$WALLPAPERS" | walker --dmenu)

View File

@@ -1,12 +1,15 @@
{ config, pkgs, ... }: { config, pkgs, ... }:
let
themeConfig = builtins.fromJSON (builtins.readFile (../../assets/themes + "/${config.nomarchy.theme}/vscode.json"));
in
{ {
programs.vscode = { programs.vscode = {
enable = true; enable = true;
package = pkgs.vscode; package = pkgs.vscode;
userSettings = { userSettings = {
"update.mode" = "none"; "update.mode" = "none";
"workbench.colorTheme" = "Nomarchy Theme"; # Example, would need to be generated "workbench.colorTheme" = themeConfig.name;
"window.titleBarStyle" = "custom"; "window.titleBarStyle" = "custom";
}; };
# extensions = with pkgs.vscode-extensions; [ ... ]; # extensions = with pkgs.vscode-extensions; [ ... ];

View File

@@ -11,6 +11,32 @@
top = true; top = true;
}; };
}; };
selection_wrap = true;
hide_action_hints = true;
placeholders = {
"default" = { input = " Search..."; list = "No Results"; };
};
keybinds = {
quick_activate = [];
};
columns = {
symbols = 1;
};
providers = {
max_results = 256;
default = [
"desktopapplications"
"websearch"
];
prefixes = [
{ prefix = "/"; provider = "providerlist"; }
{ prefix = "."; provider = "files"; }
{ prefix = ":"; provider = "symbols"; }
{ prefix = "="; provider = "calc"; }
{ prefix = "@"; provider = "websearch"; }
{ prefix = "$"; provider = "clipboard"; }
];
};
}; };
themes."nomarchy" = { themes."nomarchy" = {
style = '' style = ''

View File

@@ -39,44 +39,6 @@
#tray { margin-right: 16px; } #tray { margin-right: 16px; }
#bluetooth { margin-right: 17px; } #bluetooth { margin-right: 17px; }
''; '';
settings = [{ settings = [ (builtins.fromJSON (builtins.readFile ../../config/waybar/config.jsonc)) ];
layer = "top";
position = "top";
height = 26;
spacing = 0;
modules-left = [ "custom/nomarchy" "hyprland/workspaces" ];
modules-center = [ "clock" "custom/update" "custom/voxtype" "custom/screenrecording-indicator" "custom/idle-indicator" "custom/notification-silencing-indicator" ];
modules-right = [ "group/tray-expander" "bluetooth" "network" "pulseaudio" "cpu" "battery" ];
"custom/nomarchy" = {
format = "<span font='nomarchy'>\ue900</span>";
on-click = "nomarchy-menu";
on-click-right = "xdg-terminal-exec";
tooltip-format = "Nomarchy Menu\n\nSuper + Alt + Space";
};
"hyprland/workspaces" = {
on-click = "activate";
format = "{icon}";
format-icons = {
default = "";
active = "󱓻";
};
};
"clock" = {
format = "{:%H:%M}";
};
"battery" = {
format = "{icon} {capacity}%";
format-icons = ["" "" "" "" ""];
};
"pulseaudio" = {
format = "{icon} {volume}%";
format-icons = ["" "" ""];
};
"network" = {
format-wifi = " {essid}";
format-ethernet = "󰈀 {ipaddr}";
format-disconnected = " Disconnected";
};
}];
}; };
} }

View File

@@ -16,5 +16,5 @@
./makima.nix ./makima.nix
]; ];
time.timeZone = config.nomarchy.system.timezone; time.timeZone = lib.mkDefault config.nomarchy.system.timezone;
} }

View File

@@ -47,10 +47,10 @@ in
"/var/log" "/var/log"
"/var/lib/nixos" "/var/lib/nixos"
"/var/lib/systemd/coredump" "/var/lib/systemd/coredump"
"/var/lib/systemd/timesync" "/var/lib/NetworkManager"
"/etc/NetworkManager/system-connections"
"/var/lib/bluetooth" "/var/lib/bluetooth"
"/var/lib/fprint" "/var/lib/fprint"
"/etc/NetworkManager/system-connections"
"/etc/nixos" "/etc/nixos"
"/etc/ssh" "/etc/ssh"
]; ];
@@ -58,6 +58,18 @@ in
"/etc/machine-id" "/etc/machine-id"
"/etc/supergfxd.conf" "/etc/supergfxd.conf"
]; ];
users.nomarchy = {
directories = [
".ssh"
".gnupg"
".local/share/keyrings"
"Documents"
"Downloads"
"Pictures"
"Videos"
"Projects"
];
};
}; };
}; };
} }

View File

@@ -9,6 +9,11 @@ let
mkdir -p $out/share/sddm/themes/nomarchy mkdir -p $out/share/sddm/themes/nomarchy
cp -r * $out/share/sddm/themes/nomarchy/ cp -r * $out/share/sddm/themes/nomarchy/
''; '';
propagatedBuildInputs = with pkgs.libsForQt5.qt5; [
qtgraphicaleffects
qtquickcontrols2
qtsvg
];
}; };
in in
{ {

View File

@@ -0,0 +1,17 @@
{ lib, ... }:
{
# Shared VM configuration
virtualisation.vmVariant = {
virtualisation.graphics = true;
virtualisation.qemu.options = [ "-device virtio-vga" ];
};
# Dummy hardware config for VM
fileSystems."/" = { device = "/dev/disk/by-label/nixos"; };
boot.loader.grub.device = "/dev/vda";
boot.initrd.availableKernelModules = [ "virtio_pci" "virtio_blk" "virtio_gpu" "virtio_net" "virtio_mmio" ];
# Force early KMS for Plymouth
boot.initrd.kernelModules = [ "virtio_gpu" ];
}