Merge branch 'main' of codeberg.org:dnscio/nix-config

This commit is contained in:
Dennis Schoepf 2025-05-11 19:18:09 +02:00
commit 0fe2f7853c
5 changed files with 75 additions and 25 deletions

View file

@ -44,6 +44,12 @@
modules = [./hosts/dnsc-air]; 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 { homeConfigurations."dnsc-deck" = home-manager.lib.homeManagerConfiguration {
pkgs = nixpkgs.legacyPackages.x86_64-linux; pkgs = nixpkgs.legacyPackages.x86_64-linux;
modules = [ ./home/deck.nix ]; modules = [ ./home/deck.nix ];

View file

@ -2,9 +2,8 @@
{ {
home.username = "dennis"; home.username = "dennis";
home.homeDirectory = "/Users/dennis";
home.stateVersion = "24.11"; home.stateVersion = "24.11";
home.homeDirectory = "/Users/dennis";
home.sessionVariables = { home.sessionVariables = {
EDITOR = "nvim"; EDITOR = "nvim";
GOPATH = "$HOME/go"; GOPATH = "$HOME/go";
@ -16,7 +15,7 @@
imports = [ imports = [
./modules/git ./modules/git
./modules/fish/work ./modules/fish/work.nix
./modules/atuin ./modules/atuin
./modules/wezterm ./modules/wezterm
./modules/nvim ./modules/nvim

View file

@ -1,11 +1,57 @@
{ { programs.fish = {
programs.fish = {
enable = true; enable = true;
functions = { functions = {
# TODO: Add these two functions from work config cdr = ''
cdr = ''''; set folder (begin
rr = ''''; 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 = '' ff = ''
set RG_PREFIX "rg --column --line-number --no-heading --color=always --smart-case " set RG_PREFIX "rg --column --line-number --no-heading --color=always --smart-case "
set INITIAL_QUERY "$argv" set INITIAL_QUERY "$argv"

View file

@ -5,8 +5,9 @@ local helpers = require("helpers")
local M = {} local M = {}
function M.apply_to_config(config) function M.apply_to_config(config)
--if hn == "macbook.digital-h.de" then if hn == "dnsc-work" then
--end config.window_background_opacity = 0.9
end
if hn == "dnsc-desktop" then if hn == "dnsc-desktop" then
config.font = wezterm.font("Victor Mono", { weight = "DemiBold" }) config.font = wezterm.font("Victor Mono", { weight = "DemiBold" })

View file

@ -20,8 +20,6 @@
description = "Dennis Schoepf"; description = "Dennis Schoepf";
}; };
nix.settings.trusted-users = [ "dennis" ];
nixpkgs.config.allowUnfree = true; nixpkgs.config.allowUnfree = true;
# System Packages # System Packages
@ -57,10 +55,6 @@
cleanup = "zap"; cleanup = "zap";
}; };
taps = [
"homebrew/services"
];
masApps = { masApps = {
Bitwarden = 1352778147; Bitwarden = 1352778147;
XCode = 497799835; XCode = 497799835;
@ -79,12 +73,22 @@
"imagemagick" "imagemagick"
"todo-txt" "todo-txt"
"watchman" "watchman"
"pnpm"
"pkg-config"
"cairo"
"pango"
"libpng"
"jpeg"
"giflib"
"librsvg"
"pixman"
"python-setuptools"
]; ];
casks = [ casks = [
"arc" "arc"
"microsoft-teams" "microsoft-teams"
"zen-browser" "tailscale"
"font-victor-mono" "font-victor-mono"
"font-victor-mono-nerd-font" "font-victor-mono-nerd-font"
"vlc" "vlc"
@ -173,12 +177,6 @@
}; };
# Nix settings # Nix settings
# Enable new Nix CLI and flakes # Use determinate systems
nix.settings.experimental-features = [ "nix-command" "flakes" ]; nix.enable = false;
nix.package = pkgs.nix;
nix.gc = {
automatic = true;
options = "--delete-older-than 1w";
};
} }