diff --git a/README.md b/README.md index 5bf40ad..3c45fa6 100644 --- a/README.md +++ b/README.md @@ -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) ``` --- diff --git a/assets/plymouth/nomarchy.script b/assets/plymouth/nomarchy.script index df0c298..678bd50 100644 --- a/assets/plymouth/nomarchy.script +++ b/assets/plymouth/nomarchy.script @@ -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(); + } diff --git a/assets/themed/walker.css.tpl b/assets/themed/walker.css.tpl deleted file mode 100644 index 123ca92..0000000 --- a/assets/themed/walker.css.tpl +++ /dev/null @@ -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 }}; diff --git a/assets/themed/waybar.css.tpl b/assets/themed/waybar.css.tpl deleted file mode 100644 index d876a92..0000000 --- a/assets/themed/waybar.css.tpl +++ /dev/null @@ -1,2 +0,0 @@ -@define-color foreground {{ foreground }}; -@define-color background {{ background }}; diff --git a/config/nomarchy/default/hypr/looknfeel.conf b/config/nomarchy/default/hypr/looknfeel.conf index b73c954..24e0443 100644 --- a/config/nomarchy/default/hypr/looknfeel.conf +++ b/config/nomarchy/default/hypr/looknfeel.conf @@ -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 diff --git a/config/nomarchy/default/hypr/windows.conf b/config/nomarchy/default/hypr/windows.conf index 0d6441d..3af8b76 100644 --- a/config/nomarchy/default/hypr/windows.conf +++ b/config/nomarchy/default/hypr/windows.conf @@ -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:.* diff --git a/config/nomarchy/default/walker/themes/nomarchy-default/style.css b/config/nomarchy/default/walker/themes/nomarchy-default/style.css index d47de70..1eed746 100644 --- a/config/nomarchy/default/walker/themes/nomarchy-default/style.css +++ b/config/nomarchy/default/walker/themes/nomarchy-default/style.css @@ -72,6 +72,7 @@ child:hover .item-box { } child:selected .item-box { + background-color: @selected-background; } child:selected .item-box * { diff --git a/config/walker/config.toml b/config/walker/config.toml deleted file mode 100644 index 6c39101..0000000 --- a/config/walker/config.toml +++ /dev/null @@ -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" diff --git a/flake.nix b/flake.nix index c444d55..c298923 100644 --- a/flake.nix +++ b/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"; diff --git a/hosts/live-iso.nix b/hosts/live-iso.nix index 54b2bb5..4ffad70 100644 --- a/hosts/live-iso.nix +++ b/hosts/live-iso.nix @@ -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"; diff --git a/installer/install-nomarchy.sh b/installer/install-nomarchy.sh index 8c7d8a6..33768b7 100644 --- a/installer/install-nomarchy.sh +++ b/installer/install-nomarchy.sh @@ -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 < /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 < /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\"; diff --git a/modules/system/default.nix b/modules/system/default.nix index 7ccbc6c..00625fe 100644 --- a/modules/system/default.nix +++ b/modules/system/default.nix @@ -16,5 +16,5 @@ ./makima.nix ]; - time.timeZone = config.nomarchy.system.timezone; + time.timeZone = lib.mkDefault config.nomarchy.system.timezone; }