diff --git a/flake.nix b/flake.nix index cc97346..296d82b 100644 --- a/flake.nix +++ b/flake.nix @@ -44,6 +44,12 @@ modules = [./hosts/dnsc-air]; }; + darwinConfigurations.dnsc-work = nix-darwin.lib.darwinSystem { + system = "aarch64-darwin"; + specialArgs = {inherit inputs outputs;}; + modules = [./hosts/dnsc-work]; + }; + homeConfigurations."dnsc-deck" = home-manager.lib.homeManagerConfiguration { pkgs = nixpkgs.legacyPackages.x86_64-linux; modules = [ ./home/deck.nix ]; diff --git a/home/darwin-work.nix b/home/darwin-work.nix index d4b0cb5..c841e62 100644 --- a/home/darwin-work.nix +++ b/home/darwin-work.nix @@ -2,9 +2,8 @@ { home.username = "dennis"; - home.homeDirectory = "/Users/dennis"; home.stateVersion = "24.11"; - + home.homeDirectory = "/Users/dennis"; home.sessionVariables = { EDITOR = "nvim"; GOPATH = "$HOME/go"; @@ -16,7 +15,7 @@ imports = [ ./modules/git - ./modules/fish/work + ./modules/fish/work.nix ./modules/atuin ./modules/wezterm ./modules/nvim diff --git a/home/modules/fish/work.nix b/home/modules/fish/work.nix index a4289be..9637641 100644 --- a/home/modules/fish/work.nix +++ b/home/modules/fish/work.nix @@ -1,11 +1,57 @@ -{ - programs.fish = { +{ programs.fish = { enable = true; functions = { - # TODO: Add these two functions from work config - cdr = ''''; - rr = ''''; + cdr = '' + set folder (begin + fd . ~/dev/ride/apps/backend/edge-services -t d -d 1; + fd . ~/dev/ride/apps/backend/backend-services -t d -d 1; + fd . ~/dev/ride/apps/backend/backend-services/tariff-service -t d -d 1; + fd . ~/dev/ride/apps/backend/backend-services/wallet-service -t d -d 1; + fd . ~/dev/ride/apps/frontend/projects -t d -d 1; + fd . ~/dev/ride/apps/native -t d -d 1; + fd . ~/dev/ride/packages -t d -d 1; + echo "$HOME/dev/ride/apps/frontend"; + echo "$HOME/dev/ride/apps/lib"; + echo "$HOME/dev/ride"; + end | fzf); + set service (basename $folder) + + cd $folder + ''; + rr = '' + set folder (begin + fd . ~/dev/ride/apps/backend/edge-services -t d -d 1; + fd . ~/dev/ride/apps/backend/backend-services -t d -d 1; + fd . ~/dev/ride/apps/backend/backend-services/tariff-service -t d -d 1; + fd . ~/dev/ride/apps/backend/backend-services/wallet-service -t d -d 1; + fd . ~/dev/ride/apps/frontend/projects -t d -d 1; + fd . ~/dev/ride/apps/native -t d -d 1; + echo "$HOME/dev/ride/apps/frontend"; + echo "$HOME/dev/ride/apps/lib"; + echo "$HOME/dev/ride"; + end | fzf); + + if test -n "$folder" + set service (basename $folder) + cd $folder + + # Check if package.json exists + if test -f "package.json" + # Extract and format npm scripts for fzf + set script_cmd (jq -r '.scripts | to_entries | .[] | "\(.key): \(.value)"' package.json | fzf) + + if test -n "$script_cmd" + # Extract just the script name before the colon + set script_name (string split ": " $script_cmd)[1] + if test -n "$script_name" + echo "Running: npm run $script_name" + npm run $script_name + end + end + end + end + ''; ff = '' set RG_PREFIX "rg --column --line-number --no-heading --color=always --smart-case " set INITIAL_QUERY "$argv" diff --git a/home/modules/wezterm/config/overrides.lua b/home/modules/wezterm/config/overrides.lua index 9ceee1f..64402cf 100644 --- a/home/modules/wezterm/config/overrides.lua +++ b/home/modules/wezterm/config/overrides.lua @@ -5,8 +5,9 @@ local helpers = require("helpers") local M = {} function M.apply_to_config(config) - --if hn == "macbook.digital-h.de" then - --end + if hn == "dnsc-work" then + config.window_background_opacity = 0.9 + end if hn == "dnsc-desktop" then config.font = wezterm.font("Victor Mono", { weight = "DemiBold" }) diff --git a/hosts/dnsc-work/default.nix b/hosts/dnsc-work/default.nix index bf682d7..06b5f7c 100644 --- a/hosts/dnsc-work/default.nix +++ b/hosts/dnsc-work/default.nix @@ -20,8 +20,6 @@ description = "Dennis Schoepf"; }; - nix.settings.trusted-users = [ "dennis" ]; - nixpkgs.config.allowUnfree = true; # System Packages @@ -57,10 +55,6 @@ cleanup = "zap"; }; - taps = [ - "homebrew/services" - ]; - masApps = { Bitwarden = 1352778147; XCode = 497799835; @@ -79,12 +73,22 @@ "imagemagick" "todo-txt" "watchman" + "pnpm" + "pkg-config" + "cairo" + "pango" + "libpng" + "jpeg" + "giflib" + "librsvg" + "pixman" + "python-setuptools" ]; casks = [ "arc" "microsoft-teams" - "zen-browser" + "tailscale" "font-victor-mono" "font-victor-mono-nerd-font" "vlc" @@ -173,12 +177,6 @@ }; # Nix settings - # Enable new Nix CLI and flakes - nix.settings.experimental-features = [ "nix-command" "flakes" ]; - - nix.package = pkgs.nix; - nix.gc = { - automatic = true; - options = "--delete-older-than 1w"; - }; + # Use determinate systems + nix.enable = false; }