Compare commits

..

10 commits

Author SHA1 Message Date
7d571dc7af
Update deps 2023-09-11 10:48:46 +02:00
6772068ba3
Update deps 2023-09-10 21:59:01 +02:00
d867b6a72b
Update deps 2023-09-10 19:01:30 +02:00
1ff6364827
fixup 2023-09-10 17:36:32 +02:00
d871ef787e
Update deps 2023-09-10 17:30:22 +02:00
73e7a23241
Update deps 2023-09-09 19:57:34 +02:00
0625f69563
Update deps 2023-09-09 19:54:02 +02:00
3edb03a8f3
Update deps 2023-09-07 15:13:43 +02:00
de86fc50eb
Update deps 2023-09-05 11:56:31 +02:00
24c3d42a99
Update deps 2023-09-04 15:17:18 +02:00
15 changed files with 335 additions and 85 deletions

View file

@ -117,11 +117,11 @@
"utils": "utils" "utils": "utils"
}, },
"locked": { "locked": {
"lastModified": 1686747123, "lastModified": 1694158470,
"narHash": "sha256-XUQK9kwHpTeilHoad7L4LjMCCyY13Oq383CoFADecRE=", "narHash": "sha256-yWx9eBDHt6WR3gr65+J85KreHdMypty/P6yM35tIYYM=",
"owner": "serokell", "owner": "serokell",
"repo": "deploy-rs", "repo": "deploy-rs",
"rev": "724463b5a94daa810abfc64a4f87faef4e00f984", "rev": "d0cfc042eba92eb206611c9e8784d41a2c053bab",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -137,11 +137,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1693791515, "lastModified": 1694395354,
"narHash": "sha256-1HXhqNCd1nyxhUvhLuH8pb+wxBm5DNgxhRbBnERdAr8=", "narHash": "sha256-fzm/+caf+yPLb/Wivbydbhg5GlTo4f1rMOLbH7G9c9k=",
"owner": "nix-community", "owner": "nix-community",
"repo": "disko", "repo": "disko",
"rev": "1c38664f59f95ac6ddef77a418df85ee662036d2", "rev": "b54e2dc988b34fbad1a1180fe68b573a9d080df5",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -491,11 +491,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1693713564, "lastModified": 1694375657,
"narHash": "sha256-00w2uwb4O6Y1e2W5LG5UFyl1ZN3KFG7aoRdYEvT/BqA=", "narHash": "sha256-32X8dcty4vPXx+D4yJPQZBo5hJ1NQikALhevGv6elO4=",
"owner": "nix-community", "owner": "nix-community",
"repo": "home-manager", "repo": "home-manager",
"rev": "8e49b883890ccb52c059abb152b00a416342ec1c", "rev": "f7848d3e5f15ed02e3f286029697e41ee31662d7",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -514,11 +514,11 @@
}, },
"locked": { "locked": {
"dir": "contrib", "dir": "contrib",
"lastModified": 1693814116, "lastModified": 1694419554,
"narHash": "sha256-9UWvn4tPo6Z7dCWzAfD9kTq31j5KyQf8MH1eogiKL9g=", "narHash": "sha256-fl5k7zYhlXO7S/Pnh6lSr6ETF9zdPAp9xSyFzV6l3jY=",
"owner": "neovim", "owner": "neovim",
"repo": "neovim", "repo": "neovim",
"rev": "069fad6e2df25e6b079879670cf6c68ae7ddb012", "rev": "60e5d0fbcc8dfb942480aa2d9e4b45f4a255d952",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -539,11 +539,11 @@
"weewx-proxy-flake": "weewx-proxy-flake" "weewx-proxy-flake": "weewx-proxy-flake"
}, },
"locked": { "locked": {
"lastModified": 1693815598, "lastModified": 1694420440,
"narHash": "sha256-DK026bknR7R2SmcoCDStZL/NrTxWPFunJEe23TLu3Gs=", "narHash": "sha256-Qs0zR4HMVIwWjVNq1r4yMK464bhMb7pEoUqYyzCmeJQ=",
"owner": "nifoc", "owner": "nifoc",
"repo": "nix-overlay", "repo": "nix-overlay",
"rev": "ecab65354626cafb65dee976233250dd4d1199d9", "rev": "4d1d2316624795a2ab9646a5aa8ab6633e8a7a47",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -590,11 +590,11 @@
}, },
"nixos-stable": { "nixos-stable": {
"locked": { "locked": {
"lastModified": 1693636127, "lastModified": 1694304580,
"narHash": "sha256-ZlS/lFGzK7BJXX2YVGnP3yZi3T9OLOEtBCyMJsb91U8=", "narHash": "sha256-5tIpNodDpEKT8mM/F5zCzWEAnidOg8eb1/x3SRaaBLs=",
"owner": "nixos", "owner": "nixos",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "9075cba53e86dc318d159aee55dc9a7c9a4829c1", "rev": "4c8cf44c5b9481a4f093f1df3b8b7ba997a7c760",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -606,11 +606,11 @@
}, },
"nixpkgs": { "nixpkgs": {
"locked": { "locked": {
"lastModified": 1693714546, "lastModified": 1694343207,
"narHash": "sha256-3EMJZeGSZT6pD1eNwI/6Yc0R4rxklNvJ2SDFcsCnjpM=", "narHash": "sha256-jWi7OwFxU5Owi4k2JmiL1sa/OuBCQtpaAesuj5LXC8w=",
"owner": "nixos", "owner": "nixos",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "d816b5ab44187a2dd84806630ce77a733724f95f", "rev": "78058d810644f5ed276804ce7ea9e82d92bee293",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -791,11 +791,11 @@
"nixpkgs-stable": "nixpkgs-stable_4" "nixpkgs-stable": "nixpkgs-stable_4"
}, },
"locked": { "locked": {
"lastModified": 1692274144, "lastModified": 1694364351,
"narHash": "sha256-BxTQuRUANQ81u8DJznQyPmRsg63t4Yc+0kcyq6OLz8s=", "narHash": "sha256-oadhSCqopYXxURwIA6/Anpe5IAG11q2LhvTJNP5zE6o=",
"owner": "cachix", "owner": "cachix",
"repo": "pre-commit-hooks.nix", "repo": "pre-commit-hooks.nix",
"rev": "7e3517c03d46159fdbf8c0e5c97f82d5d4b0c8fa", "rev": "4f883a76282bc28eb952570afc3d8a1bf6f481d7",
"type": "github" "type": "github"
}, },
"original": { "original": {

View file

@ -146,7 +146,7 @@
hooks = { hooks = {
deadnix.enable = true; deadnix.enable = true;
shellcheck.enable = true; shellcheck.enable = true;
statix.enable = true; # statix.enable = true;
treefmt.enable = true; treefmt.enable = true;
}; };
}; };

View file

@ -33,6 +33,7 @@
"net.ipv4.tcp_window_scaling" = 1; "net.ipv4.tcp_window_scaling" = 1;
"net.ipv4.tcp_fastopen" = 3; "net.ipv4.tcp_fastopen" = 3;
"net.core.rmem_max" = 2500000; "net.core.rmem_max" = 2500000;
"net.core.wmem_max" = 2500000;
"vm.overcommit_memory" = 1; "vm.overcommit_memory" = 1;
}; };
}; };

