From 6869c2acbd60b5c74f36a186f0fa931539c46cff Mon Sep 17 00:00:00 2001 From: LunarAkai Date: Sun, 16 Mar 2025 09:21:45 +0100 Subject: [PATCH] mainly alacritty stuff --- flake.nix | 2 +- .../categories/desktop/common/alacritty.nix | 113 ++++++++++++++++++ .../categories/desktop/common/default.nix | 1 + hosts/common/optional/ckb-next.nix | 5 + hosts/common/optional/flatpak.nix | 4 + hosts/common/optional/gnome.nix | 6 + hosts/hummingbird/configuration.nix | 7 +- hosts/spider/configuration.nix | 6 +- 8 files changed, 134 insertions(+), 10 deletions(-) create mode 100644 home-manager/luna/categories/desktop/common/alacritty.nix create mode 100644 hosts/common/optional/ckb-next.nix create mode 100644 hosts/common/optional/flatpak.nix diff --git a/flake.nix b/flake.nix index 6272b70..add84fb 100644 --- a/flake.nix +++ b/flake.nix @@ -57,7 +57,7 @@ }; # smol Thinkpad Yoga - # Alternative Name: Uru + # Alternative Name: Uru spider = lib.nixosSystem { specialArgs = {inherit inputs outputs;}; modules = [ diff --git a/home-manager/luna/categories/desktop/common/alacritty.nix b/home-manager/luna/categories/desktop/common/alacritty.nix new file mode 100644 index 0000000..5bb10b5 --- /dev/null +++ b/home-manager/luna/categories/desktop/common/alacritty.nix @@ -0,0 +1,113 @@ +{ + xdg.mimeApps = { + associations.added = { + "x-scheme-handler/terminal" = "Alacritty.desktop"; + }; + defaultApplications = { + "x-scheme-handler/terminal" = "Alacritty.desktop"; + }; + }; + + programs = { + alacritty = { + enable = true; + settings = { + env = {TERM = "xterm-256color";}; + font = { + size = 11; + }; + scrolling = { + history = 100000; + multiplier = 3; + }; + keyboard.bindings = [ + { + key = "Return"; + mods = "Control|Shift"; + action = "SpawnNewInstance"; + } + { + key = "Q"; + mods = "Control|Shift"; + action = "ToggleViMode"; + } + ]; + colors = { + #catppuccin + primary = { + background = "#1e1e2e"; + foreground = "#cdd6f4"; + dim_foreground = "#7f849c"; + bright_foreground = "#cdd6f4"; + }; + cursor = { + text = "#1e1e2e"; + cursor = "#f5e0dc"; + }; + vi_mode_cursor = { + text = "#1e1e2e"; + cursor = "#b4befe"; + }; + search = { + matches = { + foreground = "#1e1e2e"; + background = "#a6adc8"; + }; + focused_match = { + foreground = "#1e1e2e"; + background = "#a6e3a1"; + }; + }; + footer_bar = { + foreground = "#1e1e2e"; + background = "#a6adc8"; + }; + hints = { + start = { + foreground = "#1e1e2e"; + background = "#f9e2af"; + }; + end = { + foreground = "#1e1e2e"; + background = "#a6adc8"; + }; + }; + selection = { + text = "#1e1e2e"; + background = "#f5e0dc"; + }; + normal = { + black = "#45475a"; + red = "#f38ba8"; + green = "#a6e3a1"; + yellow = "#f9e2af"; + blue = "#89b4fa"; + magenta = "#f5c2e7"; + cyan = "#94e2d5"; + white = "#bac2de"; + }; + bright = { + black = "#585b70"; + red = "#f38ba8"; + green = "#a6e3a1"; + yellow = "#f9e2af"; + blue = "#89b4fa"; + magenta = "#f5c2e7"; + cyan = "#94e2d5"; + white = "#a6adc8"; + }; + dim = { + black = "#45475a"; + red = "#f38ba8"; + green = "#a6e3a1"; + yellow = "#f9e2af"; + blue = "#89b4fa"; + magenta = "#f5c2e7"; + cyan = "#94e2d5"; + white = "#bac2de"; + }; + }; + }; + }; + }; +} diff --git a/home-manager/luna/categories/desktop/common/default.nix b/home-manager/luna/categories/desktop/common/default.nix index 321b845..ac0faf9 100644 --- a/home-manager/luna/categories/desktop/common/default.nix +++ b/home-manager/luna/categories/desktop/common/default.nix @@ -1,5 +1,6 @@ {...}: { imports = [ + ./alacritty.nix ./fonts.nix ]; } diff --git a/hosts/common/optional/ckb-next.nix b/hosts/common/optional/ckb-next.nix new file mode 100644 index 0000000..30aba99 --- /dev/null +++ b/hosts/common/optional/ckb-next.nix @@ -0,0 +1,5 @@ +{ + hardware.ckb-next = { + enable = true; + }; +} diff --git a/hosts/common/optional/flatpak.nix b/hosts/common/optional/flatpak.nix new file mode 100644 index 0000000..b17a9a0 --- /dev/null +++ b/hosts/common/optional/flatpak.nix @@ -0,0 +1,4 @@ +{ + # flatpak + services.flatpak.enable = true; +} diff --git a/hosts/common/optional/gnome.nix b/hosts/common/optional/gnome.nix index 0e67e8a..5279305 100644 --- a/hosts/common/optional/gnome.nix +++ b/hosts/common/optional/gnome.nix @@ -12,4 +12,10 @@ }; }; }; + + # adds alacritty to nautilus + programs.nautilus-open-any-terminal = { + enable = true; + terminal = "alacritty"; + }; } diff --git a/hosts/hummingbird/configuration.nix b/hosts/hummingbird/configuration.nix index a082705..39bb0a2 100644 --- a/hosts/hummingbird/configuration.nix +++ b/hosts/hummingbird/configuration.nix @@ -15,6 +15,8 @@ # optional stuff ../common/optional/gnome.nix ../common/optional/pipewire.nix + ../common/optional/flatpak.nix + ../common/optional/ckb-next.nix # Include the results of the hardware scan. ./hardware-configuration.nix @@ -44,9 +46,6 @@ # Enable CUPS to print documents. services.printing.enable = true; - # flatpak - services.flatpak.enable = true; - # Allow unfree packages nixpkgs.config.allowUnfree = true; @@ -68,6 +67,4 @@ remotePlay.openFirewall = true; # Open ports in the firewall for Steam Remote Play dedicatedServer.openFirewall = true; # Open ports in the firewall for Source Dedicated Server }; - - hardware.ckb-next.enable = true; } diff --git a/hosts/spider/configuration.nix b/hosts/spider/configuration.nix index f801fbf..6f2dd9c 100644 --- a/hosts/spider/configuration.nix +++ b/hosts/spider/configuration.nix @@ -15,6 +15,7 @@ # optional stuff ../common/optional/gnome.nix ../common/optional/pipewire.nix + ../common/optional/flatpak.nix # thinkpad-related ../common/optional/thinkpad.nix @@ -27,7 +28,7 @@ # Bootloader. boot.loader.systemd-boot.enable = true; boot.loader.efi.canTouchEfiVariables = true; - + networking.hostName = "spider"; # Define your hostname. # Enable networking @@ -45,9 +46,6 @@ # Enable CUPS to print documents. services.printing.enable = true; - # flatpak - services.flatpak.enable = true; - # Allow unfree packages nixpkgs.config.allowUnfree = true;