From 8131132c4910a0ae3ff5f1a883842c759d557a06 Mon Sep 17 00:00:00 2001 From: Tristan Date: Sat, 17 Feb 2024 17:07:58 +0000 Subject: [PATCH] format --- hardware/alpine.nix | 13 ++++++------- hardware/fcs-tristan-nixbook.nix | 1 - home/default.nix | 3 +-- home/programs/scripts.nix | 2 +- home/workstation.nix | 4 +--- nixos/default.nix | 1 - nixos/services/forgejo.nix | 6 ++---- nixos/services/grafana.nix | 6 ++---- nixos/services/mpd.nix | 3 +-- nixos/services/synapse.nix | 25 ++++++++++++------------- nixos/services/vaultwarden.nix | 6 ++---- nixos/workstation.nix | 1 - 12 files changed, 28 insertions(+), 43 deletions(-) diff --git a/hardware/alpine.nix b/hardware/alpine.nix index b0c1803..b279441 100644 --- a/hardware/alpine.nix +++ b/hardware/alpine.nix @@ -29,10 +29,10 @@ in { fsType = "ext4"; }; - fileSystems."/boot" = - { device = "/dev/disk/by-uuid/D8AA-8602"; - fsType = "vfat"; - }; + fileSystems."/boot" = { + device = "/dev/disk/by-uuid/D8AA-8602"; + fsType = "vfat"; + }; fileSystems."/mnt/disk1" = { device = "/dev/disk/by-uuid/caba0b6c-00d2-495a-8c04-67ea584f1a63"; @@ -86,7 +86,7 @@ in { networking.useDHCP = lib.mkDefault true; # networking.interfaces.eth0.useDHCP = lib.mkDefault true; # networking.interfaces.tailscale0.useDHCP = lib.mkDefault true; - networking.firewall.allowedTCPPorts = [ 53 80 443 ]; + networking.firewall.allowedTCPPorts = [53 80 443]; nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux"; hardware.cpu.amd.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware; @@ -188,7 +188,6 @@ in { domain = "monitor.tristans.cloud"; http_port = 3001; # forgejo and grafana default to 3000 }; - - services.forgejo.settings.server.DOMAIN = "git.tristans.cloud"; + services.forgejo.settings.server.DOMAIN = "git.tristans.cloud"; } diff --git a/hardware/fcs-tristan-nixbook.nix b/hardware/fcs-tristan-nixbook.nix index 93be93a..1dc986e 100644 --- a/hardware/fcs-tristan-nixbook.nix +++ b/hardware/fcs-tristan-nixbook.nix @@ -99,5 +99,4 @@ in { ]; services.tlp.enable = true; - } diff --git a/home/default.nix b/home/default.nix index f7e0fa1..f68a7e1 100644 --- a/home/default.nix +++ b/home/default.nix @@ -3,8 +3,7 @@ pkgs, lib, ... -}: -{ +}: { imports = [ ./programs/neovim/. ./programs/helix.nix diff --git a/home/programs/scripts.nix b/home/programs/scripts.nix index 9c1fbca..ce355a1 100644 --- a/home/programs/scripts.nix +++ b/home/programs/scripts.nix @@ -63,7 +63,7 @@ in { items="$(rbw list)" echo "$items" | ${my-deps.menu} | xargs -I_ rbw get --field username _ \ | awk '{print $2}' | wl-copy -n - ''; + ''; hotkeys = [ { modifier = "${modifier}_CONTROL"; diff --git a/home/workstation.nix b/home/workstation.nix index c620e2f..d130b7b 100644 --- a/home/workstation.nix +++ b/home/workstation.nix @@ -3,8 +3,7 @@ pkgs, lib, ... -}: -{ +}: { imports = [ ./modules/terminal.nix ./modules/scripts.nix @@ -55,5 +54,4 @@ }; services.gnome-keyring.enable = true; - } diff --git a/nixos/default.nix b/nixos/default.nix index e93d7df..9ceb23f 100644 --- a/nixos/default.nix +++ b/nixos/default.nix @@ -111,5 +111,4 @@ in { }; services.prometheus.exporters.node.enable = true; - } diff --git a/nixos/services/forgejo.nix b/nixos/services/forgejo.nix index 2b21a82..e535ac7 100644 --- a/nixos/services/forgejo.nix +++ b/nixos/services/forgejo.nix @@ -1,8 +1,6 @@ -{config, ...}: -let +{config, ...}: let cfg = config.services.forgejo; -in -{ +in { services.forgejo = { enable = true; dump.enable = true; diff --git a/nixos/services/grafana.nix b/nixos/services/grafana.nix index 1ffc7d2..020de1c 100644 --- a/nixos/services/grafana.nix +++ b/nixos/services/grafana.nix @@ -1,8 +1,6 @@ -{config, ...}: -let +{config, ...}: let cfg = config.services.grafana; -in -{ +in { services.grafana = { enable = true; }; diff --git a/nixos/services/mpd.nix b/nixos/services/mpd.nix index b81483f..9589de5 100644 --- a/nixos/services/mpd.nix +++ b/nixos/services/mpd.nix @@ -1,5 +1,4 @@ -{config,...}: -{ +{config, ...}: { services.mpd = { enable = true; network.listenAddress = "0.0.0.0"; diff --git a/nixos/services/synapse.nix b/nixos/services/synapse.nix index 976704a..1e53f2b 100644 --- a/nixos/services/synapse.nix +++ b/nixos/services/synapse.nix @@ -7,8 +7,7 @@ let add_header Access-Control-Allow-Origin *; return 200 '${builtins.toJSON data}'; ''; -in -{ +in { services.matrix-synapse = { enable = false; # using podman for the moment }; @@ -20,26 +19,26 @@ in locations."= /.well-known/matrix/client".extraConfig = mkWellKnown { "m.homeserver".base_url = "https://${fqdn}"; "org.matrix.msc3575.proxy"."url" = "https://${fqdn}"; - }; + }; locations."= /.well-known/matrix/support".extraConfig = mkWellKnown { - admins = [{ - matrix_id = "@tristan:tristans.cloud"; - email_address = "tristan@tristans.cloud"; - role = "admin"; - }]; - }; + admins = [ + { + matrix_id = "@tristan:tristans.cloud"; + email_address = "tristan@tristans.cloud"; + role = "admin"; + } + ]; + }; locations."/_matrix".proxyPass = "http://localhost:8008"; locations."/_synapse/client".proxyPass = "http://localhost:8008"; - locations."/_matrix/client/unstable/org.matrix.msc3575/sync".proxyPass = - "http://localhost:8009"; + locations."/_matrix/client/unstable/org.matrix.msc3575/sync".proxyPass = "http://localhost:8009"; }; ${fqdn} = { enableACME = true; forceSSL = true; locations."/_matrix".proxyPass = "http://localhost:8008"; locations."/_synapse/client".proxyPass = "http://localhost:8008"; - locations."/_matrix/client/unstable/org.matrix.msc3575/sync".proxyPass = - "http://localhost:8009"; + locations."/_matrix/client/unstable/org.matrix.msc3575/sync".proxyPass = "http://localhost:8009"; }; }; } diff --git a/nixos/services/vaultwarden.nix b/nixos/services/vaultwarden.nix index 2a37e21..cb0a175 100644 --- a/nixos/services/vaultwarden.nix +++ b/nixos/services/vaultwarden.nix @@ -1,9 +1,7 @@ -{config, ...}: -let +{config, ...}: let cfg = config.services.vaultwarden; domain = "vault.tristans.cloud"; -in -{ +in { services.vaultwarden = { enable = true; }; diff --git a/nixos/workstation.nix b/nixos/workstation.nix index e36e6a2..11c92e4 100644 --- a/nixos/workstation.nix +++ b/nixos/workstation.nix @@ -79,5 +79,4 @@ in { nerdfonts interalia ]; - }