refactor(darwin,nixos): simplify module imports and theme configs
This commit is contained in:
11
.rules
Normal file
11
.rules
Normal file
@@ -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.
|
||||||
|
|
||||||
|
|
||||||
@@ -1,36 +1,27 @@
|
|||||||
{
|
{
|
||||||
devices,
|
devices,
|
||||||
inputs,
|
inputs,
|
||||||
overlays,
|
|
||||||
home-manager,
|
|
||||||
nix-darwin,
|
nix-darwin,
|
||||||
|
overlays,
|
||||||
...
|
...
|
||||||
}: (builtins.mapAttrs (
|
}: (builtins.mapAttrs (
|
||||||
name: device:
|
name: device:
|
||||||
nix-darwin.lib.darwinSystem {
|
nix-darwin.lib.darwinSystem {
|
||||||
system = device.system;
|
system = device.system;
|
||||||
specialArgs = {
|
specialArgs = {
|
||||||
inherit device;
|
inherit device inputs;
|
||||||
|
stablePkgs = inputs.nixpkgs-stable.legacyPackages.${device.system};
|
||||||
};
|
};
|
||||||
modules = [
|
modules = [
|
||||||
{nixpkgs.overlays = overlays;}
|
inputs.home-manager.darwinModules.home-manager
|
||||||
./${device.name}/configuration.nix
|
|
||||||
inputs.sops-nix.darwinModules.sops
|
inputs.sops-nix.darwinModules.sops
|
||||||
inputs.stylix.darwinModules.stylix
|
inputs.stylix.darwinModules.stylix
|
||||||
home-manager.darwinModules.home-manager
|
|
||||||
{
|
./${device.name}/configuration.nix
|
||||||
nixpkgs.config.allowUnfree = true;
|
../home/module.nix
|
||||||
home-manager = {
|
{nixpkgs.overlays = overlays;}
|
||||||
backupFileExtension = "bak";
|
../sops.nix
|
||||||
useGlobalPkgs = true;
|
../stylix.nix
|
||||||
useUserPackages = true;
|
|
||||||
extraSpecialArgs = {
|
|
||||||
inherit inputs;
|
|
||||||
inherit device;
|
|
||||||
};
|
|
||||||
users.${device.user}.imports = [../home];
|
|
||||||
};
|
|
||||||
}
|
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
|
|||||||
@@ -7,7 +7,6 @@
|
|||||||
enable = device.is "ryu";
|
enable = device.is "ryu";
|
||||||
installBatSyntax = false;
|
installBatSyntax = false;
|
||||||
settings = {
|
settings = {
|
||||||
theme = "catppuccin-mocha";
|
|
||||||
font-family = [
|
font-family = [
|
||||||
"Hasklug Nerd Font Mono"
|
"Hasklug Nerd Font Mono"
|
||||||
];
|
];
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
{
|
{
|
||||||
|
lib,
|
||||||
pkgs,
|
pkgs,
|
||||||
device,
|
device,
|
||||||
inputs,
|
inputs,
|
||||||
@@ -9,13 +10,13 @@
|
|||||||
# enable = false;
|
# enable = false;
|
||||||
font = {
|
font = {
|
||||||
# name = "FiraCode Nerd Font Mono";
|
# name = "FiraCode Nerd Font Mono";
|
||||||
name = "Hasklug Nerd Font Mono";
|
# name = "Hasklug Nerd Font Mono";
|
||||||
# name = "Monaspace Krypton Var Light";
|
# name = "Monaspace Krypton Var Light";
|
||||||
size = 13;
|
size = lib.mkDefault 13;
|
||||||
};
|
};
|
||||||
settings = {
|
settings = {
|
||||||
background_opacity = "0.8";
|
background_opacity = lib.mkDefault "0.8";
|
||||||
background = "#000000";
|
background = lib.mkDefault "#000000";
|
||||||
shell = "${pkgs.fish}/bin/fish";
|
shell = "${pkgs.fish}/bin/fish";
|
||||||
hide_window_decorations = "yes";
|
hide_window_decorations = "yes";
|
||||||
cursor_trail = 1;
|
cursor_trail = 1;
|
||||||
|
|||||||
@@ -101,7 +101,7 @@
|
|||||||
telemetry = {
|
telemetry = {
|
||||||
metrics = false;
|
metrics = false;
|
||||||
};
|
};
|
||||||
buffer_font_size = 15;
|
buffer_font_size = lib.mkDefault 15;
|
||||||
# language_models = {
|
# language_models = {
|
||||||
# ollama = {
|
# ollama = {
|
||||||
# api_url = "https://ollama.ryu.darksailor.dev";
|
# api_url = "https://ollama.ryu.darksailor.dev";
|
||||||
@@ -143,7 +143,7 @@
|
|||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
theme = "Catppuccin Mocha";
|
theme = lib.mkDefault "Catppuccin Mocha";
|
||||||
};
|
};
|
||||||
userTasks = let
|
userTasks = let
|
||||||
zed =
|
zed =
|
||||||
|
|||||||
20
home/module.nix
Normal file
20
home/module.nix
Normal file
@@ -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 = [
|
||||||
|
./.
|
||||||
|
];
|
||||||
|
};
|
||||||
|
}
|
||||||
@@ -7,13 +7,6 @@
|
|||||||
programs.
|
programs.
|
||||||
bat = {
|
bat = {
|
||||||
enable = true;
|
enable = true;
|
||||||
config = {theme = "catppuccin";};
|
|
||||||
themes = {
|
|
||||||
catppuccin = {
|
|
||||||
src = "${pkgs.catppuccinThemes.bat}/themes";
|
|
||||||
file = "Catppuccin Mocha.tmTheme";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
# extraPackages = with pkgs.bat-extras; [batman batgrep batwatch];
|
# extraPackages = with pkgs.bat-extras; [batman batgrep batwatch];
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -8,24 +8,17 @@
|
|||||||
enable = true;
|
enable = true;
|
||||||
enableFishIntegration = true;
|
enableFishIntegration = true;
|
||||||
enableNushellIntegration = true;
|
enableNushellIntegration = true;
|
||||||
settings = let
|
settings = {
|
||||||
flavour = "mocha"; # Replace with your preferred palette
|
format = "$all$character";
|
||||||
in
|
character = {
|
||||||
{
|
success_symbol = "[[OK](bold green) ❯](maroon)";
|
||||||
# Check https://starship.rs/config/#prompt
|
error_symbol = "[❯](red)";
|
||||||
format = "$all$character";
|
vimcmd_symbol = "[❮](green)";
|
||||||
palette = "catppuccin_${flavour}";
|
};
|
||||||
character = {
|
directory = {
|
||||||
success_symbol = "[[OK](bold green) ❯](maroon)";
|
truncation_length = 4;
|
||||||
error_symbol = "[❯](red)";
|
style = "bold lavender";
|
||||||
vimcmd_symbol = "[❮](green)";
|
};
|
||||||
};
|
};
|
||||||
directory = {
|
|
||||||
truncation_length = 4;
|
|
||||||
style = "bold lavender";
|
|
||||||
};
|
|
||||||
}
|
|
||||||
// builtins.fromTOML (builtins.readFile
|
|
||||||
(pkgs.catppuccinThemes.starship + /palettes/${flavour}.toml));
|
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -9,8 +9,8 @@
|
|||||||
enable = true;
|
enable = true;
|
||||||
enableFishIntegration = true;
|
enableFishIntegration = true;
|
||||||
enableNushellIntegration = true;
|
enableNushellIntegration = true;
|
||||||
theme = builtins.fromTOML (builtins.readFile "${pkgs.catppuccinThemes.yazi}/themes/mocha/catppuccin-mocha-mauve.toml");
|
theme = lib.mkDefault builtins.fromTOML (builtins.readFile "${pkgs.catppuccinThemes.yazi}/themes/mocha.toml");
|
||||||
settings = lib.mkIf (device.is "ryu") {
|
settings = {
|
||||||
plugin = {
|
plugin = {
|
||||||
prepend_preloaders = [
|
prepend_preloaders = [
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -6,16 +6,16 @@
|
|||||||
}: {
|
}: {
|
||||||
gtk = {
|
gtk = {
|
||||||
enable = device.is "ryu";
|
enable = device.is "ryu";
|
||||||
theme = {
|
# theme = {
|
||||||
name = "catppuccin-mocha-mauve-standard+normal";
|
# name = "catppuccin-mocha-mauve-standard+normal";
|
||||||
package = pkgs.catppuccinThemes.gtk;
|
# package = pkgs.catppuccinThemes.gtk;
|
||||||
# package = pkgs.catppuccin-gtk.override {
|
# # package = pkgs.catppuccin-gtk.override {
|
||||||
# variant = "mocha";
|
# # variant = "mocha";
|
||||||
# size = "standard";
|
# # size = "standard";
|
||||||
# accents = ["mauve"];
|
# # accents = ["mauve"];
|
||||||
# tweaks = ["normal"];
|
# # tweaks = ["normal"];
|
||||||
# };
|
# # };
|
||||||
};
|
# };
|
||||||
|
|
||||||
iconTheme = {
|
iconTheme = {
|
||||||
name = "Papirus-Dark";
|
name = "Papirus-Dark";
|
||||||
|
|||||||
@@ -32,7 +32,7 @@
|
|||||||
systemd.enable = true;
|
systemd.enable = true;
|
||||||
|
|
||||||
settings = {
|
settings = {
|
||||||
source = "${pkgs.catppuccinThemes.hyprland}/themes/mocha.conf";
|
# source = "${pkgs.catppuccinThemes.hyprland}/themes/mocha.conf";
|
||||||
render = {
|
render = {
|
||||||
direct_scanout = true;
|
direct_scanout = true;
|
||||||
cm_fs_passthrough = 1;
|
cm_fs_passthrough = 1;
|
||||||
@@ -91,8 +91,8 @@
|
|||||||
gaps_in = 5;
|
gaps_in = 5;
|
||||||
gaps_out = 20;
|
gaps_out = 20;
|
||||||
border_size = 2;
|
border_size = 2;
|
||||||
"col.active_border" = "$mauve $mauve 45deg";
|
# "col.active_border" = "$mauve $mauve 45deg";
|
||||||
"col.inactive_border" = "$crust";
|
# "col.inactive_border" = "$crust";
|
||||||
};
|
};
|
||||||
|
|
||||||
ecosystem = {
|
ecosystem = {
|
||||||
|
|||||||
@@ -1,10 +1,8 @@
|
|||||||
{
|
{
|
||||||
nixpkgs,
|
|
||||||
devices,
|
devices,
|
||||||
inputs,
|
inputs,
|
||||||
|
nixpkgs,
|
||||||
overlays,
|
overlays,
|
||||||
home-manager,
|
|
||||||
nur,
|
|
||||||
...
|
...
|
||||||
}: (builtins.mapAttrs (
|
}: (builtins.mapAttrs (
|
||||||
name: device:
|
name: device:
|
||||||
@@ -16,35 +14,21 @@
|
|||||||
lanzaboote = inputs.lanzaboote;
|
lanzaboote = inputs.lanzaboote;
|
||||||
};
|
};
|
||||||
modules = [
|
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.arion.nixosModules.arion
|
||||||
# inputs.command-runner.nixosModules.command-runner
|
inputs.disko.nixosModules.disko
|
||||||
|
inputs.home-manager.nixosModules.home-manager
|
||||||
inputs.lanzaboote.nixosModules.lanzaboote
|
inputs.lanzaboote.nixosModules.lanzaboote
|
||||||
inputs.musnix.nixosModules.musnix
|
inputs.musnix.nixosModules.musnix
|
||||||
inputs.nix-minecraft.nixosModules.minecraft-servers
|
inputs.nix-minecraft.nixosModules.minecraft-servers
|
||||||
{
|
inputs.nur.modules.nixos.default
|
||||||
nixpkgs.config.allowUnfree = true;
|
inputs.sops-nix.nixosModules.sops
|
||||||
home-manager = {
|
inputs.stylix.nixosModules.stylix
|
||||||
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
|
|
||||||
./${device.name}/configuration.nix
|
./${device.name}/configuration.nix
|
||||||
|
../home/module.nix
|
||||||
|
{nixpkgs.overlays = overlays;}
|
||||||
|
../sops.nix
|
||||||
|
../stylix.nix
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
|
|||||||
@@ -120,8 +120,6 @@
|
|||||||
};
|
};
|
||||||
plymouth = {
|
plymouth = {
|
||||||
enable = true;
|
enable = true;
|
||||||
theme = "catppuccin-mocha";
|
|
||||||
themePackages = with pkgs; [(catppuccin-plymouth.override {variant = "mocha";})];
|
|
||||||
};
|
};
|
||||||
|
|
||||||
# Bootloader.
|
# Bootloader.
|
||||||
|
|||||||
12
stylix.nix
Normal file
12
stylix.nix
Normal file
@@ -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";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user