mirror of
https://github.com/harivansh-afk/nix.git
synced 2026-04-15 07:04:47 +00:00
ci + lint
This commit is contained in:
parent
d088a98954
commit
66d9b25682
39 changed files with 395 additions and 225 deletions
63
.github/workflows/quality.yml
vendored
Normal file
63
.github/workflows/quality.yml
vendored
Normal file
|
|
@ -0,0 +1,63 @@
|
||||||
|
name: quality
|
||||||
|
|
||||||
|
on:
|
||||||
|
pull_request:
|
||||||
|
branches: [main]
|
||||||
|
push:
|
||||||
|
branches: [main]
|
||||||
|
|
||||||
|
permissions:
|
||||||
|
contents: read
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
changes:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
outputs:
|
||||||
|
quality: ${{ steps.filter.outputs.quality }}
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v4
|
||||||
|
- uses: dorny/paths-filter@v3
|
||||||
|
id: filter
|
||||||
|
with:
|
||||||
|
filters: |
|
||||||
|
quality:
|
||||||
|
- "**/*.nix"
|
||||||
|
- "flake.lock"
|
||||||
|
- "flake.nix"
|
||||||
|
- "ci/**"
|
||||||
|
- "config/**"
|
||||||
|
- "scripts/**"
|
||||||
|
- ".github/workflows/**"
|
||||||
|
|
||||||
|
flake-check:
|
||||||
|
name: Flake Check
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
needs: changes
|
||||||
|
if: ${{ needs.changes.outputs.quality == 'true' }}
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v4
|
||||||
|
- uses: DeterminateSystems/nix-installer-action@main
|
||||||
|
- uses: DeterminateSystems/magic-nix-cache-action@main
|
||||||
|
- name: Prepare local flake input shims
|
||||||
|
run: |
|
||||||
|
set -euo pipefail
|
||||||
|
# The repo currently depends on a local path flake input for agentcomputer-cli.
|
||||||
|
sudo mkdir -p /Users/rathi/Documents/GitHub/companion/agentcomputer/apps
|
||||||
|
sudo ln -sfn "$GITHUB_WORKSPACE/ci/agentcomputer-cli-stub" /Users/rathi/Documents/GitHub/companion/agentcomputer/apps/cli
|
||||||
|
- run: nix flake check
|
||||||
|
|
||||||
|
nix-format:
|
||||||
|
name: Nix Format Check
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
needs: changes
|
||||||
|
if: ${{ needs.changes.outputs.quality == 'true' }}
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v4
|
||||||
|
- uses: DeterminateSystems/nix-installer-action@main
|
||||||
|
- uses: DeterminateSystems/magic-nix-cache-action@main
|
||||||
|
- name: Prepare local flake input shims
|
||||||
|
run: |
|
||||||
|
set -euo pipefail
|
||||||
|
sudo mkdir -p /Users/rathi/Documents/GitHub/companion/agentcomputer/apps
|
||||||
|
sudo ln -sfn "$GITHUB_WORKSPACE/ci/agentcomputer-cli-stub" /Users/rathi/Documents/GitHub/companion/agentcomputer/apps/cli
|
||||||
|
- run: nix fmt -- --ci
|
||||||
30
ci/agentcomputer-cli-stub/flake.nix
Normal file
30
ci/agentcomputer-cli-stub/flake.nix
Normal file
|
|
@ -0,0 +1,30 @@
|
||||||
|
{
|
||||||
|
description = "CI stub for the local agentcomputer-cli flake input";
|
||||||
|
|
||||||
|
inputs.nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable";
|
||||||
|
|
||||||
|
outputs =
|
||||||
|
{ nixpkgs, ... }:
|
||||||
|
let
|
||||||
|
systems = [
|
||||||
|
"aarch64-darwin"
|
||||||
|
"x86_64-darwin"
|
||||||
|
"aarch64-linux"
|
||||||
|
"x86_64-linux"
|
||||||
|
];
|
||||||
|
forAllSystems = nixpkgs.lib.genAttrs systems;
|
||||||
|
in
|
||||||
|
{
|
||||||
|
packages = forAllSystems (
|
||||||
|
system:
|
||||||
|
let
|
||||||
|
pkgs = import nixpkgs { inherit system; };
|
||||||
|
in
|
||||||
|
{
|
||||||
|
default = pkgs.writeShellScriptBin "aicomputer" ''
|
||||||
|
echo "agentcomputer-cli CI stub"
|
||||||
|
'';
|
||||||
|
}
|
||||||
|
);
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
@ -1,4 +1,5 @@
|
||||||
{...}: {
|
{ ... }:
|
||||||
|
{
|
||||||
programs.bat = {
|
programs.bat = {
|
||||||
enable = true;
|
enable = true;
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -2,10 +2,11 @@
|
||||||
inputs,
|
inputs,
|
||||||
pkgs,
|
pkgs,
|
||||||
...
|
...
|
||||||
}: let
|
}:
|
||||||
claudePackage =
|
let
|
||||||
inputs.claudeCode.packages.${pkgs.stdenv.hostPlatform.system}.default;
|
claudePackage = inputs.claudeCode.packages.${pkgs.stdenv.hostPlatform.system}.default;
|
||||||
in {
|
in
|
||||||
|
{
|
||||||
# Keep the managed Claude binary on the same path the live machine was using
|
# Keep the managed Claude binary on the same path the live machine was using
|
||||||
# so the Nix package cleanly replaces the prior manual install.
|
# so the Nix package cleanly replaces the prior manual install.
|
||||||
home.file.".local/bin/claude".source = "${claudePackage}/bin/claude";
|
home.file.".local/bin/claude".source = "${claudePackage}/bin/claude";
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,5 @@
|
||||||
{...}: {
|
{ ... }:
|
||||||
|
{
|
||||||
home.file.".codex/AGENTS.md".source = ../config/codex/AGENTS.md;
|
home.file.".codex/AGENTS.md".source = ../config/codex/AGENTS.md;
|
||||||
home.file.".codex/config.toml".source = ../config/codex/config.toml;
|
home.file.".codex/config.toml".source = ../config/codex/config.toml;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -2,9 +2,11 @@
|
||||||
config,
|
config,
|
||||||
pkgs,
|
pkgs,
|
||||||
...
|
...
|
||||||
}: let
|
}:
|
||||||
|
let
|
||||||
defaultProfile = "default";
|
defaultProfile = "default";
|
||||||
in {
|
in
|
||||||
|
{
|
||||||
home.packages = with pkgs; [
|
home.packages = with pkgs; [
|
||||||
docker-buildx
|
docker-buildx
|
||||||
docker-client
|
docker-client
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,5 @@
|
||||||
{...}: {
|
{ ... }:
|
||||||
|
{
|
||||||
imports = [
|
imports = [
|
||||||
./bat.nix
|
./bat.nix
|
||||||
./eza.nix
|
./eza.nix
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,5 @@
|
||||||
{...}: {
|
{ ... }:
|
||||||
|
{
|
||||||
imports = [
|
imports = [
|
||||||
./common.nix
|
./common.nix
|
||||||
./colima.nix
|
./colima.nix
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,5 @@
|
||||||
{...}: {
|
{ ... }:
|
||||||
|
{
|
||||||
programs.eza = {
|
programs.eza = {
|
||||||
enable = true;
|
enable = true;
|
||||||
enableZshIntegration = true;
|
enableZshIntegration = true;
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,8 @@
|
||||||
{config, ...}: let
|
{ config, ... }:
|
||||||
|
let
|
||||||
theme = import ../lib/theme.nix { inherit config; };
|
theme = import ../lib/theme.nix { inherit config; };
|
||||||
in {
|
in
|
||||||
|
{
|
||||||
home.sessionVariables = {
|
home.sessionVariables = {
|
||||||
FZF_DEFAULT_OPTS_FILE = theme.paths.fzfCurrentFile;
|
FZF_DEFAULT_OPTS_FILE = theme.paths.fzfCurrentFile;
|
||||||
};
|
};
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,5 @@
|
||||||
{lib, ...}: {
|
{ lib, ... }:
|
||||||
|
{
|
||||||
xdg.configFile."gcloud/active_config".text = "default\n";
|
xdg.configFile."gcloud/active_config".text = "default\n";
|
||||||
|
|
||||||
xdg.configFile."gcloud/configurations/config_default".text = lib.generators.toINI { } {
|
xdg.configFile."gcloud/configurations/config_default".text = lib.generators.toINI { } {
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,5 @@
|
||||||
{...}: {
|
{ ... }:
|
||||||
|
{
|
||||||
programs.gh = {
|
programs.gh = {
|
||||||
enable = true;
|
enable = true;
|
||||||
gitCredentialHelper.enable = true;
|
gitCredentialHelper.enable = true;
|
||||||
|
|
|
||||||
|
|
@ -3,7 +3,8 @@
|
||||||
lib,
|
lib,
|
||||||
pkgs,
|
pkgs,
|
||||||
...
|
...
|
||||||
}: let
|
}:
|
||||||
|
let
|
||||||
theme = import ../lib/theme.nix { inherit config; };
|
theme = import ../lib/theme.nix { inherit config; };
|
||||||
ghosttyConfig = ''
|
ghosttyConfig = ''
|
||||||
theme = "cozybox-current"
|
theme = "cozybox-current"
|
||||||
|
|
@ -52,13 +53,11 @@
|
||||||
focus-follows-mouse = true
|
focus-follows-mouse = true
|
||||||
link-url = true
|
link-url = true
|
||||||
'';
|
'';
|
||||||
in {
|
in
|
||||||
|
{
|
||||||
programs.ghostty = {
|
programs.ghostty = {
|
||||||
enable = true;
|
enable = true;
|
||||||
package =
|
package = if pkgs.stdenv.isDarwin then pkgs.ghostty-bin else pkgs.ghostty;
|
||||||
if pkgs.stdenv.isDarwin
|
|
||||||
then pkgs.ghostty-bin
|
|
||||||
else pkgs.ghostty;
|
|
||||||
installBatSyntax = true;
|
installBatSyntax = true;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,5 @@
|
||||||
{...}: {
|
{ ... }:
|
||||||
|
{
|
||||||
programs.git = {
|
programs.git = {
|
||||||
enable = true;
|
enable = true;
|
||||||
lfs.enable = true;
|
lfs.enable = true;
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,5 @@
|
||||||
{...}: {
|
{ ... }:
|
||||||
|
{
|
||||||
programs.k9s = {
|
programs.k9s = {
|
||||||
enable = true;
|
enable = true;
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -2,7 +2,8 @@
|
||||||
config,
|
config,
|
||||||
lib,
|
lib,
|
||||||
...
|
...
|
||||||
}: {
|
}:
|
||||||
|
{
|
||||||
# Karabiner-Elements destroys file-level symlinks (unlink + rewrite), but
|
# Karabiner-Elements destroys file-level symlinks (unlink + rewrite), but
|
||||||
# directory-level symlinks survive. Point ~/.config/karabiner at the repo
|
# directory-level symlinks survive. Point ~/.config/karabiner at the repo
|
||||||
# directory so changes are tracked in git and Karabiner can write freely.
|
# directory so changes are tracked in git and Karabiner can write freely.
|
||||||
|
|
|
||||||
|
|
@ -2,11 +2,11 @@
|
||||||
lib,
|
lib,
|
||||||
pkgs,
|
pkgs,
|
||||||
...
|
...
|
||||||
}: {
|
}:
|
||||||
|
{
|
||||||
xdg.configFile."lazygit/config.yml".source = ../config/lazygit/config.yml;
|
xdg.configFile."lazygit/config.yml".source = ../config/lazygit/config.yml;
|
||||||
|
|
||||||
home.file = lib.mkIf pkgs.stdenv.isDarwin {
|
home.file = lib.mkIf pkgs.stdenv.isDarwin {
|
||||||
"Library/Application Support/lazygit/config.yml".source =
|
"Library/Application Support/lazygit/config.yml".source = ../config/lazygit/config.yml;
|
||||||
../config/lazygit/config.yml;
|
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,5 @@
|
||||||
{lib, ...}: {
|
{ lib, ... }:
|
||||||
|
{
|
||||||
# Transitional cleanup for files previously owned by ~/dots. Keeping this
|
# Transitional cleanup for files previously owned by ~/dots. Keeping this
|
||||||
# separate from steady-state modules makes it obvious what can be deleted
|
# separate from steady-state modules makes it obvious what can be deleted
|
||||||
# once every managed path has been fully handed over to Home Manager.
|
# once every managed path has been fully handed over to Home Manager.
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,5 @@
|
||||||
{...}: {
|
{ ... }:
|
||||||
|
{
|
||||||
programs.mise = {
|
programs.mise = {
|
||||||
enable = true;
|
enable = true;
|
||||||
globalConfig = {
|
globalConfig = {
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,5 @@
|
||||||
{...}: {
|
{ ... }:
|
||||||
|
{
|
||||||
imports = [
|
imports = [
|
||||||
./common.nix
|
./common.nix
|
||||||
];
|
];
|
||||||
|
|
|
||||||
|
|
@ -3,19 +3,20 @@
|
||||||
lib,
|
lib,
|
||||||
pkgs,
|
pkgs,
|
||||||
...
|
...
|
||||||
}: let
|
}:
|
||||||
|
let
|
||||||
nvimConfig = lib.cleanSourceWith {
|
nvimConfig = lib.cleanSourceWith {
|
||||||
src = ../config/nvim;
|
src = ../config/nvim;
|
||||||
filter = path: type:
|
filter =
|
||||||
builtins.baseNameOf path != ".git"
|
path: type: builtins.baseNameOf path != ".git" && builtins.baseNameOf path != "lazy-lock.json";
|
||||||
&& builtins.baseNameOf path != "lazy-lock.json";
|
|
||||||
};
|
};
|
||||||
lazyLockSeed = ../config/nvim/lazy-lock.json;
|
lazyLockSeed = ../config/nvim/lazy-lock.json;
|
||||||
lazyLockPath = "${config.xdg.stateHome}/nvim/lazy-lock.json";
|
lazyLockPath = "${config.xdg.stateHome}/nvim/lazy-lock.json";
|
||||||
python = pkgs.writeShellScriptBin "python" ''
|
python = pkgs.writeShellScriptBin "python" ''
|
||||||
exec ${pkgs.python3}/bin/python3 "$@"
|
exec ${pkgs.python3}/bin/python3 "$@"
|
||||||
'';
|
'';
|
||||||
in {
|
in
|
||||||
|
{
|
||||||
# Keep rust-analyzer in the user profile so it shadows rustup's proxy in
|
# Keep rust-analyzer in the user profile so it shadows rustup's proxy in
|
||||||
# /run/current-system/sw/bin when Neovim resolves LSP executables.
|
# /run/current-system/sw/bin when Neovim resolves LSP executables.
|
||||||
home.packages = [ pkgs.rust-analyzer ];
|
home.packages = [ pkgs.rust-analyzer ];
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,5 @@
|
||||||
{lib, ...}: {
|
{ lib, ... }:
|
||||||
|
{
|
||||||
home.activation.importRectanglePreferences = lib.hm.dag.entryAfter [ "writeBoundary" ] ''
|
home.activation.importRectanglePreferences = lib.hm.dag.entryAfter [ "writeBoundary" ] ''
|
||||||
/usr/bin/defaults import com.knollsoft.Rectangle ${../config/rectangle/Rectangle.plist}
|
/usr/bin/defaults import com.knollsoft.Rectangle ${../config/rectangle/Rectangle.plist}
|
||||||
'';
|
'';
|
||||||
|
|
|
||||||
|
|
@ -3,9 +3,11 @@
|
||||||
lib,
|
lib,
|
||||||
pkgs,
|
pkgs,
|
||||||
...
|
...
|
||||||
}: let
|
}:
|
||||||
|
let
|
||||||
customScripts = import ../scripts { inherit config lib pkgs; };
|
customScripts = import ../scripts { inherit config lib pkgs; };
|
||||||
in {
|
in
|
||||||
|
{
|
||||||
home.packages = builtins.attrValues customScripts.packages;
|
home.packages = builtins.attrValues customScripts.packages;
|
||||||
|
|
||||||
home.activation.initializeThemeState = lib.hm.dag.entryAfter [ "writeBoundary" ] ''
|
home.activation.initializeThemeState = lib.hm.dag.entryAfter [ "writeBoundary" ] ''
|
||||||
|
|
|
||||||
|
|
@ -3,7 +3,8 @@
|
||||||
lib,
|
lib,
|
||||||
pkgs,
|
pkgs,
|
||||||
...
|
...
|
||||||
}: let
|
}:
|
||||||
|
let
|
||||||
globalSkills = [
|
globalSkills = [
|
||||||
{
|
{
|
||||||
name = "rams";
|
name = "rams";
|
||||||
|
|
@ -42,7 +43,8 @@
|
||||||
needs_sync=1
|
needs_sync=1
|
||||||
fi
|
fi
|
||||||
'') globalSkills;
|
'') globalSkills;
|
||||||
in {
|
in
|
||||||
|
{
|
||||||
home.activation.ensureGlobalSkills = lib.hm.dag.entryAfter [ "writeBoundary" ] ''
|
home.activation.ensureGlobalSkills = lib.hm.dag.entryAfter [ "writeBoundary" ] ''
|
||||||
state_dir="${config.xdg.stateHome}/skills"
|
state_dir="${config.xdg.stateHome}/skills"
|
||||||
stamp_file="$state_dir/global-skills-manifest.sha256"
|
stamp_file="$state_dir/global-skills-manifest.sha256"
|
||||||
|
|
@ -58,14 +60,16 @@ in {
|
||||||
${missingChecks}
|
${missingChecks}
|
||||||
|
|
||||||
if [ "$needs_sync" -eq 1 ]; then
|
if [ "$needs_sync" -eq 1 ]; then
|
||||||
export PATH="${lib.makeBinPath [
|
export PATH="${
|
||||||
|
lib.makeBinPath [
|
||||||
pkgs.nodejs_22
|
pkgs.nodejs_22
|
||||||
pkgs.git
|
pkgs.git
|
||||||
pkgs.coreutils
|
pkgs.coreutils
|
||||||
pkgs.findutils
|
pkgs.findutils
|
||||||
pkgs.gnugrep
|
pkgs.gnugrep
|
||||||
pkgs.gnused
|
pkgs.gnused
|
||||||
]}:$PATH"
|
]
|
||||||
|
}:$PATH"
|
||||||
|
|
||||||
${installCommands}
|
${installCommands}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,5 @@
|
||||||
{...}: {
|
{ ... }:
|
||||||
|
{
|
||||||
programs.ssh = {
|
programs.ssh = {
|
||||||
enable = true;
|
enable = true;
|
||||||
enableDefaultConfig = false;
|
enableDefaultConfig = false;
|
||||||
|
|
|
||||||
|
|
@ -3,9 +3,11 @@
|
||||||
lib,
|
lib,
|
||||||
pkgs,
|
pkgs,
|
||||||
...
|
...
|
||||||
}: let
|
}:
|
||||||
|
let
|
||||||
theme = import ../lib/theme.nix { inherit config; };
|
theme = import ../lib/theme.nix { inherit config; };
|
||||||
in {
|
in
|
||||||
|
{
|
||||||
programs.tmux = {
|
programs.tmux = {
|
||||||
enable = true;
|
enable = true;
|
||||||
plugins = with pkgs.tmuxPlugins; [
|
plugins = with pkgs.tmuxPlugins; [
|
||||||
|
|
|
||||||
16
home/zsh.nix
16
home/zsh.nix
|
|
@ -3,9 +3,9 @@
|
||||||
lib,
|
lib,
|
||||||
pkgs,
|
pkgs,
|
||||||
...
|
...
|
||||||
}: {
|
}:
|
||||||
home.file.".oh-my-zsh/custom/themes/agnoster.zsh-theme".source =
|
{
|
||||||
../config/agnoster.zsh-theme;
|
home.file.".oh-my-zsh/custom/themes/agnoster.zsh-theme".source = ../config/agnoster.zsh-theme;
|
||||||
|
|
||||||
home.activation.ensureOhMyZshCache = lib.hm.dag.entryAfter [ "writeBoundary" ] ''
|
home.activation.ensureOhMyZshCache = lib.hm.dag.entryAfter [ "writeBoundary" ] ''
|
||||||
mkdir -p "${config.xdg.cacheHome}/oh-my-zsh"
|
mkdir -p "${config.xdg.cacheHome}/oh-my-zsh"
|
||||||
|
|
@ -22,8 +22,7 @@
|
||||||
autosuggestion.enable = true;
|
autosuggestion.enable = true;
|
||||||
syntaxHighlighting.enable = true;
|
syntaxHighlighting.enable = true;
|
||||||
|
|
||||||
shellAliases =
|
shellAliases = {
|
||||||
{
|
|
||||||
co = "codex --dangerously-bypass-approvals-and-sandbox";
|
co = "codex --dangerously-bypass-approvals-and-sandbox";
|
||||||
ca = "cursor-agent";
|
ca = "cursor-agent";
|
||||||
cc = "claude";
|
cc = "claude";
|
||||||
|
|
@ -43,8 +42,7 @@
|
||||||
tailscale = "/Applications/Tailscale.app/Contents/MacOS/Tailscale";
|
tailscale = "/Applications/Tailscale.app/Contents/MacOS/Tailscale";
|
||||||
};
|
};
|
||||||
|
|
||||||
envExtra =
|
envExtra = ''
|
||||||
''
|
|
||||||
if [[ -f "$HOME/.cargo/env" ]]; then
|
if [[ -f "$HOME/.cargo/env" ]]; then
|
||||||
. "$HOME/.cargo/env"
|
. "$HOME/.cargo/env"
|
||||||
fi
|
fi
|
||||||
|
|
@ -88,9 +86,7 @@
|
||||||
|
|
||||||
export BUN_INSTALL="$HOME/.bun"
|
export BUN_INSTALL="$HOME/.bun"
|
||||||
export PNPM_HOME="${
|
export PNPM_HOME="${
|
||||||
if pkgs.stdenv.isDarwin
|
if pkgs.stdenv.isDarwin then "$HOME/Library/pnpm" else "${config.xdg.dataHome}/pnpm"
|
||||||
then "$HOME/Library/pnpm"
|
|
||||||
else "${config.xdg.dataHome}/pnpm"
|
|
||||||
}"
|
}"
|
||||||
bindkey -v
|
bindkey -v
|
||||||
typeset -U path PATH
|
typeset -U path PATH
|
||||||
|
|
|
||||||
|
|
@ -4,7 +4,8 @@
|
||||||
username,
|
username,
|
||||||
hostname,
|
hostname,
|
||||||
...
|
...
|
||||||
}: {
|
}:
|
||||||
|
{
|
||||||
imports = [
|
imports = [
|
||||||
../../modules/base.nix
|
../../modules/base.nix
|
||||||
../../modules/macos.nix
|
../../modules/macos.nix
|
||||||
|
|
|
||||||
|
|
@ -5,9 +5,11 @@
|
||||||
username,
|
username,
|
||||||
self,
|
self,
|
||||||
...
|
...
|
||||||
}: let
|
}:
|
||||||
|
let
|
||||||
packageSets = import ../../lib/package-sets.nix { inherit inputs lib pkgs; };
|
packageSets = import ../../lib/package-sets.nix { inherit inputs lib pkgs; };
|
||||||
in {
|
in
|
||||||
|
{
|
||||||
imports = [
|
imports = [
|
||||||
./hardware-configuration.nix
|
./hardware-configuration.nix
|
||||||
./disk-config.nix
|
./disk-config.nix
|
||||||
|
|
@ -25,7 +27,11 @@ in {
|
||||||
networking = {
|
networking = {
|
||||||
hostName = "netty";
|
hostName = "netty";
|
||||||
useDHCP = true;
|
useDHCP = true;
|
||||||
firewall.allowedTCPPorts = [22 80 443];
|
firewall.allowedTCPPorts = [
|
||||||
|
22
|
||||||
|
80
|
||||||
|
443
|
||||||
|
];
|
||||||
};
|
};
|
||||||
|
|
||||||
services.qemuGuest.enable = true;
|
services.qemuGuest.enable = true;
|
||||||
|
|
|
||||||
|
|
@ -4,9 +4,11 @@
|
||||||
pkgs,
|
pkgs,
|
||||||
username,
|
username,
|
||||||
...
|
...
|
||||||
}: let
|
}:
|
||||||
|
let
|
||||||
packageSets = import ../../lib/package-sets.nix { inherit inputs lib pkgs; };
|
packageSets = import ../../lib/package-sets.nix { inherit inputs lib pkgs; };
|
||||||
in {
|
in
|
||||||
|
{
|
||||||
imports = [
|
imports = [
|
||||||
../../home/netty.nix
|
../../home/netty.nix
|
||||||
];
|
];
|
||||||
|
|
|
||||||
|
|
@ -4,7 +4,8 @@
|
||||||
lib,
|
lib,
|
||||||
modulesPath,
|
modulesPath,
|
||||||
...
|
...
|
||||||
}: {
|
}:
|
||||||
|
{
|
||||||
imports = [
|
imports = [
|
||||||
(modulesPath + "/profiles/qemu-guest.nix")
|
(modulesPath + "/profiles/qemu-guest.nix")
|
||||||
];
|
];
|
||||||
|
|
|
||||||
|
|
@ -2,15 +2,12 @@
|
||||||
inputs,
|
inputs,
|
||||||
lib,
|
lib,
|
||||||
pkgs,
|
pkgs,
|
||||||
}: let
|
}:
|
||||||
gwsPackage =
|
let
|
||||||
inputs.googleworkspace-cli.packages.${pkgs.stdenv.hostPlatform.system}.default;
|
gwsPackage = inputs.googleworkspace-cli.packages.${pkgs.stdenv.hostPlatform.system}.default;
|
||||||
claudePackage =
|
claudePackage = inputs.claudeCode.packages.${pkgs.stdenv.hostPlatform.system}.default;
|
||||||
inputs.claudeCode.packages.${pkgs.stdenv.hostPlatform.system}.default;
|
agentcomputerPackage = inputs.agentcomputer-cli.packages.${pkgs.stdenv.hostPlatform.system}.default;
|
||||||
agentcomputerPackage =
|
openspecPackage = inputs.openspec.packages.${pkgs.stdenv.hostPlatform.system}.default;
|
||||||
inputs.agentcomputer-cli.packages.${pkgs.stdenv.hostPlatform.system}.default;
|
|
||||||
openspecPackage =
|
|
||||||
inputs.openspec.packages.${pkgs.stdenv.hostPlatform.system}.default;
|
|
||||||
|
|
||||||
memex = pkgs.stdenvNoCC.mkDerivation rec {
|
memex = pkgs.stdenvNoCC.mkDerivation rec {
|
||||||
pname = "memex";
|
pname = "memex";
|
||||||
|
|
@ -76,12 +73,16 @@
|
||||||
meta = {
|
meta = {
|
||||||
description = "CLI for Git worktree management";
|
description = "CLI for Git worktree management";
|
||||||
homepage = "https://worktrunk.dev";
|
homepage = "https://worktrunk.dev";
|
||||||
license = with lib.licenses; [asl20 mit];
|
license = with lib.licenses; [
|
||||||
|
asl20
|
||||||
|
mit
|
||||||
|
];
|
||||||
mainProgram = "wt";
|
mainProgram = "wt";
|
||||||
platforms = lib.platforms.darwin;
|
platforms = lib.platforms.darwin;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
in {
|
in
|
||||||
|
{
|
||||||
core = with pkgs; [
|
core = with pkgs; [
|
||||||
bitwarden-cli
|
bitwarden-cli
|
||||||
curl
|
curl
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,5 @@
|
||||||
{config, ...}: let
|
{ config, ... }:
|
||||||
|
let
|
||||||
defaultMode = "dark";
|
defaultMode = "dark";
|
||||||
sharedPalette = {
|
sharedPalette = {
|
||||||
red = "#ea6962";
|
red = "#ea6962";
|
||||||
|
|
@ -93,14 +94,17 @@
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
renderGhostty = mode: let
|
renderGhostty =
|
||||||
|
mode:
|
||||||
|
let
|
||||||
theme = themes.${mode};
|
theme = themes.${mode};
|
||||||
paletteLines =
|
paletteLines = builtins.concatStringsSep "\n" (
|
||||||
builtins.concatStringsSep "\n"
|
builtins.genList (index: "palette = ${toString index}=${builtins.elemAt theme.palette index}") (
|
||||||
(builtins.genList
|
builtins.length theme.palette
|
||||||
(index: "palette = ${toString index}=${builtins.elemAt theme.palette index}")
|
)
|
||||||
(builtins.length theme.palette));
|
);
|
||||||
in ''
|
in
|
||||||
|
''
|
||||||
background = ${theme.background}
|
background = ${theme.background}
|
||||||
foreground = ${theme.foreground}
|
foreground = ${theme.foreground}
|
||||||
cursor-color = ${theme.cursorColor}
|
cursor-color = ${theme.cursorColor}
|
||||||
|
|
@ -110,9 +114,12 @@
|
||||||
${paletteLines}
|
${paletteLines}
|
||||||
'';
|
'';
|
||||||
|
|
||||||
renderTmux = mode: let
|
renderTmux =
|
||||||
|
mode:
|
||||||
|
let
|
||||||
theme = themes.${mode};
|
theme = themes.${mode};
|
||||||
in ''
|
in
|
||||||
|
''
|
||||||
set-option -g @cozybox-mode '${mode}'
|
set-option -g @cozybox-mode '${mode}'
|
||||||
set-option -g @cozybox-accent '${theme.purple}'
|
set-option -g @cozybox-accent '${theme.purple}'
|
||||||
set-option -g status-style bg=${theme.background},fg=${theme.text}
|
set-option -g status-style bg=${theme.background},fg=${theme.text}
|
||||||
|
|
@ -123,13 +130,24 @@
|
||||||
set-option -g pane-active-border-style fg=${theme.border}
|
set-option -g pane-active-border-style fg=${theme.border}
|
||||||
'';
|
'';
|
||||||
|
|
||||||
renderFzf = mode: let
|
renderFzf =
|
||||||
|
mode:
|
||||||
|
let
|
||||||
theme = themes.${mode};
|
theme = themes.${mode};
|
||||||
in ''
|
in
|
||||||
|
''
|
||||||
--color=fg:${theme.text},bg:${theme.background},hl:${theme.blue}
|
--color=fg:${theme.text},bg:${theme.background},hl:${theme.blue}
|
||||||
--color=fg+:${theme.text},bg+:${theme.surface},hl+:${theme.blue}
|
--color=fg+:${theme.text},bg+:${theme.surface},hl+:${theme.blue}
|
||||||
--color=info:${theme.green},prompt:${theme.blue},pointer:${theme.text},marker:${theme.green},spinner:${theme.text}
|
--color=info:${theme.green},prompt:${theme.blue},pointer:${theme.text},marker:${theme.green},spinner:${theme.text}
|
||||||
'';
|
'';
|
||||||
in {
|
in
|
||||||
inherit defaultMode paths renderFzf renderGhostty renderTmux themes;
|
{
|
||||||
|
inherit
|
||||||
|
defaultMode
|
||||||
|
paths
|
||||||
|
renderFzf
|
||||||
|
renderGhostty
|
||||||
|
renderTmux
|
||||||
|
themes
|
||||||
|
;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -4,9 +4,11 @@
|
||||||
pkgs,
|
pkgs,
|
||||||
username,
|
username,
|
||||||
...
|
...
|
||||||
}: let
|
}:
|
||||||
|
let
|
||||||
packageSets = import ../lib/package-sets.nix { inherit inputs lib pkgs; };
|
packageSets = import ../lib/package-sets.nix { inherit inputs lib pkgs; };
|
||||||
in {
|
in
|
||||||
|
{
|
||||||
nix.enable = true;
|
nix.enable = true;
|
||||||
|
|
||||||
nix.settings = {
|
nix.settings = {
|
||||||
|
|
@ -22,8 +24,7 @@ in {
|
||||||
use-xdg-base-directories = true;
|
use-xdg-base-directories = true;
|
||||||
};
|
};
|
||||||
|
|
||||||
nix.gc =
|
nix.gc = {
|
||||||
{
|
|
||||||
automatic = true;
|
automatic = true;
|
||||||
options = "--delete-older-than 14d";
|
options = "--delete-older-than 14d";
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,5 @@
|
||||||
{...}: {
|
{ ... }:
|
||||||
|
{
|
||||||
homebrew = {
|
homebrew = {
|
||||||
enable = true;
|
enable = true;
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,5 @@
|
||||||
{...}: {
|
{ ... }:
|
||||||
|
{
|
||||||
security.pam.services.sudo_local.touchIdAuth = true;
|
security.pam.services.sudo_local.touchIdAuth = true;
|
||||||
|
|
||||||
# Karabiner-Elements is managed via Homebrew cask because nix-darwin's
|
# Karabiner-Elements is managed via Homebrew cask because nix-darwin's
|
||||||
|
|
|
||||||
|
|
@ -20,9 +20,7 @@ let
|
||||||
hostname = host.hostname;
|
hostname = host.hostname;
|
||||||
};
|
};
|
||||||
|
|
||||||
mkHomeManagerModule =
|
mkHomeManagerModule = host: {
|
||||||
host:
|
|
||||||
{
|
|
||||||
home-manager.useGlobalPkgs = true;
|
home-manager.useGlobalPkgs = true;
|
||||||
home-manager.useUserPackages = true;
|
home-manager.useUserPackages = true;
|
||||||
home-manager.extraSpecialArgs = mkSpecialArgs host;
|
home-manager.extraSpecialArgs = mkSpecialArgs host;
|
||||||
|
|
|
||||||
|
|
@ -3,9 +3,11 @@
|
||||||
lib,
|
lib,
|
||||||
pkgs,
|
pkgs,
|
||||||
...
|
...
|
||||||
}: let
|
}:
|
||||||
|
let
|
||||||
packageSets = import ../lib/package-sets.nix { inherit inputs lib pkgs; };
|
packageSets = import ../lib/package-sets.nix { inherit inputs lib pkgs; };
|
||||||
in {
|
in
|
||||||
|
{
|
||||||
environment.systemPackages = packageSets.extras;
|
environment.systemPackages = packageSets.extras;
|
||||||
fonts.packages = packageSets.fonts;
|
fonts.packages = packageSets.fonts;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -2,7 +2,8 @@
|
||||||
config,
|
config,
|
||||||
lib,
|
lib,
|
||||||
pkgs,
|
pkgs,
|
||||||
}: let
|
}:
|
||||||
|
let
|
||||||
theme = import ../lib/theme.nix { inherit config; };
|
theme = import ../lib/theme.nix { inherit config; };
|
||||||
|
|
||||||
tmuxConfigs = {
|
tmuxConfigs = {
|
||||||
|
|
@ -10,7 +11,8 @@
|
||||||
light = pkgs.writeText "tmux-theme-light.conf" (theme.renderTmux "light");
|
light = pkgs.writeText "tmux-theme-light.conf" (theme.renderTmux "light");
|
||||||
};
|
};
|
||||||
|
|
||||||
mkScript = {
|
mkScript =
|
||||||
|
{
|
||||||
file,
|
file,
|
||||||
name,
|
name,
|
||||||
runtimeInputs ? [ ],
|
runtimeInputs ? [ ],
|
||||||
|
|
@ -18,11 +20,9 @@
|
||||||
}:
|
}:
|
||||||
pkgs.writeShellApplication {
|
pkgs.writeShellApplication {
|
||||||
inherit name runtimeInputs;
|
inherit name runtimeInputs;
|
||||||
text =
|
text = lib.replaceStrings (builtins.attrNames replacements) (builtins.attrValues replacements) (
|
||||||
lib.replaceStrings
|
builtins.readFile file
|
||||||
(builtins.attrNames replacements)
|
);
|
||||||
(builtins.attrValues replacements)
|
|
||||||
(builtins.readFile file);
|
|
||||||
};
|
};
|
||||||
|
|
||||||
packages = {
|
packages = {
|
||||||
|
|
@ -35,19 +35,34 @@
|
||||||
ghpr = mkScript {
|
ghpr = mkScript {
|
||||||
name = "ghpr";
|
name = "ghpr";
|
||||||
file = ./ghpr.sh;
|
file = ./ghpr.sh;
|
||||||
runtimeInputs = with pkgs; [gh git gnugrep gnused coreutils];
|
runtimeInputs = with pkgs; [
|
||||||
|
gh
|
||||||
|
git
|
||||||
|
gnugrep
|
||||||
|
gnused
|
||||||
|
coreutils
|
||||||
|
];
|
||||||
};
|
};
|
||||||
|
|
||||||
gpr = mkScript {
|
gpr = mkScript {
|
||||||
name = "gpr";
|
name = "gpr";
|
||||||
file = ./gpr.sh;
|
file = ./gpr.sh;
|
||||||
runtimeInputs = with pkgs; [gh fzf gnugrep coreutils];
|
runtimeInputs = with pkgs; [
|
||||||
|
gh
|
||||||
|
fzf
|
||||||
|
gnugrep
|
||||||
|
coreutils
|
||||||
|
];
|
||||||
};
|
};
|
||||||
|
|
||||||
iosrun = mkScript {
|
iosrun = mkScript {
|
||||||
name = "iosrun";
|
name = "iosrun";
|
||||||
file = ./iosrun.sh;
|
file = ./iosrun.sh;
|
||||||
runtimeInputs = with pkgs; [findutils gnugrep coreutils];
|
runtimeInputs = with pkgs; [
|
||||||
|
findutils
|
||||||
|
gnugrep
|
||||||
|
coreutils
|
||||||
|
];
|
||||||
};
|
};
|
||||||
|
|
||||||
mdview = mkScript {
|
mdview = mkScript {
|
||||||
|
|
@ -64,7 +79,12 @@
|
||||||
theme = mkScript {
|
theme = mkScript {
|
||||||
name = "theme";
|
name = "theme";
|
||||||
file = ./theme.sh;
|
file = ./theme.sh;
|
||||||
runtimeInputs = with pkgs; [coreutils findutils neovim tmux];
|
runtimeInputs = with pkgs; [
|
||||||
|
coreutils
|
||||||
|
findutils
|
||||||
|
neovim
|
||||||
|
tmux
|
||||||
|
];
|
||||||
replacements = {
|
replacements = {
|
||||||
"@DEFAULT_MODE@" = theme.defaultMode;
|
"@DEFAULT_MODE@" = theme.defaultMode;
|
||||||
"@STATE_DIR@" = theme.paths.stateDir;
|
"@STATE_DIR@" = theme.paths.stateDir;
|
||||||
|
|
@ -90,6 +110,7 @@
|
||||||
file = ./wtc.sh;
|
file = ./wtc.sh;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
in {
|
in
|
||||||
|
{
|
||||||
inherit packages theme tmuxConfigs;
|
inherit packages theme tmuxConfigs;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue