My Nix Configuration
1{ 2 pkgs, 3 lib, 4 config, 5 ... 6}: 7let 8 cfg = config.py.profiles.desktop; 9 inherit (cfg) shell; 10 inherit (lib) mkIf mkDefault mkEnableOption; 11 12 mkShellOption = 13 name: var: 14 lib.mkOption { 15 type = lib.types.bool; 16 default = if (shell == var) then true else false; 17 description = "Enable ${name}"; 18 readOnly = true; 19 visible = false; 20 internal = true; 21 }; 22in 23{ 24 options.py.profiles.desktop = { 25 enable = mkEnableOption "Desktop Config"; 26 shell = lib.mkOption { 27 type = lib.types.enum [ 28 "caelestia" 29 "dms" 30 ]; 31 default = "caelestia"; 32 description = "The desktop shell to use in the graphical environment"; 33 }; 34 caelestia = mkShellOption "Caelestia shell" "caelestia"; 35 dms = mkShellOption "DMS" "dms"; 36 }; 37 config = mkIf cfg.enable { 38 py.profiles.base.enable = true; 39 py.profiles.cli.enable = true; 40 py.profiles.gui.enable = true; 41 py.profiles.development.enable = true; 42 programs.mpv = { 43 enable = mkDefault true; 44 scripts = with pkgs.mpvScripts; [ 45 videoclip 46 mpris 47 modernz 48 thumbfast 49 ]; 50 config = { 51 osc = false; 52 keep-open = true; 53 }; 54 scriptOpts = { 55 modernz.greenandgrumpy = true; 56 videoclip.preset = "medium"; 57 videoclip.video_folder_path = "~/Videos/mpv-clips/"; 58 videoclip.video_width = 1920; 59 videoclip.video_height = 1080; 60 }; 61 }; 62 home.packages = with pkgs; [ 63 archipelago 64 brightnessctl 65 clipman 66 dex 67 keepassxc 68 playerctl 69 poptracker 70 thunderbird 71 wl-clipboard 72 zotero 73 ]; 74 services.easyeffects.enable = mkDefault true; 75 }; 76}