View file

@ -0,0 +1,44 @@
export def instagram-dl [name: string url: string] {
print $"== ($name)"
let sleep = (random integer 11..15)
let sleep_req = (random integer 10..13)
let gdl_cookies = $"($env.HOME)/Pictures/Instagram/instagram.com_cookies.txt"
(gallery-dl
--directory $"($env.HOME)/Pictures/Instagram/($name)/"
--download-archive $"($env.HOME)/Pictures/Instagram/($name)/.archive"
--filename '{username}-{date:%Y-%m-%d}-{sidecar_media_id:?/_/}{media_id}.{extension}'
--config $"($env.HOME)/Pictures/Instagram/gallery-dl-generic.conf"
--cookies $gdl_cookies
--sleep $sleep
--sleep-request $sleep_req
--sleep-extractor $sleep_req
-vv
$url)
}
def bdfr-browser-import [] {
http post https://bdfr.internal.kempkens.network/_import_changes ''
}
export def bdfr [
--limit (-L): int = 10
--sort (-S): string = "hot"
] {
ssh -t mediaserver bdfr -L $limit -S $sort --authenticate
bdfr-browser-import
}
export def bdfr-subreddit [
$subreddit: string
--sort (-S): string = "hot"
] {
ssh -t mediaserver bdfr-raw -s $subreddit -S $sort --authenticate
bdfr-browser-import
}
export def bdfr-user [$user: string] {
ssh -t mediaserver bdfr-raw --user $user --submitted --all-comments --comment-context --authenticate
bdfr-browser-import
}

