switch nixfmt to alejandra to format nix code
This commit is contained in:
		
							parent
							
								
									582bdb783c
								
							
						
					
					
						commit
						e44894c666
					
				
					 120 changed files with 1163 additions and 1237 deletions
				
			
		
							
								
								
									
										62
									
								
								flake.nix
									
										
									
									
									
								
							
							
						
						
									
										62
									
								
								flake.nix
									
										
									
									
									
								
							|  | @ -170,32 +170,33 @@ | |||
|       }; | ||||
|     }; | ||||
|   }; | ||||
|   outputs = | ||||
|     { | ||||
|   outputs = { | ||||
|     self, | ||||
|     nixpkgs, | ||||
|     flake-parts, | ||||
|     flake-utils, | ||||
|     ... | ||||
|     }@inputs: | ||||
|     let | ||||
|   } @ inputs: let | ||||
|     inherit (self) outputs; | ||||
|     rootPath = ./.; | ||||
|   in | ||||
|     flake-parts.lib.mkFlake { inherit inputs; } { | ||||
|     flake-parts.lib.mkFlake {inherit inputs;} { | ||||
|       systems = flake-utils.lib.defaultSystems; | ||||
|       imports = [ | ||||
|         inputs.home-manager.flakeModules.home-manager | ||||
|       ]; | ||||
|       perSystem = | ||||
|         { pkgs, system, ... }@args: | ||||
|         { | ||||
|       perSystem = { | ||||
|         pkgs, | ||||
|         system, | ||||
|         ... | ||||
|       } @ args: { | ||||
|         _module.args.pkgs = import inputs.nixpkgs { | ||||
|           inherit system; | ||||
|           config = { | ||||
|             allowUnfree = true; | ||||
|           }; | ||||
|         }; | ||||
|         formatter = pkgs.alejandra; | ||||
|         packages = import ./pkgs ( | ||||
|           args | ||||
|           // { | ||||
|  | @ -207,8 +208,7 @@ | |||
|         { | ||||
|           nix.settings = { | ||||
|             # substituters shared in home-manager and nixos configuration | ||||
|             substituters = | ||||
|               let | ||||
|             substituters = let | ||||
|               cachix = x: "https://${x}.cachix.org"; | ||||
|             in | ||||
|               nixpkgs.lib.flatten [ | ||||
|  | @ -221,28 +221,28 @@ | |||
|           nixosModules.default = import ./nixos/modules; | ||||
| 
 | ||||
|           overlays = { | ||||
|             modifications = (import ./overlays/modifications { inherit inputs outputs; }); | ||||
|             additions = (import ./overlays/additions { inherit inputs outputs; }); | ||||
|             modifications = import ./overlays/modifications {inherit inputs outputs;}; | ||||
|             additions = import ./overlays/additions {inherit inputs outputs;}; | ||||
|           }; | ||||
| 
 | ||||
|           nixosConfigurations = | ||||
|             let | ||||
|           nixosConfigurations = let | ||||
|             nixosConfigDir = ./nixos/configurations; | ||||
|               makeNixConfiguration = | ||||
|                 hostName: | ||||
|             makeNixConfiguration = hostName: | ||||
|               nixpkgs.lib.nixosSystem { | ||||
|                 modules = | ||||
|                     [ outputs.nixosModules.default ] | ||||
|                   [outputs.nixosModules.default] | ||||
|                   ++ [ | ||||
|                     ( | ||||
|                       let | ||||
|                         dirPath = nixosConfigDir + "/${hostName}"; | ||||
|                         filePath = nixosConfigDir + "/${hostName}.nix"; | ||||
|                       in | ||||
|                         if builtins.pathExists dirPath then dirPath else filePath | ||||
|                         if builtins.pathExists dirPath | ||||
|                         then dirPath | ||||
|                         else filePath | ||||
|                     ) | ||||
|                   ]; | ||||
|                   specialArgs = { inherit inputs outputs rootPath; }; | ||||
|                 specialArgs = {inherit inputs outputs rootPath;}; | ||||
|               }; | ||||
|           in | ||||
|             nixosConfigDir | ||||
|  | @ -257,15 +257,13 @@ | |||
|         } | ||||
|         // ( | ||||
|           let | ||||
|             mkHomeConfig = | ||||
|               { | ||||
|             mkHomeConfig = { | ||||
|               hostName, | ||||
|               unixName ? "david", | ||||
|               system ? "x86_64-linux", | ||||
|               nixpkgs ? inputs.nixpkgs, | ||||
|               home-manager ? inputs.home-manager, | ||||
|               }: | ||||
|               { | ||||
|             }: { | ||||
|               "${unixName}@${hostName}" = home-manager.lib.homeManagerConfiguration { | ||||
|                 pkgs = nixpkgs.legacyPackages."${system}"; | ||||
|                 modules = | ||||
|  | @ -291,11 +289,10 @@ | |||
|                 }; | ||||
|               }; | ||||
|             }; | ||||
|           in | ||||
|           { | ||||
|           in { | ||||
|             homeConfigurations = | ||||
|               nixpkgs.lib.foldr (a: b: a // b) { } ( | ||||
|                 map (hostName: mkHomeConfig { inherit hostName; }) [ | ||||
|               nixpkgs.lib.foldr (a: b: a // b) {} ( | ||||
|                 map (hostName: mkHomeConfig {inherit hostName;}) [ | ||||
|                   "Tytonidae" | ||||
|                   "Akun" | ||||
|                 ] | ||||
|  | @ -331,14 +328,12 @@ | |||
|         ) | ||||
|         // ( | ||||
|           let | ||||
|             mkDeployNode = | ||||
|               { | ||||
|             mkDeployNode = { | ||||
|               hostName, | ||||
|               unixName ? "deploy", | ||||
|               system ? "x86_64-linux", | ||||
|               sshName ? hostName, | ||||
|               }: | ||||
|               { | ||||
|             }: { | ||||
|               "${hostName}" = { | ||||
|                 hostname = "${sshName}"; | ||||
|                 sshUser = "${unixName}"; | ||||
|  | @ -353,8 +348,7 @@ | |||
|                 }; | ||||
|               }; | ||||
|             }; | ||||
|           in | ||||
|           { | ||||
|           in { | ||||
|             deploy.nodes = | ||||
|               [ | ||||
|                 "Cape" | ||||
|  | @ -366,7 +360,7 @@ | |||
|                     inherit hostName; | ||||
|                   } | ||||
|               ) | ||||
|               |> nixpkgs.lib.foldr (a: b: a // b) { }; | ||||
|               |> nixpkgs.lib.foldr (a: b: a // b) {}; | ||||
|           } | ||||
|         ); | ||||
|     }; | ||||
|  |  | |||
|  | @ -3,8 +3,7 @@ | |||
|   unixName, | ||||
|   config, | ||||
|   ... | ||||
| }: | ||||
| { | ||||
| }: { | ||||
|   youthlic = { | ||||
|     xdg-dirs.enable = true; | ||||
|     programs = { | ||||
|  |  | |||
|  | @ -1 +1 @@ | |||
| { ... }: { } | ||||
| {...}: {} | ||||
|  |  | |||
|  | @ -4,8 +4,7 @@ | |||
|   config, | ||||
|   rootPath, | ||||
|   ... | ||||
| }: | ||||
| { | ||||
| }: { | ||||
|   youthlic = { | ||||
|     xdg-dirs.enable = true; | ||||
|     programs = { | ||||
|  |  | |||
|  | @ -5,8 +5,7 @@ | |||
|   inputs, | ||||
|   unixName, | ||||
|   ... | ||||
| }: | ||||
| { | ||||
| }: { | ||||
|   youthlic = { | ||||
|     xdg-dirs.enable = true; | ||||
|     programs = { | ||||
|  |  | |||
|  | @ -1,5 +1,4 @@ | |||
| { pkgs, ... }: | ||||
| { | ||||
| {pkgs, ...}: { | ||||
|   imports = [ | ||||
|     ./wallpaper.nix | ||||
|     ./programs | ||||
|  |  | |||
|  | @ -1,5 +1,4 @@ | |||
| { ... }: | ||||
| { | ||||
| {...}: { | ||||
|   imports = [ | ||||
|     ./openssh.nix | ||||
|     ./niri | ||||
|  |  | |||
|  | @ -1,8 +1,10 @@ | |||
| { config, lib, ... }: | ||||
| let | ||||
|   cfg = config.david.programs.niri; | ||||
| in | ||||
| { | ||||
|   config, | ||||
|   lib, | ||||
|   ... | ||||
| }: let | ||||
|   cfg = config.david.programs.niri; | ||||
| in { | ||||
|   options = { | ||||
|     david.programs.niri = { | ||||
|       enable = lib.mkEnableOption "niri"; | ||||
|  |  | |||
|  | @ -3,11 +3,9 @@ | |||
|   config, | ||||
|   lib, | ||||
|   ... | ||||
| }: | ||||
| let | ||||
| }: let | ||||
|   cfg = config.david.programs.openssh; | ||||
| in | ||||
| { | ||||
| in { | ||||
|   options = { | ||||
|     david.programs.openssh = { | ||||
|       enable = lib.mkEnableOption "openssh"; | ||||
|  | @ -35,10 +33,9 @@ in | |||
|           }; | ||||
|         }; | ||||
|       }; | ||||
| 
 | ||||
|     }) | ||||
|     (lib.mkIf (cfg.enable && config.youthlic.programs.sops.enable) { | ||||
|       programs.ssh.includes = [ config.sops.secrets.ssh-config.path ]; | ||||
|       programs.ssh.includes = [config.sops.secrets.ssh-config.path]; | ||||
|       sops.secrets = { | ||||
|         "ssh-private-key/tytonidae" = { | ||||
|           mode = "0600"; | ||||
|  |  | |||
|  | @ -1,8 +1,10 @@ | |||
| { lib, config, ... }: | ||||
| let | ||||
|   cfg = config.david.programs.wluma; | ||||
| in | ||||
| { | ||||
|   lib, | ||||
|   config, | ||||
|   ... | ||||
| }: let | ||||
|   cfg = config.david.programs.wluma; | ||||
| in { | ||||
|   options = { | ||||
|     david.programs.wluma = { | ||||
|       enable = lib.mkEnableOption "wluma"; | ||||
|  |  | |||
|  | @ -3,11 +3,9 @@ | |||
|   lib, | ||||
|   config, | ||||
|   ... | ||||
| }: | ||||
| let | ||||
| }: let | ||||
|   cfg = config.david.wallpaper; | ||||
| in | ||||
| { | ||||
| in { | ||||
|   options = { | ||||
|     david.wallpaper = { | ||||
|       enable = lib.mkEnableOption "wallpaper"; | ||||
|  |  | |||
|  | @ -1,5 +1,4 @@ | |||
| { inputs, ... }: | ||||
| { | ||||
| {inputs, ...}: { | ||||
|   imports = | ||||
|     (with inputs; [ | ||||
|       niri-flake.homeModules.niri | ||||
|  |  | |||
|  | @ -4,13 +4,12 @@ | |||
|   pkgs, | ||||
|   inputs, | ||||
|   ... | ||||
| }: | ||||
| { | ||||
| }: { | ||||
|   config = { | ||||
|     nixpkgs = { | ||||
|       config = { | ||||
|         allowUnfree = true; | ||||
|         allowUnfreePredicate = (_: true); | ||||
|         allowUnfreePredicate = _: true; | ||||
|       }; | ||||
|       overlays = [ | ||||
|         outputs.overlays.modifications | ||||
|  |  | |||
|  | @ -1,8 +1,4 @@ | |||
| { | ||||
|   inputs, | ||||
|   ... | ||||
| }: | ||||
| { | ||||
| {inputs, ...}: { | ||||
|   imports = | ||||
|     (with inputs; [ | ||||
|       sops-nix.homeManagerModules.sops | ||||
|  |  | |||
|  | @ -1,8 +1,10 @@ | |||
| { lib, config, ... }: | ||||
| let | ||||
|   cfg = config.youthlic.programs.atuin; | ||||
| in | ||||
| { | ||||
|   lib, | ||||
|   config, | ||||
|   ... | ||||
| }: let | ||||
|   cfg = config.youthlic.programs.atuin; | ||||
| in { | ||||
|   options = { | ||||
|     youthlic.programs.atuin = { | ||||
|       enable = lib.mkEnableOption "atuin"; | ||||
|  |  | |||
|  | @ -1,8 +1,10 @@ | |||
| { lib, config, ... }: | ||||
| let | ||||
|   cfg = config.youthlic.programs.chromium; | ||||
| in | ||||
| { | ||||
|   lib, | ||||
|   config, | ||||
|   ... | ||||
| }: let | ||||
|   cfg = config.youthlic.programs.chromium; | ||||
| in { | ||||
|   options = { | ||||
|     youthlic.programs.chromium = { | ||||
|       enable = lib.mkEnableOption "chromium"; | ||||
|  |  | |||
|  | @ -1,5 +1,4 @@ | |||
| { ... }: | ||||
| { | ||||
| {...}: { | ||||
|   imports = [ | ||||
|     ./zed.nix | ||||
|     ./rustypaste-cli.nix | ||||
|  |  | |||
|  | @ -3,11 +3,9 @@ | |||
|   lib, | ||||
|   pkgs, | ||||
|   ... | ||||
| }: | ||||
| let | ||||
| }: let | ||||
|   cfg = config.youthlic.programs.espanso; | ||||
| in | ||||
| { | ||||
| in { | ||||
|   options = { | ||||
|     youthlic.programs.espanso = { | ||||
|       enable = lib.mkEnableOption "espanso"; | ||||
|  | @ -18,7 +16,7 @@ in | |||
|       enable = true; | ||||
|       package = pkgs.espanso-wayland; | ||||
|       configs = { | ||||
|         default = { }; | ||||
|         default = {}; | ||||
|       }; | ||||
|       matches = { | ||||
|         base = { | ||||
|  |  | |||
|  | @ -5,11 +5,9 @@ | |||
|   lib, | ||||
|   config, | ||||
|   ... | ||||
| }: | ||||
| let | ||||
| }: let | ||||
|   cfg = config.youthlic.programs.firefox; | ||||
| in | ||||
| { | ||||
| in { | ||||
|   options = { | ||||
|     youthlic.programs.firefox = { | ||||
|       enable = lib.mkEnableOption "firefox"; | ||||
|  | @ -60,7 +58,7 @@ in | |||
|                 } | ||||
|               ]; | ||||
|               icon = "${pkgs.nixos-icons}/share/icons/hicolor/scalable/apps/nix-snowflake.svg"; | ||||
|               definedAliases = [ "@np" ]; | ||||
|               definedAliases = ["@np"]; | ||||
|             }; | ||||
|             "Nix Options" = { | ||||
|               urls = [ | ||||
|  | @ -78,7 +76,7 @@ in | |||
|                   ]; | ||||
|                 } | ||||
|               ]; | ||||
|               definedAliases = [ "@no" ]; | ||||
|               definedAliases = ["@no"]; | ||||
|             }; | ||||
|             "Home Manager Options" = { | ||||
|               urls = [ | ||||
|  | @ -96,7 +94,7 @@ in | |||
|                   ]; | ||||
|                 } | ||||
|               ]; | ||||
|               definedAliases = [ "hm" ]; | ||||
|               definedAliases = ["hm"]; | ||||
|             }; | ||||
|             "NUR Packages" = { | ||||
|               urls = [ | ||||
|  | @ -104,7 +102,7 @@ in | |||
|                   template = "https://nur.nix-community.org/"; | ||||
|                 } | ||||
|               ]; | ||||
|               definedAliases = [ "nu" ]; | ||||
|               definedAliases = ["nu"]; | ||||
|             }; | ||||
|             "Nix Flakes" = { | ||||
|               urls = [ | ||||
|  | @ -122,7 +120,7 @@ in | |||
|                   ]; | ||||
|                 } | ||||
|               ]; | ||||
|               definedAliases = [ "nf" ]; | ||||
|               definedAliases = ["nf"]; | ||||
|             }; | ||||
|             "NixOS Wiki" = { | ||||
|               urls = [ | ||||
|  | @ -136,7 +134,7 @@ in | |||
|                   ]; | ||||
|                 } | ||||
|               ]; | ||||
|               definedAliases = [ "nw" ]; | ||||
|               definedAliases = ["nw"]; | ||||
|             }; | ||||
|             "bing".metaData.hidden = true; | ||||
|             "google".metaData.alias = "@g"; # builtin engines only support specifying one additional alias | ||||
|  |  | |||
|  | @ -1,8 +1,10 @@ | |||
| { config, lib, ... }: | ||||
| let | ||||
|   cfg = config.youthlic.programs.foot; | ||||
| in | ||||
| { | ||||
|   config, | ||||
|   lib, | ||||
|   ... | ||||
| }: let | ||||
|   cfg = config.youthlic.programs.foot; | ||||
| in { | ||||
|   options = { | ||||
|     youthlic.programs.foot = { | ||||
|       enable = lib.mkEnableOption "foot"; | ||||
|  |  | |||
|  | @ -1,8 +1,10 @@ | |||
| { config, lib, ... }: | ||||
| let | ||||
|   cfg = config.youthlic.programs.fuzzel; | ||||
| in | ||||
| { | ||||
|   config, | ||||
|   lib, | ||||
|   ... | ||||
| }: let | ||||
|   cfg = config.youthlic.programs.fuzzel; | ||||
| in { | ||||
|   options = { | ||||
|     youthlic.programs.fuzzel = { | ||||
|       enable = lib.mkEnableOption "fuzzel"; | ||||
|  |  | |||
|  | @ -3,18 +3,15 @@ | |||
|   config, | ||||
|   lib, | ||||
|   ... | ||||
| }: | ||||
| { | ||||
| }: { | ||||
|   options = { | ||||
|     youthlic.programs.ghostty = { | ||||
|       enable = lib.mkEnableOption "ghostty"; | ||||
|     }; | ||||
|   }; | ||||
|   config = | ||||
|     let | ||||
|   config = let | ||||
|     cfg = config.youthlic.programs.ghostty; | ||||
|     in | ||||
|     (lib.mkIf cfg.enable { | ||||
|   in (lib.mkIf cfg.enable { | ||||
|     programs.ghostty = lib.mkMerge [ | ||||
|       { | ||||
|         enable = true; | ||||
|  |  | |||
|  | @ -2,8 +2,7 @@ | |||
|   config, | ||||
|   lib, | ||||
|   ... | ||||
| }: | ||||
| { | ||||
| }: { | ||||
|   options = { | ||||
|     youthlic.programs.git = { | ||||
|       email = lib.mkOption { | ||||
|  | @ -31,8 +30,7 @@ | |||
|       encrypt-credential = lib.mkEnableOption "encrypt git credential"; | ||||
|     }; | ||||
|   }; | ||||
|   config = | ||||
|     let | ||||
|   config = let | ||||
|     cfg = config.youthlic.programs.git; | ||||
|   in | ||||
|     lib.mkMerge [ | ||||
|  |  | |||
|  | @ -4,15 +4,13 @@ | |||
|   lib, | ||||
|   outputs, | ||||
|   ... | ||||
| }: | ||||
| { | ||||
| }: { | ||||
|   options = { | ||||
|     youthlic.programs.gpg = { | ||||
|       enable = lib.mkEnableOption "gpg"; | ||||
|     }; | ||||
|   }; | ||||
|   config = | ||||
|     let | ||||
|   config = let | ||||
|     cfg = config.youthlic.programs.gpg; | ||||
|   in | ||||
|     lib.mkIf cfg.enable { | ||||
|  |  | |||
|  | @ -4,17 +4,15 @@ | |||
|   config, | ||||
|   outputs, | ||||
|   ... | ||||
| }: | ||||
| { | ||||
| }: { | ||||
|   options = { | ||||
|     youthlic.programs.helix = { | ||||
|       enable = lib.mkEnableOption "helix"; | ||||
|       extraPackages = lib.mkOption { | ||||
|         type = lib.types.listOf lib.types.package; | ||||
|         default = [ ]; | ||||
|         default = []; | ||||
|         example = ( | ||||
|           with pkgs; | ||||
|           [ | ||||
|           with pkgs; [ | ||||
|             deno | ||||
|           ] | ||||
|         ); | ||||
|  | @ -24,19 +22,16 @@ | |||
|       }; | ||||
|     }; | ||||
|   }; | ||||
|   config = | ||||
|     let | ||||
|   config = let | ||||
|     cfg = config.youthlic.programs.helix; | ||||
|     in | ||||
|     { | ||||
|   in { | ||||
|     stylix.targets.helix.enable = false; | ||||
|     programs.helix = lib.mkIf cfg.enable { | ||||
|       enable = true; | ||||
|       package = outputs.packages."${pkgs.system}".helix; | ||||
|       defaultEditor = true; | ||||
|       extraPackages = cfg.extraPackages; | ||||
|         settings = | ||||
|           let | ||||
|       settings = let | ||||
|         config-file = builtins.readFile ./config.toml; | ||||
|         config = builtins.fromTOML config-file; | ||||
|       in | ||||
|  | @ -86,8 +81,7 @@ | |||
|           { | ||||
|             name = "nix"; | ||||
|             formatter = { | ||||
|                 command = "nixfmt"; | ||||
|                 args = [ "-" ]; | ||||
|               command = "alejandra"; | ||||
|             }; | ||||
|           } | ||||
|           { | ||||
|  |  | |||
|  | @ -3,11 +3,9 @@ | |||
|   config, | ||||
|   lib, | ||||
|   ... | ||||
| }: | ||||
| let | ||||
| }: let | ||||
|   cfg = config.youthlic.programs.jujutsu; | ||||
| in | ||||
| { | ||||
| in { | ||||
|   options = { | ||||
|     youthlic.programs.jujutsu = { | ||||
|       enable = lib.mkEnableOption "jujutsu"; | ||||
|  |  | |||
|  | @ -1,8 +1,10 @@ | |||
| { config, lib, ... }: | ||||
| let | ||||
|   cfg = config.youthlic.programs.kvm; | ||||
| in | ||||
| { | ||||
|   config, | ||||
|   lib, | ||||
|   ... | ||||
| }: let | ||||
|   cfg = config.youthlic.programs.kvm; | ||||
| in { | ||||
|   options = { | ||||
|     youthlic.programs.kvm = { | ||||
|       enable = lib.mkEnableOption "kvm"; | ||||
|  | @ -12,8 +14,8 @@ in | |||
|     dconf = { | ||||
|       settings = { | ||||
|         "org/virt-manager/virt-manager/connections" = { | ||||
|           autoconnect = [ "qemu:///system" ]; | ||||
|           uris = [ "qemu:///system" ]; | ||||
|           autoconnect = ["qemu:///system"]; | ||||
|           uris = ["qemu:///system"]; | ||||
|         }; | ||||
|       }; | ||||
|     }; | ||||
|  |  | |||
|  | @ -1,8 +1,10 @@ | |||
| { lib, config, ... }: | ||||
| let | ||||
|   cfg = config.youthlic.programs.mpv; | ||||
| in | ||||
| { | ||||
|   lib, | ||||
|   config, | ||||
|   ... | ||||
| }: let | ||||
|   cfg = config.youthlic.programs.mpv; | ||||
| in { | ||||
|   options = { | ||||
|     youthlic.programs.mpv = { | ||||
|       enable = lib.mkEnableOption "mpv"; | ||||
|  |  | |||
|  | @ -4,12 +4,10 @@ | |||
|   lib, | ||||
|   osConfig ? null, | ||||
|   ... | ||||
| }: | ||||
| let | ||||
| }: let | ||||
|   cfg = config.youthlic.programs.niri; | ||||
|   niri = osConfig.programs.niri.package; | ||||
| in | ||||
| { | ||||
| in { | ||||
|   options = { | ||||
|     youthlic.programs.niri = { | ||||
|       enable = lib.mkEnableOption "niri"; | ||||
|  | @ -32,19 +30,18 @@ in | |||
|         wl-clipboard | ||||
|         cliphist | ||||
|       ]) | ||||
|       ++ [ niri ]; | ||||
|       ++ [niri]; | ||||
|     qt = { | ||||
|       enable = true; | ||||
|     }; | ||||
|     xdg.portal = { | ||||
|       configPackages = [ niri ]; | ||||
|       configPackages = [niri]; | ||||
|       enable = true; | ||||
|       extraPortals = lib.mkIf ( | ||||
|         !niri.cargoBuildNoDefaultFeatures || builtins.elem "xdp-gnome-screencast" niri.cargoBuildFeatures | ||||
|       ) [ pkgs.xdg-desktop-portal-gnome ]; | ||||
|       ) [pkgs.xdg-desktop-portal-gnome]; | ||||
|     }; | ||||
|     xdg.configFile = | ||||
|       let | ||||
|     xdg.configFile = let | ||||
|       qtctConf = | ||||
|         '' | ||||
|           [Appearance] | ||||
|  | @ -53,8 +50,7 @@ in | |||
|         + lib.optionalString (config.qt.style ? name) '' | ||||
|           style=${config.qt.style.name} | ||||
|         ''; | ||||
|       in | ||||
|       { | ||||
|     in { | ||||
|       "qt5ct/qt5ct.conf" = lib.mkForce { | ||||
|         text = qtctConf; | ||||
|       }; | ||||
|  |  | |||
|  | @ -3,11 +3,9 @@ | |||
|   config, | ||||
|   lib, | ||||
|   ... | ||||
| }: | ||||
| let | ||||
| }: let | ||||
|   cfg = config.youthlic.programs.obs; | ||||
| in | ||||
| { | ||||
| in { | ||||
|   options = { | ||||
|     youthlic.programs.obs = { | ||||
|       enable = lib.mkEnableOption "obs"; | ||||
|  |  | |||
|  | @ -3,22 +3,20 @@ | |||
|   lib, | ||||
|   pkgs, | ||||
|   ... | ||||
| }: | ||||
| let | ||||
| }: let | ||||
|   cfg = config.youthlic.programs.rustypaste-cli; | ||||
| in | ||||
| { | ||||
| in { | ||||
|   options = { | ||||
|     youthlic.programs.rustypaste-cli = { | ||||
|       enable = lib.mkEnableOption "rustypaste-cli"; | ||||
|     }; | ||||
|   }; | ||||
|   config = lib.mkIf cfg.enable { | ||||
|     home.packages = [ pkgs.rustypaste-cli ]; | ||||
|     home.packages = [pkgs.rustypaste-cli]; | ||||
|     sops = { | ||||
|       secrets = { | ||||
|         "rustypaste/auth" = { }; | ||||
|         "rustypaste/delete" = { }; | ||||
|         "rustypaste/auth" = {}; | ||||
|         "rustypaste/delete" = {}; | ||||
|       }; | ||||
|       templates."rustypaste-config.toml" = { | ||||
|         path = "${config.xdg.configHome}/rustypaste/config.toml"; | ||||
|  |  | |||
|  | @ -2,13 +2,11 @@ | |||
|   config, | ||||
|   lib, | ||||
|   ... | ||||
| }: | ||||
| let | ||||
| }: let | ||||
|   inherit (lib) mkEnableOption mkIf mkMerge; | ||||
|   fish-cfg = config.youthlic.programs.fish; | ||||
|   bash-cfg = config.youthlic.programs.bash; | ||||
|   cfg-helper = | ||||
|     conf: | ||||
|   cfg-helper = conf: | ||||
|     mkMerge [ | ||||
|       conf | ||||
|       (mkIf fish-cfg.enable { | ||||
|  | @ -18,8 +16,7 @@ let | |||
|         enableBashIntegration = true; | ||||
|       }) | ||||
|     ]; | ||||
| in | ||||
| { | ||||
| in { | ||||
|   options = { | ||||
|     youthlic.programs = { | ||||
|       fish = { | ||||
|  |  | |||
|  | @ -4,8 +4,7 @@ | |||
|   pkgs, | ||||
|   rootPath, | ||||
|   ... | ||||
| }: | ||||
| { | ||||
| }: { | ||||
|   options = { | ||||
|     youthlic.programs.sops = { | ||||
|       enable = lib.mkOption { | ||||
|  | @ -25,14 +24,12 @@ | |||
|       }; | ||||
|     }; | ||||
|   }; | ||||
|   config = | ||||
|     let | ||||
|   config = let | ||||
|     cfg = config.youthlic.programs.sops; | ||||
|   in | ||||
|     lib.mkIf cfg.enable { | ||||
|       home.packages = ( | ||||
|         with pkgs; | ||||
|         [ | ||||
|         with pkgs; [ | ||||
|           sops | ||||
|           age | ||||
|         ] | ||||
|  |  | |||
|  | @ -1,8 +1,10 @@ | |||
| { lib, config, ... }: | ||||
| let | ||||
|   cfg = config.youthlic.programs.starship; | ||||
| in | ||||
| { | ||||
|   lib, | ||||
|   config, | ||||
|   ... | ||||
| }: let | ||||
|   cfg = config.youthlic.programs.starship; | ||||
| in { | ||||
|   options = { | ||||
|     youthlic.programs.starship = { | ||||
|       enable = lib.mkEnableOption "starship"; | ||||
|  | @ -12,8 +14,7 @@ in | |||
|     programs.starship = lib.mkMerge [ | ||||
|       { | ||||
|         enable = true; | ||||
|         settings = | ||||
|           let | ||||
|         settings = let | ||||
|           config-file = builtins.readFile ./config.toml; | ||||
|         in | ||||
|           builtins.fromTOML config-file; | ||||
|  |  | |||
|  | @ -3,11 +3,9 @@ | |||
|   config, | ||||
|   lib, | ||||
|   ... | ||||
| }: | ||||
| let | ||||
| }: let | ||||
|   cfg = config.youthlic.programs.swaylock; | ||||
| in | ||||
| { | ||||
| in { | ||||
|   options = { | ||||
|     youthlic.programs.swaylock = { | ||||
|       enable = lib.mkEnableOption "swaylock"; | ||||
|  |  | |||
|  | @ -1,8 +1,10 @@ | |||
| { lib, config, ... }: | ||||
| let | ||||
|   cfg = config.youthlic.programs.swaync; | ||||
| in | ||||
| { | ||||
|   lib, | ||||
|   config, | ||||
|   ... | ||||
| }: let | ||||
|   cfg = config.youthlic.programs.swaync; | ||||
| in { | ||||
|   options = { | ||||
|     youthlic.programs.swaync = { | ||||
|       enable = lib.mkEnableOption "swaync"; | ||||
|  | @ -16,7 +18,7 @@ in | |||
|       }; | ||||
|     }) | ||||
|     (lib.mkIf (!cfg.systemd.enable) { | ||||
|       systemd.user.services.swaync = lib.mkForce { }; | ||||
|       systemd.user.services.swaync = lib.mkForce {}; | ||||
|     }) | ||||
|   ]; | ||||
| } | ||||
|  |  | |||
|  | @ -1,8 +1,10 @@ | |||
| { config, lib, ... }: | ||||
| let | ||||
|   cfg = config.youthlic.programs.thunderbird; | ||||
| in | ||||
| { | ||||
|   config, | ||||
|   lib, | ||||
|   ... | ||||
| }: let | ||||
|   cfg = config.youthlic.programs.thunderbird; | ||||
| in { | ||||
|   options = { | ||||
|     youthlic.programs.thunderbird = { | ||||
|       enable = lib.mkEnableOption "thunderbird"; | ||||
|  |  | |||
|  | @ -3,11 +3,9 @@ | |||
|   config, | ||||
|   lib, | ||||
|   ... | ||||
| }: | ||||
| let | ||||
| }: let | ||||
|   cfg = config.youthlic.programs.waybar; | ||||
| in | ||||
| { | ||||
| in { | ||||
|   options = { | ||||
|     youthlic.programs.waybar = { | ||||
|       enable = lib.mkEnableOption "waybar"; | ||||
|  | @ -26,7 +24,7 @@ in | |||
|               "niri/workspaces" | ||||
|               "wlr/taskbar" | ||||
|             ]; | ||||
|             modules-center = [ "clock" ]; | ||||
|             modules-center = ["clock"]; | ||||
|             modules-right = [ | ||||
|               "tray" | ||||
|               "idle_inhibitor" | ||||
|  | @ -40,7 +38,7 @@ in | |||
|               on-click = "activate"; | ||||
|             }; | ||||
| 
 | ||||
|             "niri/worksapces" = { }; | ||||
|             "niri/worksapces" = {}; | ||||
|             "niri/taskbar" = { | ||||
|               icon-size = 15; | ||||
|               on-click = "activate"; | ||||
|  |  | |||
|  | @ -3,11 +3,9 @@ | |||
|   pkgs, | ||||
|   lib, | ||||
|   ... | ||||
| }: | ||||
| let | ||||
| }: let | ||||
|   cfg = config.youthlic.programs.wluma; | ||||
| in | ||||
| { | ||||
| in { | ||||
|   options = { | ||||
|     youthlic.programs.wluma = { | ||||
|       enable = lib.mkEnableOption "wluma"; | ||||
|  | @ -39,18 +37,18 @@ in | |||
|     systemd.user.services.wluma = { | ||||
|       Unit = { | ||||
|         Description = "Adjusting screen brightness based on screen contents and amount of ambient light"; | ||||
|         PartOf = [ "graphical-session.target" ]; | ||||
|         After = [ "graphical-session.target" ]; | ||||
|         PartOf = ["graphical-session.target"]; | ||||
|         After = ["graphical-session.target"]; | ||||
|       }; | ||||
|       Service = { | ||||
|         ExecStart = [ "${lib.getExe cfg.package}" ]; | ||||
|         ExecStart = ["${lib.getExe cfg.package}"]; | ||||
|         Restart = "always"; | ||||
|         EnvironmentFile = [ "-%E/wluma/service.conf" ]; | ||||
|         EnvironmentFile = ["-%E/wluma/service.conf"]; | ||||
|         PrivateNetwork = true; | ||||
|         PrivateMounts = false; | ||||
|       }; | ||||
|       Install = { | ||||
|         WantedBy = [ "graphical-session.target" ]; | ||||
|         WantedBy = ["graphical-session.target"]; | ||||
|       }; | ||||
|     }; | ||||
|   }; | ||||
|  |  | |||
|  | @ -3,11 +3,9 @@ | |||
|   config, | ||||
|   lib, | ||||
|   ... | ||||
| }: | ||||
| let | ||||
| }: let | ||||
|   cfg = config.youthlic.programs.zed-editor; | ||||
| in | ||||
| { | ||||
| in { | ||||
|   options = { | ||||
|     youthlic.programs.zed-editor = { | ||||
|       enable = lib.mkEnableOption "zed-editor"; | ||||
|  |  | |||
|  | @ -1,8 +1,10 @@ | |||
| { lib, config, ... }: | ||||
| let | ||||
|   cfg = config.youthlic.xdg-dirs; | ||||
| in | ||||
| { | ||||
|   lib, | ||||
|   config, | ||||
|   ... | ||||
| }: let | ||||
|   cfg = config.youthlic.xdg-dirs; | ||||
| in { | ||||
|   options = { | ||||
|     youthlic.xdg-dirs = { | ||||
|       enable = lib.mkEnableOption "xdg-dirs"; | ||||
|  |  | |||
|  | @ -1,5 +1,4 @@ | |||
| { pkgs, ... }: | ||||
| { | ||||
| {pkgs, ...}: { | ||||
|   imports = [ | ||||
|     ./hardware-configuration.nix | ||||
|     ./stylix.nix | ||||
|  |  | |||
|  | @ -49,7 +49,7 @@ | |||
|                 ]; | ||||
|                 content = { | ||||
|                   type = "btrfs"; | ||||
|                   extraArgs = [ "-f" ]; | ||||
|                   extraArgs = ["-f"]; | ||||
|                   subvolumes = { | ||||
|                     "@root" = { | ||||
|                       mountpoint = "/"; | ||||
|  |  | |||
|  | @ -1,17 +1,21 @@ | |||
| # Do not modify this file!  It was generated by ‘nixos-generate-config’ | ||||
| # and may be overwritten by future invocations.  Please make changes | ||||
| # to /etc/nixos/configuration.nix instead. | ||||
| { config, lib, pkgs, modulesPath, ... }: | ||||
| 
 | ||||
| { | ||||
|   imports = | ||||
|     [ (modulesPath + "/installer/scan/not-detected.nix") | ||||
|   config, | ||||
|   lib, | ||||
|   pkgs, | ||||
|   modulesPath, | ||||
|   ... | ||||
| }: { | ||||
|   imports = [ | ||||
|     (modulesPath + "/installer/scan/not-detected.nix") | ||||
|   ]; | ||||
| 
 | ||||
|   boot.initrd.availableKernelModules = [ "xhci_pci" "ahci" "nvme" "usbhid" "usb_storage" "sd_mod" ]; | ||||
|   boot.initrd.kernelModules = [ ]; | ||||
|   boot.kernelModules = [ ]; | ||||
|   boot.extraModulePackages = [ ]; | ||||
|   boot.initrd.availableKernelModules = ["xhci_pci" "ahci" "nvme" "usbhid" "usb_storage" "sd_mod"]; | ||||
|   boot.initrd.kernelModules = []; | ||||
|   boot.kernelModules = []; | ||||
|   boot.extraModulePackages = []; | ||||
| 
 | ||||
|   # Enables DHCP on each ethernet and wireless interface. In case of scripted networking | ||||
|   # (the default) this is the recommended approach. When using systemd-networkd it's | ||||
|  |  | |||
|  | @ -1,5 +1,4 @@ | |||
| { ... }: | ||||
| { | ||||
| {...}: { | ||||
|   systemd.network = { | ||||
|     enable = true; | ||||
|     wait-online.enable = false; | ||||
|  |  | |||
|  | @ -1,5 +1,8 @@ | |||
| { pkgs, rootPath, ... }: | ||||
| { | ||||
|   pkgs, | ||||
|   rootPath, | ||||
|   ... | ||||
| }: { | ||||
|   stylix = { | ||||
|     enable = true; | ||||
|     image = rootPath + "/assets/wallpaper/01.png"; | ||||
|  |  | |||
|  | @ -1,5 +1,8 @@ | |||
| { lib, pkgs, ... }: | ||||
| { | ||||
|   lib, | ||||
|   pkgs, | ||||
|   ... | ||||
| }: { | ||||
|   users = { | ||||
|     mutableUsers = true; | ||||
|     users.david = { | ||||
|  |  | |||
|  | @ -1,8 +1,4 @@ | |||
| { | ||||
|   pkgs, | ||||
|   ... | ||||
| }: | ||||
| { | ||||
| {pkgs, ...}: { | ||||
|   imports = [ | ||||
|     ./forgejo.nix | ||||
|     ./networking.nix | ||||
|  |  | |||
|  | @ -15,7 +15,7 @@ | |||
|               size = "100%"; | ||||
|               content = { | ||||
|                 type = "btrfs"; | ||||
|                 extraArgs = [ "-f" ]; | ||||
|                 extraArgs = ["-f"]; | ||||
|                 subvolumes = { | ||||
|                   "@root" = { | ||||
|                     mountpoint = "/"; | ||||
|  |  | |||
|  | @ -1,12 +1,11 @@ | |||
| { config, ... }: | ||||
| { | ||||
| {config, ...}: { | ||||
|   youthlic.containers.forgejo = { | ||||
|     enable = true; | ||||
|     domain = "forgejo.youthlic.fun"; | ||||
|     sshPort = 2222; | ||||
|     httpPort = 8480; | ||||
|   }; | ||||
|   networking.firewall.allowedTCPPorts = [ 2222 ]; | ||||
|   networking.firewall.allowedTCPPorts = [2222]; | ||||
|   services.caddy.virtualHosts = { | ||||
|     "forgejo.${config.youthlic.programs.caddy.baseDomain}" = { | ||||
|       extraConfig = '' | ||||
|  |  | |||
|  | @ -1,17 +1,21 @@ | |||
| # Do not modify this file!  It was generated by ‘nixos-generate-config’ | ||||
| # and may be overwritten by future invocations.  Please make changes | ||||
| # to /etc/nixos/configuration.nix instead. | ||||
| { config, lib, pkgs, modulesPath, ... }: | ||||
| 
 | ||||
| { | ||||
|   imports = | ||||
|     [ (modulesPath + "/profiles/qemu-guest.nix") | ||||
|   config, | ||||
|   lib, | ||||
|   pkgs, | ||||
|   modulesPath, | ||||
|   ... | ||||
| }: { | ||||
|   imports = [ | ||||
|     (modulesPath + "/profiles/qemu-guest.nix") | ||||
|   ]; | ||||
| 
 | ||||
|   boot.initrd.availableKernelModules = [ "ata_piix" "uhci_hcd" "virtio_pci" "sr_mod" "virtio_blk" ]; | ||||
|   boot.initrd.kernelModules = [ ]; | ||||
|   boot.kernelModules = [ ]; | ||||
|   boot.extraModulePackages = [ ]; | ||||
|   boot.initrd.availableKernelModules = ["ata_piix" "uhci_hcd" "virtio_pci" "sr_mod" "virtio_blk"]; | ||||
|   boot.initrd.kernelModules = []; | ||||
|   boot.kernelModules = []; | ||||
|   boot.extraModulePackages = []; | ||||
| 
 | ||||
|   # Enables DHCP on each ethernet and wireless interface. In case of scripted networking | ||||
|   # (the default) this is the recommended approach. When using systemd-networkd it's | ||||
|  |  | |||
|  | @ -1,5 +1,4 @@ | |||
| { config, ... }: | ||||
| { | ||||
| {config, ...}: { | ||||
|   sops.secrets."miniflux" = { | ||||
|   }; | ||||
|   youthlic.containers.miniflux = { | ||||
|  |  | |||
|  | @ -1,5 +1,4 @@ | |||
| { ... }: | ||||
| { | ||||
| {...}: { | ||||
|   systemd.network = { | ||||
|     enable = true; | ||||
|     wait-online.enable = true; | ||||
|  |  | |||
|  | @ -1,5 +1,4 @@ | |||
| { ... }: | ||||
| { | ||||
| {...}: { | ||||
|   stylix = { | ||||
|     enable = false; | ||||
|   }; | ||||
|  |  | |||
|  | @ -1,5 +1,4 @@ | |||
| { pkgs, ... }: | ||||
| { | ||||
| {pkgs, ...}: { | ||||
|   users.users.alice = { | ||||
|     initialHashedPassword = "$y$j9T$eS5zCi4W.4IPpf3P8Tb/o1$xhumXY1.PJKmTguNi/zlljLbLemNGiubWoUEc878S36"; | ||||
|     isNormalUser = true; | ||||
|  |  | |||
|  | @ -3,8 +3,7 @@ | |||
|   pkgs, | ||||
|   inputs, | ||||
|   ... | ||||
| }: | ||||
| { | ||||
| }: { | ||||
|   imports = | ||||
|     (with inputs; [ | ||||
|       nixos-hardware.nixosModules.asus-fx506hm | ||||
|  |  | |||
|  | @ -1,5 +1,4 @@ | |||
| { ... }: | ||||
| { | ||||
| {...}: { | ||||
|   disko.devices = { | ||||
|     disk = { | ||||
|       disk1 = { | ||||
|  |  | |||
|  | @ -1,17 +1,21 @@ | |||
| # Do not modify this file!  It was generated by ‘nixos-generate-config’ | ||||
| # and may be overwritten by future invocations.  Please make changes | ||||
| # to /etc/nixos/configuration.nix instead. | ||||
| { config, lib, pkgs, modulesPath, ... }: | ||||
| 
 | ||||
| { | ||||
|   imports = | ||||
|     [ (modulesPath + "/installer/scan/not-detected.nix") | ||||
|   config, | ||||
|   lib, | ||||
|   pkgs, | ||||
|   modulesPath, | ||||
|   ... | ||||
| }: { | ||||
|   imports = [ | ||||
|     (modulesPath + "/installer/scan/not-detected.nix") | ||||
|   ]; | ||||
| 
 | ||||
|   boot.initrd.availableKernelModules = [ "xhci_pci" "thunderbolt" "nvme" "usb_storage" "sd_mod" ]; | ||||
|   boot.initrd.kernelModules = [ ]; | ||||
|   boot.kernelModules = [ "kvm-intel" ]; | ||||
|   boot.extraModulePackages = [ ]; | ||||
|   boot.initrd.availableKernelModules = ["xhci_pci" "thunderbolt" "nvme" "usb_storage" "sd_mod"]; | ||||
|   boot.initrd.kernelModules = []; | ||||
|   boot.kernelModules = ["kvm-intel"]; | ||||
|   boot.extraModulePackages = []; | ||||
| 
 | ||||
|   # Enables DHCP on each ethernet and wireless interface. In case of scripted networking | ||||
|   # (the default) this is the recommended approach. When using systemd-networkd it's | ||||
|  |  | |||
|  | @ -1,5 +1,4 @@ | |||
| { pkgs, ... }: | ||||
| { | ||||
| {pkgs, ...}: { | ||||
|   nixpkgs.config.cudaSupport = true; | ||||
|   services = { | ||||
|     hardware.bolt.enable = true; | ||||
|  |  | |||
|  | @ -1,5 +1,4 @@ | |||
| { ... }: | ||||
| { | ||||
| {...}: { | ||||
|   systemd.network = { | ||||
|     enable = true; | ||||
|     wait-online.enable = false; | ||||
|  |  | |||
|  | @ -1,5 +1,8 @@ | |||
| { pkgs, rootPath, ... }: | ||||
| { | ||||
|   pkgs, | ||||
|   rootPath, | ||||
|   ... | ||||
| }: { | ||||
|   stylix = { | ||||
|     enable = true; | ||||
|     image = rootPath + "/assets/wallpaper/01.png"; | ||||
|  |  | |||
|  | @ -1,5 +1,8 @@ | |||
| { lib, pkgs, ... }: | ||||
| { | ||||
|   lib, | ||||
|   pkgs, | ||||
|   ... | ||||
| }: { | ||||
|   users.users.david = { | ||||
|     initialHashedPassword = "$y$j9T$eS5zCi4W.4IPpf3P8Tb/o1$xhumXY1.PJKmTguNi/zlljLbLemNGiubWoUEc878S36"; | ||||
|     isNormalUser = true; | ||||
|  |  | |||
|  | @ -1,8 +1,10 @@ | |||
| { config, lib, ... }: | ||||
| let | ||||
|   cfg = config.youthlic.containers; | ||||
| in | ||||
| { | ||||
|   config, | ||||
|   lib, | ||||
|   ... | ||||
| }: let | ||||
|   cfg = config.youthlic.containers; | ||||
| in { | ||||
|   imports = [ | ||||
|     ./forgejo.nix | ||||
|     ./miniflux.nix | ||||
|  |  | |||
|  | @ -3,11 +3,9 @@ | |||
|   config, | ||||
|   lib, | ||||
|   ... | ||||
| }: | ||||
| let | ||||
| }: let | ||||
|   cfg = config.youthlic.containers.forgejo; | ||||
| in | ||||
| { | ||||
| in { | ||||
|   options = { | ||||
|     youthlic.containers.forgejo = { | ||||
|       enable = lib.mkEnableOption "forgejo container"; | ||||
|  | @ -56,9 +54,7 @@ in | |||
|         } | ||||
|       ]; | ||||
| 
 | ||||
|       config = | ||||
|         { lib, ... }: | ||||
|         { | ||||
|       config = {lib, ...}: { | ||||
|         imports = [ | ||||
|           ./../programs/forgejo.nix | ||||
|           ./../programs/postgresql.nix | ||||
|  | @ -90,10 +86,10 @@ in | |||
|         }; | ||||
| 
 | ||||
|         systemd.services.forgejo = { | ||||
|             wants = [ "postgresql.service" ]; | ||||
|             requires = [ "postgresql.service" ]; | ||||
|             after = [ "postgresql.service" ]; | ||||
|             wantedBy = [ "default.target" ]; | ||||
|           wants = ["postgresql.service"]; | ||||
|           requires = ["postgresql.service"]; | ||||
|           after = ["postgresql.service"]; | ||||
|           wantedBy = ["default.target"]; | ||||
|         }; | ||||
| 
 | ||||
|         networking = { | ||||
|  |  | |||
|  | @ -3,11 +3,9 @@ | |||
|   config, | ||||
|   lib, | ||||
|   ... | ||||
| }: | ||||
| let | ||||
| }: let | ||||
|   cfg = config.youthlic.containers.miniflux; | ||||
| in | ||||
| { | ||||
| in { | ||||
|   options = { | ||||
|     youthlic.containers.miniflux = { | ||||
|       enable = lib.mkEnableOption "miniflux container"; | ||||
|  | @ -38,9 +36,7 @@ in | |||
|         }; | ||||
|       }; | ||||
| 
 | ||||
|       config = | ||||
|         { lib, ... }: | ||||
|         { | ||||
|       config = {lib, ...}: { | ||||
|         imports = [ | ||||
|           ./../programs/miniflux.nix | ||||
|           ./../programs/postgresql.nix | ||||
|  | @ -71,18 +67,18 @@ in | |||
|         }; | ||||
| 
 | ||||
|         systemd.services.miniflux = { | ||||
|             wants = [ "postgresql.service" ]; | ||||
|             requires = [ "postgresql.service" ]; | ||||
|             after = [ "postgresql.service" ]; | ||||
|             wantedBy = [ "default.target" ]; | ||||
|           wants = ["postgresql.service"]; | ||||
|           requires = ["postgresql.service"]; | ||||
|           after = ["postgresql.service"]; | ||||
|           wantedBy = ["default.target"]; | ||||
|         }; | ||||
| 
 | ||||
|         networking = { | ||||
|           defaultGateway = "192.168.111.1"; | ||||
|           firewall = { | ||||
|             enable = true; | ||||
|               allowedTCPPorts = [ 8485 ]; | ||||
|               allowedUDPPorts = [ 8485 ]; | ||||
|             allowedTCPPorts = [8485]; | ||||
|             allowedUDPPorts = [8485]; | ||||
|           }; | ||||
|           useHostResolvConf = lib.mkForce false; | ||||
|         }; | ||||
|  |  | |||
|  | @ -3,8 +3,7 @@ | |||
|   inputs, | ||||
|   outputs, | ||||
|   ... | ||||
| }: | ||||
| { | ||||
| }: { | ||||
|   imports = | ||||
|     (with inputs; [ | ||||
|       niri-flake.nixosModules.niri | ||||
|  |  | |||
|  | @ -1,8 +1,10 @@ | |||
| { config, lib, ... }: | ||||
| let | ||||
|   cfg = config.youthlic.users.deploy; | ||||
| in | ||||
| { | ||||
|   config, | ||||
|   lib, | ||||
|   ... | ||||
| }: let | ||||
|   cfg = config.youthlic.users.deploy; | ||||
| in { | ||||
|   options = { | ||||
|     youthlic.users.deploy = { | ||||
|       enable = lib.mkEnableOption "deploy"; | ||||
|  |  | |||
|  | @ -3,11 +3,9 @@ | |||
|   lib, | ||||
|   pkgs, | ||||
|   ... | ||||
| }: | ||||
| let | ||||
| }: let | ||||
|   cfg = config.youthlic.gui; | ||||
| in | ||||
| { | ||||
| in { | ||||
|   config = lib.mkIf (cfg.enabled == "cosmic") { | ||||
|     # Enable the X11 windowing system. | ||||
|     # You can disable this if you're only using the Wayland session. | ||||
|  |  | |||
|  | @ -3,11 +3,9 @@ | |||
|   lib, | ||||
|   pkgs, | ||||
|   ... | ||||
| }: | ||||
| let | ||||
| }: let | ||||
|   cfg = config.youthlic.gui; | ||||
| in | ||||
| { | ||||
| in { | ||||
|   imports = [ | ||||
|     ./niri.nix | ||||
|     ./cosmic.nix | ||||
|  | @ -66,7 +64,7 @@ in | |||
|         monospace = [ | ||||
|           "Maple Mono NF CN" | ||||
|         ]; | ||||
|         emoji = [ "Noto Color Emoji" ]; | ||||
|         emoji = ["Noto Color Emoji"]; | ||||
|       }; | ||||
|     }; | ||||
| 
 | ||||
|  |  | |||
|  | @ -2,11 +2,9 @@ | |||
|   config, | ||||
|   lib, | ||||
|   ... | ||||
| }: | ||||
| let | ||||
| }: let | ||||
|   cfg = config.youthlic.gui; | ||||
| in | ||||
| { | ||||
| in { | ||||
|   config = lib.mkIf (cfg.enabled == "kde") { | ||||
|     stylix.targets.qt.platform = "kde"; | ||||
|     services = { | ||||
|  |  | |||
|  | @ -3,11 +3,9 @@ | |||
|   lib, | ||||
|   pkgs, | ||||
|   ... | ||||
| }: | ||||
| let | ||||
| }: let | ||||
|   cfg = config.youthlic.gui; | ||||
| in | ||||
| { | ||||
| in { | ||||
|   config = lib.mkIf (cfg.enabled == "niri") { | ||||
|     qt = { | ||||
|       enable = true; | ||||
|  | @ -23,7 +21,7 @@ in | |||
|       terminal-exec = { | ||||
|         enable = true; | ||||
|         settings = { | ||||
|           default = [ "com.mitchellh.ghostty.desktop" ]; | ||||
|           default = ["com.mitchellh.ghostty.desktop"]; | ||||
|         }; | ||||
|       }; | ||||
|       mime = { | ||||
|  | @ -52,7 +50,7 @@ in | |||
|             "firefox.desktop" | ||||
|             "chromium-browser.desktop" | ||||
|           ]; | ||||
|           "x-scheme-handler/tg" = [ "telegramdesktop.desktop" ]; | ||||
|           "x-scheme-handler/tg" = ["telegramdesktop.desktop"]; | ||||
|           "x-scheme-handler/unknown" = [ | ||||
|             "firefox.desktop" | ||||
|             "chromium-browser.desktop" | ||||
|  |  | |||
|  | @ -6,8 +6,7 @@ | |||
|   pkgs, | ||||
|   rootPath, | ||||
|   ... | ||||
| }: | ||||
| { | ||||
| }: { | ||||
|   options.youthlic.home-manager = { | ||||
|     enable = lib.mkOption { | ||||
|       type = lib.types.bool; | ||||
|  | @ -33,8 +32,7 @@ | |||
|       ''; | ||||
|     }; | ||||
|   }; | ||||
|   config = | ||||
|     let | ||||
|   config = let | ||||
|     cfg = config.youthlic.home-manager; | ||||
|     unixName = cfg.unixName; | ||||
|     hostName = cfg.hostName; | ||||
|  | @ -44,8 +42,7 @@ | |||
|         useGlobalPkgs = true; | ||||
|         useUserPackages = true; | ||||
|         users."${cfg.unixName}" = ( | ||||
|           { ... }: | ||||
|           { | ||||
|           {...}: { | ||||
|             imports = [ | ||||
|               outputs.homeModules."${unixName}" | ||||
|               (rootPath + "/home/${unixName}/configurations/${hostName}") | ||||
|  | @ -58,7 +55,7 @@ | |||
|           inherit (pkgs) system; | ||||
|         }; | ||||
|         backupFileExtension = "backup"; | ||||
|         sharedModules = [ outputs.homeModules.default ]; | ||||
|         sharedModules = [outputs.homeModules.default]; | ||||
|       }; | ||||
|     }; | ||||
| } | ||||
|  |  | |||
|  | @ -3,11 +3,9 @@ | |||
|   lib, | ||||
|   config, | ||||
|   ... | ||||
| }: | ||||
| let | ||||
| }: let | ||||
|   cfg = config.youthlic.i18n; | ||||
| in | ||||
| { | ||||
| in { | ||||
|   options = { | ||||
|     youthlic.i18n = { | ||||
|       enable = lib.mkEnableOption "zh env"; | ||||
|  |  | |||
|  | @ -5,14 +5,12 @@ | |||
|   pkgs, | ||||
|   lib, | ||||
|   ... | ||||
| }: | ||||
| { | ||||
| }: { | ||||
|   config = { | ||||
|     nixpkgs = { | ||||
|       config = { | ||||
|         allowUnfree = true; | ||||
|         allowInsecurePredicate = | ||||
|           p: | ||||
|         allowInsecurePredicate = p: | ||||
|           builtins.elem (lib.getName p) [ | ||||
|             # for fluffychat and neochat | ||||
|             "olm" | ||||
|  | @ -25,7 +23,7 @@ | |||
|       mode = "0444"; | ||||
|     }; | ||||
|     nix = { | ||||
|       nixPath = [ "nixpkgs=${inputs.nixpkgs}" ]; | ||||
|       nixPath = ["nixpkgs=${inputs.nixpkgs}"]; | ||||
|       extraOptions = '' | ||||
|         !include ${config.sops.secrets."access-tokens".path} | ||||
|       ''; | ||||
|  |  | |||
|  | @ -2,11 +2,9 @@ | |||
|   config, | ||||
|   lib, | ||||
|   ... | ||||
| }: | ||||
| let | ||||
| }: let | ||||
|   cfg = config.youthlic.programs.asusd; | ||||
| in | ||||
| { | ||||
| in { | ||||
|   options = { | ||||
|     youthlic.programs.asusd = { | ||||
|       enable = lib.mkEnableOption "asusd"; | ||||
|  |  | |||
|  | @ -1,8 +1,10 @@ | |||
| { lib, config, ... }: | ||||
| let | ||||
|   cfg = config.youthlic.programs.caddy; | ||||
| in | ||||
| { | ||||
|   lib, | ||||
|   config, | ||||
|   ... | ||||
| }: let | ||||
|   cfg = config.youthlic.programs.caddy; | ||||
| in { | ||||
|   options = { | ||||
|     youthlic.programs.caddy = { | ||||
|       enable = lib.mkEnableOption "caddy"; | ||||
|  | @ -17,7 +19,7 @@ in | |||
|       enable = true; | ||||
|     }; | ||||
|     networking.firewall = { | ||||
|       allowedTCPPorts = [ 443 ]; | ||||
|       allowedTCPPorts = [443]; | ||||
|     }; | ||||
|   }; | ||||
| } | ||||
|  |  | |||
|  | @ -1,8 +1,10 @@ | |||
| { config, lib, ... }: | ||||
| let | ||||
|   cfg = config.youthlic.programs.conduwuit; | ||||
| in | ||||
| { | ||||
|   config, | ||||
|   lib, | ||||
|   ... | ||||
| }: let | ||||
|   cfg = config.youthlic.programs.conduwuit; | ||||
| in { | ||||
|   options = { | ||||
|     youthlic.programs.conduwuit = { | ||||
|       enable = lib.mkEnableOption "conduwuit"; | ||||
|  | @ -24,7 +26,7 @@ in | |||
|         enable = true; | ||||
|         settings = { | ||||
|           global = { | ||||
|             port = [ 8481 ]; | ||||
|             port = [8481]; | ||||
|             address = [ | ||||
|               "0.0.0.0" | ||||
|               "::" | ||||
|  |  | |||
|  | @ -4,11 +4,9 @@ | |||
|   pkgs, | ||||
|   lib, | ||||
|   ... | ||||
| }: | ||||
| let | ||||
| }: let | ||||
|   cfg = config.youthlic.programs.dae; | ||||
| in | ||||
| { | ||||
| in { | ||||
|   options = { | ||||
|     youthlic.programs.dae = { | ||||
|       enable = lib.mkEnableOption "dae"; | ||||
|  | @ -30,8 +28,7 @@ in | |||
|         mode = "0444"; | ||||
|         sopsFile = rootPath + "/secrets/general.yaml"; | ||||
|       }; | ||||
|       systemd.services = | ||||
|         let | ||||
|       systemd.services = let | ||||
|         update = '' | ||||
|           head="user-agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/88.0.4324.182 Safari/537.36" | ||||
|           new_proxy=/etc/dae/proxy.d.new | ||||
|  | @ -95,12 +92,11 @@ in | |||
|             ${update} | ||||
|           ''; | ||||
|         }; | ||||
|         in | ||||
|         { | ||||
|       in { | ||||
|         "update-dae-subscription-immediate" = { | ||||
|             after = [ "network-online.target" ]; | ||||
|             wants = [ "network-online.target" ]; | ||||
|             before = [ "dae.service" ]; | ||||
|           after = ["network-online.target"]; | ||||
|           wants = ["network-online.target"]; | ||||
|           before = ["dae.service"]; | ||||
|           serviceConfig = { | ||||
|             Type = "oneshot"; | ||||
|             User = "root"; | ||||
|  | @ -108,7 +104,7 @@ in | |||
|               "${updateScript}/bin/update.sh" | ||||
|             ]; | ||||
|           }; | ||||
|             wantedBy = [ "multi-user.target" ]; | ||||
|           wantedBy = ["multi-user.target"]; | ||||
|         }; | ||||
|         "update-dae-subscription-force" = { | ||||
|           serviceConfig = { | ||||
|  |  | |||
|  | @ -1,5 +1,8 @@ | |||
| { config, lib, ... }: | ||||
| { | ||||
|   config, | ||||
|   lib, | ||||
|   ... | ||||
| }: { | ||||
|   imports = [ | ||||
|     ./transfer-sh.nix | ||||
|     ./rustypaste | ||||
|  |  | |||
|  | @ -3,11 +3,9 @@ | |||
|   config, | ||||
|   lib, | ||||
|   ... | ||||
| }: | ||||
| let | ||||
| }: let | ||||
|   cfg = config.youthlic.programs.forgejo; | ||||
| in | ||||
| { | ||||
| in { | ||||
|   options = { | ||||
|     youthlic.programs.forgejo = { | ||||
|       enable = lib.mkEnableOption "forgejo"; | ||||
|  |  | |||
|  | @ -1,8 +1,10 @@ | |||
| { lib, config, ... }: | ||||
| let | ||||
|   cfg = config.youthlic.programs.guix; | ||||
| in | ||||
| { | ||||
|   lib, | ||||
|   config, | ||||
|   ... | ||||
| }: let | ||||
|   cfg = config.youthlic.programs.guix; | ||||
| in { | ||||
|   options = { | ||||
|     youthlic.programs.guix = { | ||||
|       enable = lib.mkEnableOption "guix"; | ||||
|  |  | |||
|  | @ -3,11 +3,9 @@ | |||
|   lib, | ||||
|   config, | ||||
|   ... | ||||
| }: | ||||
| let | ||||
| }: let | ||||
|   cfg = config.youthlic.programs.juicity; | ||||
| in | ||||
| { | ||||
| in { | ||||
|   imports = [ | ||||
|     ./template.nix | ||||
|   ]; | ||||
|  | @ -23,12 +21,12 @@ in | |||
|   }; | ||||
|   config = lib.mkMerge [ | ||||
|     (lib.mkIf cfg.client.enable { | ||||
|       users.groups.juicity.members = [ "root" ]; | ||||
|       users.groups.juicity.members = ["root"]; | ||||
|       sops = { | ||||
|         secrets = { | ||||
|           "juicity/serverIp" = { }; | ||||
|           "juicity/sni" = { }; | ||||
|           "juicity/certchainSha256" = { }; | ||||
|           "juicity/serverIp" = {}; | ||||
|           "juicity/sni" = {}; | ||||
|           "juicity/certchainSha256" = {}; | ||||
|         }; | ||||
|         templates."juicity-client-config.json" = { | ||||
|           group = "juicity"; | ||||
|  | @ -58,7 +56,7 @@ in | |||
|       }; | ||||
|     }) | ||||
|     (lib.mkIf cfg.server.enable { | ||||
|       users.groups.juicity.members = [ "root" ]; | ||||
|       users.groups.juicity.members = ["root"]; | ||||
|       sops = { | ||||
|         secrets = { | ||||
|           "juicity/certificate" = { | ||||
|  | @ -98,8 +96,8 @@ in | |||
|     }) | ||||
|     (lib.mkIf (cfg.server.enable || cfg.client.enable) { | ||||
|       sops.secrets = { | ||||
|         "juicity/uuid" = { }; | ||||
|         "juicity/password" = { }; | ||||
|         "juicity/uuid" = {}; | ||||
|         "juicity/password" = {}; | ||||
|       }; | ||||
|     }) | ||||
|   ]; | ||||
|  |  | |||
|  | @ -3,27 +3,23 @@ | |||
|   lib, | ||||
|   pkgs, | ||||
|   ... | ||||
| }: | ||||
| let | ||||
| }: let | ||||
|   cfg = config.services.juicity; | ||||
|   settingsFormat = pkgs.formats.json { }; | ||||
|   settingsFormat = pkgs.formats.json {}; | ||||
|   clientConfigFile = | ||||
|     if (cfg.client.configFile != null) then | ||||
|       cfg.client.configFile | ||||
|     else | ||||
|       settingsFormat cfg.client.settings; | ||||
|     if (cfg.client.configFile != null) | ||||
|     then cfg.client.configFile | ||||
|     else settingsFormat cfg.client.settings; | ||||
|   serverConfigFile = | ||||
|     if (cfg.server.configFile != null) then | ||||
|       cfg.server.configFile | ||||
|     else | ||||
|       settingsFormat cfg.server.settings; | ||||
| in | ||||
| { | ||||
|     if (cfg.server.configFile != null) | ||||
|     then cfg.server.configFile | ||||
|     else settingsFormat cfg.server.settings; | ||||
| in { | ||||
|   options = { | ||||
|     services.juicity = { | ||||
|       client = { | ||||
|         enable = lib.mkEnableOption "juicity-client"; | ||||
|         package = lib.mkPackageOption pkgs "juicity" { }; | ||||
|         package = lib.mkPackageOption pkgs "juicity" {}; | ||||
|         group = lib.mkOption { | ||||
|           type = lib.types.nullOr lib.types.str; | ||||
|           example = "juicity"; | ||||
|  | @ -31,7 +27,7 @@ in | |||
|         }; | ||||
|         settings = lib.mkOption { | ||||
|           type = settingsFormat.type; | ||||
|           default = { }; | ||||
|           default = {}; | ||||
|           example = { | ||||
|             listen = ":1000"; | ||||
|             server = "112.32.62.11:23182"; | ||||
|  | @ -59,7 +55,7 @@ in | |||
|         }; | ||||
|         allowedOpenFirewallPorts = lib.mkOption { | ||||
|           type = lib.types.nullOr (lib.types.listOf lib.types.port); | ||||
|           example = [ 23182 ]; | ||||
|           example = [23182]; | ||||
|           default = null; | ||||
|           description = '' | ||||
|             the ports should be open | ||||
|  | @ -68,7 +64,7 @@ in | |||
|       }; | ||||
|       server = { | ||||
|         enable = lib.mkEnableOption "juicity-server"; | ||||
|         package = lib.mkPackageOption pkgs "juicity" { }; | ||||
|         package = lib.mkPackageOption pkgs "juicity" {}; | ||||
|         group = lib.mkOption { | ||||
|           type = lib.types.nullOr lib.types.str; | ||||
|           example = "juicity"; | ||||
|  | @ -76,7 +72,7 @@ in | |||
|         }; | ||||
|         settings = lib.mkOption { | ||||
|           type = settingsFormat.type; | ||||
|           default = { }; | ||||
|           default = {}; | ||||
|           description = '' | ||||
|             Juicity server configuration, for configuration options | ||||
|             see example of [server](https://github.com/juicity/juicity/blob/main/install/example-server.json) on github. | ||||
|  | @ -104,7 +100,7 @@ in | |||
|         }; | ||||
|         allowedOpenFirewallPorts = lib.mkOption { | ||||
|           type = lib.types.nullOr (lib.types.listOf lib.types.port); | ||||
|           example = [ 23182 ]; | ||||
|           example = [23182]; | ||||
|           default = null; | ||||
|           description = '' | ||||
|             the ports should be open | ||||
|  |  | |||
|  | @ -3,18 +3,16 @@ | |||
|   lib, | ||||
|   pkgs, | ||||
|   ... | ||||
| }: | ||||
| let | ||||
| }: let | ||||
|   cfg = config.youthlic.programs.kanata; | ||||
| in | ||||
| { | ||||
| in { | ||||
|   options = { | ||||
|     youthlic.programs.kanata = { | ||||
|       enable = lib.mkEnableOption "kanata"; | ||||
|     }; | ||||
|   }; | ||||
|   config = lib.mkIf cfg.enable { | ||||
|     boot.kernelModules = [ "uinput" ]; | ||||
|     boot.kernelModules = ["uinput"]; | ||||
|     hardware.uinput.enable = true; | ||||
|     services.kanata = { | ||||
|       enable = true; | ||||
|  |  | |||
|  | @ -3,11 +3,9 @@ | |||
|   lib, | ||||
|   pkgs, | ||||
|   ... | ||||
| }: | ||||
| let | ||||
| }: let | ||||
|   cfg = config.youthlic.programs.kvm; | ||||
| in | ||||
| { | ||||
| in { | ||||
|   options = { | ||||
|     youthlic.programs.kvm = { | ||||
|       enable = lib.mkEnableOption "kvm"; | ||||
|  | @ -24,7 +22,7 @@ in | |||
|     programs.virt-manager = { | ||||
|       enable = true; | ||||
|     }; | ||||
|     users.groups.libvirtd.members = [ cfg.unixName ]; | ||||
|     users.groups.libvirtd.members = [cfg.unixName]; | ||||
|     virtualisation = { | ||||
|       libvirtd = { | ||||
|         enable = true; | ||||
|  |  | |||
|  | @ -1,21 +1,22 @@ | |||
| { config, lib, ... }: | ||||
| let | ||||
|   cfg = config.youthlic.programs.mautrix-telegram; | ||||
| in | ||||
| { | ||||
|   config, | ||||
|   lib, | ||||
|   ... | ||||
| }: let | ||||
|   cfg = config.youthlic.programs.mautrix-telegram; | ||||
| in { | ||||
|   options = { | ||||
|     youthlic.programs.mautrix-telegram = { | ||||
|       enable = lib.mkEnableOption "mautrix-telegram"; | ||||
|     }; | ||||
|   }; | ||||
|   config = | ||||
|     let | ||||
|   config = let | ||||
|     conduwuit-cfg = config.youthlic.programs.conduwuit; | ||||
|     caddy-cfg = config.youthlic.programs.caddy; | ||||
|   in | ||||
|     lib.mkMerge [ | ||||
|       (lib.mkIf cfg.enable { | ||||
|         sops.secrets.matrix-telegram-bot = { }; | ||||
|         sops.secrets.matrix-telegram-bot = {}; | ||||
|         services.mautrix-telegram = { | ||||
|           enable = true; | ||||
|           environmentFile = "${config.sops.secrets.matrix-telegram-bot.path}"; | ||||
|  |  | |||
|  | @ -1,8 +1,10 @@ | |||
| { lib, config, ... }: | ||||
| let | ||||
|   cfg = config.youthlic.programs.miniflux; | ||||
| in | ||||
| { | ||||
|   lib, | ||||
|   config, | ||||
|   ... | ||||
| }: let | ||||
|   cfg = config.youthlic.programs.miniflux; | ||||
| in { | ||||
|   options = { | ||||
|     youthlic.programs.miniflux = { | ||||
|       enable = lib.mkEnableOption "miniflux"; | ||||
|  |  | |||
|  | @ -1,8 +1,10 @@ | |||
| { lib, config, ... }: | ||||
| let | ||||
|   cfg = config.youthlic.programs.minio; | ||||
| in | ||||
| { | ||||
|   lib, | ||||
|   config, | ||||
|   ... | ||||
| }: let | ||||
|   cfg = config.youthlic.programs.minio; | ||||
| in { | ||||
|   options = { | ||||
|     youthlic.programs.minio = { | ||||
|       enable = lib.mkEnableOption "minio"; | ||||
|  |  | |||
|  | @ -1,5 +1,4 @@ | |||
| { ... }: | ||||
| { | ||||
| {...}: { | ||||
|   config = { | ||||
|     programs.nh = { | ||||
|       enable = true; | ||||
|  |  | |||
|  | @ -3,11 +3,9 @@ | |||
|   config, | ||||
|   lib, | ||||
|   ... | ||||
| }: | ||||
| let | ||||
| }: let | ||||
|   cfg = config.youthlic.programs.nix-ld; | ||||
| in | ||||
| { | ||||
| in { | ||||
|   options = { | ||||
|     youthlic.programs.nix-ld = { | ||||
|       enable = lib.mkEnableOption "nix-ld"; | ||||
|  |  | |||
|  | @ -1,8 +1,10 @@ | |||
| { config, lib, ... }: | ||||
| let | ||||
|   cfg = config.youthlic.programs.open-webui; | ||||
| in | ||||
| { | ||||
|   config, | ||||
|   lib, | ||||
|   ... | ||||
| }: let | ||||
|   cfg = config.youthlic.programs.open-webui; | ||||
| in { | ||||
|   options = { | ||||
|     youthlic.programs.open-webui = { | ||||
|       enable = lib.mkEnableOption "open-webui"; | ||||
|  |  | |||
|  | @ -1,8 +1,10 @@ | |||
| { config, lib, ... }: | ||||
| let | ||||
|   cfg = config.youthlic.programs.openssh; | ||||
| in | ||||
| { | ||||
|   config, | ||||
|   lib, | ||||
|   ... | ||||
| }: let | ||||
|   cfg = config.youthlic.programs.openssh; | ||||
| in { | ||||
|   options = { | ||||
|     youthlic.programs.openssh = { | ||||
|       enable = lib.mkEnableOption "openssh"; | ||||
|  | @ -42,7 +44,7 @@ in | |||
|           "diffie-hellman-group-exchange-sha256" | ||||
|         ]; | ||||
|       }; | ||||
|       ports = [ 3022 ]; | ||||
|       ports = [3022]; | ||||
|     }; | ||||
|   }; | ||||
| } | ||||
|  |  | |||
|  | @ -1,8 +1,10 @@ | |||
| { lib, config, ... }: | ||||
| let | ||||
|   cfg = config.youthlic.programs.owncast; | ||||
| in | ||||
| { | ||||
|   lib, | ||||
|   config, | ||||
|   ... | ||||
| }: let | ||||
|   cfg = config.youthlic.programs.owncast; | ||||
| in { | ||||
|   options = { | ||||
|     youthlic.programs.owncast = { | ||||
|       enable = lib.mkEnableOption "owncast"; | ||||
|  |  | |||
|  | @ -3,11 +3,9 @@ | |||
|   config, | ||||
|   lib, | ||||
|   ... | ||||
| }: | ||||
| let | ||||
| }: let | ||||
|   cfg = config.youthlic.programs.postgresql; | ||||
| in | ||||
| { | ||||
| in { | ||||
|   options = { | ||||
|     youthlic.programs.postgresql = { | ||||
|       enable = lib.mkEnableOption "postgresql"; | ||||
|  | @ -29,7 +27,7 @@ in | |||
|     # default socket: /var/lib/postgresql | ||||
|     services.postgresql = { | ||||
|       enable = true; | ||||
|       ensureDatabases = [ cfg.database ]; | ||||
|       ensureDatabases = [cfg.database]; | ||||
|       ensureUsers = [ | ||||
|         { | ||||
|           name = "${cfg.database}"; | ||||
|  |  | |||
|  | @ -1,8 +1,10 @@ | |||
| { lib, config, ... }: | ||||
| let | ||||
|   cfg = config.youthlic.programs.rustypaste; | ||||
| in | ||||
| { | ||||
|   lib, | ||||
|   config, | ||||
|   ... | ||||
| }: let | ||||
|   cfg = config.youthlic.programs.rustypaste; | ||||
| in { | ||||
|   imports = [ | ||||
|     ./template.nix | ||||
|   ]; | ||||
|  |  | |||
|  | @ -3,20 +3,18 @@ | |||
|   lib, | ||||
|   config, | ||||
|   ... | ||||
| }: | ||||
| let | ||||
| }: let | ||||
|   cfg = config.services.rustypaste; | ||||
|   settingsFormat = pkgs.formats.toml { }; | ||||
|   settingsFormat = pkgs.formats.toml {}; | ||||
|   configFile = settingsFormat.generate "rustypaste-config.toml" cfg.settings; | ||||
| in | ||||
| { | ||||
| in { | ||||
|   options = { | ||||
|     services.rustypaste = { | ||||
|       enable = lib.mkEnableOption "rustypaste"; | ||||
|       package = lib.mkPackageOption pkgs "rustypaste" { }; | ||||
|       package = lib.mkPackageOption pkgs "rustypaste" {}; | ||||
|       settings = lib.mkOption { | ||||
|         type = settingsFormat.type; | ||||
|         default = { }; | ||||
|         default = {}; | ||||
|         description = '' | ||||
|           Rustypaste configuration | ||||
|         ''; | ||||
|  | @ -63,7 +61,7 @@ in | |||
|         isSystemUser = true; | ||||
|       }; | ||||
|       groups = lib.optionalAttrs (cfg.group == "rustypaste") { | ||||
|         rustypaste = { }; | ||||
|         rustypaste = {}; | ||||
|       }; | ||||
|     }; | ||||
|     systemd.services.rustypaste = { | ||||
|  | @ -88,8 +86,8 @@ in | |||
|         Type = "simple"; | ||||
|         Restart = "on-failure"; | ||||
|         Home = "/var/lib/rustypaste"; | ||||
|         ReadWritePaths = [ "/var/lib/rustypaste" ]; | ||||
|         StateDirectory = [ "rustypaste" ]; | ||||
|         ReadWritePaths = ["/var/lib/rustypaste"]; | ||||
|         StateDirectory = ["rustypaste"]; | ||||
|         ExecStart = '' | ||||
|           ${lib.getExe cfg.package} | ||||
|         ''; | ||||
|  |  | |||
|  | @ -3,11 +3,9 @@ | |||
|   lib, | ||||
|   config, | ||||
|   ... | ||||
| }: | ||||
| let | ||||
| }: let | ||||
|   cfg = config.youthlic.programs.steam; | ||||
| in | ||||
| { | ||||
| in { | ||||
|   options = { | ||||
|     youthlic.programs.steam = { | ||||
|       enable = lib.mkEnableOption "steam"; | ||||
|  |  | |||
|  | @ -1,8 +1,10 @@ | |||
| { config, lib, ... }: | ||||
| let | ||||
|   cfg = config.youthlic.programs.tailscale; | ||||
| in | ||||
| { | ||||
|   config, | ||||
|   lib, | ||||
|   ... | ||||
| }: let | ||||
|   cfg = config.youthlic.programs.tailscale; | ||||
| in { | ||||
|   options = { | ||||
|     youthlic.programs.tailscale = { | ||||
|       enable = lib.mkEnableOption "tailscale"; | ||||
|  |  | |||
|  | @ -1,8 +1,10 @@ | |||
| { lib, config, ... }: | ||||
| let | ||||
|   cfg = config.youthlic.programs.transfer-sh; | ||||
| in | ||||
| { | ||||
|   lib, | ||||
|   config, | ||||
|   ... | ||||
| }: let | ||||
|   cfg = config.youthlic.programs.transfer-sh; | ||||
| in { | ||||
|   options = { | ||||
|     youthlic.programs.transfer-sh = { | ||||
|       enable = lib.mkEnableOption "transfer.sh"; | ||||
|  |  | |||
|  | @ -5,11 +5,9 @@ | |||
|   inputs, | ||||
|   rootPath, | ||||
|   ... | ||||
| }: | ||||
| let | ||||
| }: let | ||||
|   cfg = config.youthlic.programs.transmission; | ||||
| in | ||||
| { | ||||
| in { | ||||
|   options = { | ||||
|     youthlic.programs.transmission = { | ||||
|       enable = lib.mkEnableOption "transmission"; | ||||
|  |  | |||
Some files were not shown because too many files have changed in this diff Show more
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue