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];
};
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 ];

View file

@ -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

View file

@ -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"

View file

@ -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" })

View file

@ -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;
}