View file

@ -0,0 +1,32 @@
export alias update-system-flake = nix flake update ~/.config/nixpkgs -v
export def update-project-flake [] {
let envrc = (rg --no-line-number --color never '^use flake' ./.envrc)
if (not ('./.envrc' | path exists)) or $envrc =~ "^use flake$" {
nix flake update ./ -v
} else {
let flake_path = ($envrc | split column ' ' | get 0 | get column3)
nix flake update $flake_path -v
}
}
export def update-neovim-plugins [] {
let os = (uname)
match $os {
"Darwin" => { ~/.config/nixpkgs/home/programs/nvim/update-plugins.sh }
"Linux" => { /etc/nixos/home/programs/nvim/update-plugins.sh }
_ => { error make {msg: "unsupported operating system"} }
}
}
export def update-all [] {
update-system-flake
update-neovim-plugins
}
export def nix-garbage-collect [] {
nix-collect-garbage -d
sudo nix-collect-garbage -d
}

View file

@ -162,7 +162,10 @@
;; Scrollback ;; Scrollback
:scrollback_lines 5000 :scrollback_lines 5000
;; Launch Menu ;; Launch Menu
:launch_menu [{:label :Btop++ :args [_G.programs.btop]}] :launch_menu [{:label :Btop++ :args [_G.programs.btop]}
{:label :bash :args [_G.shells.bash]}
{:label :fish :args [_G.shells.fish]}
{:label :nushell :args [_G.shells.nushell]}]
;; Other ;; Other
:front_end :WebGpu :front_end :WebGpu
:check_for_updates false}) :check_for_updates false})

View file

@ -5,9 +5,12 @@
../config/fonts.nix ../config/fonts.nix
../programs/fish.nix ../programs/fish.nix
../programs/nushell.nix
../programs/atuin.nix ../programs/atuin.nix
../programs/starship.nix
../programs/direnv.nix ../programs/direnv.nix
../programs/starship.nix
../programs/zoxide.nix
../programs/wezterm.nix ../programs/wezterm.nix
../programs/nvim ../programs/nvim
@ -73,8 +76,4 @@
xz xz
]; ];
}; };
programs = {
zoxide.enable = true;
};
} }

View file

@ -7,7 +7,7 @@ let
in in
{ {
home.packages = with pkgs; [ ] ++ optionals isDarwin [ home.packages = with pkgs; optionals isDarwin [
terminal-notifier terminal-notifier
]; ];
@ -88,11 +88,9 @@ in
ngc = "nix-collect-garbage -d && sudo nix-collect-garbage -d"; ngc = "nix-collect-garbage -d && sudo nix-collect-garbage -d";
nsr = "sudo nix-store --verify --check-contents --repair"; nsr = "sudo nix-store --verify --check-contents --repair";
j = "z"; la = "${pkgs.eza}/bin/eza --long --all --group --header --group-directories-first --sort=type --icons";
ji = "zi"; lg = "${pkgs.eza}/bin/eza --long --all --group --header --git";
la = "${pkgs.exa}/bin/exa --long --all --group --header --group-directories-first --sort=type --icons"; lt = "${pkgs.eza}/bin/eza --long --all --group --header --tree --level ";
lg = "${pkgs.exa}/bin/exa --long --all --group --header --git";
lt = "${pkgs.exa}/bin/exa --long --all --group --header --tree --level ";
mysqld-direnv = "mysqld --datadir=$PWD/.direnv/mysql/data --bind-address=127.0.0.1 --socket=$PWD/.direnv/mysql/mysqld.sock --gdb"; mysqld-direnv = "mysqld --datadir=$PWD/.direnv/mysql/data --bind-address=127.0.0.1 --socket=$PWD/.direnv/mysql/mysqld.sock --gdb";
postgres-direnv-init = "initdb --username $USER --pgdata $PWD/.direnv/postgres/data --auth trust"; postgres-direnv-init = "initdb --username $USER --pgdata $PWD/.direnv/postgres/data --auth trust";

31
home/programs/nushell.nix Normal file
View file

@ -0,0 +1,31 @@
{
programs.nushell = {
enable = true;
shellAliases = {
nrsw = "nixpkgs-switch";
upa = "update-all";
ngc = "nix-garbage-collect";
nsr = "sudo nix-store --verify --check-contents --repair";
};
configFile = {
text = ''
$env.config = {
show_banner: false
keybindings: []
}
$env.PATH = ($env.PATH |split row ":"| append $"($env.HOME)/.bin")
use ~/.config/nushell/scripts/nix-utils.nu *
use ~/.config/nushell/scripts/media-downloader.nu *
'';
};
};
xdg.configFile."nushell/scripts" = {
source = ../config/nushell/scripts;
recursive = true;
};
}

View file

@ -19,23 +19,23 @@ in
}; };
plenary-nvim = buildVimPluginFrom2Nix { plenary-nvim = buildVimPluginFrom2Nix {
pname = "plenary.nvim"; pname = "plenary.nvim";
version = "2023-08-24"; version = "2023-09-10";
src = fetchFromGitHub { src = fetchFromGitHub {
owner = "nvim-lua"; owner = "nvim-lua";
repo = "plenary.nvim"; repo = "plenary.nvim";
rev = "0dbe561ae023f02c2fb772b879e905055b939ce3"; rev = "0232372b906f275f76ac42029eba25eaf95e76b9";
sha256 = "0j42b4q25l8yypa92zkdf9jargjszyvw5f83l3qxbh0vy9ly1j2d"; sha256 = "0z7sag0jqskf7qcdnsczxa3y3rjlnx4k0an23p8zmv5dikbgqkx5";
fetchSubmodules = false; fetchSubmodules = false;
}; };
}; };
nvim-web-devicons = buildVimPluginFrom2Nix { nvim-web-devicons = buildVimPluginFrom2Nix {
pname = "nvim-web-devicons"; pname = "nvim-web-devicons";
version = "2023-09-03"; version = "2023-09-09";
src = fetchFromGitHub { src = fetchFromGitHub {
owner = "kyazdani42"; owner = "kyazdani42";
repo = "nvim-web-devicons"; repo = "nvim-web-devicons";
rev = "bc11ee2498de2310de5776477dd9dce65d03b464"; rev = "ecdeb4e2a4af34fc873bbfbf1f4c4e447e632255";
sha256 = "17lrzh7a2jwgayi2r16wf9y336awy73nl2ww98jnpnzk9r87ww26"; sha256 = "085mpnvj9j97rwnn4a91nf90ilclk4gagkgcralpjn6a9i4zvkr2";
fetchSubmodules = false; fetchSubmodules = false;
}; };
}; };
@ -63,12 +63,12 @@ in
}; };
yanky-nvim = buildVimPluginFrom2Nix { yanky-nvim = buildVimPluginFrom2Nix {
pname = "yanky.nvim"; pname = "yanky.nvim";
version = "2023-08-30"; version = "2023-09-11";
src = fetchFromGitHub { src = fetchFromGitHub {
owner = "gbprod"; owner = "gbprod";
repo = "yanky.nvim"; repo = "yanky.nvim";
rev = "ef70e4e44095a17ab8611cb6630b727ccee0a271"; rev = "4c85d8d6808d9859e72f8bd6c25302199e6a5eac";
sha256 = "09i4gl2g19gjx30had1wwcfjww80pdfa6fjpr9ifvkh1vq8p5r9a"; sha256 = "0ph1mc7nlfsx0aaybnvg6wwpx7hv2ks621qkjcrl3hf8dbc173xs";
fetchSubmodules = false; fetchSubmodules = false;
}; };
}; };
@ -118,12 +118,12 @@ in
}; };
nvim-treesitter = buildVimPluginFrom2Nix { nvim-treesitter = buildVimPluginFrom2Nix {
pname = "nvim-treesitter"; pname = "nvim-treesitter";
version = "2023-09-04"; version = "2023-09-11";
src = fetchFromGitHub { src = fetchFromGitHub {
owner = "nvim-treesitter"; owner = "nvim-treesitter";
repo = "nvim-treesitter"; repo = "nvim-treesitter";
rev = "30604fd7dde5abcba7ca8f5761894dfa61febe51"; rev = "15d327fe6324d8269451131ec34ad4f2a8ef1e01";
sha256 = "0mzl92jdgdjr36gy58pvdsca91k0lxf6pzcf3cw86h01rai2lmfg"; sha256 = "0hyw21nd9rakyviskcbk7h3pyv5j27145d9sa83li3fdf61hafrc";
fetchSubmodules = false; fetchSubmodules = false;
}; };
}; };
@ -162,23 +162,23 @@ in
}; };
telescope-nvim = buildVimPluginFrom2Nix { telescope-nvim = buildVimPluginFrom2Nix {
pname = "telescope.nvim"; pname = "telescope.nvim";
version = "2023-09-04"; version = "2023-09-10";
src = fetchFromGitHub { src = fetchFromGitHub {
owner = "nvim-telescope"; owner = "nvim-telescope";
repo = "telescope.nvim"; repo = "telescope.nvim";
rev = "6b79d7a6a45adc1508a7afee5bc973173ec22f59"; rev = "a19770625aed49ad2a9f591a5e3946707f7359f6";
sha256 = "15lr5b7922w6wrzky0gy5sgscmw5axvhyajkfdqgrlpl98acqfgp"; sha256 = "13r2bbmylh9n5yqmc8mff669w6c4wx0j20xiy4sx2cdmfj089a9k";
fetchSubmodules = false; fetchSubmodules = false;
}; };
}; };
telescope-fzf-native-nvim = buildVimPluginFrom2Nix { telescope-fzf-native-nvim = buildVimPluginFrom2Nix {
pname = "telescope-fzf-native.nvim"; pname = "telescope-fzf-native.nvim";
version = "2023-05-25"; version = "2023-09-10";
src = fetchFromGitHub { src = fetchFromGitHub {
owner = "nvim-telescope"; owner = "nvim-telescope";
repo = "telescope-fzf-native.nvim"; repo = "telescope-fzf-native.nvim";
rev = "9bc8237565ded606e6c366a71c64c0af25cd7a50"; rev = "6c921ca12321edaa773e324ef64ea301a1d0da62";
sha256 = "0g5n3x66kf5fbzv8rprpyi8hb6v961s0whk8dc6v8r1msc2m4zbs"; sha256 = "101dxn7jfyg2wdzkw5cnrw475mg0p3w475l1hplqfhghz33zb1hy";
fetchSubmodules = false; fetchSubmodules = false;
}; };
buildPhase = '' buildPhase = ''
@ -242,12 +242,12 @@ in
}; };
nvim-lspconfig = buildVimPluginFrom2Nix { nvim-lspconfig = buildVimPluginFrom2Nix {
pname = "nvim-lspconfig"; pname = "nvim-lspconfig";
version = "2023-08-26"; version = "2023-09-09";
src = fetchFromGitHub { src = fetchFromGitHub {
owner = "neovim"; owner = "neovim";
repo = "nvim-lspconfig"; repo = "nvim-lspconfig";
rev = "a27356f1ef9c11e1f459cc96a3fcac5c265e72d6"; rev = "d177ad277a638f262edb73c75ffe33e377b95dc5";
sha256 = "17xq7h9d9zx0pbnhhxxqsp2n6rlz16dvdg6cjaylrm7r60ll9215"; sha256 = "0sbd3bj0j5blg7998c2mf9pxp8sfj84dsa1rqbmsqz0isjjl0qay";
fetchSubmodules = false; fetchSubmodules = false;
}; };
}; };
@ -297,12 +297,12 @@ in
}; };
nvim-lint = buildVimPluginFrom2Nix { nvim-lint = buildVimPluginFrom2Nix {
pname = "nvim-lint"; pname = "nvim-lint";
version = "2023-08-27"; version = "2023-09-07";
src = fetchFromGitHub { src = fetchFromGitHub {
owner = "mfussenegger"; owner = "mfussenegger";
repo = "nvim-lint"; repo = "nvim-lint";
rev = "9b6cb72660114e5f188907be0d866a8ca2b0ef23"; rev = "73682da41b74c9c35f33b1b2dbd0cc02cc59452f";
sha256 = "09j1q2ajav4vxcgd2a5i0i3g72j4y8j7amqx08ss9l9mw7j1lgjc"; sha256 = "061x7p90p1nmjf2fs4alrgyj0w0v8w6kbg2n86q2khl40w522ihk";
fetchSubmodules = false; fetchSubmodules = false;
}; };
}; };
@ -440,34 +440,34 @@ in
}; };
core-nvim = buildVimPluginFrom2Nix { core-nvim = buildVimPluginFrom2Nix {
pname = "core.nvim"; pname = "core.nvim";
version = "2023-07-18"; version = "2023-09-09";
src = fetchFromGitHub { src = fetchFromGitHub {
owner = "niuiic"; owner = "niuiic";
repo = "core.nvim"; repo = "core.nvim";
rev = "d0843388db6a6747ec1a1c2aea873da0efca2cac"; rev = "dc1046613c7a0ce664b6ec3d5c8c94d6b6d2618d";
sha256 = "0b47bsbwd1f0635r6jzsmp2d449cxgir93p50hbqlzn25kfvw43q"; sha256 = "0lgg800rcrkg99wg7spj1r9ykyx31zr07f57ybyqaxwd7z0sx260";
fetchSubmodules = false; fetchSubmodules = false;
}; };
}; };
format-nvim = buildVimPluginFrom2Nix { format-nvim = buildVimPluginFrom2Nix {
pname = "format.nvim"; pname = "format.nvim";
version = "2023-08-17"; version = "2023-09-09";
src = fetchFromGitHub { src = fetchFromGitHub {
owner = "niuiic"; owner = "niuiic";
repo = "format.nvim"; repo = "format.nvim";
rev = "325d9c5e700f3d44162f49cbedc13508b6b69ebd"; rev = "d3eab66f7b7e76316bee61ba32ce0d35a335dd5c";
sha256 = "1xa9y6rd9mz6xm0wldps6ipybhsv42783a1nmvkpcjaal30qpvgi"; sha256 = "0y4z1r5ps4ilrb99lac73bqib6q2jhi3vgdxw8y5v0lpvvfhx0fd";
fetchSubmodules = false; fetchSubmodules = false;
}; };
}; };
nvim-autopairs = buildVimPluginFrom2Nix { nvim-autopairs = buildVimPluginFrom2Nix {
pname = "nvim-autopairs"; pname = "nvim-autopairs";
version = "2023-09-02"; version = "2023-09-08";
src = fetchFromGitHub { src = fetchFromGitHub {
owner = "windwp"; owner = "windwp";
repo = "nvim-autopairs"; repo = "nvim-autopairs";
rev = "a52fc6eeec116746110b703381777c46d89d9e27"; rev = "defad64afbf19381fe31488a7582bbac421d6e38";
sha256 = "0bjn6zqjq23w9hp47yrv96074lq3gnr0ncs4bli21kkdvd7hy051"; sha256 = "05ihrriym44g01rryaah2h2xnl183dpwcsf8q8rxzr29z0jpxxip";
fetchSubmodules = false; fetchSubmodules = false;
}; };
}; };
@ -550,12 +550,12 @@ in
}; };
toggleterm-nvim = buildVimPluginFrom2Nix { toggleterm-nvim = buildVimPluginFrom2Nix {
pname = "toggleterm.nvim"; pname = "toggleterm.nvim";
version = "2023-08-03"; version = "2023-09-11";
src = fetchFromGitHub { src = fetchFromGitHub {
owner = "akinsho"; owner = "akinsho";
repo = "toggleterm.nvim"; repo = "toggleterm.nvim";
rev = "12cba0a1967b4f3f31903484dec72a6100dcf515"; rev = "0427b908ebefcb3701c7f2cfbdafa37d11afe71a";
sha256 = "1mlwncnnsp3skzszc544rbpx024im1p52k2pwvqlvwdjn46ffm2l"; sha256 = "1wxrwl530kxm8k8ymgk3w77av770ndr1hhzfk315jgl2p5hqmqm0";
fetchSubmodules = false; fetchSubmodules = false;
}; };
}; };
@ -572,34 +572,34 @@ in
}; };
gitsigns-nvim = buildVimPluginFrom2Nix { gitsigns-nvim = buildVimPluginFrom2Nix {
pname = "gitsigns.nvim"; pname = "gitsigns.nvim";
version = "2023-09-02"; version = "2023-09-08";
src = fetchFromGitHub { src = fetchFromGitHub {
owner = "lewis6991"; owner = "lewis6991";
repo = "gitsigns.nvim"; repo = "gitsigns.nvim";
rev = "d927caa075df63bf301d92f874efb72fd22fd3b4"; rev = "fef5d90953f0a730483b44745fae5938ba8227f8";
sha256 = "0vi81r4sj03ydjckpxi9s0w4qhd8lyx8xvl87ym6fp0kalk01vfa"; sha256 = "1739v2garbf5xinrwl1ac2cf2xmpfkwpjzca2iwj78d7clj9flq5";
fetchSubmodules = false; fetchSubmodules = false;
}; };
}; };
nui-nvim = buildVimPluginFrom2Nix { nui-nvim = buildVimPluginFrom2Nix {
pname = "nui.nvim"; pname = "nui.nvim";
version = "2023-08-29"; version = "2023-09-06";
src = fetchFromGitHub { src = fetchFromGitHub {
owner = "MunifTanjim"; owner = "MunifTanjim";
repo = "nui.nvim"; repo = "nui.nvim";
rev = "aa1b4c1e05983ff7debd2b4b2788651db099de2f"; rev = "c8de23342caf8d50b15d6b28368d36a56a69d76f";
sha256 = "1ray6dk61n1g0vjfvdp9ln98pmf54gjrwrffazfv2gwbwllkj9jf"; sha256 = "0na7mi192alj1pyskdyivn12a0nmcmzy79kmqxyz8r1cijgb33q2";
fetchSubmodules = false; fetchSubmodules = false;
}; };
}; };
nvim-notify = buildVimPluginFrom2Nix { nvim-notify = buildVimPluginFrom2Nix {
pname = "nvim-notify"; pname = "nvim-notify";
version = "2023-06-05"; version = "2023-09-10";
src = fetchFromGitHub { src = fetchFromGitHub {
owner = "rcarriga"; owner = "rcarriga";
repo = "nvim-notify"; repo = "nvim-notify";
rev = "ea9c8ce7a37f2238f934e087c255758659948e0f"; rev = "94859430020f5cf32a1b97ddd9e596fed9db7981";
sha256 = "0lh49bln2s840x08f5a967569k597cnnrl5vclys7lrbw77avga6"; sha256 = "04fcm8277csv8davwirndinm0cpnb5h8azr2cxnw1szgqry2yh7k";
fetchSubmodules = false; fetchSubmodules = false;
}; };
}; };

