diff --git a/.rules b/.rules new file mode 100644 index 00000000..aba24577 --- /dev/null +++ b/.rules @@ -0,0 +1,11 @@ +# Identity +You are a sysadmin that manages server configurations and deployments in nixos/nix-darwin and the nix language. + +# Instructions +1. Do not create new markdown files in this repository. +2. Do not add any helper scripts or shell scripts. +3. Do not add any example / snippets or sample code. +4. All configurations must be done using nix expressions if possible. +5. When adding any new file ensure it follows the existing naming conventions and directory structure. + + diff --git a/darwin/default.nix b/darwin/default.nix index c08c9717..e394f7ce 100644 --- a/darwin/default.nix +++ b/darwin/default.nix @@ -1,36 +1,27 @@ { devices, inputs, - overlays, - home-manager, nix-darwin, + overlays, ... }: (builtins.mapAttrs ( name: device: nix-darwin.lib.darwinSystem { system = device.system; specialArgs = { - inherit device; + inherit device inputs; + stablePkgs = inputs.nixpkgs-stable.legacyPackages.${device.system}; }; modules = [ - {nixpkgs.overlays = overlays;} - ./${device.name}/configuration.nix + inputs.home-manager.darwinModules.home-manager inputs.sops-nix.darwinModules.sops inputs.stylix.darwinModules.stylix - home-manager.darwinModules.home-manager - { - nixpkgs.config.allowUnfree = true; - home-manager = { - backupFileExtension = "bak"; - useGlobalPkgs = true; - useUserPackages = true; - extraSpecialArgs = { - inherit inputs; - inherit device; - }; - users.${device.user}.imports = [../home]; - }; - } + + ./${device.name}/configuration.nix + ../home/module.nix + {nixpkgs.overlays = overlays;} + ../sops.nix + ../stylix.nix ]; } ) diff --git a/home/apps/ghostty.nix b/home/apps/ghostty.nix index e11f1228..5dc0cdbc 100644 --- a/home/apps/ghostty.nix +++ b/home/apps/ghostty.nix @@ -7,7 +7,6 @@ enable = device.is "ryu"; installBatSyntax = false; settings = { - theme = "catppuccin-mocha"; font-family = [ "Hasklug Nerd Font Mono" ]; diff --git a/home/apps/kitty.nix b/home/apps/kitty.nix index 0c7598ea..a0fb5b1d 100644 --- a/home/apps/kitty.nix +++ b/home/apps/kitty.nix @@ -1,4 +1,5 @@ { + lib, pkgs, device, inputs, @@ -9,13 +10,13 @@ # enable = false; font = { # name = "FiraCode Nerd Font Mono"; - name = "Hasklug Nerd Font Mono"; + # name = "Hasklug Nerd Font Mono"; # name = "Monaspace Krypton Var Light"; - size = 13; + size = lib.mkDefault 13; }; settings = { - background_opacity = "0.8"; - background = "#000000"; + background_opacity = lib.mkDefault "0.8"; + background = lib.mkDefault "#000000"; shell = "${pkgs.fish}/bin/fish"; hide_window_decorations = "yes"; cursor_trail = 1; diff --git a/home/apps/zed.nix b/home/apps/zed.nix index 789d6205..0e0f2413 100644 --- a/home/apps/zed.nix +++ b/home/apps/zed.nix @@ -101,7 +101,7 @@ telemetry = { metrics = false; }; - buffer_font_size = 15; + buffer_font_size = lib.mkDefault 15; # language_models = { # ollama = { # api_url = "https://ollama.ryu.darksailor.dev"; @@ -143,7 +143,7 @@ }; }; }; - theme = "Catppuccin Mocha"; + theme = lib.mkDefault "Catppuccin Mocha"; }; userTasks = let zed = diff --git a/home/module.nix b/home/module.nix new file mode 100644 index 00000000..d4371d15 --- /dev/null +++ b/home/module.nix @@ -0,0 +1,20 @@ +{ + device, + inputs, + ... +}: { + nixpkgs.config.allowUnfree = true; + home-manager = { + backupFileExtension = "bak"; + useGlobalPkgs = true; + useUserPackages = true; + extraSpecialArgs = { + inherit inputs; + inherit device; + stablePkgs = inputs.nixpkgs-stable.legacyPackages.${device.system}; + }; + users.${device.user}.imports = [ + ./. + ]; + }; +} diff --git a/home/programs/bat.nix b/home/programs/bat.nix index 8674df67..23255314 100644 --- a/home/programs/bat.nix +++ b/home/programs/bat.nix @@ -7,13 +7,6 @@ programs. bat = { enable = true; - config = {theme = "catppuccin";}; - themes = { - catppuccin = { - src = "${pkgs.catppuccinThemes.bat}/themes"; - file = "Catppuccin Mocha.tmTheme"; - }; - }; # extraPackages = with pkgs.bat-extras; [batman batgrep batwatch]; }; } diff --git a/home/programs/starship.nix b/home/programs/starship.nix index bf487ece..38006abb 100644 --- a/home/programs/starship.nix +++ b/home/programs/starship.nix @@ -8,24 +8,17 @@ enable = true; enableFishIntegration = true; enableNushellIntegration = true; - settings = let - flavour = "mocha"; # Replace with your preferred palette - in - { - # Check https://starship.rs/config/#prompt - format = "$all$character"; - palette = "catppuccin_${flavour}"; - character = { - success_symbol = "[[OK](bold green) ❯](maroon)"; - error_symbol = "[❯](red)"; - vimcmd_symbol = "[❮](green)"; - }; - directory = { - truncation_length = 4; - style = "bold lavender"; - }; - } - // builtins.fromTOML (builtins.readFile - (pkgs.catppuccinThemes.starship + /palettes/${flavour}.toml)); + settings = { + format = "$all$character"; + character = { + success_symbol = "[[OK](bold green) ❯](maroon)"; + error_symbol = "[❯](red)"; + vimcmd_symbol = "[❮](green)"; + }; + directory = { + truncation_length = 4; + style = "bold lavender"; + }; + }; }; } diff --git a/home/programs/yazi.nix b/home/programs/yazi.nix index 0368cdc6..8ca593d2 100644 --- a/home/programs/yazi.nix +++ b/home/programs/yazi.nix @@ -9,8 +9,8 @@ enable = true; enableFishIntegration = true; enableNushellIntegration = true; - theme = builtins.fromTOML (builtins.readFile "${pkgs.catppuccinThemes.yazi}/themes/mocha/catppuccin-mocha-mauve.toml"); - settings = lib.mkIf (device.is "ryu") { + theme = lib.mkDefault builtins.fromTOML (builtins.readFile "${pkgs.catppuccinThemes.yazi}/themes/mocha.toml"); + settings = { plugin = { prepend_preloaders = [ { diff --git a/home/services/gtk.nix b/home/services/gtk.nix index 03c93320..bc482fce 100644 --- a/home/services/gtk.nix +++ b/home/services/gtk.nix @@ -6,16 +6,16 @@ }: { gtk = { enable = device.is "ryu"; - theme = { - name = "catppuccin-mocha-mauve-standard+normal"; - package = pkgs.catppuccinThemes.gtk; - # package = pkgs.catppuccin-gtk.override { - # variant = "mocha"; - # size = "standard"; - # accents = ["mauve"]; - # tweaks = ["normal"]; - # }; - }; + # theme = { + # name = "catppuccin-mocha-mauve-standard+normal"; + # package = pkgs.catppuccinThemes.gtk; + # # package = pkgs.catppuccin-gtk.override { + # # variant = "mocha"; + # # size = "standard"; + # # accents = ["mauve"]; + # # tweaks = ["normal"]; + # # }; + # }; iconTheme = { name = "Papirus-Dark"; diff --git a/home/services/hyprland.nix b/home/services/hyprland.nix index 7c3f02e9..1908afc3 100644 --- a/home/services/hyprland.nix +++ b/home/services/hyprland.nix @@ -32,7 +32,7 @@ systemd.enable = true; settings = { - source = "${pkgs.catppuccinThemes.hyprland}/themes/mocha.conf"; + # source = "${pkgs.catppuccinThemes.hyprland}/themes/mocha.conf"; render = { direct_scanout = true; cm_fs_passthrough = 1; @@ -91,8 +91,8 @@ gaps_in = 5; gaps_out = 20; border_size = 2; - "col.active_border" = "$mauve $mauve 45deg"; - "col.inactive_border" = "$crust"; + # "col.active_border" = "$mauve $mauve 45deg"; + # "col.inactive_border" = "$crust"; }; ecosystem = { diff --git a/nixos/default.nix b/nixos/default.nix index f9dd1ea1..276c3d93 100644 --- a/nixos/default.nix +++ b/nixos/default.nix @@ -1,10 +1,8 @@ { - nixpkgs, devices, inputs, + nixpkgs, overlays, - home-manager, - nur, ... }: (builtins.mapAttrs ( name: device: @@ -16,35 +14,21 @@ lanzaboote = inputs.lanzaboote; }; modules = [ - nur.modules.nixos.default - inputs.sops-nix.nixosModules.sops - inputs.disko.nixosModules.disko - inputs.stylix.nixosModules.stylix - {nixpkgs.overlays = overlays;} - home-manager.nixosModules.home-manager inputs.arion.nixosModules.arion - # inputs.command-runner.nixosModules.command-runner + inputs.disko.nixosModules.disko + inputs.home-manager.nixosModules.home-manager inputs.lanzaboote.nixosModules.lanzaboote inputs.musnix.nixosModules.musnix inputs.nix-minecraft.nixosModules.minecraft-servers - { - nixpkgs.config.allowUnfree = true; - home-manager = { - backupFileExtension = "bak"; - useGlobalPkgs = true; - useUserPackages = true; - extraSpecialArgs = { - inherit inputs; - inherit device; - stablePkgs = inputs.nixpkgs-stable.legacyPackages.${device.system}; - }; - users.${device.user}.imports = [ - ../home - ]; - }; - } - ../sops.nix + inputs.nur.modules.nixos.default + inputs.sops-nix.nixosModules.sops + inputs.stylix.nixosModules.stylix + ./${device.name}/configuration.nix + ../home/module.nix + {nixpkgs.overlays = overlays;} + ../sops.nix + ../stylix.nix ]; } ) diff --git a/nixos/ryu/configuration.nix b/nixos/ryu/configuration.nix index 3a4b453f..cc1373d0 100644 --- a/nixos/ryu/configuration.nix +++ b/nixos/ryu/configuration.nix @@ -120,8 +120,6 @@ }; plymouth = { enable = true; - theme = "catppuccin-mocha"; - themePackages = with pkgs; [(catppuccin-plymouth.override {variant = "mocha";})]; }; # Bootloader. diff --git a/stylix.nix b/stylix.nix new file mode 100644 index 00000000..b5350bcb --- /dev/null +++ b/stylix.nix @@ -0,0 +1,12 @@ +{pkgs, ...}: { + stylix = { + enable = true; + base16Scheme = "${pkgs.base16-schemes}/share/themes/catppuccin-mocha.yaml"; + fonts = { + monospace = { + package = pkgs.nerd-fonts.hasklug; + name = "Hasklug Nerd Font Mono"; + }; + }; + }; +}