aboutsummaryrefslogtreecommitdiff
path: root/hosts
diff options
context:
space:
mode:
authorMiran Bastaja <miran.bastaja04@gmail.com>2024-07-06 06:48:40 +0200
committerMiran Bastaja <miran.bastaja04@gmail.com>2024-07-06 06:48:40 +0200
commitc97a1d66084aaf50ca816d9c482f296d31346f9f (patch)
treed03726dfb1edfa87b93ca42b9076658c7c50c940 /hosts
parentfed01b401d65e655f565fc5c6304f2ab0d758513 (diff)
formatting
Diffstat (limited to 'hosts')
-rw-r--r--hosts/sagittarius/default.nix5
-rw-r--r--hosts/sagittarius/hardware.nix29
-rw-r--r--hosts/sagittarius/home.nix5
-rw-r--r--hosts/sagittarius/ssh.nix8
-rw-r--r--hosts/sagittarius/web/acme.nix3
-rw-r--r--hosts/sagittarius/web/blog.nix8
-rw-r--r--hosts/sagittarius/web/default.nix3
-rw-r--r--hosts/sagittarius/web/git.nix3
-rw-r--r--hosts/sagittarius/web/matrix.nix18
-rw-r--r--hosts/sagittarius/web/mediadb.nix7
-rw-r--r--hosts/underworld/default.nix26
-rw-r--r--hosts/underworld/hardware.nix20
-rw-r--r--hosts/underworld/home.nix9
-rw-r--r--hosts/wonderland/default.nix32
-rw-r--r--hosts/wonderland/hardware.nix40
-rw-r--r--hosts/wonderland/home.nix9
-rw-r--r--hosts/wonderland/sops.nix3
17 files changed, 163 insertions, 65 deletions
diff --git a/hosts/sagittarius/default.nix b/hosts/sagittarius/default.nix
index 946ecc7..2e45e03 100644
--- a/hosts/sagittarius/default.nix
+++ b/hosts/sagittarius/default.nix
@@ -1,4 +1,5 @@
-{ ... }: {
+{ ... }:
+{
imports = [
# Include the results of the hardware scan.
./hardware.nix
@@ -21,7 +22,7 @@
matchConfig.Name = "enp1s0";
networkConfig.DHCP = "ipv4";
address = [ "2a01:4f9:c012:c7a7::/64" ];
- routes = [{ Gateway = "fe80::1"; }];
+ routes = [ { Gateway = "fe80::1"; } ];
};
};
diff --git a/hosts/sagittarius/hardware.nix b/hosts/sagittarius/hardware.nix
index 783b081..6b004d1 100644
--- a/hosts/sagittarius/hardware.nix
+++ b/hosts/sagittarius/hardware.nix
@@ -1,22 +1,33 @@
# 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, ... }:
+{
+ config,
+ lib,
+ pkgs,
+ modulesPath,
+ ...
+}:
{
- imports =
- [ (modulesPath + "/profiles/qemu-guest.nix")
- ];
+ imports = [ (modulesPath + "/profiles/qemu-guest.nix") ];
- boot.initrd.availableKernelModules = [ "ahci" "xhci_pci" "virtio_pci" "virtio_scsi" "sd_mod" "sr_mod" ];
+ boot.initrd.availableKernelModules = [
+ "ahci"
+ "xhci_pci"
+ "virtio_pci"
+ "virtio_scsi"
+ "sd_mod"
+ "sr_mod"
+ ];
boot.initrd.kernelModules = [ ];
boot.kernelModules = [ ];
boot.extraModulePackages = [ ];
- fileSystems."/" =
- { device = "/dev/disk/by-uuid/34d333d4-2298-47c7-b015-5c3e2fd1a27e";
- fsType = "ext4";
- };
+ fileSystems."/" = {
+ device = "/dev/disk/by-uuid/34d333d4-2298-47c7-b015-5c3e2fd1a27e";
+ fsType = "ext4";
+ };
swapDevices = [ ];
diff --git a/hosts/sagittarius/home.nix b/hosts/sagittarius/home.nix
index accbd5d..5b2bcd0 100644
--- a/hosts/sagittarius/home.nix
+++ b/hosts/sagittarius/home.nix
@@ -1,8 +1,9 @@
-{ flakeRoot, ... }: {
+{ flakeRoot, ... }:
+{
home-manager = {
useGlobalPkgs = true;
useUserPackages = true;
- sharedModules = [{ imports = [ (flakeRoot + /share/home/minimal.nix) ]; }];
+ sharedModules = [ { imports = [ (flakeRoot + /share/home/minimal.nix) ]; } ];
users = {
root.home.stateVersion = "23.05";
diff --git a/hosts/sagittarius/ssh.nix b/hosts/sagittarius/ssh.nix
index 4951f3e..720f0c9 100644
--- a/hosts/sagittarius/ssh.nix
+++ b/hosts/sagittarius/ssh.nix
@@ -1,10 +1,14 @@
-{ ... }: {
+{ ... }:
+{
services.openssh = {
enable = true;
settings = {
PermitRootLogin = "no";
PasswordAuthentication = false;
- AllowUsers = [ "ascella" "nongzhangren" ];
+ AllowUsers = [
+ "ascella"
+ "nongzhangren"
+ ];
};
};
}
diff --git a/hosts/sagittarius/web/acme.nix b/hosts/sagittarius/web/acme.nix
index 4cde574..0d27f29 100644
--- a/hosts/sagittarius/web/acme.nix
+++ b/hosts/sagittarius/web/acme.nix
@@ -1,4 +1,5 @@
-{ ... }: {
+{ ... }:
+{
security.acme = {
acceptTerms = true;
defaults = {
diff --git a/hosts/sagittarius/web/blog.nix b/hosts/sagittarius/web/blog.nix
index 49ebb87..671674f 100644
--- a/hosts/sagittarius/web/blog.nix
+++ b/hosts/sagittarius/web/blog.nix
@@ -1,6 +1,10 @@
-{ inputs, pkgs, ... }: {
+{ inputs, pkgs, ... }:
+{
imports = [ ./acme.nix ];
- networking.firewall.allowedTCPPorts = [ 80 443 ];
+ networking.firewall.allowedTCPPorts = [
+ 80
+ 443
+ ];
services.nginx = {
enable = true;
diff --git a/hosts/sagittarius/web/default.nix b/hosts/sagittarius/web/default.nix
index 3fc702e..611d11b 100644
--- a/hosts/sagittarius/web/default.nix
+++ b/hosts/sagittarius/web/default.nix
@@ -1,4 +1,5 @@
-{ ... }: {
+{ ... }:
+{
imports = [
./blog.nix
./matrix.nix
diff --git a/hosts/sagittarius/web/git.nix b/hosts/sagittarius/web/git.nix
index 732f7d0..adea3c3 100644
--- a/hosts/sagittarius/web/git.nix
+++ b/hosts/sagittarius/web/git.nix
@@ -1,4 +1,5 @@
-{ ... }: {
+{ ... }:
+{
services.gitDaemon = {
enable = true;
repositories = [ "/srv/git/" ];
diff --git a/hosts/sagittarius/web/matrix.nix b/hosts/sagittarius/web/matrix.nix
index d230edc..c971ddc 100644
--- a/hosts/sagittarius/web/matrix.nix
+++ b/hosts/sagittarius/web/matrix.nix
@@ -19,11 +19,20 @@ let
}
}
'';
-in {
+in
+{
imports = [ ./acme.nix ];
- networking.firewall.allowedTCPPorts = [ 80 443 8448 ];
- networking.firewall.allowedUDPPorts = [ 80 443 8448 ];
+ networking.firewall.allowedTCPPorts = [
+ 80
+ 443
+ 8448
+ ];
+ networking.firewall.allowedUDPPorts = [
+ 80
+ 443
+ 8448
+ ];
services.matrix-conduit = {
enable = true;
@@ -102,8 +111,7 @@ in {
};
upstreams."backend_conduit".servers = {
- "[::1]:${toString config.services.matrix-conduit.settings.global.port}" =
- { };
+ "[::1]:${toString config.services.matrix-conduit.settings.global.port}" = { };
};
};
}
diff --git a/hosts/sagittarius/web/mediadb.nix b/hosts/sagittarius/web/mediadb.nix
index 78d76cd..4ff83af 100644
--- a/hosts/sagittarius/web/mediadb.nix
+++ b/hosts/sagittarius/web/mediadb.nix
@@ -1,4 +1,5 @@
-{ pkgs, ... }: {
+{ pkgs, ... }:
+{
networking.firewall.allowedTCPPorts = [ 5432 ];
services.postgresql = {
@@ -7,7 +8,9 @@
enableTCPIP = true;
enableJIT = true;
- settings = { password_encryption = "scram-sha-256"; };
+ settings = {
+ password_encryption = "scram-sha-256";
+ };
authentication = ''
# TYPE DATABASE USER ADDRESS METHOD
diff --git a/hosts/underworld/default.nix b/hosts/underworld/default.nix
index 81af671..cde0707 100644
--- a/hosts/underworld/default.nix
+++ b/hosts/underworld/default.nix
@@ -1,4 +1,10 @@
-{ pkgs, flakeRoot, inputs, ... }: {
+{
+ pkgs,
+ flakeRoot,
+ inputs,
+ ...
+}:
+{
imports = [
# Include the results of the hardware scan.
./hardware.nix
@@ -7,7 +13,11 @@
./home.nix
(flakeRoot + /share/system/client-common.nix)
#(flakeRoot + /share/system/spotifyd.nix)
- { _module.args = { inherit inputs; }; }
+ {
+ _module.args = {
+ inherit inputs;
+ };
+ }
];
programs.fish.enable = true;
@@ -29,11 +39,19 @@
users.users = {
osiris = {
isNormalUser = true;
- extraGroups = [ "wheel" "video" "network" "podman" ];
+ extraGroups = [
+ "wheel"
+ "video"
+ "network"
+ "podman"
+ ];
};
guest = {
isNormalUser = true;
- extraGroups = [ "video" "network" ];
+ extraGroups = [
+ "video"
+ "network"
+ ];
};
};
diff --git a/hosts/underworld/hardware.nix b/hosts/underworld/hardware.nix
index 305d6ce..b66b797 100644
--- a/hosts/underworld/hardware.nix
+++ b/hosts/underworld/hardware.nix
@@ -1,15 +1,23 @@
# 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, modulesPath, ... }:
+{
+ config,
+ lib,
+ modulesPath,
+ ...
+}:
{
- imports =
- [
- (modulesPath + "/installer/scan/not-detected.nix")
- ];
+ imports = [ (modulesPath + "/installer/scan/not-detected.nix") ];
- boot.initrd.availableKernelModules = [ "xhci_pci" "ahci" "usbhid" "usb_storage" "sd_mod" ];
+ boot.initrd.availableKernelModules = [
+ "xhci_pci"
+ "ahci"
+ "usbhid"
+ "usb_storage"
+ "sd_mod"
+ ];
boot.initrd.kernelModules = [ ];
boot.kernelModules = [ "kvm-amd" ];
boot.extraModulePackages = [ ];
diff --git a/hosts/underworld/home.nix b/hosts/underworld/home.nix
index 90a85e5..bf652d0 100644
--- a/hosts/underworld/home.nix
+++ b/hosts/underworld/home.nix
@@ -1,9 +1,12 @@
-{ flakeRoot, inputs, ... }: {
+{ flakeRoot, inputs, ... }:
+{
home-manager = {
useGlobalPkgs = true;
useUserPackages = true;
- sharedModules = [{ programs.fish.enable = true; }];
- extraSpecialArgs = { inherit inputs; };
+ sharedModules = [ { programs.fish.enable = true; } ];
+ extraSpecialArgs = {
+ inherit inputs;
+ };
};
home-manager.users.osiris = {
diff --git a/hosts/wonderland/default.nix b/hosts/wonderland/default.nix
index 130feab..c294be9 100644
--- a/hosts/wonderland/default.nix
+++ b/hosts/wonderland/default.nix
@@ -1,4 +1,11 @@
-{ config, pkgs, flakeRoot, inputs, ... }: {
+{
+ config,
+ pkgs,
+ flakeRoot,
+ inputs,
+ ...
+}:
+{
imports = [
# Include the results of the hardware scan.
./hardware.nix
@@ -10,7 +17,11 @@
})
(flakeRoot + /share/system/client-common.nix)
#(flakeRoot + /share/system/spotifyd.nix)
- { _module.args = { inherit inputs; }; }
+ {
+ _module.args = {
+ inherit inputs;
+ };
+ }
];
programs.fish.enable = true;
@@ -81,15 +92,26 @@
users.users = {
alice = {
isNormalUser = true;
- extraGroups = [ "wheel" "video" "network" "podman" ];
+ extraGroups = [
+ "wheel"
+ "video"
+ "network"
+ "podman"
+ ];
};
madhatter = {
isNormalUser = true;
- extraGroups = [ "video" "network" ];
+ extraGroups = [
+ "video"
+ "network"
+ ];
};
guest = {
isNormalUser = true;
- extraGroups = [ "video" "network" ];
+ extraGroups = [
+ "video"
+ "network"
+ ];
};
};
diff --git a/hosts/wonderland/hardware.nix b/hosts/wonderland/hardware.nix
index a99d2a3..8c7246a 100644
--- a/hosts/wonderland/hardware.nix
+++ b/hosts/wonderland/hardware.nix
@@ -1,31 +1,39 @@
# 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, ... }:
+{
+ config,
+ lib,
+ pkgs,
+ modulesPath,
+ ...
+}:
{
- imports =
- [ (modulesPath + "/installer/scan/not-detected.nix")
- ];
+ imports = [ (modulesPath + "/installer/scan/not-detected.nix") ];
- boot.initrd.availableKernelModules = [ "nvme" "xhci_pci" "ahci" "usb_storage" "sd_mod" ];
+ boot.initrd.availableKernelModules = [
+ "nvme"
+ "xhci_pci"
+ "ahci"
+ "usb_storage"
+ "sd_mod"
+ ];
boot.initrd.kernelModules = [ ];
boot.kernelModules = [ "kvm-amd" ];
boot.extraModulePackages = [ ];
- fileSystems."/" =
- { device = "/dev/disk/by-uuid/fc1a2a05-efb0-45e7-83f2-2b9dae515b0a";
- fsType = "ext4";
- };
+ fileSystems."/" = {
+ device = "/dev/disk/by-uuid/fc1a2a05-efb0-45e7-83f2-2b9dae515b0a";
+ fsType = "ext4";
+ };
- fileSystems."/boot" =
- { device = "/dev/disk/by-uuid/FEB7-A352";
- fsType = "vfat";
- };
+ fileSystems."/boot" = {
+ device = "/dev/disk/by-uuid/FEB7-A352";
+ fsType = "vfat";
+ };
- swapDevices =
- [ { device = "/dev/disk/by-uuid/f16d9af0-4043-4d39-a8d6-e788451f8e9e"; }
- ];
+ swapDevices = [ { device = "/dev/disk/by-uuid/f16d9af0-4043-4d39-a8d6-e788451f8e9e"; } ];
# 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
diff --git a/hosts/wonderland/home.nix b/hosts/wonderland/home.nix
index 43611b9..710aab6 100644
--- a/hosts/wonderland/home.nix
+++ b/hosts/wonderland/home.nix
@@ -1,9 +1,12 @@
-{ flakeRoot, inputs, ... }: {
+{ flakeRoot, inputs, ... }:
+{
home-manager = {
useGlobalPkgs = true;
useUserPackages = true;
- sharedModules = [{ imports = [ (flakeRoot + /share/cfg) ]; }];
- extraSpecialArgs = { inherit inputs; };
+ sharedModules = [ { imports = [ (flakeRoot + /share/cfg) ]; } ];
+ extraSpecialArgs = {
+ inherit inputs;
+ };
};
home-manager.users.alice = {
diff --git a/hosts/wonderland/sops.nix b/hosts/wonderland/sops.nix
index 0ac9d3d..5b77bc2 100644
--- a/hosts/wonderland/sops.nix
+++ b/hosts/wonderland/sops.nix
@@ -1,4 +1,5 @@
-{ ... }: {
+{ ... }:
+{
sops = {
age.sshKeyPaths = [ "/etc/ssh/ssh_host_ed25519_key" ];
defaultSopsFile = ../../secrets/credentials.json;