View file

@ -1,14 +1,26 @@
{ pkgs, ... }: { pkgs, config, ... }:
let
wezterm-pkg = pkgs.wezterm;
wezterm-nushell = pkgs.writeShellScript "wezterm-nushell.sh" ''
source /etc/static/bashrc
source ${config.home.sessionVariablesPackage}/etc/profile.d/hm-session-vars.sh
exec ${pkgs.nushell.outPath}/bin/nu
'';
in
{ {
programs.wezterm = { programs.wezterm = {
enable = true; enable = true;
package = pkgs.wezterm; package = wezterm-pkg;
extraConfig = '' extraConfig = ''
_G.shells = { _G.shells = {
bash = '${pkgs.bash.outPath}/bin/bash',
fish = '${pkgs.fish.outPath}/bin/fish', fish = '${pkgs.fish.outPath}/bin/fish',
nushell = '${wezterm-nushell}',
}; };
_G.programs = { _G.programs = {

15
home/programs/zoxide.nix Normal file
View file

@ -0,0 +1,15 @@
{
programs.zoxide = {
enable = true;
};
programs.fish.shellAliases = {
j = "z";
ji = "zi";
};
programs.nushell.shellAliases = {
j = "z";
ji = "zi";
};
}

31
system/darwin/skhd.nix Normal file
View file

@ -0,0 +1,31 @@
{ pkgs, ... }:
let
wezterm-pkg = pkgs.wezterm;
wezterm-app = "${wezterm-pkg}/Applications/WezTerm.app";
wezterm-cli = "${wezterm-pkg}/bin/wezterm";
yabai-bin = "${pkgs.yabai}/bin/yabai";
jq-bin = "${pkgs.jq}/bin/jq";
script-open-wezterm = pkgs.writeShellScript "skhd-open-wezterm.sh" ''
if pgrep "wezterm-gui" >/dev/null 2>&1; then
${wezterm-cli} cli spawn
wezterm_id="$(${yabai-bin} -m query --windows | ${jq-bin} '.[] | select(.app == "WezTerm") | .id')"
${yabai-bin} -m window --focus "$wezterm_id"
else
open ${wezterm-app}
fi
'';
in
{
environment.systemPackages = [ pkgs.skhd ];
services.skhd = {
enable = true;
skhdConfig = ''
cmd - return : ${script-open-wezterm}
'';
};
}

81
system/darwin/yabai.nix Normal file
View file

@ -0,0 +1,81 @@
{ pkgs, ... }:
let
yabai-pkg = pkgs.yabai;
yabai-bin = "${yabai-pkg}/bin/yabai";
jq-bin = "${pkgs.jq}/bin/jq";
script-cycle-clockwise = pkgs.writeShellScript "yabai-cycle-clockwise.sh" ''
win=$(${yabai-bin} -m query --windows --window last | ${jq-bin} '.id')
while : ; do
${yabai-bin} -m window $win --swap prev &> /dev/null
if [[ $? -eq 1 ]]; then
break
fi
done
'';
in
{
services.yabai = {
enable = true;
enableScriptingAddition = false;
package = yabai-pkg;
config = {
layout = "bsp";
top_padding = 5;
bottom_padding = 5;
left_padding = 5;
right_padding = 5;
window_gap = 5;
window_placement = "second_child";
split_type = "auto";
};
extraConfig = ''
yabai -m rule --add app='^Dato$' manage=off
yabai -m rule --add app='^Mona$' manage=off
yabai -m rule --add app='^System.*einstellungen$' manage=off
yabai -m signal --add event=window_created action='
yabai -m query --windows --window $YABAI_WINDOW_ID | ${jq-bin} -er ".\"can-resize\" or .\"is-floating\"" || \
yabai -m window $YABAI_WINDOW_ID --toggle float
'
'';
};
services.skhd.skhdConfig = ''
alt + shift - h : ${yabai-bin} -m window --focus west
alt + shift - j : ${yabai-bin} -m window --focus south
alt + shift - k : ${yabai-bin} -m window --focus north
alt + shift - l : ${yabai-bin} -m window --focus east
alt + shift - w : ${yabai-bin} -m display --focus west
alt + shift - e : ${yabai-bin} -m display --focus east
meh - h : ${yabai-bin} -m window --swap west
meh - j : ${yabai-bin} -m window --swap south
meh - k : ${yabai-bin} -m window --swap north
meh - l : ${yabai-bin} -m window --swap east
meh - c : ${script-cycle-clockwise}
meh - w : ${yabai-bin} -m window --display west; ${yabai-bin} -m display --focus west
meh - e : ${yabai-bin} -m window --display east; ${yabai-bin} -m display --focus east
meh - f : ${yabai-bin} -m window --toggle zoom-fullscreen
meh - t : ${yabai-bin} -m window --toggle float; ${yabai-bin} -m window --grid 6:6:1:1:4:4
meh - g : ${yabai-bin} -m window --resize bottom:0:40
meh - s : ${yabai-bin} -m window --resize bottom:0:-40
hyper - h : ${yabai-bin} -m window --warp west
hyper - j : ${yabai-bin} -m window --warp south
hyper - k : ${yabai-bin} -m window --warp north
hyper - l : ${yabai-bin} -m window --warp east
hyper - f : ${yabai-bin} -m window --toggle native-fullscreen
'';
}

View file

@ -3,10 +3,13 @@
../shared/show-update-changelog.nix ../shared/show-update-changelog.nix
../darwin/defaults.nix ../darwin/defaults.nix
#../darwin/fonts.nix
../darwin/sudo.nix ../darwin/sudo.nix
../darwin/fish.nix ../darwin/fish.nix
../darwin/attic.nix ../darwin/attic.nix
../darwin/skhd.nix
../darwin/yabai.nix
]; ];
nix = { nix = {