Flake for my NixOS devices

Merge pull request #7 from Bwc9876/big-rewrite

Big Rewrite

authored by bwc9876.dev and committed by

GitHub 594293ba b3901834

+4149 -4178
+4 -21
README.md
··· 3 3 This repo contains the flake I use to configure any of my NixOS-configured 4 4 devices. 5 5 6 - ## Structure 6 + ## Current Configurations 7 7 8 - - flake.nix: Central file for exporting all my configs and anything else I need. 9 - - lib.nix: Helper functions 10 - - systemconfigs/: All systems this flake configures, each system has some 11 - options that describe it but the main thing that determines what options they 12 - set are _roles_. 13 - - nixosModules/: A set of path-"routed" NixOS modules that represent "roles". A 14 - role is a feature a system can have (ex. the `graphics` role enables Hyprland, 15 - GUI apps, etc). Roles can either be a singular nix file, or a folder of them 16 - if they're complicated. Files named `role1+role2.nix` represent an _overlap_ 17 - role, which is applied if all roles delimited by `+` are turned on. 18 - - base/: This folder contains modules applied unconditionally to all systems. 19 - - res/: Non-nix files used in the config. Pictures, scripts, etc. 20 - - pkgs/: Custom nix packages made for my config. 21 - - create-sys/: WIP tool for automating the creation of new systems. Currently 22 - just has an interactive prompt for adding a new `.nix` file to `systems/`. 23 - 24 - ## Implementation 25 - 26 - I'm not going to lie, I have no idea what I'm doing. Is every feature here 27 - implmemented well? Definitely not, but that's okay! 8 + - `aperture` - Framework 13 Laptop 9 + - `black-mesa` - Desktop Computer w/ AMD GPU 10 + - `installer` - Installer/LiveCD ISO for my flake
+56 -54
flake.lock
··· 11 11 "uv2nix": "uv2nix" 12 12 }, 13 13 "locked": { 14 - "lastModified": 1752124358, 15 - "narHash": "sha256-9qKwgU/3L7k82Npus6J9Q07k+knu/UMPt4/a584cQa0=", 14 + "lastModified": 1761868163, 15 + "narHash": "sha256-YJtofqcj+T21aQ7odpjGfVnWrNkxQBLLadT3RpXRGS8=", 16 16 "owner": "Bwc9876", 17 17 "repo": "bingus-bot", 18 - "rev": "7052483d43084bc6c63d647149eaa6a127199905", 18 + "rev": "7d478090e875dc7425359891f40874ed55c11946", 19 19 "type": "github" 20 20 }, 21 21 "original": { ··· 31 31 ] 32 32 }, 33 33 "locked": { 34 - "lastModified": 1760953099, 35 - "narHash": "sha256-sOKx2YcHa+lWEvaEOIGqLN2WWk1Wf5z6KM02tdfhMtw=", 34 + "lastModified": 1761906071, 35 + "narHash": "sha256-uq0X0KRzZkKGlkU1ARM+LWCAVvSYJZtTMpuzMO6LXRs=", 36 36 "owner": "catppuccin", 37 37 "repo": "nix", 38 - "rev": "f5b21876888265d2fee7fb0640d1b66a1c1c6503", 38 + "rev": "fd1bc7b1af0a576edb13c166c4b1f7b5c7555a73", 39 39 "type": "github" 40 40 }, 41 41 "original": { ··· 105 105 "rust-analyzer-src": "rust-analyzer-src" 106 106 }, 107 107 "locked": { 108 - "lastModified": 1759301100, 109 - "narHash": "sha256-hmiTEoVAqLnn80UkreCNunnRKPucKvcg5T4/CELEtbw=", 108 + "lastModified": 1761979010, 109 + "narHash": "sha256-isqMvjTk3jdTHN6KA/BWQvOSVe7O35OQKAZNtLK76OY=", 110 110 "owner": "nix-community", 111 111 "repo": "fenix", 112 - "rev": "0956bc5d1df2ea800010172c6bc4470d9a22cb81", 112 + "rev": "3107255abfe4f2d1c3eee7a3e2f5a5eb6f2200fe", 113 113 "type": "github" 114 114 }, 115 115 "original": { ··· 128 128 "rust-analyzer-src": "rust-analyzer-src_2" 129 129 }, 130 130 "locked": { 131 - "lastModified": 1760769695, 132 - "narHash": "sha256-eU4HnBCVuBg+c5UninnTh65VrbkkQ8HOjCaC3NDZLYM=", 131 + "lastModified": 1761460927, 132 + "narHash": "sha256-9BUyZfPBh3mh58fmpseqfMAB73PNm+iwl8UpjCbThk0=", 133 133 "owner": "nix-community", 134 134 "repo": "fenix", 135 - "rev": "f4cb0863b5d772b7b378ea456ac86c359303dfa7", 135 + "rev": "0f19d25425626ea42bded065029f45ca5f526ca1", 136 136 "type": "github" 137 137 }, 138 138 "original": { ··· 283 283 ] 284 284 }, 285 285 "locked": { 286 - "lastModified": 1761155197, 287 - "narHash": "sha256-3NcqyhZkWrqY0qlnXqtV82vGwaQ7Be3Ll1w7+NPzq8w=", 286 + "lastModified": 1761636064, 287 + "narHash": "sha256-xAbEYL5gqPnBfXOIGToPjF6E0n9RSe8YJ6E2/ePrPaM=", 288 288 "owner": "nix-community", 289 289 "repo": "flakelight", 290 - "rev": "5afd70555737c62786b69a64980e7bb1c1947956", 290 + "rev": "2c621bc66465c457b64b016bb00d575ff2e51094", 291 291 "type": "github" 292 292 }, 293 293 "original": { ··· 325 325 ] 326 326 }, 327 327 "locked": { 328 - "lastModified": 1760359755, 329 - "narHash": "sha256-k7sJPDPio2vQuqSJ/3nOkBy6I2YqZvJYNhJJARLSxrg=", 328 + "lastModified": 1761155197, 329 + "narHash": "sha256-3NcqyhZkWrqY0qlnXqtV82vGwaQ7Be3Ll1w7+NPzq8w=", 330 330 "owner": "nix-community", 331 331 "repo": "flakelight", 332 - "rev": "d8d6ce0774c3df8f7b58b4cd4b5cf4b63b4a9fe6", 332 + "rev": "5afd70555737c62786b69a64980e7bb1c1947956", 333 333 "type": "github" 334 334 }, 335 335 "original": { ··· 410 410 ] 411 411 }, 412 412 "locked": { 413 - "lastModified": 1761081701, 414 - "narHash": "sha256-IwpfaKg5c/WWQiy8b5QGaVPMvoEQ2J6kpwRFdpVpBNQ=", 413 + "lastModified": 1762041416, 414 + "narHash": "sha256-rmJKABRXnhFjjI6RB/MnEvLTQa569zu684Th9y6UlOI=", 415 415 "owner": "nix-community", 416 416 "repo": "home-manager", 417 - "rev": "9b4a2a7c4fbd75b422f00794af02d6edb4d9d315", 417 + "rev": "c0016dd14773f4ca0b467b74c7cdcc501570df4b", 418 418 "type": "github" 419 419 }, 420 420 "original": { ··· 475 475 "nixpkgs" 476 476 ], 477 477 "pre-commit-hooks-nix": "pre-commit-hooks-nix", 478 - "rust-overlay": "rust-overlay" 478 + "rust-overlay": [ 479 + "rust-overlay" 480 + ] 479 481 }, 480 482 "locked": { 481 483 "lastModified": 1756744479, ··· 498 500 ] 499 501 }, 500 502 "locked": { 501 - "lastModified": 1760846226, 502 - "narHash": "sha256-xmU8kAsRprJiTGBTaGrwmjBP3AMA9ltlrxHKFuy5JWc=", 503 + "lastModified": 1761451000, 504 + "narHash": "sha256-qBJL6xEIjqYq9zOcG2vf2nPTeVBppNJzvO0LuQWMwMo=", 503 505 "owner": "nix-community", 504 506 "repo": "nix-index-database", 505 - "rev": "5024e1901239a76b7bf94a4cd27f3507e639d49e", 507 + "rev": "ed6b293161b378a7368cda38659eb8d3d9a0dac4", 506 508 "type": "github" 507 509 }, 508 510 "original": { ··· 513 515 }, 514 516 "nixos-hardware": { 515 517 "locked": { 516 - "lastModified": 1760958188, 517 - "narHash": "sha256-2m1S4jl+GEDtlt2QqeHil8Ny456dcGSKJAM7q3j/BFU=", 518 + "lastModified": 1761933221, 519 + "narHash": "sha256-rNHeoG3ZrA94jczyLSjxCtu67YYPYIlXXr0uhG3wNxM=", 518 520 "owner": "NixOS", 519 521 "repo": "nixos-hardware", 520 - "rev": "d6645c340ef7d821602fd2cd199e8d1eed10afbc", 522 + "rev": "7467f155fcba189eb088a7601f44fbef7688669b", 521 523 "type": "github" 522 524 }, 523 525 "original": { ··· 528 530 }, 529 531 "nixpkgs": { 530 532 "locked": { 531 - "lastModified": 1760878510, 532 - "narHash": "sha256-K5Osef2qexezUfs0alLvZ7nQFTGS9DL2oTVsIXsqLgs=", 533 + "lastModified": 1761907660, 534 + "narHash": "sha256-kJ8lIZsiPOmbkJypG+B5sReDXSD1KGu2VEPNqhRa/ew=", 533 535 "owner": "NixOS", 534 536 "repo": "nixpkgs", 535 - "rev": "5e2a59a5b1a82f89f2c7e598302a9cacebb72a67", 537 + "rev": "2fb006b87f04c4d3bdf08cfdbc7fab9c13d94a15", 536 538 "type": "github" 537 539 }, 538 540 "original": { ··· 552 554 "systems": "systems_2" 553 555 }, 554 556 "locked": { 555 - "lastModified": 1761169815, 556 - "narHash": "sha256-a8JUU1NIey01VNHndAqAkP76JdESscXJpWITZTlKHWE=", 557 + "lastModified": 1762041710, 558 + "narHash": "sha256-DRLLVmPzfWJx9x3FyHX7IkuY56C2M9ENcqbzcCvQKlU=", 557 559 "owner": "nix-community", 558 560 "repo": "nixvim", 559 - "rev": "9a057ef01a832df20f1e5b19db2f0b86b2c7e89a", 561 + "rev": "d3118a96caae448ba4b362ee7d54b2e702f7739a", 560 562 "type": "github" 561 563 }, 562 564 "original": { ··· 573 575 ] 574 576 }, 575 577 "locked": { 576 - "lastModified": 1760636396, 577 - "narHash": "sha256-QHYUWrSpEd040JVBAoCK873nCNemT3gHNePka37FbpU=", 578 + "lastModified": 1761235019, 579 + "narHash": "sha256-jkseFs9Ty4x8FyVDzyFLh6enwIDBdcfZrUjE++5W9uA=", 578 580 "owner": "Bwc9876", 579 581 "repo": "nu_plugin_dbus", 580 - "rev": "090be12d30371b46b9e7cbdb8ec8906a6fe16e60", 582 + "rev": "47e1e232e44b38fc975839656124c74897ed3425", 581 583 "type": "github" 582 584 }, 583 585 "original": { ··· 596 598 ] 597 599 }, 598 600 "locked": { 599 - "lastModified": 1760652422, 600 - "narHash": "sha256-C88Pgz38QIl9JxQceexqL2G7sw9vodHWx1Uaq+NRJrw=", 601 + "lastModified": 1761730856, 602 + "narHash": "sha256-t1i5p/vSWwueZSC0Z2BImxx3BjoUDNKyC2mk24krcMY=", 601 603 "owner": "NuschtOS", 602 604 "repo": "search", 603 - "rev": "3ebeebe8b6a49dfb11f771f761e0310f7c48d726", 605 + "rev": "e29de6db0cb3182e9aee75a3b1fd1919d995d85b", 604 606 "type": "github" 605 607 }, 606 608 "original": { ··· 700 702 "nixpkgs": "nixpkgs", 701 703 "nixvim": "nixvim", 702 704 "nu_plugin_dbus": "nu_plugin_dbus", 705 + "rust-overlay": "rust-overlay", 703 706 "spoon": "spoon", 704 707 "wayland-mpris-idle-inhibit": "wayland-mpris-idle-inhibit" 705 708 } ··· 707 710 "rust-analyzer-src": { 708 711 "flake": false, 709 712 "locked": { 710 - "lastModified": 1759245522, 711 - "narHash": "sha256-H4Hx/EuMJ9qi1WzPV4UG2bbZiDCdREtrtDvYcHr0kmk=", 713 + "lastModified": 1761894503, 714 + "narHash": "sha256-SreGV62DEv7kLJEcOBrw2V6Kup0siT4wS3Ye8PlFTdE=", 712 715 "owner": "rust-lang", 713 716 "repo": "rust-analyzer", 714 - "rev": "a6bc4a4bbe6a65b71cbf76a0cf528c47a8d9f97f", 717 + "rev": "2e2e3ebec91215078de9b754363fc9a7b0fdef13", 715 718 "type": "github" 716 719 }, 717 720 "original": { ··· 724 727 "rust-analyzer-src_2": { 725 728 "flake": false, 726 729 "locked": { 727 - "lastModified": 1760714286, 728 - "narHash": "sha256-WOt9KquZ1BXjMcVyHpMeliqNRL6BfRvBHFGfRDriDx4=", 730 + "lastModified": 1761412493, 731 + "narHash": "sha256-Ig2yUk5ek3vSFR+m+rtmg0kJyRLPYol55QgsYsoSGI4=", 729 732 "owner": "rust-lang", 730 733 "repo": "rust-analyzer", 731 - "rev": "1e20331e42449dfc0b44bce84147a06772d045d7", 734 + "rev": "daf1cd953fe878226e3a5b0356468f5a61995bf0", 732 735 "type": "github" 733 736 }, 734 737 "original": { ··· 741 744 "rust-overlay": { 742 745 "inputs": { 743 746 "nixpkgs": [ 744 - "lanzaboote", 745 747 "nixpkgs" 746 748 ] 747 749 }, 748 750 "locked": { 749 - "lastModified": 1754189623, 750 - "narHash": "sha256-fstu5eb30UYwsxow0aQqkzxNxGn80UZjyehQVNVHuBk=", 751 + "lastModified": 1762051177, 752 + "narHash": "sha256-pESNTx/m3WnrYx+OujBtDP5Bj0/mAyHa4MgEwzkgkLE=", 751 753 "owner": "oxalica", 752 754 "repo": "rust-overlay", 753 - "rev": "c582ff7f0d8a7ea689ae836dfb1773f1814f472a", 755 + "rev": "08c33e87c4829bbdd42b5af247cf7a19e126369f", 754 756 "type": "github" 755 757 }, 756 758 "original": { ··· 777 779 ] 778 780 }, 779 781 "locked": { 780 - "lastModified": 1761008491, 781 - "narHash": "sha256-gkZ9PYgx5mt+2F1++shCndW1U3GLpdnyHiRPfm0+pG8=", 782 + "lastModified": 1762038257, 783 + "narHash": "sha256-D1Pbr/VaEWjmidcfmqa6/usolDCcJyW7TZcuCqc3sIs=", 782 784 "ref": "refs/heads/main", 783 - "rev": "0c5b9b010b5f70a43095a24bab4c1203706858bd", 784 - "revCount": 270, 785 + "rev": "a6dcef445f25eb059a4a8d64abfdbbe4c3635718", 786 + "revCount": 283, 785 787 "type": "git", 786 788 "url": "https://codeberg.org/spoonbaker/mono" 787 789 },
+15 -8
flake.nix
··· 10 10 hm.url = "github:nix-community/home-manager"; 11 11 hm.inputs.nixpkgs.follows = "nixpkgs"; 12 12 nixos-hardware.url = "github:NixOS/nixos-hardware"; 13 - lanzaboote.url = "github:nix-community/lanzaboote"; 14 - lanzaboote.inputs.nixpkgs.follows = "nixpkgs"; 13 + # lanzaboote.url = "github:nix-community/lanzaboote"; 14 + # lanzaboote.inputs.nixpkgs.follows = "nixpkgs"; 15 15 wayland-mpris-idle-inhibit.url = "github:Bwc9876/wayland-mpris-idle-inhibit"; 16 16 wayland-mpris-idle-inhibit.inputs.nixpkgs.follows = "nixpkgs"; 17 17 fenix.url = "github:nix-community/fenix/monthly"; ··· 28 28 bingus.url = "github:Bwc9876/bingus-bot"; 29 29 bingus.inputs.nixpkgs.follows = "nixpkgs"; 30 30 31 + lanzaboote = { 32 + url = "github:nix-community/lanzaboote"; 33 + inputs = { 34 + nixpkgs.follows = "nixpkgs"; 35 + rust-overlay.follows = "rust-overlay"; 36 + }; 37 + }; 38 + rust-overlay = { 39 + url = "github:oxalica/rust-overlay"; 40 + inputs.nixpkgs.follows = "nixpkgs"; 41 + }; 42 + 31 43 spoon.url = "git+https://codeberg.org/spoonbaker/mono"; 32 44 spoon.inputs = { 33 45 nixpkgs.follows = "nixpkgs"; ··· 54 66 bingus, 55 67 spoon, 56 68 gh-grader-preview, 69 + rust-overlay, 57 70 }: 58 71 flakelight ./. { 59 72 imports = [ ··· 66 79 "*.sh" = "shfmt -w ."; 67 80 }; 68 81 69 - packages = nixpkgs.lib.genAttrs ["wayland-mpris-idle-inhibit" "nu_plugin_dbus"] ( 70 - i: {pkgs}: inputs.${i}.packages.${pkgs.system}.default 71 - ); 72 82 nixDir = ./.; 73 - nixDirAliases = { 74 - nixosConfigurations = ["systemConfigs"]; 75 - }; 76 83 legacyPackages = pkgs: pkgs; 77 84 nixpkgs.config = { 78 85 allowUnfree = true;
+18
homeModules/cat.nix
··· 1 + {inputs, ...}: { 2 + config, 3 + lib, 4 + ... 5 + }: { 6 + imports = [inputs.catppuccin.homeModules.catppuccin]; 7 + 8 + options.cow.cat.enable = lib.mkEnableOption "Catppuccin Home Customizations"; 9 + 10 + config = lib.mkIf config.cow.cat.enable { 11 + catppuccin = { 12 + enable = true; 13 + flavor = "mocha"; 14 + accent = "green"; 15 + mako.enable = false; 16 + }; 17 + }; 18 + }
+18
homeModules/comma.nix
··· 1 + {inputs, ...}: { 2 + config, 3 + lib, 4 + pkgs, 5 + ... 6 + }: { 7 + imports = [inputs.nix-index-db.homeModules.nix-index]; 8 + 9 + options.cow.comma.enable = lib.mkEnableOption "Comma With DB"; 10 + 11 + config = lib.mkIf config.cow.comma.enable { 12 + nixpkgs.overlays = [inputs.nix-index-db.overlays.nix-index]; 13 + programs.nix-index.enable = true; 14 + home.packages = with pkgs; [ 15 + comma-with-db 16 + ]; 17 + }; 18 + }
+7
homeModules/default.nix
··· 1 + { 2 + lib, 3 + flakelight, 4 + moduleArgs, 5 + ... 6 + }: 7 + lib.mapAttrs (_: v: v moduleArgs) (flakelight.importDir ./.)
+109
homeModules/dev.nix
··· 1 + {inputs, ...}: { 2 + config, 3 + lib, 4 + pkgs, 5 + ... 6 + }: { 7 + options.cow.dev = let 8 + mkLangOpt = d: ((lib.mkEnableOption d) // {default = config.cow.dev.enable;}); 9 + in { 10 + enable = lib.mkEnableOption "Dev stuff (all on by default)"; 11 + c = mkLangOpt "C/C++ dev stuff"; 12 + rust = mkLangOpt "Rust dev stuff"; 13 + haskell = mkLangOpt "Haskell dev stuff"; 14 + web = mkLangOpt "Web dev stuff"; 15 + nix = mkLangOpt "Nix dev stuff"; 16 + python = mkLangOpt "Python dev stuff"; 17 + dotnet = mkLangOpt ".NET dev stuff"; 18 + cutter = mkLangOpt "Cutter"; 19 + }; 20 + 21 + config = let 22 + conf = config.cow.dev; 23 + in 24 + lib.mkIf conf.enable { 25 + nixpkgs.overlays = lib.optional conf.rust inputs.fenix.overlays.default; 26 + 27 + xdg.configFile = { 28 + "astro/config.json" = lib.mkIf conf.web { 29 + text = builtins.toJSON { 30 + telemetry = { 31 + enabled = false; 32 + anonymousId = ""; 33 + notifiedAt = "0"; 34 + }; 35 + }; 36 + }; 37 + "ghc/ghci.conf" = lib.mkIf conf.haskell { 38 + text = '' 39 + :set prompt "\ESC[1;35m\x03BB> \ESC[m" 40 + :set prompt-cont "\ESC[1;35m > \ESC[m" 41 + ''; 42 + }; 43 + }; 44 + 45 + cow.imperm.keepCache = 46 + [ 47 + ".config/gh" 48 + ] 49 + ++ (lib.optional conf.rust ".cargo") 50 + ++ (lib.optionals conf.web [ 51 + ".npm" 52 + ".pnpm" 53 + ]); 54 + 55 + programs.git = { 56 + enable = true; 57 + settings = { 58 + init.defaultBranch = "main"; 59 + advice.addIgnoredFiles = false; 60 + }; 61 + }; 62 + 63 + home.packages = with pkgs; 64 + [gh] 65 + ++ (lib.optionals (conf.rust or conf.c) [ 66 + pkg-config 67 + gnumake 68 + gcc 69 + gdb 70 + ]) 71 + ++ (lib.optionals conf.rust [ 72 + (pkgs.fenix.complete.withComponents [ 73 + "cargo" 74 + "clippy" 75 + "rust-src" 76 + "rustc" 77 + "rustfmt" 78 + ]) 79 + rust-analyzer-nightly 80 + cargo-tauri 81 + mprocs 82 + evcxr 83 + ]) 84 + ++ (lib.optionals conf.web [ 85 + nodejs_latest 86 + nodePackages.pnpm 87 + yarn 88 + deno 89 + ]) 90 + ++ (lib.optionals conf.haskell [ 91 + haskell.compiler.ghc912 92 + ]) 93 + ++ (lib.optionals conf.python [ 94 + python3 95 + poetry 96 + pipenv 97 + uv 98 + ruff 99 + black 100 + ]) 101 + ++ (lib.optionals conf.dotnet [ 102 + dotnet-sdk 103 + dotnet-runtime 104 + mono 105 + dotnetPackages.Nuget 106 + ]) 107 + ++ (lib.optional conf.cutter (cutter.withPlugins (p: with p; [rz-ghidra]))); 108 + }; 109 + }
+12
homeModules/firewall.nix
··· 1 + {...}: {lib, ...}: { 2 + options.cow.firewall = { 3 + tcp = lib.mkOption { 4 + type = lib.types.listOf lib.types.int; 5 + default = []; 6 + }; 7 + udp = lib.mkOption { 8 + type = lib.types.listOf lib.types.int; 9 + default = []; 10 + }; 11 + }; 12 + }
+26
homeModules/games.nix
··· 1 + {...}: { 2 + pkgs, 3 + config, 4 + lib, 5 + ... 6 + }: { 7 + options.cow.games.enable = lib.mkEnableOption "playing games with Steam"; 8 + 9 + config = lib.mkIf config.cow.games.enable { 10 + home.packages = with pkgs; [ 11 + steam 12 + cemu 13 + owmods-cli 14 + owmods-gui 15 + prismlauncher 16 + ]; 17 + 18 + cow.imperm.keepCache = [ 19 + ".local/share/Steam" 20 + ".local/share/ow-mod-man" 21 + ".local/share/OuterWildsModManager" 22 + ".local/share/PrismLauncher" 23 + ".local/share/Cemu" 24 + ]; 25 + }; 26 + }
+678
homeModules/gdi.nix
··· 1 + {inputs, ...}: { 2 + config, 3 + lib, 4 + pkgs, 5 + ... 6 + }: { 7 + options.cow.gdi = { 8 + enable = lib.mkEnableOption "Cow GDI, a 'DE' by ur favorite polish cow"; 9 + doIdle = lib.mkEnableOption "Screen locking and suspend with Hypridle"; 10 + useUWSM = lib.mkEnableOption "Use UWSM to launch apps"; 11 + }; 12 + 13 + config = let 14 + runCmd = cmd: 15 + if config.cow.gdi.useUWSM 16 + then "uwsm app -- ${cmd}" 17 + else cmd; 18 + launchDesktopApp = deskFile: 19 + if config.cow.gdi.useUWSM 20 + then "uwsm app -- ${deskFile}" 21 + else "${pkgs.gtk3}/bin/gtk-launch ${deskFile}"; 22 + screenOffCmd = "hyprctl dispatch dpms off; ${pkgs.swaynotificationcenter}/bin/swaync-client --inhibitor-add \"timeout\""; 23 + screenOnCmd = "hyprctl dispatch dpms on; ${pkgs.swaynotificationcenter}/bin/swaync-client --inhibitor-remove \"timeout\""; 24 + iconTheme = { 25 + name = "Tela-green"; 26 + package = pkgs.tela-icon-theme; 27 + }; 28 + cursorTheme = { 29 + name = "catppuccin-mocha-dark-cursors"; 30 + package = pkgs.catppuccin-cursors.mochaDark; 31 + size = 24; 32 + }; 33 + hyprThemeName = "${cursorTheme.name}-hypr"; 34 + hyprCursorTheme = let 35 + utils = "${pkgs.hyprcursor}/bin/hyprcursor-util"; 36 + in 37 + pkgs.runCommand hyprThemeName {} '' 38 + export PATH="$PATH:${pkgs.xcur2png}/bin" 39 + ${utils} -x ${cursorTheme.package}/share/icons/${cursorTheme.name} --output . 40 + mkdir -p $out/share/icons 41 + ${utils} -c ./extracted_${cursorTheme.name} --output . 42 + cp -r "./theme_Extracted Theme" $out/share/icons/${hyprThemeName} 43 + ''; 44 + in 45 + lib.mkIf config.cow.gdi.enable { 46 + home.packages = with pkgs; [ 47 + alsa-utils 48 + 49 + hyprCursorTheme 50 + cursorTheme.package 51 + iconTheme.package 52 + 53 + wezterm 54 + 55 + # Shell Components 56 + hyprpicker 57 + hyprlock 58 + hyprland-qtutils 59 + 60 + ## Waybar 61 + qt6.qttools # For component 62 + 63 + pavucontrol 64 + 65 + wf-recorder 66 + slurp 67 + grim 68 + xdg-utils 69 + grimblast 70 + tesseract 71 + swappy 72 + libnotify 73 + swaynotificationcenter 74 + wl-clipboard 75 + 76 + hunspell 77 + hunspellDicts.en_US-large 78 + ]; 79 + 80 + fonts.fontconfig.enable = false; 81 + 82 + wayland.windowManager.hyprland = { 83 + systemd.enable = false; 84 + enable = true; 85 + extraConfig = '' 86 + bind = SUPER,M,submap,passthru 87 + submap = passthru 88 + bind = SUPER,ESCAPE,submap,reset 89 + submap = reset 90 + ''; 91 + settings = { 92 + autogenerated = 0; 93 + ecosystem = { 94 + no_update_news = true; 95 + no_donation_nag = true; 96 + }; 97 + cursor = { 98 + no_hardware_cursors = true; 99 + enable_hyprcursor = false; 100 + }; 101 + monitor = [ 102 + ",highres,auto,1" 103 + ]; 104 + general = { 105 + border_size = 2; 106 + resize_on_border = true; 107 + "col.active_border" = "$red $peach $yellow $green $sapphire $lavender $mauve 225deg"; 108 + }; 109 + decoration = { 110 + rounding = 10; 111 + }; 112 + input = { 113 + numlock_by_default = true; 114 + kb_options = "caps:escape"; 115 + touchpad = { 116 + natural_scroll = true; 117 + }; 118 + }; 119 + xwayland = { 120 + force_zero_scaling = true; 121 + }; 122 + # debug = { 123 + # disable_logs = false; 124 + # }; 125 + misc = { 126 + enable_swallow = true; 127 + disable_hyprland_logo = true; 128 + disable_splash_rendering = true; 129 + focus_on_activate = true; 130 + mouse_move_enables_dpms = true; 131 + key_press_enables_dpms = true; 132 + }; 133 + env = [ 134 + "TERMINAL,wezterm" 135 + "GRIMBLAST_EDITOR,swappy -f " 136 + "QT_QPA_PLATFORM,wayland;xcb" 137 + "QT_AUTO_SCREEN_SCALE_FACTOR,1" 138 + "HYPRCURSOR_THEME,${hyprThemeName}" 139 + "HYPRCURSOR_SIZE,${builtins.toJSON cursorTheme.size}" 140 + ]; 141 + windowrulev2 = [ 142 + "idleinhibit fullscreen,class:(.*),title:(.*)" 143 + ]; 144 + submap = "reset"; 145 + gesture = [ 146 + "3,horizontal,workspace" 147 + "4,swipe,move" 148 + ]; 149 + bind = let 150 + powerMenu = "rofi -modi 'p:${pkgs.rofi-power-menu}/bin/rofi-power-menu' -show p"; 151 + screenshot = "${pkgs.nushell}/bin/nu ${../res/screenshot.nu}"; 152 + 153 + openTerminal = launchDesktopApp "org.wezfurlong.wezterm.desktop"; 154 + forEachWorkspace = { 155 + mod, 156 + dispatch, 157 + }: 158 + builtins.genList ( 159 + i: let 160 + num = builtins.toString i; 161 + in "${mod},${num},${dispatch},${ 162 + if num == "0" 163 + then "10" 164 + else num 165 + }" 166 + ) 167 + 10; 168 + in 169 + [ 170 + "SUPER,M,submap,passthru" 171 + ] 172 + ++ lib.optionals config.cow.firefox.enable [ 173 + "SUPER,Q,exec,${launchDesktopApp "firefox-devedition.desktop"}" 174 + ] 175 + ++ [ 176 + "SUPER,Z,exec,systemctl suspend" 177 + ",XF86AudioMedia,exec,${openTerminal}" 178 + "SUPER,T,exec,${openTerminal}" 179 + "SUPER ALT CTRL SHIFT,L,exec,xdg-open https://linkedin.com" 180 + "SUPER,C,killactive," 181 + "SUPER,P,pseudo," 182 + "SUPER,R,togglefloating," 183 + "SUPER,F,fullscreen,1" 184 + "SUPER SHIFT,F,fullscreen,0" 185 + ",XF86RFKill,exec,rfkill toggle wifi" 186 + "SUPER,left,workspace,r-1" 187 + "SUPER,right,workspace,r+1" 188 + "SUPER SHIFT,left,movetoworkspace,r-1" 189 + "SUPER SHIFT,right,movetoworkspace,r+1" 190 + "SUPER,L,exec,pidof hyprlock || hyprlock --immediate" 191 + "SUPER,S,exec,${runCmd "rofi -show drun -show-icons"}" 192 + "SUPER SHIFT,E,exec,${runCmd "rofi -modi emoji -show emoji"}" 193 + "SUPER SHIFT,D,exec,swaync-client -d" 194 + "SUPER,Delete,exec,${runCmd powerMenu}" 195 + ",XF86PowerOff,exec,${runCmd powerMenu}" 196 + "SUPER ALT,C,exec,${runCmd "rofi -show calc -modi calc -no-show-match -no-sort -calc-command \"echo -n '{result}' | wl-copy\""}" 197 + "SUPER,B,exec,${runCmd "${pkgs.rofi-bluetooth}/bin/rofi-bluetooth"}" 198 + "SUPER,Tab,exec,${runCmd "rofi -show window -show-icons"}" 199 + ] 200 + ++ lib.optionals config.cow.yazi.enable ["SUPER,E,exec,${launchDesktopApp "yazi.desktop"}"] 201 + ++ [ 202 + "SUPER,N,exec,${runCmd "${pkgs.swaynotificationcenter}/bin/swaync-client -t -sw"}" 203 + "SUPER,A,exec,${runCmd "${pkgs.pavucontrol}/bin/pavucontrol --tab 5"}" 204 + ''SUPER,V,exec,cliphist list | sed -r 's/\[\[ binary data (.* .iB) (.*) (.*) \]\]/ 󰋩 \2 Image (\3, \1)/g' | rofi -dmenu -display-columns 2 -p Clipboard | cliphist decode | wl-copy'' 205 + "SUPER ALT,V,exec,echo -e \"Yes\\nNo\" | [[ $(rofi -dmenu -mesg \"Clear Clipboard History?\" -p Clear) == \"Yes\" ]] && cliphist wipe" 206 + ",Print,exec,${runCmd screenshot}" 207 + "SUPER SHIFT,S,exec,${runCmd screenshot}" 208 + "SUPER SHIFT,T,exec,${runCmd "${pkgs.nushell}/bin/nu ${../res/ocr.nu}"}" 209 + "SUPER SHIFT,C,exec,${runCmd "${pkgs.hyprpicker}/bin/hyprpicker -a"}" 210 + ] 211 + ++ forEachWorkspace { 212 + mod = "SUPER"; 213 + dispatch = "workspace"; 214 + } 215 + ++ forEachWorkspace { 216 + mod = "SUPER SHIFT"; 217 + dispatch = "movetoworkspace"; 218 + }; 219 + bindr = [ 220 + "SUPER SHIFT,R,exec,pkill wf-recorder --signal SIGINT ||${runCmd "${pkgs.nushell}/bin/nu ${../res/screenrec.nu}"}" 221 + "CAPS,Caps_Lock,exec,swayosd-client --caps-lock" 222 + ",Scroll_Lock,exec,swayosd-client --scroll-lock" 223 + ",Num_Lock,exec,swayosd-client --num-lock" 224 + ]; 225 + bindl = [ 226 + ",switch:on:Lid Switch,exec,${screenOffCmd}" 227 + ",switch:off:Lid Switch,exec,${screenOnCmd}" 228 + ",XF86AudioPlay,exec,playerctl play-pause" 229 + ",XF86AudioPause,exec,playerctl pause" 230 + ",XF86AudioStop,exec,playerctl stop" 231 + ",XF86AudioNext,exec,playerctl next" 232 + ",XF86AudioPrev,exec,playerctl previous" 233 + ]; 234 + bindel = [ 235 + ",XF86MonBrightnessUp,exec,swayosd-client --brightness raise" 236 + ",XF86MonBrightnessDown,exec,swayosd-client --brightness lower" 237 + ",XF86AudioRaiseVolume,exec,swayosd-client --output-volume raise" 238 + ",XF86AudioLowerVolume,exec,swayosd-client --output-volume lower" 239 + ",XF86AudioMute,exec,swayosd-client --output-volume mute-toggle" 240 + ]; 241 + bindm = [ 242 + "SUPER,mouse:272,movewindow" 243 + "SUPER,mouse:273,resizewindow" 244 + ]; 245 + }; 246 + }; 247 + 248 + catppuccin.hyprlock.useDefaultConfig = false; 249 + programs.hyprlock = { 250 + enable = true; 251 + 252 + settings = { 253 + background = { 254 + monitor = ""; 255 + path = "${config.cow.pictures.bg}"; 256 + blur_passes = 1; 257 + }; 258 + shape = [ 259 + { 260 + monitor = ""; 261 + color = "$crust"; 262 + position = "0, 30"; 263 + rounding = 10; 264 + border_size = 2; 265 + border_color = "$mauve"; 266 + size = "500, 500"; 267 + shadow_passes = 1; 268 + shadow_size = 2; 269 + } 270 + { 271 + monitor = ""; 272 + color = "$crust"; 273 + position = "0, -30"; 274 + rounding = 10; 275 + border_size = 2; 276 + border_color = "$mauve"; 277 + size = "600, 50"; 278 + valign = "top"; 279 + shadow_passes = 1; 280 + shadow_size = 2; 281 + } 282 + ]; 283 + image = { 284 + monitor = ""; 285 + path = "${config.cow.pictures.pfp}"; 286 + size = 150; 287 + rounding = -1; 288 + border_size = 4; 289 + border_color = "$mauve"; 290 + rotate = 0; 291 + position = "0, 120"; 292 + halign = "center"; 293 + valign = "center"; 294 + }; 295 + "input-field" = { 296 + monitor = ""; 297 + size = "250, 50"; 298 + outline_thickness = 2; 299 + dots_size = 0.25; # Scale of input-field height, 0.2 - 0.8 300 + dots_spacing = 0.15; # Scale of dots' absolute size, 0.0 - 1.0 301 + dots_center = false; 302 + dots_rounding = -1; # -1 default circle, -2 follow input-field rounding 303 + outer_color = "$surface0"; 304 + inner_color = "$base"; 305 + font_color = "$text"; 306 + fade_on_empty = false; 307 + fade_timeout = 1000; # Milliseconds before fade_on_empty is triggered. 308 + placeholder_text = ''<span foreground="##cdd6f4" style="italic">Password</span>''; 309 + hide_input = false; 310 + rounding = -1; # -1 means complete rounding (circle/oval) 311 + check_color = "$peach"; 312 + fail_color = "$red"; # if authentication failed, changes outer_color and fail message color 313 + fail_text = "<i>$FAIL <b>($ATTEMPTS)</b></i>"; 314 + fail_transition = 300; # transition time in ms between normal outer_color and fail_color 315 + capslock_color = -1; 316 + numlock_color = -1; 317 + bothlock_color = -1; # when both locks are active. -1 means don't change outer color (same for above) 318 + invert_numlock = false; # change color if numlock is off 319 + swap_font_color = false; # see below 320 + 321 + position = "0, -80"; 322 + halign = "center"; 323 + valign = "center"; 324 + }; 325 + label = [ 326 + { 327 + monitor = ""; 328 + text = "$DESC"; 329 + color = "$text"; 330 + font_size = 25; 331 + font_family = "sans-serif"; 332 + rotate = 0; # degrees, counter-clockwise 333 + 334 + position = "0, 0"; 335 + halign = "center"; 336 + valign = "center"; 337 + } 338 + { 339 + monitor = ""; 340 + text = ''cmd[update:30000] echo " $(date +"%A, %B %-d | %I:%M %p")$(${pkgs.nushell}/bin/nu ${../res/bat_display.nu}) "''; 341 + color = "$text"; 342 + font_size = 20; 343 + font_family = "sans-serif"; 344 + rotate = 0; # degrees, counter-clockwise 345 + 346 + position = "0, -40"; 347 + halign = "center"; 348 + valign = "top"; 349 + } 350 + ]; 351 + }; 352 + }; 353 + 354 + catppuccin.rofi.enable = false; 355 + 356 + systemd.user.services = let 357 + target = config.wayland.systemd.target; 358 + mkShellService = { 359 + desc, 360 + service, 361 + }: { 362 + Install = { 363 + WantedBy = [target]; 364 + }; 365 + 366 + Unit = { 367 + ConditionEnvironment = "WAYLAND_DISPLAY"; 368 + Description = desc; 369 + After = [target]; 370 + PartOf = [target]; 371 + }; 372 + 373 + Service = service; 374 + }; 375 + in { 376 + battery-notif = mkShellService { 377 + desc = "Battery Notification Service"; 378 + 379 + service = { 380 + ExecStart = "${pkgs.nushell}/bin/nu --plugins ${ 381 + inputs.nu_plugin_dbus.packages.${pkgs.system}.default 382 + } ${../res/battery_notif.nu}"; 383 + Restart = "on-failure"; 384 + RestartSec = "10"; 385 + }; 386 + }; 387 + 388 + mpris-idle-inhibit = mkShellService { 389 + desc = "MPRIS Idle Inhibitor"; 390 + 391 + service = { 392 + ExecStart = ''${ 393 + inputs.wayland-mpris-idle-inhibit.packages.${pkgs.system}.default 394 + }/bin/wayland-mpris-idle-inhibit --ignore "kdeconnect" --ignore "playerctld"''; 395 + Restart = "on-failure"; 396 + RestartSec = "10"; 397 + }; 398 + }; 399 + }; 400 + 401 + qt = { 402 + enable = true; 403 + platformTheme.name = "kvantum"; 404 + style.name = "kvantum"; 405 + }; 406 + 407 + home.pointerCursor = { 408 + inherit (cursorTheme) name package size; 409 + enable = true; 410 + gtk.enable = true; 411 + x11.enable = true; 412 + }; 413 + 414 + gtk = { 415 + enable = true; 416 + iconTheme = lib.mkForce iconTheme; 417 + gtk2.extraConfig = "gtk-application-prefer-dark-theme=true"; 418 + gtk3.extraConfig.gtk-application-prefer-dark-theme = true; 419 + gtk4.extraConfig.gtk-application-prefer-dark-theme = true; 420 + }; 421 + 422 + dconf.settings."org/gnome/desktop/interface".color-scheme = "prefer-dark"; 423 + 424 + services = { 425 + hyprpolkitagent.enable = true; 426 + 427 + hyprpaper = { 428 + enable = true; 429 + settings = { 430 + ipc = "on"; 431 + splash = false; 432 + preload = ["${config.cow.pictures.bg}"]; 433 + wallpaper = [",${config.cow.pictures.bg}"]; 434 + }; 435 + }; 436 + 437 + swaync = { 438 + enable = true; 439 + settings = { 440 + control-center-exclusive-zone = false; 441 + control-center-height = 1000; 442 + control-center-margin-bottom = 10; 443 + control-center-margin-left = 10; 444 + control-center-margin-right = 10; 445 + control-center-margin-top = 0; 446 + control-center-width = 800; 447 + fit-to-screen = false; 448 + hide-on-action = true; 449 + hide-on-clear = false; 450 + image-visibility = "when-available"; 451 + keyboard-shortcuts = true; 452 + notification-body-image-height = 100; 453 + notification-body-image-width = 200; 454 + notification-icon-size = 64; 455 + notification-window-width = 500; 456 + positionX = "center"; 457 + positionY = "top"; 458 + script-fail-notify = true; 459 + scripts = { 460 + all = { 461 + exec = "${pkgs.nushell}/bin/nu ${../res/notification.nu} ${../res/notif-sounds}"; 462 + urgency = ".*"; 463 + }; 464 + }; 465 + timeout = 10; 466 + timeout-critical = 0; 467 + timeout-low = 5; 468 + transition-time = 200; 469 + widget-config = { 470 + dnd = { 471 + text = "Do Not Disturb"; 472 + }; 473 + label = { 474 + max-lines = 1; 475 + text = "Notification Center"; 476 + }; 477 + title = { 478 + button-text = "Clear All"; 479 + clear-all-button = true; 480 + text = "Notification Center"; 481 + }; 482 + }; 483 + widgets = [ 484 + "title" 485 + "dnd" 486 + "notifications" 487 + ]; 488 + }; 489 + }; 490 + 491 + hypridle = lib.mkIf config.cow.gdi.doIdle { 492 + enable = true; 493 + settings = { 494 + general = { 495 + lock_cmd = "pidof hyprlock || hyprlock --grace 5"; 496 + unlock_cmd = "pkill hyprlock --signal SIGUSR1"; 497 + before_sleep_cmd = "loginctl lock-session"; 498 + after_sleep_cmd = screenOnCmd; 499 + }; 500 + 501 + listener = let 502 + lockTimeout = 120; 503 + in [ 504 + { 505 + timeout = lockTimeout; # Lock the screen after 2 minutes of inactivity 506 + on-timeout = "loginctl lock-session"; 507 + } 508 + { 509 + timeout = lockTimeout + 120; # Turn off the screen 2 minutes after locking 510 + on-timeout = screenOffCmd; 511 + on-resume = screenOnCmd; 512 + } 513 + { 514 + timeout = lockTimeout + 600; # Suspend 10 minutes after locking 515 + on-timeout = "systemctl suspend"; 516 + } 517 + ]; 518 + }; 519 + }; 520 + 521 + cliphist = { 522 + enable = true; 523 + systemdTargets = lib.mkForce [ 524 + config.wayland.systemd.target 525 + ]; 526 + }; 527 + udiskie = { 528 + enable = true; 529 + automount = false; 530 + tray = "never"; 531 + }; 532 + playerctld.enable = true; 533 + wlsunset = { 534 + enable = true; 535 + sunrise = "6:00"; 536 + sunset = "22:00"; 537 + }; 538 + swayosd = { 539 + enable = true; 540 + stylePath = pkgs.writeText "swayosd-style.css" '' 541 + window#osd { 542 + border-radius: 5rem; 543 + } 544 + 545 + #container { 546 + padding: 5px 10px; 547 + } 548 + ''; 549 + }; 550 + }; 551 + 552 + programs = { 553 + rofi = { 554 + enable = true; 555 + package = pkgs.rofi.override { 556 + plugins = with pkgs; [ 557 + rofi-emoji 558 + rofi-power-menu 559 + rofi-bluetooth 560 + rofi-calc 561 + rofi-pulse-select 562 + ]; 563 + }; 564 + theme = let 565 + inherit (config.lib.formats.rasi) mkLiteral; 566 + in { 567 + "@import" = "${config.catppuccin.sources.rofi}/themes/catppuccin-${config.catppuccin.rofi.flavor}.rasi"; 568 + "*" = 569 + (builtins.mapAttrs (name: value: mkLiteral "@${value}") { 570 + "bg0" = "base"; 571 + "bg1" = "mantle"; 572 + "bg2" = "crust"; 573 + "bg3" = config.catppuccin.accent; 574 + "fg0" = "subtext1"; 575 + "fg1" = "text"; 576 + "fg2" = "subtext0"; 577 + "fg3" = "overlay0"; 578 + "fg4" = "surface0"; 579 + }) 580 + // { 581 + font = mkLiteral ''"Roboto 14"''; 582 + background-color = mkLiteral ''transparent''; 583 + text-color = mkLiteral ''@fg0''; 584 + margin = mkLiteral ''0px''; 585 + padding = mkLiteral ''0px''; 586 + spacing = mkLiteral ''0px''; 587 + }; 588 + "window" = { 589 + location = mkLiteral ''north''; 590 + y-offset = mkLiteral ''calc(50% - 176px)''; 591 + width = mkLiteral ''600''; 592 + border-radius = mkLiteral ''24px''; 593 + background-color = mkLiteral ''@bg0''; 594 + }; 595 + "mainbox" = { 596 + padding = mkLiteral ''12px''; 597 + }; 598 + "inputbar" = { 599 + background-color = mkLiteral ''@bg1''; 600 + border-color = mkLiteral ''@bg3''; 601 + border = mkLiteral ''2px''; 602 + border-radius = mkLiteral ''16px''; 603 + padding = mkLiteral ''8px 16px''; 604 + spacing = mkLiteral ''8px''; 605 + children = mkLiteral ''[ prompt, entry ]''; 606 + }; 607 + "prompt" = { 608 + text-color = mkLiteral ''@fg2''; 609 + }; 610 + "entry" = { 611 + placeholder = mkLiteral ''"Search"''; 612 + placeholder-color = mkLiteral ''@fg3''; 613 + }; 614 + "message" = { 615 + margin = mkLiteral ''12px 0 0''; 616 + border-radius = mkLiteral ''16px''; 617 + border-color = mkLiteral ''@bg2''; 618 + background-color = mkLiteral ''@bg2''; 619 + }; 620 + "textbox" = { 621 + padding = mkLiteral ''8px 24px''; 622 + }; 623 + "listview" = { 624 + background-color = mkLiteral ''transparent''; 625 + margin = mkLiteral ''12px 0 0''; 626 + lines = mkLiteral ''8''; 627 + columns = mkLiteral ''2''; 628 + fixed-height = mkLiteral ''false''; 629 + }; 630 + "element" = { 631 + padding = mkLiteral ''8px 16px''; 632 + spacing = mkLiteral ''8px''; 633 + border-radius = mkLiteral ''16px''; 634 + }; 635 + "element normal active" = { 636 + text-color = mkLiteral ''@bg3''; 637 + }; 638 + "element alternate active" = { 639 + text-color = mkLiteral ''@bg3''; 640 + }; 641 + "element selected normal, element selected active" = { 642 + text-color = mkLiteral ''@fg4''; 643 + background-color = mkLiteral ''@bg3''; 644 + }; 645 + "element-icon" = { 646 + size = mkLiteral ''1em''; 647 + vertical-align = mkLiteral ''0.5''; 648 + }; 649 + "element-text" = { 650 + text-color = mkLiteral ''inherit''; 651 + }; 652 + }; 653 + location = "center"; 654 + }; 655 + nushell.extraConfig = '' 656 + plugin add ${inputs.nu_plugin_dbus.packages.${pkgs.system}.default}/bin/nu_plugin_dbus 657 + ''; 658 + 659 + wezterm = { 660 + enable = true; 661 + extraConfig = '' 662 + return { 663 + font = wezterm.font("monospace"), 664 + font_size = 18.0, 665 + color_scheme = "Catppuccin Mocha", 666 + enable_tab_bar = false, 667 + window_background_opacity = 0.92, 668 + default_cursor_style = "SteadyBar", 669 + cursor_thickness = 2, 670 + keys = { 671 + {key="o", mods="CTRL|SHIFT", action="OpenLinkAtMouseCursor"} 672 + } 673 + } 674 + ''; 675 + }; 676 + }; 677 + }; 678 + }
+94
homeModules/htop.nix
··· 1 + {...}: { 2 + lib, 3 + config, 4 + ... 5 + }: { 6 + options.cow.htop.enable = lib.mkEnableOption "htop + customizations"; 7 + 8 + config = lib.mkIf config.cow.htop.enable { 9 + # TODO: Actually use Nix for this 10 + xdg.configFile."htop/htoprc".text = '' 11 + htop_version=3.3.0 12 + config_reader_min_version=3 13 + fields=0 3 2 18 46 47 39 1 14 + hide_kernel_threads=1 15 + hide_userland_threads=0 16 + hide_running_in_container=0 17 + shadow_other_users=0 18 + show_thread_names=1 19 + show_program_path=0 20 + highlight_base_name=1 21 + highlight_deleted_exe=0 22 + shadow_distribution_path_prefix=0 23 + highlight_megabytes=1 24 + highlight_threads=1 25 + highlight_changes=0 26 + highlight_changes_delay_secs=5 27 + find_comm_in_cmdline=1 28 + strip_exe_from_cmdline=1 29 + show_merged_command=0 30 + header_margin=1 31 + screen_tabs=1 32 + detailed_cpu_time=0 33 + cpu_count_from_one=1 34 + show_cpu_usage=1 35 + show_cpu_frequency=0 36 + show_cpu_temperature=1 37 + degree_fahrenheit=0 38 + update_process_names=0 39 + account_guest_in_cpu_meter=1 40 + color_scheme=0 41 + enable_mouse=1 42 + delay=15 43 + hide_function_bar=0 44 + header_layout=two_67_33 45 + column_meters_0=System Hostname Date Clock Uptime Tasks CPU AllCPUs4 MemorySwap 46 + column_meter_modes_0=2 2 2 2 2 2 2 1 1 47 + column_meters_1=DiskIO DiskIO Blank NetworkIO NetworkIO 48 + column_meter_modes_1=2 3 2 2 3 49 + tree_view=0 50 + sort_key=46 51 + tree_sort_key=0 52 + sort_direction=-1 53 + tree_sort_direction=1 54 + tree_view_always_by_pid=0 55 + all_branches_collapsed=0 56 + screen:Main=PID PPID STATE NICE PERCENT_CPU PERCENT_MEM M_RESIDENT Command 57 + .sort_key=PERCENT_CPU 58 + .tree_sort_key=PID 59 + .tree_view_always_by_pid=0 60 + .tree_view=0 61 + .sort_direction=-1 62 + .tree_sort_direction=1 63 + .all_branches_collapsed=0 64 + screen:Tree=PID PPID PGRP PROCESSOR TTY USER SESSION Command 65 + .sort_key=PID 66 + .tree_sort_key=PID 67 + .tree_view_always_by_pid=0 68 + .tree_view=1 69 + .sort_direction=1 70 + .tree_sort_direction=1 71 + .all_branches_collapsed=0 72 + screen:I/O=PID PPID IO_READ_RATE IO_WRITE_RATE Command 73 + .sort_key=IO_RATE 74 + .tree_sort_key=PID 75 + .tree_view_always_by_pid=0 76 + .tree_view=0 77 + .sort_direction=-1 78 + .tree_sort_direction=1 79 + .all_branches_collapsed=0 80 + ''; 81 + programs.htop = { 82 + enable = true; 83 + }; 84 + xdg.dataFile = lib.mkIf config.cow.gdi.enable { 85 + "applications/htop.desktop".text = '' 86 + [Desktop Entry] 87 + Type=Application 88 + Name=Htop 89 + Exec=wezterm start --class="htop" htop 90 + Icon=htop 91 + ''; 92 + }; 93 + }; 94 + }
+34
homeModules/imperm.nix
··· 1 + {...}: { 2 + config, 3 + lib, 4 + ... 5 + }: let 6 + listOfDirs = desc: 7 + lib.mkOption { 8 + type = lib.types.listOf lib.types.str; 9 + description = desc; 10 + default = []; 11 + }; 12 + in { 13 + options.cow.imperm = { 14 + keepLibraries = lib.mkEnableOption "persisting library (Documents, Pictures, etc.) directories"; 15 + keepCache = listOfDirs "List of directories to persist if impermanence is enabled. These directories are *not* meant to be backed up"; 16 + keep = listOfDirs "List of directories to persist if impermanence is enabled. These directories should be backed up"; 17 + keepFiles = listOfDirs "List of files to keep. These files should be backed up"; 18 + }; 19 + 20 + config = lib.mkIf config.cow.imperm.keepLibraries { 21 + cow.imperm.keep = [ 22 + "Downloads" 23 + "Music" 24 + "Videos" 25 + "Pictures" 26 + "Documents" 27 + ".ssh" 28 + ]; 29 + cow.imperm.keepCache = [ 30 + ".cache" 31 + ".local/state/wireplumber" 32 + ]; 33 + }; 34 + }
+24
homeModules/kde-connect.nix
··· 1 + {...}: { 2 + config, 3 + lib, 4 + ... 5 + }: { 6 + options.cow.kde-connect = { 7 + enable = lib.mkEnableOption "KDE connect to connect to phones"; 8 + dev-name = lib.mkOption { 9 + type = lib.types.str; 10 + description = "Name of the device in KDE connect"; 11 + }; 12 + }; 13 + 14 + config = lib.mkIf config.cow.kde-connect.enable { 15 + cow.imperm.keepCache = [".config/kdeconnect"]; 16 + cow.firewall.tcp = lib.range 1714 1764; 17 + xdg.configFile."kdeconnect/config".text = '' 18 + [General] 19 + name=${config.cow.kde-connect.dev-name} 20 + ''; 21 + services.kdeconnect.enable = true; 22 + systemd.user.services.kdeconnect.Service.Environment = lib.mkForce []; 23 + }; 24 + }
+34
homeModules/keepassxc.nix
··· 1 + {...}: { 2 + config, 3 + lib, 4 + pkgs, 5 + ... 6 + }: { 7 + options.cow.keepassxc = { 8 + enable = lib.mkEnableOption "KeePassXC + autolaunch"; 9 + dbPath = lib.mkOption { 10 + type = lib.types.nullOr lib.types.str; 11 + description = "KeePassXC DB to open on DE launch if cow.gdi is on"; 12 + default = null; 13 + }; 14 + }; 15 + 16 + config = lib.mkIf config.cow.keepassxc.enable { 17 + cow.imperm.keepCache = [".config/keepassxc"]; 18 + 19 + wayland.windowManager.hyprland.settings.exec-once = 20 + lib.optionals (config.cow.gdi.enable && config.cow.keepassxc.dbPath != null) 21 + ( 22 + let 23 + cmd = "keepassxc ${config.cow.keepassxc.dbPath}"; 24 + in [ 25 + ( 26 + if config.cow.gdi.useUWSM 27 + then "uwsm app -- ${cmd}" 28 + else cmd 29 + ) 30 + ] 31 + ); 32 + home.packages = with pkgs; [keepassxc]; 33 + }; 34 + }
+26
homeModules/libraries.nix
··· 1 + {...}: { 2 + config, 3 + lib, 4 + ... 5 + }: { 6 + options.cow.libraries.enable = lib.mkEnableOption "Setting common library directories"; 7 + 8 + config = lib.mkIf config.cow.libraries.enable { 9 + xdg = { 10 + enable = true; 11 + userDirs = let 12 + inherit (config.home) homeDirectory; 13 + in { 14 + enable = true; 15 + desktop = "${homeDirectory}/Desktop"; 16 + documents = "${homeDirectory}/Documents"; 17 + pictures = "${homeDirectory}/Pictures"; 18 + videos = "${homeDirectory}/Videos"; 19 + music = "${homeDirectory}/Music"; 20 + extraConfig = { 21 + "XDG_SCREENSHOTS_DIR" = "${homeDirectory}/Pictures/Screenshots"; 22 + }; 23 + }; 24 + }; 25 + }; 26 + }
+385
homeModules/music.nix
··· 1 + {inputs, ...}: { 2 + pkgs, 3 + lib, 4 + config, 5 + ... 6 + }: { 7 + options.cow.music = { 8 + enable = lib.mkEnableOption "music playback with MPD and rmpc + customizations"; 9 + }; 10 + 11 + config = lib.mkIf config.cow.music.enable ( 12 + let 13 + cat = 14 + (builtins.fromJSON ( 15 + builtins.readFile "${inputs.catppuccin.packages.${pkgs.system}.palette}/palette.json" 16 + )).${ 17 + config.catppuccin.flavor 18 + }.colors; 19 + accent = cat.${config.catppuccin.accent}; 20 + themeFile = '' 21 + #![enable(implicit_some)] 22 + #![enable(unwrap_newtypes)] 23 + #![enable(unwrap_variant_newtypes)] 24 + ( 25 + default_album_art_path: None, 26 + draw_borders: true, 27 + show_song_table_header: true, 28 + symbols: (song: "", dir: "", playlist: "󰲸", marker: "\u{e0b0}"), 29 + layout: Split( 30 + direction: Vertical, 31 + panes: [ 32 + ( 33 + size: "3", 34 + pane: Pane(Tabs), 35 + ), 36 + ( 37 + size: "4", 38 + pane: Split( 39 + direction: Horizontal, 40 + panes: [ 41 + ( 42 + size: "100%", 43 + pane: Split( 44 + direction: Vertical, 45 + panes: [ 46 + ( 47 + size: "4", 48 + borders: "ALL", 49 + pane: Pane(Header), 50 + ), 51 + ] 52 + ) 53 + ), 54 + ] 55 + ), 56 + ), 57 + ( 58 + size: "100%", 59 + pane: Split( 60 + direction: Horizontal, 61 + panes: [ 62 + ( 63 + size: "100%", 64 + borders: "ALL", 65 + pane: Pane(TabContent), 66 + ), 67 + ] 68 + ), 69 + ), 70 + ( 71 + size: "3", 72 + borders: "ALL", 73 + pane: Pane(ProgressBar), 74 + ), 75 + ], 76 + ), 77 + progress_bar: ( 78 + symbols: ["[", "=", ">", "-", "]"], 79 + track_style: (bg: "${cat.mantle.hex}"), 80 + elapsed_style: (fg: "${accent.hex}", bg: "${cat.mantle.hex}"), 81 + thumb_style: (fg: "${accent.hex}", bg: "${cat.mantle.hex}"), 82 + ), 83 + scrollbar: ( 84 + symbols: ["│", "█", "▲", "▼"], 85 + track_style: (), 86 + ends_style: (), 87 + thumb_style: (fg: "${cat.teal.hex}"), 88 + ), 89 + browser_column_widths: [20, 38, 42], 90 + text_color: "${cat.text.hex}", 91 + background_color: "${cat.base.hex}", 92 + header_background_color: "${cat.mantle.hex}", 93 + modal_background_color: None, 94 + modal_backdrop: true, 95 + tab_bar: (active_style: (fg: "black", bg: "${accent.hex}", modifiers: "Bold"), inactive_style: ()), 96 + borders_style: (fg: "${cat.overlay0.hex}"), 97 + highlighted_item_style: (fg: "${accent.hex}", modifiers: "Bold"), 98 + current_item_style: (fg: "black", bg: "${cat.teal.hex}", modifiers: "Bold"), 99 + highlight_border_style: (fg: "${cat.teal.hex}"), 100 + cava: ( 101 + bar_symbols: ['▁', '▂', '▃', '▄', '▅', '▆', '▇', '█'], 102 + inverted_bar_symbols: ['▔', '🮂', '🮃', '▀', '🮄', '🮅', '🮆', '█'], 103 + bar_width: 1, 104 + bar_spacing: 1, 105 + orientation: Bottom, 106 + bar_color: Gradient({ 107 + 0: "${cat.lavender.hex}", 108 + 10: "${cat.blue.hex}", 109 + 20: "${cat.sapphire.hex}", 110 + 30: "${cat.teal.hex}", 111 + 40: "${cat.green.hex}", 112 + 50: "${cat.yellow.hex}", 113 + 60: "${cat.maroon.hex}", 114 + 70: "${cat.red.hex}", 115 + 80: "${cat.mauve.hex}", 116 + 90: "${cat.pink.hex}", 117 + 100: "${cat.flamingo.hex}", 118 + }), 119 + ), 120 + song_table_format: [ 121 + ( 122 + prop: (kind: Property(Artist), style: (fg: "${cat.teal.hex}"), default: (kind: Text("Unknown"))), 123 + width: "50%", 124 + alignment: Right, 125 + ), 126 + ( 127 + prop: (kind: Text("-"), style: (fg: "${cat.teal.hex}"), default: (kind: Text("Unknown"))), 128 + width: "1", 129 + alignment: Center, 130 + ), 131 + ( 132 + prop: (kind: Property(Title), style: (fg: "${accent.hex}"), default: (kind: Text("Unknown"))), 133 + width: "50%", 134 + ), 135 + ], 136 + header: ( 137 + rows: [ 138 + ( 139 + left: [ 140 + (kind: Text("["), style: (fg: "${cat.teal.hex}", modifiers: "Bold")), 141 + (kind: Property(Status(State)), style: (fg: "${cat.teal.hex}", modifiers: "Bold")), 142 + (kind: Text("]"), style: (fg: "${cat.teal.hex}", modifiers: "Bold")) 143 + ], 144 + center: [ 145 + (kind: Property(Song(Artist)), style: (fg: "${cat.yellow.hex}", modifiers: "Bold"), 146 + default: (kind: Text("Unknown"), style: (fg: "${cat.yellow.hex}", modifiers: "Bold")) 147 + ), 148 + (kind: Text(" - ")), 149 + (kind: Property(Song(Title)), style: (fg: "${accent.hex}", modifiers: "Bold"), 150 + default: (kind: Text("No Song"), style: (fg: "${accent.hex}", modifiers: "Bold")) 151 + ) 152 + ], 153 + right: [ 154 + (kind: Text("Vol: "), style: (fg: "${cat.teal.hex}", modifiers: "Bold")), 155 + (kind: Property(Status(Volume)), style: (fg: "${cat.teal.hex}", modifiers: "Bold")), 156 + (kind: Text("% "), style: (fg: "${cat.teal.hex}", modifiers: "Bold")) 157 + ] 158 + ) 159 + ], 160 + ), 161 + ) 162 + ''; 163 + configFile = '' 164 + #![enable(implicit_some)] 165 + #![enable(unwrap_newtypes)] 166 + #![enable(unwrap_variant_newtypes)] 167 + ( 168 + address: "127.0.0.1:6600", 169 + password: None, 170 + theme: ${ 171 + if config.cow.cat.enable 172 + then ''Some("catppuccin")'' 173 + else "None" 174 + }, 175 + cache_dir: None, 176 + lyrics_dir: "${config.services.mpd.musicDirectory}", 177 + on_song_change: None, 178 + volume_step: 5, 179 + max_fps: 30, 180 + scrolloff: 0, 181 + wrap_navigation: true, 182 + enable_mouse: true, 183 + enable_config_hot_reload: true, 184 + status_update_interval_ms: 1000, 185 + rewind_to_start_sec: None, 186 + reflect_changes_to_playlist: false, 187 + select_current_song_on_change: false, 188 + browser_song_sort: [Disc, Track, Artist, Title], 189 + directories_sort: SortFormat(group_by_type: true, reverse: false), 190 + album_art: ( 191 + method: Auto, 192 + max_size_px: (width: 1200, height: 1200), 193 + disabled_protocols: ["http://", "https://"], 194 + vertical_align: Center, 195 + horizontal_align: Center, 196 + ), 197 + cava: ( 198 + framerate: 60, // default 60 199 + autosens: true, // default true 200 + sensitivity: 100, // default 100 201 + lower_cutoff_freq: 50, // not passed to cava if not provided 202 + higher_cutoff_freq: 10000, // not passed to cava if not provided 203 + input: ( 204 + method: Fifo, 205 + source: "/tmp/mpd.fifo", 206 + sample_rate: 44100, 207 + channels: 2, 208 + sample_bits: 16, 209 + ), 210 + smoothing: ( 211 + noise_reduction: 77, // default 77 212 + monstercat: false, // default false 213 + waves: false, // default false 214 + ), 215 + eq: [] 216 + ), 217 + keybinds: ( 218 + global: { 219 + ":": CommandMode, 220 + ",": VolumeDown, 221 + "s": Stop, 222 + ".": VolumeUp, 223 + "<Tab>": NextTab, 224 + "<S-Tab>": PreviousTab, 225 + "1": SwitchToTab("Queue"), 226 + "2": SwitchToTab("Directories"), 227 + "3": SwitchToTab("Search"), 228 + "q": Quit, 229 + ">": NextTrack, 230 + "p": TogglePause, 231 + "<": PreviousTrack, 232 + "f": SeekForward, 233 + "z": ToggleRepeat, 234 + "x": ToggleRandom, 235 + "c": ToggleConsume, 236 + "v": ToggleSingle, 237 + "b": SeekBack, 238 + "~": ShowHelp, 239 + "u": Update, 240 + "U": Rescan, 241 + "I": ShowCurrentSongInfo, 242 + "O": ShowOutputs, 243 + "P": ShowDecoders, 244 + "R": AddRandom, 245 + }, 246 + navigation: { 247 + "k": Up, 248 + "j": Down, 249 + "h": Left, 250 + "l": Right, 251 + "<Up>": Up, 252 + "<Down>": Down, 253 + "<Left>": Left, 254 + "<Right>": Right, 255 + "<C-k>": PaneUp, 256 + "<C-j>": PaneDown, 257 + "<C-h>": PaneLeft, 258 + "<C-l>": PaneRight, 259 + "<C-u>": UpHalf, 260 + "N": PreviousResult, 261 + "a": Add, 262 + "A": AddAll, 263 + "r": Rename, 264 + "n": NextResult, 265 + "g": Top, 266 + "<Space>": Select, 267 + "<C-Space>": InvertSelection, 268 + "G": Bottom, 269 + "<CR>": Confirm, 270 + "i": FocusInput, 271 + "J": MoveDown, 272 + "<C-d>": DownHalf, 273 + "/": EnterSearch, 274 + "<C-c>": Close, 275 + "<Esc>": Close, 276 + "K": MoveUp, 277 + "D": Delete, 278 + "B": ShowInfo, 279 + }, 280 + queue: { 281 + "D": DeleteAll, 282 + "<CR>": Play, 283 + "<C-s>": Save, 284 + "a": AddToPlaylist, 285 + "d": Delete, 286 + "C": JumpToCurrent, 287 + "X": Shuffle, 288 + }, 289 + ), 290 + search: ( 291 + case_sensitive: false, 292 + mode: Contains, 293 + tags: [ 294 + (value: "any", label: "Any Tag"), 295 + (value: "artist", label: "Artist"), 296 + (value: "album", label: "Album"), 297 + (value: "albumartist", label: "Album Artist"), 298 + (value: "title", label: "Title"), 299 + (value: "filename", label: "Filename"), 300 + (value: "genre", label: "Genre"), 301 + ], 302 + ), 303 + artists: ( 304 + album_display_mode: SplitByDate, 305 + album_sort_by: Date, 306 + ), 307 + tabs: [ 308 + ( 309 + name: "Queue", 310 + pane: Split( 311 + direction: Horizontal, 312 + panes: [ 313 + (size: "60%", pane: Split( 314 + direction: Vertical, 315 + panes: [ 316 + (size: "50%", pane: Pane(Queue)), 317 + (size: "50%", borders: "TOP", pane: Pane(Cava)), 318 + ], 319 + )), 320 + (size: "40%", borders: "LEFT", pane: Split( 321 + direction: Vertical, 322 + panes: [ 323 + (size: "70%", pane: Pane(AlbumArt)), 324 + (size: "30%", borders: "TOP", pane: Pane(Lyrics)), 325 + ], 326 + )), 327 + ], 328 + ), 329 + ), 330 + ( 331 + name: "Directories", 332 + pane: Pane(Directories), 333 + ), 334 + ( 335 + name: "Search", 336 + pane: Pane(Search), 337 + ), 338 + ], 339 + ) 340 + ''; 341 + in { 342 + programs.cava = { 343 + enable = true; 344 + }; 345 + 346 + xdg.configFile = lib.mkIf config.cow.cat.enable { 347 + "rmpc/themes/catppuccin.ron".text = themeFile; 348 + }; 349 + 350 + programs.rmpc = { 351 + enable = true; 352 + config = configFile; 353 + }; 354 + 355 + xdg.dataFile = lib.mkIf config.cow.gdi.enable { 356 + "applications/rmpc.desktop".text = '' 357 + [Desktop Entry] 358 + Type=Application 359 + Name=Music Player 360 + Exec=wezterm start --class="rmpc" rmpc 361 + Icon=playmymusic 362 + ''; 363 + }; 364 + 365 + services = { 366 + mpd = { 367 + enable = true; 368 + extraConfig = '' 369 + audio_output { 370 + type "fifo" 371 + name "mpd_fifo" 372 + path "/tmp/mpd.fifo" 373 + format "44100:16:2" 374 + } 375 + audio_output { 376 + type "pipewire" 377 + name "Pipewire" 378 + } 379 + ''; 380 + }; 381 + mpdris2.enable = true; 382 + }; 383 + } 384 + ); 385 + }
+76
homeModules/nushell.nix
··· 1 + {...}: { 2 + config, 3 + pkgs, 4 + lib, 5 + ... 6 + }: { 7 + options.cow.nushell = { 8 + enable = lib.mkEnableOption "Nushell + Customizations"; 9 + commandNotFound = lib.mkEnableOption "Custom Nix Command Not Found for Nushell"; 10 + completers = { 11 + carapace = 12 + (lib.mkEnableOption "Carapace Completer In Nushell") 13 + // { 14 + default = true; 15 + }; 16 + }; 17 + }; 18 + 19 + config = let 20 + conf = config.cow.nushell; 21 + in 22 + lib.mkIf conf.enable { 23 + cow.imperm.keep = [".local/share/zoxide"]; 24 + cow.imperm.keepFiles = [".config/nushell/history.txt"]; 25 + 26 + programs = { 27 + zoxide.enable = true; 28 + command-not-found.enable = !conf.commandNotFound; 29 + nushell = let 30 + carapaceComplete = builtins.replaceStrings ["__carapace__"] ["${pkgs.carapace}/bin/carapace"] ( 31 + lib.fileContents ../res/nushellCompletions/carapace.nu 32 + ); 33 + cnf = lib.fileContents ../res/command_not_found.nu; 34 + nu_config = let 35 + doCompletions = builtins.any (x: x) (builtins.attrValues conf.completers); 36 + in '' 37 + { 38 + show_banner: false, 39 + completions: { 40 + external: { 41 + enable: ${builtins.toJSON doCompletions} 42 + completer: ${ 43 + if doCompletions 44 + then carapaceComplete 45 + else ''{|spans| []}'' 46 + } 47 + }, 48 + }, 49 + hooks: { 50 + ${lib.optionalString conf.commandNotFound '' 51 + command_not_found: ${cnf} 52 + ''} 53 + } 54 + } 55 + ''; 56 + init-starship = pkgs.runCommand "starship-init" {} '' 57 + ${pkgs.starship}/bin/starship init nu > $out 58 + ''; 59 + in { 60 + enable = true; 61 + configFile.text = '' 62 + $env.config = ${nu_config} 63 + 64 + ${lib.optionalString config.cow.starship.enable '' 65 + source ${init-starship} 66 + ''} 67 + ''; 68 + shellAliases = { 69 + "cd" = "z"; 70 + "py" = "python"; 71 + "🥺" = "sudo"; 72 + }; 73 + }; 74 + }; 75 + }; 76 + }
+21
homeModules/pictures.nix
··· 1 + {...}: { 2 + config, 3 + lib, 4 + ... 5 + }: { 6 + options.cow.pictures = { 7 + enable = lib.mkEnableOption "Enable setting profile picture"; 8 + pfp = lib.mkOption { 9 + type = lib.types.path; 10 + description = "Path to Profile Picture File (PNG, 1:1 Aspect)"; 11 + }; 12 + bg = lib.mkOption { 13 + type = lib.types.path; 14 + description = "Path to the background image to use"; 15 + }; 16 + }; 17 + 18 + config = lib.mkIf config.cow.pictures.enable { 19 + home.file.".face".source = config.cow.pictures.pfp; 20 + }; 21 + }
+380
homeModules/qmplay2.nix
··· 1 + {...}: { 2 + config, 3 + lib, 4 + pkgs, 5 + ... 6 + }: { 7 + options.cow.qmplay2.enable = lib.mkEnableOption "QMPlay2 + customizations and yt-dlp"; 8 + 9 + config = let 10 + mkQMPlayFile = lib.generators.toINI {}; 11 + mkConfigDir = files: 12 + lib.mapAttrs' ( 13 + name: value: lib.nameValuePair ("QMPlay2/" + name + ".ini") {text = mkQMPlayFile value;} 14 + ) 15 + files; 16 + in 17 + lib.mkIf config.cow.qmplay2.enable { 18 + home.packages = with pkgs; [ 19 + qmplay2 20 + ]; 21 + 22 + xdg.configFile = mkConfigDir { 23 + ALSA.General = { 24 + AutoFindMultichnDev = true; 25 + Delay = 0.1; 26 + OutputDevice = "default"; 27 + WriterEnabled = true; 28 + }; 29 + AudioCD.AudioCD = { 30 + CDDB = true; 31 + CDTEXT = true; 32 + }; 33 + AudioFilters = { 34 + General = { 35 + AVAudioFilter = false; 36 + BS2B = false; 37 + Compressor = false; 38 + Echo = false; 39 + Equalizer = false; 40 + PhaseReverse = false; 41 + SwapStereo = false; 42 + VoiceRemoval = false; 43 + }; 44 + 45 + AVAudioFilter.Filters = "@ByteArray()"; 46 + 47 + BS2B = { 48 + Fcut = 700; 49 + Feed = 4.5; 50 + }; 51 + 52 + Compressor = { 53 + FastGainCompressionRatio = 0.9; 54 + OverallCompressionRatio = 0.6; 55 + PeakPercent = 90; 56 + ReleaseTime = 0.2; 57 + }; 58 + 59 + Echo = { 60 + Delay = 500; 61 + Feedback = 50; 62 + Surround = false; 63 + Volume = 50; 64 + }; 65 + 66 + Equalizer = { 67 + "-1" = 50; 68 + "0" = 50; 69 + "1" = 50; 70 + "2" = 50; 71 + "3" = 50; 72 + "4" = 50; 73 + "5" = 50; 74 + "6" = 50; 75 + "7" = 50; 76 + count = 8; 77 + maxFreq = 18000; 78 + minFreq = 200; 79 + nbits = 10; 80 + }; 81 + 82 + PhaseReverse = { 83 + ReverseRight = false; 84 + }; 85 + }; 86 + CUVID.General = { 87 + DecodeMPEG4 = true; 88 + DeintMethod = 2; 89 + Enabled = true; 90 + }; 91 + Chiptune.General = { 92 + DefaultLength = 180; 93 + GME = true; 94 + SIDPlay = true; 95 + }; 96 + Extensions = { 97 + LastFM = { 98 + AllowBigCovers = true; 99 + DownloadCovers = true; 100 + Login = null; 101 + Password = null; 102 + UpdateNowPlayingAndScrobble = false; 103 + }; 104 + 105 + MPRIS2.Enabled = true; 106 + 107 + YouTube = { 108 + ShowUserName = false; 109 + SortBy = 0; 110 + Subtitles = true; 111 + }; 112 + }; 113 + FFmpeg.General = { 114 + AllowExperimental = true; 115 + DecoderEnabled = true; 116 + DecoderVAAPIEnabled = true; 117 + DecoderVkVideoEnabled = true; 118 + DemuxerEnabled = true; 119 + ForceSkipFrames = false; 120 + HurryUP = true; 121 + LowresValue = 0; 122 + ReconnectNetwork = true; 123 + SkipFrames = true; 124 + TeletextPage = 0; 125 + TeletextTransparent = false; 126 + ThreadTypeSlice = false; 127 + Threads = 0; 128 + VAAPIDeintMethod = 1; 129 + }; 130 + Modplug.General = { 131 + ModplugEnabled = true; 132 + ModplugResamplingMethod = 3; 133 + }; 134 + Notify.General = { 135 + CustomBody = null; 136 + CustomMsg = false; 137 + CustomSummary = null; 138 + Enabled = false; 139 + ShowPlayState = true; 140 + ShowTitle = true; 141 + ShowVolume = true; 142 + Timeout = 5000; 143 + }; 144 + Playlists.General = { 145 + M3U_enabled = true; 146 + XSPF_enabled = true; 147 + }; 148 + PulseAudio.General = { 149 + Delay = 0.1; 150 + WriterEnabled = true; 151 + }; 152 + QMPlay2 = { 153 + General = { 154 + AVBufferLocal = 100; 155 + AVBufferTimeNetwork = 500; 156 + AVBufferTimeNetworkLive = 5; 157 + AccurateSeek = 2; 158 + AllowOnlyOneInstance = false; 159 + AudioLanguage = null; 160 + AutoDelNonGroupEntries = false; 161 + AutoOpenVideoWindow = true; 162 + AutoRestoreMainWindowOnVideo = true; 163 + AutoUpdates = false; 164 + BackwardBuffer = 1; 165 + BlurCovers = true; 166 + Channels = 2; 167 + DisableSubtitlesAtStartup = false; 168 + DisplayOnlyFileName = false; 169 + EnlargeCovers = false; 170 + FallbackSubtitlesEncoding = "@ByteArray(UTF-8)"; 171 + ForceChannels = 0; 172 + ForceSamplerate = false; 173 + HideArtistMetadata = false; 174 + IconsFromTheme = true; 175 + IgnorePlaybackError = false; 176 + KeepARatio = false; 177 + KeepSpeed = false; 178 + KeepSubtitlesDelay = false; 179 + KeepSubtitlesScale = false; 180 + KeepVideoDelay = false; 181 + KeepZoom = false; 182 + LastQMPlay2Path = "${pkgs.qmplay2}/bin"; 183 + LeftMouseTogglePlay = 0; 184 + LongSeek = 30; 185 + MaxVol = 100; 186 + MiddleMouseToggleFullscreen = false; 187 + Mute = false; 188 + NoCoversCache = false; 189 + OutputFilePath = "/home/bean/Downloads"; 190 + PlayIfBuffered = 1.75; 191 + Renderer = "opengl"; 192 + RepeatMode = 0; 193 + ResamplerFirst = true; 194 + RestoreAVSState = false; 195 + RestoreRepeatMode = false; 196 + RestoreVideoEqualizer = false; 197 + Samplerate = 48000; 198 + SavePos = false; 199 + ShortSeek = 5; 200 + ShowBufferedTimeOnSlider = true; 201 + ShowCovers = true; 202 + ShowDirCovers = true; 203 + Silence = true; 204 + SkipPlaylistsWithinFiles = true; 205 + SkipYtDlpUpdate = false; 206 + StillImages = false; 207 + StoreARatioAndZoom = false; 208 + StoreUrlPos = true; 209 + Style = "kvantum"; 210 + SubtitlesLanguage = null; 211 + SyncVtoA = true; 212 + TrayNotifiesDefault = false; 213 + TrayVisible = true; 214 + UnpauseWhenSeeking = false; 215 + UpdateVersion = pkgs.qmplay2.version; 216 + Version = "@ByteArray(${pkgs.qmplay2.version})"; 217 + VideoFilters = "0FPS Doubler"; 218 + VolumeL = 100; 219 + VolumeR = 100; 220 + WheelAction = true; 221 + WheelSeek = true; 222 + screenshotFormat = ".png"; 223 + screenshotPth = "/home/bean/Pictures/Screenshots"; 224 + }; 225 + 226 + ApplyToASS = { 227 + ApplyToASS = false; 228 + ColorsAndBorders = true; 229 + FontsAndSpacing = false; 230 + MarginsAndAlignment = false; 231 + }; 232 + 233 + Deinterlace = { 234 + Auto = true; 235 + AutoParity = true; 236 + Doubler = true; 237 + ON = true; 238 + SoftwareMethod = ''Yadif 2x''; 239 + TFF = false; 240 + }; 241 + 242 + MainWidget = { 243 + AlwaysOnTop = false; 244 + CompactViewDockWidgetState = ''@ByteArray()''; 245 + DockWidgetState = ''@ByteArray()''; 246 + FullScreenDockWidgetState = ''@ByteArray()''; 247 + Geometry = ''@Rect(226 151 1805 1203)''; 248 + IsCompactView = false; 249 + KeepDocksSize = false; 250 + TabPositionNorth = false; 251 + WidgetsLocked = true; 252 + isMaximized = true; 253 + isVisible = true; 254 + }; 255 + 256 + OSD = { 257 + Alignment = 4; 258 + Background = false; 259 + BackgroundColor = ''@Variant(\0\0\0\x43\x1\x88\x88\0\0\0\0\0\0\0\0)''; 260 + Bold = false; 261 + Enabled = true; 262 + FontName = "Sans Serif"; 263 + FontSize = 32; 264 + LeftMargin = 0; 265 + Outline = 1.5; 266 + OutlineColor = ''@Variant(\0\0\0\x43\x1\xff\xff\0\0\0\0\0\0\0\0)''; 267 + RightMargin = 0; 268 + Shadow = 1.5; 269 + ShadowColor = ''@Variant(\0\0\0\x43\x1\xff\xff\0\0\0\0\0\0\0\0)''; 270 + Spacing = 0; 271 + TextColor = ''@Variant(\0\0\0\x43\x1\xff\xff\xaa\xaa\xff\xffUU\0\0)''; 272 + VMargin = 0; 273 + }; 274 + 275 + OpenGL = { 276 + BypassCompositor = false; 277 + OnWindow = false; 278 + VSync = true; 279 + }; 280 + 281 + Proxy = { 282 + Host = null; 283 + Login = false; 284 + Password = ''@ByteArray()''; 285 + Port = 80; 286 + Use = false; 287 + User = null; 288 + }; 289 + 290 + ReplayGain = { 291 + Album = false; 292 + Enabled = false; 293 + Preamp = 0; 294 + PreventClipping = true; 295 + }; 296 + 297 + SettingsWidget.Geometry = ''@Rect(395 263 2212 1308)''; 298 + 299 + Subtitles = { 300 + Alignment = 7; 301 + Background = true; 302 + BackgroundColor = ''@Variant(\0\0\0\x43\x1\x88\x88\0\0\0\0\0\0\0\0)''; 303 + Bold = false; 304 + FontName = "monospace"; 305 + FontSize = 24; 306 + LeftMargin = 15; 307 + Outline = 1; 308 + OutlineColor = ''@Variant(\0\0\0\x43\x1\xff\xff\0\0\0\0\0\0\0\0)''; 309 + RightMargin = 15; 310 + Shadow = 0.5; 311 + ShadowColor = ''@Variant(\0\0\0\x43\x1\xff\xff\0\0\0\0\0\0\0\0)''; 312 + Spacing = 2; 313 + TextColor = ''@Variant(\0\0\0\x43\x1\xff\xff\xff\xff\xff\xff\xff\xff\0\0)''; 314 + VMargin = 15; 315 + }; 316 + 317 + VideoAdjustment = { 318 + Brightness = 0; 319 + Contrast = 0; 320 + Hue = 0; 321 + Negative = 0; 322 + Saturation = 0; 323 + Sharpness = 0; 324 + }; 325 + 326 + Vulkan = { 327 + AlwaysGPUDeint = true; 328 + BypassCompositor = true; 329 + Device = "@ByteArray()"; 330 + ForceVulkanYadif = false; 331 + HDR = false; 332 + HQScaleDown = false; 333 + HQScaleUp = false; 334 + VSync = 1; 335 + YadifSpatialCheck = true; 336 + }; 337 + 338 + YtDl = { 339 + CookiesFromBrowser = null; 340 + CookiesFromBrowserEnabled = false; 341 + CustomPath = "${pkgs.yt-dlp}/bin/yt-dlp"; 342 + CustomPathEnabled = true; 343 + DefaultQuality = null; 344 + DefaultQualityEnabled = false; 345 + DontAutoUpdate = true; 346 + }; 347 + }; 348 + QPainterSW.General.Enabled = true; 349 + Subtitles.General = { 350 + Classic_enabled = true; 351 + SRT_enabled = true; 352 + Sub_max_s = 5; 353 + Use_mDVD_FPS = true; 354 + }; 355 + VideoFilters.FPSDoubler = { 356 + MaxFPS = 29.99; 357 + MinFPS = 21; 358 + OnlyFullScreen = true; 359 + }; 360 + Visualizations = { 361 + General = { 362 + RefreshTime = 17; 363 + }; 364 + 365 + FFTSpectrum = { 366 + LimitFreq = 20000; 367 + Size = 8; 368 + }; 369 + 370 + SimpleVis = { 371 + SoundLength = 17; 372 + }; 373 + }; 374 + XVideo.General = { 375 + Enabled = false; 376 + UseSHM = false; 377 + }; 378 + }; 379 + }; 380 + }
+132
homeModules/starship.nix
··· 1 + {...}: { 2 + config, 3 + lib, 4 + ... 5 + }: { 6 + options.cow.starship.enable = lib.mkEnableOption "Starship + Customizations"; 7 + 8 + config = lib.mkIf config.cow.starship.enable { 9 + programs.starship = { 10 + enable = true; 11 + settings = { 12 + add_newline = false; 13 + character = { 14 + disabled = false; 15 + error_symbol = "[󰀨](bold red bg:crust)"; 16 + format = "[ $symbol ](bg:crust)"; 17 + success_symbol = "[󰗠](bold green bg:crust)"; 18 + }; 19 + cmd_duration = { 20 + disabled = false; 21 + format = "[ 󱎫 $duration ]($style)"; 22 + min_time = 2000; 23 + style = "bg:crust blue"; 24 + }; 25 + directory = { 26 + format = "[ ($read_only )$path ]($style)"; 27 + home_symbol = "󰋜"; 28 + read_only = "󰌾"; 29 + style = "bold green bg:crust"; 30 + truncate_to_repo = true; 31 + truncation_length = 10; 32 + }; 33 + format = "[░▒▓](crust)[ $os$hostname[](bg:crust #999999)$shell$username[](bg:crust #999999)$directory([](bg:crust #999999)$git_branch$git_commit$git_state)([](bg:crust #999999)$nodejs$python$rust$nix_shell)](bg:crust)[ ](crust)"; 34 + git_branch = { 35 + format = "[ $symbol ($branch )]($style)"; 36 + style = "bg:crust green"; 37 + symbol = "󰘬"; 38 + }; 39 + git_state = { 40 + format = "\\([$state( $progress_current/$progress_total)]($style)\\)"; 41 + merge = "󰘭"; 42 + rebase = "󱗬"; 43 + revert = "󰕍"; 44 + style = "bg:crust green yellow"; 45 + }; 46 + git_status = { 47 + conflicted = "󰀦"; 48 + format = "[$all_status $ahead_behind ]($style)"; 49 + modified = "󰏫"; 50 + style = "bg:crust green"; 51 + }; 52 + hostname = { 53 + format = "[$hostname( $ssh_symbol) ]($style)"; 54 + ssh_only = false; 55 + ssh_symbol = ""; 56 + style = "bold blue bg:crust"; 57 + }; 58 + line_break = { 59 + disabled = true; 60 + }; 61 + nix_shell = { 62 + format = "[ $state ](bold blue bg:crust) "; 63 + impure_msg = "[󱄅 impure](bold red bg:crust)"; 64 + pure_msg = "[󱄅](bold green bg:crust)"; 65 + style = "bg:crust green"; 66 + unknown_msg = "[󱄅 unknown](bold yellow bg:crust)"; 67 + }; 68 + nodejs = { 69 + format = "[ $symbol ($version) ]($style)"; 70 + not_capable_style = "bg:crust green bold red"; 71 + style = "bg:crust green"; 72 + symbol = "󰎙"; 73 + }; 74 + os = { 75 + disabled = false; 76 + format = "[$symbol ]($style)"; 77 + style = "bg:crust bold lightcrust"; 78 + symbols = { 79 + Android = ""; 80 + Debian = ""; 81 + Linux = ""; 82 + Macos = ""; 83 + Manjaro = ""; 84 + NixOS = "󱄅"; 85 + Raspbian = ""; 86 + Ubuntu = ""; 87 + Windows = ""; 88 + }; 89 + }; 90 + python = { 91 + format = "[ $symbol ($version) ]($style)"; 92 + style = "bg:crust green"; 93 + symbol = "󰌠"; 94 + }; 95 + right_format = "[ ](crust)\n($character$status[](bg:crust #999999))\n($cmd_duration[](bg:crust #999999))$time[▓▒░](crust)\n"; 96 + rust = { 97 + format = "[ $symbol ($version) ]($style)"; 98 + style = "bg:crust green"; 99 + symbol = "󱘗"; 100 + }; 101 + shell = { 102 + bash_indicator = "󱆃"; 103 + disabled = false; 104 + fish_indicator = "󰈺"; 105 + format = "[ $indicator ]($style)"; 106 + nu_indicator = "󰨊"; 107 + powershell_indicator = "󰨊"; 108 + style = "bg:crust blue"; 109 + unknown_indicator = "󰋗"; 110 + }; 111 + status = { 112 + disabled = false; 113 + format = "[$status ]($style)"; 114 + style = "bg:crust red"; 115 + }; 116 + time = { 117 + disabled = false; 118 + format = "[ $time ]($style)"; 119 + style = "bg:crust bold blue"; 120 + time_format = "%a %b %d %I:%M %p 󰥔"; 121 + use_12hr = true; 122 + }; 123 + username = { 124 + format = "[$user ]($style)"; 125 + show_always = true; 126 + style_root = "bold red bg:crust"; 127 + style_user = "blue bg:crust"; 128 + }; 129 + }; 130 + }; 131 + }; 132 + }
+25
homeModules/sync.nix
··· 1 + {...}: { 2 + config, 3 + lib, 4 + ... 5 + }: { 6 + options.cow.sync.enable = lib.mkEnableOption "syncing via SyncThing"; 7 + 8 + config = lib.mkIf config.cow.sync.enable { 9 + cow.imperm.keepCache = [".local/state/syncthing"]; 10 + 11 + cow.firewall = { 12 + tcp = [22000]; 13 + udp = [21027 22000]; 14 + }; 15 + 16 + services.syncthing = { 17 + enable = true; 18 + 19 + overrideFolders = false; 20 + overrideDevices = false; 21 + 22 + settings.options.urAccepted = -1; 23 + }; 24 + }; 25 + }
+83
homeModules/user-bean.nix
··· 1 + {...}: { 2 + pkgs, 3 + lib, 4 + config, 5 + ... 6 + }: { 7 + options.cow.bean = { 8 + enable = lib.mkEnableOption "Bean user presets"; 9 + pubkey = lib.mkOption { 10 + type = lib.types.nullOr lib.types.str; 11 + description = "Public key to accept for bean"; 12 + default = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIKsVzdJra+x5aEuwTjL1FBOiMh9bftvs8QwsM1xyEbdd"; 13 + }; 14 + }; 15 + 16 + config = lib.mkIf config.cow.bean.enable { 17 + # My Personal config using most of my HM modules 18 + 19 + home = { 20 + file.".ssh/authorized_keys".text = lib.mkIf (config.cow.bean.pubkey != null) '' 21 + ${config.cow.bean.pubkey} bean 22 + ''; 23 + username = lib.mkDefault "bean"; 24 + homeDirectory = lib.mkDefault "/home/bean"; 25 + }; 26 + 27 + programs.git = { 28 + signing = lib.mkIf (config.cow.bean.pubkey != null) { 29 + format = "ssh"; 30 + signByDefault = true; 31 + }; 32 + settings = { 33 + user = { 34 + email = "bwc9876@gmail.com"; 35 + name = "Ben C"; 36 + signingKey = lib.mkIf (config.cow.bean.pubkey != null) config.cow.bean.pubkey; 37 + }; 38 + }; 39 + }; 40 + 41 + home.packages = with pkgs; [ 42 + libreoffice-qt6 43 + obs-studio 44 + loupe 45 + inkscape 46 + lorien 47 + zoom-us 48 + tuxpaint 49 + ]; 50 + 51 + home.sessionVariables = { 52 + "EDITOR" = "nvim"; 53 + }; 54 + 55 + cow = { 56 + libraries.enable = true; 57 + imperm.keepLibraries = true; 58 + pictures = { 59 + enable = true; 60 + pfp = ../res/pictures/cow.png; 61 + bg = ../res/pictures/background.png; 62 + }; 63 + nushell = { 64 + enable = true; 65 + commandNotFound = true; 66 + }; 67 + neovim.enable = true; 68 + htop.enable = true; 69 + starship.enable = true; 70 + yazi.enable = true; 71 + dev.enable = true; 72 + comma.enable = true; 73 + cat.enable = true; 74 + 75 + firefox.enable = config.cow.gdi.enable; 76 + waybar.enable = config.cow.gdi.enable; 77 + keepassxc = { 78 + enable = config.cow.gdi.enable; 79 + dbPath = lib.mkDefault "${config.xdg.userDirs.documents}/Keepass/DB/Database.kdbx"; 80 + }; 81 + }; 82 + }; 83 + }
+63
homeModules/utils.nix
··· 1 + {...}: { 2 + config, 3 + lib, 4 + pkgs, 5 + ... 6 + }: { 7 + options.cow.utils.enable = 8 + (lib.mkEnableOption "Handy utilities to have") 9 + // { 10 + default = true; 11 + }; 12 + 13 + config = lib.mkIf config.cow.utils.enable { 14 + home.packages = with pkgs; 15 + [ 16 + binutils 17 + usbutils 18 + qrencode 19 + nmap 20 + file 21 + procfd 22 + dust 23 + zip 24 + inputs.gh-grader-preview.packages.${pkgs.system}.default 25 + wol 26 + libqalculate 27 + p7zip 28 + poop 29 + file 30 + screen 31 + util-linux 32 + inetutils 33 + just 34 + man-pages 35 + htop 36 + dig 37 + doggo 38 + 39 + hyfetch 40 + fastfetch 41 + ] 42 + ++ lib.optional config.cow.gdi.enable wev; 43 + 44 + programs.hyfetch = { 45 + enable = true; 46 + settings = { 47 + backend = "fastfetch"; 48 + color_align = { 49 + custom_colors = []; 50 + fore_back = null; 51 + mode = "horizontal"; 52 + }; 53 + distro = null; 54 + light_dark = "dark"; 55 + lightness = 0.65; 56 + mode = "rgb"; 57 + preset = "interprogress"; 58 + pride_month_disable = false; 59 + pride_month_shown = []; 60 + }; 61 + }; 62 + }; 63 + }
+547
homeModules/waybar.nix
··· 1 + {inputs, ...}: { 2 + config, 3 + lib, 4 + pkgs, 5 + ... 6 + }: { 7 + options.cow.waybar.enable = lib.mkEnableOption "Waybar + customizations"; 8 + 9 + config = let 10 + catppuccinCss = pkgs.fetchurl { 11 + url = "https://github.com/catppuccin/waybar/raw/refs/heads/main/themes/mocha.css"; 12 + hash = "sha256-puMFl8zIKOiYhE6wzqnffXOHn/VnKmpVDzrMJMk+3Rc="; 13 + }; 14 + in 15 + lib.mkIf config.cow.waybar.enable { 16 + wayland.windowManager.hyprland.settings.bind = [ 17 + "SUPER,W,exec,systemctl restart --user waybar" 18 + "SUPER SHIFT,W,exec,systemctl stop --user waybar" 19 + ]; 20 + programs.waybar = { 21 + enable = true; 22 + systemd.enable = true; 23 + style = '' 24 + @import "${catppuccinCss}"; 25 + 26 + * { 27 + font-family: sans-serif; 28 + } 29 + 30 + window#waybar { 31 + background: rgba(49, 50, 68, 0.65); 32 + color: @text; 33 + } 34 + 35 + .modules-left > * > *, 36 + .modules-right > * > * { 37 + font-size: 1.5rem; 38 + background: @crust; 39 + border: 2px solid @base; 40 + border-radius: 5rem; 41 + padding: 5px 15px; 42 + margin: 5px 2px; 43 + } 44 + 45 + #bluetooth.disabled { 46 + border-color: @red; 47 + } 48 + 49 + #waybar .modules-left > *:first-child > * { 50 + margin-left: 25px; 51 + } 52 + 53 + #waybar .modules-right > *:last-child > * { 54 + margin-right: 25px; 55 + } 56 + 57 + #waybar .modules-left, 58 + #waybar .modules-right { 59 + margin-top: 10px; 60 + margin-bottom: 5px; 61 + } 62 + 63 + #waybar .modules-center { 64 + margin-top: 5px; 65 + margin-bottom: 5px; 66 + } 67 + 68 + #battery.warning { 69 + border-color: @yellow; 70 + } 71 + 72 + #battery.critical { 73 + border-color: @red; 74 + } 75 + 76 + * > #battery.charging { 77 + border-color: @green; 78 + } 79 + 80 + #taskbar, 81 + #workspaces { 82 + padding: 10px; 83 + border-radius: 5rem; 84 + border: none; 85 + background: none; 86 + } 87 + 88 + #taskbar button, 89 + #workspaces button { 90 + color: @text; 91 + border-radius: 5rem; 92 + padding: 5px 15px; 93 + margin: 0 5px; 94 + background: @crust; 95 + border: 2px solid @base; 96 + } 97 + 98 + #taskbar button:hover, #workspaces button:hover { 99 + background: @mantle; 100 + } 101 + 102 + #workspaces button { 103 + font-size: 1.5rem; 104 + } 105 + 106 + #cpu, 107 + #memory, 108 + #temperature { 109 + font-size: 1.5rem; 110 + padding: 10px 25px; 111 + } 112 + 113 + #cpu.warning, 114 + #memory.warning { 115 + border-color: @yellow; 116 + } 117 + 118 + #cpu.critical, 119 + #memory.critical, 120 + #temperature.critical { 121 + border-color: @red; 122 + } 123 + 124 + #workspaces button.active { 125 + border: 2px solid @sapphire; 126 + } 127 + 128 + #taskbar button.active { 129 + border: 2px solid @sapphire; 130 + } 131 + 132 + #idle_inhibitor.activated { 133 + border-color: @mauve; 134 + } 135 + 136 + #custom-notification.notification { 137 + border-color: @sapphire; 138 + } 139 + 140 + #custom-notification.dnd-none, 141 + #custom-notification.dnd-notification, 142 + #custom-notification.dnd-inhibited-none, 143 + #custom-notification.dnd-inhibited-notification { 144 + border-color: @red; 145 + } 146 + 147 + #custom-notification.inhibited-none, 148 + #custom-notification.inhibited-notification { 149 + border-color: @mauve; 150 + } 151 + 152 + #network.disconnected { 153 + border-color: @red; 154 + } 155 + 156 + #privacy { 157 + background: none; 158 + border: none; 159 + margin: 0; 160 + padding: 0; 161 + } 162 + 163 + #privacy-item { 164 + font-size: 1.5rem; 165 + border-radius: 5rem; 166 + padding: 5px 15px; 167 + margin: 5px 2px; 168 + border: 2px solid @red; 169 + background-color: @crust; 170 + } 171 + 172 + #custom-weather.VeryCloudy, 173 + #custom-weather.Cloudy, 174 + #custom-weather.Fog { 175 + border-color: @overlay0; 176 + } 177 + 178 + #custom-weather.HeavyRain, 179 + #custom-weather.ThunderyHeavyRain, 180 + #custom-weather.ThunderyRain, 181 + #custom-weather.ThunderyShowers, 182 + #custom-weather.HeavyShowers, 183 + #custom-weather.LightRain, 184 + #custom-weather.LightShowers { 185 + border-color: @blue; 186 + } 187 + 188 + #custom-weather.HeavySnow, 189 + #custom-weather.LightSnow, 190 + #custom-weather.Sleet, 191 + #custom-weather.Snow, 192 + #custom-weather.LightSnowShowers, 193 + #custom-weather.LightSleetShowers { 194 + border-color: @text; 195 + } 196 + 197 + #custom-weather.Clear, 198 + #custom-weather.Sunny { 199 + border-color: @yellow; 200 + } 201 + 202 + #custom-weather.PartlyCloudy { 203 + border-color: @flamingo; 204 + } 205 + 206 + #custom-weather.PartlyCloudy.night { 207 + border-color: @lavender; 208 + } 209 + 210 + #custom-weather.Clear.night, 211 + #custom-weather.Sunny.night { 212 + border-color: @mauve; 213 + } 214 + 215 + #custom-news.utd { 216 + font-size: 1.5rem; 217 + } 218 + 219 + #custom-news.unread { 220 + border-color: @sapphire; 221 + } 222 + 223 + #mpris { 224 + opacity: 0; 225 + } 226 + 227 + #mpris.paused { 228 + opacity: 1; 229 + } 230 + 231 + #mpris.playing { 232 + opacity: 1; 233 + border-color: @sapphire; 234 + } 235 + 236 + #mpris.playing.spotify { 237 + border-color: #33B980; 238 + } 239 + 240 + #mpris.paused.kdeconnect { 241 + opacity: 0; 242 + } 243 + ''; 244 + settings = [ 245 + { 246 + battery = { 247 + format = "{icon} {capacity}󰏰"; 248 + format-charging = "{icon} {capacity}󰏰"; 249 + format-icons = { 250 + charging = [ 251 + "󰢜" 252 + "󰂆" 253 + "󰂇" 254 + "󰂈" 255 + "󰢝" 256 + "󰂉" 257 + "󰢞" 258 + "󰂊" 259 + "󰂋" 260 + "󰂅" 261 + ]; 262 + default = [ 263 + "󰁺" 264 + "󰁻" 265 + "󰁼" 266 + "󰁽" 267 + "󰁾" 268 + "󰁿" 269 + "󰂀" 270 + "󰂁" 271 + "󰂂" 272 + "󰁹" 273 + ]; 274 + }; 275 + states = { 276 + critical = 15; 277 + warning = 30; 278 + }; 279 + }; 280 + bluetooth = { 281 + format = "󰂯"; 282 + format-connected = "󰂱"; 283 + format-connected-battery = "󰂱 {device_battery_percentage}󰏰"; 284 + format-disabled = "󰂲"; 285 + format-off = "󰂲"; 286 + on-click = "rofi-bluetooth"; 287 + on-click-right = "rfkill toggle bluetooth"; 288 + tooltip-format = "{controller_alias}\t{controller_address}\n\n{num_connections} connected"; 289 + tooltip-format-connected = "{controller_alias}\t{controller_address}\n\n{num_connections} connected\n\n{device_enumerate}"; 290 + tooltip-format-enumerate-connected = "{device_alias}\t{device_address}"; 291 + tooltip-format-enumerate-connected-battery = "{device_alias}\t{device_address}\t{device_battery_percentage}%"; 292 + }; 293 + "clock#1" = { 294 + actions = { 295 + on-click = "shift_up"; 296 + on-click-middle = "mode"; 297 + on-click-right = "shift_down"; 298 + }; 299 + calendar = { 300 + format = { 301 + days = "<span color='#ecc6d9'><b>{}</b></span>"; 302 + months = "<span color='#ffead3'><b>{}</b></span>"; 303 + today = "<span color='#ff6699'><b><u>{}</u></b></span>"; 304 + weekdays = "<span color='#ffcc66'><b>{}</b></span>"; 305 + weeks = "<span color='#99ffdd'><b>W{}</b></span>"; 306 + }; 307 + mode = "month"; 308 + mode-mon-col = 3; 309 + on-scroll = 1; 310 + weeks-pos = "right"; 311 + }; 312 + format = "󰃭 {:%A, %B %Od}"; 313 + tooltip-format = "<tt><small>{calendar}</small></tt>"; 314 + }; 315 + "clock#2" = { 316 + format = "󰥔 {:%I:%M %p}"; 317 + tooltip-format = "{:%F at %T in %Z (UTC%Ez)}"; 318 + }; 319 + "custom/kde-connect" = { 320 + exec = "${pkgs.nushell}/bin/nu --plugins ${inputs.nu_plugin_dbus.packages.${pkgs.system}.default} ${../res/custom_waybar_modules/kdeconnect.nu}"; 321 + format = "{}"; 322 + interval = 30; 323 + on-click = "kdeconnect-settings"; 324 + return-type = "json"; 325 + }; 326 + "custom/news" = { 327 + exec = "${pkgs.nushell}/bin/nu ${../res/custom_waybar_modules/newsboat.nu}"; 328 + exec-on-event = true; 329 + format = "{}"; 330 + on-click-right = "pkill waybar -SIGRTMIN+6"; 331 + restart-interval = 1800; 332 + return-type = "json"; 333 + signal = 6; 334 + }; 335 + "custom/notification" = { 336 + escape = true; 337 + exec = "swaync-client -swb"; 338 + exec-if = "which swaync-client"; 339 + format = "{icon}"; 340 + format-icons = { 341 + dnd-inhibited-none = "󰂛"; 342 + dnd-inhibited-notification = "󰂛<sup></sup>"; 343 + dnd-none = "󰂛"; 344 + dnd-notification = "󰂛<sup></sup>"; 345 + inhibited-none = "󰂠"; 346 + inhibited-notification = "󰂠<sup></sup>"; 347 + none = "󰂚"; 348 + notification = "󱅫"; 349 + }; 350 + max-length = 3; 351 + on-click = "sleep 0.2 && swaync-client -t -sw"; 352 + on-click-middle = "sleep 0.2 && swaync-client -C -sw"; 353 + on-click-right = "sleep 0.2 && swaync-client -d -sw"; 354 + return-type = "json"; 355 + tooltip = false; 356 + }; 357 + "custom/weather" = { 358 + exec = "${pkgs.nushell}/bin/nu ${../res/custom_waybar_modules/weather.nu}"; 359 + format = "{}"; 360 + interval = 600; 361 + on-click = "xdg-open https://duckduckgo.com/?q=weather"; 362 + return-type = "json"; 363 + }; 364 + idle_inhibitor = { 365 + format = "{icon}"; 366 + format-icons = { 367 + activated = "󰒳"; 368 + deactivated = "󰒲"; 369 + }; 370 + }; 371 + layer = "top"; 372 + modules-center = []; 373 + modules-left = 374 + [ 375 + "user" 376 + "clock#1" 377 + "clock#2" 378 + ] 379 + ++ lib.optional config.cow.news.enable "custom/news" 380 + ++ [ 381 + "custom/weather" 382 + "mpris" 383 + ]; 384 + modules-right = 385 + [ 386 + "network" 387 + "battery" 388 + "bluetooth" 389 + "pulseaudio" 390 + ] 391 + ++ lib.optional config.cow.kde-connect.enable "custom/kdeconnect" 392 + ++ lib.optional config.cow.gdi.doIdle "idle_inhibitor" 393 + ++ [ 394 + "custom/notification" 395 + "privacy" 396 + "tray" 397 + ]; 398 + mpris = { 399 + album-len = 20; 400 + artist-len = 25; 401 + interval = 1; 402 + dynamic-importance-order = [ 403 + "title" 404 + "position" 405 + "length" 406 + "artist" 407 + "album" 408 + ]; 409 + dynamic-len = 50; 410 + dynamic-order = [ 411 + "title" 412 + "artist" 413 + "album" 414 + "position" 415 + "length" 416 + ]; 417 + format = "{player_icon} {dynamic}"; 418 + format-paused = "{status_icon} {dynamic}"; 419 + player-icons = { 420 + QMPlay2 = "󰐌"; 421 + default = "󰎆"; 422 + firefox = ""; 423 + firefox-devedition = ""; 424 + chromium = "󰖟"; 425 + kdeconnect = ""; 426 + spotify = "󰓇"; 427 + }; 428 + status-icons = { 429 + paused = "󰏤"; 430 + stopped = "󰓛"; 431 + }; 432 + title-len = 35; 433 + }; 434 + network = { 435 + format = "{ifname}"; 436 + format-disconnected = "󰪎"; 437 + format-ethernet = "󱎔 {ifname}"; 438 + format-icons = [ 439 + "󰤟" 440 + "󰤢" 441 + "󰤥" 442 + "󰤨" 443 + ]; 444 + format-linked = "󰌷 {ifname}"; 445 + format-wifi = "{icon} {essid}"; 446 + tooltip-disconnected = "Disconnected"; 447 + tooltip-format = "{ifname} via {gwaddr}"; 448 + tooltip-format-ethernet = "󱎔 {ifname}"; 449 + tooltip-format-wifi = "Connected to {essid} ({signalStrength}󰏰 Strength) over {ifname} via {gwaddr}"; 450 + }; 451 + position = "top"; 452 + privacy = { 453 + icon-size = 20; 454 + icon-spacing = 4; 455 + modules = [ 456 + { 457 + tooltip = true; 458 + tooltip-icon-size = 24; 459 + type = "screenshare"; 460 + } 461 + { 462 + tooltip = true; 463 + tooltip-icon-size = 24; 464 + type = "audio-in"; 465 + } 466 + ]; 467 + transition-duration = 200; 468 + }; 469 + pulseaudio = { 470 + format = "{icon} {volume:2}󰏰"; 471 + format-bluetooth = "{icon} {volume}󰏰"; 472 + format-icons = { 473 + car = ""; 474 + default = [ 475 + "󰖀" 476 + "󰕾" 477 + ]; 478 + hands-free = "󰋋"; 479 + headphone = "󰋋"; 480 + headset = "󰋋"; 481 + phone = ""; 482 + portable = ""; 483 + }; 484 + format-muted = "󰝟"; 485 + on-click = "pamixer -t"; 486 + on-click-right = "pavucontrol"; 487 + scroll-step = 5; 488 + }; 489 + tray = { 490 + icon-size = 25; 491 + show-passive-items = true; 492 + spacing = 5; 493 + }; 494 + user = { 495 + format = " {user}"; 496 + icon = true; 497 + }; 498 + } 499 + { 500 + cpu = { 501 + format = "󰍛 {usage}󰏰"; 502 + states = { 503 + critical = 95; 504 + warning = 80; 505 + }; 506 + }; 507 + "hyprland/workspaces" = { 508 + disable-scroll = true; 509 + format = "{name}"; 510 + }; 511 + layer = "top"; 512 + memory = { 513 + format = " {}󰏰 ({used:0.1f}/{total:0.1f} GiB)"; 514 + states = { 515 + critical = 90; 516 + warning = 70; 517 + }; 518 + }; 519 + modules-center = ["wlr/taskbar"]; 520 + modules-left = ["hyprland/workspaces"]; 521 + modules-right = [ 522 + "temperature" 523 + "cpu" 524 + "memory" 525 + ]; 526 + position = "bottom"; 527 + temperature = { 528 + critical-threshold = 80; 529 + format = "{icon} {temperatureC} °C"; 530 + format-critical = "{icon}! {temperatureC} °C"; 531 + format-icons = [ 532 + "󱃃" 533 + "󰔏" 534 + "󱃂" 535 + ]; 536 + thermal-zone = 1; 537 + }; 538 + "wlr/taskbar" = { 539 + format = "{icon}"; 540 + icon-size = 35; 541 + on-click = "activate"; 542 + }; 543 + } 544 + ]; 545 + }; 546 + }; 547 + }
+145
homeModules/yazi.nix
··· 1 + {...}: { 2 + config, 3 + lib, 4 + pkgs, 5 + ... 6 + }: { 7 + options.cow.yazi.enable = lib.mkEnableOption "Yazi + Customizations"; 8 + 9 + config = lib.mkIf config.cow.yazi.enable { 10 + home.packages = with pkgs; [ 11 + yazi 12 + mediainfo 13 + exiftool 14 + ]; 15 + 16 + programs.yazi = { 17 + enable = true; 18 + enableBashIntegration = true; 19 + enableNushellIntegration = true; 20 + 21 + settings = { 22 + open.prepend_rules = [ 23 + { 24 + mime = "video/*"; 25 + use = "open"; 26 + } 27 + { 28 + mime = "audio/*"; 29 + use = "open"; 30 + } 31 + ]; 32 + }; 33 + 34 + keymap.mgr.prepend_keymap = [ 35 + { 36 + run = "plugin mount"; 37 + on = ["M"]; 38 + desc = "Disk Mounting"; 39 + } 40 + { 41 + run = "plugin chmod"; 42 + on = [ 43 + "c" 44 + "m" 45 + ]; 46 + desc = "Run Chmod On Selected"; 47 + } 48 + ]; 49 + 50 + plugins = { 51 + inherit 52 + (pkgs.yaziPlugins) 53 + ouch 54 + mount 55 + chmod 56 + bypass 57 + mediainfo 58 + wl-clipboard 59 + yatline 60 + yatline-catppuccin 61 + ; 62 + }; 63 + 64 + initLua = '' 65 + local catppuccin_theme = require("yatline-catppuccin"):setup("mocha") 66 + 67 + require("yatline"):setup({ 68 + theme = catppuccin_theme, 69 + section_separator = { open = "", close = "" }, 70 + part_separator = { open = "", close = "" }, 71 + inverse_separator = { open = "", close = "" }, 72 + 73 + tab_width = 20, 74 + tab_use_inverse = false, 75 + 76 + selected = { icon = "󰻭", fg = "yellow" }, 77 + copied = { icon = "", fg = "green" }, 78 + cut = { icon = "", fg = "red" }, 79 + 80 + total = { icon = "󰮍", fg = "yellow" }, 81 + succ = { icon = "", fg = "green" }, 82 + fail = { icon = "", fg = "red" }, 83 + found = { icon = "󰮕", fg = "blue" }, 84 + processed = { icon = "󰐍", fg = "green" }, 85 + 86 + show_background = true, 87 + 88 + display_header_line = true, 89 + display_status_line = true, 90 + 91 + component_positions = { "header", "tab", "status" }, 92 + 93 + header_line = { 94 + left = { 95 + section_a = { 96 + {type = "line", custom = false, name = "tabs", params = {"left"}}, 97 + }, 98 + section_b = { 99 + }, 100 + section_c = { 101 + } 102 + }, 103 + right = { 104 + section_a = { 105 + {type = "string", custom = false, name = "date", params = {"%A, %d %B %Y"}}, 106 + }, 107 + section_b = { 108 + {type = "string", custom = false, name = "date", params = {"%X"}}, 109 + }, 110 + section_c = { 111 + } 112 + } 113 + }, 114 + 115 + status_line = { 116 + left = { 117 + section_a = { 118 + {type = "string", custom = false, name = "tab_mode"}, 119 + }, 120 + section_b = { 121 + {type = "string", custom = false, name = "hovered_size"}, 122 + }, 123 + section_c = { 124 + {type = "string", custom = false, name = "hovered_path"}, 125 + {type = "coloreds", custom = false, name = "count"}, 126 + } 127 + }, 128 + right = { 129 + section_a = { 130 + {type = "string", custom = false, name = "cursor_position"}, 131 + }, 132 + section_b = { 133 + {type = "string", custom = false, name = "cursor_percentage"}, 134 + }, 135 + section_c = { 136 + {type = "string", custom = false, name = "hovered_file_extension", params = {true}}, 137 + {type = "coloreds", custom = false, name = "permissions"}, 138 + } 139 + } 140 + }, 141 + }) 142 + ''; 143 + }; 144 + }; 145 + }
+15 -5
justfile
··· 1 + GARGS := if env("SPOON_PATH", "") != "" {"--override-input spoon \"$SPOON_PATH\""} else { "" } 2 + 1 3 _default: 2 4 @{{ just_executable() }} --list --unsorted --justfile {{ justfile() }} 3 5 ··· 11 13 alias b := build 12 14 # b: build the configuration 13 15 build: 14 - nh os build . 16 + nh os build . {{ GARGS }} 15 17 16 18 [private] 17 19 alias bt := boot 18 20 # bt: make the configuration the boot default without activating it 19 21 boot: 20 - nh os boot . 22 + nh os boot . {{ GARGS }} 21 23 22 24 [private] 23 25 alias s := switch 24 26 # s: activate configuration & add to boot menu 25 27 switch: 26 - nh os switch --ask . 28 + nh os switch --ask . {{ GARGS }} 27 29 28 30 [private] 29 31 alias c := check 30 32 # c: run all checks for the current system 31 33 check *ARGS: 32 - nix flake check --show-trace {{ if env("SPOON_PATH", "") != "" {"--override-input spoon \"$SPOON_PATH\" --no-build"} else { "" } }} {{ ARGS }} --log-format internal-json -v |& nom --json 34 + nom build --show-trace ".#uberCheck.$(nix eval --impure --raw --expr 'builtins.currentSystem')" --keep-going {{ GARGS }} {{ ARGS }} 35 + 36 + [private] 37 + alias d := deploy 38 + # d: deploy the given host 39 + deploy ACTION="switch" HOST="black-mesa": 40 + NIX_SSHOPTS="-p 8069" nixos-rebuild {{ ACTION }} --flake .#{{ HOST }} --build-host {{ HOST }}.lan --target-host {{ HOST }}.lan --sudo --override-input spoon "git+https://codeberg.org/spoonbaker/mono?ref=devel" --refresh 33 41 34 42 [private] 35 43 alias f := format ··· 41 49 alias r := repl 42 50 # r: start a debugging repl 43 51 repl: 44 - nix repl .#repl 52 + nix repl {{ GARGS }} .#repl 45 53 46 54 [private] 47 55 alias gc := garbage-collect ··· 53 61 alias iso := generate-iso 54 62 generate-iso: 55 63 nom build .#nixosConfigurations.installer.config.system.build.isoImage 64 + 65 +
-13
lib.nix
··· 1 - { 2 - outputs, 3 - lib, 4 - ... 5 - }: let 6 - roleEnabled = selected: role: builtins.all (r: builtins.elem r selected) (lib.splitString "+" role); 7 - in { 8 - applyRoles = roleList: let 9 - filteredRoles = lib.filterAttrs (n: _v: roleEnabled roleList n) outputs.nixosModules; 10 - in { 11 - imports = builtins.attrValues filteredRoles; 12 - }; 13 - }
+68
nixosConfigurations/aperture.nix
··· 1 + { 2 + lib, 3 + inputs, 4 + outputs, 5 + ... 6 + }: { 7 + system = "x86_64-linux"; 8 + 9 + modules = 10 + (builtins.attrValues outputs.nixosModules) 11 + ++ [ 12 + inputs.nixos-hardware.nixosModules.framework-13th-gen-intel 13 + { 14 + home-manager.users.bean.home.stateVersion = "25.05"; 15 + system.stateVersion = "25.05"; 16 + networking.hostName = "aperture"; 17 + 18 + users.users = let 19 + secureRoot = "/nix/persist/secure"; 20 + in { 21 + bean.hashedPasswordFile = "${secureRoot}/hashed-passwd"; 22 + root.hashedPasswordFile = "${secureRoot}/hashed-passwd"; 23 + }; 24 + 25 + home-manager.users.bean.cow = { 26 + kde-connect = { 27 + enable = true; 28 + dev-name = "APERTURE"; 29 + }; 30 + }; 31 + 32 + cow = { 33 + bean.sudoer = true; 34 + lanzaboote.enable = true; 35 + hypervisor.enable = true; 36 + role-laptop = { 37 + enable = true; 38 + fingerPrintSensor = true; 39 + }; 40 + gaming.enable = true; 41 + imperm.enable = true; 42 + disks = { 43 + enable = true; 44 + swap = true; 45 + luks = true; 46 + }; 47 + }; 48 + 49 + boot.initrd.availableKernelModules = [ 50 + "xhci_pci" 51 + "thunderbolt" 52 + "nvme" 53 + "usb_storage" 54 + "sd_mod" 55 + ]; 56 + boot.initrd.kernelModules = []; 57 + boot.kernelModules = ["kvm-intel"]; 58 + boot.extraModulePackages = []; 59 + boot.binfmt.emulatedSystems = ["aarch64-linux"]; 60 + 61 + hardware.framework.enableKmod = false; 62 + 63 + powerManagement.cpuFreqGovernor = lib.mkDefault "powersave"; 64 + hardware.enableRedistributableFirmware = lib.mkDefault true; 65 + hardware.cpu.intel.updateMicrocode = true; 66 + } 67 + ]; 68 + }
+108
nixosConfigurations/black-mesa.nix
··· 1 + { 2 + inputs, 3 + outputs, 4 + ... 5 + }: { 6 + system = "x86_64-linux"; 7 + specialArgs.inputs = inputs // inputs.spoon.inputs // {inherit (inputs) self;}; 8 + 9 + modules = 10 + (builtins.attrValues outputs.nixosModules) 11 + ++ [ 12 + inputs.nixos-hardware.nixosModules.common-gpu-amd 13 + inputs.nixos-hardware.nixosModules.common-cpu-amd 14 + inputs.spoon.nixosModules.black-mesa 15 + { 16 + home-manager.users.bean.home.stateVersion = "25.05"; 17 + system.stateVersion = "25.05"; 18 + networking.hostName = "black-mesa"; 19 + 20 + powerManagement.cpuFreqGovernor = "performance"; 21 + 22 + boot.initrd.availableKernelModules = [ 23 + "nvme" 24 + "xhci_pci" 25 + "ahci" 26 + "usbhid" 27 + "usb_storage" 28 + "sd_mod" 29 + ]; 30 + boot.kernelModules = ["kvm-amd"]; 31 + boot.extraModulePackages = []; 32 + 33 + hardware.enableRedistributableFirmware = true; 34 + 35 + # Other disks handled by cow.disks 36 + fileSystems."/mnt/storage" = { 37 + device = "/dev/sda1"; 38 + fsType = "btrfs"; 39 + }; 40 + 41 + users.users = let 42 + secureRoot = "/nix/persist/secure"; 43 + in { 44 + bean.hashedPasswordFile = "${secureRoot}/hashed-passwd"; 45 + root.hashedPasswordFile = "${secureRoot}/hashed-passwd"; 46 + }; 47 + 48 + home-manager.users.bean.cow = { 49 + sync.enable = true; 50 + dev.enable = true; 51 + }; 52 + 53 + cow = { 54 + bean.sudoer = true; 55 + lanzaboote.enable = true; 56 + ssh-server.enable = true; 57 + role-desktop.enable = true; 58 + gaming.enable = true; 59 + imperm.enable = true; 60 + disks = { 61 + enable = true; 62 + partition-prefix = "cow-bm"; 63 + swap = false; 64 + luks = true; 65 + }; 66 + }; 67 + } 68 + { 69 + # Bingus! 70 + imports = [inputs.bingus.nixosModules.default]; 71 + nixpkgs.overlays = [inputs.bingus.overlays.default]; 72 + 73 + cow.imperm.keep = [ 74 + "/var/lib/private/bingus" 75 + ]; 76 + 77 + services.bingus-bot = { 78 + enable = true; 79 + tokenFile = "/nix/persist/secure/bingus-token"; 80 + replyChannels = [ 81 + 1295447496948191262 82 + 1295245646542143489 83 + ]; 84 + }; 85 + } 86 + { 87 + # for WOL 88 + systemd.network.links."79-eth-wol" = { 89 + matchConfig = { 90 + Type = "ether"; 91 + Driver = "!veth"; 92 + Virtualization = "false"; 93 + }; 94 + linkConfig = { 95 + WakeOnLan = "magic"; 96 + NamePolicy = "keep kernel database onboard slot path"; 97 + AlternativeNamesPolicy = "database onboard slot path mac"; 98 + MACAddressPolicy = "persistent"; 99 + }; 100 + }; 101 + } 102 + { 103 + virtualisation.podman.enable = true; 104 + 105 + cow.imperm.keep = ["/var/lib/containers"]; 106 + } 107 + ]; 108 + }
+96
nixosConfigurations/installer.nix
··· 1 + { 2 + lib, 3 + outputs, 4 + ... 5 + }: { 6 + system = "x86_64-linux"; 7 + 8 + modules = 9 + (builtins.attrValues outputs.nixosModules) 10 + ++ [ 11 + ( 12 + { 13 + modulesPath, 14 + pkgs, 15 + ... 16 + }: { 17 + imports = [ 18 + "${modulesPath}/installer/cd-dvd/installation-cd-minimal.nix" 19 + ]; 20 + 21 + services.kmscon = { 22 + enable = true; 23 + autologinUser = "root"; 24 + fonts = [ 25 + { 26 + name = "SauceCodePro Nerd Font Mono"; 27 + package = pkgs.nerd-fonts.sauce-code-pro; 28 + } 29 + ]; 30 + }; 31 + 32 + boot = let 33 + supportedFilesystems = { 34 + btrfs = true; 35 + reiserfs = lib.mkForce false; 36 + vfat = true; 37 + f2fs = true; 38 + xfs = true; 39 + ntfs = true; 40 + cifs = true; 41 + zfs = lib.mkForce false; 42 + }; 43 + in { 44 + initrd.systemd.enable = false; 45 + inherit supportedFilesystems; 46 + initrd = { 47 + inherit supportedFilesystems; 48 + }; 49 + }; 50 + 51 + system.extraDependencies = [ 52 + outputs.nixosConfigurations.aperture.config.system.build.toplevel 53 + outputs.nixosConfigurations.black-mesa.config.system.build.toplevel 54 + ]; 55 + 56 + environment.systemPackages = with pkgs; [ 57 + disko 58 + sbctl 59 + ]; 60 + } 61 + ) 62 + ( 63 + {pkgs, ...}: { 64 + system.stateVersion = "25.05"; 65 + networking.hostName = "cow-installer"; 66 + 67 + networking.networkmanager.enable = lib.mkForce false; 68 + 69 + users.users.root = { 70 + shell = pkgs.nushell; 71 + }; 72 + 73 + home-manager.users.root.home.stateVersion = "25.05"; 74 + home-manager.users.root.cow = { 75 + nushell = { 76 + enable = true; 77 + commandNotFound = true; 78 + }; 79 + neovim.enable = true; 80 + htop.enable = true; 81 + starship.enable = true; 82 + yazi.enable = true; 83 + dev.enable = false; 84 + comma.enable = true; 85 + cat.enable = true; 86 + }; 87 + 88 + cow = { 89 + network.wireless = true; 90 + hm.enable = true; 91 + cat.enable = true; 92 + }; 93 + } 94 + ) 95 + ]; 96 + }
+20
nixosModules/audio.nix
··· 1 + {...}: { 2 + config, 3 + lib, 4 + ... 5 + }: { 6 + options.cow.audio.enable = lib.mkEnableOption "audo config with Pipewire"; 7 + 8 + config = lib.mkIf config.cow.audio.enable { 9 + services.pulseaudio.enable = false; 10 + security.rtkit.enable = true; # Allows pipewire and friends to run realtime 11 + services.pipewire = { 12 + enable = true; 13 + pulse.enable = true; 14 + alsa = { 15 + enable = true; 16 + support32Bit = true; 17 + }; 18 + }; 19 + }; 20 + }
+73
nixosModules/base.nix
··· 1 + {...}: { 2 + pkgs, 3 + inputs, 4 + config, 5 + lib, 6 + ... 7 + }: { 8 + time.timeZone = lib.mkDefault "America/New_York"; 9 + 10 + environment.etc."machine-id".text = lib.mkDefault ( 11 + builtins.hashString "md5" config.networking.hostName 12 + ); 13 + 14 + environment.variables."HOSTNAME" = lib.mkDefault config.networking.hostName; 15 + environment.systemPackages = with pkgs; [ 16 + uutils-coreutils-noprefix 17 + nh 18 + nix-output-monitor 19 + git 20 + just 21 + ]; 22 + environment.etc."flake-src".source = inputs.self; 23 + 24 + programs.ssh.startAgent = true; 25 + documentation.man.generateCaches = false; 26 + services.upower.enable = true; 27 + services.udisks2.enable = true; 28 + 29 + boot.tmp.cleanOnBoot = lib.mkDefault true; 30 + services.logind.settings.Login.RuntimeDirectorySize = lib.mkDefault "100M"; 31 + 32 + # Make Nix builder lower OOM priority so it's killed before other stuff 33 + systemd.services.nix-daemon.serviceConfig.OOMScoreAdjust = lib.mkDefault 250; 34 + 35 + # Keep flake inputs when GC-ing 36 + system.extraDependencies = with builtins; let 37 + flakeDeps = flake: 38 + [flake.outPath] ++ (foldl' (a: b: a ++ b) [] (map flakeDeps (attrValues flake.inputs or {}))); 39 + in 40 + flakeDeps inputs.self; 41 + 42 + boot = { 43 + initrd.systemd = { 44 + enable = lib.mkDefault true; 45 + }; 46 + 47 + # Use latest kernel with sysrqs and lockdown enabled 48 + kernelPackages = lib.mkDefault pkgs.linuxPackages_latest; 49 + kernelParams = lib.mkDefault ["lockdown=confidentiality"]; 50 + kernel.sysctl."kernel.sysrq" = lib.mkDefault 1; 51 + }; 52 + 53 + nix = { 54 + channel.enable = false; 55 + registry.p.flake = inputs.self; 56 + package = pkgs.lix; 57 + settings = { 58 + # So we can do `import <nixpkgs>` 59 + nix-path = "nixpkgs=${inputs.nixpkgs}"; 60 + experimental-features = [ 61 + "nix-command" 62 + "flakes" 63 + "pipe-operator" 64 + ]; 65 + auto-optimise-store = true; 66 + fallback = true; 67 + }; 68 + gc = { 69 + automatic = lib.mkDefault false; 70 + dates = lib.mkDefault "weekly"; 71 + }; 72 + }; 73 + }
-14
nixosModules/base/base.nix
··· 1 - { 2 - pkgs, 3 - inputs, 4 - config, 5 - ... 6 - }: { 7 - environment.variables."HOSTNAME" = config.networking.hostName; 8 - environment.systemPackages = with pkgs; [ 9 - uutils-coreutils-noprefix 10 - ]; 11 - environment.etc."flake-src".source = inputs.self; 12 - home-manager.useGlobalPkgs = true; 13 - home-manager.useUserPackages = true; 14 - }
-7
nixosModules/base/boot.nix
··· 1 - {lib, ...}: { 2 - # /tmp should be clean! 3 - boot.tmp.cleanOnBoot = true; 4 - 5 - # Give me back my RAM! 6 - services.logind.settings.Login.RuntimeDirectorySize = "100M"; 7 - }
-48
nixosModules/base/nix.nix
··· 1 - { 2 - pkgs, 3 - inputs, 4 - lib, 5 - ... 6 - }: { 7 - environment.systemPackages = with pkgs; [ 8 - nh 9 - nix-output-monitor 10 - comma-with-db 11 - ]; 12 - 13 - nix = { 14 - channel.enable = false; 15 - registry.p.flake = inputs.self; 16 - package = pkgs.lix; 17 - settings = { 18 - # So we can do `import <nixpkgs>` 19 - nix-path = "nixpkgs=${inputs.nixpkgs}"; 20 - experimental-features = [ 21 - "nix-command" 22 - "flakes" 23 - "pipe-operator" 24 - ]; 25 - auto-optimise-store = true; 26 - fallback = true; 27 - }; 28 - gc = { 29 - automatic = false; 30 - dates = "weekly"; 31 - }; 32 - }; 33 - 34 - # Switch ng is not as weird 35 - # system.switch = { 36 - # enable = false; 37 - # enableNg = true; 38 - # }; 39 - 40 - # Kill nix daemon builds over user sessions 41 - systemd.services.nix-daemon.serviceConfig.OOMScoreAdjust = lib.mkDefault 250; 42 - 43 - # Keeps flake inputs when GCing 44 - system.extraDependencies = with builtins; let 45 - flakeDeps = flake: [flake.outPath] ++ (foldl' (a: b: a ++ b) [] (map flakeDeps (attrValues flake.inputs or {}))); 46 - in 47 - flakeDeps inputs.self; 48 - }
-84
nixosModules/base/nushell.nix
··· 1 - { 2 - pkgs, 3 - lib, 4 - config, 5 - ... 6 - }: let 7 - init-starship = pkgs.runCommand "starship-init" {} '' 8 - ${pkgs.starship}/bin/starship init nu > $out 9 - ''; 10 - shellAliases = { 11 - cd = "z"; 12 - sw = "zi"; 13 - py = "python"; 14 - cat = "bat"; 15 - pcat = "prettybat"; 16 - pbat = "prettybat"; 17 - dog = "doggo"; 18 - man = "__batman"; 19 - bgrep = "batgrep"; 20 - "🥺" = "sudo"; 21 - }; 22 - configFile.text = '' 23 - let fish_completer = {|spans| 24 - ${pkgs.fish}/bin/fish --command $'complete "--do-complete=($spans | str join " ")"' 25 - | $"value(char tab)description(char newline)" + $in 26 - | from tsv --flexible --no-infer 27 - } 28 - let zoxide_completer = {|spans| 29 - let query = $spans | skip 1 30 - let z_results = $query | zoxide query -l ...$in | lines | where {|x| $x != $env.PWD} 31 - let l_results = fish_completer $spans 32 - $l_results | append $z_results 33 - } 34 - let multiple_completers = {|spans| 35 - # if the current command is an alias, get it's expansion 36 - let expanded_alias = (scope aliases | where name == $spans.0 | get -o 0 | get -o expansion) 37 - 38 - # overwrite 39 - 40 - let spans = (if $expanded_alias != null { 41 - # put the first word of the expanded alias first in the span 42 - $spans | skip 1 | prepend ($expanded_alias | split row " ") 43 - } else { $spans }) 44 - 45 - match $spans.0 { 46 - z => $zoxide_completer 47 - zi => $zoxide_completer 48 - __zoxide_z => $zoxide_completer 49 - __zoxide_zi => $zoxide_completer 50 - _ => $fish_completer 51 - } | do $in $spans 52 - } 53 - 54 - let command_not_found = ${lib.fileContents ../../res/command_not_found.nu} 55 - 56 - def --env __batman [...rest:string] { 57 - BAT_THEME="Monokai Extended" batman ...$rest 58 - } 59 - 60 - $env.config = { 61 - show_banner: false 62 - completions: { 63 - external: { 64 - enable: true 65 - completer: $multiple_completers 66 - } 67 - } 68 - hooks: { 69 - command_not_found: $command_not_found 70 - } 71 - } 72 - 73 - source ${init-starship} 74 - ''; 75 - in { 76 - home-manager.users.bean.programs.nushell = { 77 - enable = true; 78 - inherit configFile shellAliases; 79 - }; 80 - home-manager.users.root.programs.nushell = { 81 - enable = true; 82 - inherit configFile shellAliases; 83 - }; 84 - }
-35
nixosModules/base/personal.nix
··· 1 - { 2 - inputs, 3 - config, 4 - ... 5 - }: { 6 - imports = [inputs.hm.nixosModules.default]; 7 - 8 - time.timeZone = "America/New_York"; 9 - 10 - users.users.bean = { 11 - isNormalUser = true; 12 - description = "Benjamin Crocker"; 13 - autoSubUidGidRange = true; 14 - extraGroups = ["wheel"]; # For sudo 15 - }; 16 - 17 - home-manager.users.root = { 18 - imports = [inputs.nix-index-db.homeModules.nix-index]; 19 - home = { 20 - username = "root"; 21 - homeDirectory = "/root"; 22 - stateVersion = config.system.stateVersion; 23 - }; 24 - }; 25 - 26 - home-manager.users.bean = { 27 - imports = [inputs.nix-index-db.homeModules.nix-index]; 28 - home = { 29 - username = "bean"; 30 - homeDirectory = "/home/bean"; 31 - file.".face".source = "${../../res/pictures/cow.png}"; 32 - stateVersion = config.system.stateVersion; 33 - }; 34 - }; 35 - }
-67
nixosModules/base/shell.nix
··· 1 - { 2 - pkgs, 3 - inputs, 4 - ... 5 - }: { 6 - imports = [inputs.nix-index-db.nixosModules.nix-index]; 7 - 8 - users.users.bean.shell = pkgs.nushell; 9 - users.users.root.shell = pkgs.nushell; 10 - programs.fish.enable = true; 11 - documentation.man.generateCaches = false; 12 - programs.ssh.startAgent = true; 13 - services.upower.enable = true; 14 - 15 - security.sudo.extraConfig = '' 16 - Defaults lecture = never 17 - ''; 18 - 19 - environment = { 20 - shells = with pkgs; [nushell fish]; 21 - variables.EDITOR = "nvim"; 22 - 23 - systemPackages = with pkgs; [ 24 - nushell 25 - file 26 - screen 27 - util-linux 28 - inetutils 29 - just 30 - man-pages 31 - htop 32 - dig 33 - doggo 34 - ]; 35 - }; 36 - 37 - programs.git.enable = true; 38 - 39 - programs.neovim = { 40 - enable = true; 41 - viAlias = true; 42 - vimAlias = true; 43 - }; 44 - 45 - nixpkgs.overlays = [ 46 - inputs.nix-index-db.overlays.nix-index 47 - ]; 48 - 49 - home-manager.users.bean.programs = { 50 - command-not-found.enable = false; 51 - nix-index.enable = true; 52 - zoxide.enable = true; 53 - ripgrep.enable = true; 54 - bat = { 55 - enable = true; 56 - extraPackages = with pkgs.bat-extras; [batman batgrep batwatch]; 57 - }; 58 - }; 59 - 60 - home-manager.users.root.programs = { 61 - zoxide.enable = true; 62 - ripgrep.enable = true; 63 - command-not-found.enable = false; 64 - bat.enable = true; 65 - nix-index.enable = true; 66 - }; 67 - }
-134
nixosModules/base/starship.nix
··· 1 - {...}: let 2 - settings = { 3 - add_newline = false; 4 - character = { 5 - disabled = false; 6 - error_symbol = "[󰀨](bold red bg:crust)"; 7 - format = "[ $symbol ](bg:crust)"; 8 - success_symbol = "[󰗠](bold green bg:crust)"; 9 - }; 10 - cmd_duration = { 11 - disabled = false; 12 - format = "[ 󱎫 $duration ]($style)"; 13 - min_time = 2000; 14 - style = "bg:crust blue"; 15 - }; 16 - directory = { 17 - format = "[ ($read_only )$path ]($style)"; 18 - home_symbol = "󰋜"; 19 - read_only = "󰌾"; 20 - style = "bold green bg:crust"; 21 - truncate_to_repo = true; 22 - truncation_length = 10; 23 - }; 24 - format = "[░▒▓](crust)[ $os$hostname[](bg:crust #999999)$shell$username[](bg:crust #999999)$directory([](bg:crust #999999)$git_branch$git_commit$git_state)([](bg:crust #999999)$nodejs$python$rust$nix_shell)](bg:crust)[ ](crust)"; 25 - git_branch = { 26 - format = "[ $symbol ($branch )]($style)"; 27 - style = "bg:crust green"; 28 - symbol = "󰘬"; 29 - }; 30 - git_state = { 31 - format = "\\([$state( $progress_current/$progress_total)]($style)\\)"; 32 - merge = "󰘭"; 33 - rebase = "󱗬"; 34 - revert = "󰕍"; 35 - style = "bg:crust green yellow"; 36 - }; 37 - git_status = { 38 - conflicted = "󰀦"; 39 - format = "[$all_status $ahead_behind ]($style)"; 40 - modified = "󰏫"; 41 - style = "bg:crust green"; 42 - }; 43 - hostname = { 44 - format = "[$hostname( $ssh_symbol) ]($style)"; 45 - ssh_only = false; 46 - ssh_symbol = ""; 47 - style = "bold blue bg:crust"; 48 - }; 49 - line_break = {disabled = true;}; 50 - nix_shell = { 51 - format = "[ $state ](bold blue bg:crust) "; 52 - impure_msg = "[󱄅 impure](bold red bg:crust)"; 53 - pure_msg = "[󱄅](bold green bg:crust)"; 54 - style = "bg:crust green"; 55 - unknown_msg = "[󱄅 unknown](bold yellow bg:crust)"; 56 - }; 57 - nodejs = { 58 - format = "[ $symbol ($version) ]($style)"; 59 - not_capable_style = "bg:crust green bold red"; 60 - style = "bg:crust green"; 61 - symbol = "󰎙"; 62 - }; 63 - os = { 64 - disabled = false; 65 - format = "[$symbol ]($style)"; 66 - style = "bg:crust bold lightcrust"; 67 - symbols = { 68 - Android = ""; 69 - Debian = ""; 70 - Linux = ""; 71 - Macos = ""; 72 - Manjaro = ""; 73 - NixOS = "󱄅"; 74 - Raspbian = ""; 75 - Ubuntu = ""; 76 - Windows = ""; 77 - }; 78 - }; 79 - python = { 80 - format = "[ $symbol ($version) ]($style)"; 81 - style = "bg:crust green"; 82 - symbol = "󰌠"; 83 - }; 84 - right_format = "[ ](crust)\n($character$status[](bg:crust #999999))\n($cmd_duration[](bg:crust #999999))$time[▓▒░](crust)\n"; 85 - rust = { 86 - format = "[ $symbol ($version) ]($style)"; 87 - style = "bg:crust green"; 88 - symbol = "󱘗"; 89 - }; 90 - shell = { 91 - bash_indicator = "󱆃"; 92 - disabled = false; 93 - fish_indicator = "󰈺"; 94 - format = "[ $indicator ]($style)"; 95 - nu_indicator = "󰨊"; 96 - powershell_indicator = "󰨊"; 97 - style = "bg:crust blue"; 98 - unknown_indicator = "󰋗"; 99 - }; 100 - status = { 101 - disabled = false; 102 - format = "[$status ]($style)"; 103 - style = "bg:crust red"; 104 - }; 105 - time = { 106 - disabled = false; 107 - format = "[ $time ]($style)"; 108 - style = "bg:crust bold blue"; 109 - time_format = "%a %b %d %I:%M %p 󰥔"; 110 - use_12hr = true; 111 - }; 112 - username = { 113 - format = "[$user ]($style)"; 114 - show_always = true; 115 - style_root = "bold red bg:crust"; 116 - style_user = "blue bg:crust"; 117 - }; 118 - }; 119 - in { 120 - programs.starship = { 121 - enable = true; 122 - inherit settings; 123 - }; 124 - 125 - home-manager.users.bean.programs.starship = { 126 - enable = true; 127 - inherit settings; 128 - }; 129 - 130 - home-manager.users.root.programs.starship = { 131 - enable = true; 132 - inherit settings; 133 - }; 134 - }
-37
nixosModules/base/theming.nix
··· 1 - {inputs, ...}: let 2 - catppuccin = { 3 - enable = true; 4 - flavor = "mocha"; 5 - accent = "green"; 6 - }; 7 - in { 8 - imports = [ 9 - inputs.catppuccin.nixosModules.catppuccin 10 - ]; 11 - 12 - inherit catppuccin; 13 - 14 - home-manager.users.bean = { 15 - imports = [ 16 - inputs.catppuccin.homeModules.catppuccin 17 - ]; 18 - 19 - catppuccin = 20 - { 21 - mako.enable = false; 22 - } 23 - // catppuccin; 24 - }; 25 - 26 - home-manager.users.root = { 27 - imports = [ 28 - inputs.catppuccin.homeModules.catppuccin 29 - ]; 30 - 31 - catppuccin = 32 - { 33 - mako.enable = false; 34 - } 35 - // catppuccin; 36 - }; 37 - }
-136
nixosModules/base/yazi.nix
··· 1 - {pkgs, ...}: { 2 - environment.systemPackages = with pkgs; [ 3 - yazi 4 - mediainfo 5 - exiftool 6 - ]; 7 - 8 - home-manager.users.bean.programs.yazi = { 9 - enable = true; 10 - enableBashIntegration = true; 11 - enableNushellIntegration = true; 12 - 13 - settings = { 14 - open.prepend_rules = [ 15 - { 16 - mime = "video/*"; 17 - use = "open"; 18 - } 19 - { 20 - mime = "audio/*"; 21 - use = "open"; 22 - } 23 - ]; 24 - }; 25 - 26 - keymap.mgr.prepend_keymap = [ 27 - { 28 - run = "plugin mount"; 29 - on = ["M"]; 30 - desc = "Disk Mounting"; 31 - } 32 - { 33 - run = "plugin chmod"; 34 - on = [ 35 - "c" 36 - "m" 37 - ]; 38 - desc = "Run Chmod On Selected"; 39 - } 40 - ]; 41 - 42 - plugins = { 43 - inherit 44 - (pkgs.yaziPlugins) 45 - ouch 46 - mount 47 - chmod 48 - bypass 49 - mediainfo 50 - wl-clipboard 51 - yatline 52 - yatline-catppuccin 53 - ; 54 - }; 55 - 56 - initLua = '' 57 - local catppuccin_theme = require("yatline-catppuccin"):setup("mocha") 58 - 59 - require("yatline"):setup({ 60 - theme = catppuccin_theme, 61 - section_separator = { open = "", close = "" }, 62 - part_separator = { open = "", close = "" }, 63 - inverse_separator = { open = "", close = "" }, 64 - 65 - tab_width = 20, 66 - tab_use_inverse = false, 67 - 68 - selected = { icon = "󰻭", fg = "yellow" }, 69 - copied = { icon = "", fg = "green" }, 70 - cut = { icon = "", fg = "red" }, 71 - 72 - total = { icon = "󰮍", fg = "yellow" }, 73 - succ = { icon = "", fg = "green" }, 74 - fail = { icon = "", fg = "red" }, 75 - found = { icon = "󰮕", fg = "blue" }, 76 - processed = { icon = "󰐍", fg = "green" }, 77 - 78 - show_background = true, 79 - 80 - display_header_line = true, 81 - display_status_line = true, 82 - 83 - component_positions = { "header", "tab", "status" }, 84 - 85 - header_line = { 86 - left = { 87 - section_a = { 88 - {type = "line", custom = false, name = "tabs", params = {"left"}}, 89 - }, 90 - section_b = { 91 - }, 92 - section_c = { 93 - } 94 - }, 95 - right = { 96 - section_a = { 97 - {type = "string", custom = false, name = "date", params = {"%A, %d %B %Y"}}, 98 - }, 99 - section_b = { 100 - {type = "string", custom = false, name = "date", params = {"%X"}}, 101 - }, 102 - section_c = { 103 - } 104 - } 105 - }, 106 - 107 - status_line = { 108 - left = { 109 - section_a = { 110 - {type = "string", custom = false, name = "tab_mode"}, 111 - }, 112 - section_b = { 113 - {type = "string", custom = false, name = "hovered_size"}, 114 - }, 115 - section_c = { 116 - {type = "string", custom = false, name = "hovered_path"}, 117 - {type = "coloreds", custom = false, name = "count"}, 118 - } 119 - }, 120 - right = { 121 - section_a = { 122 - {type = "string", custom = false, name = "cursor_position"}, 123 - }, 124 - section_b = { 125 - {type = "string", custom = false, name = "cursor_percentage"}, 126 - }, 127 - section_c = { 128 - {type = "string", custom = false, name = "hovered_file_extension", params = {true}}, 129 - {type = "coloreds", custom = false, name = "permissions"}, 130 - } 131 - } 132 - }, 133 - }) 134 - ''; 135 - }; 136 - }
-11
nixosModules/black-mesa-cache.nix
··· 1 - {...}: { 2 - nix.settings = { 3 - substituters = [ 4 - "http://black-mesa:5000" 5 - "https://cache.nixos.org" 6 - ]; 7 - trusted-public-keys = [ 8 - "black-mesa:tAX++uOKyqP70gnwx5zHBMiZ0kee8WberjlPZmDuyxw=" 9 - ]; 10 - }; 11 - }
+18
nixosModules/cat.nix
··· 1 + {...}: { 2 + config, 3 + lib, 4 + inputs, 5 + ... 6 + }: { 7 + imports = [inputs.catppuccin.nixosModules.catppuccin]; 8 + 9 + options.cow.cat.enable = lib.mkEnableOption "Catppuccin theming everywhere"; 10 + 11 + config = lib.mkIf config.cow.cat.enable { 12 + catppuccin = { 13 + enable = true; 14 + flavor = "mocha"; 15 + accent = "green"; 16 + }; 17 + }; 18 + }
+7 -24
nixosModules/default.nix
··· 1 - {lib, ...}: let 2 - allNodesOf = nodeType: dir: lib.attrNames (lib.filterAttrs (_n: v: v == nodeType) dir); 3 - allRoles = builtins.readDir ./.; 4 - allNixFiles = dir: 5 - lib.pipe (builtins.readDir dir) [ 6 - (allNodesOf "regular") 7 - (builtins.filter (s: s != "default.nix")) 8 - (builtins.filter (lib.hasSuffix ".nix")) 9 - ]; 10 - 11 - # Flat Roles: roles that are normal .nix file in nixosModules/ 12 - rolesFiles = builtins.map (lib.removeSuffix ".nix") (allNixFiles ./.); 13 - flatRoles = lib.genAttrs rolesFiles (p: ./. + "/${p}.nix"); 14 - 15 - # Nested Roles: roles that are a folder containing a number of .nix files 16 - rolesDirs = allNodesOf "directory" allRoles; 17 - createNestedRole = dir: let 18 - nixFiles = allNixFiles (./. + "/${dir}"); 19 - in { 20 - imports = builtins.map (f: ./. + "/${dir}" + "/${f}") nixFiles; 21 - }; 22 - nestedRoles = lib.genAttrs rolesDirs createNestedRole; 23 - in 24 - flatRoles // nestedRoles 1 + { 2 + lib, 3 + flakelight, 4 + moduleArgs, 5 + ... 6 + }: 7 + lib.mapAttrs (_: v: v moduleArgs) (flakelight.importDir ./.)
-156
nixosModules/dev+graphics/code.nix
··· 1 - {pkgs, ...}: { 2 - # Because vsc is annoying with not following fallbacks 3 - # fonts.packages = with pkgs; [nerd-fonts.fira-code]; 4 - # 5 - # home-manager.users.bean = { 6 - # home.file.".vscode/argv.json".text = builtins.toJSON { 7 - # "enable-crash-reporter" = false; 8 - # "crash-reporter-id" = ""; 9 - # "password-store" = "gnome-libsecret"; 10 - # }; 11 - # 12 - # programs.vscode = { 13 - # enable = true; 14 - # enableUpdateCheck = false; 15 - # enableExtensionUpdateCheck = false; 16 - # mutableExtensionsDir = false; 17 - # 18 - # extensions = with pkgs.vscode-extensions; [ 19 - # # Theme 20 - # (pkgs.catppuccin-vsc.override { 21 - # accent = "green"; 22 - # boldKeywords = true; 23 - # italicComments = true; 24 - # italicKeywords = true; 25 - # extraBordersEnabled = false; 26 - # workbenchMode = "default"; 27 - # bracketMode = "rainbow"; 28 - # colorOverrides = {}; 29 - # customUIColors = {}; 30 - # }) 31 - # catppuccin.catppuccin-vsc-icons 32 - # 33 - # # Nix 34 - # bbenoist.nix 35 - # kamadorueda.alejandra 36 - # 37 - # # Markdown 38 - # yzhang.markdown-all-in-one 39 - # bierner.markdown-mermaid 40 - # davidanson.vscode-markdownlint 41 - # 42 - # # Rust 43 - # rust-lang.rust-analyzer 44 - # tamasfe.even-better-toml 45 - # 46 - # # C / C++ 47 - # ms-vscode.cpptools 48 - # twxs.cmake 49 - # 50 - # # Java 51 - # redhat.java 52 - # 53 - # # Typescript / Javascript 54 - # denoland.vscode-deno 55 - # yoavbls.pretty-ts-errors 56 - # dbaeumer.vscode-eslint 57 - # esbenp.prettier-vscode 58 - # 59 - # # Astro 60 - # astro-build.astro-vscode 61 - # unifiedjs.vscode-mdx 62 - # 63 - # # Misc. Web 64 - # bradlc.vscode-tailwindcss 65 - # 66 - # # .NET 67 - # ms-dotnettools.csharp 68 - # ms-dotnettools.vscode-dotnet-runtime 69 - # 70 - # # Python 71 - # ms-python.python 72 - # ms-python.vscode-pylance 73 - # wholroyd.jinja 74 - # 75 - # # XML 76 - # redhat.vscode-xml 77 - # 78 - # # Spelling / Grammar 79 - # yzhang.dictionary-completion 80 - # tekumara.typos-vscode 81 - # 82 - # # GitHub 83 - # github.vscode-pull-request-github 84 - # github.vscode-github-actions 85 - # 86 - # # Misc. 87 - # skellock.just 88 - # thenuprojectcontributors.vscode-nushell-lang 89 - # fill-labs.dependi 90 - # zhwu95.riscv 91 - # redhat.vscode-yaml 92 - # ms-vsliveshare.vsliveshare 93 - # leonardssh.vscord 94 - # ]; 95 - # 96 - # userSettings = { 97 - # "window.zoomLevel" = 2; 98 - # "telemetry.telemetryLevel" = "off"; 99 - # "update.mode" = "manual"; 100 - # "update.showReleaseNotes" = false; 101 - # "editor.fontFamily" = "Monospace, FiraCode Nerd Font Mono"; 102 - # "terminal.integrated.fontFamily" = "Monospace, FiraCode Nerd Font Mono"; 103 - # "editor.fontLigatures" = true; 104 - # "editor.detectIndentation" = true; 105 - # "editor.multiCursorModifier" = "ctrlCmd"; 106 - # "editor.minimap.enabled" = false; 107 - # "editor.fontSize" = 16; 108 - # "terminal.integrated.fontSize" = 16; 109 - # "workbench.colorTheme" = "Catppuccin Mocha"; 110 - # "workbench.iconTheme" = "catppuccin-mocha"; 111 - # "workbench.startupEditor" = "none"; 112 - # "workbench.welcomePage.walkthroughs.openOnInstall" = false; 113 - # "terminal.integrated.smoothScrolling" = true; 114 - # "explorer.compactFolders" = false; 115 - # "explorer.confirmDelete" = false; 116 - # "explorer.confirmDragAndDrop" = false; 117 - # "git.openRepositoryInParentFolders" = "never"; 118 - # "extensions.autoUpdate" = false; 119 - # "extensions.ignoreRecommendations" = true; 120 - # "javascript.updateImportsOnFileMove.enabled" = "always"; 121 - # "typescript.updateImportsOnFileMove.enabled" = "always"; 122 - # "githubPullRequests.pullBranch" = "never"; 123 - # "vscord.app.name" = "Visual Studio Code"; 124 - # "vscord.status.idle.disconnectOnIdle" = true; 125 - # "vscord.behaviour.suppressNotifications" = true; 126 - # "material-icon-theme.folders.color" = "#546E7B"; 127 - # "redhat.telemetry.enabled" = false; 128 - # "rust-analyzer.server.path" = "${pkgs.rust-analyzer}/bin/rust-analyzer"; 129 - # "prettier.prettierPath" = "${pkgs.nodePackages.prettier}/lib/node_modules/prettier"; 130 - # "rust-analyzer.cargo.allTargets" = false; 131 - # "rust-analyzer.hover.actions.references.enable" = true; 132 - # "dotnetAcquisitionExtension.enableTelemetry" = false; 133 - # 134 - # "[json][yaml][javascript][typescript][javascriptreact][typescriptreact][css][scss][less][tailwindcss][html][astro]" = { 135 - # "editor.defaultFormatter" = "esbenp.prettier-vscode"; 136 - # }; 137 - # 138 - # "[python]" = { 139 - # "editor.defaultFormatter" = "ms-python.black-formatter"; 140 - # }; 141 - # 142 - # "[rust]" = { 143 - # "editor.defaultFormatter" = "rust-lang.rust-analyzer"; 144 - # }; 145 - # 146 - # "[nix]" = { 147 - # "editor.defaultFormatter" = "kamadorueda.alejandra"; 148 - # }; 149 - # 150 - # "[markdown]" = { 151 - # "editor.defaultFormatter" = "DavidAnson.vscode-markdownlint"; 152 - # }; 153 - # }; 154 - # }; 155 - # }; 156 - }
-6
nixosModules/dev+graphics/misc.nix
··· 1 - {pkgs, ...}: { 2 - environment.systemPackages = with pkgs; [ 3 - google-lighthouse 4 - (cutter.withPlugins (p: with p; [rz-ghidra])) 5 - ]; 6 - }
-27
nixosModules/dev+graphics/nvim.nix
··· 1 - {pkgs, ...}: { 2 - environment.systemPackages = with pkgs; [ 3 - neovide 4 - ]; 5 - 6 - home-manager.users.bean = { 7 - wayland.windowManager.hyprland.settings.bind = [ 8 - "SUPER,D,exec,neovide" 9 - ]; 10 - programs = { 11 - nixvim = { 12 - clipboard.providers.wl-copy.enable = true; 13 - }; 14 - neovide = { 15 - enable = true; 16 - settings = { 17 - fork = true; 18 - font = { 19 - normal = [{family = "monospace";}]; 20 - size = 18.0; 21 - }; 22 - title-hidden = false; 23 - }; 24 - }; 25 - }; 26 - }; 27 - }
-7
nixosModules/dev/android.nix
··· 1 - {pkgs, ...}: { 2 - users.users.bean.extraGroups = ["kvm" "adbusers"]; 3 - programs.adb.enable = true; 4 - services.udev.packages = [ 5 - pkgs.android-udev-rules 6 - ]; 7 - }
-8
nixosModules/dev/dotnet.nix
··· 1 - {pkgs, ...}: { 2 - environment.systemPackages = with pkgs; [ 3 - dotnet-sdk 4 - dotnet-runtime 5 - dotnetPackages.Nuget 6 - # mono 7 - ]; 8 - }
-22
nixosModules/dev/git.nix
··· 1 - {pkgs, ...}: { 2 - environment.systemPackages = with pkgs; [ 3 - gh 4 - ]; 5 - 6 - programs.git = { 7 - enable = true; 8 - config = { 9 - init.defaultBranch = "main"; 10 - commit.gpgSign = true; 11 - user = { 12 - email = "bwc9876@gmail.com"; 13 - name = "Ben C"; 14 - signingKey = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIKsVzdJra+x5aEuwTjL1FBOiMh9bftvs8QwsM1xyEbdd"; 15 - }; 16 - advice = { 17 - addIgnoredFile = false; 18 - }; 19 - gpg.format = "ssh"; 20 - }; 21 - }; 22 - }
-10
nixosModules/dev/haskell.nix
··· 1 - {pkgs, ...}: { 2 - environment.systemPackages = with pkgs; [ 3 - haskell.compiler.ghc912 4 - ]; 5 - 6 - home-manager.users.bean.xdg.configFile."ghc/ghci.conf".text = '' 7 - :set prompt "\ESC[1;35m\x03BB> \ESC[m" 8 - :set prompt-cont "\ESC[1;35m > \ESC[m" 9 - ''; 10 - }
-16
nixosModules/dev/js.nix
··· 1 - {pkgs, ...}: { 2 - home-manager.users.bean.xdg.configFile."astro/config.json".text = builtins.toJSON { 3 - telemetry = { 4 - enabled = false; 5 - anonymousId = ""; 6 - notifiedAt = "0"; 7 - }; 8 - }; 9 - 10 - environment.systemPackages = with pkgs; [ 11 - nodejs_latest 12 - nodePackages.pnpm 13 - yarn 14 - deno 15 - ]; 16 - }
-59
nixosModules/dev/misc.nix
··· 1 - { 2 - pkgs, 3 - inputs', 4 - ... 5 - }: { 6 - environment.systemPackages = with pkgs; [ 7 - # Build Tools 8 - pkg-config 9 - gnumake 10 - 11 - # Java 12 - jdk 13 - 14 - # Math 15 - libqalculate 16 - 17 - # Misc Misc 18 - binutils 19 - usbutils 20 - qrencode 21 - nmap 22 - file 23 - procfd 24 - ldapvi 25 - dust 26 - zip 27 - p7zip 28 - wol 29 - 30 - # C/C++ 31 - gcc 32 - gdb 33 - 34 - # Windows 35 - wine-wayland 36 - 37 - # Android 38 - android-tools 39 - 40 - # Debug 41 - wev 42 - poop 43 - inputs'.gh-grader-preview.packages.default 44 - ]; 45 - 46 - users.users.bean.extraGroups = ["wireshark"]; 47 - programs.wireshark = { 48 - enable = true; 49 - package = pkgs.wireshark; 50 - }; 51 - 52 - # home-manager.users.bean.programs.direnv = { 53 - # enable = true; 54 - # enableBashIntegration = true; 55 - # enableNushellIntegration = true; 56 - # nix-direnv.enable = true; 57 - # silent = true; 58 - # }; 59 - }
-5
nixosModules/dev/nix.nix
··· 1 - {pkgs, ...}: { 2 - environment.systemPackages = with pkgs; [ 3 - alejandra 4 - ]; 5 - }
+71 -43
nixosModules/dev/nvim.nix homeModules/nvim.nix
··· 1 - { 1 + {inputs, ...}: { 2 2 pkgs, 3 - inputs, 4 3 config, 5 4 lib, 6 5 ... 7 6 }: { 8 - environment.systemPackages = with pkgs; [ 9 - ripgrep 10 - fd 11 - ]; 7 + imports = [inputs.nixvim.homeModules.nixvim]; 8 + 9 + options.cow.neovim.enable = lib.mkEnableOption "Neovim + Nixvim + Customizations"; 10 + 11 + config = lib.mkIf config.cow.neovim.enable { 12 + cow.imperm.keep = [".local/share/nvim"]; 13 + 14 + home.packages = with pkgs; [ 15 + ripgrep 16 + fd 17 + ]; 12 18 13 - home-manager.users.bean = { 14 - imports = [inputs.nixvim.homeModules.nixvim]; 19 + programs.neovide = lib.mkIf config.cow.gdi.enable { 20 + enable = true; 21 + settings = { 22 + fork = true; 23 + font = { 24 + normal = [{family = "monospace";}]; 25 + size = 18.0; 26 + }; 27 + title-hidden = false; 28 + }; 29 + }; 15 30 16 31 programs.nixvim = { 17 32 enable = true; ··· 21 36 vimAlias = true; 22 37 23 38 nixpkgs.pkgs = pkgs; 39 + clipboard.providers.wl-copy.enable = config.cow.gdi.enable; 24 40 25 41 globals.mapleader = " "; 26 42 27 - colorschemes.catppuccin = { 43 + colorschemes.catppuccin = lib.mkIf config.cow.cat.enable { 28 44 enable = true; 29 45 settings = { 30 46 inherit (config.catppuccin) flavor; ··· 94 110 open_neotree = {}; 95 111 }; 96 112 97 - filetype.extension.mdx = "mdx"; 113 + filetype.extension = { 114 + mdx = "mdx"; 115 + }; 98 116 99 117 opts = { 100 118 number = true; ··· 333 351 ] 334 352 ); 335 353 336 - extraPlugins = with pkgs.vimPlugins; [ 337 - {plugin = pkgs.nvim-mdx;} 338 - {plugin = satellite-nvim;} 339 - {plugin = flatten-nvim;} 340 - {plugin = tiny-devicons-auto-colors-nvim;} 341 - ]; 354 + extraPlugins = with pkgs.vimPlugins; 355 + (lib.optional config.cow.dev.web {plugin = pkgs.nvim-mdx;}) 356 + ++ [ 357 + {plugin = satellite-nvim;} 358 + {plugin = flatten-nvim;} 359 + {plugin = tiny-devicons-auto-colors-nvim;} 360 + ]; 342 361 343 362 plugins = { 344 363 telescope = { ··· 543 562 544 563 treesitter = { 545 564 enable = true; 546 - luaConfig.post = '' 565 + luaConfig.post = lib.mkIf config.cow.dev.web '' 547 566 require('mdx').setup() 548 567 ''; 549 568 settings = { ··· 554 573 illuminate.enable = true; 555 574 cursorline.enable = true; 556 575 557 - neocord = { 558 - enable = true; 559 - settings.logo = "https://raw.githubusercontent.com/IogaMaster/neovim/main/.github/assets/nixvim-dark.webp"; 560 - }; 576 + # neocord = { 577 + # enable = true; 578 + # settings.logo = "https://raw.githubusercontent.com/IogaMaster/neovim/main/.github/assets/nixvim-dark.webp"; 579 + # }; 561 580 562 581 bufdelete.enable = true; 563 582 ··· 861 880 lsp = { 862 881 inlayHints.enable = true; 863 882 864 - servers = { 865 - clangd.enable = true; 866 - astro.enable = true; 867 - hls = { 883 + servers = let 884 + inherit 885 + (config.cow.dev) 886 + dotnet 887 + python 888 + haskell 889 + rust 890 + web 891 + c 892 + ; 893 + in { 894 + clangd.enable = c; 895 + astro.enable = web; 896 + hls = lib.mkIf haskell { 868 897 enable = true; 869 898 # ghcPackage = pkgs.haskell.compiler.ghc912; 870 899 package = pkgs.haskell.packages.ghc912.haskell-language-server; 871 900 }; 872 - sqls.enable = true; 873 - mdx_analyzer = { 901 + sqls.enable = web; 902 + mdx_analyzer = lib.mkIf web { 874 903 enable = true; 875 904 package = pkgs.mdx-language-server; 876 905 }; 877 906 # denols.enable = true; 878 - ts_ls.enable = true; 879 - html.enable = true; 880 - marksman.enable = true; 881 - cssls.enable = true; 882 - tailwindcss.enable = true; # Disabled until it doesn't build nodejs from source, bad tailwind 883 - jsonls.enable = true; 884 - yamlls.enable = true; 885 - ruff.enable = true; 886 - csharp_ls.enable = true; 887 - svelte.enable = true; 907 + ts_ls.enable = web; 908 + html.enable = web; 909 + marksman.enable = web; 910 + cssls.enable = web; 911 + tailwindcss.enable = web; 912 + jsonls.enable = web; 913 + yamlls.enable = web; 914 + ruff.enable = python; 915 + csharp_ls.enable = dotnet; 916 + svelte.enable = web; 888 917 nil_ls.enable = true; 889 918 bashls.enable = true; 890 - nushell.enable = true; 891 - taplo.enable = true; 919 + nushell.enable = config.cow.nushell.enable; 920 + taplo.enable = rust; 892 921 typos_lsp.enable = true; 893 - rust_analyzer = { 922 + rust_analyzer = lib.mkIf rust { 894 923 enable = true; 895 924 package = pkgs.rust-analyzer-nightly; 896 925 packageFallback = true; 897 926 }; 898 - lemminx.enable = true; 899 - eslint.enable = true; 900 - tinymist.enable = true; 927 + lemminx.enable = web; 928 + eslint.enable = web; 901 929 just.enable = true; 902 930 }; 903 931 };
-9
nixosModules/dev/python.nix
··· 1 - {pkgs, ...}: { 2 - environment.systemPackages = with pkgs; [ 3 - python3 4 - poetry 5 - pipenv 6 - uv 7 - black 8 - ]; 9 - }
-23
nixosModules/dev/rust.nix
··· 1 - { 2 - pkgs, 3 - inputs, 4 - ... 5 - }: { 6 - nixpkgs.overlays = [ 7 - inputs.fenix.overlays.default 8 - ]; 9 - 10 - environment.systemPackages = with pkgs; [ 11 - (pkgs.fenix.complete.withComponents [ 12 - "cargo" 13 - "clippy" 14 - "rust-src" 15 - "rustc" 16 - "rustfmt" 17 - ]) 18 - rust-analyzer-nightly 19 - cargo-tauri 20 - mprocs 21 - evcxr 22 - ]; 23 - }
+104
nixosModules/disks.nix
··· 1 + {...}: { 2 + config, 3 + lib, 4 + ... 5 + }: { 6 + options.cow.disks = { 7 + enable = lib.mkEnableOption "allowing cow to create a UEFI-compatible layout"; 8 + swap = lib.mkEnableOption "look for and swapon a swap device"; 9 + luks = lib.mkEnableOption "do dev mapping for encrypted LUKS volumes"; 10 + partition-prefix = lib.mkOption { 11 + type = lib.types.nullOr lib.types.str; 12 + default = null; 13 + description = "A prefix to place before partition names (more multiboots, etc.)"; 14 + }; 15 + }; 16 + 17 + config = let 18 + conf = config.cow.disks; 19 + prefix = 20 + if conf.partition-prefix == null 21 + then "" 22 + else "${conf.partition-prefix}-"; 23 + primaryPart = "/dev/disk/by-partlabel/${prefix}NIXOS"; 24 + swapPart = "/dev/disk/by-partlabel/${prefix}SWAP"; 25 + bootPart = "/dev/disk/by-partlabel/${prefix}BOOT"; 26 + cryptroot = "/dev/mapper/cryptroot"; 27 + cryptswap = "/dev/mapper/cryptswap"; 28 + in 29 + lib.mkIf config.cow.disks.enable { 30 + boot.initrd.kernelModules = [ 31 + "nvme" 32 + "xhci_pci" 33 + "ahci" 34 + "usbhid" 35 + "usb_storage" 36 + "sd_mod" 37 + ]; 38 + boot.initrd.luks.devices = lib.mkIf conf.luks { 39 + "cryptroot" = { 40 + device = primaryPart; 41 + }; 42 + "cryptswap" = lib.mkIf conf.swap { 43 + device = swapPart; 44 + }; 45 + }; 46 + swapDevices = lib.mkIf conf.swap [ 47 + { 48 + device = 49 + if conf.luks 50 + then cryptswap 51 + else swapPart; 52 + } 53 + ]; 54 + fileSystems."/boot" = { 55 + device = bootPart; # Boot partition is always unencrypted 56 + fsType = "vfat"; 57 + options = [ 58 + "fmask=0022" 59 + "dmask=0022" 60 + "nosuid" 61 + "nodev" 62 + "noexec" 63 + "noatime" 64 + ]; 65 + }; 66 + fileSystems."/nix" = lib.mkIf config.cow.imperm.enable { 67 + device = 68 + if conf.luks 69 + then cryptroot 70 + else primaryPart; 71 + fsType = "ext4"; 72 + options = [ 73 + "lazytime" 74 + "nodev" 75 + "nosuid" 76 + ]; 77 + neededForBoot = true; 78 + }; 79 + fileSystems."/" = 80 + if config.cow.imperm.enable 81 + then { 82 + fsType = "tmpfs"; 83 + options = [ 84 + "size=512M" 85 + "mode=755" 86 + ]; 87 + neededForBoot = true; 88 + } 89 + else { 90 + device = 91 + if conf.luks 92 + then cryptroot 93 + else primaryPart; 94 + fsType = "ext4"; 95 + }; 96 + fileSystems."/home" = lib.mkIf config.cow.imperm.enable { 97 + fsType = "tmpfs"; 98 + options = [ 99 + "size=2G" 100 + ]; 101 + neededForBoot = true; 102 + }; 103 + }; 104 + }
+21
nixosModules/firewall.nix
··· 1 + {...}: { 2 + config, 3 + lib, 4 + ... 5 + }: { 6 + options.cow.firewall.openForUsers = lib.mkEnableOption "Opening firewall from HM configs for all users"; 7 + 8 + config = lib.mkIf (config.cow.hm.enable 9 + && config.cow.firewall.openForUsers) ( 10 + let 11 + getFirewall = lib.attrByPath ["cow" "firewall"] {}; 12 + allFirewalls = map getFirewall (builtins.attrValues config.home-manager.users); 13 + selectPortType = ty: builtins.foldl' (acc: elem: acc ++ elem.${ty}) []; 14 + in { 15 + networking.firewall = { 16 + allowedTCPPorts = selectPortType "tcp" allFirewalls; 17 + allowedUDPPorts = selectPortType "udp" allFirewalls; 18 + }; 19 + } 20 + ); 21 + }
-5
nixosModules/flatpak.nix
··· 1 - {pkgs, ...}: { 2 - services.flatpak.enable = true; 3 - xdg.portal.enable = true; 4 - environment.systemPackages = with pkgs; [flatpak-builder]; 5 - }
+52
nixosModules/fonts.nix
··· 1 + {...}: { 2 + pkgs, 3 + config, 4 + lib, 5 + ... 6 + }: { 7 + options.cow.fonts.enable = 8 + (lib.mkEnableOption "font management") 9 + // { 10 + default = config.cow.gdi.enable; 11 + }; 12 + 13 + config = lib.mkIf config.cow.fonts.enable { 14 + fonts = { 15 + enableDefaultPackages = true; 16 + packages = with pkgs; [ 17 + fira-code 18 + fira-go 19 + noto-fonts 20 + noto-fonts-lgc-plus 21 + noto-fonts-cjk-sans 22 + noto-fonts-cjk-serif 23 + nerd-fonts.symbols-only 24 + noto-fonts-color-emoji 25 + corefonts 26 + unifont 27 + liberation_ttf 28 + ]; 29 + fontconfig = { 30 + enable = true; 31 + defaultFonts = { 32 + serif = [ 33 + "Noto Serif" 34 + "Symbols Nerd Font" 35 + ]; 36 + sansSerif = [ 37 + "FiraGO" 38 + "Symbols Nerd Font" 39 + ]; 40 + monospace = [ 41 + "Fira Code" 42 + "Symbols Nerd Font" 43 + ]; 44 + emoji = [ 45 + "Noto Color Emoji" 46 + "Symbols Nerd Font" 47 + ]; 48 + }; 49 + }; 50 + }; 51 + }; 52 + }
-12
nixosModules/fun+graphics.nix
··· 1 - {pkgs, ...}: { 2 - environment.systemPackages = with pkgs; [ 3 - xcowsay 4 - tuxpaint 5 - ]; 6 - 7 - home-manager.users.bean.home.file."tuxpaintrc".text = '' 8 - fullscreen=native 9 - startblank=yes 10 - autosave=yes 11 - ''; 12 - }
-36
nixosModules/fun.nix
··· 1 - {pkgs, ...}: { 2 - environment.systemPackages = with pkgs; [ 3 - hyfetch 4 - fastfetch 5 - lolcat 6 - cowsay 7 - kittysay 8 - toilet 9 - gay 10 - pipes-rs 11 - ]; 12 - 13 - home-manager.users.bean.programs.nushell.shellAliases = { 14 - screensaver = "pipes-rs -k curved -p 10 --fps 30"; 15 - neofetch = "hyfetch"; 16 - }; 17 - 18 - home-manager.users.bean.programs.hyfetch = { 19 - enable = true; 20 - settings = { 21 - backend = "fastfetch"; 22 - color_align = { 23 - custom_colors = []; 24 - fore_back = null; 25 - mode = "horizontal"; 26 - }; 27 - distro = null; 28 - light_dark = "dark"; 29 - lightness = 0.65; 30 - mode = "rgb"; 31 - preset = "interprogress"; 32 - pride_month_disable = false; 33 - pride_month_shown = []; 34 - }; 35 - }; 36 - }
-18
nixosModules/games+graphics.nix
··· 1 - {pkgs, ...}: { 2 - programs.steam = { 3 - enable = true; 4 - remotePlay.openFirewall = true; 5 - dedicatedServer.openFirewall = true; 6 - localNetworkGameTransfers.openFirewall = true; 7 - extest.enable = true; 8 - }; 9 - 10 - programs.gamescope.enable = true; 11 - 12 - environment.systemPackages = with pkgs; [ 13 - prismlauncher 14 - owmods-gui 15 - owmods-cli 16 - # cemu 17 - ]; 18 - }
+30
nixosModules/gaming.nix
··· 1 + {...}: { 2 + config, 3 + lib, 4 + pkgs, 5 + ... 6 + }: { 7 + options.cow.gaming.enable = lib.mkEnableOption "Gaming stuff"; 8 + 9 + config = lib.mkIf config.cow.gaming.enable { 10 + programs.steam = { 11 + enable = true; 12 + remotePlay.openFirewall = true; 13 + dedicatedServer.openFirewall = true; 14 + localNetworkGameTransfers.openFirewall = true; 15 + extest.enable = true; 16 + }; 17 + 18 + programs.gamescope = { 19 + enable = true; 20 + capSysNice = true; 21 + }; 22 + 23 + environment.systemPackages = with pkgs; [ 24 + prismlauncher 25 + owmods-gui 26 + owmods-cli 27 + cemu 28 + ]; 29 + }; 30 + }
+51
nixosModules/gdi.nix
··· 1 + {...}: { 2 + config, 3 + lib, 4 + pkgs, 5 + ... 6 + }: { 7 + options.cow.gdi = { 8 + enable = lib.mkEnableOption "Hyprland with graphical apps, etc."; 9 + doIdle = lib.mkEnableOption "Idling the system"; 10 + showGreet = lib.mkEnableOption "Show a greeter interface that runs UWSM to launch a Wayland window manager"; 11 + }; 12 + 13 + config = lib.mkIf config.cow.gdi.enable { 14 + environment = { 15 + systemPackages = with pkgs; 16 + lib.mkIf config.cow.gdi.showGreet [ 17 + uwsm 18 + ]; 19 + variables = { 20 + NIXOS_OZONE_WL = "1"; 21 + _JAVA_AWT_WM_NONEREPARENTING = "1"; 22 + GDK_BACKEND = "wayland,x11"; 23 + ANKI_WAYLAND = "1"; 24 + MOZ_ENABLE_WAYLAND = "1"; 25 + XDG_SESSION_TYPE = "wayland"; 26 + SDL_VIDEODRIVER = "wayland"; 27 + CLUTTER_BACKEND = "wayland"; 28 + }; 29 + }; 30 + 31 + xdg.portal.extraPortals = with pkgs; [xdg-desktop-portal-gtk]; 32 + 33 + programs.hyprland = { 34 + enable = true; 35 + withUWSM = true; 36 + }; 37 + 38 + services.greetd = lib.mkIf config.cow.gdi.showGreet { 39 + enable = true; 40 + useTextGreeter = true; 41 + settings.default_session.command = let 42 + greeting = ''--greeting "Authenticate into ${lib.toUpper config.networking.hostName}"''; 43 + deCmd = pkgs.writeScript "start-session.sh" '' 44 + #!/usr/bin/env sh 45 + exec uwsm start ${pkgs.hyprland}/share/wayland-sessions/hyprland.desktop 46 + ''; 47 + cmd = ''--cmd "systemd-inhibit --what=handle-power-key:handle-lid-switch ${deCmd}"''; 48 + in "${pkgs.tuigreet}/bin/tuigreet --time ${greeting} ${cmd}"; 49 + }; 50 + }; 51 + }
-169
nixosModules/graphics/apps.nix
··· 1 - {pkgs, ...}: { 2 - # Desktop entry to launch htop 3 - home-manager.users.bean.xdg.dataFile."applications/htop.desktop".text = '' 4 - [Desktop Entry] 5 - Type=Application 6 - Name=Htop 7 - Exec=wezterm start --class="htop" htop 8 - Icon=htop 9 - ''; 10 - 11 - environment.wordlist.enable = true; 12 - services.usbmuxd.enable = true; 13 - 14 - home-manager.users.bean.xdg.configFile = { 15 - # "Nickvision Cavalier/cava_config".text = '' 16 - # [general] 17 - # framerate = 144 18 - # bars = 100 19 - # autosens = 1 20 - # sensitivity = 100 21 - # [input] 22 - # method = pulse 23 - # [output] 24 - # method = raw 25 - # raw_target = /dev/stdout 26 - # bit_format = 16bit 27 - # channels = stereo 28 - # [smoothing] 29 - # monstercat = 1 30 - # noise_reduction = 77 31 - # ''; 32 - # 33 - # "Nickvision Cavalier/config.json".text = 34 - # builtins.toJSON 35 - # { 36 - # ActiveProfile = 0; 37 - # AreaMargin = 40; 38 - # AreaOffsetX = 0; 39 - # AreaOffsetY = 0; 40 - # AutohideHeader = false; 41 - # Autosens = true; 42 - # BarPairs = 50; 43 - # BgImageAlpha = 1; 44 - # BgImageIndex = -1; 45 - # BgImageScale = 1; 46 - # Borderless = true; 47 - # ColorProfiles = [ 48 - # { 49 - # BgColors = ["#ff000000"]; 50 - # FgColors = ["#ffa51d2d" "#ffff7800" "#fff8e45c" "#ff2ec27e" "#ff1c71d8" "#ffdc8add"]; 51 - # Name = "Default"; 52 - # Theme = 1; 53 - # } 54 - # ]; 55 - # Direction = 1; 56 - # FgImageAlpha = 1; 57 - # FgImageIndex = -1; 58 - # FgImageScale = 1; 59 - # Filling = true; 60 - # Framerate = 144; 61 - # InnerRadius = 0.5; 62 - # ItemsOffset = 0.1; 63 - # ItemsRoundness = 0.5; 64 - # LinesThickness = 5; 65 - # Mirror = 0; 66 - # Mode = 3; 67 - # Monstercat = true; 68 - # NoiseReduction = 0.77; 69 - # ReverseMirror = false; 70 - # ReverseOrder = true; 71 - # Rotation = 0; 72 - # Sensitivity = 10; 73 - # SharpCorners = true; 74 - # ShowControls = true; 75 - # Stereo = true; 76 - # WindowHeight = 300; 77 - # WindowMaximized = true; 78 - # WindowWidth = 500; 79 - # }; 80 - 81 - "htop/htoprc".text = '' 82 - htop_version=3.3.0 83 - config_reader_min_version=3 84 - fields=0 3 2 18 46 47 39 1 85 - hide_kernel_threads=1 86 - hide_userland_threads=0 87 - hide_running_in_container=0 88 - shadow_other_users=0 89 - show_thread_names=1 90 - show_program_path=0 91 - highlight_base_name=1 92 - highlight_deleted_exe=0 93 - shadow_distribution_path_prefix=0 94 - highlight_megabytes=1 95 - highlight_threads=1 96 - highlight_changes=0 97 - highlight_changes_delay_secs=5 98 - find_comm_in_cmdline=1 99 - strip_exe_from_cmdline=1 100 - show_merged_command=0 101 - header_margin=1 102 - screen_tabs=1 103 - detailed_cpu_time=0 104 - cpu_count_from_one=1 105 - show_cpu_usage=1 106 - show_cpu_frequency=0 107 - show_cpu_temperature=1 108 - degree_fahrenheit=0 109 - update_process_names=0 110 - account_guest_in_cpu_meter=1 111 - color_scheme=0 112 - enable_mouse=1 113 - delay=15 114 - hide_function_bar=0 115 - header_layout=two_67_33 116 - column_meters_0=System Hostname Date Clock Uptime Tasks CPU AllCPUs4 MemorySwap 117 - column_meter_modes_0=2 2 2 2 2 2 2 1 1 118 - column_meters_1=DiskIO DiskIO Blank NetworkIO NetworkIO 119 - column_meter_modes_1=2 3 2 2 3 120 - tree_view=0 121 - sort_key=46 122 - tree_sort_key=0 123 - sort_direction=-1 124 - tree_sort_direction=1 125 - tree_view_always_by_pid=0 126 - all_branches_collapsed=0 127 - screen:Main=PID PPID STATE NICE PERCENT_CPU PERCENT_MEM M_RESIDENT Command 128 - .sort_key=PERCENT_CPU 129 - .tree_sort_key=PID 130 - .tree_view_always_by_pid=0 131 - .tree_view=0 132 - .sort_direction=-1 133 - .tree_sort_direction=1 134 - .all_branches_collapsed=0 135 - screen:Tree=PID PPID PGRP PROCESSOR TTY USER SESSION Command 136 - .sort_key=PID 137 - .tree_sort_key=PID 138 - .tree_view_always_by_pid=0 139 - .tree_view=1 140 - .sort_direction=1 141 - .tree_sort_direction=1 142 - .all_branches_collapsed=0 143 - screen:I/O=PID PPID IO_READ_RATE IO_WRITE_RATE Command 144 - .sort_key=IO_RATE 145 - .tree_sort_key=PID 146 - .tree_view_always_by_pid=0 147 - .tree_view=0 148 - .sort_direction=-1 149 - .tree_sort_direction=1 150 - .all_branches_collapsed=0 151 - ''; 152 - }; 153 - 154 - environment.systemPackages = with pkgs; [ 155 - # Office 156 - libreoffice-qt6 157 - 158 - ## Media 159 - obs-studio 160 - loupe 161 - inkscape 162 - lorien 163 - cavalier 164 - zoom-us 165 - 166 - ## 3D 167 - # prusa-slicer 168 - ]; 169 - }
-40
nixosModules/graphics/audio.nix
··· 1 - {pkgs, ...}: { 2 - # When you squint and don't think about it, audio is graphics (I don't wanna make another role bc why would I do that) 3 - services.pulseaudio.enable = false; 4 - 5 - security.rtkit.enable = true; # Allows pipewire and friends to run realtime 6 - 7 - environment.systemPackages = with pkgs; [ 8 - playerctl 9 - ]; 10 - 11 - services.playerctld.enable = true; 12 - 13 - # Used for SDR control, I don't need it rn 14 - # hardware.rtl-sdr.enable = true; 15 - # users.users.bean.extraGroups = ["plugdev"]; 16 - 17 - home-manager.users.bean.wayland.windowManager.hyprland.settings = { 18 - bindl = [ 19 - ",XF86AudioPlay,exec,playerctl play-pause" 20 - ",XF86AudioPause,exec,playerctl pause" 21 - ",XF86AudioStop,exec,playerctl stop" 22 - ",XF86AudioNext,exec,playerctl next" 23 - ",XF86AudioPrev,exec,playerctl previous" 24 - ]; 25 - bindel = [ 26 - ",XF86AudioRaiseVolume,exec,uwsm app -- swayosd-client --output-volume raise" 27 - ",XF86AudioLowerVolume,exec,uwsm app -- swayosd-client --output-volume lower" 28 - ",XF86AudioMute,exec,uwsm app -- swayosd-client --output-volume mute-toggle" 29 - ]; 30 - }; 31 - 32 - services.pipewire = { 33 - enable = true; 34 - pulse.enable = true; 35 - alsa = { 36 - enable = true; 37 - support32Bit = true; 38 - }; 39 - }; 40 - }
+7 -56
nixosModules/graphics/firefox.nix homeModules/firefox.nix
··· 1 - { 1 + {...}: { 2 2 lib, 3 3 pkgs, 4 + config, 4 5 ... 5 6 }: let 6 7 package = pkgs.firefox-devedition; 7 8 in { 8 - environment.systemPackages = [ 9 - package 10 - ]; 11 - 12 - services.searx = { 13 - enable = true; 14 - redisCreateLocally = true; 15 - settings = { 16 - ui = { 17 - query_in_title = true; 18 - infinite_scroll = true; 19 - theme_args.simple_style = "black"; 20 - }; 21 - 22 - search = { 23 - autocomplete = "duckduckgo"; 24 - favicon_resolver = "duckduckgo"; 25 - }; 26 - 27 - server = { 28 - base_address = "http://localhost:6009"; 29 - bind_address = "127.0.0.1"; 30 - port = "6009"; 31 - method = "GET"; 32 - secret_key = "idontreallythinkineedtokeepthisasecrettbh"; 33 - }; 34 - 35 - plugins = lib.mapAttrs' (k: v: lib.nameValuePair "searx.plugins.${k}.SXNGPlugin" v) { 36 - calculator.active = true; 37 - hash_plugin.active = true; 38 - self_info.active = true; 39 - tracker_url_remover.active = true; 40 - unit_converter.active = true; 41 - ahmia_filter.active = false; 42 - oa_doi_rewrite.active = true; 43 - }; 44 - }; 9 + options.cow.firefox.enable = lib.mkEnableOption "enable Firefox with customizations"; 45 10 46 - faviconsSettings.favicons = { 47 - cfg_schema = 1; 48 - cache = { 49 - db_url = "/var/cache/searx/faviconcache.db"; 50 - HOLD_TIME = 5184000; 51 - LIMIT_TOTAL_BYTES = 1073741824; 52 - BLOB_MAX_BYTES = 40960; 53 - MAINTENANCE_MODE = "auto"; 54 - MAINTENANCE_PERIOD = 600; 55 - }; 56 - }; 57 - }; 11 + config = lib.mkIf config.cow.firefox.enable { 12 + cow.imperm.keep = [".mozilla"]; 58 13 59 - home-manager.users.bean = { 60 14 programs.firefox = { 61 15 inherit package; 62 16 enable = true; ··· 202 156 }; 203 157 search = { 204 158 force = true; 205 - default = "SearXNG"; 206 - privateDefault = "SearXNG"; 159 + default = "ddg"; 160 + privateDefault = "ddg"; 207 161 engines = let 208 162 mkEngineForceFavicon = aliases: queryUrl: iconUrl: { 209 163 definedAliases = aliases; ··· 218 172 in "${noPath}/favicon.${iconExt}" 219 173 )); 220 174 in { 221 - # Meta 222 - "SearXNG" = mkEngine ["@sx" "@@"] "http://localhost:6009/search?q={searchTerms}" "ico"; 223 - 224 175 # Dev 225 176 "GitHub Repos" = 226 177 mkEngineForceFavicon ["@gh" "@github"]
-32
nixosModules/graphics/fonts.nix
··· 1 - {pkgs, ...}: { 2 - fonts = { 3 - packages = with pkgs; [ 4 - fira-code 5 - fira-go 6 - nerd-fonts.symbols-only 7 - noto-fonts-color-emoji 8 - unifont 9 - liberation_ttf 10 - ]; 11 - fontconfig = { 12 - enable = true; 13 - defaultFonts = let 14 - mainFonts = [ 15 - "FiraGO" 16 - "Symbols Nerd Font" 17 - ]; 18 - in { 19 - serif = mainFonts; 20 - sansSerif = mainFonts; 21 - monospace = [ 22 - "Fira Code" 23 - "Symbols Nerd Font" 24 - ]; 25 - emoji = [ 26 - "Noto Color Emoji" 27 - "Symbols Nerd Font" 28 - ]; 29 - }; 30 - }; 31 - }; 32 - }
-22
nixosModules/graphics/greeter.nix
··· 1 - { 2 - pkgs, 3 - config, 4 - lib, 5 - ... 6 - }: { 7 - services.greetd = { 8 - enable = true; 9 - settings = { 10 - default_session = let 11 - greeting = ''--greeting "Authenticate into ${lib.toUpper config.networking.hostName}"''; 12 - deCmd = pkgs.writeScript "start-session.sh" '' 13 - #!/usr/bin/env sh 14 - exec uwsm start ${pkgs.hyprland}/share/wayland-sessions/hyprland.desktop 15 - ''; 16 - cmd = ''--cmd "systemd-inhibit --what=handle-power-key:handle-lid-switch ${deCmd}"''; 17 - in { 18 - command = "${pkgs.tuigreet}/bin/tuigreet --remember --time ${greeting} ${cmd}"; 19 - }; 20 - }; 21 - }; 22 - }
-142
nixosModules/graphics/hypr.nix
··· 1 - {pkgs, ...}: { 2 - environment = { 3 - systemPackages = with pkgs; [ 4 - hyprpicker 5 - uwsm 6 - ]; 7 - variables = { 8 - NIXOS_OZONE_WL = "1"; 9 - _JAVA_AWT_WM_NONEREPARENTING = "1"; 10 - GDK_BACKEND = "wayland,x11"; 11 - ANKI_WAYLAND = "1"; 12 - MOZ_ENABLE_WAYLAND = "1"; 13 - XDG_SESSION_TYPE = "wayland"; 14 - SDL_VIDEODRIVER = "wayland"; 15 - CLUTTER_BACKEND = "wayland"; 16 - }; 17 - }; 18 - 19 - xdg.portal.extraPortals = with pkgs; [xdg-desktop-portal-gtk]; 20 - 21 - programs.hyprland = { 22 - enable = true; 23 - withUWSM = true; 24 - }; 25 - 26 - home-manager.users.bean = { 27 - wayland.systemd.target = "wayland-session@hyprland.desktop.target"; 28 - wayland.windowManager.hyprland = { 29 - systemd.enable = false; 30 - enable = true; 31 - extraConfig = '' 32 - bind = SUPER,M,submap,passthru 33 - submap = passthru 34 - bind = SUPER,ESCAPE,submap,reset 35 - submap = reset 36 - ''; 37 - settings = { 38 - autogenerated = 0; 39 - ecosystem = { 40 - no_update_news = true; 41 - no_donation_nag = true; 42 - }; 43 - cursor = { 44 - no_hardware_cursors = true; 45 - enable_hyprcursor = false; 46 - }; 47 - monitor = [ 48 - ",highres,auto,1" 49 - ]; 50 - general = { 51 - border_size = 2; 52 - resize_on_border = true; 53 - "col.active_border" = "$red $peach $yellow $green $sapphire $lavender $mauve 225deg"; 54 - }; 55 - decoration = { 56 - rounding = 10; 57 - }; 58 - input = { 59 - numlock_by_default = true; 60 - kb_options = "caps:escape"; 61 - touchpad = { 62 - natural_scroll = true; 63 - }; 64 - }; 65 - xwayland = { 66 - force_zero_scaling = true; 67 - }; 68 - # debug = { 69 - # disable_logs = false; 70 - # }; 71 - misc = { 72 - enable_swallow = true; 73 - disable_hyprland_logo = true; 74 - disable_splash_rendering = true; 75 - focus_on_activate = true; 76 - mouse_move_enables_dpms = true; 77 - key_press_enables_dpms = true; 78 - }; 79 - env = [ 80 - "TERMINAL,wezterm" 81 - "QT_QPA_PLATFORM,wayland;xcb" 82 - "QT_AUTO_SCREEN_SCALE_FACTOR,1" 83 - ]; 84 - windowrulev2 = [ 85 - "idleinhibit fullscreen,class:(.*),title:(.*)" 86 - ]; 87 - submap = "reset"; 88 - gesture = [ 89 - "3,horizontal,workspace" 90 - "4,swipe,move" 91 - ]; 92 - bind = let 93 - openTerminal = "uwsm app -- org.wezfurlong.wezterm.desktop"; 94 - forEachWorkspace = { 95 - mod, 96 - dispatch, 97 - }: 98 - builtins.genList ( 99 - i: let 100 - num = builtins.toString i; 101 - in "${mod},${num},${dispatch},${ 102 - if num == "0" 103 - then "10" 104 - else num 105 - }" 106 - ) 107 - 10; 108 - in 109 - [ 110 - "SUPER,M,submap,passthru" 111 - "SUPER,Q,exec,uwsm app -- firefox-devedition.desktop" 112 - "SUPER,Z,exec,systemctl suspend" 113 - ",XF86AudioMedia,exec,${openTerminal}" 114 - "SUPER,T,exec,${openTerminal}" 115 - "SUPER ALT CTRL SHIFT,L,exec,xdg-open https://linkedin.com" 116 - "SUPER,C,killactive," 117 - "SUPER,P,pseudo," 118 - "SUPER,R,togglefloating," 119 - "SUPER,F,fullscreen,1" 120 - "SUPER SHIFT,F,fullscreen,0" 121 - ",XF86RFKill,exec,rfkill toggle wifi" 122 - "SUPER,left,workspace,r-1" 123 - "SUPER,right,workspace,r+1" 124 - "SUPER SHIFT,left,movetoworkspace,r-1" 125 - "SUPER SHIFT,right,movetoworkspace,r+1" 126 - ] 127 - ++ forEachWorkspace { 128 - mod = "SUPER"; 129 - dispatch = "workspace"; 130 - } 131 - ++ forEachWorkspace { 132 - mod = "SUPER SHIFT"; 133 - dispatch = "movetoworkspace"; 134 - }; 135 - bindm = [ 136 - "SUPER,mouse:272,movewindow" 137 - "SUPER,mouse:273,resizewindow" 138 - ]; 139 - }; 140 - }; 141 - }; 142 - }
-115
nixosModules/graphics/lock.nix
··· 1 - {pkgs, ...}: { 2 - home-manager.users.bean = { 3 - catppuccin.hyprlock.useDefaultConfig = false; 4 - wayland.windowManager.hyprland.settings = { 5 - bind = [ 6 - "SUPER,L,exec,pidof hyprlock || hyprlock --immediate" 7 - ]; 8 - }; 9 - 10 - programs.hyprlock = { 11 - enable = true; 12 - 13 - settings = { 14 - background = { 15 - monitor = ""; 16 - path = "${../../res/pictures/background.png}"; 17 - blur_passes = 1; 18 - }; 19 - shape = [ 20 - { 21 - monitor = ""; 22 - color = "$crust"; 23 - position = "0, 30"; 24 - rounding = 10; 25 - border_size = 2; 26 - border_color = "$mauve"; 27 - size = "500, 500"; 28 - shadow_passes = 1; 29 - shadow_size = 2; 30 - } 31 - { 32 - monitor = ""; 33 - color = "$crust"; 34 - position = "0, -30"; 35 - rounding = 10; 36 - border_size = 2; 37 - border_color = "$mauve"; 38 - size = "600, 50"; 39 - valign = "top"; 40 - shadow_passes = 1; 41 - shadow_size = 2; 42 - } 43 - ]; 44 - image = { 45 - monitor = ""; 46 - path = "${../../res/pictures/cow.png}"; 47 - size = 150; 48 - rounding = -1; 49 - border_size = 4; 50 - border_color = "$mauve"; 51 - rotate = 0; 52 - position = "0, 120"; 53 - halign = "center"; 54 - valign = "center"; 55 - }; 56 - "input-field" = { 57 - monitor = ""; 58 - size = "250, 50"; 59 - outline_thickness = 2; 60 - dots_size = 0.25; # Scale of input-field height, 0.2 - 0.8 61 - dots_spacing = 0.15; # Scale of dots' absolute size, 0.0 - 1.0 62 - dots_center = false; 63 - dots_rounding = -1; # -1 default circle, -2 follow input-field rounding 64 - outer_color = "$surface0"; 65 - inner_color = "$base"; 66 - font_color = "$text"; 67 - fade_on_empty = false; 68 - fade_timeout = 1000; # Milliseconds before fade_on_empty is triggered. 69 - placeholder_text = ''<span foreground="##cdd6f4" style="italic">Password</span>''; 70 - hide_input = false; 71 - rounding = -1; # -1 means complete rounding (circle/oval) 72 - check_color = "$peach"; 73 - fail_color = "$red"; # if authentication failed, changes outer_color and fail message color 74 - fail_text = "<i>$FAIL <b>($ATTEMPTS)</b></i>"; 75 - fail_transition = 300; # transition time in ms between normal outer_color and fail_color 76 - capslock_color = -1; 77 - numlock_color = -1; 78 - bothlock_color = -1; # when both locks are active. -1 means don't change outer color (same for above) 79 - invert_numlock = false; # change color if numlock is off 80 - swap_font_color = false; # see below 81 - 82 - position = "0, -80"; 83 - halign = "center"; 84 - valign = "center"; 85 - }; 86 - label = [ 87 - { 88 - monitor = ""; 89 - text = "$DESC"; 90 - color = "$text"; 91 - font_size = 25; 92 - font_family = "sans-serif"; 93 - rotate = 0; # degrees, counter-clockwise 94 - 95 - position = "0, 0"; 96 - halign = "center"; 97 - valign = "center"; 98 - } 99 - { 100 - monitor = ""; 101 - text = ''cmd[update:30000] echo " $(date +"%A, %B %-d | %I:%M %p") | $(${pkgs.nushell}/bin/nu ${../../res/bat_display.nu}) "''; 102 - color = "$text"; 103 - font_size = 20; 104 - font_family = "sans-serif"; 105 - rotate = 0; # degrees, counter-clockwise 106 - 107 - position = "0, -40"; 108 - halign = "center"; 109 - valign = "top"; 110 - } 111 - ]; 112 - }; 113 - }; 114 - }; 115 - }
+21 -7
nixosModules/graphics/news.nix homeModules/news.nix
··· 1 - {pkgs, ...}: let 1 + {...}: { 2 + pkgs, 3 + config, 4 + lib, 5 + ... 6 + }: let 2 7 yt-feed = id: { 3 8 url = "https://www.youtube.com/feeds/videos.xml?channel_id=" + id; 4 9 tags = [ ··· 35 40 "UCJXa3_WNNmIpewOtCHf3B0g" # LaurieWired 36 41 ]; 37 42 in { 38 - environment.systemPackages = with pkgs; [ 39 - w3m 40 - rdrview 41 - ]; 43 + options.cow.news.enable = lib.mkEnableOption "news feeds with newsboat"; 42 44 43 - home-manager.users.bean = { 45 + config = lib.mkIf config.cow.news.enable { 46 + cow.imperm.keep = [".local/share/newsboat"]; 47 + 48 + home.packages = with pkgs; [ 49 + w3m 50 + rdrview 51 + ]; 52 + 44 53 xdg.dataFile."applications/newsboat.desktop".text = '' 45 54 [Desktop Entry] 46 55 Type=Application ··· 50 59 51 60 programs.newsboat = { 52 61 enable = true; 53 - browser = ''"${../../res/news-open.nu} %u"''; 62 + browser = ''"${../res/news-open.nu} %u"''; 54 63 55 64 # notify-program ${../res/news-notify.nu} 56 65 ··· 303 312 { 304 313 title = "Anil Dash"; 305 314 url = "https://www.anildash.com/feed.xml"; 315 + tags = ["personal-blog"]; 316 + } 317 + { 318 + title = "Ben Romer"; 319 + url = "https://www.cyborgcentral.net/feed"; 306 320 tags = ["personal-blog"]; 307 321 } 308 322 {
-25
nixosModules/graphics/printing.nix
··· 1 - {...}: { 2 - services.printing = { 3 - enable = true; 4 - stateless = true; 5 - }; 6 - 7 - users.users.bean.extraGroups = ["lpadmin"]; 8 - 9 - hardware.printers = { 10 - ensurePrinters = [ 11 - { 12 - name = "RamPrint"; 13 - description = "WCU RamPrint"; 14 - deviceUri = "https://wcuprintp01.wcupa.net:9164/printers/RamPrint"; 15 - model = "drv:///sample.drv/generic.ppd"; 16 - } 17 - { 18 - name = "FHG_IMC_Color"; 19 - description = "FHG IMC Color"; 20 - deviceUri = "https://wcuprintp01.wcupa.net:9164/printers/FHG_IMC_Color"; 21 - model = "drv:///sample.drv/generic.ppd"; 22 - } 23 - ]; 24 - }; 25 - }
-374
nixosModules/graphics/qmplay2.nix
··· 1 - { 2 - pkgs, 3 - lib, 4 - ... 5 - }: let 6 - mkQMPlayFile = lib.generators.toINI {}; 7 - mkConfigDir = files: 8 - lib.mapAttrs' ( 9 - name: value: lib.nameValuePair ("QMPlay2/" + name + ".ini") {text = mkQMPlayFile value;} 10 - ) 11 - files; 12 - in { 13 - environment.systemPackages = with pkgs; [ 14 - qmplay2 15 - ]; 16 - 17 - home-manager.users.bean.xdg.configFile = mkConfigDir { 18 - ALSA.General = { 19 - AutoFindMultichnDev = true; 20 - Delay = 0.1; 21 - OutputDevice = "default"; 22 - WriterEnabled = true; 23 - }; 24 - AudioCD.AudioCD = { 25 - CDDB = true; 26 - CDTEXT = true; 27 - }; 28 - AudioFilters = { 29 - General = { 30 - AVAudioFilter = false; 31 - BS2B = false; 32 - Compressor = false; 33 - Echo = false; 34 - Equalizer = false; 35 - PhaseReverse = false; 36 - SwapStereo = false; 37 - VoiceRemoval = false; 38 - }; 39 - 40 - AVAudioFilter.Filters = "@ByteArray()"; 41 - 42 - BS2B = { 43 - Fcut = 700; 44 - Feed = 4.5; 45 - }; 46 - 47 - Compressor = { 48 - FastGainCompressionRatio = 0.9; 49 - OverallCompressionRatio = 0.6; 50 - PeakPercent = 90; 51 - ReleaseTime = 0.2; 52 - }; 53 - 54 - Echo = { 55 - Delay = 500; 56 - Feedback = 50; 57 - Surround = false; 58 - Volume = 50; 59 - }; 60 - 61 - Equalizer = { 62 - "-1" = 50; 63 - "0" = 50; 64 - "1" = 50; 65 - "2" = 50; 66 - "3" = 50; 67 - "4" = 50; 68 - "5" = 50; 69 - "6" = 50; 70 - "7" = 50; 71 - count = 8; 72 - maxFreq = 18000; 73 - minFreq = 200; 74 - nbits = 10; 75 - }; 76 - 77 - PhaseReverse = { 78 - ReverseRight = false; 79 - }; 80 - }; 81 - CUVID.General = { 82 - DecodeMPEG4 = true; 83 - DeintMethod = 2; 84 - Enabled = true; 85 - }; 86 - Chiptune.General = { 87 - DefaultLength = 180; 88 - GME = true; 89 - SIDPlay = true; 90 - }; 91 - Extensions = { 92 - LastFM = { 93 - AllowBigCovers = true; 94 - DownloadCovers = true; 95 - Login = null; 96 - Password = null; 97 - UpdateNowPlayingAndScrobble = false; 98 - }; 99 - 100 - MPRIS2.Enabled = true; 101 - 102 - YouTube = { 103 - ShowUserName = false; 104 - SortBy = 0; 105 - Subtitles = true; 106 - }; 107 - }; 108 - FFmpeg.General = { 109 - AllowExperimental = true; 110 - DecoderEnabled = true; 111 - DecoderVAAPIEnabled = true; 112 - DecoderVkVideoEnabled = true; 113 - DemuxerEnabled = true; 114 - ForceSkipFrames = false; 115 - HurryUP = true; 116 - LowresValue = 0; 117 - ReconnectNetwork = true; 118 - SkipFrames = true; 119 - TeletextPage = 0; 120 - TeletextTransparent = false; 121 - ThreadTypeSlice = false; 122 - Threads = 0; 123 - VAAPIDeintMethod = 1; 124 - }; 125 - Modplug.General = { 126 - ModplugEnabled = true; 127 - ModplugResamplingMethod = 3; 128 - }; 129 - Notify.General = { 130 - CustomBody = null; 131 - CustomMsg = false; 132 - CustomSummary = null; 133 - Enabled = false; 134 - ShowPlayState = true; 135 - ShowTitle = true; 136 - ShowVolume = true; 137 - Timeout = 5000; 138 - }; 139 - Playlists.General = { 140 - M3U_enabled = true; 141 - XSPF_enabled = true; 142 - }; 143 - PulseAudio.General = { 144 - Delay = 0.1; 145 - WriterEnabled = true; 146 - }; 147 - QMPlay2 = { 148 - General = { 149 - AVBufferLocal = 100; 150 - AVBufferTimeNetwork = 500; 151 - AVBufferTimeNetworkLive = 5; 152 - AccurateSeek = 2; 153 - AllowOnlyOneInstance = false; 154 - AudioLanguage = null; 155 - AutoDelNonGroupEntries = false; 156 - AutoOpenVideoWindow = true; 157 - AutoRestoreMainWindowOnVideo = true; 158 - AutoUpdates = false; 159 - BackwardBuffer = 1; 160 - BlurCovers = true; 161 - Channels = 2; 162 - DisableSubtitlesAtStartup = false; 163 - DisplayOnlyFileName = false; 164 - EnlargeCovers = false; 165 - FallbackSubtitlesEncoding = "@ByteArray(UTF-8)"; 166 - ForceChannels = 0; 167 - ForceSamplerate = false; 168 - HideArtistMetadata = false; 169 - IconsFromTheme = true; 170 - IgnorePlaybackError = false; 171 - KeepARatio = false; 172 - KeepSpeed = false; 173 - KeepSubtitlesDelay = false; 174 - KeepSubtitlesScale = false; 175 - KeepVideoDelay = false; 176 - KeepZoom = false; 177 - LastQMPlay2Path = "${pkgs.qmplay2}/bin"; 178 - LeftMouseTogglePlay = 0; 179 - LongSeek = 30; 180 - MaxVol = 100; 181 - MiddleMouseToggleFullscreen = false; 182 - Mute = false; 183 - NoCoversCache = false; 184 - OutputFilePath = "/home/bean/Downloads"; 185 - PlayIfBuffered = 1.75; 186 - Renderer = "opengl"; 187 - RepeatMode = 0; 188 - ResamplerFirst = true; 189 - RestoreAVSState = false; 190 - RestoreRepeatMode = false; 191 - RestoreVideoEqualizer = false; 192 - Samplerate = 48000; 193 - SavePos = false; 194 - ShortSeek = 5; 195 - ShowBufferedTimeOnSlider = true; 196 - ShowCovers = true; 197 - ShowDirCovers = true; 198 - Silence = true; 199 - SkipPlaylistsWithinFiles = true; 200 - SkipYtDlpUpdate = false; 201 - StillImages = false; 202 - StoreARatioAndZoom = false; 203 - StoreUrlPos = true; 204 - Style = "kvantum"; 205 - SubtitlesLanguage = null; 206 - SyncVtoA = true; 207 - TrayNotifiesDefault = false; 208 - TrayVisible = true; 209 - UnpauseWhenSeeking = false; 210 - UpdateVersion = pkgs.qmplay2.version; 211 - Version = "@ByteArray(${pkgs.qmplay2.version})"; 212 - VideoFilters = "0FPS Doubler"; 213 - VolumeL = 100; 214 - VolumeR = 100; 215 - WheelAction = true; 216 - WheelSeek = true; 217 - screenshotFormat = ".png"; 218 - screenshotPth = "/home/bean/Pictures/Screenshots"; 219 - }; 220 - 221 - ApplyToASS = { 222 - ApplyToASS = false; 223 - ColorsAndBorders = true; 224 - FontsAndSpacing = false; 225 - MarginsAndAlignment = false; 226 - }; 227 - 228 - Deinterlace = { 229 - Auto = true; 230 - AutoParity = true; 231 - Doubler = true; 232 - ON = true; 233 - SoftwareMethod = ''Yadif 2x''; 234 - TFF = false; 235 - }; 236 - 237 - MainWidget = { 238 - AlwaysOnTop = false; 239 - CompactViewDockWidgetState = ''@ByteArray()''; 240 - DockWidgetState = ''@ByteArray()''; 241 - FullScreenDockWidgetState = ''@ByteArray()''; 242 - Geometry = ''@Rect(226 151 1805 1203)''; 243 - IsCompactView = false; 244 - KeepDocksSize = false; 245 - TabPositionNorth = false; 246 - WidgetsLocked = true; 247 - isMaximized = true; 248 - isVisible = true; 249 - }; 250 - 251 - OSD = { 252 - Alignment = 4; 253 - Background = false; 254 - BackgroundColor = ''@Variant(\0\0\0\x43\x1\x88\x88\0\0\0\0\0\0\0\0)''; 255 - Bold = false; 256 - Enabled = true; 257 - FontName = "Sans Serif"; 258 - FontSize = 32; 259 - LeftMargin = 0; 260 - Outline = 1.5; 261 - OutlineColor = ''@Variant(\0\0\0\x43\x1\xff\xff\0\0\0\0\0\0\0\0)''; 262 - RightMargin = 0; 263 - Shadow = 1.5; 264 - ShadowColor = ''@Variant(\0\0\0\x43\x1\xff\xff\0\0\0\0\0\0\0\0)''; 265 - Spacing = 0; 266 - TextColor = ''@Variant(\0\0\0\x43\x1\xff\xff\xaa\xaa\xff\xffUU\0\0)''; 267 - VMargin = 0; 268 - }; 269 - 270 - OpenGL = { 271 - BypassCompositor = false; 272 - OnWindow = false; 273 - VSync = true; 274 - }; 275 - 276 - Proxy = { 277 - Host = null; 278 - Login = false; 279 - Password = ''@ByteArray()''; 280 - Port = 80; 281 - Use = false; 282 - User = null; 283 - }; 284 - 285 - ReplayGain = { 286 - Album = false; 287 - Enabled = false; 288 - Preamp = 0; 289 - PreventClipping = true; 290 - }; 291 - 292 - SettingsWidget.Geometry = ''@Rect(395 263 2212 1308)''; 293 - 294 - Subtitles = { 295 - Alignment = 7; 296 - Background = true; 297 - BackgroundColor = ''@Variant(\0\0\0\x43\x1\x88\x88\0\0\0\0\0\0\0\0)''; 298 - Bold = false; 299 - FontName = "Fira Code"; 300 - FontSize = 24; 301 - LeftMargin = 15; 302 - Outline = 1; 303 - OutlineColor = ''@Variant(\0\0\0\x43\x1\xff\xff\0\0\0\0\0\0\0\0)''; 304 - RightMargin = 15; 305 - Shadow = 0.5; 306 - ShadowColor = ''@Variant(\0\0\0\x43\x1\xff\xff\0\0\0\0\0\0\0\0)''; 307 - Spacing = 2; 308 - TextColor = ''@Variant(\0\0\0\x43\x1\xff\xff\xff\xff\xff\xff\xff\xff\0\0)''; 309 - VMargin = 15; 310 - }; 311 - 312 - VideoAdjustment = { 313 - Brightness = 0; 314 - Contrast = 0; 315 - Hue = 0; 316 - Negative = 0; 317 - Saturation = 0; 318 - Sharpness = 0; 319 - }; 320 - 321 - Vulkan = { 322 - AlwaysGPUDeint = true; 323 - BypassCompositor = true; 324 - Device = "@ByteArray()"; 325 - ForceVulkanYadif = false; 326 - HDR = false; 327 - HQScaleDown = false; 328 - HQScaleUp = false; 329 - VSync = 1; 330 - YadifSpatialCheck = true; 331 - }; 332 - 333 - YtDl = { 334 - CookiesFromBrowser = null; 335 - CookiesFromBrowserEnabled = false; 336 - CustomPath = "${pkgs.yt-dlp}/bin/yt-dlp"; 337 - CustomPathEnabled = true; 338 - DefaultQuality = null; 339 - DefaultQualityEnabled = false; 340 - DontAutoUpdate = true; 341 - }; 342 - }; 343 - QPainterSW.General.Enabled = true; 344 - Subtitles.General = { 345 - Classic_enabled = true; 346 - SRT_enabled = true; 347 - Sub_max_s = 5; 348 - Use_mDVD_FPS = true; 349 - }; 350 - VideoFilters.FPSDoubler = { 351 - MaxFPS = 29.99; 352 - MinFPS = 21; 353 - OnlyFullScreen = true; 354 - }; 355 - Visualizations = { 356 - General = { 357 - RefreshTime = 17; 358 - }; 359 - 360 - FFTSpectrum = { 361 - LimitFreq = 20000; 362 - Size = 8; 363 - }; 364 - 365 - SimpleVis = { 366 - SoundLength = 17; 367 - }; 368 - }; 369 - XVideo.General = { 370 - Enabled = false; 371 - UseSHM = false; 372 - }; 373 - }; 374 - }
-343
nixosModules/graphics/shell.nix
··· 1 - { 2 - pkgs, 3 - config, 4 - lib, 5 - inputs', 6 - ... 7 - }: { 8 - users.users.bean.extraGroups = ["video"]; 9 - 10 - nixpkgs.overlays = [ 11 - (next: prev: { 12 - wl-clipboard = prev.wl-clipboard.overrideAttrs { 13 - src = pkgs.fetchFromGitHub { 14 - owner = "bugaevc"; 15 - repo = "wl-clipboard"; 16 - rev = "424517085c45849edfeff72a4e3cc0724f54404a"; 17 - sha256 = "sha256-SueQw+/fR9B7Vbw4SvkaBN8Ifu1dMp3ymDr3a0lTdSs="; 18 - }; 19 - }; 20 - }) 21 - ]; 22 - 23 - environment.systemPackages = with pkgs; [ 24 - # Shell Components 25 - hyprlock 26 - hyprland-qtutils 27 - 28 - ## Waybar 29 - qt6.qttools # For component 30 - 31 - pavucontrol 32 - 33 - wf-recorder 34 - slurp 35 - grim 36 - xdg-utils 37 - grimblast 38 - tesseract 39 - swappy 40 - libnotify 41 - swaynotificationcenter 42 - wl-clipboard 43 - 44 - keepassxc 45 - 46 - hunspell 47 - hunspellDicts.en_US 48 - hunspellDicts.en_US-large 49 - ]; 50 - 51 - services.udisks2.enable = true; 52 - 53 - # Needed to open the firewall, actual service is managed in HM 54 - programs.kdeconnect.enable = true; 55 - 56 - home-manager.users.bean = let 57 - screenOffCmd = "hyprctl dispatch dpms off; ${pkgs.swaynotificationcenter}/bin/swaync-client --inhibitor-add \"timeout\""; 58 - screenOnCmd = "hyprctl dispatch dpms on; ${pkgs.swaynotificationcenter}/bin/swaync-client --inhibitor-remove \"timeout\""; 59 - in { 60 - xdg.configFile = { 61 - "swappy/config".text = '' 62 - [Default] 63 - save_dir=$HOME/Pictures/Screenshots 64 - save_filename_format=%Y-%m-%dT%H:%M:%S-edited.png 65 - show_panel=true 66 - line_size=5 67 - text_size=20 68 - text_font=monospace 69 - paint_mode=brush 70 - early_exit=false 71 - fill_shape=false 72 - ''; 73 - "kdeconnect/config".text = '' 74 - [General] 75 - name=${lib.toUpper config.networking.hostName} 76 - ''; 77 - }; 78 - 79 - # Doing our own thing for rofi 80 - catppuccin.rofi.enable = false; 81 - 82 - systemd.user.services = let 83 - target = config.home-manager.users.bean.wayland.systemd.target; 84 - mkShellService = { 85 - desc, 86 - service, 87 - }: { 88 - Install = { 89 - WantedBy = [target]; 90 - }; 91 - 92 - Unit = { 93 - ConditionEnvironment = "WAYLAND_DISPLAY"; 94 - Description = desc; 95 - After = [target]; 96 - PartOf = [target]; 97 - }; 98 - 99 - Service = service; 100 - }; 101 - in { 102 - battery-notif = mkShellService { 103 - desc = "Battery Notification Service"; 104 - 105 - service = { 106 - ExecStart = "${pkgs.nushell}/bin/nu ${../../res/battery_notif.nu}"; 107 - Restart = "on-failure"; 108 - RestartSec = "10"; 109 - }; 110 - }; 111 - 112 - kdeconnect.Service.Environment = lib.mkForce []; 113 - 114 - mpris-idle-inhibit = mkShellService { 115 - desc = "MPRIS Idle Inhibitor"; 116 - 117 - service = { 118 - ExecStart = ''${inputs'.wayland-mpris-idle-inhibit.packages.default}/bin/wayland-mpris-idle-inhibit --ignore "kdeconnect" --ignore "playerctld"''; 119 - Restart = "on-failure"; 120 - RestartSec = "10"; 121 - }; 122 - }; 123 - }; 124 - 125 - services = { 126 - hyprpolkitagent.enable = true; 127 - kdeconnect.enable = true; 128 - hypridle = { 129 - enable = true; 130 - settings = { 131 - general = { 132 - lock_cmd = "pidof hyprlock || hyprlock --grace 5"; 133 - unlock_cmd = "pkill hyprlock --signal SIGUSR1"; 134 - before_sleep_cmd = "loginctl lock-session"; 135 - after_sleep_cmd = screenOnCmd; 136 - }; 137 - 138 - listener = let 139 - lockTimeout = 120; 140 - in [ 141 - { 142 - timeout = lockTimeout; # Lock the screen after 2 minutes of inactivity 143 - on-timeout = "loginctl lock-session"; 144 - } 145 - { 146 - timeout = lockTimeout + 120; # Turn off the screen 2 minutes after locking 147 - on-timeout = screenOffCmd; 148 - on-resume = screenOnCmd; 149 - } 150 - { 151 - timeout = lockTimeout + 600; # Suspend 10 minutes after locking 152 - on-timeout = "systemctl suspend"; 153 - } 154 - ]; 155 - }; 156 - }; 157 - cliphist = { 158 - enable = true; 159 - systemdTargets = lib.mkForce [ 160 - config.home-manager.users.bean.wayland.systemd.target 161 - ]; 162 - }; 163 - udiskie = { 164 - enable = true; 165 - automount = false; 166 - tray = "never"; 167 - }; 168 - playerctld.enable = true; 169 - wlsunset = { 170 - enable = true; 171 - sunrise = "6:00"; 172 - sunset = "22:00"; 173 - }; 174 - swayosd = { 175 - enable = true; 176 - stylePath = pkgs.writeText "swayosd-style.css" '' 177 - window#osd { 178 - border-radius: 5rem; 179 - } 180 - 181 - #container { 182 - padding: 5px 10px; 183 - } 184 - ''; 185 - }; 186 - }; 187 - 188 - programs = { 189 - rofi = { 190 - enable = true; 191 - package = pkgs.rofi.override { 192 - plugins = with pkgs; [ 193 - rofi-emoji 194 - rofi-power-menu 195 - rofi-bluetooth 196 - rofi-calc 197 - rofi-pulse-select 198 - ]; 199 - }; 200 - theme = let 201 - inherit (config.home-manager.users.bean.lib.formats.rasi) mkLiteral; 202 - in { 203 - "@import" = "${config.catppuccin.sources.rofi}/themes/catppuccin-${config.home-manager.users.bean.catppuccin.rofi.flavor}.rasi"; 204 - "*" = 205 - (builtins.mapAttrs (name: value: mkLiteral "@${value}") { 206 - "bg0" = "base"; 207 - "bg1" = "mantle"; 208 - "bg2" = "crust"; 209 - "bg3" = config.catppuccin.accent; 210 - "fg0" = "subtext1"; 211 - "fg1" = "text"; 212 - "fg2" = "subtext0"; 213 - "fg3" = "overlay0"; 214 - "fg4" = "surface0"; 215 - }) 216 - // { 217 - font = mkLiteral ''"Roboto 14"''; 218 - background-color = mkLiteral ''transparent''; 219 - text-color = mkLiteral ''@fg0''; 220 - margin = mkLiteral ''0px''; 221 - padding = mkLiteral ''0px''; 222 - spacing = mkLiteral ''0px''; 223 - }; 224 - "window" = { 225 - location = mkLiteral ''north''; 226 - y-offset = mkLiteral ''calc(50% - 176px)''; 227 - width = mkLiteral ''600''; 228 - border-radius = mkLiteral ''24px''; 229 - background-color = mkLiteral ''@bg0''; 230 - }; 231 - "mainbox" = { 232 - padding = mkLiteral ''12px''; 233 - }; 234 - "inputbar" = { 235 - background-color = mkLiteral ''@bg1''; 236 - border-color = mkLiteral ''@bg3''; 237 - border = mkLiteral ''2px''; 238 - border-radius = mkLiteral ''16px''; 239 - padding = mkLiteral ''8px 16px''; 240 - spacing = mkLiteral ''8px''; 241 - children = mkLiteral ''[ prompt, entry ]''; 242 - }; 243 - "prompt" = { 244 - text-color = mkLiteral ''@fg2''; 245 - }; 246 - "entry" = { 247 - placeholder = mkLiteral ''"Search"''; 248 - placeholder-color = mkLiteral ''@fg3''; 249 - }; 250 - "message" = { 251 - margin = mkLiteral ''12px 0 0''; 252 - border-radius = mkLiteral ''16px''; 253 - border-color = mkLiteral ''@bg2''; 254 - background-color = mkLiteral ''@bg2''; 255 - }; 256 - "textbox" = { 257 - padding = mkLiteral ''8px 24px''; 258 - }; 259 - "listview" = { 260 - background-color = mkLiteral ''transparent''; 261 - margin = mkLiteral ''12px 0 0''; 262 - lines = mkLiteral ''8''; 263 - columns = mkLiteral ''2''; 264 - fixed-height = mkLiteral ''false''; 265 - }; 266 - "element" = { 267 - padding = mkLiteral ''8px 16px''; 268 - spacing = mkLiteral ''8px''; 269 - border-radius = mkLiteral ''16px''; 270 - }; 271 - "element normal active" = { 272 - text-color = mkLiteral ''@bg3''; 273 - }; 274 - "element alternate active" = { 275 - text-color = mkLiteral ''@bg3''; 276 - }; 277 - "element selected normal, element selected active" = { 278 - text-color = mkLiteral ''@fg4''; 279 - background-color = mkLiteral ''@bg3''; 280 - }; 281 - "element-icon" = { 282 - size = mkLiteral ''1em''; 283 - vertical-align = mkLiteral ''0.5''; 284 - }; 285 - "element-text" = { 286 - text-color = mkLiteral ''inherit''; 287 - }; 288 - }; 289 - location = "center"; 290 - }; 291 - nushell.extraConfig = '' 292 - plugin add ${pkgs.nu_plugin_dbus}/bin/nu_plugin_dbus 293 - ''; 294 - }; 295 - 296 - wayland.windowManager.hyprland.settings = { 297 - env = [ 298 - "GRIMBLAST_EDITOR,swappy -f " 299 - ]; 300 - 301 - exec-once = [ 302 - "uwsm app -- keepassxc /home/bean/Documents/Keepass/DB/Database.kdbx" 303 - ]; 304 - 305 - bind = let 306 - powerMenu = "rofi -modi 'p:${pkgs.rofi-power-menu}/bin/rofi-power-menu' -show p --symbols-font \"FiraMono Nerd Font Mono\""; 307 - screenshot = "${pkgs.nushell}/bin/nu ${../../res/screenshot.nu}"; 308 - in [ 309 - "SUPER,S,exec,uwsm app -- rofi -show drun -icon-theme \"candy-icons\" -show-icons" 310 - "SUPER SHIFT,E,exec,uwsm app -- rofi -modi emoji -show emoji" 311 - "SUPER SHIFT,D,exec,swaync-client -d" 312 - "SUPER,Delete,exec,uwsm app -- ${powerMenu}" 313 - ",XF86PowerOff,exec,uwsm app -- ${powerMenu}" 314 - "SUPER ALT,C,exec,uwsm app -- rofi -show calc -modi calc -no-show-match -no-sort -calc-command \"echo -n '{result}' | wl-copy\"" 315 - "SUPER,B,exec,uwsm app -- ${pkgs.rofi-bluetooth}/bin/rofi-bluetooth" 316 - "SUPER,Tab,exec,uwsm app -- rofi -show window -show-icons" 317 - "SUPER,E,exec,uwsm app -- yazi.desktop" 318 - "SUPER,N,exec,uwsm app -- ${pkgs.swaynotificationcenter}/bin/swaync-client -t -sw" 319 - "SUPER,A,exec,uwsm app -- pavucontrol --tab 5" 320 - ''SUPER,V,exec,cliphist list | sed -r 's/\[\[ binary data (.* .iB) (.*) (.*) \]\]/ 󰋩 \2 Image (\3, \1)/g' | rofi -dmenu -display-columns 2 -p Clipboard | cliphist decode | wl-copy'' 321 - "SUPER ALT,V,exec,echo -e \"Yes\\nNo\" | [[ $(rofi -dmenu -mesg \"Clear Clipboard History?\" -p Clear) == \"Yes\" ]] && cliphist wipe" 322 - ",Print,exec,uwsm app -- ${screenshot}" 323 - "SUPER SHIFT,S,exec,uwsm app -- ${screenshot}" 324 - "SUPER SHIFT,T,exec,${pkgs.nushell}/bin/nu ${../../res/ocr.nu}" 325 - "SUPER SHIFT,C,exec,uwsm app -- ${pkgs.hyprpicker}/bin/hyprpicker -a" 326 - ]; 327 - bindr = [ 328 - "SUPER SHIFT,R,exec,pkill wf-recorder --signal SIGINT || uwsm app -- ${pkgs.nushell}/bin/nu ${../../res/screenrec.nu}" 329 - "CAPS,Caps_Lock,exec,uwsm app -- swayosd-client --caps-lock" 330 - ",Scroll_Lock,exec,uwsm app -- swayosd-client --scroll-lock" 331 - ",Num_Lock,exec,uwsm app -- swayosd-client --num-lock" 332 - ]; 333 - bindl = [ 334 - ",switch:on:Lid Switch,exec,${screenOffCmd}" 335 - ",switch:off:Lid Switch,exec,${screenOnCmd}" 336 - ]; 337 - bindel = [ 338 - ",XF86MonBrightnessUp,exec,uwsm app -- swayosd-client --brightness raise" 339 - ",XF86MonBrightnessDown,exec,uwsm app -- swayosd-client --brightness lower" 340 - ]; 341 - }; 342 - }; 343 - }
-64
nixosModules/graphics/swaync.nix
··· 1 - {pkgs, ...}: { 2 - environment.systemPackages = with pkgs; [ 3 - alsa-utils 4 - ]; 5 - 6 - nixpkgs.overlays = [ 7 - (new: old: { 8 - swaynotificationcenter = old.swaynotificationcenter.overrideAttrs { 9 - postFixup = '' 10 - rm -r $out/share/systemd 11 - rm -r $out/lib/systemd 12 - ''; 13 - }; 14 - }) 15 - ]; 16 - 17 - home-manager.users.bean.services.swaync = { 18 - enable = true; 19 - settings = { 20 - control-center-exclusive-zone = false; 21 - control-center-height = 1000; 22 - control-center-margin-bottom = 10; 23 - control-center-margin-left = 10; 24 - control-center-margin-right = 10; 25 - control-center-margin-top = 0; 26 - control-center-width = 800; 27 - fit-to-screen = false; 28 - hide-on-action = true; 29 - hide-on-clear = false; 30 - image-visibility = "when-available"; 31 - keyboard-shortcuts = true; 32 - notification-body-image-height = 100; 33 - notification-body-image-width = 200; 34 - notification-icon-size = 64; 35 - notification-window-width = 500; 36 - positionX = "center"; 37 - positionY = "top"; 38 - script-fail-notify = true; 39 - scripts = { 40 - all = { 41 - exec = "${pkgs.nushell}/bin/nu ${../../res/notification.nu} ${../../res/notif-sounds}"; 42 - urgency = ".*"; 43 - }; 44 - }; 45 - timeout = 10; 46 - timeout-critical = 0; 47 - timeout-low = 5; 48 - transition-time = 200; 49 - widget-config = { 50 - dnd = {text = "Do Not Disturb";}; 51 - label = { 52 - max-lines = 1; 53 - text = "Notification Center"; 54 - }; 55 - title = { 56 - button-text = "Clear All"; 57 - clear-all-button = true; 58 - text = "Notification Center"; 59 - }; 60 - }; 61 - widgets = ["title" "dnd" "notifications"]; 62 - }; 63 - }; 64 - }
-77
nixosModules/graphics/theming.nix
··· 1 - { 2 - pkgs, 3 - lib, 4 - ... 5 - }: let 6 - iconTheme = { 7 - name = "Tela-green"; 8 - package = pkgs.tela-icon-theme; 9 - }; 10 - cursorTheme = { 11 - name = "catppuccin-mocha-dark-cursors"; 12 - package = pkgs.catppuccin-cursors.mochaDark; 13 - size = 24; 14 - }; 15 - hyprThemeName = "${cursorTheme.name}-hypr"; 16 - hyprCursorTheme = let 17 - utils = "${pkgs.hyprcursor}/bin/hyprcursor-util"; 18 - in 19 - pkgs.runCommand hyprThemeName {} '' 20 - export PATH="$PATH:${pkgs.xcur2png}/bin" 21 - ${utils} -x ${cursorTheme.package}/share/icons/${cursorTheme.name} --output . 22 - mkdir -p $out/share/icons 23 - ${utils} -c ./extracted_${cursorTheme.name} --output . 24 - cp -r "./theme_Extracted Theme" $out/share/icons/${hyprThemeName} 25 - ''; 26 - in { 27 - environment.systemPackages = [ 28 - hyprCursorTheme 29 - cursorTheme.package 30 - iconTheme.package 31 - ]; 32 - 33 - qt = { 34 - enable = true; 35 - style = "kvantum"; 36 - }; 37 - 38 - home-manager.users.bean = { 39 - qt = { 40 - enable = true; 41 - platformTheme.name = "kvantum"; 42 - style.name = "kvantum"; 43 - }; 44 - 45 - home.pointerCursor = { 46 - inherit (cursorTheme) name package size; 47 - enable = true; 48 - gtk.enable = true; 49 - x11.enable = true; 50 - }; 51 - 52 - wayland.windowManager.hyprland.settings.env = [ 53 - "HYPRCURSOR_THEME,${hyprThemeName}" 54 - "HYPRCURSOR_SIZE,${builtins.toJSON cursorTheme.size}" 55 - ]; 56 - 57 - gtk = { 58 - enable = true; 59 - iconTheme = lib.mkForce iconTheme; 60 - gtk2.extraConfig = "gtk-application-prefer-dark-theme=true"; 61 - gtk3.extraConfig.gtk-application-prefer-dark-theme = true; 62 - gtk4.extraConfig.gtk-application-prefer-dark-theme = true; 63 - }; 64 - 65 - dconf.settings."org/gnome/desktop/interface".color-scheme = "prefer-dark"; 66 - 67 - services.hyprpaper = { 68 - enable = true; 69 - settings = { 70 - ipc = "on"; 71 - splash = false; 72 - preload = ["${../../res/pictures/background.png}"]; 73 - wallpaper = [",${../../res/pictures/background.png}"]; 74 - }; 75 - }; 76 - }; 77 - }
-533
nixosModules/graphics/waybar.nix
··· 1 - {pkgs, ...}: let 2 - catppuccinCss = pkgs.fetchurl { 3 - url = "https://github.com/catppuccin/waybar/raw/refs/heads/main/themes/mocha.css"; 4 - hash = "sha256-puMFl8zIKOiYhE6wzqnffXOHn/VnKmpVDzrMJMk+3Rc="; 5 - }; 6 - in { 7 - home-manager.users.bean = { 8 - wayland.windowManager.hyprland.settings.bind = [ 9 - "SUPER,W,exec,systemctl restart --user waybar" 10 - "SUPER SHIFT,W,exec,systemctl stop --user waybar" 11 - ]; 12 - programs.waybar = { 13 - enable = true; 14 - systemd.enable = true; 15 - style = '' 16 - @import "${catppuccinCss}"; 17 - 18 - * { 19 - font-family: sans-serif; 20 - } 21 - 22 - window#waybar { 23 - background: rgba(49, 50, 68, 0.65); 24 - color: @text; 25 - } 26 - 27 - .modules-left > * > *, 28 - .modules-right > * > * { 29 - font-size: 1.5rem; 30 - background: @crust; 31 - border: 2px solid @base; 32 - border-radius: 5rem; 33 - padding: 5px 15px; 34 - margin: 5px 2px; 35 - } 36 - 37 - #bluetooth.disabled { 38 - border-color: @red; 39 - } 40 - 41 - #waybar .modules-left > *:first-child > * { 42 - margin-left: 25px; 43 - } 44 - 45 - #waybar .modules-right > *:last-child > * { 46 - margin-right: 25px; 47 - } 48 - 49 - #waybar .modules-left, 50 - #waybar .modules-right { 51 - margin-top: 10px; 52 - margin-bottom: 5px; 53 - } 54 - 55 - #waybar .modules-center { 56 - margin-top: 5px; 57 - margin-bottom: 5px; 58 - } 59 - 60 - #battery.warning { 61 - border-color: @yellow; 62 - } 63 - 64 - #battery.critical { 65 - border-color: @red; 66 - } 67 - 68 - * > #battery.charging { 69 - border-color: @green; 70 - } 71 - 72 - #taskbar, 73 - #workspaces { 74 - padding: 10px; 75 - border-radius: 5rem; 76 - border: none; 77 - background: none; 78 - } 79 - 80 - #taskbar button, 81 - #workspaces button { 82 - color: @text; 83 - border-radius: 5rem; 84 - padding: 5px 15px; 85 - margin: 0 5px; 86 - background: @crust; 87 - border: 2px solid @base; 88 - } 89 - 90 - #taskbar button:hover, #workspaces button:hover { 91 - background: @mantle; 92 - } 93 - 94 - #workspaces button { 95 - font-size: 1.5rem; 96 - } 97 - 98 - #cpu, 99 - #memory, 100 - #temperature { 101 - font-size: 1.5rem; 102 - padding: 10px 25px; 103 - } 104 - 105 - #cpu.warning, 106 - #memory.warning { 107 - border-color: @yellow; 108 - } 109 - 110 - #cpu.critical, 111 - #memory.critical, 112 - #temperature.critical { 113 - border-color: @red; 114 - } 115 - 116 - #workspaces button.active { 117 - border: 2px solid @sapphire; 118 - } 119 - 120 - #taskbar button.active { 121 - border: 2px solid @sapphire; 122 - } 123 - 124 - #idle_inhibitor.activated { 125 - border-color: @mauve; 126 - } 127 - 128 - #custom-notification.notification { 129 - border-color: @sapphire; 130 - } 131 - 132 - #custom-notification.dnd-none, 133 - #custom-notification.dnd-notification, 134 - #custom-notification.dnd-inhibited-none, 135 - #custom-notification.dnd-inhibited-notification { 136 - border-color: @red; 137 - } 138 - 139 - #custom-notification.inhibited-none, 140 - #custom-notification.inhibited-notification { 141 - border-color: @mauve; 142 - } 143 - 144 - #network.disconnected { 145 - border-color: @red; 146 - } 147 - 148 - #privacy { 149 - background: none; 150 - border: none; 151 - margin: 0; 152 - padding: 0; 153 - } 154 - 155 - #privacy-item { 156 - font-size: 1.5rem; 157 - border-radius: 5rem; 158 - padding: 5px 15px; 159 - margin: 5px 2px; 160 - border: 2px solid @red; 161 - background-color: @crust; 162 - } 163 - 164 - #custom-weather.VeryCloudy, 165 - #custom-weather.Cloudy, 166 - #custom-weather.Fog { 167 - border-color: @overlay0; 168 - } 169 - 170 - #custom-weather.HeavyRain, 171 - #custom-weather.ThunderyHeavyRain, 172 - #custom-weather.ThunderyRain, 173 - #custom-weather.ThunderyShowers, 174 - #custom-weather.HeavyShowers, 175 - #custom-weather.LightRain, 176 - #custom-weather.LightShowers { 177 - border-color: @blue; 178 - } 179 - 180 - #custom-weather.HeavySnow, 181 - #custom-weather.LightSnow, 182 - #custom-weather.Sleet, 183 - #custom-weather.Snow, 184 - #custom-weather.LightSnowShowers, 185 - #custom-weather.LightSleetShowers { 186 - border-color: @text; 187 - } 188 - 189 - #custom-weather.Clear, 190 - #custom-weather.Sunny { 191 - border-color: @yellow; 192 - } 193 - 194 - #custom-weather.PartlyCloudy { 195 - border-color: @flamingo; 196 - } 197 - 198 - #custom-weather.PartlyCloudy.night { 199 - border-color: @lavender; 200 - } 201 - 202 - #custom-weather.Clear.night, 203 - #custom-weather.Sunny.night { 204 - border-color: @mauve; 205 - } 206 - 207 - #custom-news.utd { 208 - font-size: 1.5rem; 209 - } 210 - 211 - #custom-news.unread { 212 - border-color: @sapphire; 213 - } 214 - 215 - #mpris { 216 - opacity: 0; 217 - } 218 - 219 - #mpris.paused { 220 - opacity: 1; 221 - } 222 - 223 - #mpris.playing { 224 - opacity: 1; 225 - border-color: @sapphire; 226 - } 227 - 228 - #mpris.playing.spotify { 229 - border-color: #33B980; 230 - } 231 - 232 - #mpris.paused.kdeconnect { 233 - opacity: 0; 234 - } 235 - ''; 236 - settings = [ 237 - { 238 - battery = { 239 - format = "{icon} {capacity}󰏰"; 240 - format-charging = "{icon} {capacity}󰏰"; 241 - format-icons = { 242 - charging = [ 243 - "󰢜" 244 - "󰂆" 245 - "󰂇" 246 - "󰂈" 247 - "󰢝" 248 - "󰂉" 249 - "󰢞" 250 - "󰂊" 251 - "󰂋" 252 - "󰂅" 253 - ]; 254 - default = [ 255 - "󰁺" 256 - "󰁻" 257 - "󰁼" 258 - "󰁽" 259 - "󰁾" 260 - "󰁿" 261 - "󰂀" 262 - "󰂁" 263 - "󰂂" 264 - "󰁹" 265 - ]; 266 - }; 267 - states = { 268 - critical = 15; 269 - warning = 30; 270 - }; 271 - }; 272 - bluetooth = { 273 - format = "󰂯"; 274 - format-connected = "󰂱"; 275 - format-connected-battery = "󰂱 {device_battery_percentage}󰏰"; 276 - format-disabled = "󰂲"; 277 - format-off = "󰂲"; 278 - on-click = "rofi-bluetooth"; 279 - on-click-right = "rfkill toggle bluetooth"; 280 - tooltip-format = "{controller_alias}\t{controller_address}\n\n{num_connections} connected"; 281 - tooltip-format-connected = "{controller_alias}\t{controller_address}\n\n{num_connections} connected\n\n{device_enumerate}"; 282 - tooltip-format-enumerate-connected = "{device_alias}\t{device_address}"; 283 - tooltip-format-enumerate-connected-battery = "{device_alias}\t{device_address}\t{device_battery_percentage}%"; 284 - }; 285 - "clock#1" = { 286 - actions = { 287 - on-click = "shift_up"; 288 - on-click-middle = "mode"; 289 - on-click-right = "shift_down"; 290 - }; 291 - calendar = { 292 - format = { 293 - days = "<span color='#ecc6d9'><b>{}</b></span>"; 294 - months = "<span color='#ffead3'><b>{}</b></span>"; 295 - today = "<span color='#ff6699'><b><u>{}</u></b></span>"; 296 - weekdays = "<span color='#ffcc66'><b>{}</b></span>"; 297 - weeks = "<span color='#99ffdd'><b>W{}</b></span>"; 298 - }; 299 - mode = "month"; 300 - mode-mon-col = 3; 301 - on-scroll = 1; 302 - weeks-pos = "right"; 303 - }; 304 - format = "󰃭 {:%A, %B %Od}"; 305 - tooltip-format = "<tt><small>{calendar}</small></tt>"; 306 - }; 307 - "clock#2" = { 308 - format = "󰥔 {:%I:%M %p}"; 309 - tooltip-format = "{:%F at %T in %Z (UTC%Ez)}"; 310 - }; 311 - "custom/kde-connect" = { 312 - exec = "${pkgs.nushell}/bin/nu ${../../res/custom_waybar_modules/kdeconnect.nu}"; 313 - format = "{}"; 314 - interval = 30; 315 - on-click = "kdeconnect-settings"; 316 - return-type = "json"; 317 - }; 318 - "custom/news" = { 319 - exec = "${pkgs.nushell}/bin/nu ${../../res/custom_waybar_modules/newsboat.nu}"; 320 - exec-on-event = true; 321 - format = "{}"; 322 - on-click-right = "pkill waybar -SIGRTMIN+6"; 323 - restart-interval = 1800; 324 - return-type = "json"; 325 - signal = 6; 326 - }; 327 - "custom/notification" = { 328 - escape = true; 329 - exec = "swaync-client -swb"; 330 - exec-if = "which swaync-client"; 331 - format = "{icon}"; 332 - format-icons = { 333 - dnd-inhibited-none = "󰂛"; 334 - dnd-inhibited-notification = "󰂛<sup></sup>"; 335 - dnd-none = "󰂛"; 336 - dnd-notification = "󰂛<sup></sup>"; 337 - inhibited-none = "󰂠"; 338 - inhibited-notification = "󰂠<sup></sup>"; 339 - none = "󰂚"; 340 - notification = "󱅫"; 341 - }; 342 - max-length = 3; 343 - on-click = "sleep 0.2 && swaync-client -t -sw"; 344 - on-click-middle = "sleep 0.2 && swaync-client -C -sw"; 345 - on-click-right = "sleep 0.2 && swaync-client -d -sw"; 346 - return-type = "json"; 347 - tooltip = false; 348 - }; 349 - "custom/weather" = { 350 - exec = "${pkgs.nushell}/bin/nu ${../../res/custom_waybar_modules/weather.nu}"; 351 - format = "{}"; 352 - interval = 600; 353 - on-click = "xdg-open https://duckduckgo.com/?q=weather"; 354 - return-type = "json"; 355 - }; 356 - idle_inhibitor = { 357 - format = "{icon}"; 358 - format-icons = { 359 - activated = "󰒳"; 360 - deactivated = "󰒲"; 361 - }; 362 - }; 363 - layer = "top"; 364 - modules-center = []; 365 - modules-left = [ 366 - "user" 367 - "clock#1" 368 - "clock#2" 369 - "custom/news" 370 - "custom/weather" 371 - "mpris" 372 - ]; 373 - modules-right = [ 374 - "network" 375 - "battery" 376 - "bluetooth" 377 - "pulseaudio" 378 - "custom/kde-connect" 379 - "idle_inhibitor" 380 - "custom/notification" 381 - "privacy" 382 - "tray" 383 - ]; 384 - mpris = { 385 - album-len = 20; 386 - artist-len = 25; 387 - interval = 1; 388 - dynamic-importance-order = [ 389 - "title" 390 - "position" 391 - "length" 392 - "artist" 393 - "album" 394 - ]; 395 - dynamic-len = 50; 396 - dynamic-order = [ 397 - "title" 398 - "artist" 399 - "album" 400 - "position" 401 - "length" 402 - ]; 403 - format = "{player_icon} {dynamic}"; 404 - format-paused = "{status_icon} {dynamic}"; 405 - player-icons = { 406 - QMPlay2 = "󰐌"; 407 - default = "󰎆"; 408 - firefox = ""; 409 - firefox-devedition = ""; 410 - chromium = "󰖟"; 411 - kdeconnect = ""; 412 - spotify = "󰓇"; 413 - }; 414 - status-icons = { 415 - paused = "󰏤"; 416 - stopped = "󰓛"; 417 - }; 418 - title-len = 35; 419 - }; 420 - network = { 421 - format = "{ifname}"; 422 - format-disconnected = "󰪎"; 423 - format-ethernet = "󱎔 {ifname}"; 424 - format-icons = [ 425 - "󰤟" 426 - "󰤢" 427 - "󰤥" 428 - "󰤨" 429 - ]; 430 - format-linked = "󰌷 {ifname}"; 431 - format-wifi = "{icon} {essid}"; 432 - tooltip-disconnected = "Disconnected"; 433 - tooltip-format = "{ifname} via {gwaddr}"; 434 - tooltip-format-ethernet = "󱎔 {ifname}"; 435 - tooltip-format-wifi = "Connected to {essid} ({signalStrength}󰏰 Strength) over {ifname} via {gwaddr}"; 436 - }; 437 - position = "top"; 438 - privacy = { 439 - icon-size = 20; 440 - icon-spacing = 4; 441 - modules = [ 442 - { 443 - tooltip = true; 444 - tooltip-icon-size = 24; 445 - type = "screenshare"; 446 - } 447 - { 448 - tooltip = true; 449 - tooltip-icon-size = 24; 450 - type = "audio-in"; 451 - } 452 - ]; 453 - transition-duration = 200; 454 - }; 455 - pulseaudio = { 456 - format = "{icon} {volume:2}󰏰"; 457 - format-bluetooth = "{icon} {volume}󰏰"; 458 - format-icons = { 459 - car = ""; 460 - default = [ 461 - "󰖀" 462 - "󰕾" 463 - ]; 464 - hands-free = "󰋋"; 465 - headphone = "󰋋"; 466 - headset = "󰋋"; 467 - phone = ""; 468 - portable = ""; 469 - }; 470 - format-muted = "󰝟"; 471 - on-click = "pamixer -t"; 472 - on-click-right = "pavucontrol"; 473 - scroll-step = 5; 474 - }; 475 - tray = { 476 - icon-size = 25; 477 - show-passive-items = true; 478 - spacing = 5; 479 - }; 480 - user = { 481 - format = " {user}"; 482 - icon = true; 483 - }; 484 - } 485 - { 486 - cpu = { 487 - format = "󰍛 {usage}󰏰"; 488 - states = { 489 - critical = 95; 490 - warning = 80; 491 - }; 492 - }; 493 - "hyprland/workspaces" = { 494 - disable-scroll = true; 495 - format = "{name}"; 496 - }; 497 - layer = "top"; 498 - memory = { 499 - format = " {}󰏰 ({used:0.1f}/{total:0.1f} GiB)"; 500 - states = { 501 - critical = 90; 502 - warning = 70; 503 - }; 504 - }; 505 - modules-center = ["wlr/taskbar"]; 506 - modules-left = ["hyprland/workspaces"]; 507 - modules-right = [ 508 - "temperature" 509 - "cpu" 510 - "memory" 511 - ]; 512 - position = "bottom"; 513 - temperature = { 514 - critical-threshold = 80; 515 - format = "{icon} {temperatureC} °C"; 516 - format-critical = "{icon}! {temperatureC} °C"; 517 - format-icons = [ 518 - "󱃃" 519 - "󰔏" 520 - "󱃂" 521 - ]; 522 - thermal-zone = 1; 523 - }; 524 - "wlr/taskbar" = { 525 - format = "{icon}"; 526 - icon-size = 35; 527 - on-click = "activate"; 528 - }; 529 - } 530 - ]; 531 - }; 532 - }; 533 - }
-19
nixosModules/graphics/wezterm.nix
··· 1 - {...}: { 2 - home-manager.users.bean.programs.wezterm = { 3 - enable = true; 4 - extraConfig = '' 5 - return { 6 - font = wezterm.font("monospace"), 7 - font_size = 18.0, 8 - color_scheme = "Catppuccin Mocha", 9 - enable_tab_bar = false, 10 - window_background_opacity = 0.92, 11 - default_cursor_style = "SteadyBar", 12 - cursor_thickness = 2, 13 - keys = { 14 - {key="o", mods="CTRL|SHIFT", action="OpenLinkAtMouseCursor"} 15 - } 16 - } 17 - ''; 18 - }; 19 - }
-31
nixosModules/graphics/xdg.nix
··· 1 - {config, ...}: { 2 - xdg.mime = { 3 - removedAssociations = { 4 - "inode/directory" = ["QMPlay2.desktop" "QMPlay2_enqueue.desktop"]; 5 - }; 6 - defaultApplications = { 7 - "application/pdf" = "firefox-devedition.desktop"; 8 - "image/*" = ["org.gnome.Loupe.desktop" "firefox-devedition.desktop" "chromium-browser.desktop"]; 9 - "text/*" = "neovide.desktop"; 10 - "inode/directory" = "yazi.desktop"; 11 - }; 12 - }; 13 - 14 - home-manager.users.bean.xdg = { 15 - enable = true; 16 - userDirs = let 17 - inherit (config.home-manager.users.bean.home) homeDirectory; 18 - in { 19 - enable = true; 20 - createDirectories = true; 21 - desktop = "${homeDirectory}/Desktop"; 22 - documents = "${homeDirectory}/Documents"; 23 - pictures = "${homeDirectory}/Pictures"; 24 - videos = "${homeDirectory}/Videos"; 25 - music = "${homeDirectory}/Music"; 26 - extraConfig = { 27 - "XDG_SCREENSHOTS_DIR" = "${homeDirectory}/Pictures/Screenshots"; 28 - }; 29 - }; 30 - }; 31 - }
+15
nixosModules/hm.nix
··· 1 + {outputs, ...}: { 2 + lib, 3 + inputs, 4 + config, 5 + ... 6 + }: { 7 + imports = [inputs.hm.nixosModules.default]; 8 + options.cow.hm.enable = lib.mkEnableOption "Home Manager"; 9 + 10 + config.home-manager = lib.mkIf config.cow.hm.enable { 11 + sharedModules = builtins.attrValues outputs.homeModules; 12 + useUserPackages = true; 13 + useGlobalPkgs = false; 14 + }; 15 + }
-21
nixosModules/hypervisor+graphics.nix
··· 1 - {pkgs, ...}: { 2 - virtualisation.libvirtd = { 3 - enable = true; 4 - qemu.swtpm.enable = true; # Win 11 needs TPM 5 - # qemu.ovmf.packages = [ 6 - # (pkgs.OVMF.override { 7 - # # I have to build UEFI firmware from source, fun times 8 - # secureBoot = true; # Win 11 needs secure boot 9 - # tpmSupport = true; # Win 11 needs TPM 10 - # }) 11 - # .fd 12 - # ]; 13 - }; 14 - 15 - # GUI For Managing Machines 16 - programs.virt-manager.enable = true; 17 - 18 - environment.systemPackages = with pkgs; [ 19 - libtpms # For win 11 20 - ]; 21 - }
+22 -6
nixosModules/hypervisor.nix
··· 1 - { 1 + {...}: { 2 + config, 3 + lib, 2 4 pkgs, 3 - inputs, 4 5 ... 5 6 }: { 6 - users.users.bean.extraGroups = ["libvirtd"]; 7 + options.cow.hypervisor = { 8 + enable = lib.mkEnableOption "Enable running VMs"; 9 + }; 7 10 8 - virtualisation.libvirtd = { 9 - enable = true; 10 - onBoot = "ignore"; # I don't want VMs to start again on reboot 11 + config = lib.mkIf config.cow.hypervisor.enable { 12 + users.users.bean.extraGroups = lib.mkIf config.cow.bean.enable ["libvirtd"]; 13 + 14 + cow.imperm.keepCache = ["/var/lib/libvirt"]; 15 + 16 + programs.virt-manager.enable = config.cow.gdi.enable; 17 + 18 + environment.systemPackages = with pkgs; [ 19 + libtpms # For win 11 20 + ]; 21 + 22 + virtualisation.libvirtd = { 23 + enable = true; 24 + qemu.swtpm.enable = true; # Win 11 25 + onBoot = "ignore"; # I don't want VMs to start again on reboot 26 + }; 11 27 }; 12 28 }
-3
nixosModules/imperm+secureboot.nix
··· 1 - {...}: { 2 - boot.lanzaboote.pkiBundle = "/nix/persist/secure/secureboot"; 3 - }
+78 -114
nixosModules/imperm.nix
··· 1 - { 1 + {...}: { 2 2 config, 3 + lib, 3 4 inputs, 4 5 ... 5 - }: let 6 - persistRoot = "/nix/persist"; # Anything important we want backed up 7 - secureRoot = "${persistRoot}/secure"; # Files and directories we want only root to access 8 - cacheRoot = "/nix/perist-cache"; # Anything not as important that we can stand losing 9 - preWith = pre: builtins.map (p: "${pre}/${p}"); 10 - preShare = preWith ".local/share"; 11 - preConf = preWith ".config"; 12 - in { 6 + }: { 13 7 imports = [inputs.imperm.nixosModules.default]; 14 8 15 - environment.etc."machine-id".text = builtins.hashString "md5" config.networking.hostName; 16 - 17 - users.mutableUsers = false; 18 - users.users = { 19 - bean.hashedPasswordFile = "${secureRoot}/hashed-passwd"; 20 - root.hashedPasswordFile = "${secureRoot}/hashed-passwd"; 9 + options.cow.imperm = { 10 + enable = lib.mkEnableOption "Impermanence, turns off mutable users and expects you to define their password hashes"; 11 + persistRoot = lib.mkOption { 12 + type = lib.types.str; 13 + default = "/nix/persist"; 14 + description = "Path to store persisted data"; 15 + }; 16 + cacheRoot = lib.mkOption { 17 + type = lib.types.str; 18 + default = "/nix/perist-cache"; 19 + description = "Path to store cache data"; 20 + }; 21 + keep = lib.mkOption { 22 + type = lib.types.listOf lib.types.str; 23 + description = "Paths to keep that should be backed up"; 24 + default = []; 25 + }; 26 + keepCache = lib.mkOption { 27 + type = lib.types.listOf lib.types.str; 28 + description = "Paths to keep that shouldn't be backed up"; 29 + default = []; 30 + }; 21 31 }; 22 32 23 - environment.persistence.${cacheRoot} = { 24 - enable = true; 25 - hideMounts = true; 26 - directories = 27 - (preWith "/var" ( 28 - [ 29 - "log" 30 - ] 31 - ++ preWith "lib" ( 32 - [ 33 - "bluetooth" 34 - "nixos" 35 - "libvirt" 36 - "iwd" 37 - ] 38 - ++ preWith "systemd" [ 39 - "coredump" 40 - "timers" 41 - "backlight" 42 - "rfkill" 43 - ] 44 - ) 45 - )) 46 - ++ [ 33 + config = let 34 + users = 35 + if config.cow.hm.enable 36 + then config.home-manager.users 37 + else {}; 38 + persistRoot = config.cow.imperm.persistRoot; # Anything important we want backed up 39 + cacheRoot = config.cow.imperm.cacheRoot; # Anything not as important that we can stand losing 40 + in 41 + lib.mkIf config.cow.imperm.enable { 42 + users.mutableUsers = false; 43 + 44 + boot.lanzaboote.pkiBundle = lib.mkIf config.cow.lanzaboote.enable "${persistRoot}/secure/secureboot"; 45 + 46 + services.openssh.hostKeys = lib.mkIf config.cow.ssh-server.enable [ 47 47 { 48 - directory = "/var/lib/colord"; 49 - user = "colord"; 50 - group = "colord"; 51 - mode = "u=rwx,g=rx,o="; 48 + bits = 4096; 49 + path = "${persistRoot}/secure/ssh_host_rsa_key"; 50 + type = "rsa"; 51 + } 52 + { 53 + path = "${persistRoot}/secure/ssh_host_ed25519_key"; 54 + type = "ed25519"; 52 55 } 53 56 ]; 54 - users.bean.directories = 55 - [ 56 - ".cache" 57 - ".cargo" 58 - ".npm" 59 - ".pnpm" 60 - ".local/state/wireplumber" 61 - ] 62 - ++ (preShare [ 63 - "Steam" 64 - "Trash" 65 - ]) 66 - ++ (preConf [ 67 - "gh" 68 - "kdeconnect" 69 - "keepassxc" 70 - "syncthing" 71 - ]); 72 - }; 73 57 74 - environment.persistence.${persistRoot} = { 75 - enable = true; 76 - hideMounts = true; 77 - directories = [ 78 - "/var/lib/fprint" 79 - "/etc/NetworkManager/system-connections" 80 - ]; 81 - users.bean = { 82 - directories = 83 - [ 84 - "Downloads" 85 - "Music" 86 - "Videos" 87 - "Pictures" 88 - "Documents" 89 - ".mozilla" 90 - ".floorp" 91 - { 92 - directory = ".gnupg"; 93 - mode = "0700"; 94 - } 95 - { 96 - directory = ".ssh"; 97 - mode = "0700"; 98 - } 99 - { 100 - directory = ".nixops"; 101 - mode = "0700"; 102 - } 103 - { 104 - directory = ".local/share/keyrings"; 105 - mode = "0700"; 106 - } 107 - ] 108 - ++ (preConf [ 109 - "Cemu" 110 - ]) 111 - ++ (preShare [ 112 - # "direnv" 113 - "ow-mod-man" 114 - "OuterWildsModManager" 115 - "PrismLauncher" 116 - "newsboat" 117 - "zoxide" 118 - "nvim" 119 - "Cemu" 120 - "mpd" 121 - ]); 122 - files = preConf [ 123 - "nushell/history.txt" 124 - ]; 58 + environment.persistence = { 59 + "${cacheRoot}" = { 60 + enable = true; 61 + hideMounts = true; 62 + directories = 63 + [ 64 + "/var/log" 65 + "/var/lib/nixos" 66 + "/var/lib/systemd/coredump" 67 + "/var/lib/systemd/timers" 68 + "/var/lib/systemd/rfkill" 69 + "/var/lib/systemd/backlight" 70 + ] 71 + ++ config.cow.imperm.keepCache; 72 + users = 73 + builtins.mapAttrs (_: v: { 74 + directories = v.cow.imperm.keepCache or []; 75 + }) 76 + users; 77 + }; 78 + "${persistRoot}" = { 79 + enable = true; 80 + hideMounts = true; 81 + directories = config.cow.imperm.keep; 82 + users = 83 + builtins.mapAttrs (_: v: { 84 + directories = v.cow.imperm.keep or []; 85 + files = v.cow.imperm.keepFiles or []; 86 + }) 87 + users; 88 + }; 89 + }; 125 90 }; 126 - }; 127 91 }
+20
nixosModules/lanzaboote.nix
··· 1 + {...}: { 2 + inputs, 3 + lib, 4 + config, 5 + ... 6 + }: { 7 + imports = [inputs.lanzaboote.nixosModules.lanzaboote]; 8 + 9 + options.cow.lanzaboote.enable = lib.mkEnableOption "Use lanzaboote for booting and secure boot"; 10 + 11 + config.boot = lib.mkIf config.cow.lanzaboote.enable { 12 + loader.systemd-boot.enable = lib.mkForce false; 13 + bootspec.enable = true; 14 + 15 + lanzaboote = { 16 + enable = true; 17 + pkiBundle = lib.mkDefault "/var/lib/sbctl"; 18 + }; 19 + }; 20 + }
-16
nixosModules/latest-linux.nix
··· 1 - { 2 - pkgs, 3 - lib, 4 - ... 5 - }: { 6 - boot = { 7 - initrd.systemd = { 8 - enable = lib.mkDefault true; 9 - }; 10 - 11 - # Use latest kernel with sysrqs and lockdown enabled 12 - kernelPackages = lib.mkDefault pkgs.linuxPackages_latest; 13 - kernelParams = lib.mkDefault ["lockdown=confidentiality"]; 14 - kernel.sysctl."kernel.sysrq" = 1; 15 - }; 16 - }
-13
nixosModules/mc-server.nix
··· 1 - {pkgs, ...}: { 2 - environment.systemPackages = with pkgs; [ 3 - jdk 4 - ]; 5 - 6 - networking.firewall.allowedTCPPorts = [ 7 - 25565 8 - ]; 9 - 10 - networking.firewall.allowedUDPPorts = [ 11 - 19132 12 - ]; 13 - }
-352
nixosModules/music.nix
··· 1 - { 2 - config, 3 - inputs', 4 - ... 5 - }: let 6 - cat = 7 - (builtins.fromJSON (builtins.readFile "${inputs'.catppuccin.packages.palette}/palette.json")) 8 - .${config.catppuccin.flavor}.colors; 9 - accent = cat.${config.catppuccin.accent}; 10 - themeFile = '' 11 - #![enable(implicit_some)] 12 - #![enable(unwrap_newtypes)] 13 - #![enable(unwrap_variant_newtypes)] 14 - ( 15 - default_album_art_path: None, 16 - draw_borders: true, 17 - show_song_table_header: true, 18 - symbols: (song: "", dir: "", playlist: "󰲸", marker: "\u{e0b0}"), 19 - layout: Split( 20 - direction: Vertical, 21 - panes: [ 22 - ( 23 - size: "3", 24 - pane: Pane(Tabs), 25 - ), 26 - ( 27 - size: "4", 28 - pane: Split( 29 - direction: Horizontal, 30 - panes: [ 31 - ( 32 - size: "100%", 33 - pane: Split( 34 - direction: Vertical, 35 - panes: [ 36 - ( 37 - size: "4", 38 - borders: "ALL", 39 - pane: Pane(Header), 40 - ), 41 - ] 42 - ) 43 - ), 44 - ] 45 - ), 46 - ), 47 - ( 48 - size: "100%", 49 - pane: Split( 50 - direction: Horizontal, 51 - panes: [ 52 - ( 53 - size: "100%", 54 - borders: "ALL", 55 - pane: Pane(TabContent), 56 - ), 57 - ] 58 - ), 59 - ), 60 - ( 61 - size: "3", 62 - borders: "ALL", 63 - pane: Pane(ProgressBar), 64 - ), 65 - ], 66 - ), 67 - progress_bar: ( 68 - symbols: ["[", "=", ">", "-", "]"], 69 - track_style: (bg: "${cat.mantle.hex}"), 70 - elapsed_style: (fg: "${accent.hex}", bg: "${cat.mantle.hex}"), 71 - thumb_style: (fg: "${accent.hex}", bg: "${cat.mantle.hex}"), 72 - ), 73 - scrollbar: ( 74 - symbols: ["│", "█", "▲", "▼"], 75 - track_style: (), 76 - ends_style: (), 77 - thumb_style: (fg: "${cat.teal.hex}"), 78 - ), 79 - browser_column_widths: [20, 38, 42], 80 - text_color: "${cat.text.hex}", 81 - background_color: "${cat.base.hex}", 82 - header_background_color: "${cat.mantle.hex}", 83 - modal_background_color: None, 84 - modal_backdrop: true, 85 - tab_bar: (active_style: (fg: "black", bg: "${accent.hex}", modifiers: "Bold"), inactive_style: ()), 86 - borders_style: (fg: "${cat.overlay0.hex}"), 87 - highlighted_item_style: (fg: "${accent.hex}", modifiers: "Bold"), 88 - current_item_style: (fg: "black", bg: "${cat.teal.hex}", modifiers: "Bold"), 89 - highlight_border_style: (fg: "${cat.teal.hex}"), 90 - cava: ( 91 - bar_symbols: ['▁', '▂', '▃', '▄', '▅', '▆', '▇', '█'], 92 - inverted_bar_symbols: ['▔', '🮂', '🮃', '▀', '🮄', '🮅', '🮆', '█'], 93 - bar_width: 1, 94 - bar_spacing: 1, 95 - orientation: Bottom, 96 - bar_color: Gradient({ 97 - 0: "${cat.lavender.hex}", 98 - 10: "${cat.blue.hex}", 99 - 20: "${cat.sapphire.hex}", 100 - 30: "${cat.teal.hex}", 101 - 40: "${cat.green.hex}", 102 - 50: "${cat.yellow.hex}", 103 - 60: "${cat.maroon.hex}", 104 - 70: "${cat.red.hex}", 105 - 80: "${cat.mauve.hex}", 106 - 90: "${cat.pink.hex}", 107 - 100: "${cat.flamingo.hex}", 108 - }), 109 - ), 110 - song_table_format: [ 111 - ( 112 - prop: (kind: Property(Artist), style: (fg: "${cat.teal.hex}"), default: (kind: Text("Unknown"))), 113 - width: "50%", 114 - alignment: Right, 115 - ), 116 - ( 117 - prop: (kind: Text("-"), style: (fg: "${cat.teal.hex}"), default: (kind: Text("Unknown"))), 118 - width: "1", 119 - alignment: Center, 120 - ), 121 - ( 122 - prop: (kind: Property(Title), style: (fg: "${accent.hex}"), default: (kind: Text("Unknown"))), 123 - width: "50%", 124 - ), 125 - ], 126 - header: ( 127 - rows: [ 128 - ( 129 - left: [ 130 - (kind: Text("["), style: (fg: "${cat.teal.hex}", modifiers: "Bold")), 131 - (kind: Property(Status(State)), style: (fg: "${cat.teal.hex}", modifiers: "Bold")), 132 - (kind: Text("]"), style: (fg: "${cat.teal.hex}", modifiers: "Bold")) 133 - ], 134 - center: [ 135 - (kind: Property(Song(Artist)), style: (fg: "${cat.yellow.hex}", modifiers: "Bold"), 136 - default: (kind: Text("Unknown"), style: (fg: "${cat.yellow.hex}", modifiers: "Bold")) 137 - ), 138 - (kind: Text(" - ")), 139 - (kind: Property(Song(Title)), style: (fg: "${accent.hex}", modifiers: "Bold"), 140 - default: (kind: Text("No Song"), style: (fg: "${accent.hex}", modifiers: "Bold")) 141 - ) 142 - ], 143 - right: [ 144 - (kind: Text("Vol: "), style: (fg: "${cat.teal.hex}", modifiers: "Bold")), 145 - (kind: Property(Status(Volume)), style: (fg: "${cat.teal.hex}", modifiers: "Bold")), 146 - (kind: Text("% "), style: (fg: "${cat.teal.hex}", modifiers: "Bold")) 147 - ] 148 - ) 149 - ], 150 - ), 151 - ) 152 - ''; 153 - configFile = '' 154 - #![enable(implicit_some)] 155 - #![enable(unwrap_newtypes)] 156 - #![enable(unwrap_variant_newtypes)] 157 - ( 158 - address: "127.0.0.1:6600", 159 - password: None, 160 - theme: Some("catppuccin"), 161 - cache_dir: None, 162 - on_song_change: None, 163 - volume_step: 5, 164 - max_fps: 30, 165 - scrolloff: 0, 166 - wrap_navigation: true, 167 - enable_mouse: true, 168 - enable_config_hot_reload: true, 169 - status_update_interval_ms: 1000, 170 - rewind_to_start_sec: None, 171 - reflect_changes_to_playlist: false, 172 - select_current_song_on_change: false, 173 - browser_song_sort: [Disc, Track, Artist, Title], 174 - directories_sort: SortFormat(group_by_type: true, reverse: false), 175 - album_art: ( 176 - method: Auto, 177 - max_size_px: (width: 1200, height: 1200), 178 - disabled_protocols: ["http://", "https://"], 179 - vertical_align: Center, 180 - horizontal_align: Center, 181 - ), 182 - cava: ( 183 - framerate: 60, // default 60 184 - autosens: true, // default true 185 - sensitivity: 100, // default 100 186 - lower_cutoff_freq: 50, // not passed to cava if not provided 187 - higher_cutoff_freq: 10000, // not passed to cava if not provided 188 - input: ( 189 - method: Fifo, 190 - source: "/tmp/mpd.fifo", 191 - sample_rate: 44100, 192 - channels: 2, 193 - sample_bits: 16, 194 - ), 195 - smoothing: ( 196 - noise_reduction: 77, // default 77 197 - monstercat: false, // default false 198 - waves: false, // default false 199 - ), 200 - eq: [] 201 - ), 202 - keybinds: ( 203 - global: { 204 - ":": CommandMode, 205 - ",": VolumeDown, 206 - "s": Stop, 207 - ".": VolumeUp, 208 - "<Tab>": NextTab, 209 - "<S-Tab>": PreviousTab, 210 - "1": SwitchToTab("Queue"), 211 - "2": SwitchToTab("Directories"), 212 - "3": SwitchToTab("Search"), 213 - "q": Quit, 214 - ">": NextTrack, 215 - "p": TogglePause, 216 - "<": PreviousTrack, 217 - "f": SeekForward, 218 - "z": ToggleRepeat, 219 - "x": ToggleRandom, 220 - "c": ToggleConsume, 221 - "v": ToggleSingle, 222 - "b": SeekBack, 223 - "~": ShowHelp, 224 - "u": Update, 225 - "U": Rescan, 226 - "I": ShowCurrentSongInfo, 227 - "O": ShowOutputs, 228 - "P": ShowDecoders, 229 - "R": AddRandom, 230 - }, 231 - navigation: { 232 - "k": Up, 233 - "j": Down, 234 - "h": Left, 235 - "l": Right, 236 - "<Up>": Up, 237 - "<Down>": Down, 238 - "<Left>": Left, 239 - "<Right>": Right, 240 - "<C-k>": PaneUp, 241 - "<C-j>": PaneDown, 242 - "<C-h>": PaneLeft, 243 - "<C-l>": PaneRight, 244 - "<C-u>": UpHalf, 245 - "N": PreviousResult, 246 - "a": Add, 247 - "A": AddAll, 248 - "r": Rename, 249 - "n": NextResult, 250 - "g": Top, 251 - "<Space>": Select, 252 - "<C-Space>": InvertSelection, 253 - "G": Bottom, 254 - "<CR>": Confirm, 255 - "i": FocusInput, 256 - "J": MoveDown, 257 - "<C-d>": DownHalf, 258 - "/": EnterSearch, 259 - "<C-c>": Close, 260 - "<Esc>": Close, 261 - "K": MoveUp, 262 - "D": Delete, 263 - "B": ShowInfo, 264 - }, 265 - queue: { 266 - "D": DeleteAll, 267 - "<CR>": Play, 268 - "<C-s>": Save, 269 - "a": AddToPlaylist, 270 - "d": Delete, 271 - "C": JumpToCurrent, 272 - "X": Shuffle, 273 - }, 274 - ), 275 - search: ( 276 - case_sensitive: false, 277 - mode: Contains, 278 - tags: [ 279 - (value: "any", label: "Any Tag"), 280 - (value: "artist", label: "Artist"), 281 - (value: "album", label: "Album"), 282 - (value: "albumartist", label: "Album Artist"), 283 - (value: "title", label: "Title"), 284 - (value: "filename", label: "Filename"), 285 - (value: "genre", label: "Genre"), 286 - ], 287 - ), 288 - artists: ( 289 - album_display_mode: SplitByDate, 290 - album_sort_by: Date, 291 - ), 292 - tabs: [ 293 - ( 294 - name: "Queue", 295 - pane: Split( 296 - direction: Horizontal, 297 - panes: [ 298 - (size: "60%", pane: Split( 299 - direction: Vertical, 300 - panes: [ 301 - (size: "50%", pane: Pane(Queue)), 302 - (size: "50%", borders: "TOP", pane: Pane(Cava)), 303 - ], 304 - )), 305 - (size: "40%", borders: "LEFT", pane: Pane(AlbumArt)), 306 - ], 307 - ), 308 - ), 309 - ( 310 - name: "Directories", 311 - pane: Pane(Directories), 312 - ), 313 - ( 314 - name: "Search", 315 - pane: Pane(Search), 316 - ), 317 - ], 318 - ) 319 - ''; 320 - in { 321 - home-manager.users.bean = { 322 - programs.cava = { 323 - enable = true; 324 - }; 325 - 326 - xdg.configFile."rmpc/themes/catppuccin.ron".text = themeFile; 327 - 328 - programs.rmpc = { 329 - enable = true; 330 - config = configFile; 331 - }; 332 - 333 - services = { 334 - mpd = { 335 - enable = true; 336 - extraConfig = '' 337 - audio_output { 338 - type "fifo" 339 - name "mpd_fifo" 340 - path "/tmp/mpd.fifo" 341 - format "44100:16:2" 342 - } 343 - audio_output { 344 - type "pipewire" 345 - name "Pipewire" 346 - } 347 - ''; 348 - }; 349 - mpdris2.enable = true; 350 - }; 351 - }; 352 - }
+60
nixosModules/network.nix
··· 1 + {...}: { 2 + config, 3 + lib, 4 + ... 5 + }: { 6 + options.cow.network = { 7 + wireless = lib.mkEnableOption "wireless networking with IWD"; 8 + bluetooth = lib.mkEnableOption "bluetooth networking"; 9 + }; 10 + 11 + config = { 12 + hardware.bluetooth = lib.mkIf config.cow.network.bluetooth { 13 + enable = true; 14 + settings = { 15 + General = { 16 + Experimental = true; 17 + }; 18 + }; 19 + }; 20 + 21 + cow.imperm.keepCache = 22 + (lib.optional config.cow.network.bluetooth "/var/lib/bluetooth") 23 + ++ (lib.optional config.cow.network.wireless "/var/lib/iwd"); 24 + 25 + networking = lib.mkIf config.cow.network.wireless { 26 + wireless.iwd.enable = true; 27 + useNetworkd = true; 28 + useDHCP = true; 29 + }; 30 + 31 + systemd.network = { 32 + enable = lib.mkDefault config.cow.network.wireless; 33 + wait-online = { 34 + enable = lib.mkDefault false; 35 + }; 36 + }; 37 + 38 + services = lib.mkIf config.cow.network.wireless { 39 + resolved = { 40 + enable = true; 41 + llmnr = "false"; 42 + fallbackDns = [ 43 + "2606:4700:4700::1111" 44 + "2606:4700:4700::1001" 45 + "1.1.1.1" 46 + "1.0.0.1" 47 + ]; 48 + }; 49 + timesyncd.servers = map (x: "time-${x}-g.nist.gov") [ 50 + "a" 51 + "b" 52 + "c" 53 + "d" 54 + "e" 55 + "f" 56 + "g" 57 + ]; 58 + }; 59 + }; 60 + }
-43
nixosModules/networking.nix
··· 1 - {pkgs, ...}: { 2 - hardware.bluetooth = { 3 - enable = true; 4 - settings = { 5 - General = { 6 - Experimental = true; 7 - }; 8 - }; 9 - }; 10 - 11 - networking.wireless.iwd.enable = true; 12 - environment.systemPackages = with pkgs; [iw]; 13 - 14 - networking.useNetworkd = true; 15 - networking.useDHCP = true; 16 - 17 - systemd.network = { 18 - enable = true; 19 - wait-online = { 20 - anyInterface = true; 21 - enable = false; 22 - }; 23 - }; 24 - services.resolved = { 25 - enable = true; 26 - llmnr = "false"; 27 - fallbackDns = [ 28 - "2606:4700:4700::1111" 29 - "2606:4700:4700::1001" 30 - "1.1.1.1" 31 - "1.0.0.1" 32 - ]; 33 - }; 34 - services.timesyncd.servers = map (x: "time-${x}-g.nist.gov") [ 35 - "a" 36 - "b" 37 - "c" 38 - "d" 39 - "e" 40 - "f" 41 - "g" 42 - ]; 43 - }
-3
nixosModules/normalboot.nix
··· 1 - {...}: { 2 - boot.loader.systemd-boot.enable = true; 3 - }
-3
nixosModules/podman.nix
··· 1 - {...}: { 2 - virtualisation.podman.enable = true; 3 - }
+31
nixosModules/print.nix
··· 1 + {...}: { 2 + config, 3 + lib, 4 + ... 5 + }: { 6 + options.cow.print.enable = lib.mkEnableOption "stateless printing + WCU printers"; 7 + 8 + config = lib.mkIf config.cow.print.enable { 9 + services.printing = { 10 + enable = true; 11 + stateless = true; 12 + }; 13 + 14 + hardware.printers = { 15 + ensurePrinters = [ 16 + { 17 + name = "RamPrint"; 18 + description = "WCU RamPrint"; 19 + deviceUri = "https://wcuprintp01.wcupa.net:9164/printers/RamPrint"; 20 + model = "drv:///sample.drv/generic.ppd"; 21 + } 22 + { 23 + name = "FHG_IMC_Color"; 24 + description = "FHG IMC Color"; 25 + deviceUri = "https://wcuprintp01.wcupa.net:9164/printers/FHG_IMC_Color"; 26 + model = "drv:///sample.drv/generic.ppd"; 27 + } 28 + ]; 29 + }; 30 + }; 31 + }
+30
nixosModules/role-desktop.nix
··· 1 + {...}: { 2 + config, 3 + lib, 4 + ... 5 + }: { 6 + options.cow.role-desktop = { 7 + enable = lib.mkEnableOption "configuring a desktop computer with GUI"; 8 + }; 9 + 10 + config = lib.mkIf config.cow.role-desktop.enable { 11 + security.sudo.wheelNeedsPassword = false; 12 + 13 + cow = { 14 + bean.enable = true; 15 + firewall.openForUsers = true; 16 + hm.enable = true; 17 + network = { 18 + bluetooth = lib.mkDefault true; 19 + wireless = lib.mkDefault true; 20 + }; 21 + cat.enable = true; 22 + gdi = { 23 + enable = true; 24 + doIdle = lib.mkDefault false; 25 + showGreet = true; 26 + }; 27 + audio.enable = true; 28 + }; 29 + }; 30 + }
+43
nixosModules/role-laptop.nix
··· 1 + {...}: { 2 + config, 3 + lib, 4 + ... 5 + }: { 6 + options.cow.role-laptop = { 7 + enable = lib.mkEnableOption "configuring a laptop with a GUI and bean setup for mobile use"; 8 + fingerPrintSensor = lib.mkEnableOption "fprintd and persist prints"; 9 + }; 10 + 11 + config = lib.mkIf config.cow.role-laptop.enable { 12 + home-manager.users.bean.cow = lib.mkIf config.cow.bean.enable { 13 + music.enable = true; 14 + news.enable = true; 15 + qmplay2.enable = true; 16 + sync.enable = true; 17 + dev.enable = true; 18 + }; 19 + 20 + cow = { 21 + bean.enable = true; 22 + firewall.openForUsers = true; 23 + print.enable = true; 24 + hm.enable = true; 25 + network = { 26 + bluetooth = true; 27 + wireless = true; 28 + }; 29 + cat.enable = true; 30 + gdi = { 31 + enable = true; 32 + doIdle = true; 33 + showGreet = true; 34 + }; 35 + audio.enable = true; 36 + imperm.keep = lib.optional config.cow.role-laptop.fingerPrintSensor "/var/lib/fprint"; 37 + }; 38 + 39 + services.fprintd = lib.mkIf config.cow.role-laptop.fingerPrintSensor { 40 + enable = true; 41 + }; 42 + }; 43 + }
-17
nixosModules/secureboot.nix
··· 1 - { 2 - inputs, 3 - lib, 4 - ... 5 - }: { 6 - imports = [inputs.lanzaboote.nixosModules.lanzaboote]; 7 - 8 - boot = { 9 - loader.systemd-boot.enable = lib.mkForce false; 10 - bootspec.enable = true; 11 - 12 - lanzaboote = { 13 - enable = true; 14 - pkiBundle = lib.mkDefault "/etc/secureboot"; 15 - }; 16 - }; 17 - }
+34
nixosModules/ssh-server.nix
··· 1 + {...}: { 2 + lib, 3 + config, 4 + ... 5 + }: { 6 + options.cow.ssh-server.enable = lib.mkEnableOption "OpenSSH daemon for accepting connections + customizations. Uses port 8069"; 7 + 8 + config = lib.mkIf config.cow.ssh-server.enable { 9 + # For nicer term rendering 10 + environment.enableAllTerminfo = true; 11 + 12 + services.openssh = { 13 + enable = true; 14 + openFirewall = true; 15 + banner = '' 16 + -=≡ ${lib.toUpper config.networking.hostName} ≡=- 17 + 18 + ''; 19 + listenAddresses = [ 20 + { 21 + addr = "0.0.0.0"; 22 + } 23 + ]; 24 + # TODO: Maybe just use 22 like a normal person 25 + ports = [8069]; 26 + settings.GSSAPIAuthentication = false; 27 + settings.PasswordAuthentication = false; 28 + settings.UseDns = false; 29 + # settings.LogLevel = "DEBUG1"; 30 + settings.PermitRootLogin = "no"; 31 + settings.KbdInteractiveAuthentication = false; 32 + }; 33 + }; 34 + }
-34
nixosModules/ssh.nix
··· 1 - { 2 - lib, 3 - config, 4 - ... 5 - }: let 6 - beanPubkey = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIKb2qxNUbvdBTAntmUyPIaOXwFd1nhZO/SS00SNss0nU"; 7 - in { 8 - users.users."bean".openssh.authorizedKeys.keys = [ 9 - beanPubkey 10 - ]; 11 - 12 - environment.enableAllTerminfo = true; 13 - 14 - services.openssh = { 15 - enable = true; 16 - openFirewall = true; 17 - banner = '' 18 - -=≡ ${lib.toUpper config.networking.hostName} ≡=- 19 - 20 - ''; 21 - listenAddresses = [ 22 - { 23 - addr = "0.0.0.0"; 24 - } 25 - ]; 26 - ports = [8069]; 27 - settings.GSSAPIAuthentication = false; 28 - settings.PasswordAuthentication = false; 29 - settings.UseDns = false; 30 - # settings.LogLevel = "DEBUG1"; 31 - settings.PermitRootLogin = "no"; 32 - settings.KbdInteractiveAuthentication = false; 33 - }; 34 - }
-14
nixosModules/sync.nix
··· 1 - {...}: { 2 - services.syncthing = { 3 - enable = true; 4 - user = "bean"; 5 - group = "users"; 6 - openDefaultPorts = true; 7 - 8 - dataDir = "/home/bean"; 9 - overrideFolders = false; 10 - overrideDevices = false; 11 - 12 - settings.options.urAccepted = -1; 13 - }; 14 - }
+35
nixosModules/user-bean.nix
··· 1 + {...}: { 2 + config, 3 + lib, 4 + pkgs, 5 + ... 6 + }: let 7 + pubkey = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIKsVzdJra+x5aEuwTjL1FBOiMh9bftvs8QwsM1xyEbdd"; 8 + in { 9 + options.cow.bean = { 10 + enable = lib.mkEnableOption "Bean user"; 11 + sudoer = lib.mkEnableOption "Bean being a sudoer"; 12 + }; 13 + 14 + config = lib.mkIf config.cow.bean.enable { 15 + users.users.bean = { 16 + isNormalUser = true; 17 + description = "Ben C"; 18 + extraGroups = lib.optional config.cow.bean.sudoer "wheel"; 19 + shell = pkgs.nushell; 20 + openssh.authorizedKeys.keys = [pubkey]; 21 + }; 22 + 23 + home-manager.users.bean = { 24 + cow.bean = { 25 + inherit (config.cow.bean) enable; 26 + inherit pubkey; 27 + }; 28 + cow.games.enable = config.cow.gaming.enable; 29 + cow.gdi = { 30 + inherit (config.cow.gdi) enable doIdle; 31 + useUWSM = true; 32 + }; 33 + }; 34 + }; 35 + }
-4
nixosModules/vm.nix
··· 1 - {modulesPath, ...}: { 2 - imports = ["${modulesPath}/virtualisation/qemu-vm.nix"]; 3 - services.qemuGuest.enable = true; 4 - }
+1 -1
res/bat_display.nu
··· 43 43 $icons | get "default" | get $idx 44 44 } 45 45 46 - echo $"($icon) ($percent)󰏰" 46 + echo $" | ($icon) ($percent)󰏰"
+1 -1
res/battery_notif.nu
··· 70 70 71 71 let devices = list_devices; 72 72 73 - print "===========" "Device List" ($devices | select friendly_name upower_path Type) "-----------"; 73 + # print "===========" "Device List" ($devices | select friendly_name upower_path Type) "-----------"; 74 74 75 75 for dev in $devices { 76 76 if (($shown_notifs | get -o $dev.upower_path | get -o 0) == null) {
+5
res/nushellCompletions/carapace.nu
··· 1 + {|spans: list<string>| 2 + __carapace__ $spans.0 nushell ...$spans 3 + | from json 4 + | if ($in | default [] | where value =~ '^-.*ERR$' | is-empty) { $in } else { null } 5 + }
-78
systemConfigs/aperture.nix
··· 1 - { 2 - inputs, 3 - outputs, 4 - ... 5 - }: { 6 - system = "x86_64-linux"; 7 - 8 - modules = [ 9 - (outputs.lib.applyRoles ["base" "latest-linux" "dev" "graphics" "games" "fun" "social" "imperm" "secureboot" "networking" "hypervisor" "podman" "sync" "music"]) 10 - inputs.nixos-hardware.nixosModules.framework-13th-gen-intel 11 - 12 - ( 13 - { 14 - config, 15 - lib, 16 - pkgs, 17 - modulesPath, 18 - inputs, 19 - outputs, 20 - ... 21 - }: { 22 - system.stateVersion = "25.05"; 23 - networking.hostName = "aperture"; 24 - 25 - services.fprintd.enable = true; 26 - 27 - boot.initrd.availableKernelModules = ["xhci_pci" "thunderbolt" "nvme" "usb_storage" "sd_mod"]; 28 - boot.initrd.kernelModules = []; 29 - boot.kernelModules = ["kvm-intel"]; 30 - boot.extraModulePackages = []; 31 - boot.binfmt.emulatedSystems = ["aarch64-linux"]; 32 - 33 - hardware.framework.enableKmod = false; 34 - 35 - fileSystems."/" = { 36 - fsType = "tmpfs"; 37 - options = ["size=512M" "mode=755"]; 38 - neededForBoot = true; 39 - }; 40 - 41 - fileSystems."/home" = { 42 - fsType = "tmpfs"; 43 - options = ["size=2G"]; 44 - neededForBoot = true; 45 - }; 46 - 47 - fileSystems."/boot" = { 48 - device = "/dev/disk/by-uuid/88E4-A64F"; 49 - fsType = "vfat"; 50 - options = ["fmask=0022" "dmask=0022" "nosuid" "nodev" "noexec" "noatime"]; 51 - }; 52 - 53 - fileSystems."/nix" = { 54 - device = "/dev/disk/by-uuid/fd9f484a-a5ef-4378-b054-d292b0204afb"; 55 - fsType = "ext4"; 56 - options = ["lazytime" "nodev" "nosuid"]; 57 - neededForBoot = true; 58 - }; 59 - 60 - boot.initrd.luks.devices."cryptroot".device = "/dev/disk/by-uuid/330c8e83-23cd-46bf-99b3-75a7f5d7c5dc"; 61 - boot.initrd.luks.devices."cryptswap".device = "/dev/disk/by-uuid/c599ad48-750b-458d-8361-601bee3eb066"; 62 - 63 - swapDevices = [ 64 - {device = "/dev/disk/by-uuid/834d0d23-6a06-416f-853f-36c6ce81f355";} 65 - ]; 66 - 67 - networking.useDHCP = lib.mkDefault true; 68 - 69 - services.fwupd.enable = true; 70 - 71 - powerManagement.cpuFreqGovernor = lib.mkDefault "powersave"; 72 - hardware.enableRedistributableFirmware = lib.mkDefault true; 73 - hardware.cpu.intel.updateMicrocode = 74 - lib.mkDefault config.hardware.enableRedistributableFirmware; 75 - } 76 - ) 77 - ]; 78 - }
-146
systemConfigs/black-mesa.nix
··· 1 - { 2 - outputs, 3 - inputs, 4 - ... 5 - }: 6 - { 7 - system = "x86_64-linux"; 8 - specialArgs.inputs = inputs // inputs.spoon.inputs // { inherit (inputs) self; }; 9 - 10 - modules = [ 11 - inputs.spoon.nixosModules.black-mesa 12 - (outputs.lib.applyRoles [ 13 - "base" 14 - "latest-linux" 15 - "networking" 16 - "ssh" 17 - "graphics" 18 - "games" 19 - "sync" 20 - "fun" 21 - "dev" 22 - "normalboot" 23 - "mc-server" 24 - ]) 25 - { 26 - systemd.network.links."79-eth-wol" = { 27 - matchConfig = { 28 - Type = "ether"; 29 - Driver = "!veth"; 30 - Virtualization = "false"; 31 - }; 32 - linkConfig = { 33 - WakeOnLan = "magic"; 34 - NamePolicy = "keep kernel database onboard slot path"; 35 - AlternativeNamesPolicy = "database onboard slot path mac"; 36 - MACAddressPolicy = "persistent"; 37 - }; 38 - }; 39 - } 40 - { 41 - imports = [ inputs.bingus.nixosModules.default ]; 42 - nixpkgs.overlays = [ inputs.bingus.overlays.default ]; 43 - 44 - services.bingus-bot = { 45 - enable = true; 46 - replyChannels = [ 47 - 1295447496948191262 48 - 1295245646542143489 49 - ]; 50 - }; 51 - } 52 - ( 53 - { 54 - modulesPath, 55 - lib, 56 - config, 57 - pkgs, 58 - ... 59 - }: 60 - { 61 - imports = [ (modulesPath + "/installer/scan/not-detected.nix") ]; 62 - networking.hostName = "black-mesa"; 63 - system.stateVersion = "25.05"; 64 - 65 - boot.initrd.availableKernelModules = [ 66 - "nvme" 67 - "xhci_pci" 68 - "ahci" 69 - "usbhid" 70 - "usb_storage" 71 - "sd_mod" 72 - ]; 73 - boot.kernelModules = [ "kvm-amd" ]; 74 - boot.extraModulePackages = [ ]; 75 - 76 - services.pulseaudio.enable = false; 77 - 78 - security.rtkit.enable = true; # Allows pipewire and friends to run realtime 79 - 80 - services.pipewire = { 81 - enable = true; 82 - pulse.enable = true; 83 - alsa = { 84 - enable = true; 85 - support32Bit = true; 86 - }; 87 - }; 88 - 89 - programs.steam = { 90 - enable = true; 91 - remotePlay.openFirewall = true; 92 - dedicatedServer.openFirewall = true; 93 - localNetworkGameTransfers.openFirewall = true; 94 - }; 95 - 96 - programs.gamescope = { 97 - enable = true; 98 - # package = pkgs.gamescope.overrideAttrs (new: old: { 99 - # src = pkgs.fetchFromGitHub { 100 - # owner = "ValveSoftware"; 101 - # repo = "gamescope"; 102 - # rev = "186f3a3ed0ce8eb5f3a956d3916a3331ea4e3ab2"; 103 - # fetchSubmodules = true; 104 - # hash = "sha256-zAzIi3syJYtbKjydp19d1OxZvMjXb+eO+mXT/mJPEuA="; 105 - # }; 106 - # }); 107 - capSysNice = true; 108 - }; 109 - 110 - fileSystems."/" = { 111 - device = "/dev/nvme0n1p2"; 112 - fsType = "ext4"; 113 - }; 114 - 115 - fileSystems."/boot" = { 116 - device = "/dev/nvme0n1p1"; 117 - fsType = "vfat"; 118 - }; 119 - 120 - fileSystems."/mnt/storage" = { 121 - device = "/dev/sda1"; 122 - fsType = "btrfs"; 123 - }; 124 - 125 - swapDevices = [ ]; 126 - 127 - hardware.cpu.amd.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware; 128 - 129 - hardware.graphics = { 130 - enable = true; 131 - enable32Bit = true; 132 - }; 133 - hardware.amdgpu = { 134 - initrd.enable = true; 135 - }; 136 - services.xserver.videoDrivers = [ "modesetting" ]; 137 - 138 - # services.nix-serve = { 139 - # enable = true; 140 - # secretKeyFile = "/etc/nix-serve-key"; 141 - # openFirewall = true; 142 - # }; 143 - } 144 - ) 145 - ]; 146 - }
-65
systemConfigs/installer.nix
··· 1 - {outputs, ...}: { 2 - system = "x86_64-linux"; 3 - modules = [ 4 - (outputs.lib.applyRoles [ 5 - "base" 6 - "latest-linux" 7 - "dev" 8 - "networking" 9 - "fun" 10 - ]) 11 - ( 12 - { 13 - pkgs, 14 - lib, 15 - inputs, 16 - edition, 17 - config, 18 - modulesPath, 19 - ... 20 - }: { 21 - system.stateVersion = "25.05"; 22 - networking.hostName = "nixos-installer-bwc9876"; 23 - networking.networkmanager.enable = lib.mkForce false; 24 - 25 - imports = [ 26 - "${modulesPath}/installer/cd-dvd/installation-cd-minimal.nix" 27 - ]; 28 - 29 - services.kmscon = { 30 - enable = true; 31 - autologinUser = "bean"; 32 - fonts = [ 33 - { 34 - name = "FiraMono Nerd Font Mono"; 35 - package = pkgs.nerd-fonts.fira-mono; 36 - } 37 - ]; 38 - }; 39 - 40 - boot = let 41 - supportedFilesystems = { 42 - btrfs = true; 43 - reiserfs = lib.mkForce false; 44 - vfat = true; 45 - f2fs = true; 46 - xfs = true; 47 - ntfs = true; 48 - cifs = true; 49 - zfs = lib.mkForce false; 50 - }; 51 - in { 52 - initrd.systemd.enable = false; 53 - inherit supportedFilesystems; 54 - initrd = { 55 - inherit supportedFilesystems; 56 - }; 57 - }; 58 - 59 - environment.systemPackages = with pkgs; [ 60 - gptfdisk 61 - ]; 62 - } 63 - ) 64 - ]; 65 - }
-25
systemConfigs/mann-co.nix
··· 1 - { 2 - inputs, 3 - outputs, 4 - ... 5 - }: { 6 - system = "aarch64-linux"; 7 - 8 - modules = [ 9 - (outputs.lib.applyRoles ["base" "ssh"]) 10 - ({pkgs, ...}: { 11 - boot.kernelPackages = pkgs.linuxPackages_rpi4; 12 - system.stateVersion = "25.05"; 13 - networking.hostName = "mann-co"; 14 - nixpkgs.overlays = [ 15 - (final: super: { 16 - makeModulesClosure = x: 17 - super.makeModulesClosure (x // {allowMissing = true;}); 18 - }) 19 - ]; 20 - }) 21 - "${inputs.nixpkgs}/nixos/modules/installer/sd-card/sd-image-aarch64.nix" 22 - {disabledModules = ["${inputs.nixpkgs}/nixos/modules/profiles/base.nix"];} 23 - inputs.nixos-hardware.nixosModules.raspberry-pi-4 24 - ]; 25 - }
-10
systemConfigs/test.nix
··· 1 - {outputs, ...}: { 2 - system = "x86_64-linux"; 3 - modules = [ 4 - { 5 - system.stateVersion = "25.05"; 6 - networking.hostName = "test"; 7 - } 8 - (outputs.lib.applyRoles ["base" "latest-linux" "normalboot" "vm"]) 9 - ]; 10 - }