chore: format files

This commit is contained in:
Gustavo "Guz" L. de Mello
2024-06-16 20:08:29 -03:00
parent 25af484bb9
commit c8247a3208
18 changed files with 265 additions and 247 deletions

View File

@@ -1,8 +1,9 @@
{ config {
, lib config,
, inputs lib,
, pkgs inputs,
, ... pkgs,
...
}: { }: {
imports = [ imports = [
./hardware-configuration.nix ./hardware-configuration.nix

View File

@@ -21,10 +21,10 @@
dot013-environment.url = "github:dot013/environment"; dot013-environment.url = "github:dot013/environment";
}; };
outputs = outputs = {
{ nixpkgs nixpkgs,
, home-manager home-manager,
, ... ...
} @ inputs: { } @ inputs: {
nixosConfigurations = { nixosConfigurations = {
spacestation = nixpkgs.lib.nixosSystem { spacestation = nixpkgs.lib.nixosSystem {

View File

@@ -1,11 +1,12 @@
# Do not modify this file! It was generated by nixos-generate-config # Do not modify this file! It was generated by nixos-generate-config
# and may be overwritten by future invocations. Please make changes # and may be overwritten by future invocations. Please make changes
# to /etc/nixos/configuration.nix instead. # to /etc/nixos/configuration.nix instead.
{ config {
, lib config,
, pkgs lib,
, modulesPath pkgs,
, ... modulesPath,
...
}: { }: {
imports = [ imports = [
(modulesPath + "/installer/scan/not-detected.nix") (modulesPath + "/installer/scan/not-detected.nix")

View File

@@ -1,8 +1,9 @@
{ config {
, pkgs config,
, inputs pkgs,
, lib inputs,
, ... lib,
...
}: { }: {
imports = [ imports = [
inputs.dot013-environment.homeManagerModule inputs.dot013-environment.homeManagerModule

View File

@@ -1,11 +1,10 @@
{ config
, lib
, ...
}:
let
cfg = config.services.adguardhome;
in
{ {
config,
lib,
...
}: let
cfg = config.services.adguardhome;
in {
imports = []; imports = [];
options.services.adguardhome = with lib; options.services.adguardhome = with lib;
with lib.types; { with lib.types; {

View File

@@ -1,10 +1,10 @@
{ config {
, lib config,
, pkgs lib,
, utils pkgs,
, ... utils,
}: ...
let }: let
cfg = config.services.forgejo; cfg = config.services.forgejo;
yamlFormat = pkgs.formats.yaml {}; yamlFormat = pkgs.formats.yaml {};
users = builtins.attrValues (builtins.mapAttrs users = builtins.attrValues (builtins.mapAttrs
@@ -19,8 +19,7 @@ let
}) })
cfg.users); cfg.users);
initList = l: lib.strings.concatStringsSep "," l; initList = l: lib.strings.concatStringsSep "," l;
in in {
{
imports = []; imports = [];
options.services.forgejo = with lib; options.services.forgejo = with lib;
with lib.types; { with lib.types; {
@@ -29,9 +28,10 @@ in
default = false; default = false;
}; };
users = mkOption { users = mkOption {
type = attrsOf (submodule ({ config type = attrsOf (submodule ({
, lib config,
, ... lib,
...
}: }:
with lib; with lib;
with lib.types; { with lib.types; {

View File

@@ -1,11 +1,10 @@
{ config
, lib
, ...
}:
let
cfg = config.profiles.locale;
in
{ {
config,
lib,
...
}: let
cfg = config.profiles.locale;
in {
imports = []; imports = [];
options.profiles.locale = with lib; options.profiles.locale = with lib;
with lib.types; { with lib.types; {

View File

@@ -1,9 +1,9 @@
{ config {
, lib config,
, pkgs lib,
, ... pkgs,
}: ...
let }: let
cfg = config.programs.nh; cfg = config.programs.nh;
wrapper = pkgs.writeShellScriptBin "nh" '' wrapper = pkgs.writeShellScriptBin "nh" ''
function alejandra() { ${pkgs.alejandra}/bin/alejandra "$@"; } function alejandra() { ${pkgs.alejandra}/bin/alejandra "$@"; }
@@ -16,8 +16,7 @@ let
${builtins.readFile ./wrapper.sh} ${builtins.readFile ./wrapper.sh}
''; '';
in in {
{
options.programs.nh = with lib; with lib.types; {}; options.programs.nh = with lib; with lib.types; {};
config = with lib; config = with lib;
mkIf cfg.enable { mkIf cfg.enable {

View File

@@ -1,11 +1,10 @@
{ config
, lib
, ...
}:
let
cfg = config.services.tailscale;
in
{ {
config,
lib,
...
}: let
cfg = config.services.tailscale;
in {
imports = []; imports = [];
options.services.tailscale = with lib; options.services.tailscale = with lib;
with lib.types; { with lib.types; {

View File

@@ -71,8 +71,8 @@
"enc": "-----BEGIN AGE ENCRYPTED FILE-----\nYWdlLWVuY3J5cHRpb24ub3JnL3YxCi0+IFgyNTUxOSBnL3dCY1VLMmoxRFRmS0Ir\nV0ppTnI0RE5ZMjcvRGNPWkNxWFdJYTBDTG00ClRGQkh1UStGTmc0RE5aNy9nL3FI\nbHJIa3hLR0ZkTjd6WkFzOFkzeFdMNUEKLS0tIDBidk93Qy9LenFlSGZ2aEpuTUFt\nWVM2eS9UdXAvbzE4eEdKMjVEM3RLdm8KKeIhk+YOKVL9Y19lLyb6/Pxv8rbewK2e\nLm96jx+LOMOCFcQGxuFKWqQbTB4br/cPvRKSY5jFmFWqVg7pCPTAzQ==\n-----END AGE ENCRYPTED FILE-----\n" "enc": "-----BEGIN AGE ENCRYPTED FILE-----\nYWdlLWVuY3J5cHRpb24ub3JnL3YxCi0+IFgyNTUxOSBnL3dCY1VLMmoxRFRmS0Ir\nV0ppTnI0RE5ZMjcvRGNPWkNxWFdJYTBDTG00ClRGQkh1UStGTmc0RE5aNy9nL3FI\nbHJIa3hLR0ZkTjd6WkFzOFkzeFdMNUEKLS0tIDBidk93Qy9LenFlSGZ2aEpuTUFt\nWVM2eS9UdXAvbzE4eEdKMjVEM3RLdm8KKeIhk+YOKVL9Y19lLyb6/Pxv8rbewK2e\nLm96jx+LOMOCFcQGxuFKWqQbTB4br/cPvRKSY5jFmFWqVg7pCPTAzQ==\n-----END AGE ENCRYPTED FILE-----\n"
} }
], ],
"lastmodified": "2024-05-21T18:13:55Z", "lastmodified": "2024-06-16T23:07:47Z",
"mac": "ENC[AES256_GCM,data:P+tqLu/mY+qadDeyDwEYf/Mwv2tJOBEghvkBhRzLguaynCk4pLhy40P+eIvd8/DWfERW/CAnOH038kJRO9zG5qZiYKZgTB1MVFACnpPoF4Ek1a0+eSmQfiHBBLd45fvExfyYo3XLi6e0ZNZYiQOSL++WqBPGcSAz0N2bhxnPqFE=,iv:b7xEGJybByQwl2FfIdC3q2UVuDgOTHrVPPqZe/w8cmc=,tag:upZP6dukO70Qm5hb3odTWg==,type:str]", "mac": "ENC[AES256_GCM,data:Bf5CCuBVEidLk+7OW6g6ADfchxh+98D24p3Kk6vuwScTDsA77ADQVcWmd2wQkwwl6j1b2p/0Brr0nZEbjTJL+vsYhRmMYlWvqyXEu7e10Obl3gd8OlnMIifit9jNpbTGGvlE+ZYiLGpqOoYHOMJOAB9kJPz21FiQlsFMEcDQseI=,iv:hddyrPLcWBhu0mpbegpsAXLeXZt/W8LOnFg4TNvxyag=,tag:OKHVYFy2+aJEtfqq3tSNLA==,type:str]",
"pgp": null, "pgp": null,
"unencrypted_suffix": "_unencrypted", "unencrypted_suffix": "_unencrypted",
"version": "3.8.1" "version": "3.8.1"

View File

@@ -1,13 +1,12 @@
{ config {
, lib config,
, pkgs lib,
, ... pkgs,
}: ...
let }: let
secrets = config.spacestation-secrets.lesser; secrets = config.spacestation-secrets.lesser;
deviceIp = config.services.tailscale.deviceIp; deviceIp = config.services.tailscale.deviceIp;
in in {
{
imports = [ imports = [
../modules/adguardhome.nix ../modules/adguardhome.nix
]; ];

20
services/caddy.nix Normal file
View File

@@ -0,0 +1,20 @@
{
config,
lib,
...
}: let
secrets = config.spacestation-secrets.lesser;
deviceIp = config.services.tailscale.deviceIp;
in {
imports = [];
services.caddy.enable = true;
services.caddy.virtualHosts =
lib.attrsets.mapAttrs'
(name: service: {
name = service.domain;
value = {extraConfig = "reverse_proxy ${deviceIp}:${toString service.port}";};
})
secrets.services;
networking.firewall.allowedTCPPorts = [80 433];
}

View File

@@ -1,7 +1,8 @@
{ config {
, lib config,
, pkgs lib,
, ... pkgs,
...
}: { }: {
imports = []; imports = [];
virtualisation.oci-containers.containers.prata-music = { virtualisation.oci-containers.containers.prata-music = {

View File

@@ -1,6 +1,7 @@
{ ... }: { { ... }: {
imports = [ imports = [
./adguardhome.nix ./adguardhome.nix
./caddy.nix
./containers ./containers
./forgejo.nix ./forgejo.nix
./tailscale.nix ./tailscale.nix

View File

@@ -1,12 +1,11 @@
{ config
, lib
, pkgs
, ...
}:
let
secrets = config.spacestation-secrets.lesser;
in
{ {
config,
lib,
pkgs,
...
}: let
secrets = config.spacestation-secrets.lesser;
in {
imports = [ imports = [
../modules/forgejo ../modules/forgejo
]; ];

View File

@@ -1,12 +1,11 @@
{ config
, lib
, pkgs
, ...
}:
let
secrets = config.spacestation-secrets.lesser;
in
{ {
config,
lib,
pkgs,
...
}: let
secrets = config.spacestation-secrets.lesser;
in {
imports = [ imports = [
../modules/tailscale.nix ../modules/tailscale.nix
]; ];