| author | |
| committer | |
| log | d9967da704f341260d3b3c8853e59ab2b7358a01 |
| tree | cf016807207b1d96026ee72f5bfe554dae95d7d6 |
| parent | dc5bf9c2ab9fe87b52a5789e70ddc76fedbf255a |
50 files changed, 1284 insertions(+), 1385 deletions(-)
flake.lock+113-71| ... | @@ -197,10 +197,7 @@ | ... | @@ -197,10 +197,7 @@ |
| 197 | }, | 197 | }, |
| 198 | "flake-parts": { | 198 | "flake-parts": { |
| 199 | "inputs": { | 199 | "inputs": { |
| 200 | "nixpkgs-lib": [ | 200 | "nixpkgs-lib": "nixpkgs-lib" |
| 201 | "nixvim", | ||
| 202 | "nixpkgs" | ||
| 203 | ] | ||
| 204 | }, | 201 | }, |
| 205 | "locked": { | 202 | "locked": { |
| 206 | "lastModified": 1743550720, | 203 | "lastModified": 1743550720, |
| ... | @@ -315,7 +312,7 @@ | ... | @@ -315,7 +312,7 @@ |
| 315 | }, | 312 | }, |
| 316 | "flake-utils_5": { | 313 | "flake-utils_5": { |
| 317 | "inputs": { | 314 | "inputs": { |
| 318 | "systems": "systems_5" | 315 | "systems": "systems_6" |
| 319 | }, | 316 | }, |
| 320 | "locked": { | 317 | "locked": { |
| 321 | "lastModified": 1705309234, | 318 | "lastModified": 1705309234, |
| ... | @@ -333,7 +330,7 @@ | ... | @@ -333,7 +330,7 @@ |
| 333 | }, | 330 | }, |
| 334 | "flake-utils_6": { | 331 | "flake-utils_6": { |
| 335 | "inputs": { | 332 | "inputs": { |
| 336 | "systems": "systems_6" | 333 | "systems": "systems_7" |
| 337 | }, | 334 | }, |
| 338 | "locked": { | 335 | "locked": { |
| 339 | "lastModified": 1710146030, | 336 | "lastModified": 1710146030, |
| ... | @@ -351,7 +348,7 @@ | ... | @@ -351,7 +348,7 @@ |
| 351 | }, | 348 | }, |
| 352 | "flake-utils_7": { | 349 | "flake-utils_7": { |
| 353 | "inputs": { | 350 | "inputs": { |
| 354 | "systems": "systems_7" | 351 | "systems": "systems_8" |
| 355 | }, | 352 | }, |
| 356 | "locked": { | 353 | "locked": { |
| 357 | "lastModified": 1705309234, | 354 | "lastModified": 1705309234, |
| ... | @@ -527,34 +524,6 @@ | ... | @@ -527,34 +524,6 @@ |
| 527 | "type": "github" | 524 | "type": "github" |
| 528 | } | 525 | } |
| 529 | }, | 526 | }, |
| 530 | "ixx": { | ||
| 531 | "inputs": { | ||
| 532 | "flake-utils": [ | ||
| 533 | "nixvim", | ||
| 534 | "nuschtosSearch", | ||
| 535 | "flake-utils" | ||
| 536 | ], | ||
| 537 | "nixpkgs": [ | ||
| 538 | "nixvim", | ||
| 539 | "nuschtosSearch", | ||
| 540 | "nixpkgs" | ||
| 541 | ] | ||
| 542 | }, | ||
| 543 | "locked": { | ||
| 544 | "lastModified": 1737371634, | ||
| 545 | "narHash": "sha256-fTVAWzT1UMm1lT+YxHuVPtH+DATrhYfea3B0MxG/cGw=", | ||
| 546 | "owner": "NuschtOS", | ||
| 547 | "repo": "ixx", | ||
| 548 | "rev": "a1176e2a10ce745ff8f63e4af124ece8fe0b1648", | ||
| 549 | "type": "github" | ||
| 550 | }, | ||
| 551 | "original": { | ||
| 552 | "owner": "NuschtOS", | ||
| 553 | "ref": "v0.0.7", | ||
| 554 | "repo": "ixx", | ||
| 555 | "type": "github" | ||
| 556 | } | ||
| 557 | }, | ||
| 558 | "langref": { | 527 | "langref": { |
| 559 | "flake": false, | 528 | "flake": false, |
| 560 | "locked": { | 529 | "locked": { |
| ... | @@ -567,6 +536,21 @@ | ... | @@ -567,6 +536,21 @@ |
| 567 | "url": "https://raw.githubusercontent.com/ziglang/zig/0fb2015fd3422fc1df364995f9782dfe7255eccd/doc/langref.html.in" | 536 | "url": "https://raw.githubusercontent.com/ziglang/zig/0fb2015fd3422fc1df364995f9782dfe7255eccd/doc/langref.html.in" |
| 568 | } | 537 | } |
| 569 | }, | 538 | }, |
| 539 | "mnw": { | ||
| 540 | "locked": { | ||
| 541 | "lastModified": 1746338991, | ||
| 542 | "narHash": "sha256-GbyoHjf14LOxZQc+0NFblI4xf/uwGrYo3W8lwE4HcwI=", | ||
| 543 | "owner": "Gerg-L", | ||
| 544 | "repo": "mnw", | ||
| 545 | "rev": "c65407ee9387ef75985dad3e30f58c822c766ec1", | ||
| 546 | "type": "github" | ||
| 547 | }, | ||
| 548 | "original": { | ||
| 549 | "owner": "Gerg-L", | ||
| 550 | "repo": "mnw", | ||
| 551 | "type": "github" | ||
| 552 | } | ||
| 553 | }, | ||
| 570 | "moonlight": { | 554 | "moonlight": { |
| 571 | "inputs": { | 555 | "inputs": { |
| 572 | "flake-utils": "flake-utils", | 556 | "flake-utils": "flake-utils", |
| ... | @@ -608,6 +592,32 @@ | ... | @@ -608,6 +592,32 @@ |
| 608 | "type": "github" | 592 | "type": "github" |
| 609 | } | 593 | } |
| 610 | }, | 594 | }, |
| 595 | "nil": { | ||
| 596 | "inputs": { | ||
| 597 | "flake-utils": [ | ||
| 598 | "nvf", | ||
| 599 | "flake-utils" | ||
| 600 | ], | ||
| 601 | "nixpkgs": [ | ||
| 602 | "nvf", | ||
| 603 | "nixpkgs" | ||
| 604 | ], | ||
| 605 | "rust-overlay": "rust-overlay_2" | ||
| 606 | }, | ||
| 607 | "locked": { | ||
| 608 | "lastModified": 1741118843, | ||
| 609 | "narHash": "sha256-ggXU3RHv6NgWw+vc+HO4/9n0GPufhTIUjVuLci8Za8c=", | ||
| 610 | "owner": "oxalica", | ||
| 611 | "repo": "nil", | ||
| 612 | "rev": "577d160da311cc7f5042038456a0713e9863d09e", | ||
| 613 | "type": "github" | ||
| 614 | }, | ||
| 615 | "original": { | ||
| 616 | "owner": "oxalica", | ||
| 617 | "repo": "nil", | ||
| 618 | "type": "github" | ||
| 619 | } | ||
| 620 | }, | ||
| 611 | "nix-index-database": { | 621 | "nix-index-database": { |
| 612 | "inputs": { | 622 | "inputs": { |
| 613 | "nixpkgs": [ | 623 | "nixpkgs": [ |
| ... | @@ -687,6 +697,21 @@ | ... | @@ -687,6 +697,21 @@ |
| 687 | "type": "github" | 697 | "type": "github" |
| 688 | } | 698 | } |
| 689 | }, | 699 | }, |
| 700 | "nixpkgs-lib": { | ||
| 701 | "locked": { | ||
| 702 | "lastModified": 1743296961, | ||
| 703 | "narHash": "sha256-b1EdN3cULCqtorQ4QeWgLMrd5ZGOjLSLemfa00heasc=", | ||
| 704 | "owner": "nix-community", | ||
| 705 | "repo": "nixpkgs.lib", | ||
| 706 | "rev": "e4822aea2a6d1cdd36653c134cacfd64c97ff4fa", | ||
| 707 | "type": "github" | ||
| 708 | }, | ||
| 709 | "original": { | ||
| 710 | "owner": "nix-community", | ||
| 711 | "repo": "nixpkgs.lib", | ||
| 712 | "type": "github" | ||
| 713 | } | ||
| 714 | }, | ||
| 690 | "nixpkgs-stable": { | 715 | "nixpkgs-stable": { |
| 691 | "locked": { | 716 | "locked": { |
| 692 | "lastModified": 1746557022, | 717 | "lastModified": 1746557022, |
| ... | @@ -765,28 +790,6 @@ | ... | @@ -765,28 +790,6 @@ |
| 765 | "type": "github" | 790 | "type": "github" |
| 766 | } | 791 | } |
| 767 | }, | 792 | }, |
| 768 | "nixvim": { | ||
| 769 | "inputs": { | ||
| 770 | "flake-parts": "flake-parts", | ||
| 771 | "nixpkgs": [ | ||
| 772 | "nixpkgs" | ||
| 773 | ], | ||
| 774 | "nuschtosSearch": "nuschtosSearch" | ||
| 775 | }, | ||
| 776 | "locked": { | ||
| 777 | "lastModified": 1746625905, | ||
| 778 | "narHash": "sha256-El/fOZAhTDJRsPN5dro9F3cNHyclk00Acjl1nVQAEDI=", | ||
| 779 | "owner": "nix-community", | ||
| 780 | "repo": "nixvim", | ||
| 781 | "rev": "5c52e8f9e438b6850f2c7a6e4bf3f967a3a699fd", | ||
| 782 | "type": "github" | ||
| 783 | }, | ||
| 784 | "original": { | ||
| 785 | "owner": "nix-community", | ||
| 786 | "repo": "nixvim", | ||
| 787 | "type": "github" | ||
| 788 | } | ||
| 789 | }, | ||
| 790 | "nur": { | 793 | "nur": { |
| 791 | "inputs": { | 794 | "inputs": { |
| 792 | "flake-parts": "flake-parts_2", | 795 | "flake-parts": "flake-parts_2", |
| ... | @@ -810,26 +813,28 @@ | ... | @@ -810,26 +813,28 @@ |
| 810 | "type": "github" | 813 | "type": "github" |
| 811 | } | 814 | } |
| 812 | }, | 815 | }, |
| 813 | "nuschtosSearch": { | 816 | "nvf": { |
| 814 | "inputs": { | 817 | "inputs": { |
| 818 | "flake-parts": "flake-parts", | ||
| 815 | "flake-utils": "flake-utils_3", | 819 | "flake-utils": "flake-utils_3", |
| 816 | "ixx": "ixx", | 820 | "mnw": "mnw", |
| 821 | "nil": "nil", | ||
| 817 | "nixpkgs": [ | 822 | "nixpkgs": [ |
| 818 | "nixvim", | ||
| 819 | "nixpkgs" | 823 | "nixpkgs" |
| 820 | ] | 824 | ], |
| 825 | "systems": "systems_4" | ||
| 821 | }, | 826 | }, |
| 822 | "locked": { | 827 | "locked": { |
| 823 | "lastModified": 1745046075, | 828 | "lastModified": 1746940940, |
| 824 | "narHash": "sha256-8v4y6k16Ra/fiecb4DxhsoOGtzLKgKlS+9/XJ9z0T2I=", | 829 | "narHash": "sha256-ASB3QVEoFK5//280uedYdt8jyDLhFa9zgj8qfc0S7Sk=", |
| 825 | "owner": "NuschtOS", | 830 | "owner": "notashelf", |
| 826 | "repo": "search", | 831 | "repo": "nvf", |
| 827 | "rev": "066afe8643274470f4a294442aadd988356a478f", | 832 | "rev": "815ed49d3693346122ef61da6d7443cd3cc21752", |
| 828 | "type": "github" | 833 | "type": "github" |
| 829 | }, | 834 | }, |
| 830 | "original": { | 835 | "original": { |
| 831 | "owner": "NuschtOS", | 836 | "owner": "notashelf", |
| 832 | "repo": "search", | 837 | "repo": "nvf", |
| 833 | "type": "github" | 838 | "type": "github" |
| 834 | } | 839 | } |
| 835 | }, | 840 | }, |
| ... | @@ -857,8 +862,8 @@ | ... | @@ -857,8 +862,8 @@ |
| 857 | "nixos-cosmic": "nixos-cosmic", | 862 | "nixos-cosmic": "nixos-cosmic", |
| 858 | "nixpkgs": "nixpkgs_2", | 863 | "nixpkgs": "nixpkgs_2", |
| 859 | "nixpkgs-stable": "nixpkgs-stable_2", | 864 | "nixpkgs-stable": "nixpkgs-stable_2", |
| 860 | "nixvim": "nixvim", | 865 | "nvf": "nvf", |
| 861 | "rust-overlay": "rust-overlay_2", | 866 | "rust-overlay": "rust-overlay_3", |
| 862 | "stylix": "stylix", | 867 | "stylix": "stylix", |
| 863 | "zig": "zig", | 868 | "zig": "zig", |
| 864 | "zls": "zls" | 869 | "zls": "zls" |
| ... | @@ -886,6 +891,28 @@ | ... | @@ -886,6 +891,28 @@ |
| 886 | } | 891 | } |
| 887 | }, | 892 | }, |
| 888 | "rust-overlay_2": { | 893 | "rust-overlay_2": { |
| 894 | "inputs": { | ||
| 895 | "nixpkgs": [ | ||
| 896 | "nvf", | ||
| 897 | "nil", | ||
| 898 | "nixpkgs" | ||
| 899 | ] | ||
| 900 | }, | ||
| 901 | "locked": { | ||
| 902 | "lastModified": 1741055476, | ||
| 903 | "narHash": "sha256-52vwEV0oS2lCnx3c/alOFGglujZTLmObit7K8VblnS8=", | ||
| 904 | "owner": "oxalica", | ||
| 905 | "repo": "rust-overlay", | ||
| 906 | "rev": "aefb7017d710f150970299685e8d8b549d653649", | ||
| 907 | "type": "github" | ||
| 908 | }, | ||
| 909 | "original": { | ||
| 910 | "owner": "oxalica", | ||
| 911 | "repo": "rust-overlay", | ||
| 912 | "type": "github" | ||
| 913 | } | ||
| 914 | }, | ||
| 915 | "rust-overlay_3": { | ||
| 889 | "inputs": { | 916 | "inputs": { |
| 890 | "nixpkgs": [ | 917 | "nixpkgs": [ |
| 891 | "nixpkgs" | 918 | "nixpkgs" |
| ... | @@ -1005,7 +1032,7 @@ | ... | @@ -1005,7 +1032,7 @@ |
| 1005 | "nixpkgs" | 1032 | "nixpkgs" |
| 1006 | ], | 1033 | ], |
| 1007 | "nur": "nur", | 1034 | "nur": "nur", |
| 1008 | "systems": "systems_4", | 1035 | "systems": "systems_5", |
| 1009 | "tinted-foot": "tinted-foot", | 1036 | "tinted-foot": "tinted-foot", |
| 1010 | "tinted-kitty": "tinted-kitty", | 1037 | "tinted-kitty": "tinted-kitty", |
| 1011 | "tinted-schemes": "tinted-schemes", | 1038 | "tinted-schemes": "tinted-schemes", |
| ... | @@ -1131,6 +1158,21 @@ | ... | @@ -1131,6 +1158,21 @@ |
| 1131 | "type": "github" | 1158 | "type": "github" |
| 1132 | } | 1159 | } |
| 1133 | }, | 1160 | }, |
| 1161 | "systems_8": { | ||
| 1162 | "locked": { | ||
| 1163 | "lastModified": 1681028828, | ||
| 1164 | "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=", | ||
| 1165 | "owner": "nix-systems", | ||
| 1166 | "repo": "default", | ||
| 1167 | "rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e", | ||
| 1168 | "type": "github" | ||
| 1169 | }, | ||
| 1170 | "original": { | ||
| 1171 | "owner": "nix-systems", | ||
| 1172 | "repo": "default", | ||
| 1173 | "type": "github" | ||
| 1174 | } | ||
| 1175 | }, | ||
| 1134 | "tinted-foot": { | 1176 | "tinted-foot": { |
| 1135 | "flake": false, | 1177 | "flake": false, |
| 1136 | "locked": { | 1178 | "locked": { |
flake.nix+136-93| ... | @@ -1,5 +1,5 @@ | ... | @@ -1,5 +1,5 @@ |
| 1 | { | 1 | { |
| 2 | description = "New Modular flake!"; | 2 | description = "multi device configuration flake"; |
| 3 | inputs = { | 3 | inputs = { |
| 4 | nixpkgs.url = "nixpkgs/nixos-unstable"; | 4 | nixpkgs.url = "nixpkgs/nixos-unstable"; |
| 5 | nixpkgs-stable.url = "nixpkgs/nixos-23.11"; | 5 | nixpkgs-stable.url = "nixpkgs/nixos-23.11"; |
| ... | @@ -7,112 +7,155 @@ | ... | @@ -7,112 +7,155 @@ |
| 7 | home-manager.url = "github:nix-community/home-manager/master"; | 7 | home-manager.url = "github:nix-community/home-manager/master"; |
| 8 | home-manager.inputs.nixpkgs.follows = "nixpkgs"; | 8 | home-manager.inputs.nixpkgs.follows = "nixpkgs"; |
| 9 | 9 | ||
| 10 | rust-overlay = { | 10 | rust-overlay.url = "github:oxalica/rust-overlay"; |
| 11 | url = "github:oxalica/rust-overlay"; | 11 | rust-overlay.inputs.nixpkgs.follows = "nixpkgs"; |
| 12 | inputs.nixpkgs.follows = "nixpkgs"; | ||
| 13 | }; | ||
| 14 | 12 | ||
| 15 | apple-fonts = { | 13 | apple-fonts.url = "github:Lyndeno/apple-fonts.nix"; |
| 16 | url = "github:Lyndeno/apple-fonts.nix"; | 14 | apple-fonts.inputs.nixpkgs.follows = "nixpkgs"; |
| 17 | inputs.nixpkgs.follows = "nixpkgs"; | ||
| 18 | }; | ||
| 19 | 15 | ||
| 20 | nixvim = { | 16 | nvf.url = "github:notashelf/nvf"; |
| 21 | url = "github:nix-community/nixvim"; | 17 | nvf.inputs.nixpkgs.follows = "nixpkgs"; |
| 22 | inputs.nixpkgs.follows = "nixpkgs"; | ||
| 23 | }; | ||
| 24 | 18 | ||
| 25 | darwin = { | 19 | darwin.url = "github:lnl7/nix-darwin/master"; |
| 26 | url = "github:lnl7/nix-darwin/master"; | 20 | darwin.inputs.nixpkgs.follows = "nixpkgs"; |
| 27 | inputs.nixpkgs.follows = "nixpkgs"; | ||
| 28 | }; | ||
| 29 | 21 | ||
| 30 | zig.url = "github:mitchellh/zig-overlay"; | 22 | zig.url = "github:mitchellh/zig-overlay"; |
| 31 | zls.url = "github:zigtools/zls?rev=a26718049a8657d4da04c331aeced1697bc7652b"; | 23 | zls.url = "github:zigtools/zls?rev=a26718049a8657d4da04c331aeced1697bc7652b"; |
| 32 | 24 | ||
| 33 | stylix = { | 25 | stylix.url = "github:danth/stylix"; |
| 34 | url = "github:danth/stylix"; | 26 | stylix.inputs.nixpkgs.follows = "nixpkgs"; |
| 35 | inputs.nixpkgs.follows = "nixpkgs"; | ||
| 36 | }; | ||
| 37 | 27 | ||
| 38 | moonlight = { | 28 | moonlight.url = "github:moonlight-mod/moonlight"; # Add `/develop` to the flake URL to use nightly. |
| 39 | url = "github:moonlight-mod/moonlight"; # Add `/develop` to the flake URL to use nightly. | 29 | moonlight.inputs.nixpkgs.follows = "nixpkgs"; |
| 40 | inputs.nixpkgs.follows = "nixpkgs"; | ||
| 41 | }; | ||
| 42 | nixos-cosmic = { | ||
| 43 | url = "github:lilyinstarlight/nixos-cosmic"; | ||
| 44 | inputs.nixpkgs.follows = "nixpkgs"; | ||
| 45 | }; | ||
| 46 | 30 | ||
| 47 | nh = { | 31 | nixos-cosmic.url = "github:lilyinstarlight/nixos-cosmic"; |
| 48 | url = "github:viperML/nh"; | 32 | nixos-cosmic.inputs.nixpkgs.follows = "nixpkgs"; |
| 49 | inputs.nixpkgs.follows = "nixpkgs"; | 33 | |
| 50 | }; | 34 | nh.url = "github:viperML/nh"; |
| 51 | nix-options-search = { | 35 | nh.inputs.nixpkgs.follows = "nixpkgs"; |
| 52 | url = "github:madsbv/nix-options-search"; | 36 | |
| 53 | }; | 37 | nix-options-search.url = "github:madsbv/nix-options-search"; |
| 54 | 38 | ||
| 55 | nix-index-database.url = "github:nix-community/nix-index-database"; | 39 | nix-index-database.url = "github:nix-community/nix-index-database"; |
| 56 | nix-index-database.inputs.nixpkgs.follows = "nixpkgs"; | 40 | nix-index-database.inputs.nixpkgs.follows = "nixpkgs"; |
| 57 | }; | 41 | }; |
| 58 | outputs = { | 42 | outputs = |
| 59 | nixpkgs, | 43 | { |
| 60 | nixos-cosmic, | 44 | nixpkgs, |
| 61 | nix-index-database, | 45 | nixos-cosmic, |
| 62 | darwin, | 46 | darwin, |
| 63 | ... | 47 | ... |
| 64 | } @ inputs: let | 48 | }@inputs: |
| 65 | overlays = [ | 49 | let |
| 66 | inputs.zig.overlays.default | 50 | lib = nixpkgs.lib; |
| 67 | inputs.rust-overlay.overlays.default | 51 | |
| 68 | inputs.nh.overlays.default | 52 | # TODO: apply these overlays sooner and remove uses of legacyPackages elsewhere. |
| 69 | ]; | 53 | overlays = [ |
| 70 | 54 | inputs.zig.overlays.default | |
| 71 | mkSystem = import ./lib/mkSystem.nix { | 55 | inputs.rust-overlay.overlays.default |
| 72 | inherit overlays nixpkgs inputs; | 56 | inputs.nh.overlays.default |
| 73 | }; | 57 | |
| 74 | in rec { | 58 | # https://github.com/LnL7/nix-darwin/issues/1041 |
| 75 | # "nix run .#darwin-rebuild" | 59 | (_: prev: { |
| 76 | packages.aarch64-darwin.darwin-rebuild = darwin.packages.aarch64-darwin.darwin-rebuild; | 60 | karabiner-elements = prev.karabiner-elements.overrideAttrs (old: { |
| 77 | # "nix fmt ." | 61 | version = "14.13.0"; |
| 78 | formatter.x86_64-linux = nixpkgs.legacyPackages.x86_64-linux.alejandra; | 62 | |
| 79 | formatter.aarch64-darwin = nixpkgs.legacyPackages.aarch64-darwin.alejandra; | 63 | src = prev.fetchurl { |
| 80 | 64 | inherit (old.src) url; | |
| 81 | # natalie's desktop computer | 65 | hash = "sha256-gmJwoht/Tfm5qMecmq1N6PSAIfWOqsvuHU8VDJY8bLw="; |
| 82 | nixosConfigurations.nixos = mkSystem "nixos" { | 66 | }; |
| 83 | user = "natalie"; | 67 | }); |
| 84 | host = "desktop"; | 68 | }) |
| 85 | system = "x86_64-linux"; | ||
| 86 | extraModules = [ | ||
| 87 | nixos-cosmic.nixosModules.default | ||
| 88 | ]; | 69 | ]; |
| 89 | }; | ||
| 90 | # natalie's laptop | ||
| 91 | darwinConfigurations."Natalies-MacBook-Air" = mkSystem "Natalies-MacBook-Air" { | ||
| 92 | user = "natalie"; | ||
| 93 | host = "laptop"; | ||
| 94 | system = "aarch64-darwin"; | ||
| 95 | }; | ||
| 96 | 70 | ||
| 97 | # chloe's mac studio "sandwich" | 71 | # Users of this flake currently use x86_64 Linux and Apple Silicon |
| 98 | darwinConfigurations.sandwich = mkSystem "sandwich" { | 72 | systems = [ |
| 99 | user = "chloe"; | 73 | "x86_64-linux" |
| 100 | host = "sandwich"; | 74 | "aarch64-darwin" |
| 101 | system = "aarch64-darwin"; | 75 | ]; |
| 102 | }; | 76 | forAllSystems = |
| 103 | # chloe's macbook air "paperback" | 77 | f: |
| 104 | darwinConfigurations.paperback = mkSystem "paperback" { | 78 | builtins.listToAttrs ( |
| 105 | user = "chloe"; | 79 | builtins.map (system: { |
| 106 | host = "paperback"; | 80 | name = system; |
| 107 | system = "aarch64-darwin"; | 81 | value = f ( |
| 108 | }; | 82 | inputs |
| 83 | // { | ||
| 84 | inherit system; | ||
| 85 | pkgs = nixpkgs.legacyPackages.${system}; | ||
| 86 | } | ||
| 87 | ); | ||
| 88 | }) systems | ||
| 89 | ); | ||
| 109 | 90 | ||
| 110 | # generate checks for "nix flake check --all-systems --no-build" | 91 | mkSystem = import ./lib/mkSystem.nix { |
| 111 | checks.aarch64-darwin = builtins.listToAttrs (builtins.map (name: let | 92 | inherit |
| 112 | d = darwinConfigurations.${name}.system; | 93 | overlays |
| 113 | in { | 94 | nixpkgs |
| 114 | name = "darwinConfiguration-" + d.name; | 95 | inputs |
| 115 | value = d; | 96 | mkNeovim |
| 116 | }) (builtins.attrNames darwinConfigurations)); | 97 | ; |
| 117 | }; | 98 | }; |
| 99 | mkNeovim = import ./lib/mkNeovim.nix { | ||
| 100 | inherit overlays nixpkgs inputs; | ||
| 101 | }; | ||
| 102 | in | ||
| 103 | rec { | ||
| 104 | # "nix fmt" | ||
| 105 | formatter = forAllSystems (inputs: inputs.pkgs.nixfmt-tree); | ||
| 106 | packages = forAllSystems ( | ||
| 107 | { system, ... }: | ||
| 108 | { | ||
| 109 | nvim-chloe = mkNeovim "chloe" system; | ||
| 110 | nvim-natalie = mkNeovim "natalie" system; | ||
| 111 | } | ||
| 112 | // lib.optionalAttrs (system == "aarch64-darwin") { | ||
| 113 | # "nix run .#darwin-rebuild" | ||
| 114 | darwin-rebuild = darwin.packages.aarch64-darwin.darwin-rebuild; | ||
| 115 | } | ||
| 116 | ); | ||
| 117 | |||
| 118 | # natalie's desktop computer | ||
| 119 | nixosConfigurations.nixos = mkSystem "nixos" { | ||
| 120 | user = "natalie"; | ||
| 121 | host = "desktop"; | ||
| 122 | system = "x86_64-linux"; | ||
| 123 | extraModules = [ | ||
| 124 | nixos-cosmic.nixosModules.default | ||
| 125 | ]; | ||
| 126 | }; | ||
| 127 | # natalie's laptop | ||
| 128 | darwinConfigurations."Natalies-MacBook-Air" = mkSystem "Natalies-MacBook-Air" { | ||
| 129 | user = "natalie"; | ||
| 130 | host = "laptop"; | ||
| 131 | system = "aarch64-darwin"; | ||
| 132 | }; | ||
| 133 | |||
| 134 | # chloe's mac studio "sandwich" | ||
| 135 | darwinConfigurations.sandwich = mkSystem "sandwich" { | ||
| 136 | user = "chloe"; | ||
| 137 | host = "sandwich"; | ||
| 138 | system = "aarch64-darwin"; | ||
| 139 | }; | ||
| 140 | # chloe's macbook air "paperback" | ||
| 141 | darwinConfigurations.paperback = mkSystem "paperback" { | ||
| 142 | user = "chloe"; | ||
| 143 | host = "paperback"; | ||
| 144 | system = "aarch64-darwin"; | ||
| 145 | }; | ||
| 146 | |||
| 147 | # generate checks for "nix flake check --all-systems --no-build" | ||
| 148 | checks.aarch64-darwin = builtins.listToAttrs ( | ||
| 149 | builtins.map ( | ||
| 150 | name: | ||
| 151 | let | ||
| 152 | d = darwinConfigurations.${name}.system; | ||
| 153 | in | ||
| 154 | { | ||
| 155 | name = "darwinConfiguration-" + d.name; | ||
| 156 | value = d; | ||
| 157 | } | ||
| 158 | ) (builtins.attrNames darwinConfigurations) | ||
| 159 | ); | ||
| 160 | }; | ||
| 118 | } | 161 | } |
lib/mkNeovim.nix created+29| ... | @@ -0,0 +1,29 @@ | ||
| 1 | { | ||
| 2 | nixpkgs, | ||
| 3 | # TODO: apply overlays here | ||
| 4 | overlays, | ||
| 5 | inputs, | ||
| 6 | }: | ||
| 7 | user: system: | ||
| 8 | let | ||
| 9 | darwin = nixpkgs.lib.strings.hasSuffix "-darwin" system; | ||
| 10 | |||
| 11 | host = { | ||
| 12 | inherit darwin; | ||
| 13 | linux = !darwin; | ||
| 14 | }; | ||
| 15 | |||
| 16 | userDir = ../users + "/${user}"; | ||
| 17 | userConfig = import (userDir + "/user.nix"); | ||
| 18 | in | ||
| 19 | (inputs.nvf.lib.neovimConfiguration { | ||
| 20 | pkgs = nixpkgs.legacyPackages.${system}; | ||
| 21 | modules = builtins.filter (f: f != null) [ | ||
| 22 | (../users + ("/" + user + "/vim.nix")) | ||
| 23 | ../modules/neovim | ||
| 24 | ]; | ||
| 25 | extraSpecialArgs = { | ||
| 26 | inherit host; | ||
| 27 | user = userConfig; | ||
| 28 | }; | ||
| 29 | }).neovim | ||
lib/mkSystem.nix+85-105| ... | @@ -4,30 +4,21 @@ | ... | @@ -4,30 +4,21 @@ |
| 4 | nixpkgs, | 4 | nixpkgs, |
| 5 | overlays, | 5 | overlays, |
| 6 | inputs, | 6 | inputs, |
| 7 | }: name: { | 7 | mkNeovim, |
| 8 | }: | ||
| 9 | name: | ||
| 10 | { | ||
| 8 | user, # ./users/{name} | 11 | user, # ./users/{name} |
| 9 | host, # ./users/{name}/{host} (optional) | 12 | host, # ./users/{name}/{host} (optional) |
| 10 | system, # arch-os | 13 | system, # arch-os |
| 11 | extraModules ? [], | 14 | extraModules ? [ ], |
| 12 | }: let | 15 | }: |
| 13 | inherit (builtins) pathExists; | 16 | let |
| 14 | darwin = nixpkgs.lib.strings.hasSuffix "-darwin" system; | 17 | darwin = nixpkgs.lib.strings.hasSuffix "-darwin" system; |
| 15 | getInputModule = a: b: | 18 | getInputModule = a: b: inputs.${a}.${if darwin then "darwinModules" else "nixosModules"}.${b}; |
| 16 | inputs.${ | ||
| 17 | a | ||
| 18 | }.${ | ||
| 19 | if darwin | ||
| 20 | then "darwinModules" | ||
| 21 | else "nixosModules" | ||
| 22 | }.${ | ||
| 23 | b | ||
| 24 | }; | ||
| 25 | 19 | ||
| 26 | # NixOS vs nix-darwin functions | 20 | # NixOS vs nix-darwin functions |
| 27 | systemFunc = | 21 | systemFunc = if darwin then inputs.darwin.lib.darwinSystem else nixpkgs.lib.nixosSystem; |
| 28 | if darwin | ||
| 29 | then inputs.darwin.lib.darwinSystem | ||
| 30 | else nixpkgs.lib.nixosSystem; | ||
| 31 | 22 | ||
| 32 | userDir = ../users + "/${user}"; | 23 | userDir = ../users + "/${user}"; |
| 33 | userConfig = import (userDir + "/user.nix"); | 24 | userConfig = import (userDir + "/user.nix"); |
| ... | @@ -38,10 +29,7 @@ | ... | @@ -38,10 +29,7 @@ |
| 38 | hostHomePath = hostDir + "/home.nix"; | 29 | hostHomePath = hostDir + "/home.nix"; |
| 39 | userHomePath = userDir + "/home.nix"; | 30 | userHomePath = userDir + "/home.nix"; |
| 40 | 31 | ||
| 41 | pathOrNull = a: | 32 | pathOrNull = a: if builtins.pathExists a then a else null; |
| 42 | if pathExists a | ||
| 43 | then a | ||
| 44 | else null; | ||
| 45 | 33 | ||
| 46 | # Arguments passed to all module files | 34 | # Arguments passed to all module files |
| 47 | args = { | 35 | args = { |
| ... | @@ -50,100 +38,92 @@ | ... | @@ -50,100 +38,92 @@ |
| 50 | # Details about the host machine | 38 | # Details about the host machine |
| 51 | host = { | 39 | host = { |
| 52 | inherit darwin name; | 40 | inherit darwin name; |
| 41 | linux = !darwin; | ||
| 53 | }; | 42 | }; |
| 54 | user = ({ | 43 | user = |
| 55 | # This acts as formal documentation for what is allowed in user.nix | 44 | ( |
| 56 | username, # unix username | 45 | { |
| 57 | name, # your display name | 46 | # This acts as formal documentation for what is allowed in user.nix |
| 58 | email, # for identity in programs such as git | 47 | username, # unix username |
| 59 | dotfilesDir, # location to `../.` | 48 | name, # your display name |
| 60 | timeZone ? "America/Los_Angeles", | 49 | email, # for identity in programs such as git |
| 61 | # Stylix/Theming | 50 | dotfilesDir, # location to `../.` |
| 62 | theme ? null, # theme name for stylix | 51 | timeZone ? "America/Los_Angeles", |
| 63 | sexuality ? null, # pride flag for hyfetch | 52 | # Stylix/Theming |
| 64 | font ? null, # font to use | 53 | theme ? null, # theme name for stylix |
| 65 | term, # preferred $TERM | 54 | sexuality ? null, # pride flag for hyfetch |
| 66 | editor, # preferred $EDITOR | 55 | font ? null, # font to use |
| 67 | browser ? null, # preferred $BROWSER | 56 | term, # preferred $TERM |
| 68 | } @ user: | 57 | editor, # preferred $EDITOR |
| 69 | user) | 58 | browser ? null, # preferred $BROWSER |
| 70 | userConfig; | 59 | }@user: |
| 60 | user | ||
| 61 | ) | ||
| 62 | userConfig; | ||
| 71 | }; | 63 | }; |
| 72 | systemSettings = rec { | 64 | systemSettings = rec { |
| 73 | inherit darwin; | 65 | inherit darwin; |
| 74 | homeDir = "/${ | 66 | homeDir = "/${if darwin then "Users" else "home"}/${userConfig.username}"; |
| 75 | if darwin | ||
| 76 | then "Users" | ||
| 77 | else "home" | ||
| 78 | }/${userConfig.username}"; | ||
| 79 | }; | 67 | }; |
| 68 | |||
| 69 | mainHomeImports = builtins.filter (f: f != null) [ | ||
| 70 | (pathOrNull userHomePath) | ||
| 71 | (pathOrNull hostHomePath) | ||
| 72 | { | ||
| 73 | home.packages = [ | ||
| 74 | (mkNeovim user system) | ||
| 75 | ]; | ||
| 76 | } | ||
| 77 | ]; | ||
| 80 | in | 78 | in |
| 81 | systemFunc { | 79 | systemFunc { |
| 82 | inherit system; | 80 | inherit system; |
| 83 | 81 | ||
| 84 | modules = | 82 | modules = |
| 85 | builtins.filter (f: f != null) | 83 | builtins.filter (f: f != null) [ |
| 86 | [ | 84 | # Apply our overlays. Overlays are keyed by system type so we have |
| 87 | # Apply our overlays. Overlays are keyed by system type so we have | 85 | # to go through and apply our system type. We do this first so |
| 88 | # to go through and apply our system type. We do this first so | 86 | # the overlays are available globally. |
| 89 | # the overlays are available globally. | 87 | { nixpkgs.overlays = overlays; } |
| 90 | {nixpkgs.overlays = overlays;} | ||
| 91 | 88 | ||
| 92 | # Modules shared between nix-darwin and NixOS | 89 | # Modules shared between nix-darwin and NixOS |
| 93 | ../modules/shared | 90 | ../modules/shared |
| 94 | # Modules for the specific OS | 91 | # Modules for the specific OS |
| 95 | ( | 92 | (if darwin then ../modules/macos else ../modules/nixos) |
| 96 | if darwin | ||
| 97 | then ../modules/macos | ||
| 98 | else ../modules/nixos | ||
| 99 | ) | ||
| 100 | 93 | ||
| 101 | # The user-wide configuration.nix | 94 | # The user-wide configuration.nix |
| 102 | (pathOrNull userConfigPath) | 95 | (pathOrNull userConfigPath) |
| 103 | # The host-wide configuration.nix | 96 | # The host-wide configuration.nix |
| 104 | ( | 97 | (pathOrNull hostConfigPath) |
| 105 | pathOrNull hostConfigPath | ||
| 106 | ) | ||
| 107 | 98 | ||
| 108 | # Set up nix-index and enable comma for easy one-shot command use | 99 | # Set up nix-index and enable comma for easy one-shot command use |
| 109 | # https://github.com/nix-community/comma | 100 | # https://github.com/nix-community/comma |
| 110 | (getInputModule "nix-index-database" "nix-index") | 101 | (getInputModule "nix-index-database" "nix-index") |
| 111 | {programs.nix-index-database.comma.enable = true;} | 102 | { programs.nix-index-database.comma.enable = true; } |
| 112 | 103 | ||
| 113 | # Themes for all programs | 104 | # Themes for all programs |
| 114 | (getInputModule "stylix" "stylix") | 105 | (getInputModule "stylix" "stylix") |
| 115 | 106 | ||
| 116 | # Home manager | 107 | # Home manager |
| 117 | (getInputModule "home-manager" "home-manager") | 108 | (getInputModule "home-manager" "home-manager") |
| 118 | { | 109 | { |
| 119 | home-manager = { | 110 | home-manager = { |
| 120 | useGlobalPkgs = true; | 111 | useGlobalPkgs = true; |
| 121 | useUserPackages = true; | 112 | useUserPackages = true; |
| 122 | backupFileExtension = "hm-backup"; | 113 | backupFileExtension = "hm-backup"; |
| 123 | # Arguments passed to all module files | 114 | # Arguments passed to all module files |
| 124 | extraSpecialArgs = | 115 | extraSpecialArgs = args // { |
| 125 | args | 116 | inherit mainHomeImports; |
| 126 | // { | ||
| 127 | mainHomeImports = builtins.filter (f: f != null) [ | ||
| 128 | ( | ||
| 129 | pathOrNull userHomePath | ||
| 130 | ) | ||
| 131 | ( | ||
| 132 | pathOrNull hostHomePath | ||
| 133 | ) | ||
| 134 | #Can't have conditional import path | ||
| 135 | ../modules/macos/tiling/sketchybar-home.nix | ||
| 136 | ]; | ||
| 137 | }; | ||
| 138 | # can't find how to make this an array without the param | ||
| 139 | users.${userConfig.username} = ../modules/home-manager.nix; | ||
| 140 | }; | 117 | }; |
| 141 | users.users.${userConfig.username}.home = systemSettings.homeDir; | 118 | # can't find how to make this an array without the param |
| 142 | } | 119 | users.${userConfig.username} = ../modules/home; |
| 120 | }; | ||
| 121 | users.users.${userConfig.username}.home = systemSettings.homeDir; | ||
| 122 | } | ||
| 143 | 123 | ||
| 144 | # Arguments passed to all module files | 124 | # Arguments passed to all module files |
| 145 | {config._module.args = args;} | 125 | { config._module.args = args; } |
| 146 | ] | 126 | ] |
| 147 | # Add extra modules specified from config | 127 | # Add extra modules specified from config |
| 148 | ++ extraModules; | 128 | ++ extraModules; |
| 149 | } | 129 | } |
modules/home-manager.nix deleted-82| ... | @@ -1,82 +0,0 @@ | ||
| 1 | # This contains default configurations for set of programs | ||
| 2 | # and configuration, but does not enable many things on it's own. | ||
| 3 | { | ||
| 4 | pkgs, | ||
| 5 | lib, | ||
| 6 | config, | ||
| 7 | user, | ||
| 8 | host, | ||
| 9 | mainHomeImports, | ||
| 10 | ... | ||
| 11 | }: let | ||
| 12 | cfg = config.programs; | ||
| 13 | in { | ||
| 14 | imports = mainHomeImports; | ||
| 15 | programs = { | ||
| 16 | home-manager.enable = true; | ||
| 17 | nix-index.enable = true; | ||
| 18 | |||
| 19 | direnv = { | ||
| 20 | enableZshIntegration = true; | ||
| 21 | nix-direnv.enable = config.programs.direnv.enable; | ||
| 22 | }; | ||
| 23 | |||
| 24 | git = { | ||
| 25 | enable = true; | ||
| 26 | userName = lib.mkDefault user.name; | ||
| 27 | userEmail = lib.mkDefault user.email; | ||
| 28 | ignores = [ | ||
| 29 | (lib.mkIf host.darwin ".DS_Store") # When using Finder | ||
| 30 | (lib.mkIf host.darwin "._*") # When using non-APFS drives | ||
| 31 | # ViM and Neovim | ||
| 32 | ".*.swp" | ||
| 33 | ".nvimlog" | ||
| 34 | ]; | ||
| 35 | }; | ||
| 36 | |||
| 37 | atuin = { | ||
| 38 | enableBashIntegration = true; | ||
| 39 | enableFishIntegration = true; | ||
| 40 | daemon.enable = cfg.atuin.enable; | ||
| 41 | }; | ||
| 42 | bat = { | ||
| 43 | extraPackages = with pkgs.bat-extras; [batdiff batman batgrep batwatch batpipe prettybat]; | ||
| 44 | }; | ||
| 45 | hyfetch = { | ||
| 46 | settings = { | ||
| 47 | backend = "fastfetch"; | ||
| 48 | preset = user.sexuality; | ||
| 49 | mode = "rgb"; | ||
| 50 | light_dark = "dark"; | ||
| 51 | lightness = { | ||
| 52 | }; | ||
| 53 | color_align = { | ||
| 54 | mode = "horizontal"; | ||
| 55 | }; | ||
| 56 | }; | ||
| 57 | }; | ||
| 58 | fastfetch.enable = cfg.hyfetch.enable; | ||
| 59 | |||
| 60 | fish = { | ||
| 61 | plugins = [ | ||
| 62 | { | ||
| 63 | name = "tide"; | ||
| 64 | inherit (pkgs.fishPlugins.tide) src; | ||
| 65 | } | ||
| 66 | { | ||
| 67 | name = "!!"; | ||
| 68 | inherit (pkgs.fishPlugins.bang-bang) src; | ||
| 69 | } | ||
| 70 | ]; | ||
| 71 | shellAliases = | ||
| 72 | {} | ||
| 73 | // lib.optionalAttrs (!host.darwin) { | ||
| 74 | reboot-windows = "sudo efibootmgr --bootnext 0000; sudo reboot -h now"; | ||
| 75 | }; | ||
| 76 | shellInit = '' | ||
| 77 | batman --export-env | source | ||
| 78 | ''; | ||
| 79 | ##test -r '/Users/${user.username}/.opam/opam-init/init.fish' && source '/Users/${user.username}/.opam/opam-init/init.fish' > /dev/null 2> /dev/null; or true | ||
| 80 | }; | ||
| 81 | }; | ||
| 82 | } | ||
modules/home/default.nix created+93| ... | @@ -0,0 +1,93 @@ | ||
| 1 | # This contains default configurations for set of programs | ||
| 2 | # and configuration, but does not enable many things on it's own. | ||
| 3 | { | ||
| 4 | pkgs, | ||
| 5 | lib, | ||
| 6 | config, | ||
| 7 | user, | ||
| 8 | host, | ||
| 9 | mainHomeImports, | ||
| 10 | ... | ||
| 11 | }: | ||
| 12 | let | ||
| 13 | cfg = config.programs; | ||
| 14 | in | ||
| 15 | { | ||
| 16 | imports = mainHomeImports ++ [ | ||
| 17 | ./macos/sketchybar.nix | ||
| 18 | ]; | ||
| 19 | programs = { | ||
| 20 | home-manager.enable = true; | ||
| 21 | nix-index.enable = true; | ||
| 22 | |||
| 23 | direnv = { | ||
| 24 | enableZshIntegration = true; | ||
| 25 | nix-direnv.enable = config.programs.direnv.enable; | ||
| 26 | }; | ||
| 27 | |||
| 28 | git = { | ||
| 29 | enable = true; | ||
| 30 | userName = lib.mkDefault user.name; | ||
| 31 | userEmail = lib.mkDefault user.email; | ||
| 32 | ignores = [ | ||
| 33 | (lib.mkIf host.darwin ".DS_Store") # When using Finder | ||
| 34 | (lib.mkIf host.darwin "._*") # When using non-APFS drives | ||
| 35 | # ViM and Neovim | ||
| 36 | ".*.swp" | ||
| 37 | ".nvimlog" | ||
| 38 | ]; | ||
| 39 | }; | ||
| 40 | |||
| 41 | atuin = { | ||
| 42 | enableBashIntegration = true; | ||
| 43 | enableFishIntegration = true; | ||
| 44 | daemon.enable = cfg.atuin.enable; | ||
| 45 | }; | ||
| 46 | bat = { | ||
| 47 | extraPackages = with pkgs.bat-extras; [ | ||
| 48 | batdiff | ||
| 49 | batman | ||
| 50 | batgrep | ||
| 51 | batwatch | ||
| 52 | batpipe | ||
| 53 | prettybat | ||
| 54 | ]; | ||
| 55 | }; | ||
| 56 | hyfetch = { | ||
| 57 | settings = { | ||
| 58 | backend = "fastfetch"; | ||
| 59 | preset = user.sexuality; | ||
| 60 | mode = "rgb"; | ||
| 61 | light_dark = "dark"; | ||
| 62 | lightness = { | ||
| 63 | }; | ||
| 64 | color_align = { | ||
| 65 | mode = "horizontal"; | ||
| 66 | }; | ||
| 67 | }; | ||
| 68 | }; | ||
| 69 | fastfetch.enable = cfg.hyfetch.enable; | ||
| 70 | |||
| 71 | fish = { | ||
| 72 | plugins = [ | ||
| 73 | { | ||
| 74 | name = "tide"; | ||
| 75 | inherit (pkgs.fishPlugins.tide) src; | ||
| 76 | } | ||
| 77 | { | ||
| 78 | name = "!!"; | ||
| 79 | inherit (pkgs.fishPlugins.bang-bang) src; | ||
| 80 | } | ||
| 81 | ]; | ||
| 82 | shellAliases = | ||
| 83 | { } | ||
| 84 | // lib.optionalAttrs (!host.darwin) { | ||
| 85 | reboot-windows = "sudo efibootmgr --bootnext 0000; sudo reboot -h now"; | ||
| 86 | }; | ||
| 87 | shellInit = '' | ||
| 88 | batman --export-env | source | ||
| 89 | ''; | ||
| 90 | ##test -r '/Users/${user.username}/.opam/opam-init/init.fish' && source '/Users/${user.username}/.opam/opam-init/init.fish' > /dev/null 2> /dev/null; or true | ||
| 91 | }; | ||
| 92 | }; | ||
| 93 | } | ||
modules/home/macos/sketchybar.nix created+408| ... | @@ -0,0 +1,408 @@ | ||
| 1 | { | ||
| 2 | pkgs, | ||
| 3 | lib, | ||
| 4 | config, | ||
| 5 | host, | ||
| 6 | ... | ||
| 7 | }: | ||
| 8 | let | ||
| 9 | # folder = "${config.home.homeDirectory}.dotfiles/files/sketchybar"; | ||
| 10 | # folder = "~/.dotfiles/files/sketchybar"; | ||
| 11 | folder = ../../../files/sketchybar; | ||
| 12 | in | ||
| 13 | lib.mkIf (host.darwin) { | ||
| 14 | home.file = | ||
| 15 | lib.attrsets.mapAttrs | ||
| 16 | ( | ||
| 17 | file: value: (lib.attrsets.overrideExisting value { enable = config.shared.darwin.tiling.enable; }) | ||
| 18 | ) | ||
| 19 | { | ||
| 20 | sketchybarrc = { | ||
| 21 | executable = true; | ||
| 22 | target = ".config/sketchybar/sketchybarrc"; | ||
| 23 | text = '' | ||
| 24 | #!/usr/bin/env sh | ||
| 25 | |||
| 26 | source "$HOME/.config/sketchybar/colors.sh" # Loads all defined colors | ||
| 27 | source "$HOME/.config/sketchybar/icons.sh" # Loads all defined icons | ||
| 28 | |||
| 29 | ITEM_DIR="$HOME/.config/sketchybar/items" # Directory where the items are configured | ||
| 30 | PLUGIN_DIR="$HOME/.config/sketchybar/plugins" # Directory where all the plugin scripts are stored | ||
| 31 | |||
| 32 | FONT="SF Pro" # Needs to have Regular, Bold, Semibold, Heavy and Black variants | ||
| 33 | PADDINGS=3 # All paddings use this value (icon, label, background) | ||
| 34 | |||
| 35 | # Setting up and starting the helper process | ||
| 36 | HELPER=git.felix.helper | ||
| 37 | killall helper | ||
| 38 | cd $HOME/.config/sketchybar/helper && make | ||
| 39 | $HOME/.config/sketchybar/helper/helper $HELPER > /dev/null 2>&1 & | ||
| 40 | |||
| 41 | # Unload the macOS on screen indicator overlay for volume change | ||
| 42 | # launchctl unload -F /System/Library/LaunchAgents/com.apple.OSDUIHelper.plist > /dev/null 2>&1 & | ||
| 43 | |||
| 44 | # Setting up the general bar appearance and default values | ||
| 45 | ${pkgs.sketchybar}/bin/sketchybar --bar height=40 \ | ||
| 46 | color=$BAR_COLOR \ | ||
| 47 | shadow=off \ | ||
| 48 | position=top \ | ||
| 49 | sticky=on \ | ||
| 50 | padding_right=0 \ | ||
| 51 | padding_left=0 \ | ||
| 52 | corner_radius=12 \ | ||
| 53 | y_offset=0 \ | ||
| 54 | margin=2 \ | ||
| 55 | blur_radius=0 \ | ||
| 56 | notch_width=0 \ | ||
| 57 | --default updates=when_shown \ | ||
| 58 | icon.font="$FONT:Bold:14.0" \ | ||
| 59 | icon.color=$ICON_COLOR \ | ||
| 60 | icon.padding_left=$PADDINGS \ | ||
| 61 | icon.padding_right=$PADDINGS \ | ||
| 62 | label.font="$FONT:Semibold:13.0" \ | ||
| 63 | label.color=$LABEL_COLOR \ | ||
| 64 | label.padding_left=$PADDINGS \ | ||
| 65 | label.padding_right=$PADDINGS \ | ||
| 66 | background.padding_right=$PADDINGS \ | ||
| 67 | background.padding_left=$PADDINGS \ | ||
| 68 | background.height=26 \ | ||
| 69 | background.corner_radius=9 \ | ||
| 70 | popup.background.border_width=2 \ | ||
| 71 | popup.background.corner_radius=11 \ | ||
| 72 | popup.background.border_color=$POPUP_BORDER_COLOR \ | ||
| 73 | popup.background.color=$POPUP_BACKGROUND_COLOR \ | ||
| 74 | popup.background.shadow.drawing=on | ||
| 75 | |||
| 76 | # Left | ||
| 77 | source "$ITEM_DIR/apple.sh" | ||
| 78 | source "$ITEM_DIR/spaces.sh" | ||
| 79 | source "$ITEM_DIR/front_app.sh" | ||
| 80 | |||
| 81 | # Center | ||
| 82 | # source "$ITEM_DIR/spotify.sh" | ||
| 83 | source "$ITEM_DIR/calendar.sh" | ||
| 84 | |||
| 85 | # Right | ||
| 86 | # source "$ITEM_DIR/brew.sh" | ||
| 87 | # source "$ITEM_DIR/github.sh" | ||
| 88 | source "$ITEM_DIR/volume.sh" | ||
| 89 | # source "$ITEM_DIR/divider.sh" | ||
| 90 | # source "$ITEM_DIR/cpu.sh" | ||
| 91 | |||
| 92 | # Forcing all item scripts to run (never do this outside of sketchybarrc) | ||
| 93 | ${pkgs.sketchybar}/bin/sketchybar --update | ||
| 94 | |||
| 95 | echo "sketchybar configuation loaded.." | ||
| 96 | ''; | ||
| 97 | }; | ||
| 98 | icons = { | ||
| 99 | executable = true; | ||
| 100 | target = ".config/sketchybar/icons.sh"; | ||
| 101 | source = folder + /icons.sh; | ||
| 102 | }; | ||
| 103 | colors = { | ||
| 104 | executable = true; | ||
| 105 | target = ".config/sketchybar/colors.sh"; | ||
| 106 | text = '' | ||
| 107 | #!/usr/bin/env sh | ||
| 108 | # Color Palette | ||
| 109 | export BLACK=0xff4c4f69 | ||
| 110 | export WHITE=0xffeff1f5 | ||
| 111 | export RED=0xffd20f39 | ||
| 112 | export GREEN=0xff40a02b | ||
| 113 | export BLUE=0xff1e66f5 | ||
| 114 | export YELLOW=0xffdf8e1d | ||
| 115 | export ORANGE=0xfffe640b | ||
| 116 | export MAGENTA=0xffea76cb | ||
| 117 | export GREY=0xff9ca0b0 | ||
| 118 | export TRANSPARENT=0xff000000 | ||
| 119 | export BLUE2=0xff7287fd | ||
| 120 | export FLAMINGO=0xffdd7878 | ||
| 121 | |||
| 122 | # General bar colors | ||
| 123 | export BAR_COLOR=0xeff1f5ff # Color of the bar | ||
| 124 | export ICON_COLOR=0xff4c4f69 | ||
| 125 | export LABEL_COLOR=0xff4c4f69 # Color of all labels | ||
| 126 | export BACKGROUND_1=0xffbcc0cc | ||
| 127 | export BACKGROUND_2=0xffbcc0cc | ||
| 128 | |||
| 129 | export POPUP_BACKGROUND_COLOR=$BLACK | ||
| 130 | export POPUP_BORDER_COLOR=$WHITE | ||
| 131 | |||
| 132 | export SHADOW_COLOR=$BLACK | ||
| 133 | ''; | ||
| 134 | }; | ||
| 135 | items_apple = { | ||
| 136 | executable = true; | ||
| 137 | target = ".config/sketchybar/items/apple.sh"; | ||
| 138 | source = folder + /items/executable_apple.sh; | ||
| 139 | }; | ||
| 140 | items_brew = { | ||
| 141 | executable = true; | ||
| 142 | target = ".config/sketchybar/items/brew.sh"; | ||
| 143 | source = folder + /items/executable_brew.sh; | ||
| 144 | }; | ||
| 145 | items_calendar = { | ||
| 146 | executable = true; | ||
| 147 | target = ".config/sketchybar/items/calendar.sh"; | ||
| 148 | text = '' | ||
| 149 | #!/usr/bin/env sh | ||
| 150 | |||
| 151 | sketchybar --add item calendar center \ | ||
| 152 | --set calendar icon=cal \ | ||
| 153 | display=1 \ | ||
| 154 | icon.font="$FONT:Black:12.0" \ | ||
| 155 | icon.padding_right=0 \ | ||
| 156 | label.width=50 \ | ||
| 157 | label.align=right \ | ||
| 158 | background.padding_left=15 \ | ||
| 159 | update_freq=30 \ | ||
| 160 | script="$PLUGIN_DIR/calendar.sh" \ | ||
| 161 | click_script="$PLUGIN_DIR/zen.sh" | ||
| 162 | ''; | ||
| 163 | }; | ||
| 164 | items_cpu = { | ||
| 165 | executable = true; | ||
| 166 | target = ".config/sketchybar/items/cpu.sh"; | ||
| 167 | source = folder + /items/executable_cpu.sh; | ||
| 168 | }; | ||
| 169 | items_divider = { | ||
| 170 | executable = true; | ||
| 171 | target = ".config/sketchybar/items/divider.sh"; | ||
| 172 | source = folder + /items/executable_divider.sh; | ||
| 173 | }; | ||
| 174 | items_front_app = { | ||
| 175 | executable = true; | ||
| 176 | target = ".config/sketchybar/items/front_app.sh"; | ||
| 177 | text = '' | ||
| 178 | #!/usr/bin/env sh | ||
| 179 | FRONT_APP_SCRIPT='sketchybar --set $NAME label="$INFO"' | ||
| 180 | sketchybar --add event window_focus \ | ||
| 181 | --add event windows_on_spaces \ | ||
| 182 | --add item system.aerospace left \ | ||
| 183 | --set system.aerospace script="$PLUGIN_DIR/aerospace.sh" \ | ||
| 184 | icon.font="$FONT:Bold:16.0" \ | ||
| 185 | label.drawing=off \ | ||
| 186 | icon.width=30 \ | ||
| 187 | icon=$YABAI_GRID \ | ||
| 188 | icon.color=$BLACK \ | ||
| 189 | updates=on \ | ||
| 190 | display=active \ | ||
| 191 | --subscribe system.aerospace window_focus \ | ||
| 192 | windows_on_spaces \ | ||
| 193 | mouse.clicked \ | ||
| 194 | --add item front_app left \ | ||
| 195 | --set front_app script="$FRONT_APP_SCRIPT" \ | ||
| 196 | icon.drawing=off \ | ||
| 197 | background.padding_left=0 \ | ||
| 198 | background.padding_right=10 \ | ||
| 199 | label.color=$BLACK \ | ||
| 200 | label.font="$FONT:Black:12.0" \ | ||
| 201 | display=active \ | ||
| 202 | --subscribe front_app front_app_switched | ||
| 203 | ''; | ||
| 204 | }; | ||
| 205 | items_github = { | ||
| 206 | executable = true; | ||
| 207 | target = ".config/sketchybar/items/github.sh"; | ||
| 208 | source = folder + /items/executable_github.sh; | ||
| 209 | }; | ||
| 210 | items_spaces = { | ||
| 211 | executable = true; | ||
| 212 | target = ".config/sketchybar/items/spaces.sh"; | ||
| 213 | # label.background.color=$BACKGROUND_2 | ||
| 214 | text = '' | ||
| 215 | ${pkgs.sketchybar}/bin/sketchybar --add event aerospace_workspace_change | ||
| 216 | ${pkgs.sketchybar}/bin/sketchybar --add event aerospace_mode_change | ||
| 217 | for sid in $(${pkgs.aerospace}/bin/aerospace list-workspaces --all); do | ||
| 218 | ${pkgs.sketchybar}/bin/sketchybar --add item space.$sid left \ | ||
| 219 | --subscribe space.$sid aerospace_workspace_change \ | ||
| 220 | --subscribe space.$sid aerospace_mode_change \ | ||
| 221 | --set space.$sid \ | ||
| 222 | icon=$sid \ | ||
| 223 | icon.padding_left=22 \ | ||
| 224 | icon.padding_right=22 \ | ||
| 225 | icon.highlight_color=$WHITE \ | ||
| 226 | icon.highlight=off \ | ||
| 227 | icon.color=0xff4c566a \ | ||
| 228 | background.padding_left=-8 \ | ||
| 229 | background.padding_right=-8 \ | ||
| 230 | background.color=$BACKGROUND_1 \ | ||
| 231 | background.drawing=on \ | ||
| 232 | script="$PLUGIN_DIR/aerospace.sh $sid" \ | ||
| 233 | click_script="aerospace workspace $sid" \ | ||
| 234 | label.font="Iosevka Nerd Font:Regular:16.0" \ | ||
| 235 | label.padding_right=33 \ | ||
| 236 | label.background.height=26 \ | ||
| 237 | label.background.drawing=on \ | ||
| 238 | label.background.corner_radius=9 \ | ||
| 239 | label.drawing=off | ||
| 240 | done | ||
| 241 | ${pkgs.sketchybar}/bin/sketchybar --add item separator left \ | ||
| 242 | --set separator icon= \ | ||
| 243 | icon.font="Iosevka Nerd Font:Regular:16.0" \ | ||
| 244 | background.padding_left=26 \ | ||
| 245 | background.padding_right=15 \ | ||
| 246 | label.drawing=off \ | ||
| 247 | display=active \ | ||
| 248 | icon.color=$GREEN | ||
| 249 | ''; | ||
| 250 | }; | ||
| 251 | items_spotify = { | ||
| 252 | executable = true; | ||
| 253 | target = ".config/sketchybar/items/spotify.sh"; | ||
| 254 | source = folder + /items/executable_spotify.sh; | ||
| 255 | }; | ||
| 256 | items_volume = { | ||
| 257 | executable = true; | ||
| 258 | target = ".config/sketchybar/items/volume.sh"; | ||
| 259 | text = '' | ||
| 260 | INITIAL_WIDTH=$(osascript -e 'set ovol to output volume of (get volume settings)') | ||
| 261 | ${pkgs.sketchybar}/bin/sketchybar --add item volume right \ | ||
| 262 | --subscribe volume volume_change \ | ||
| 263 | --set volume script="$PLUGIN_DIR/volume.sh" \ | ||
| 264 | updates=on \ | ||
| 265 | icon.background.drawing=on \ | ||
| 266 | icon.background.color=$FLAMINGO \ | ||
| 267 | icon.background.height=8 \ | ||
| 268 | icon.background.corner_radius=3 \ | ||
| 269 | icon.width=$INITIAL_WIDTH \ | ||
| 270 | width=100 \ | ||
| 271 | icon.align=right \ | ||
| 272 | label.drawing=off \ | ||
| 273 | background.drawing=on \ | ||
| 274 | background.color=$BACKGROUND_2 \ | ||
| 275 | background.height=8 \ | ||
| 276 | background.corner_radius=3 \ | ||
| 277 | align=left | ||
| 278 | |||
| 279 | ${pkgs.sketchybar}/bin/sketchybar --add alias "Control Center,Sound" right \ | ||
| 280 | --rename "Control Center,Sound" volume_alias \ | ||
| 281 | --set volume_alias icon.drawing=off \ | ||
| 282 | label.drawing=off \ | ||
| 283 | alias.color=$BLUE2 \ | ||
| 284 | background.padding_right=0 \ | ||
| 285 | background.padding_left=5 \ | ||
| 286 | width=50 \ | ||
| 287 | align=right \ | ||
| 288 | click_script="$PLUGIN_DIR/volume_click.sh" | ||
| 289 | |||
| 290 | ''; | ||
| 291 | }; | ||
| 292 | plugins_brew = { | ||
| 293 | executable = true; | ||
| 294 | target = ".config/sketchybar/plugins/brew.sh"; | ||
| 295 | source = folder + /plugins/executable_brew.sh; | ||
| 296 | }; | ||
| 297 | plugins_calendar = { | ||
| 298 | executable = true; | ||
| 299 | target = ".config/sketchybar/plugins/calendar.sh"; | ||
| 300 | source = folder + /plugins/executable_calendar.sh; | ||
| 301 | }; | ||
| 302 | plugins_github = { | ||
| 303 | executable = true; | ||
| 304 | target = ".config/sketchybar/plugins/github.sh"; | ||
| 305 | source = folder + /plugins/executable_github.sh; | ||
| 306 | }; | ||
| 307 | plugins_icon_map = { | ||
| 308 | executable = true; | ||
| 309 | target = ".config/sketchybar/plugins/icon_map.sh"; | ||
| 310 | source = folder + /plugins/executable_icon_map.sh; | ||
| 311 | }; | ||
| 312 | plugins_space = { | ||
| 313 | executable = true; | ||
| 314 | target = ".config/sketchybar/plugins/space.sh"; | ||
| 315 | source = folder + /plugins/executable_space.sh; | ||
| 316 | }; | ||
| 317 | plugins_spotify = { | ||
| 318 | executable = true; | ||
| 319 | target = ".config/sketchybar/plugins/spotify.sh"; | ||
| 320 | source = folder + /plugins/executable_spotify.sh; | ||
| 321 | }; | ||
| 322 | plugins_volume = { | ||
| 323 | executable = true; | ||
| 324 | target = ".config/sketchybar/plugins/volume.sh"; | ||
| 325 | text = '' | ||
| 326 | #!/usr/bin/env sh | ||
| 327 | WIDTH=100 | ||
| 328 | |||
| 329 | volume_change() { | ||
| 330 | # INITIAL_WIDTH=$(${pkgs.sketchybar}/bin/sketchybar --query $NAME | ${pkgs.jq}/bin/jq ".icon.width") | ||
| 331 | # if [ "$INITIAL_WIDTH" -eq "0" ]; then | ||
| 332 | # ${pkgs.sketchybar}/bin/sketchybar --animate tanh 30 --set $NAME width=$WIDTH icon.width=$INFO | ||
| 333 | # else | ||
| 334 | # ${pkgs.sketchybar}/bin/sketchybar --set $NAME icon.width=$INFO width=$WIDTH | ||
| 335 | # fi | ||
| 336 | ${pkgs.sketchybar}/bin/sketchybar --set $NAME icon.width=$INFO | ||
| 337 | |||
| 338 | |||
| 339 | # sleep 5 | ||
| 340 | # FINAL_WIDTH=$(${pkgs.sketchybar}/bin/sketchybar --query $NAME | ${pkgs.jq}/bin/jq ".icon.width") | ||
| 341 | # if [ "$FINAL_WIDTH" -eq "$INFO" ]; then | ||
| 342 | # ${pkgs.sketchybar}/bin/sketchybar --animate tanh 30 --set $NAME width=0 icon.width=0 | ||
| 343 | # fi | ||
| 344 | } | ||
| 345 | |||
| 346 | case "$SENDER" in | ||
| 347 | "volume_change") volume_change | ||
| 348 | ;; | ||
| 349 | esac | ||
| 350 | ''; | ||
| 351 | }; | ||
| 352 | plugins_volume_click = { | ||
| 353 | executable = true; | ||
| 354 | target = ".config/sketchybar/plugins/volume_click.sh"; | ||
| 355 | text = '' | ||
| 356 | #!/usr/bin/env sh | ||
| 357 | MUTED=$(osascript -e 'output muted of (get volume settings)') | ||
| 358 | if [ "$MUTED" = "false" ]; then | ||
| 359 | osascript -e 'set volume output muted true' | ||
| 360 | else | ||
| 361 | osascript -e 'set volume output muted false' | ||
| 362 | fi | ||
| 363 | ''; | ||
| 364 | }; | ||
| 365 | plugins_zen = { | ||
| 366 | executable = true; | ||
| 367 | target = ".config/sketchybar/plugins/zen.sh"; | ||
| 368 | source = folder + /plugins/executable_zen.sh; | ||
| 369 | }; | ||
| 370 | plugins_aerospace = { | ||
| 371 | executable = true; | ||
| 372 | target = ".config/sketchybar/plugins/aerospace.sh"; | ||
| 373 | text = '' | ||
| 374 | #!/usr/bin/env bash | ||
| 375 | source "$HOME/.config/sketchybar/colors.sh" # Loads all defined colors | ||
| 376 | |||
| 377 | highlight_focused_workspace() { | ||
| 378 | if [[ "$1" = "$FOCUSED_WORKSPACE" ]] | ||
| 379 | then | ||
| 380 | ${pkgs.sketchybar}/bin/sketchybar --animate tanh 20 --set $NAME icon.highlight=on label.width=0 | ||
| 381 | else | ||
| 382 | ${pkgs.sketchybar}/bin/sketchybar --animate tanh 20 --set $NAME icon.highlight=off label.width=dynamic | ||
| 383 | fi | ||
| 384 | } | ||
| 385 | |||
| 386 | illuminate_mode() { | ||
| 387 | if [[ "$mode" = "service" ]] | ||
| 388 | then | ||
| 389 | ${pkgs.sketchybar}/bin/sketchybar --animate tanh 20 --set $NAME background.color=$ORANGE | ||
| 390 | elif [[ "$mode" = "resize" ]] | ||
| 391 | then | ||
| 392 | ${pkgs.sketchybar}/bin/sketchybar --animate tanh 20 --set $NAME background.color=$GREEN | ||
| 393 | else | ||
| 394 | ${pkgs.sketchybar}/bin/sketchybar --animate tanh 20 --set $NAME background.color=$BACKGROUND_1 | ||
| 395 | fi | ||
| 396 | } | ||
| 397 | case "$SENDER" in | ||
| 398 | "aerospace_workspace_change") | ||
| 399 | highlight_focused_workspace $1 | ||
| 400 | ;; | ||
| 401 | "aerospace_mode_change") | ||
| 402 | illuminate_mode | ||
| 403 | ;; | ||
| 404 | esac | ||
| 405 | ''; | ||
| 406 | }; | ||
| 407 | }; | ||
| 408 | } | ||
modules/macos/default.nix+3-2| ... | @@ -2,7 +2,8 @@ | ... | @@ -2,7 +2,8 @@ |
| 2 | pkgs, | 2 | pkgs, |
| 3 | lib, | 3 | lib, |
| 4 | ... | 4 | ... |
| 5 | }: { | 5 | }: |
| 6 | { | ||
| 6 | imports = [ | 7 | imports = [ |
| 7 | # sort-lines: start | 8 | # sort-lines: start |
| 8 | ./mac-app-store.nix | 9 | ./mac-app-store.nix |
| ... | @@ -14,7 +15,7 @@ | ... | @@ -14,7 +15,7 @@ |
| 14 | # make 'shared.linux' not an error to define. | 15 | # make 'shared.linux' not an error to define. |
| 15 | options.shared.linux = lib.mkOption { | 16 | options.shared.linux = lib.mkOption { |
| 16 | type = lib.types.anything; | 17 | type = lib.types.anything; |
| 17 | default = {}; | 18 | default = { }; |
| 18 | description = "no-op on darwin"; | 19 | description = "no-op on darwin"; |
| 19 | }; | 20 | }; |
| 20 | } | 21 | } |
modules/macos/icons.nix+8-8| ... | @@ -2,17 +2,18 @@ | ... | @@ -2,17 +2,18 @@ |
| 2 | lib, | 2 | lib, |
| 3 | config, | 3 | config, |
| 4 | ... | 4 | ... |
| 5 | }: let | 5 | }: |
| 6 | let | ||
| 6 | cfg = config.environment.customIcons; | 7 | cfg = config.environment.customIcons; |
| 7 | inherit | 8 | inherit (lib) |
| 8 | (lib) | ||
| 9 | mkEnableOption | 9 | mkEnableOption |
| 10 | mkIf | 10 | mkIf |
| 11 | mkMerge | 11 | mkMerge |
| 12 | mkOption | 12 | mkOption |
| 13 | types | 13 | types |
| 14 | ; | 14 | ; |
| 15 | in { | 15 | in |
| 16 | { | ||
| 16 | options.environment.customIcons = { | 17 | options.environment.customIcons = { |
| 17 | enable = mkEnableOption "environment.customIcons"; | 18 | enable = mkEnableOption "environment.customIcons"; |
| 18 | clearCacheOnActivation = mkEnableOption "environment.customIcons.clearCacheOnActivation"; | 19 | clearCacheOnActivation = mkEnableOption "environment.customIcons.clearCacheOnActivation"; |
| ... | @@ -21,8 +22,8 @@ in { | ... | @@ -21,8 +22,8 @@ in { |
| 21 | type = types.listOf ( | 22 | type = types.listOf ( |
| 22 | types.submodule { | 23 | types.submodule { |
| 23 | options = { | 24 | options = { |
| 24 | path = mkOption {type = types.path;}; | 25 | path = mkOption { type = types.path; }; |
| 25 | icon = mkOption {type = types.path;}; | 26 | icon = mkOption { type = types.path; }; |
| 26 | }; | 27 | }; |
| 27 | } | 28 | } |
| 28 | ); | 29 | ); |
| ... | @@ -46,8 +47,7 @@ in { | ... | @@ -46,8 +47,7 @@ in { |
| 46 | set imageData to (current application's NSImage's alloc()'s initWithContentsOfFile:iconPath) | 47 | set imageData to (current application's NSImage's alloc()'s initWithContentsOfFile:iconPath) |
| 47 | (current application's NSWorkspace's sharedWorkspace()'s setIcon:imageData forFile:destPath options:2) | 48 | (current application's NSWorkspace's sharedWorkspace()'s setIcon:imageData forFile:destPath options:2) |
| 48 | EOF | 49 | EOF |
| 49 | '') | 50 | '') cfg.icons |
| 50 | cfg.icons | ||
| 51 | )) | 51 | )) |
| 52 | } | 52 | } |
| 53 | 53 |
modules/macos/mac-app-store.nix+6-5| ... | @@ -3,7 +3,8 @@ | ... | @@ -3,7 +3,8 @@ |
| 3 | lib, | 3 | lib, |
| 4 | pkgs, | 4 | pkgs, |
| 5 | ... | 5 | ... |
| 6 | }: let | 6 | }: |
| 7 | let | ||
| 7 | types = lib.types; | 8 | types = lib.types; |
| 8 | 9 | ||
| 9 | # Mapping of Mac App Store applications. | 10 | # Mapping of Mac App Store applications. |
| ... | @@ -23,12 +24,13 @@ | ... | @@ -23,12 +24,13 @@ |
| 23 | 24 | ||
| 24 | # the resolved configuration from the user | 25 | # the resolved configuration from the user |
| 25 | masApps = config.shared.darwin.macAppStoreApps; | 26 | masApps = config.shared.darwin.macAppStoreApps; |
| 26 | in { | 27 | in |
| 28 | { | ||
| 27 | options = { | 29 | options = { |
| 28 | # Installs Mac Applications via name using homebrew. | 30 | # Installs Mac Applications via name using homebrew. |
| 29 | shared.darwin.macAppStoreApps = lib.mkOption { | 31 | shared.darwin.macAppStoreApps = lib.mkOption { |
| 30 | type = types.listOf types.str; | 32 | type = types.listOf types.str; |
| 31 | default = []; | 33 | default = [ ]; |
| 32 | }; | 34 | }; |
| 33 | }; | 35 | }; |
| 34 | config = lib.mkIf (builtins.length masApps > 0) { | 36 | config = lib.mkIf (builtins.length masApps > 0) { |
| ... | @@ -37,8 +39,7 @@ in { | ... | @@ -37,8 +39,7 @@ in { |
| 37 | builtins.map (name: { | 39 | builtins.map (name: { |
| 38 | inherit name; | 40 | inherit name; |
| 39 | value = allMasApps.${name}; | 41 | value = allMasApps.${name}; |
| 40 | }) | 42 | }) masApps |
| 41 | masApps | ||
| 42 | ); | 43 | ); |
| 43 | }; | 44 | }; |
| 44 | } | 45 | } |
modules/macos/system.nix+4-7| ... | @@ -3,9 +3,11 @@ | ... | @@ -3,9 +3,11 @@ |
| 3 | pkgs, | 3 | pkgs, |
| 4 | lib, | 4 | lib, |
| 5 | ... | 5 | ... |
| 6 | }: let | 6 | }: |
| 7 | let | ||
| 7 | tiling = config.shared.darwin.tiling.enable; | 8 | tiling = config.shared.darwin.tiling.enable; |
| 8 | in { | 9 | in |
| 10 | { | ||
| 9 | # Use touchid or watch to activate sudo | 11 | # Use touchid or watch to activate sudo |
| 10 | security.pam.services.sudo_local = { | 12 | security.pam.services.sudo_local = { |
| 11 | enable = true; | 13 | enable = true; |
| ... | @@ -111,11 +113,6 @@ in { | ... | @@ -111,11 +113,6 @@ in { |
| 111 | "com.apple.dock" = { | 113 | "com.apple.dock" = { |
| 112 | workspaces-edge-delay = 0.15; | 114 | workspaces-edge-delay = 0.15; |
| 113 | }; | 115 | }; |
| 114 | "com.apple.symbolichotkeys" = { | ||
| 115 | AppleSymbolicHotKeys = { | ||
| 116 | "64".enabled = false; | ||
| 117 | }; | ||
| 118 | }; | ||
| 119 | "com.apple.CrashReporter" = { | 116 | "com.apple.CrashReporter" = { |
| 120 | DialogType = "developer"; # display crash reports when apps crash. | 117 | DialogType = "developer"; # display crash reports when apps crash. |
| 121 | }; | 118 | }; |
modules/macos/tiling/aerospace.nix+41-13| ... | @@ -2,7 +2,8 @@ | ... | @@ -2,7 +2,8 @@ |
| 2 | config, | 2 | config, |
| 3 | pkgs, | 3 | pkgs, |
| 4 | ... | 4 | ... |
| 5 | }: { | 5 | }: |
| 6 | { | ||
| 6 | services.aerospace = { | 7 | services.aerospace = { |
| 7 | enable = config.shared.darwin.tiling.enable; | 8 | enable = config.shared.darwin.tiling.enable; |
| 8 | settings = { | 9 | settings = { |
| ... | @@ -85,8 +86,8 @@ | ... | @@ -85,8 +86,8 @@ |
| 85 | alt-shift-8 = "move-node-to-workspace 8"; | 86 | alt-shift-8 = "move-node-to-workspace 8"; |
| 86 | alt-shift-9 = "move-node-to-workspace 9"; | 87 | alt-shift-9 = "move-node-to-workspace 9"; |
| 87 | 88 | ||
| 88 | cmd-h = []; # Disable "hide application" | 89 | cmd-h = [ ]; # Disable "hide application" |
| 89 | cmd-alt-h = []; # Disable "hide others" | 90 | cmd-alt-h = [ ]; # Disable "hide others" |
| 90 | 91 | ||
| 91 | # # See: https://nikitabobko.github.io/AeroSpace/commands#workspace-back-and-forth | 92 | # # See: https://nikitabobko.github.io/AeroSpace/commands#workspace-back-and-forth |
| 92 | # alt-tab = "workspace-back-and-forth"; | 93 | # alt-tab = "workspace-back-and-forth"; |
| ... | @@ -97,22 +98,49 @@ | ... | @@ -97,22 +98,49 @@ |
| 97 | alt-shift-semicolon = "mode service"; | 98 | alt-shift-semicolon = "mode service"; |
| 98 | }; | 99 | }; |
| 99 | mode.service.binding = { | 100 | mode.service.binding = { |
| 100 | esc = ["reload-config" "mode main"]; | 101 | esc = [ |
| 101 | r = ["flatten-workspace-tree" "mode main"]; # reset layout | 102 | "reload-config" |
| 102 | f = ["layout floating tiling" "mode main"]; # Toggle between floating and tiling layout | 103 | "mode main" |
| 103 | backspace = ["close-all-windows-but-current" "mode main"]; | 104 | ]; |
| 105 | r = [ | ||
| 106 | "flatten-workspace-tree" | ||
| 107 | "mode main" | ||
| 108 | ]; # reset layout | ||
| 109 | f = [ | ||
| 110 | "layout floating tiling" | ||
| 111 | "mode main" | ||
| 112 | ]; # Toggle between floating and tiling layout | ||
| 113 | backspace = [ | ||
| 114 | "close-all-windows-but-current" | ||
| 115 | "mode main" | ||
| 116 | ]; | ||
| 104 | 117 | ||
| 105 | # sticky is not yet supported https://github.com/nikitabobko/AeroSpace/issues/2 | 118 | # sticky is not yet supported https://github.com/nikitabobko/AeroSpace/issues/2 |
| 106 | #s = ["layout sticky tiling", "mode main"] | 119 | #s = ["layout sticky tiling", "mode main"] |
| 107 | 120 | ||
| 108 | alt-shift-h = ["join-with left" "mode main"]; | 121 | alt-shift-h = [ |
| 109 | alt-shift-j = ["join-with down" "mode main"]; | 122 | "join-with left" |
| 110 | alt-shift-k = ["join-with up" "mode main"]; | 123 | "mode main" |
| 111 | alt-shift-l = ["join-with right" "mode main"]; | 124 | ]; |
| 125 | alt-shift-j = [ | ||
| 126 | "join-with down" | ||
| 127 | "mode main" | ||
| 128 | ]; | ||
| 129 | alt-shift-k = [ | ||
| 130 | "join-with up" | ||
| 131 | "mode main" | ||
| 132 | ]; | ||
| 133 | alt-shift-l = [ | ||
| 134 | "join-with right" | ||
| 135 | "mode main" | ||
| 136 | ]; | ||
| 112 | 137 | ||
| 113 | down = "volume down"; | 138 | down = "volume down"; |
| 114 | up = "volume up"; | 139 | up = "volume up"; |
| 115 | shift-down = ["volume set 0" "mode main"]; | 140 | shift-down = [ |
| 141 | "volume set 0" | ||
| 142 | "mode main" | ||
| 143 | ]; | ||
| 116 | }; | 144 | }; |
| 117 | after-startup-command = [ | 145 | after-startup-command = [ |
| 118 | "exec-and-forget sketchybar" | 146 | "exec-and-forget sketchybar" |
| ... | @@ -131,7 +159,7 @@ | ... | @@ -131,7 +159,7 @@ |
| 131 | "if" = { | 159 | "if" = { |
| 132 | app-id = "com.mitchellh.ghostty"; | 160 | app-id = "com.mitchellh.ghostty"; |
| 133 | }; | 161 | }; |
| 134 | run = ["layout floating"]; | 162 | run = [ "layout floating" ]; |
| 135 | check-further-callbacks = true; | 163 | check-further-callbacks = true; |
| 136 | } | 164 | } |
| 137 | ]; | 165 | ]; |
modules/macos/tiling/default.nix+4-2| ... | @@ -1,6 +1,8 @@ | ... | @@ -1,6 +1,8 @@ |
| 1 | {lib, ...}: let | 1 | { lib, ... }: |
| 2 | let | ||
| 2 | inherit (lib) types; | 3 | inherit (lib) types; |
| 3 | in { | 4 | in |
| 5 | { | ||
| 4 | imports = [ | 6 | imports = [ |
| 5 | ./sketchybar.nix | 7 | ./sketchybar.nix |
| 6 | ./aerospace.nix | 8 | ./aerospace.nix |
modules/macos/tiling/sketchybar-home.nix deleted-403| ... | @@ -1,403 +0,0 @@ | ||
| 1 | { | ||
| 2 | pkgs, | ||
| 3 | lib, | ||
| 4 | config, | ||
| 5 | ... | ||
| 6 | }: let | ||
| 7 | # folder = "${config.home.homeDirectory}.dotfiles/files/sketchybar"; | ||
| 8 | # folder = "~/.dotfiles/files/sketchybar"; | ||
| 9 | folder = ../../../files/sketchybar; | ||
| 10 | in { | ||
| 11 | home.file = | ||
| 12 | lib.attrsets.mapAttrs (file: value: ( | ||
| 13 | lib.attrsets.overrideExisting value {enable = config.shared.darwin.tiling.enable;} | ||
| 14 | )) { | ||
| 15 | sketchybarrc = { | ||
| 16 | executable = true; | ||
| 17 | target = ".config/sketchybar/sketchybarrc"; | ||
| 18 | text = '' | ||
| 19 | #!/usr/bin/env sh | ||
| 20 | |||
| 21 | source "$HOME/.config/sketchybar/colors.sh" # Loads all defined colors | ||
| 22 | source "$HOME/.config/sketchybar/icons.sh" # Loads all defined icons | ||
| 23 | |||
| 24 | ITEM_DIR="$HOME/.config/sketchybar/items" # Directory where the items are configured | ||
| 25 | PLUGIN_DIR="$HOME/.config/sketchybar/plugins" # Directory where all the plugin scripts are stored | ||
| 26 | |||
| 27 | FONT="SF Pro" # Needs to have Regular, Bold, Semibold, Heavy and Black variants | ||
| 28 | PADDINGS=3 # All paddings use this value (icon, label, background) | ||
| 29 | |||
| 30 | # Setting up and starting the helper process | ||
| 31 | HELPER=git.felix.helper | ||
| 32 | killall helper | ||
| 33 | cd $HOME/.config/sketchybar/helper && make | ||
| 34 | $HOME/.config/sketchybar/helper/helper $HELPER > /dev/null 2>&1 & | ||
| 35 | |||
| 36 | # Unload the macOS on screen indicator overlay for volume change | ||
| 37 | # launchctl unload -F /System/Library/LaunchAgents/com.apple.OSDUIHelper.plist > /dev/null 2>&1 & | ||
| 38 | |||
| 39 | # Setting up the general bar appearance and default values | ||
| 40 | ${pkgs.sketchybar}/bin/sketchybar --bar height=40 \ | ||
| 41 | color=$BAR_COLOR \ | ||
| 42 | shadow=off \ | ||
| 43 | position=top \ | ||
| 44 | sticky=on \ | ||
| 45 | padding_right=0 \ | ||
| 46 | padding_left=0 \ | ||
| 47 | corner_radius=12 \ | ||
| 48 | y_offset=0 \ | ||
| 49 | margin=2 \ | ||
| 50 | blur_radius=0 \ | ||
| 51 | notch_width=0 \ | ||
| 52 | --default updates=when_shown \ | ||
| 53 | icon.font="$FONT:Bold:14.0" \ | ||
| 54 | icon.color=$ICON_COLOR \ | ||
| 55 | icon.padding_left=$PADDINGS \ | ||
| 56 | icon.padding_right=$PADDINGS \ | ||
| 57 | label.font="$FONT:Semibold:13.0" \ | ||
| 58 | label.color=$LABEL_COLOR \ | ||
| 59 | label.padding_left=$PADDINGS \ | ||
| 60 | label.padding_right=$PADDINGS \ | ||
| 61 | background.padding_right=$PADDINGS \ | ||
| 62 | background.padding_left=$PADDINGS \ | ||
| 63 | background.height=26 \ | ||
| 64 | background.corner_radius=9 \ | ||
| 65 | popup.background.border_width=2 \ | ||
| 66 | popup.background.corner_radius=11 \ | ||
| 67 | popup.background.border_color=$POPUP_BORDER_COLOR \ | ||
| 68 | popup.background.color=$POPUP_BACKGROUND_COLOR \ | ||
| 69 | popup.background.shadow.drawing=on | ||
| 70 | |||
| 71 | # Left | ||
| 72 | source "$ITEM_DIR/apple.sh" | ||
| 73 | source "$ITEM_DIR/spaces.sh" | ||
| 74 | source "$ITEM_DIR/front_app.sh" | ||
| 75 | |||
| 76 | # Center | ||
| 77 | # source "$ITEM_DIR/spotify.sh" | ||
| 78 | source "$ITEM_DIR/calendar.sh" | ||
| 79 | |||
| 80 | # Right | ||
| 81 | # source "$ITEM_DIR/brew.sh" | ||
| 82 | # source "$ITEM_DIR/github.sh" | ||
| 83 | source "$ITEM_DIR/volume.sh" | ||
| 84 | # source "$ITEM_DIR/divider.sh" | ||
| 85 | # source "$ITEM_DIR/cpu.sh" | ||
| 86 | |||
| 87 | # Forcing all item scripts to run (never do this outside of sketchybarrc) | ||
| 88 | ${pkgs.sketchybar}/bin/sketchybar --update | ||
| 89 | |||
| 90 | echo "sketchybar configuation loaded.." | ||
| 91 | ''; | ||
| 92 | }; | ||
| 93 | icons = { | ||
| 94 | executable = true; | ||
| 95 | target = ".config/sketchybar/icons.sh"; | ||
| 96 | source = folder + /icons.sh; | ||
| 97 | }; | ||
| 98 | colors = { | ||
| 99 | executable = true; | ||
| 100 | target = ".config/sketchybar/colors.sh"; | ||
| 101 | text = '' | ||
| 102 | #!/usr/bin/env sh | ||
| 103 | # Color Palette | ||
| 104 | export BLACK=0xff4c4f69 | ||
| 105 | export WHITE=0xffeff1f5 | ||
| 106 | export RED=0xffd20f39 | ||
| 107 | export GREEN=0xff40a02b | ||
| 108 | export BLUE=0xff1e66f5 | ||
| 109 | export YELLOW=0xffdf8e1d | ||
| 110 | export ORANGE=0xfffe640b | ||
| 111 | export MAGENTA=0xffea76cb | ||
| 112 | export GREY=0xff9ca0b0 | ||
| 113 | export TRANSPARENT=0xff000000 | ||
| 114 | export BLUE2=0xff7287fd | ||
| 115 | export FLAMINGO=0xffdd7878 | ||
| 116 | |||
| 117 | # General bar colors | ||
| 118 | export BAR_COLOR=0xeff1f5ff # Color of the bar | ||
| 119 | export ICON_COLOR=0xff4c4f69 | ||
| 120 | export LABEL_COLOR=0xff4c4f69 # Color of all labels | ||
| 121 | export BACKGROUND_1=0xffbcc0cc | ||
| 122 | export BACKGROUND_2=0xffbcc0cc | ||
| 123 | |||
| 124 | export POPUP_BACKGROUND_COLOR=$BLACK | ||
| 125 | export POPUP_BORDER_COLOR=$WHITE | ||
| 126 | |||
| 127 | export SHADOW_COLOR=$BLACK | ||
| 128 | ''; | ||
| 129 | }; | ||
| 130 | items_apple = { | ||
| 131 | executable = true; | ||
| 132 | target = ".config/sketchybar/items/apple.sh"; | ||
| 133 | source = folder + /items/executable_apple.sh; | ||
| 134 | }; | ||
| 135 | items_brew = { | ||
| 136 | executable = true; | ||
| 137 | target = ".config/sketchybar/items/brew.sh"; | ||
| 138 | source = folder + /items/executable_brew.sh; | ||
| 139 | }; | ||
| 140 | items_calendar = { | ||
| 141 | executable = true; | ||
| 142 | target = ".config/sketchybar/items/calendar.sh"; | ||
| 143 | text = '' | ||
| 144 | #!/usr/bin/env sh | ||
| 145 | |||
| 146 | sketchybar --add item calendar center \ | ||
| 147 | --set calendar icon=cal \ | ||
| 148 | display=1 \ | ||
| 149 | icon.font="$FONT:Black:12.0" \ | ||
| 150 | icon.padding_right=0 \ | ||
| 151 | label.width=50 \ | ||
| 152 | label.align=right \ | ||
| 153 | background.padding_left=15 \ | ||
| 154 | update_freq=30 \ | ||
| 155 | script="$PLUGIN_DIR/calendar.sh" \ | ||
| 156 | click_script="$PLUGIN_DIR/zen.sh" | ||
| 157 | ''; | ||
| 158 | }; | ||
| 159 | items_cpu = { | ||
| 160 | executable = true; | ||
| 161 | target = ".config/sketchybar/items/cpu.sh"; | ||
| 162 | source = folder + /items/executable_cpu.sh; | ||
| 163 | }; | ||
| 164 | items_divider = { | ||
| 165 | executable = true; | ||
| 166 | target = ".config/sketchybar/items/divider.sh"; | ||
| 167 | source = folder + /items/executable_divider.sh; | ||
| 168 | }; | ||
| 169 | items_front_app = { | ||
| 170 | executable = true; | ||
| 171 | target = ".config/sketchybar/items/front_app.sh"; | ||
| 172 | text = '' | ||
| 173 | #!/usr/bin/env sh | ||
| 174 | FRONT_APP_SCRIPT='sketchybar --set $NAME label="$INFO"' | ||
| 175 | sketchybar --add event window_focus \ | ||
| 176 | --add event windows_on_spaces \ | ||
| 177 | --add item system.aerospace left \ | ||
| 178 | --set system.aerospace script="$PLUGIN_DIR/aerospace.sh" \ | ||
| 179 | icon.font="$FONT:Bold:16.0" \ | ||
| 180 | label.drawing=off \ | ||
| 181 | icon.width=30 \ | ||
| 182 | icon=$YABAI_GRID \ | ||
| 183 | icon.color=$BLACK \ | ||
| 184 | updates=on \ | ||
| 185 | display=active \ | ||
| 186 | --subscribe system.aerospace window_focus \ | ||
| 187 | windows_on_spaces \ | ||
| 188 | mouse.clicked \ | ||
| 189 | --add item front_app left \ | ||
| 190 | --set front_app script="$FRONT_APP_SCRIPT" \ | ||
| 191 | icon.drawing=off \ | ||
| 192 | background.padding_left=0 \ | ||
| 193 | background.padding_right=10 \ | ||
| 194 | label.color=$BLACK \ | ||
| 195 | label.font="$FONT:Black:12.0" \ | ||
| 196 | display=active \ | ||
| 197 | --subscribe front_app front_app_switched | ||
| 198 | ''; | ||
| 199 | }; | ||
| 200 | items_github = { | ||
| 201 | executable = true; | ||
| 202 | target = ".config/sketchybar/items/github.sh"; | ||
| 203 | source = folder + /items/executable_github.sh; | ||
| 204 | }; | ||
| 205 | items_spaces = { | ||
| 206 | executable = true; | ||
| 207 | target = ".config/sketchybar/items/spaces.sh"; | ||
| 208 | # label.background.color=$BACKGROUND_2 | ||
| 209 | text = '' | ||
| 210 | ${pkgs.sketchybar}/bin/sketchybar --add event aerospace_workspace_change | ||
| 211 | ${pkgs.sketchybar}/bin/sketchybar --add event aerospace_mode_change | ||
| 212 | for sid in $(${pkgs.aerospace}/bin/aerospace list-workspaces --all); do | ||
| 213 | ${pkgs.sketchybar}/bin/sketchybar --add item space.$sid left \ | ||
| 214 | --subscribe space.$sid aerospace_workspace_change \ | ||
| 215 | --subscribe space.$sid aerospace_mode_change \ | ||
| 216 | --set space.$sid \ | ||
| 217 | icon=$sid \ | ||
| 218 | icon.padding_left=22 \ | ||
| 219 | icon.padding_right=22 \ | ||
| 220 | icon.highlight_color=$WHITE \ | ||
| 221 | icon.highlight=off \ | ||
| 222 | icon.color=0xff4c566a \ | ||
| 223 | background.padding_left=-8 \ | ||
| 224 | background.padding_right=-8 \ | ||
| 225 | background.color=$BACKGROUND_1 \ | ||
| 226 | background.drawing=on \ | ||
| 227 | script="$PLUGIN_DIR/aerospace.sh $sid" \ | ||
| 228 | click_script="aerospace workspace $sid" \ | ||
| 229 | label.font="Iosevka Nerd Font:Regular:16.0" \ | ||
| 230 | label.padding_right=33 \ | ||
| 231 | label.background.height=26 \ | ||
| 232 | label.background.drawing=on \ | ||
| 233 | label.background.corner_radius=9 \ | ||
| 234 | label.drawing=off | ||
| 235 | done | ||
| 236 | ${pkgs.sketchybar}/bin/sketchybar --add item separator left \ | ||
| 237 | --set separator icon= \ | ||
| 238 | icon.font="Iosevka Nerd Font:Regular:16.0" \ | ||
| 239 | background.padding_left=26 \ | ||
| 240 | background.padding_right=15 \ | ||
| 241 | label.drawing=off \ | ||
| 242 | display=active \ | ||
| 243 | icon.color=$GREEN | ||
| 244 | ''; | ||
| 245 | }; | ||
| 246 | items_spotify = { | ||
| 247 | executable = true; | ||
| 248 | target = ".config/sketchybar/items/spotify.sh"; | ||
| 249 | source = folder + /items/executable_spotify.sh; | ||
| 250 | }; | ||
| 251 | items_volume = { | ||
| 252 | executable = true; | ||
| 253 | target = ".config/sketchybar/items/volume.sh"; | ||
| 254 | text = '' | ||
| 255 | INITIAL_WIDTH=$(osascript -e 'set ovol to output volume of (get volume settings)') | ||
| 256 | ${pkgs.sketchybar}/bin/sketchybar --add item volume right \ | ||
| 257 | --subscribe volume volume_change \ | ||
| 258 | --set volume script="$PLUGIN_DIR/volume.sh" \ | ||
| 259 | updates=on \ | ||
| 260 | icon.background.drawing=on \ | ||
| 261 | icon.background.color=$FLAMINGO \ | ||
| 262 | icon.background.height=8 \ | ||
| 263 | icon.background.corner_radius=3 \ | ||
| 264 | icon.width=$INITIAL_WIDTH \ | ||
| 265 | width=100 \ | ||
| 266 | icon.align=right \ | ||
| 267 | label.drawing=off \ | ||
| 268 | background.drawing=on \ | ||
| 269 | background.color=$BACKGROUND_2 \ | ||
| 270 | background.height=8 \ | ||
| 271 | background.corner_radius=3 \ | ||
| 272 | align=left | ||
| 273 | |||
| 274 | ${pkgs.sketchybar}/bin/sketchybar --add alias "Control Center,Sound" right \ | ||
| 275 | --rename "Control Center,Sound" volume_alias \ | ||
| 276 | --set volume_alias icon.drawing=off \ | ||
| 277 | label.drawing=off \ | ||
| 278 | alias.color=$BLUE2 \ | ||
| 279 | background.padding_right=0 \ | ||
| 280 | background.padding_left=5 \ | ||
| 281 | width=50 \ | ||
| 282 | align=right \ | ||
| 283 | click_script="$PLUGIN_DIR/volume_click.sh" | ||
| 284 | |||
| 285 | ''; | ||
| 286 | }; | ||
| 287 | plugins_brew = { | ||
| 288 | executable = true; | ||
| 289 | target = ".config/sketchybar/plugins/brew.sh"; | ||
| 290 | source = folder + /plugins/executable_brew.sh; | ||
| 291 | }; | ||
| 292 | plugins_calendar = { | ||
| 293 | executable = true; | ||
| 294 | target = ".config/sketchybar/plugins/calendar.sh"; | ||
| 295 | source = folder + /plugins/executable_calendar.sh; | ||
| 296 | }; | ||
| 297 | plugins_github = { | ||
| 298 | executable = true; | ||
| 299 | target = ".config/sketchybar/plugins/github.sh"; | ||
| 300 | source = folder + /plugins/executable_github.sh; | ||
| 301 | }; | ||
| 302 | plugins_icon_map = { | ||
| 303 | executable = true; | ||
| 304 | target = ".config/sketchybar/plugins/icon_map.sh"; | ||
| 305 | source = folder + /plugins/executable_icon_map.sh; | ||
| 306 | }; | ||
| 307 | plugins_space = { | ||
| 308 | executable = true; | ||
| 309 | target = ".config/sketchybar/plugins/space.sh"; | ||
| 310 | source = folder + /plugins/executable_space.sh; | ||
| 311 | }; | ||
| 312 | plugins_spotify = { | ||
| 313 | executable = true; | ||
| 314 | target = ".config/sketchybar/plugins/spotify.sh"; | ||
| 315 | source = folder + /plugins/executable_spotify.sh; | ||
| 316 | }; | ||
| 317 | plugins_volume = { | ||
| 318 | executable = true; | ||
| 319 | target = ".config/sketchybar/plugins/volume.sh"; | ||
| 320 | text = '' | ||
| 321 | #!/usr/bin/env sh | ||
| 322 | WIDTH=100 | ||
| 323 | |||
| 324 | volume_change() { | ||
| 325 | # INITIAL_WIDTH=$(${pkgs.sketchybar}/bin/sketchybar --query $NAME | ${pkgs.jq}/bin/jq ".icon.width") | ||
| 326 | # if [ "$INITIAL_WIDTH" -eq "0" ]; then | ||
| 327 | # ${pkgs.sketchybar}/bin/sketchybar --animate tanh 30 --set $NAME width=$WIDTH icon.width=$INFO | ||
| 328 | # else | ||
| 329 | # ${pkgs.sketchybar}/bin/sketchybar --set $NAME icon.width=$INFO width=$WIDTH | ||
| 330 | # fi | ||
| 331 | ${pkgs.sketchybar}/bin/sketchybar --set $NAME icon.width=$INFO | ||
| 332 | |||
| 333 | |||
| 334 | # sleep 5 | ||
| 335 | # FINAL_WIDTH=$(${pkgs.sketchybar}/bin/sketchybar --query $NAME | ${pkgs.jq}/bin/jq ".icon.width") | ||
| 336 | # if [ "$FINAL_WIDTH" -eq "$INFO" ]; then | ||
| 337 | # ${pkgs.sketchybar}/bin/sketchybar --animate tanh 30 --set $NAME width=0 icon.width=0 | ||
| 338 | # fi | ||
| 339 | } | ||
| 340 | |||
| 341 | case "$SENDER" in | ||
| 342 | "volume_change") volume_change | ||
| 343 | ;; | ||
| 344 | esac | ||
| 345 | ''; | ||
| 346 | }; | ||
| 347 | plugins_volume_click = { | ||
| 348 | executable = true; | ||
| 349 | target = ".config/sketchybar/plugins/volume_click.sh"; | ||
| 350 | text = '' | ||
| 351 | #!/usr/bin/env sh | ||
| 352 | MUTED=$(osascript -e 'output muted of (get volume settings)') | ||
| 353 | if [ "$MUTED" = "false" ]; then | ||
| 354 | osascript -e 'set volume output muted true' | ||
| 355 | else | ||
| 356 | osascript -e 'set volume output muted false' | ||
| 357 | fi | ||
| 358 | ''; | ||
| 359 | }; | ||
| 360 | plugins_zen = { | ||
| 361 | executable = true; | ||
| 362 | target = ".config/sketchybar/plugins/zen.sh"; | ||
| 363 | source = folder + /plugins/executable_zen.sh; | ||
| 364 | }; | ||
| 365 | plugins_aerospace = { | ||
| 366 | executable = true; | ||
| 367 | target = ".config/sketchybar/plugins/aerospace.sh"; | ||
| 368 | text = '' | ||
| 369 | #!/usr/bin/env bash | ||
| 370 | source "$HOME/.config/sketchybar/colors.sh" # Loads all defined colors | ||
| 371 | |||
| 372 | highlight_focused_workspace() { | ||
| 373 | if [[ "$1" = "$FOCUSED_WORKSPACE" ]] | ||
| 374 | then | ||
| 375 | ${pkgs.sketchybar}/bin/sketchybar --animate tanh 20 --set $NAME icon.highlight=on label.width=0 | ||
| 376 | else | ||
| 377 | ${pkgs.sketchybar}/bin/sketchybar --animate tanh 20 --set $NAME icon.highlight=off label.width=dynamic | ||
| 378 | fi | ||
| 379 | } | ||
| 380 | |||
| 381 | illuminate_mode() { | ||
| 382 | if [[ "$mode" = "service" ]] | ||
| 383 | then | ||
| 384 | ${pkgs.sketchybar}/bin/sketchybar --animate tanh 20 --set $NAME background.color=$ORANGE | ||
| 385 | elif [[ "$mode" = "resize" ]] | ||
| 386 | then | ||
| 387 | ${pkgs.sketchybar}/bin/sketchybar --animate tanh 20 --set $NAME background.color=$GREEN | ||
| 388 | else | ||
| 389 | ${pkgs.sketchybar}/bin/sketchybar --animate tanh 20 --set $NAME background.color=$BACKGROUND_1 | ||
| 390 | fi | ||
| 391 | } | ||
| 392 | case "$SENDER" in | ||
| 393 | "aerospace_workspace_change") | ||
| 394 | highlight_focused_workspace $1 | ||
| 395 | ;; | ||
| 396 | "aerospace_mode_change") | ||
| 397 | illuminate_mode | ||
| 398 | ;; | ||
| 399 | esac | ||
| 400 | ''; | ||
| 401 | }; | ||
| 402 | }; | ||
| 403 | } | ||
modules/macos/tiling/sketchybar.nix+2-1| ... | @@ -2,7 +2,8 @@ | ... | @@ -2,7 +2,8 @@ |
| 2 | config, | 2 | config, |
| 3 | pkgs, | 3 | pkgs, |
| 4 | ... | 4 | ... |
| 5 | }: { | 5 | }: |
| 6 | { | ||
| 6 | services.sketchybar = { | 7 | services.sketchybar = { |
| 7 | enable = config.shared.darwin.tiling.enable; | 8 | enable = config.shared.darwin.tiling.enable; |
| 8 | package = pkgs.sketchybar; | 9 | package = pkgs.sketchybar; |
modules/neovim/default.nix created+140| ... | @@ -0,0 +1,140 @@ | ||
| 1 | { | ||
| 2 | config, | ||
| 3 | lib, | ||
| 4 | host, | ||
| 5 | ... | ||
| 6 | }: | ||
| 7 | { | ||
| 8 | # based on default options from upstream: | ||
| 9 | # https://github.com/NotAShelf/nvf/blob/main/configuration.nix | ||
| 10 | # | ||
| 11 | # a full list of options is available too: | ||
| 12 | # https://notashelf.github.io/nvf/options.html | ||
| 13 | # | ||
| 14 | # override level 999 is used to not conflict with mkDefault as used by nvf. | ||
| 15 | # which allows user configurations to disable/override anything here. | ||
| 16 | vim = lib.mkOverride 999 { | ||
| 17 | theme = { | ||
| 18 | enable = true; | ||
| 19 | }; | ||
| 20 | visuals = { | ||
| 21 | # notification system | ||
| 22 | # https://github.com/j-hui/fidget.nvim | ||
| 23 | fidget-nvim.enable = true; | ||
| 24 | # highlight undo / paste / autoformat / macros | ||
| 25 | # https://github.com/tzachar/highlight-undo.nvim | ||
| 26 | highlight-undo.enable = true; | ||
| 27 | # indentation guides | ||
| 28 | # https://github.com/lukas-reineke/indent-blankline.nvim | ||
| 29 | indent-blankline.enable = false; | ||
| 30 | # extra icons | ||
| 31 | nvim-web-devicons.enable = true; | ||
| 32 | # https://github.com/petertriho/nvim-scrollbar | ||
| 33 | nvim-scrollbar.enable = false; | ||
| 34 | }; | ||
| 35 | lsp = { | ||
| 36 | # Must be enabled for language modules to hook into the LSP API. | ||
| 37 | enable = true; | ||
| 38 | formatOnSave = true; | ||
| 39 | # show errors inline | ||
| 40 | # https://github.com/folke/trouble.nvim | ||
| 41 | trouble.enable = true; | ||
| 42 | # show lightbulb icon in gutter to indicate code actions | ||
| 43 | # https://github.com/kosayoda/nvim-lightbulb | ||
| 44 | lightbulb.enable = true; | ||
| 45 | # show icons in auto-completion menu | ||
| 46 | # https://github.com/onsails/lspkind.nvim | ||
| 47 | lspkind.enable = config.vim.autocomplete.blink-cmp.enable; | ||
| 48 | }; | ||
| 49 | debugger = { | ||
| 50 | nvim-dap = { | ||
| 51 | enable = true; | ||
| 52 | ui.enable = true; | ||
| 53 | }; | ||
| 54 | }; | ||
| 55 | languages = { | ||
| 56 | enableFormat = true; | ||
| 57 | enableTreesitter = true; | ||
| 58 | enableExtraDiagnostics = true; | ||
| 59 | |||
| 60 | # sort-lines: on | ||
| 61 | assembly.enable = true; | ||
| 62 | bash.enable = true; | ||
| 63 | clang.enable = true; | ||
| 64 | css.enable = true; | ||
| 65 | html.enable = true; | ||
| 66 | nix.enable = true; | ||
| 67 | rust.crates.enable = true; | ||
| 68 | rust.enable = true; | ||
| 69 | ts.enable = true; | ||
| 70 | zig.enable = true; | ||
| 71 | # sort-lines: off | ||
| 72 | |||
| 73 | nix.format.type = "nixfmt"; # looks so much nicer | ||
| 74 | }; | ||
| 75 | filetree = { | ||
| 76 | neo-tree = { | ||
| 77 | enable = true; | ||
| 78 | }; | ||
| 79 | }; | ||
| 80 | tabline = { | ||
| 81 | nvimBufferline.enable = true; | ||
| 82 | }; | ||
| 83 | autocomplete = { | ||
| 84 | blink-cmp.enable = true; | ||
| 85 | }; | ||
| 86 | statusline = { | ||
| 87 | lualine = { | ||
| 88 | enable = true; | ||
| 89 | refresh = { | ||
| 90 | statusline = 100; | ||
| 91 | tabline = 100; | ||
| 92 | winbar = 100; | ||
| 93 | }; | ||
| 94 | }; | ||
| 95 | }; | ||
| 96 | binds = { | ||
| 97 | whichKey.enable = true; | ||
| 98 | cheatsheet.enable = true; | ||
| 99 | # discourages bad keyboard habit, e.g. disables arrow keys, explains better binds | ||
| 100 | # https://github.com/m4xshen/hardtime.nvim | ||
| 101 | hardtime-nvim.enable = true; | ||
| 102 | hardtime-nvim.setupOpts = { | ||
| 103 | disable_mouse = false; | ||
| 104 | restriction_mode = "hint"; # default behavior is lenient | ||
| 105 | }; | ||
| 106 | }; | ||
| 107 | ui = { | ||
| 108 | borders.enable = true; | ||
| 109 | # https://github.com/norcalli/nvim-colorizer.lua | ||
| 110 | colorizer.enable = true; | ||
| 111 | # https://github.com/RRethy/vim-illuminate | ||
| 112 | illuminate.enable = true; | ||
| 113 | breadcrumbs = { | ||
| 114 | enable = false; | ||
| 115 | navbuddy.enable = config.vim.ui.breadcrumbs.enable; | ||
| 116 | }; | ||
| 117 | smartcolumn = { | ||
| 118 | enable = true; | ||
| 119 | setupOpts.custom_colorcolumn = { | ||
| 120 | # this is a freeform module, it's `buftype = int;` for configuring column position | ||
| 121 | nix = "110"; | ||
| 122 | ruby = "120"; | ||
| 123 | java = "130"; | ||
| 124 | go = [ | ||
| 125 | "90" | ||
| 126 | "130" | ||
| 127 | ]; | ||
| 128 | }; | ||
| 129 | }; | ||
| 130 | }; | ||
| 131 | notes = { | ||
| 132 | todo-comments.enable = true; | ||
| 133 | }; | ||
| 134 | git = { | ||
| 135 | enable = true; | ||
| 136 | gitsigns.enable = true; | ||
| 137 | gitsigns.codeActions.enable = false; # throws an annoying debug message | ||
| 138 | }; | ||
| 139 | }; | ||
| 140 | } | ||
modules/nixos/boot.nix+2-1| ... | @@ -1,4 +1,5 @@ | ... | @@ -1,4 +1,5 @@ |
| 1 | {pkgs, ...}: { | 1 | { pkgs, ... }: |
| 2 | { | ||
| 2 | boot = { | 3 | boot = { |
| 3 | kernelPackages = pkgs.linuxPackages_latest; # _zen, _hardened, _rt, _rt_latest, etc. | 4 | kernelPackages = pkgs.linuxPackages_latest; # _zen, _hardened, _rt, _rt_latest, etc. |
| 4 | loader = { | 5 | loader = { |
modules/nixos/default.nix+3-2| ... | @@ -2,7 +2,8 @@ | ... | @@ -2,7 +2,8 @@ |
| 2 | lib, | 2 | lib, |
| 3 | pkgs, | 3 | pkgs, |
| 4 | ... | 4 | ... |
| 5 | }: { | 5 | }: |
| 6 | { | ||
| 6 | imports = [ | 7 | imports = [ |
| 7 | ./boot.nix | 8 | ./boot.nix |
| 8 | ./ld.nix | 9 | ./ld.nix |
| ... | @@ -12,7 +13,7 @@ | ... | @@ -12,7 +13,7 @@ |
| 12 | # make 'shared.darwin' not an error to define. | 13 | # make 'shared.darwin' not an error to define. |
| 13 | options.shared.darwin = lib.mkOption { | 14 | options.shared.darwin = lib.mkOption { |
| 14 | type = lib.types.anything; | 15 | type = lib.types.anything; |
| 15 | default = {}; | 16 | default = { }; |
| 16 | description = "no-op on linux"; | 17 | description = "no-op on linux"; |
| 17 | }; | 18 | }; |
| 18 | } | 19 | } |
modules/nixos/ld.nix+2-1| ... | @@ -1,4 +1,5 @@ | ... | @@ -1,4 +1,5 @@ |
| 1 | {pkgs, ...}: { | 1 | { pkgs, ... }: |
| 2 | { | ||
| 2 | programs.nix-ld.enable = true; | 3 | programs.nix-ld.enable = true; |
| 3 | 4 | ||
| 4 | # "minimum" amount of libraries needed for most games to run without steam-run | 5 | # "minimum" amount of libraries needed for most games to run without steam-run |
modules/nixos/nvidia.nix+7-5| ... | @@ -2,10 +2,12 @@ | ... | @@ -2,10 +2,12 @@ |
| 2 | pkgs, | 2 | pkgs, |
| 3 | config, | 3 | config, |
| 4 | ... | 4 | ... |
| 5 | }: let | 5 | }: |
| 6 | let | ||
| 6 | nvidiaDriverChannel = config.boot.kernelPackages.nvidiaPackages.latest; | 7 | nvidiaDriverChannel = config.boot.kernelPackages.nvidiaPackages.latest; |
| 7 | in { | 8 | in |
| 8 | services.xserver.videoDrivers = ["nvidia"]; | 9 | { |
| 10 | services.xserver.videoDrivers = [ "nvidia" ]; | ||
| 9 | 11 | ||
| 10 | nixpkgs.config = { | 12 | nixpkgs.config = { |
| 11 | nvidia.acceptLicense = true; | 13 | nvidia.acceptLicense = true; |
| ... | @@ -18,7 +20,7 @@ in { | ... | @@ -18,7 +20,7 @@ in { |
| 18 | ]; | 20 | ]; |
| 19 | 21 | ||
| 20 | # Blacklist nouveau to avoid conflicts | 22 | # Blacklist nouveau to avoid conflicts |
| 21 | boot.blacklistedKernelModules = ["nouveau"]; | 23 | boot.blacklistedKernelModules = [ "nouveau" ]; |
| 22 | environment.variables = { | 24 | environment.variables = { |
| 23 | LIBVA_DRIVER_NAME = "nvidia"; # Hardware video acceleration | 25 | LIBVA_DRIVER_NAME = "nvidia"; # Hardware video acceleration |
| 24 | XDG_SESSION_TYPE = "wayland"; # Force Wayland | 26 | XDG_SESSION_TYPE = "wayland"; # Force Wayland |
| ... | @@ -80,7 +82,7 @@ in { | ... | @@ -80,7 +82,7 @@ in { |
| 80 | }; | 82 | }; |
| 81 | 83 | ||
| 82 | nix.settings = { | 84 | nix.settings = { |
| 83 | substituters = ["https://cuda-maintainers.cachix.org"]; | 85 | substituters = [ "https://cuda-maintainers.cachix.org" ]; |
| 84 | trusted-public-keys = [ | 86 | trusted-public-keys = [ |
| 85 | "cuda-maintainers.cachix.org-1:0dq3bujKpuEPMCX6U4WylrUDZ9JyUG0VpVZa7CNfq5E=" | 87 | "cuda-maintainers.cachix.org-1:0dq3bujKpuEPMCX6U4WylrUDZ9JyUG0VpVZa7CNfq5E=" |
| 86 | ]; | 88 | ]; |
modules/nixos/services.nix+4-3| ... | @@ -1,4 +1,5 @@ | ... | @@ -1,4 +1,5 @@ |
| 1 | {pkgs, ...}: { | 1 | { pkgs, ... }: |
| 2 | { | ||
| 2 | services = { | 3 | services = { |
| 3 | avahi = { | 4 | avahi = { |
| 4 | enable = true; | 5 | enable = true; |
| ... | @@ -39,7 +40,7 @@ | ... | @@ -39,7 +40,7 @@ |
| 39 | # Enable CUPS to print documents. | 40 | # Enable CUPS to print documents. |
| 40 | printing = { | 41 | printing = { |
| 41 | enable = true; | 42 | enable = true; |
| 42 | drivers = [pkgs.brlaser]; # Brother printer driver | 43 | drivers = [ pkgs.brlaser ]; # Brother printer driver |
| 43 | }; | 44 | }; |
| 44 | 45 | ||
| 45 | pipewire = { | 46 | pipewire = { |
| ... | @@ -54,7 +55,7 @@ | ... | @@ -54,7 +55,7 @@ |
| 54 | 55 | ||
| 55 | openssh = { | 56 | openssh = { |
| 56 | enable = true; | 57 | enable = true; |
| 57 | ports = [22]; | 58 | ports = [ 22 ]; |
| 58 | settings = { | 59 | settings = { |
| 59 | PasswordAuthentication = true; | 60 | PasswordAuthentication = true; |
| 60 | UseDns = true; | 61 | UseDns = true; |
modules/nixvim/default.nix deleted-96| ... | @@ -1,96 +0,0 @@ | ||
| 1 | { | ||
| 2 | pkgs, | ||
| 3 | inputs, | ||
| 4 | nixvim, | ||
| 5 | ... | ||
| 6 | }: { | ||
| 7 | imports = [ | ||
| 8 | ./opts.nix | ||
| 9 | ./keymaps.nix | ||
| 10 | ./plugins | ||
| 11 | ]; | ||
| 12 | programs.nixvim = { | ||
| 13 | enable = true; | ||
| 14 | |||
| 15 | globals = { | ||
| 16 | #Set leader to space, and localleader to \ | ||
| 17 | mapleader = " "; | ||
| 18 | maplocalleader = "\\"; | ||
| 19 | |||
| 20 | have_nerd_font = true; | ||
| 21 | }; | ||
| 22 | |||
| 23 | clipboard = { | ||
| 24 | providers = { | ||
| 25 | wl-copy.enable = true; # For Wayland | ||
| 26 | xsel.enable = true; # For X11 | ||
| 27 | }; | ||
| 28 | |||
| 29 | # Sync clipboard between OS and Neovim | ||
| 30 | # Remove this option if you want your OS clipboard to remain independent. | ||
| 31 | register = "unnamedplus"; | ||
| 32 | }; | ||
| 33 | |||
| 34 | opts = { | ||
| 35 | # Show line numbers | ||
| 36 | number = true; | ||
| 37 | # You can also add relative line numbers, to help with jumping. | ||
| 38 | # Experiment for yourself to see if you like it! | ||
| 39 | #relativenumber = true | ||
| 40 | |||
| 41 | # Enable mouse mode, can be useful for resizing splits for example! | ||
| 42 | mouse = "a"; | ||
| 43 | |||
| 44 | # Don't show the mode, since it's already in the statusline | ||
| 45 | showmode = false; | ||
| 46 | |||
| 47 | # Enable break indent | ||
| 48 | breakindent = true; | ||
| 49 | |||
| 50 | # Save undo history | ||
| 51 | undofile = true; | ||
| 52 | |||
| 53 | # Case-insensitive searching UNLESS \C or one or more capital letters in the search term | ||
| 54 | ignorecase = true; | ||
| 55 | smartcase = true; | ||
| 56 | |||
| 57 | # Keep signcolumn on by default | ||
| 58 | signcolumn = "yes"; | ||
| 59 | |||
| 60 | # Decrease update time | ||
| 61 | updatetime = 250; | ||
| 62 | |||
| 63 | # Decrease mapped sequence wait time | ||
| 64 | # Displays which-key popup sooner | ||
| 65 | timeoutlen = 300; | ||
| 66 | |||
| 67 | # Configure how new splits should be opened | ||
| 68 | splitright = true; | ||
| 69 | splitbelow = true; | ||
| 70 | |||
| 71 | # Sets how neovim will display certain whitespace characters in the editor | ||
| 72 | # See `:help 'list'` | ||
| 73 | # and `:help 'listchars'` | ||
| 74 | list = true; | ||
| 75 | # NOTE: .__raw here means that this field is raw lua code | ||
| 76 | listchars.__raw = "{ tab = '» ', trail = '·', nbsp = '␣' }"; | ||
| 77 | |||
| 78 | # Preview substitutions live, as you type! | ||
| 79 | inccommand = "split"; | ||
| 80 | |||
| 81 | # Show which line your cursor is on | ||
| 82 | cursorline = true; | ||
| 83 | |||
| 84 | # Minimal number of screen lines to keep above and below the cursor. | ||
| 85 | scrolloff = 10; | ||
| 86 | |||
| 87 | # if performing an operation that would fail due to unsaved changes in the buffer (like `:q`), | ||
| 88 | # instead raise a dialog asking if you wish to save the current file(s) | ||
| 89 | # See `:help 'confirm'` | ||
| 90 | confirm = true; | ||
| 91 | |||
| 92 | # See `:help hlsearch` | ||
| 93 | hlsearch = true; | ||
| 94 | }; | ||
| 95 | }; | ||
| 96 | } | ||
modules/nixvim/icons.nix deleted-189| ... | @@ -1,189 +0,0 @@ | ||
| 1 | {lib, ...}: { | ||
| 2 | options.nvix.icons = lib.mkOption { | ||
| 3 | type = lib.types.attrs; | ||
| 4 | default = {}; | ||
| 5 | }; | ||
| 6 | config.nvix.icons = { | ||
| 7 | kind = { | ||
| 8 | Array = ""; | ||
| 9 | Boolean = ""; | ||
| 10 | Class = ""; | ||
| 11 | Color = ""; | ||
| 12 | Constant = ""; | ||
| 13 | Constructor = ""; | ||
| 14 | Enum = ""; | ||
| 15 | EnumMember = ""; | ||
| 16 | Event = ""; | ||
| 17 | Field = ""; | ||
| 18 | File = ""; | ||
| 19 | Folder = ""; | ||
| 20 | Function = ""; | ||
| 21 | Interface = ""; | ||
| 22 | Key = ""; | ||
| 23 | Keyword = ""; | ||
| 24 | Method = ""; | ||
| 25 | Module = ""; | ||
| 26 | Namespace = ""; | ||
| 27 | Null = "ﳠ"; | ||
| 28 | Number = ""; | ||
| 29 | Object = ""; | ||
| 30 | Operator = ""; | ||
| 31 | Package = ""; | ||
| 32 | Property = ""; | ||
| 33 | Reference = ""; | ||
| 34 | Snippet = ""; | ||
| 35 | String = ""; | ||
| 36 | Struct = ""; | ||
| 37 | Text = ""; | ||
| 38 | TypeParameter = ""; | ||
| 39 | Unit = ""; | ||
| 40 | Value = ""; | ||
| 41 | Variable = ""; | ||
| 42 | Copilot = ""; | ||
| 43 | TabNine = "⌬"; | ||
| 44 | }; | ||
| 45 | git = { | ||
| 46 | LineAdded = ""; | ||
| 47 | LineModified = ""; | ||
| 48 | LineRemoved = ""; | ||
| 49 | FileDeleted = ""; | ||
| 50 | FileIgnored = ""; | ||
| 51 | FileRenamed = ""; | ||
| 52 | FileStaged = "✓"; | ||
| 53 | FileUnmerged = ""; | ||
| 54 | FileMerged = ""; | ||
| 55 | FileUnstaged = ""; | ||
| 56 | FileUntracked = "◌"; | ||
| 57 | FileChanged = ""; | ||
| 58 | Copied = ""; | ||
| 59 | Ignored = ""; | ||
| 60 | Diff = ""; | ||
| 61 | Repo = ""; | ||
| 62 | Octoface = ""; | ||
| 63 | Branch = ""; | ||
| 64 | }; | ||
| 65 | ui = { | ||
| 66 | lazy = { | ||
| 67 | ft = ""; | ||
| 68 | lazy = " "; | ||
| 69 | loaded = ""; | ||
| 70 | not_loaded = ""; | ||
| 71 | }; | ||
| 72 | ArrowCircleDown = ""; | ||
| 73 | ArrowCircleLeft = ""; | ||
| 74 | ArrowCircleRight = ""; | ||
| 75 | ArrowCircleUp = ""; | ||
| 76 | BoldArrowDown = ""; | ||
| 77 | BoldArrowLeft = ""; | ||
| 78 | BoldArrowRight = ""; | ||
| 79 | BoldArrowUp = ""; | ||
| 80 | BoldClose = ""; | ||
| 81 | BoldDividerLeft = ""; | ||
| 82 | BoldDividerRight = ""; | ||
| 83 | BoldLineLeft = "▎"; | ||
| 84 | BookMark = ""; | ||
| 85 | BoxChecked = ""; | ||
| 86 | Bug = ""; | ||
| 87 | Stacks = ""; | ||
| 88 | Scopes = ""; | ||
| 89 | Watches = ""; | ||
| 90 | DebugConsole = ""; | ||
| 91 | Calendar = ""; | ||
| 92 | Check = ""; | ||
| 93 | ChevronRight = ">"; | ||
| 94 | ChevronShortDown = ""; | ||
| 95 | ChevronShortLeft = ""; | ||
| 96 | ChevronShortRight = ""; | ||
| 97 | ChevronShortUp = ""; | ||
| 98 | Circle = ""; | ||
| 99 | Close = ""; | ||
| 100 | CloudDownload = ""; | ||
| 101 | Code = ""; | ||
| 102 | Comment = ""; | ||
| 103 | Dashboard = ""; | ||
| 104 | DividerLeft = ""; | ||
| 105 | DividerRight = ""; | ||
| 106 | DoubleChevronRight = "»"; | ||
| 107 | Ellipsis = ""; | ||
| 108 | EmptyFolder = ""; | ||
| 109 | EmptyFolderOpen = ""; | ||
| 110 | ExitCircle = ""; | ||
| 111 | File = ""; | ||
| 112 | FileSymlink = ""; | ||
| 113 | Files = ""; | ||
| 114 | FileRename = ""; | ||
| 115 | FindFile = ""; | ||
| 116 | FindText = ""; | ||
| 117 | Fire = ""; | ||
| 118 | Folder = ""; | ||
| 119 | FolderOpen = ""; | ||
| 120 | FolderSymlink = ""; | ||
| 121 | Forward = ""; | ||
| 122 | Gear = ""; | ||
| 123 | History = ""; | ||
| 124 | Lightbulb = ""; | ||
| 125 | LineLeft = "▏"; | ||
| 126 | LineMiddle = "│"; | ||
| 127 | List = ""; | ||
| 128 | Lock = ""; | ||
| 129 | NewFile = ""; | ||
| 130 | Note = ""; | ||
| 131 | Package = ""; | ||
| 132 | Pencil = ""; | ||
| 133 | Plus = ""; | ||
| 134 | Project = ""; | ||
| 135 | Search = ""; | ||
| 136 | SignIn = ""; | ||
| 137 | SignOut = ""; | ||
| 138 | Tab = ""; | ||
| 139 | Table = ""; | ||
| 140 | Target = ""; | ||
| 141 | Telescope = ""; | ||
| 142 | Text = ""; | ||
| 143 | Tree = ""; | ||
| 144 | Triangle = ""; | ||
| 145 | TriangleShortArrowDown = ""; | ||
| 146 | TriangleShortArrowLeft = ""; | ||
| 147 | TriangleShortArrowRight = ""; | ||
| 148 | TriangleShortArrowUp = ""; | ||
| 149 | }; | ||
| 150 | diagnostics = { | ||
| 151 | BoldError = ""; | ||
| 152 | Error = ""; | ||
| 153 | BoldWarning = ""; | ||
| 154 | Warning = ""; | ||
| 155 | BoldInformation = ""; | ||
| 156 | Information = ""; | ||
| 157 | BoldQuestion = ""; | ||
| 158 | Question = ""; | ||
| 159 | BoldHint = ""; | ||
| 160 | Hint = ""; | ||
| 161 | Debug = ""; | ||
| 162 | Trace = "✎"; | ||
| 163 | }; | ||
| 164 | misc = { | ||
| 165 | Robot = "ﮧ"; | ||
| 166 | Squirrel = ""; | ||
| 167 | Tag = ""; | ||
| 168 | Watch = ""; | ||
| 169 | Smiley = ""; | ||
| 170 | Package = ""; | ||
| 171 | CircuitBoard = ""; | ||
| 172 | LualineFmt = ""; | ||
| 173 | }; | ||
| 174 | nvtree_chad = { | ||
| 175 | default = ""; | ||
| 176 | symlink = ""; | ||
| 177 | folder = { | ||
| 178 | default = ""; | ||
| 179 | empty = ""; | ||
| 180 | empty_open = ""; | ||
| 181 | open = ""; | ||
| 182 | symlink = ""; | ||
| 183 | symlink_open = ""; | ||
| 184 | arrow_open = ""; | ||
| 185 | arrow_closed = ""; | ||
| 186 | }; | ||
| 187 | }; | ||
| 188 | }; | ||
| 189 | } | ||
modules/nixvim/keymaps.nix deleted-42| ... | @@ -1,42 +0,0 @@ | ||
| 1 | {pkgs, ...}: { | ||
| 2 | programs.nixvim = { | ||
| 3 | keymaps = [ | ||
| 4 | # Keybinds to make split navigation easier. | ||
| 5 | # Use CTRL+<hjkl> to switch between windows | ||
| 6 | # | ||
| 7 | # See `:help wincmd` for a list of all window commands | ||
| 8 | { | ||
| 9 | mode = "n"; | ||
| 10 | key = "<C-h>"; | ||
| 11 | action = "<C-w><C-h>"; | ||
| 12 | options = { | ||
| 13 | desc = "Move focus to the left window"; | ||
| 14 | }; | ||
| 15 | } | ||
| 16 | { | ||
| 17 | mode = "n"; | ||
| 18 | key = "<C-l>"; | ||
| 19 | action = "<C-w><C-l>"; | ||
| 20 | options = { | ||
| 21 | desc = "Move focus to the right window"; | ||
| 22 | }; | ||
| 23 | } | ||
| 24 | { | ||
| 25 | mode = "n"; | ||
| 26 | key = "<C-j>"; | ||
| 27 | action = "<C-w><C-j>"; | ||
| 28 | options = { | ||
| 29 | desc = "Move focus to the lower window"; | ||
| 30 | }; | ||
| 31 | } | ||
| 32 | { | ||
| 33 | mode = "n"; | ||
| 34 | key = "<C-k>"; | ||
| 35 | action = "<C-w><C-k>"; | ||
| 36 | options = { | ||
| 37 | desc = "Move focus to the upper window"; | ||
| 38 | }; | ||
| 39 | } | ||
| 40 | ]; | ||
| 41 | }; | ||
| 42 | } | ||
modules/nixvim/opts.nix deleted-65| ... | @@ -1,65 +0,0 @@ | ||
| 1 | {pkgs, ...}: { | ||
| 2 | programs.nixvim = { | ||
| 3 | opts = { | ||
| 4 | # Show line numbers | ||
| 5 | number = true; | ||
| 6 | relativenumber = true; | ||
| 7 | |||
| 8 | shiftwidth = 2; | ||
| 9 | |||
| 10 | # Enable mouse mode, can be useful for resizing splits for example! | ||
| 11 | mouse = "a"; | ||
| 12 | |||
| 13 | # Don't show the mode, since it's already in the statusline | ||
| 14 | showmode = false; | ||
| 15 | |||
| 16 | # Enable break indent | ||
| 17 | breakindent = true; | ||
| 18 | |||
| 19 | # Save undo history | ||
| 20 | undofile = true; | ||
| 21 | |||
| 22 | # Case-insensitive searching UNLESS \C or one or more capital letters in the search term | ||
| 23 | ignorecase = true; | ||
| 24 | smartcase = true; | ||
| 25 | |||
| 26 | # Keep signcolumn on by default | ||
| 27 | signcolumn = "yes"; | ||
| 28 | |||
| 29 | # Decrease update time | ||
| 30 | updatetime = 250; | ||
| 31 | |||
| 32 | # Decrease mapped sequence wait time | ||
| 33 | # Displays which-key popup sooner | ||
| 34 | timeoutlen = 300; | ||
| 35 | |||
| 36 | # Configure how new splits should be opened | ||
| 37 | splitright = true; | ||
| 38 | splitbelow = true; | ||
| 39 | |||
| 40 | # Sets how neovim will display certain whitespace characters in the editor | ||
| 41 | # See `:help 'list'` | ||
| 42 | # and `:help 'listchars'` | ||
| 43 | list = true; | ||
| 44 | # NOTE: .__raw here means that this field is raw lua code | ||
| 45 | listchars.__raw = "{ tab = '» ', trail = '·', nbsp = '␣' }"; | ||
| 46 | |||
| 47 | # Preview substitutions live, as you type! | ||
| 48 | inccommand = "split"; | ||
| 49 | |||
| 50 | # Show which line your cursor is on | ||
| 51 | cursorline = true; | ||
| 52 | |||
| 53 | # Minimal number of screen lines to keep above and below the cursor. | ||
| 54 | scrolloff = 10; | ||
| 55 | |||
| 56 | # if performing an operation that would fail due to unsaved changes in the buffer (like `:q`), | ||
| 57 | # instead raise a dialog asking if you wish to save the current file(s) | ||
| 58 | # See `:help 'confirm'` | ||
| 59 | confirm = true; | ||
| 60 | |||
| 61 | # See `:help hlsearch` | ||
| 62 | hlsearch = true; | ||
| 63 | }; | ||
| 64 | }; | ||
| 65 | } | ||
modules/nixvim/plugins/blink.nix deleted-69| ... | @@ -1,69 +0,0 @@ | ||
| 1 | { | ||
| 2 | lib, | ||
| 3 | pkgs, | ||
| 4 | ... | ||
| 5 | }: { | ||
| 6 | programs.nixvim = { | ||
| 7 | extraPackages = with pkgs; [ | ||
| 8 | gh | ||
| 9 | wordnet | ||
| 10 | glab | ||
| 11 | ]; | ||
| 12 | |||
| 13 | extraPlugins = [ | ||
| 14 | ]; | ||
| 15 | |||
| 16 | plugins = { | ||
| 17 | blink-cmp = { | ||
| 18 | enable = true; | ||
| 19 | |||
| 20 | lazyLoad.settings.event = [ | ||
| 21 | "InsertEnter" | ||
| 22 | "CmdlineEnter" | ||
| 23 | ]; | ||
| 24 | |||
| 25 | settings = { | ||
| 26 | keymap.preset = "super-tab"; | ||
| 27 | completion = { | ||
| 28 | accept.auto_brackets.enabled = false; | ||
| 29 | ghost_test.enabled = false; | ||
| 30 | |||
| 31 | list.selection = { | ||
| 32 | preselect = true; | ||
| 33 | auto_insert = false; | ||
| 34 | }; | ||
| 35 | |||
| 36 | documentation = { | ||
| 37 | auto_show = true; | ||
| 38 | |||
| 39 | window.border = "rounded"; | ||
| 40 | }; | ||
| 41 | }; | ||
| 42 | |||
| 43 | menu.draw.components = { | ||
| 44 | kind_icon.text.__raw = '' | ||
| 45 | function(ctx) | ||
| 46 | local kind_icon, _, _ = require('mini.icons').get('lsp', ctx.kind) | ||
| 47 | -- Check for both nil and the default fallback icon | ||
| 48 | if not kind_icon or kind_icon == '' then | ||
| 49 | -- Use our configured kind_icons | ||
| 50 | return require('blink.cmp.config').appearance.kind_icons[ctx.kind] or "" | ||
| 51 | end | ||
| 52 | return kind_icon | ||
| 53 | end, | ||
| 54 | -- Optionally, you may also use the highlights from mini.icons | ||
| 55 | highlight = function(ctx) | ||
| 56 | local _, hl, _ = require('mini.icons').get('lsp', ctx.kind) | ||
| 57 | return hl | ||
| 58 | end | ||
| 59 | ''; | ||
| 60 | }; | ||
| 61 | }; | ||
| 62 | |||
| 63 | fuzzy = { | ||
| 64 | implementation = "prefer_rust_with_warning"; | ||
| 65 | }; | ||
| 66 | }; | ||
| 67 | }; | ||
| 68 | }; | ||
| 69 | } | ||
modules/nixvim/plugins/default.nix deleted-6| ... | @@ -1,6 +0,0 @@ | ||
| 1 | {pkgs, ...}: { | ||
| 2 | imports = [ | ||
| 3 | ./blink.nix | ||
| 4 | ./lz-n.nix | ||
| 5 | ]; | ||
| 6 | } | ||
modules/nixvim/plugins/lz-n.nix deleted-7| ... | @@ -1,7 +0,0 @@ | ||
| 1 | {pkgs, ...}: { | ||
| 2 | programs.nixvim.plugins = { | ||
| 3 | lz-n = { | ||
| 4 | enable = true; | ||
| 5 | }; | ||
| 6 | }; | ||
| 7 | } | ||
modules/shared/default.nix+7-1| ... | @@ -1,9 +1,15 @@ | ... | @@ -1,9 +1,15 @@ |
| 1 | # shared is used by nixos-rebuild and darwin-rebuild | 1 | # shared is used by nixos-rebuild and darwin-rebuild |
| 2 | {pkgs, ...}: { | 2 | { pkgs, ... }: |
| 3 | { | ||
| 3 | imports = [ | 4 | imports = [ |
| 4 | # sort-lines:start | 5 | # sort-lines:start |
| 5 | ./user-system-settings.nix | 6 | ./user-system-settings.nix |
| 6 | ./nix.nix | 7 | ./nix.nix |
| 7 | # sort-lines:end | 8 | # sort-lines:end |
| 8 | ]; | 9 | ]; |
| 10 | # install neovim globally, but let home-manager install | ||
| 11 | # the per-user configured one. | ||
| 12 | environment.systemPackages = [ | ||
| 13 | pkgs.neovim | ||
| 14 | ]; | ||
| 9 | } | 15 | } |
modules/shared/nix.nix+7-3| ... | @@ -1,10 +1,11 @@ | ... | @@ -1,10 +1,11 @@ |
| 1 | {inputs, ...}: { | 1 | { inputs, ... }: |
| 2 | { | ||
| 2 | nixpkgs.config = { | 3 | nixpkgs.config = { |
| 3 | allowUnfree = true; | 4 | allowUnfree = true; |
| 4 | }; | 5 | }; |
| 5 | 6 | ||
| 6 | nix = { | 7 | nix = { |
| 7 | nixPath = ["nixpkgs = ${inputs.nixpkgs}"]; | 8 | nixPath = [ "nixpkgs = ${inputs.nixpkgs}" ]; |
| 8 | extraOptions = '' | 9 | extraOptions = '' |
| 9 | warn-dirty = false | 10 | warn-dirty = false |
| 10 | ''; | 11 | ''; |
| ... | @@ -14,7 +15,10 @@ | ... | @@ -14,7 +15,10 @@ |
| 14 | }; | 15 | }; |
| 15 | 16 | ||
| 16 | settings = { | 17 | settings = { |
| 17 | experimental-features = ["nix-command" "flakes"]; | 18 | experimental-features = [ |
| 19 | "nix-command" | ||
| 20 | "flakes" | ||
| 21 | ]; | ||
| 18 | substituters = [ | 22 | substituters = [ |
| 19 | "https://cache.nixos.org/?priority=10" | 23 | "https://cache.nixos.org/?priority=10" |
| 20 | 24 |
modules/shared/user-system-settings.nix+5-3| ... | @@ -1,10 +1,12 @@ | ... | @@ -1,10 +1,12 @@ |
| 1 | # applies user settings for the system | 1 | # applies user settings for the system |
| 2 | { | 2 | { |
| 3 | config, | ||
| 3 | pkgs, | 4 | pkgs, |
| 4 | user, | 5 | user, |
| 5 | lib, | 6 | lib, |
| 6 | ... | 7 | ... |
| 7 | }: { | 8 | }: |
| 9 | { | ||
| 8 | # Set your time zone. | 10 | # Set your time zone. |
| 9 | time.timeZone = user.timeZone; | 11 | time.timeZone = user.timeZone; |
| 10 | 12 | ||
| ... | @@ -17,8 +19,8 @@ | ... | @@ -17,8 +19,8 @@ |
| 17 | BROWSER = user.browser; | 19 | BROWSER = user.browser; |
| 18 | }; | 20 | }; |
| 19 | 21 | ||
| 20 | stylix = { | 22 | stylix = lib.mkIf (user ? "theme" && user.theme != null) { |
| 21 | enable = user ? "theme"; | 23 | enable = false; |
| 22 | base16Scheme = "${pkgs.base16-schemes}/share/themes/${user.theme}.yaml"; | 24 | base16Scheme = "${pkgs.base16-schemes}/share/themes/${user.theme}.yaml"; |
| 23 | 25 | ||
| 24 | fonts = lib.optionalAttrs (user ? "font") { | 26 | fonts = lib.optionalAttrs (user ? "font") { |
nvim created+13| ... | @@ -0,0 +1,13 @@ | ||
| 1 | #!/bin/sh | ||
| 2 | username="$(id -u -n)" | ||
| 3 | if [ "$username" = "clo" ]; then | ||
| 4 | name="chloe"; | ||
| 5 | elif [ "$username" = "nmarks" ]; then | ||
| 6 | name="natalie"; | ||
| 7 | fi | ||
| 8 | if [ -z "$name" ]; then | ||
| 9 | echo "Configure this wrapper script with your name." >2 | ||
| 10 | exit 1 | ||
| 11 | fi | ||
| 12 | exec nix run ".#nvim-$name" -- "$@" | ||
| 13 | |||
readme.md+12-8| ... | @@ -1,13 +1,14 @@ | ... | @@ -1,13 +1,14 @@ |
| 1 | # nix config | 1 | # nix config |
| 2 | 2 | ||
| 3 | this setup allows natalie and chloe to share common configuration between their machines, but also share useful modules between each other. | 3 | this setup allows natalie and chloe to share common configuration between their |
| 4 | machines, but also share useful modules between each other. | ||
| 4 | 5 | ||
| 5 | ``` | 6 | ``` |
| 6 | lib/ # reusable functions | 7 | lib/ # reusable functions |
| 7 | modules/ # reusable modules | 8 | modules/ # reusable modules |
| 8 | +-- macos/ # nix-darwin configurations | 9 | +-- macos/ # nix-darwin configurations |
| 9 | +-- nixos/ # linux configurations | 10 | +-- nixos/ # linux configurations |
| 10 | +-- nixvim/ # neovim configurations | 11 | +-- neovim/ # nvf configurations |
| 11 | +-- shared/ # shared between nixos-rebuild & darwin-rebuild | 12 | +-- shared/ # shared between nixos-rebuild & darwin-rebuild |
| 12 | +-- home-manager.nix # home program presets | 13 | +-- home-manager.nix # home program presets |
| 13 | users/ | 14 | users/ |
| ... | @@ -15,6 +16,7 @@ users/ | ... | @@ -15,6 +16,7 @@ users/ |
| 15 | | +-- user.nix # info about her | 16 | | +-- user.nix # info about her |
| 16 | | +-- configuration.nix # for all hosts | 17 | | +-- configuration.nix # for all hosts |
| 17 | | +-- home.nix # for all hosts | 18 | | +-- home.nix # for all hosts |
| 19 | | +-- vim.nix # for neovim | ||
| 18 | | +-- sandwich/ | 20 | | +-- sandwich/ |
| 19 | | | +-- configuration.nix # per host | 21 | | | +-- configuration.nix # per host |
| 20 | | | +-- home.nix | 22 | | | +-- home.nix |
| ... | @@ -25,7 +27,8 @@ users/ | ... | @@ -25,7 +27,8 @@ users/ |
| 25 | ... | 27 | ... |
| 26 | ``` | 28 | ``` |
| 27 | 29 | ||
| 28 | A new machine can be added by adding a new definition in `flake.nix`. Note that the user and host `configuration.nix` and `home.nix` files are | 30 | A new machine can be added by adding a new definition in `flake.nix`. Note that |
| 31 | the user and host `configuration.nix` and `home.nix` files are | ||
| 29 | 32 | ||
| 30 | ## macOS installation instructions | 33 | ## macOS installation instructions |
| 31 | 34 | ||
| ... | @@ -40,11 +43,12 @@ While this installs, now is a good time to perform manual setup steps: | ... | @@ -40,11 +43,12 @@ While this installs, now is a good time to perform manual setup steps: |
| 40 | 43 | ||
| 41 | - Setup your SSH keys in `~/.ssh` | 44 | - Setup your SSH keys in `~/.ssh` |
| 42 | - Configure the device hostname in System Settings in | 45 | - Configure the device hostname in System Settings in |
| 43 | - About -> Name | 46 | - About -> Name |
| 44 | - General -> Sharing -> Local Hostname | 47 | - General -> Sharing -> Local Hostname |
| 45 | - Make sure you're logged into iCloud / Mac App Store | 48 | - Make sure you're logged into iCloud / Mac App Store |
| 46 | - `xcode-select --install` to make sure Git and other utilities are available. | 49 | - `xcode-select --install` to make sure Git and other utilities are available. |
| 47 | - Optional: Disable app verification with `sudo spctl --master-disable`, then, go to System Settings -> Privacy to allow unsigned apps. | 50 | - Optional: Disable app verification with `sudo spctl --master-disable`, then, |
| 51 | go to System Settings -> Privacy to allow unsigned apps. | ||
| 48 | 52 | ||
| 49 | Once Nix is installed, open a new shell and clone the repository: | 53 | Once Nix is installed, open a new shell and clone the repository: |
| 50 | 54 | ||
| ... | @@ -55,11 +59,11 @@ git clone https://git.paperclover.net/clo/config.git | ... | @@ -55,11 +59,11 @@ git clone https://git.paperclover.net/clo/config.git |
| 55 | git clone git@git.paperclover.net:clo/config | 59 | git clone git@git.paperclover.net:clo/config |
| 56 | ``` | 60 | ``` |
| 57 | 61 | ||
| 58 | The location of the cloned repository must match what is in your `user.nix` file. | 62 | The location of the cloned repository must match what is in your `user.nix` |
| 63 | file. | ||
| 59 | 64 | ||
| 60 | Setup `nix-darwin` using the `switch` helper: | 65 | Setup `nix-darwin` using the `switch` helper: |
| 61 | 66 | ||
| 62 | ``` | 67 | ``` |
| 63 | ./switch | 68 | ./switch |
| 64 | ``` | 69 | ``` |
| 65 |
sample.keys created+9| ... | @@ -0,0 +1,9 @@ | ||
| 1 | global { | ||
| 2 | 	cmd + opt + backtick -> app "Keyboard Maestro" | ||
| 3 | } | ||
| 4 | |||
| 5 | device WorkLouder { | ||
| 6 | 	a -> { | ||
| 7 | 		if app "REAPER" -> key cmd + shift | ||
| 8 | 	} | ||
| 9 | } | ||
users/chloe/configuration.nix+11-3| ... | @@ -1,11 +1,11 @@ | ... | @@ -1,11 +1,11 @@ |
| 1 | # Configuration applied to all of chloe's machines | 1 | # Configuration applied to all of chloe's machines |
| 2 | {pkgs, ...}: { | 2 | { pkgs, ... }: |
| 3 | { | ||
| 3 | # packages for all machines | 4 | # packages for all machines |
| 4 | environment.systemPackages = with pkgs; [ | 5 | environment.systemPackages = with pkgs; [ |
| 5 | neovim | ||
| 6 | ]; | 6 | ]; |
| 7 | # services for all machines | 7 | # services for all machines |
| 8 | # services.karabiner-elements.enable = true; # BROKEN | 8 | services.karabiner-elements.enable = true; |
| 9 | 9 | ||
| 10 | # configuration for shared modules. | 10 | # configuration for shared modules. |
| 11 | # all custom options in 'shared' for clarity. | 11 | # all custom options in 'shared' for clarity. |
| ... | @@ -29,6 +29,14 @@ | ... | @@ -29,6 +29,14 @@ |
| 29 | NSGlobalDomain = { | 29 | NSGlobalDomain = { |
| 30 | # TODO: how to change system accent color | 30 | # TODO: how to change system accent color |
| 31 | AppleHighlightColor = "1.000000 0.874510 0.701961 Orange"; | 31 | AppleHighlightColor = "1.000000 0.874510 0.701961 Orange"; |
| 32 | |||
| 33 | # control how the fn keys operate | ||
| 34 | # 0 = default to media keys, 1 = default to FN1-12 | ||
| 35 | "com.apple.keyboard.fnState" = 1; | ||
| 36 | |||
| 37 | NSUserKeyEquivalents = { | ||
| 38 | Minimize = "@~^\\Uf70f"; # set minimize to a stupidly hard key to press | ||
| 39 | }; | ||
| 32 | }; | 40 | }; |
| 33 | }; | 41 | }; |
| 34 | }; | 42 | }; |
users/chloe/home.nix+36-41| ... | @@ -1,46 +1,34 @@ | ... | @@ -1,46 +1,34 @@ |
| 1 | { | 1 | { pkgs, host, ... }: |
| 2 | inputs, | 2 | let |
| 3 | pkgs, | ||
| 4 | lib, | ||
| 5 | host, | ||
| 6 | ... | ||
| 7 | }: let | ||
| 8 | hostServer = false; | 3 | hostServer = false; |
| 9 | in { | 4 | in |
| 5 | { | ||
| 10 | home = { | 6 | home = { |
| 11 | stateVersion = "23.05"; # Please read the comment before changing. | 7 | stateVersion = "23.05"; # Please read the comment before changing. |
| 12 | packages = with pkgs; let | 8 | packages = |
| 13 | # packages to always install | 9 | with pkgs; |
| 14 | all = [ | 10 | let |
| 15 | ffmpeg | 11 | # packages to always install |
| 16 | ripgrep | 12 | all = [ |
| 17 | 	uv | 13 | ffmpeg |
| 18 | ]; | 14 | ripgrep |
| 19 | # packages to install for desktop environments (non-server) | 15 | uv |
| 20 | desktop = [ | 16 | ]; |
| 21 | ]; | 17 | # packages to install for desktop environments (non-server) |
| 22 | # packages to install on all servers | 18 | desktop = [ |
| 23 | server = []; | 19 | ]; |
| 24 | # packages to install on macOS desktops | 20 | # packages to install on all servers |
| 25 | darwin = [ | 21 | server = [ ]; |
| 26 | raycast | 22 | # packages to install on macOS desktops |
| 27 | ]; | 23 | darwin = [ |
| 28 | # packages to install on linux desktops | 24 | raycast |
| 29 | linux = [ | 25 | ]; |
| 30 | reaper # TODO: why does this break on macOS | 26 | # packages to install on linux desktops |
| 31 | ]; | 27 | linux = [ |
| 32 | in | 28 | reaper # TODO: why does this break on macOS |
| 33 | all | 29 | ]; |
| 34 | ++ ( | 30 | in |
| 35 | if host.darwin | 31 | all ++ (if host.darwin then darwin else linux) ++ (if hostServer then server else desktop); |
| 36 | then darwin | ||
| 37 | else linux | ||
| 38 | ) | ||
| 39 | ++ ( | ||
| 40 | if hostServer | ||
| 41 | then server | ||
| 42 | else desktop | ||
| 43 | ); | ||
| 44 | }; | 32 | }; |
| 45 | programs = { | 33 | programs = { |
| 46 | # sort-lines:start | 34 | # sort-lines:start |
| ... | @@ -61,7 +49,14 @@ in { | ... | @@ -61,7 +49,14 @@ in { |
| 61 | user = "clo"; | 49 | user = "clo"; |
| 62 | port = 222; | 50 | port = 222; |
| 63 | }; | 51 | }; |
| 64 | "nas.paperclover.net" = lib.mkIf zenith; | 52 | "nas.paperclover.net" = zenith; |
| 53 | }; | ||
| 54 | }; | ||
| 55 | neovide = { | ||
| 56 | enable = !hostServer; | ||
| 57 | settings = { | ||
| 58 | font.normal = "AT Name Mono"; | ||
| 59 | font.size = 13; | ||
| 65 | }; | 60 | }; |
| 66 | }; | 61 | }; |
| 67 | }; | 62 | }; |
users/chloe/paperback/home.nix+4-1| ... | @@ -1,4 +1,5 @@ | ... | @@ -1,4 +1,5 @@ |
| 1 | {pkgs, ...}: { | 1 | { pkgs, ... }: |
| 2 | { | ||
| 2 | # these programs are not globally installed to reduce distractions. | 3 | # these programs are not globally installed to reduce distractions. |
| 3 | # most of these are needed for my work environment. | 4 | # most of these are needed for my work environment. |
| 4 | programs.bun.enable = true; | 5 | programs.bun.enable = true; |
| ... | @@ -10,5 +11,7 @@ | ... | @@ -10,5 +11,7 @@ |
| 10 | typescript | 11 | typescript |
| 11 | pm2 | 12 | pm2 |
| 12 | pnpm | 13 | pnpm |
| 14 | yt-dlp | ||
| 15 | spotdl | ||
| 13 | ]; | 16 | ]; |
| 14 | } | 17 | } |
users/chloe/sandwich/configuration.nix+2-1| ... | @@ -1,4 +1,5 @@ | ... | @@ -1,4 +1,5 @@ |
| 1 | {pkgs, ...}: { | 1 | { pkgs, ... }: |
| 2 | { | ||
| 2 | shared.darwin = { | 3 | shared.darwin = { |
| 3 | macAppStoreApps = [ | 4 | macAppStoreApps = [ |
| 4 | "final-cut-pro" | 5 | "final-cut-pro" |
users/chloe/user.nix+1-1| ... | @@ -8,7 +8,7 @@ | ... | @@ -8,7 +8,7 @@ |
| 8 | dotfilesDir = "~/config"; # absolute path of the local repo | 8 | dotfilesDir = "~/config"; # absolute path of the local repo |
| 9 | 9 | ||
| 10 | # Stylix/Theming | 10 | # Stylix/Theming |
| 11 | theme = "catppuccin-mocha"; | 11 | theme = null; |
| 12 | #font | 12 | #font |
| 13 | sexuality = "lesbian"; # hyfetch | 13 | sexuality = "lesbian"; # hyfetch |
| 14 | 14 |
users/chloe/vim.nix created+20| ... | @@ -0,0 +1,20 @@ | ||
| 1 | { ... }: | ||
| 2 | { | ||
| 3 | vim.theme.extraConfig = '' | ||
| 4 | if vim.g.neovide then | ||
| 5 | vim.g.neovide_cursor_trail_size = 0.3 | ||
| 6 | vim.g.neovide_scroll_animation_length = 0.1; | ||
| 7 | |||
| 8 | vim.keymap.set('n', '<D-s>', ':w<CR>') -- Save | ||
| 9 | vim.keymap.set('v', '<D-c>', '"+y') -- Copy | ||
| 10 | vim.keymap.set('n', '<D-v>', '"+P') -- Paste normal mode | ||
| 11 | vim.keymap.set('v', '<D-v>', '"+P') -- Paste visual mode | ||
| 12 | vim.keymap.set('c', '<D-v>', '<C-R>+') -- Paste command mode | ||
| 13 | vim.keymap.set('i', '<D-v>', '<ESC>l"+Pli') -- Paste insert mode | ||
| 14 | end | ||
| 15 | vim.api.nvim_set_keymap("", '<D-v>', '+p<CR>', { noremap = true, silent = true}) | ||
| 16 | vim.api.nvim_set_keymap('!', '<D-v>', '<C-R>+', { noremap = true, silent = true}) | ||
| 17 | vim.api.nvim_set_keymap('t', '<D-v>', '<C-R>+', { noremap = true, silent = true}) | ||
| 18 | vim.api.nvim_set_keymap('v', '<D-v>', '<C-R>+', { noremap = true, silent = true}) | ||
| 19 | ''; | ||
| 20 | } | ||
users/natalie/configuration.nix+2-1| ... | @@ -4,7 +4,8 @@ | ... | @@ -4,7 +4,8 @@ |
| 4 | pkgs, | 4 | pkgs, |
| 5 | host, | 5 | host, |
| 6 | ... | 6 | ... |
| 7 | }: { | 7 | }: |
| 8 | { | ||
| 8 | services.tailscale.enable = true; | 9 | services.tailscale.enable = true; |
| 9 | fonts.packages = with pkgs; [ | 10 | fonts.packages = with pkgs; [ |
| 10 | nerd-fonts.fira-code | 11 | nerd-fonts.fira-code |
users/natalie/desktop/configuration.nix+23-16| ... | @@ -3,7 +3,8 @@ | ... | @@ -3,7 +3,8 @@ |
| 3 | user, | 3 | user, |
| 4 | host, | 4 | host, |
| 5 | ... | 5 | ... |
| 6 | }: { | 6 | }: |
| 7 | { | ||
| 7 | imports = [ | 8 | imports = [ |
| 8 | # Include the results of the hardware scan. | 9 | # Include the results of the hardware scan. |
| 9 | ./hardware-configuration.nix | 10 | ./hardware-configuration.nix |
| ... | @@ -16,7 +17,7 @@ | ... | @@ -16,7 +17,7 @@ |
| 16 | enable = true; | 17 | enable = true; |
| 17 | # Certain features, including CLI integration and system authentication support, | 18 | # Certain features, including CLI integration and system authentication support, |
| 18 | # require enabling PolKit integration on some desktop environments (e.g. Plasma). | 19 | # require enabling PolKit integration on some desktop environments (e.g. Plasma). |
| 19 | polkitPolicyOwners = [user.username]; | 20 | polkitPolicyOwners = [ user.username ]; |
| 20 | }; | 21 | }; |
| 21 | 22 | ||
| 22 | noisetorch.enable = true; | 23 | noisetorch.enable = true; |
| ... | @@ -31,14 +32,9 @@ | ... | @@ -31,14 +32,9 @@ |
| 31 | flake = "/home/nmarks/.dotfiles#nixosConfigurations.nixos"; | 32 | flake = "/home/nmarks/.dotfiles#nixosConfigurations.nixos"; |
| 32 | }; | 33 | }; |
| 33 | 34 | ||
| 34 | neovim = { | ||
| 35 | enable = true; | ||
| 36 | defaultEditor = true; | ||
| 37 | }; | ||
| 38 | |||
| 39 | steam = { | 35 | steam = { |
| 40 | enable = true; | 36 | enable = true; |
| 41 | package = with pkgs; steam.override {extraPkgs = pkgs: [attr];}; | 37 | package = with pkgs; steam.override { extraPkgs = pkgs: [ attr ]; }; |
| 42 | }; | 38 | }; |
| 43 | 39 | ||
| 44 | git = { | 40 | git = { |
| ... | @@ -62,7 +58,7 @@ | ... | @@ -62,7 +58,7 @@ |
| 62 | 58 | ||
| 63 | xdg.portal = { | 59 | xdg.portal = { |
| 64 | enable = true; | 60 | enable = true; |
| 65 | extraPortals = with pkgs; [xdg-desktop-portal-gtk]; | 61 | extraPortals = with pkgs; [ xdg-desktop-portal-gtk ]; |
| 66 | }; | 62 | }; |
| 67 | virtualisation = { | 63 | virtualisation = { |
| 68 | containers.enable = true; | 64 | containers.enable = true; |
| ... | @@ -75,7 +71,10 @@ | ... | @@ -75,7 +71,10 @@ |
| 75 | libvirtd.enable = true; | 71 | libvirtd.enable = true; |
| 76 | }; | 72 | }; |
| 77 | 73 | ||
| 78 | nix.settings.trusted-users = ["root" user.username]; | 74 | nix.settings.trusted-users = [ |
| 75 | "root" | ||
| 76 | user.username | ||
| 77 | ]; | ||
| 79 | systemd = { | 78 | systemd = { |
| 80 | targets = { | 79 | targets = { |
| 81 | sleep.enable = false; | 80 | sleep.enable = false; |
| ... | @@ -84,16 +83,16 @@ | ... | @@ -84,16 +83,16 @@ |
| 84 | hybrid-sleep.enable = false; | 83 | hybrid-sleep.enable = false; |
| 85 | }; | 84 | }; |
| 86 | 85 | ||
| 87 | packages = [pkgs.observatory]; | 86 | packages = [ pkgs.observatory ]; |
| 88 | 87 | ||
| 89 | services.monitord.wantedBy = ["multi-user.target"]; | 88 | services.monitord.wantedBy = [ "multi-user.target" ]; |
| 90 | }; | 89 | }; |
| 91 | 90 | ||
| 92 | i18n = { | 91 | i18n = { |
| 93 | # Select internationalisation properties. | 92 | # Select internationalisation properties. |
| 94 | defaultLocale = "en_US.UTF-8"; | 93 | defaultLocale = "en_US.UTF-8"; |
| 95 | 94 | ||
| 96 | supportedLocales = ["all"]; | 95 | supportedLocales = [ "all" ]; |
| 97 | 96 | ||
| 98 | extraLocaleSettings = { | 97 | extraLocaleSettings = { |
| 99 | LC_ADDRESS = "en_US.UTF-8"; | 98 | LC_ADDRESS = "en_US.UTF-8"; |
| ... | @@ -133,7 +132,11 @@ | ... | @@ -133,7 +132,11 @@ |
| 133 | shell = pkgs.fish; | 132 | shell = pkgs.fish; |
| 134 | isNormalUser = true; | 133 | isNormalUser = true; |
| 135 | description = user.name; | 134 | description = user.name; |
| 136 | extraGroups = ["networkmanager" "wheel" "docker"]; | 135 | extraGroups = [ |
| 136 | "networkmanager" | ||
| 137 | "wheel" | ||
| 138 | "docker" | ||
| 139 | ]; | ||
| 137 | # openssh.authorizedKeys.keyFiles = ["~/.ssh/id_ed25519.pub"]; | 140 | # openssh.authorizedKeys.keyFiles = ["~/.ssh/id_ed25519.pub"]; |
| 138 | packages = with pkgs; [ | 141 | packages = with pkgs; [ |
| 139 | firefox | 142 | firefox |
| ... | @@ -157,12 +160,16 @@ | ... | @@ -157,12 +160,16 @@ |
| 157 | # wireless.enable = true; # Enables wireless support via wpa_supplicant. | 160 | # wireless.enable = true; # Enables wireless support via wpa_supplicant. |
| 158 | networkmanager.enable = true; | 161 | networkmanager.enable = true; |
| 159 | firewall = { | 162 | firewall = { |
| 160 | allowedTCPPorts = [22 80 443]; | 163 | allowedTCPPorts = [ |
| 164 | 22 | ||
| 165 | 80 | ||
| 166 | 443 | ||
| 167 | ]; | ||
| 161 | enable = true; | 168 | enable = true; |
| 162 | }; | 169 | }; |
| 163 | interfaces.enp11s0.wakeOnLan = { | 170 | interfaces.enp11s0.wakeOnLan = { |
| 164 | enable = true; | 171 | enable = true; |
| 165 | policy = ["magic"]; | 172 | policy = [ "magic" ]; |
| 166 | }; | 173 | }; |
| 167 | }; | 174 | }; |
| 168 | 175 |
users/natalie/desktop/hardware-configuration.nix+17-7| ... | @@ -7,15 +7,22 @@ | ... | @@ -7,15 +7,22 @@ |
| 7 | pkgs, | 7 | pkgs, |
| 8 | modulesPath, | 8 | modulesPath, |
| 9 | ... | 9 | ... |
| 10 | }: { | 10 | }: |
| 11 | { | ||
| 11 | imports = [ | 12 | imports = [ |
| 12 | (modulesPath + "/installer/scan/not-detected.nix") | 13 | (modulesPath + "/installer/scan/not-detected.nix") |
| 13 | ]; | 14 | ]; |
| 14 | 15 | ||
| 15 | boot.initrd.availableKernelModules = ["nvme" "ahci" "xhci_pci" "usbhid" "sd_mod"]; | 16 | boot.initrd.availableKernelModules = [ |
| 16 | boot.initrd.kernelModules = []; | 17 | "nvme" |
| 17 | boot.kernelModules = ["kvm-amd"]; | 18 | "ahci" |
| 18 | boot.extraModulePackages = []; | 19 | "xhci_pci" |
| 20 | "usbhid" | ||
| 21 | "sd_mod" | ||
| 22 | ]; | ||
| 23 | boot.initrd.kernelModules = [ ]; | ||
| 24 | boot.kernelModules = [ "kvm-amd" ]; | ||
| 25 | boot.extraModulePackages = [ ]; | ||
| 19 | 26 | ||
| 20 | fileSystems."/" = { | 27 | fileSystems."/" = { |
| 21 | device = "/dev/disk/by-uuid/5838d50d-e6e8-4ad2-a25e-524f4c46da35"; | 28 | device = "/dev/disk/by-uuid/5838d50d-e6e8-4ad2-a25e-524f4c46da35"; |
| ... | @@ -25,7 +32,10 @@ | ... | @@ -25,7 +32,10 @@ |
| 25 | fileSystems."/boot/efi" = { | 32 | fileSystems."/boot/efi" = { |
| 26 | device = "/dev/disk/by-uuid/2319-EE79"; | 33 | device = "/dev/disk/by-uuid/2319-EE79"; |
| 27 | fsType = "vfat"; | 34 | fsType = "vfat"; |
| 28 | options = ["fmask=0022" "dmask=0022"]; | 35 | options = [ |
| 36 | "fmask=0022" | ||
| 37 | "dmask=0022" | ||
| 38 | ]; | ||
| 29 | }; | 39 | }; |
| 30 | 40 | ||
| 31 | fileSystems."/home/nmarks/Games/steam" = { | 41 | fileSystems."/home/nmarks/Games/steam" = { |
| ... | @@ -34,7 +44,7 @@ | ... | @@ -34,7 +44,7 @@ |
| 34 | }; | 44 | }; |
| 35 | 45 | ||
| 36 | swapDevices = [ | 46 | swapDevices = [ |
| 37 | {device = "/dev/disk/by-uuid/a4128bb9-239c-4aa9-9777-5067feb77b28";} | 47 | { device = "/dev/disk/by-uuid/a4128bb9-239c-4aa9-9777-5067feb77b28"; } |
| 38 | ]; | 48 | ]; |
| 39 | 49 | ||
| 40 | # Enables DHCP on each ethernet and wireless interface. In case of scripted networking | 50 | # Enables DHCP on each ethernet and wireless interface. In case of scripted networking |
users/natalie/desktop/home.nix+3-7| ... | @@ -6,12 +6,8 @@ | ... | @@ -6,12 +6,8 @@ |
| 6 | userSettings, | 6 | userSettings, |
| 7 | systemSettings, | 7 | systemSettings, |
| 8 | ... | 8 | ... |
| 9 | }: { | 9 | }: |
| 10 | imports = [ | 10 | { |
| 11 | inputs.nixvim.homeManagerModules.nixvim | ||
| 12 | #set up nixvim | ||
| 13 | # ../../modules/nixvim | ||
| 14 | ]; | ||
| 15 | home = { | 11 | home = { |
| 16 | stateVersion = "23.05"; # Please read the comment before changing. | 12 | stateVersion = "23.05"; # Please read the comment before changing. |
| 17 | 13 | ||
| ... | @@ -32,7 +28,7 @@ | ... | @@ -32,7 +28,7 @@ |
| 32 | path-of-building | 28 | path-of-building |
| 33 | wineWowPackages.stable | 29 | wineWowPackages.stable |
| 34 | winetricks | 30 | winetricks |
| 35 | (prismlauncher.override {gamemodeSupport = true;}) | 31 | (prismlauncher.override { gamemodeSupport = true; }) |
| 36 | 32 | ||
| 37 | #window manager stuff | 33 | #window manager stuff |
| 38 | wofi | 34 | wofi |
users/natalie/home.nix+2-1| ... | @@ -2,7 +2,8 @@ | ... | @@ -2,7 +2,8 @@ |
| 2 | pkgs, | 2 | pkgs, |
| 3 | lib, | 3 | lib, |
| 4 | ... | 4 | ... |
| 5 | } @ args: { | 5 | }@args: |
| 6 | { | ||
| 6 | programs = { | 7 | programs = { |
| 7 | # sort-lines:start | 8 | # sort-lines:start |
| 8 | atuin.enable = true; | 9 | atuin.enable = true; |
users/natalie/laptop/configuration.nix+3-3| ... | @@ -1,6 +1,6 @@ | ... | @@ -1,6 +1,6 @@ |
| 1 | {pkgs, ...}: { | 1 | { pkgs, ... }: |
| 2 | { | ||
| 2 | environment.systemPackages = with pkgs; [ | 3 | environment.systemPackages = with pkgs; [ |
| 3 | neovim | ||
| 4 | pinentry_mac | 4 | pinentry_mac |
| 5 | signal-desktop-bin | 5 | signal-desktop-bin |
| 6 | ]; | 6 | ]; |
| ... | @@ -8,7 +8,7 @@ | ... | @@ -8,7 +8,7 @@ |
| 8 | # Custom configuration modules in "modules" are shared between users, | 8 | # Custom configuration modules in "modules" are shared between users, |
| 9 | # and can be configured in this "shared" namespace | 9 | # and can be configured in this "shared" namespace |
| 10 | shared.darwin = { | 10 | shared.darwin = { |
| 11 | macAppStoreApps = ["wireguard"]; | 11 | macAppStoreApps = [ "wireguard" ]; |
| 12 | }; | 12 | }; |
| 13 | 13 | ||
| 14 | # Create /etc/zshrc that loads the nix-darwin environment. | 14 | # Create /etc/zshrc that loads the nix-darwin environment. |
users/natalie/laptop/home.nix+2-6| ... | @@ -6,12 +6,8 @@ | ... | @@ -6,12 +6,8 @@ |
| 6 | user, | 6 | user, |
| 7 | host, | 7 | host, |
| 8 | ... | 8 | ... |
| 9 | } @ args: { | 9 | }@args: |
| 10 | imports = [ | 10 | { |
| 11 | inputs.nixvim.homeManagerModules.nixvim | ||
| 12 | #set up nixvim | ||
| 13 | # ../../modules/nixvim | ||
| 14 | ]; | ||
| 15 | home = { | 11 | home = { |
| 16 | stateVersion = "23.05"; # Please read the comment before changing. | 12 | stateVersion = "23.05"; # Please read the comment before changing. |
| 17 | # shell = pkgs.fish; | 13 | # shell = pkgs.fish; |
users/natalie/packages.nix+5-3| ... | @@ -1,6 +1,7 @@ | ... | @@ -1,6 +1,7 @@ |
| 1 | # Packages installed with home-manager | 1 | # Packages installed with home-manager |
| 2 | {pkgs, ...}: | 2 | { pkgs, ... }: |
| 3 | with pkgs; [ | 3 | with pkgs; |
| 4 | [ | ||
| 4 | #general development | 5 | #general development |
| 5 | just | 6 | just |
| 6 | pkg-config | 7 | pkg-config |
| ... | @@ -35,7 +36,7 @@ with pkgs; [ | ... | @@ -35,7 +36,7 @@ with pkgs; [ |
| 35 | nh | 36 | nh |
| 36 | 37 | ||
| 37 | #terminal stuff | 38 | #terminal stuff |
| 38 | (btop.override {cudaSupport = true;}) | 39 | (btop.override { cudaSupport = true; }) |
| 39 | tmux | 40 | tmux |
| 40 | zellij | 41 | zellij |
| 41 | lazygit | 42 | lazygit |
| ... | @@ -78,6 +79,7 @@ with pkgs; [ | ... | @@ -78,6 +79,7 @@ with pkgs; [ |
| 78 | statix | 79 | statix |
| 79 | 80 | ||
| 80 | #neovim deps | 81 | #neovim deps |
| 82 | # TODO: from clo, maybe u can remove all of these? i don't wanna break tho | ||
| 81 | lua51Packages.lua | 83 | lua51Packages.lua |
| 82 | lua51Packages.luarocks-nix | 84 | lua51Packages.luarocks-nix |
| 83 | codespell | 85 | codespell |
users/natalie/user.nix+1-1| ... | @@ -3,7 +3,7 @@ rec { | ... | @@ -3,7 +3,7 @@ rec { |
| 3 | name = "Natalie"; # name/identifier | 3 | name = "Natalie"; # name/identifier |
| 4 | email = "nmarks413@gmail.com"; # email (used for certain configurations) | 4 | email = "nmarks413@gmail.com"; # email (used for certain configurations) |
| 5 | dotfilesDir = "~/.dotfiles"; # absolute path of the local repo | 5 | dotfilesDir = "~/.dotfiles"; # absolute path of the local repo |
| 6 | theme = "catppuccin-mocha"; #name of theme that stylix will use | 6 | theme = "catppuccin-mocha"; # name of theme that stylix will use |
| 7 | browser = "firefox"; # Default browser; must select one from ./user/app/browser/ | 7 | browser = "firefox"; # Default browser; must select one from ./user/app/browser/ |
| 8 | term = "ghostty"; # Default terminal command; | 8 | term = "ghostty"; # Default terminal command; |
| 9 | font = "iosevka"; # Selected font | 9 | font = "iosevka"; # Selected font |
users/natalie/vim.nix created+9| ... | @@ -0,0 +1,9 @@ | ||
| 1 | { ... }: | ||
| 2 | { | ||
| 3 | vim = { | ||
| 4 | theme = { | ||
| 5 | name = "catppuccin"; | ||
| 6 | style = "mocha"; | ||
| 7 | }; | ||
| 8 | }; | ||
| 9 | } | ||