Remove kutu flake and cleanup.

This commit is contained in:
2026-09-10 21:29:40 +01:00
parent 8d088589b4
commit 48e6eaa112
6 changed files with 139 additions and 45 deletions
Generated
+1 -36
View File
@@ -20,41 +20,7 @@
"type": "github" "type": "github"
} }
}, },
"kutu": {
"inputs": {
"nixpkgs": "nixpkgs"
},
"locked": {
"lastModified": 1783461814,
"narHash": "sha256-ycpzjXjMey4PlAFYeprz2nHI2azxkvEn3wNvHee+Yh0=",
"ref": "refs/heads/main",
"rev": "4b8599132f26d75bddfe613bcf9697ce0f91d212",
"revCount": 40,
"type": "git",
"url": "https://git.syedm.dev/syedm/kutu.rb.git"
},
"original": {
"type": "git",
"url": "https://git.syedm.dev/syedm/kutu.rb.git"
}
},
"nixpkgs": { "nixpkgs": {
"locked": {
"lastModified": 1783148766,
"narHash": "sha256-uslt2pqShTIXDdAHRHv2QkYLsVdY8Oqwz0EA48/RSM8=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "a50de1b7d8a586adc18d2395c19de7d6058e6030",
"type": "github"
},
"original": {
"owner": "NixOS",
"ref": "nixos-26.05",
"repo": "nixpkgs",
"type": "github"
}
},
"nixpkgs_2": {
"locked": { "locked": {
"lastModified": 1788179007, "lastModified": 1788179007,
"narHash": "sha256-hn1oU2rue2SYK8dAr8+WNZWtbsz1S2W5mnHlSEuh3bo=", "narHash": "sha256-hn1oU2rue2SYK8dAr8+WNZWtbsz1S2W5mnHlSEuh3bo=",
@@ -73,8 +39,7 @@
"root": { "root": {
"inputs": { "inputs": {
"home-manager": "home-manager", "home-manager": "home-manager",
"kutu": "kutu", "nixpkgs": "nixpkgs"
"nixpkgs": "nixpkgs_2"
} }
} }
}, },
-4
View File
@@ -2,8 +2,6 @@
inputs = { inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable"; nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
kutu.url = "git+https://git.syedm.dev/syedm/kutu.rb.git";
home-manager = { home-manager = {
url = "github:nix-community/home-manager"; url = "github:nix-community/home-manager";
inputs.nixpkgs.follows = "nixpkgs"; inputs.nixpkgs.follows = "nixpkgs";
@@ -12,7 +10,6 @@
outputs = outputs =
{ {
kutu,
nixpkgs, nixpkgs,
home-manager, home-manager,
... ...
@@ -42,7 +39,6 @@
tardis = nixpkgs.lib.nixosSystem { tardis = nixpkgs.lib.nixosSystem {
inherit system; inherit system;
specialArgs = { inherit kutu; };
modules = commonModules ++ [ modules = commonModules ++ [
./hosts/tardis ./hosts/tardis
{ home-manager.users.me = import ./home/tardis.nix; } { home-manager.users.me = import ./home/tardis.nix; }
+133
View File
@@ -1,3 +1,135 @@
# ==== State ====
MAX_PROJECTS = 9
SUBS = 2 # workspaces per project
$current_project = 1 # 1..MAX_PROJECTS
$current_sub = 0 # 0..SUBS-1
# For each special workspace, remembers which workspace you were on
# before you jumped into it -- so hitting the mode key again toggles back.
$special_origin = {}
SPECIAL = {
terminal: { cmd: "kitty" },
browser: { cmd: "firefox" },
music: { cmd: "spotify" },
misc: { cmd: nil }, # doesn't start anything
todo: { cmd: nil }, # doesn't start anything
}
# ==== Helpers ====
def project_ws(n, sub)
:"p#{n}_#{sub}"
end
def running?(process)
system("pgrep #{process} > /dev/null 2>&1")
end
def go_project(n, sub)
$current_project = n
$current_sub = sub
jump_ws project_ws(n, sub)
end
def in_project?(ws)
!SPECIAL.key?(ws)
end
# Toggle between a special-mode workspace (terminal/browser/music/misc/todo)
# and whatever workspace you were last on. Starts the associated app if
# it isn't already running. `ws` is the current workspace, passed in by
# the bind block (bind gives us (window, current_ws)).
def go_special(name, ws)
cfg = SPECIAL.fetch(name)
if ws == name
target = $special_origin[name] || project_ws($current_project, $current_sub)
jump_ws target
else
$special_origin[name] = ws
jump_ws name
system("#{cfg[:cmd]} >/dev/null 2>&1 &") if cfg[:cmd] && !running?(cfg[:cmd])
end
end
# ==== Untouched bindings ====
bind ?q do |x|
kill x
end
bind ?w do
system "kitty >/dev/null 2>&1 &"
end
bind ?e do
exit
end
bind ?f do |x|
toggle_float x
end
# ==== Mode switches ====
bind ?[ do |_, ws|
go_special :terminal, ws
end
bind ?] do |_, ws|
go_special :misc, ws
end
bind "tab" do |_, ws|
go_special :browser, ws
end
bind 89 do |_, ws|
go_special :music, ws
end
bind 81 do |_, ws|
go_special :todo, ws
end
# ==== Project navigation ====
(1..MAX_PROJECTS).each do |n|
bind n.to_s do
go_project(n, $current_sub)
end
end
bind 86, :none do |_, ws|
next unless in_project?(ws)
n = (($current_project - 2) % MAX_PROJECTS) + 1
go_project(n, $current_sub)
end
bind 82, :none do |_, ws|
next unless in_project?(ws)
n = ($current_project % MAX_PROJECTS) + 1
go_project(n, $current_sub)
end
bind 79, :none do |_, ws|
next unless in_project?(ws)
go_project($current_project, ($current_sub + 1) % SUBS)
end
bind 80, :none do |_, ws|
next unless in_project?(ws)
go_project($current_project, ($current_sub - 1 + SUBS) % SUBS)
end
# ==== Startup ====
go_project(1, 0)
=begin
run "bash @src@/startup.sh" run "bash @src@/startup.sh"
bind_key 23, true, "firefox" bind_key 23, true, "firefox"
@@ -89,3 +221,4 @@ bind_mouse 8, true, :move_window_next_workspace
bind_mouse 9, false, :workspace_previous bind_mouse 9, false, :workspace_previous
bind_mouse 9, true, :move_window_previous_workspace bind_mouse 9, true, :move_window_previous_workspace
=end
+1 -1
View File
@@ -12,7 +12,7 @@
xsession = { xsession = {
enable = true; enable = true;
windowManager.command = "kutu.rb"; windowManager.command = "kutu ~/main/ocaml/epq/config.rb";
}; };
home.file.".xinitrc".text = '' home.file.".xinitrc".text = ''
-3
View File
@@ -1,5 +1,4 @@
{ {
kutu,
lib, lib,
pkgs, pkgs,
... ...
@@ -31,8 +30,6 @@
lunar-client lunar-client
jdk21 jdk21
spotify spotify
kutu.packages.${stdenv.hostPlatform.system}.default
] ]
); );
+4 -1
View File
@@ -4,7 +4,10 @@
services.ollama = { services.ollama = {
enable = true; enable = true;
package = pkgs.ollama-cuda; package = pkgs.ollama-cuda;
loadModels = [ "deepseek-coder-v2:16b" "qwen3.5:9b" ]; loadModels = [
"deepseek-coder-v2:16b"
"qwen3.5:9b"
];
environmentVariables = { environmentVariables = {
OLLAMA_KEEP_ALIVE = "20m"; OLLAMA_KEEP_ALIVE = "20m";
}; };