Compare commits
12 Commits
0194569a42
...
eebec40ea0
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
eebec40ea0 | ||
|
|
0ce8602384 | ||
|
|
8b4e9ef6c8 | ||
|
|
a31023c037 | ||
|
|
5c45b10d88 | ||
|
|
f5f515c2f7 | ||
|
|
358b129f0f | ||
|
|
0065334164 | ||
|
|
45ca66119a | ||
|
|
db8b009638 | ||
|
|
3e1b1efa6f | ||
|
|
db6bdd8495 |
@@ -67,10 +67,11 @@ nomarchy.home.terminal = "kitty";
|
||||
```
|
||||
|
||||
### 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
|
||||
sys-update # Rebuilds the NixOS system
|
||||
env-update # Reloads your Home Manager environment
|
||||
sys-update # Rebuilds the NixOS system (Runs: sudo nixos-rebuild switch --flake .#default --impure)
|
||||
env-update # Reloads your Home Manager environment (Runs: home-manager switch --flake .#default --impure)
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
@@ -4,6 +4,13 @@ Window.SetBackgroundTopColor(0.101, 0.105, 0.149);
|
||||
Window.SetBackgroundBottomColor(0.101, 0.105, 0.149);
|
||||
|
||||
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.SetX (Window.GetWidth() / 2 - logo.image.GetWidth() / 2);
|
||||
logo.sprite.SetY (Window.GetHeight() / 2 - logo.image.GetHeight() / 2);
|
||||
@@ -148,7 +155,7 @@ fun display_normal_callback ()
|
||||
mode = Plymouth.GetMode();
|
||||
|
||||
# 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();
|
||||
start_fake_progress();
|
||||
@@ -255,3 +262,10 @@ fun hide_message_callback (text)
|
||||
|
||||
Plymouth.SetDisplayMessageFunction (display_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();
|
||||
}
|
||||
|
||||
@@ -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 }};
|
||||
@@ -1,2 +0,0 @@
|
||||
@define-color foreground {{ foreground }};
|
||||
@define-color background {{ background }};
|
||||
@@ -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() {
|
||||
local editor_cmd="$1"
|
||||
local settings_path="$2"
|
||||
mkdir -p "$STATE_DIR"
|
||||
[[ ! -f $STATE_FILE ]] && echo "{}" > "$STATE_FILE"
|
||||
|
||||
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
|
||||
theme_name=$(jq -r '.name' "$VS_CODE_THEME")
|
||||
extension=$(jq -r '.extension' "$VS_CODE_THEME")
|
||||
|
||||
if [[ -n $extension ]] && ! "$editor_cmd" --list-extensions | grep -Fxq "$extension"; then
|
||||
"$editor_cmd" --install-extension "$extension" >/dev/null
|
||||
if [[ $NOMARCHY_TOGGLE_SKIP_VSCODE_THEME != "true" ]]; then
|
||||
# We trigger env-update to apply the new VSCode theme declaratively.
|
||||
env-update
|
||||
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"
|
||||
|
||||
83
bin/system/nomarchy-preflight-migration
Normal file
83
bin/system/nomarchy-preflight-migration
Normal 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
|
||||
@@ -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
|
||||
}
|
||||
@@ -4,7 +4,6 @@ exec-once = uwsm-app -- waybar
|
||||
exec-once = uwsm-app -- fcitx5 --disable notificationitem
|
||||
exec-once = uwsm-app -- swaybg -i ~/.config/nomarchy/current/background -m fill
|
||||
exec-once = uwsm-app -- swayosd-server
|
||||
exec-once = /usr/lib/polkit-gnome/polkit-gnome-authentication-agent-1
|
||||
exec-once = nomarchy-cmd-first-run
|
||||
|
||||
# Slow app launch fix -- set systemd vars
|
||||
|
||||
@@ -124,8 +124,6 @@ misc {
|
||||
disable_splash_rendering = true
|
||||
disable_scale_notification = true
|
||||
focus_on_activate = true
|
||||
anr_missed_pings = 3
|
||||
on_focus_under_fullscreen = 1
|
||||
}
|
||||
|
||||
# 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_UNSELECTED_FOREGROUND,7 # White
|
||||
env = GUM_CONFIRM_UNSELECTED_BACKGROUND,8 # Dark grey
|
||||
# Dark grey
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
# See https://wiki.hyprland.org/Configuring/Window-Rules/ for more
|
||||
# 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)
|
||||
windowrulev2 = tag +default-opacity, class:.*
|
||||
|
||||
@@ -72,6 +72,7 @@ child:hover .item-box {
|
||||
}
|
||||
|
||||
child:selected .item-box {
|
||||
background-color: @selected-background;
|
||||
}
|
||||
|
||||
child:selected .item-box * {
|
||||
|
||||
@@ -1,4 +0,0 @@
|
||||
[server]
|
||||
show_percentage = true
|
||||
max_volume = 100
|
||||
style = "~/.config/swayosd/style.css"
|
||||
@@ -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;
|
||||
}
|
||||
@@ -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
|
||||
@@ -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
|
||||
@@ -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"
|
||||
@@ -40,7 +40,7 @@
|
||||
}
|
||||
},
|
||||
"custom/nomarchy": {
|
||||
"format": "<span font='nomarchy'>\ue900</span>",
|
||||
"format": "<span font='nomarchy'>a</span>",
|
||||
"on-click": "nomarchy-menu",
|
||||
"on-click-right": "xdg-terminal-exec",
|
||||
"tooltip-format": "Nomarchy Menu\n\nSuper + Alt + Space"
|
||||
@@ -150,7 +150,7 @@
|
||||
},
|
||||
"custom/notification-silencing-indicator": {
|
||||
"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,
|
||||
"return-type": "json"
|
||||
},
|
||||
|
||||
44
flake.nix
44
flake.nix
@@ -3,7 +3,7 @@
|
||||
|
||||
inputs = {
|
||||
nixpkgs.url = "github:nixos/nixpkgs/nixos-25.11";
|
||||
nixos-hardware.url = "github:NixOS/nixos-hardware/master";
|
||||
nixos-hardware.url = "github:NixOS/nixos-hardware";
|
||||
|
||||
disko = {
|
||||
url = "github:nix-community/disko";
|
||||
@@ -64,7 +64,8 @@
|
||||
modules = [
|
||||
{ nixpkgs.hostPlatform = "x86_64-linux"; }
|
||||
./hosts/live-iso.nix
|
||||
./modules/system
|
||||
./modules/system/default.nix
|
||||
./modules/system/vm-guest.nix
|
||||
home-manager.nixosModules.home-manager
|
||||
{
|
||||
system.stateVersion = "25.11";
|
||||
@@ -74,29 +75,18 @@
|
||||
services.displayManager.autoLogin.enable = true;
|
||||
services.displayManager.autoLogin.user = "nixos";
|
||||
|
||||
virtualisation.vmVariant.virtualisation.memorySize = 2048;
|
||||
virtualisation.vmVariant.virtualisation.cores = 2;
|
||||
|
||||
home-manager.useGlobalPkgs = false;
|
||||
home-manager.useUserPackages = true;
|
||||
home-manager.users.nixos = {
|
||||
imports = [ ./modules/home ];
|
||||
imports = [ ./modules/home/default.nix ];
|
||||
home.username = "nixos";
|
||||
home.homeDirectory = "/home/nixos";
|
||||
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
|
||||
users.users.nixos = {
|
||||
isNormalUser = true;
|
||||
@@ -111,26 +101,16 @@
|
||||
specialArgs = { inherit inputs; };
|
||||
modules = [
|
||||
{ nixpkgs.hostPlatform = "x86_64-linux"; }
|
||||
./modules/system
|
||||
./modules/system/hardware.nix
|
||||
./modules/system/default.nix
|
||||
./modules/system/vm-guest.nix
|
||||
home-manager.nixosModules.home-manager
|
||||
{
|
||||
system.stateVersion = "25.11";
|
||||
networking.hostName = "nomarchy";
|
||||
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
|
||||
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" ];
|
||||
virtualisation.vmVariant.virtualisation.memorySize = 4096;
|
||||
virtualisation.vmVariant.virtualisation.cores = 2;
|
||||
|
||||
# Setup default user for testing
|
||||
users.users.nomarchy = {
|
||||
@@ -145,7 +125,7 @@
|
||||
home-manager.useGlobalPkgs = false;
|
||||
home-manager.useUserPackages = true;
|
||||
home-manager.users.nomarchy = {
|
||||
imports = [ ./modules/home ];
|
||||
imports = [ ./modules/home/default.nix ];
|
||||
home.username = "nomarchy";
|
||||
home.homeDirectory = "/home/nomarchy";
|
||||
home.stateVersion = "25.11";
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
{ config, pkgs, inputs, ... }:
|
||||
{ config, pkgs, inputs, lib, ... }:
|
||||
|
||||
{
|
||||
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" = {
|
||||
source = ../installer/install-nomarchy.sh;
|
||||
mode = "0755";
|
||||
|
||||
@@ -124,6 +124,14 @@ section "User & Localization"
|
||||
USERNAME=$(gum input --placeholder "Enter target username (no spaces)")
|
||||
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:"
|
||||
TIMEZONES=$(timedatectl list-timezones || echo "UTC")
|
||||
TIMEZONE=$(echo "$TIMEZONES" | gum filter --placeholder "Type to search...")
|
||||
@@ -206,6 +214,15 @@ cat <<EOF > /mnt/etc/nixos/system.nix
|
||||
{ pkgs, ... }:
|
||||
{
|
||||
\$(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; [];
|
||||
}
|
||||
EOF
|
||||
@@ -246,6 +263,7 @@ cat <<EOF > /mnt/etc/nixos/flake.nix
|
||||
{
|
||||
home-manager.useGlobalPkgs = true;
|
||||
home-manager.useUserPackages = true;
|
||||
home-manager.extraSpecialArgs = { inherit inputs; };
|
||||
home-manager.users.$USERNAME = {
|
||||
imports = [ nomarchy.nixosModules.home ./home.nix ];
|
||||
home.username = \"$USERNAME\";
|
||||
|
||||
@@ -4,19 +4,12 @@
|
||||
programs.alacritty = {
|
||||
enable = true;
|
||||
settings = {
|
||||
general.import = [ "~/.config/nomarchy/current/theme/alacritty.toml" ];
|
||||
env = {
|
||||
TERM = "xterm-256color";
|
||||
};
|
||||
terminal = {
|
||||
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 = {
|
||||
padding = { x = 14; y = 14; };
|
||||
decorations = "None";
|
||||
|
||||
45
modules/home/bash.nix
Normal file
45
modules/home/bash.nix
Normal 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.
|
||||
}
|
||||
34
modules/home/battery-monitor.nix
Normal file
34
modules/home/battery-monitor.nix
Normal 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" ];
|
||||
};
|
||||
};
|
||||
}
|
||||
@@ -30,11 +30,14 @@ in
|
||||
./scripts.nix
|
||||
./configs.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
|
||||
xfce.thunar
|
||||
imv
|
||||
@@ -55,10 +58,7 @@ in
|
||||
nerd-fonts.roboto-mono
|
||||
nerd-fonts.fira-code
|
||||
nerd-fonts.ubuntu-mono
|
||||
] ++ userPackages;
|
||||
] ++ userPackages);
|
||||
|
||||
home.shellAliases = {
|
||||
sys-update = "sudo nixos-rebuild switch --flake /etc/nixos#default --impure";
|
||||
env-update = "home-manager switch --flake /etc/nixos#default --impure";
|
||||
};
|
||||
# Shell aliases are now managed in bash.nix
|
||||
}
|
||||
|
||||
@@ -24,20 +24,9 @@ in
|
||||
"col.active_border" = "rgb(${config.colorScheme.palette.base0E})";
|
||||
"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
|
||||
'';
|
||||
};
|
||||
}
|
||||
|
||||
@@ -3,5 +3,35 @@
|
||||
{
|
||||
services.hypridle = {
|
||||
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
|
||||
}
|
||||
'';
|
||||
};
|
||||
}
|
||||
|
||||
@@ -41,7 +41,10 @@ let
|
||||
mkdir -p $out/bin
|
||||
find . -type f -exec cp {} $out/bin/ \;
|
||||
chmod +x $out/bin/*
|
||||
patchShebangs $out/bin
|
||||
'';
|
||||
|
||||
postFixup = ''
|
||||
# Wrap every script to ensure dependencies are in PATH and inject configuration
|
||||
for file in $out/bin/*; do
|
||||
if [ -f "$file" ]; then
|
||||
|
||||
22
modules/home/security.nix
Normal file
22
modules/home/security.nix
Normal 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" ];
|
||||
};
|
||||
};
|
||||
}
|
||||
@@ -22,83 +22,6 @@ let
|
||||
in
|
||||
{
|
||||
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 = {
|
||||
toggles = {
|
||||
suspend = togglesState.suspend or true;
|
||||
|
||||
@@ -6,8 +6,9 @@ let
|
||||
|
||||
activeThemeName = config.nomarchy.theme;
|
||||
activeWallpaper = if config.nomarchy.wallpaper != "" then
|
||||
# Use the absolute path from the state file (string format to avoid Nix Store copy)
|
||||
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)
|
||||
currentPalette = (palettes.${activeThemeName} or palettes.nord).palette;
|
||||
|
||||
@@ -1,5 +1,41 @@
|
||||
{ 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;
|
||||
}
|
||||
'';
|
||||
}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
{ config, ... }:
|
||||
{ config, lib, ... }:
|
||||
|
||||
{
|
||||
xdg.configFile."nomarchy/current/theme" = {
|
||||
@@ -16,7 +16,20 @@
|
||||
xdg.configFile."nomarchy/branding/icon.txt".source = ../../assets/branding/icon.txt;
|
||||
|
||||
# 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
|
||||
xdg.dataFile."nautilus-python/extensions/localsend.py".source = ../../assets/nautilus-python/extensions/localsend.py;
|
||||
|
||||
@@ -13,7 +13,7 @@ let
|
||||
fi
|
||||
'';
|
||||
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"
|
||||
|
||||
mkdir -p "$STATE_DIR"
|
||||
@@ -30,18 +30,23 @@ let
|
||||
fi
|
||||
'';
|
||||
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"
|
||||
THEMES_DIR="$HOME/.local/share/nomarchy/themes"
|
||||
THEMES_DIR="${config.xdg.dataHome}/nomarchy/themes"
|
||||
|
||||
mkdir -p "$STATE_DIR"
|
||||
[[ ! -f $STATE_FILE ]] && echo "{}" > "$STATE_FILE"
|
||||
|
||||
# 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
|
||||
if [ -d "$HOME/.config/nomarchy/themes" ]; then
|
||||
WALLPAPERS="$WALLPAPERS\n$(find "$HOME/.config/nomarchy/themes" -type f \( -name "*.jpg" -o -name "*.png" \))"
|
||||
if [ -d "${config.home.homeDirectory}/.config/nomarchy/themes" ]; then
|
||||
WALLPAPERS="$WALLPAPERS\n$(find "${config.home.homeDirectory}/.config/nomarchy/themes" -type f \( -name "*.jpg" -o -name "*.png" \))"
|
||||
fi
|
||||
SELECTED_WP=$(echo -e "$WALLPAPERS" | walker --dmenu)
|
||||
|
||||
|
||||
@@ -1,12 +1,15 @@
|
||||
{ config, pkgs, ... }:
|
||||
|
||||
let
|
||||
themeConfig = builtins.fromJSON (builtins.readFile (../../assets/themes + "/${config.nomarchy.theme}/vscode.json"));
|
||||
in
|
||||
{
|
||||
programs.vscode = {
|
||||
enable = true;
|
||||
package = pkgs.vscode;
|
||||
userSettings = {
|
||||
"update.mode" = "none";
|
||||
"workbench.colorTheme" = "Nomarchy Theme"; # Example, would need to be generated
|
||||
"workbench.colorTheme" = themeConfig.name;
|
||||
"window.titleBarStyle" = "custom";
|
||||
};
|
||||
# extensions = with pkgs.vscode-extensions; [ ... ];
|
||||
|
||||
@@ -11,6 +11,32 @@
|
||||
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" = {
|
||||
style = ''
|
||||
|
||||
@@ -39,44 +39,6 @@
|
||||
#tray { margin-right: 16px; }
|
||||
#bluetooth { margin-right: 17px; }
|
||||
'';
|
||||
settings = [{
|
||||
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";
|
||||
};
|
||||
}];
|
||||
settings = [ (builtins.fromJSON (builtins.readFile ../../config/waybar/config.jsonc)) ];
|
||||
};
|
||||
}
|
||||
|
||||
@@ -16,5 +16,5 @@
|
||||
./makima.nix
|
||||
];
|
||||
|
||||
time.timeZone = config.nomarchy.system.timezone;
|
||||
time.timeZone = lib.mkDefault config.nomarchy.system.timezone;
|
||||
}
|
||||
|
||||
@@ -47,10 +47,10 @@ in
|
||||
"/var/log"
|
||||
"/var/lib/nixos"
|
||||
"/var/lib/systemd/coredump"
|
||||
"/var/lib/systemd/timesync"
|
||||
"/var/lib/NetworkManager"
|
||||
"/etc/NetworkManager/system-connections"
|
||||
"/var/lib/bluetooth"
|
||||
"/var/lib/fprint"
|
||||
"/etc/NetworkManager/system-connections"
|
||||
"/etc/nixos"
|
||||
"/etc/ssh"
|
||||
];
|
||||
@@ -58,6 +58,18 @@ in
|
||||
"/etc/machine-id"
|
||||
"/etc/supergfxd.conf"
|
||||
];
|
||||
users.nomarchy = {
|
||||
directories = [
|
||||
".ssh"
|
||||
".gnupg"
|
||||
".local/share/keyrings"
|
||||
"Documents"
|
||||
"Downloads"
|
||||
"Pictures"
|
||||
"Videos"
|
||||
"Projects"
|
||||
];
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
|
||||
@@ -9,6 +9,11 @@ let
|
||||
mkdir -p $out/share/sddm/themes/nomarchy
|
||||
cp -r * $out/share/sddm/themes/nomarchy/
|
||||
'';
|
||||
propagatedBuildInputs = with pkgs.libsForQt5.qt5; [
|
||||
qtgraphicaleffects
|
||||
qtquickcontrols2
|
||||
qtsvg
|
||||
];
|
||||
};
|
||||
in
|
||||
{
|
||||
|
||||
17
modules/system/vm-guest.nix
Normal file
17
modules/system/vm-guest.nix
Normal 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" ];
|
||||
}
|
||||
Reference in New Issue
Block a user