nix-serve maybe
0
.gitignore
vendored
Normal file → Executable file
0
.sops.yaml
Normal file → Executable file
0
.vscode/tasks.json
vendored
Normal file → Executable file
0
automations.yaml
Normal file → Executable file
0
flake.lock
generated
Normal file → Executable file
111
flake.nix
Normal file → Executable file
@@ -279,6 +279,117 @@
|
||||
];
|
||||
};
|
||||
};
|
||||
|
||||
# Improved build-all app
|
||||
apps.x86_64-linux.build-all = let
|
||||
pkgs = nixpkgs-unstable.legacyPackages.x86_64-linux;
|
||||
in {
|
||||
type = "app";
|
||||
program = toString (pkgs.writeShellScript "build-all" ''
|
||||
#!/usr/bin/env bash
|
||||
set -euo pipefail
|
||||
|
||||
# Get the list of system names directly from flake.nix
|
||||
# This avoids JSON serialization issues
|
||||
systems=($(grep -o '"[^"]*"[[:space:]]*=' flake.nix | grep -v '_\|#\|"\.\|\*' | sed 's/"//g' | sed 's/=//g' | xargs))
|
||||
|
||||
echo "Found systems: ''${systems[@]}"
|
||||
echo "Building all compatible systems..."
|
||||
|
||||
# Track success/failure
|
||||
success=()
|
||||
failure=()
|
||||
|
||||
for system in "''${systems[@]}"; do
|
||||
echo "Attempting to build $system..."
|
||||
|
||||
# Detect system type without JSON evaluation
|
||||
if nix eval --raw ".#nixosConfigurations.$system.pkgs.stdenv.hostPlatform.system" 2>/dev/null; then
|
||||
system_type=$(nix eval --raw ".#nixosConfigurations.$system.pkgs.stdenv.hostPlatform.system" 2>/dev/null || echo "unknown")
|
||||
|
||||
# Only build if we're on the same system type or can cross-compile
|
||||
if [ "$system_type" = "x86_64-linux" ]; then
|
||||
echo "Building $system (x86_64-linux)..."
|
||||
if nix build ".#nixosConfigurations.$system.config.system.build.toplevel" --out-link "./result-$system" --no-link; then
|
||||
echo "✅ Successfully built $system"
|
||||
|
||||
# Copy to the binary cache
|
||||
echo "Copying $system to binary cache..."
|
||||
nix copy --to "http://localhost:5000?secret-key=/etc/nix/cache-priv-key.pem" ".#nixosConfigurations.$system.config.system.build.toplevel"
|
||||
success+=("$system")
|
||||
else
|
||||
echo "❌ Failed to build $system"
|
||||
failure+=("$system")
|
||||
fi
|
||||
elif [ "$system_type" = "aarch64-linux" ] && command -v qemu-aarch64-static >/dev/null 2>&1; then
|
||||
echo "Cross-building $system (aarch64-linux)..."
|
||||
if nix build ".#nixosConfigurations.$system.config.system.build.toplevel" --system aarch64-linux --out-link "./result-$system" --no-link; then
|
||||
echo "✅ Successfully built $system"
|
||||
nix copy --to "http://localhost:5000?secret-key=/etc/nix/cache-priv-key.pem" ".#nixosConfigurations.$system.config.system.build.toplevel"
|
||||
success+=("$system")
|
||||
else
|
||||
echo "❌ Failed to build $system"
|
||||
failure+=("$system")
|
||||
fi
|
||||
else
|
||||
echo "⚠️ Skipping $system ($system_type) - incompatible with this host"
|
||||
failure+=("$system (incompatible)")
|
||||
fi
|
||||
elif nix eval --raw ".#darwinConfigurations.$system.system" 2>/dev/null; then
|
||||
echo "Found Darwin system $system, attempting to build packages..."
|
||||
if nix build ".#darwinConfigurations.$system.system" --out-link "./result-darwin-$system" --no-link; then
|
||||
echo "✅ Successfully built $system packages"
|
||||
nix copy --to "http://localhost:5000?secret-key=/etc/nix/cache-priv-key.pem" ".#darwinConfigurations.$system.system"
|
||||
success+=("$system (darwin)")
|
||||
else
|
||||
echo "❌ Failed to build $system packages"
|
||||
failure+=("$system (darwin)")
|
||||
fi
|
||||
else
|
||||
echo "⚠️ Skipping $system - could not determine system type"
|
||||
failure+=("$system (unknown)")
|
||||
fi
|
||||
done
|
||||
|
||||
# Summary
|
||||
echo ""
|
||||
echo "===== Build Summary ====="
|
||||
echo "✅ Successfully built: ''${success[*]:-none}"
|
||||
echo "❌ Failed to build: ''${failure[*]:-none}"
|
||||
|
||||
# Return error code if any builds failed
|
||||
if [ ''${#failure[@]} -gt 0 ]; then
|
||||
exit 1
|
||||
fi
|
||||
'');
|
||||
};
|
||||
|
||||
# You could also provide a separate script that only lists systems
|
||||
apps.x86_64-linux.list-systems = let
|
||||
pkgs = nixpkgs-unstable.legacyPackages.x86_64-linux;
|
||||
in {
|
||||
type = "app";
|
||||
program = toString (pkgs.writeShellScript "list-systems" ''
|
||||
#!/usr/bin/env bash
|
||||
set -euo pipefail
|
||||
|
||||
# Get systems from flake.nix
|
||||
systems=($(grep -o '"[^"]*"[[:space:]]*=' flake.nix | grep -v '_\|#\|"\.\|\*' | sed 's/"//g' | sed 's/=//g' | xargs))
|
||||
|
||||
echo "Found systems in flake.nix:"
|
||||
for system in "''${systems[@]}"; do
|
||||
# Try to determine if it's a NixOS or Darwin system
|
||||
if nix eval --raw ".#nixosConfigurations.$system.pkgs.stdenv.hostPlatform.system" 2>/dev/null; then
|
||||
system_type=$(nix eval --raw ".#nixosConfigurations.$system.pkgs.stdenv.hostPlatform.system" 2>/dev/null)
|
||||
echo " - $system (NixOS, $system_type)"
|
||||
elif nix eval --raw ".#darwinConfigurations.$system.system" 2>/dev/null; then
|
||||
echo " - $system (Darwin)"
|
||||
else
|
||||
echo " - $system (unknown type)"
|
||||
fi
|
||||
done
|
||||
'');
|
||||
};
|
||||
|
||||
# Expose the package set, including overlays, for convenience.
|
||||
darwinPackages = self.darwinConfigurations."MacBook-Pro".pkgs;
|
||||
|
||||
0
hosts/deck/boot.nix
Normal file → Executable file
0
hosts/deck/configuration.nix
Normal file → Executable file
0
hosts/deck/hardware-configuration.nix
Normal file → Executable file
0
hosts/deck/home.nix
Normal file → Executable file
0
hosts/deck/jovian.nix
Normal file → Executable file
0
hosts/default.nix
Normal file → Executable file
0
hosts/desktop/boot.nix
Normal file → Executable file
27
hosts/desktop/configuration.nix
Normal file → Executable file
@@ -108,10 +108,29 @@ in
|
||||
apps.discover-wrapped.enable = lib.mkDefault false;
|
||||
chaotic.mesa-git.enable = true;
|
||||
|
||||
nix.settings.trusted-users = lib.mkDefault [
|
||||
"root"
|
||||
user
|
||||
];
|
||||
# Enable nix flakes and nix-command tools
|
||||
nix = {
|
||||
settings = {
|
||||
substituters = [
|
||||
"https://cache.mjallen.dev"
|
||||
"https://nix-community.cachix.org"
|
||||
"https://cache.nixos.org/"
|
||||
];
|
||||
trusted-public-keys = [
|
||||
"cache.mjallen.dev-1:IzFmKCd8/gggI6lcCXsW65qQwiCLGFFN9t9s2iw7Lvc="
|
||||
"nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs="
|
||||
];
|
||||
warn-dirty = lib.mkForce false;
|
||||
experimental-features = lib.mkForce [
|
||||
"nix-command"
|
||||
"flakes"
|
||||
];
|
||||
};
|
||||
trusted-users = lib.mkDefault [
|
||||
"root"
|
||||
user
|
||||
];
|
||||
};
|
||||
|
||||
services = {
|
||||
# Enable Desktop Environment.
|
||||
|
||||
0
hosts/desktop/cosmic/default.nix
Normal file → Executable file
0
hosts/desktop/filesystems.nix
Normal file → Executable file
0
hosts/desktop/hardware-configuration.nix
Normal file → Executable file
0
hosts/desktop/home.nix
Normal file → Executable file
0
hosts/desktop/hyprland/config.nix
Normal file → Executable file
0
hosts/desktop/hyprland/config/btop/default.nix
Normal file → Executable file
0
hosts/desktop/hyprland/config/btop/themes/catppuccin_macchiato.theme
Normal file → Executable file
0
hosts/desktop/hyprland/config/btop/themes/nord.theme
Normal file → Executable file
0
hosts/desktop/hyprland/config/hypr/default.nix
Normal file → Executable file
0
hosts/desktop/hyprland/config/kitty/default.nix
Normal file → Executable file
0
hosts/desktop/hyprland/config/kitty/macchiato.conf
Normal file → Executable file
0
hosts/desktop/hyprland/config/kitty/nord.conf
Normal file → Executable file
0
hosts/desktop/hyprland/config/mako/default.nix
Normal file → Executable file
0
hosts/desktop/hyprland/config/nwg-drawer/drawer.css
Normal file → Executable file
0
hosts/desktop/hyprland/config/nwg-panel/excluded-dirs
Normal file → Executable file
0
hosts/desktop/hyprland/config/nwg-panel/preferred-apps.json
Normal file → Executable file
0
hosts/desktop/hyprland/config/wallpapers/wall.png
Normal file → Executable file
|
Before Width: | Height: | Size: 239 KiB After Width: | Height: | Size: 239 KiB |
0
hosts/desktop/hyprland/config/waybar/default.nix
Normal file → Executable file
0
hosts/desktop/hyprland/config/waybar/macchiato.css
Normal file → Executable file
0
hosts/desktop/hyprland/config/waybar/nord.css
Normal file → Executable file
0
hosts/desktop/hyprland/config/waybar/scripts/hass.nix
Normal file → Executable file
0
hosts/desktop/hyprland/config/waybar/scripts/hass.py
Normal file → Executable file
0
hosts/desktop/hyprland/config/waybar/waybar.css
Normal file → Executable file
0
hosts/desktop/hyprland/config/wlogout/icons/hibernate.png
Normal file → Executable file
|
Before Width: | Height: | Size: 10 KiB After Width: | Height: | Size: 10 KiB |
0
hosts/desktop/hyprland/config/wlogout/icons/lock.png
Normal file → Executable file
|
Before Width: | Height: | Size: 4.6 KiB After Width: | Height: | Size: 4.6 KiB |
0
hosts/desktop/hyprland/config/wlogout/icons/logout.png
Normal file → Executable file
|
Before Width: | Height: | Size: 7.6 KiB After Width: | Height: | Size: 7.6 KiB |
0
hosts/desktop/hyprland/config/wlogout/icons/reboot.png
Normal file → Executable file
|
Before Width: | Height: | Size: 8.4 KiB After Width: | Height: | Size: 8.4 KiB |
0
hosts/desktop/hyprland/config/wlogout/icons/shutdown.png
Normal file → Executable file
|
Before Width: | Height: | Size: 9.5 KiB After Width: | Height: | Size: 9.5 KiB |
0
hosts/desktop/hyprland/config/wlogout/icons/suspend.png
Normal file → Executable file
|
Before Width: | Height: | Size: 11 KiB After Width: | Height: | Size: 11 KiB |
0
hosts/desktop/hyprland/config/wlogout/layout
Normal file → Executable file
0
hosts/desktop/hyprland/config/wlogout/style.css
Normal file → Executable file
0
hosts/desktop/hyprland/config/wofi/default.nix
Normal file → Executable file
0
hosts/desktop/hyprland/default.nix
Normal file → Executable file
0
hosts/desktop/hyprland/environment.nix
Normal file → Executable file
0
hosts/desktop/hyprland/home.nix
Normal file → Executable file
0
hosts/desktop/sops.nix
Normal file → Executable file
0
hosts/homeassistant/automations.yaml
Normal file → Executable file
0
hosts/homeassistant/automations.yaml.ori
Normal file → Executable file
0
hosts/homeassistant/boot.nix
Normal file → Executable file
0
hosts/homeassistant/configuration.nix
Normal file → Executable file
0
hosts/homeassistant/hardware-configuration.nix
Normal file → Executable file
0
hosts/homeassistant/home.nix
Normal file → Executable file
0
hosts/homeassistant/homeassistant.nix
Normal file → Executable file
0
hosts/homeassistant/impermanence.nix
Normal file → Executable file
0
hosts/homeassistant/scenes.yaml
Normal file → Executable file
0
hosts/homeassistant/scripts.yaml
Normal file → Executable file
0
hosts/mac-nixos/apple-silicon-support/default.nix
Normal file → Executable file
0
hosts/mac-nixos/apple-silicon-support/modules/boot-m1n1/default.nix
Normal file → Executable file
0
hosts/mac-nixos/apple-silicon-support/modules/default.nix
Normal file → Executable file
0
hosts/mac-nixos/apple-silicon-support/modules/kernel/default.nix
Normal file → Executable file
0
hosts/mac-nixos/apple-silicon-support/modules/mesa/default.nix
Normal file → Executable file
0
hosts/mac-nixos/apple-silicon-support/modules/peripheral-firmware/default.nix
Normal file → Executable file
0
hosts/mac-nixos/apple-silicon-support/modules/sound/default.nix
Normal file → Executable file
0
hosts/mac-nixos/apple-silicon-support/packages/alsa-ucm-conf-asahi/default.nix
Normal file → Executable file
0
hosts/mac-nixos/apple-silicon-support/packages/asahi-audio/default.nix
Normal file → Executable file
0
hosts/mac-nixos/apple-silicon-support/packages/bankstown-lv2/default.nix
Normal file → Executable file
0
hosts/mac-nixos/apple-silicon-support/packages/linux-asahi/0001-check-in-new-alloc-for-1.75.0.patch
Normal file → Executable file
0
hosts/mac-nixos/apple-silicon-support/packages/linux-asahi/0001-fs-fcntl-accept-more-values-as-F_DUPFD_CLOEXEC-args.patch
Normal file → Executable file
0
hosts/mac-nixos/apple-silicon-support/packages/linux-asahi/config
Normal file → Executable file
0
hosts/mac-nixos/apple-silicon-support/packages/linux-asahi/default.nix
Normal file → Executable file
0
hosts/mac-nixos/apple-silicon-support/packages/linux-asahi/rust_1_76_0.patch
Normal file → Executable file
0
hosts/mac-nixos/apple-silicon-support/packages/m1n1/default.nix
Normal file → Executable file
0
hosts/mac-nixos/apple-silicon-support/packages/mesa-asahi-edge/default.nix
Normal file → Executable file
0
hosts/mac-nixos/apple-silicon-support/packages/mesa-asahi-edge/disk_cache-include-dri-driver-path-in-cache-key.patch
Normal file → Executable file
0
hosts/mac-nixos/apple-silicon-support/packages/mesa-asahi-edge/opencl.patch
Normal file → Executable file
0
hosts/mac-nixos/apple-silicon-support/packages/overlay.nix
Normal file → Executable file
0
hosts/mac-nixos/apple-silicon-support/packages/speakersafetyd/default.nix
Normal file → Executable file
0
hosts/mac-nixos/apple-silicon-support/packages/uboot-asahi/default.nix
Normal file → Executable file
0
hosts/mac-nixos/configuration.nix
Normal file → Executable file
0
hosts/mac-nixos/cosmic/default.nix
Normal file → Executable file
0
hosts/mac-nixos/gnome/default.nix
Normal file → Executable file
0
hosts/mac-nixos/gnome/home.nix
Normal file → Executable file
0
hosts/mac-nixos/hardware-configuration.nix
Normal file → Executable file
0
hosts/mac-nixos/home.nix
Normal file → Executable file
0
hosts/mac-nixos/hyprland/config.nix
Normal file → Executable file
0
hosts/mac-nixos/hyprland/config/btop/default.nix
Normal file → Executable file
0
hosts/mac-nixos/hyprland/config/btop/themes/catppuccin_macchiato.theme
Normal file → Executable file
0
hosts/mac-nixos/hyprland/config/hypr/default.nix
Normal file → Executable file
0
hosts/mac-nixos/hyprland/config/kitty/default.nix
Normal file → Executable file
0
hosts/mac-nixos/hyprland/config/kitty/macchiato.conf
Normal file → Executable file
0
hosts/mac-nixos/hyprland/config/mako/default.nix
Normal file → Executable file
0
hosts/mac-nixos/hyprland/config/nwg-drawer/drawer.css
Normal file → Executable file
0
hosts/mac-nixos/hyprland/config/nwg-panel/excluded-dirs
Normal file → Executable file
0
hosts/mac-nixos/hyprland/config/nwg-panel/preferred-apps.json
Normal file → Executable file
0
hosts/mac-nixos/hyprland/config/wallpapers/wall.png
Normal file → Executable file
|
Before Width: | Height: | Size: 239 KiB After Width: | Height: | Size: 239 KiB |