diff --git a/config/niri/config.kdl b/config/niri/config.kdl index d1c814b..3654b55 100644 --- a/config/niri/config.kdl +++ b/config/niri/config.kdl @@ -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; } diff --git a/flake.lock b/flake.lock index c7b3280..24c3a65 100644 --- a/flake.lock +++ b/flake.lock @@ -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": { diff --git a/home.nix b/home.nix index cb369da..6e9772a 100644 --- a/home.nix +++ b/home.nix @@ -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 " 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 diff --git a/templates/flake-csharp.nix b/templates/flake-csharp.nix new file mode 100644 index 0000000..19914ea --- /dev/null +++ b/templates/flake-csharp.nix @@ -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 + ]; + }; + }); +} diff --git a/templates/flake-go.nix b/templates/flake-go.nix new file mode 100644 index 0000000..26e248a --- /dev/null +++ b/templates/flake-go.nix @@ -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 + ]; + }; + }); +} diff --git a/templates/flake-python.nix b/templates/flake-python.nix new file mode 100644 index 0000000..00ccdae --- /dev/null +++ b/templates/flake-python.nix @@ -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 + ]; + }; + }); +} diff --git a/templates/flake-ts.nix b/templates/flake-ts.nix new file mode 100644 index 0000000..2468cb1 --- /dev/null +++ b/templates/flake-ts.nix @@ -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 + ]; + }; + }); +}