use flake for direnv templates by default

This commit is contained in:
2026-06-18 20:42:36 +02:00
parent e974cceec6
commit 82eaa21709
7 changed files with 139 additions and 31 deletions
+25 -16
View File
@@ -38,6 +38,15 @@ layout {
}
}
workspace "1"
workspace "2"
workspace "3"
workspace "4"
workspace "5"
workspace "6"
workspace "7"
workspace "8"
prefer-no-csd
screenshot-path "~/Pictures/Screenshots/%Y-%m-%d_%H-%M-%S.png"
@@ -83,23 +92,23 @@ binds {
Mod+Minus hotkey-overlay-title="Shrink column" { set-column-width "-10%"; }
Mod+Shift+Minus hotkey-overlay-title="Grow column" { set-column-width "+10%"; }
Mod+1 { focus-workspace 1; }
Mod+2 { focus-workspace 2; }
Mod+3 { focus-workspace 3; }
Mod+4 { focus-workspace 4; }
Mod+5 { focus-workspace 5; }
Mod+6 { focus-workspace 6; }
Mod+7 { focus-workspace 7; }
Mod+8 { focus-workspace 8; }
Mod+1 { focus-workspace "1"; }
Mod+2 { focus-workspace "2"; }
Mod+3 { focus-workspace "3"; }
Mod+4 { focus-workspace "4"; }
Mod+5 { focus-workspace "5"; }
Mod+6 { focus-workspace "6"; }
Mod+7 { focus-workspace "7"; }
Mod+8 { focus-workspace "8"; }
Mod+Ctrl+1 { move-column-to-workspace 1; }
Mod+Ctrl+2 { move-column-to-workspace 2; }
Mod+Ctrl+3 { move-column-to-workspace 3; }
Mod+Ctrl+4 { move-column-to-workspace 4; }
Mod+Ctrl+5 { move-column-to-workspace 5; }
Mod+Ctrl+6 { move-column-to-workspace 6; }
Mod+Ctrl+7 { move-column-to-workspace 7; }
Mod+Ctrl+8 { move-column-to-workspace 8; }
Mod+Shift+1 { move-column-to-workspace "1"; }
Mod+Shift+2 { move-column-to-workspace "2"; }
Mod+Shift+3 { move-column-to-workspace "3"; }
Mod+Shift+4 { move-column-to-workspace "4"; }
Mod+Shift+5 { move-column-to-workspace "5"; }
Mod+Shift+6 { move-column-to-workspace "6"; }
Mod+Shift+7 { move-column-to-workspace "7"; }
Mod+Shift+8 { move-column-to-workspace "8"; }
Mod+WheelScrollDown cooldown-ms=150 { focus-workspace-down; }
Mod+WheelScrollUp cooldown-ms=150 { focus-workspace-up; }
Generated
+3 -3
View File
@@ -23,11 +23,11 @@
},
"nixpkgs": {
"locked": {
"lastModified": 1780902259,
"narHash": "sha256-q8yYEC5f1mFlQO9RGna4LTc9QrcvWunX6FYp83munkQ=",
"lastModified": 1781216227,
"narHash": "sha256-9mUW6gNwoN2SWc/l0fW4svPNOulXLl8ijqKyeSOGgJE=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "bd0ff2d3eac24699c3664d5966b9ef36f388e2ca",
"rev": "a0374025a863d007d98e3297f6aa46cc3141c2f0",
"type": "github"
},
"original": {
+17 -12
View File
@@ -54,7 +54,7 @@
}
function mkenv() {
local template="$HOME/nixos-dotfiles/templates/shell-''${1}.nix"
local template="$HOME/nixos-dotfiles/templates/flake-''${1}.nix"
if [[ -z "$1" ]]; then
echo "Usage: mkenv <python|go|ts|csharp>"
return 1
@@ -63,14 +63,15 @@
echo "No template for '$1'. Available: python, go, ts, csharp"
return 1
fi
if [[ -f shell.nix ]]; then
echo "shell.nix already exists"
if [[ -f flake.nix ]]; then
echo "flake.nix already exists"
return 1
fi
cp "$template" shell.nix
echo "use nix" > .envrc
cp "$template" flake.nix
nix flake lock
echo "use flake" > .envrc
direnv allow
echo "Created shell.nix and .envrc for $1"
echo "Created flake.nix, flake.lock, and .envrc for $1"
}
function y() {
@@ -177,6 +178,7 @@
home.sessionVariables = {
_ZO_FZF_OPTS = "--preview 'eza --tree --level=2 --color=always {2..}' --preview-window=right:40%";
NIX_BUILD_SHELL = "zsh";
NIXOS_OZONE_WL = "1";
};
# ── Git ─────────────────────────────────────────────────────────────────────
@@ -256,14 +258,15 @@
services.mako = {
enable = true;
settings = {
background-color = "#0a0a0a";
background-color = "#0a0a0a99";
text-color = "#f3eeea";
border-color = "#cd0a00";
border-radius = 4;
border-size = 2;
default-timeout = 5000;
max-icon-size = 48;
border-radius = 8;
border-size = 1;
default-timeout = 7500;
max-icon-size = 64;
padding = "10,14";
font = "JetBrains Mono 12";
};
};
@@ -297,14 +300,16 @@
telegram-desktop # Messaging
signal-desktop # Messaging
vesktop # Messaging (discord)
karere # Messaging (WhatsApp)
# terminal
foot # terminal
tmux # terminal multiplexer
btop # resource monitor
htop # process viewer
fd # fast find alternative
ripgrep # fast grep alternative
asciinema # terminal recording
# file managers
yazi # terminal file manager
+22
View File
@@ -0,0 +1,22 @@
{
description = "C# dev shell";
inputs = {
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
flake-utils.url = "github:numtide/flake-utils";
};
outputs = { self, nixpkgs, flake-utils }:
flake-utils.lib.eachDefaultSystem (system:
let
pkgs = import nixpkgs { inherit system; };
in {
devShells.default = pkgs.mkShell {
packages = with pkgs; [
dotnet-sdk
omnisharp-roslyn
# add project-specific packages below
];
};
});
}
+24
View File
@@ -0,0 +1,24 @@
{
description = "Go dev shell";
inputs = {
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
flake-utils.url = "github:numtide/flake-utils";
};
outputs = { self, nixpkgs, flake-utils }:
flake-utils.lib.eachDefaultSystem (system:
let
pkgs = import nixpkgs { inherit system; };
in {
devShells.default = pkgs.mkShell {
packages = with pkgs; [
go
gopls
gofumpt
revive
# add project-specific packages below
];
};
});
}
+23
View File
@@ -0,0 +1,23 @@
{
description = "Python dev shell";
inputs = {
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
flake-utils.url = "github:numtide/flake-utils";
};
outputs = { self, nixpkgs, flake-utils }:
flake-utils.lib.eachDefaultSystem (system:
let
pkgs = import nixpkgs { inherit system; };
in {
devShells.default = pkgs.mkShell {
packages = with pkgs; [
pyright
black
python3Packages.flake8
# add project-specific packages below
];
};
});
}
+25
View File
@@ -0,0 +1,25 @@
{
description = "TypeScript dev shell";
inputs = {
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
flake-utils.url = "github:numtide/flake-utils";
};
outputs = { self, nixpkgs, flake-utils }:
flake-utils.lib.eachDefaultSystem (system:
let
pkgs = import nixpkgs { inherit system; };
in {
devShells.default = pkgs.mkShell {
packages = with pkgs; [
nodejs
vtsls
prettierd
eslint_d
fixjson
# add project-specific packages below
];
};
});
}