diff --git a/hosts/pennsardin/configuration.nix b/hosts/pennsardin/configuration.nix index 9a9717a..98df612 100644 --- a/hosts/pennsardin/configuration.nix +++ b/hosts/pennsardin/configuration.nix @@ -3,9 +3,29 @@ let globals = import ../../config/globals.nix; in { imports = [ - ../../profiles/workstation-bspwm.nix - ../../modules/hardware/bepovim.nix ../../modules/common/nix.nix + ../../modules/hardware/bepovim.nix + ../modules/desktop/xorg-bspwm.nix + ../modules/common/base.nix + ../modules/common/fonts.nix + ../modules/common/networking.nix + ../modules/common/plymouth.nix + ../modules/common/audio.nix + ../modules/common/bluetooth.nix + ../modules/common/gaming.nix + ../modules/common/lockscreen.nix + ../modules/common/energy.nix + ../modules/common/qemu.nix + ../modules/common/smtp.nix + + ../modules/hardware/firmware.nix + ../modules/hardware/gpu-amd.nix + ../modules/hardware/sensors-zenpower.nix + + ../modules/services/printing.nix + + ../modules/virtual/kvm-amd.nix + ../modules/virtual/vfio.nix ]; networking.hostName = "pennsardin"; @@ -17,8 +37,35 @@ in { environment.systemPackages = with pkgs; [ lm_sensors + btrfs-progs + cifs-utils + evtest + git + vim + wget + curl + ripgrep + fd + pciutils + usbutils + p7zip + gdu + glances + parted + tmux + xorg.xauth + xorg.xkbcomp + xorg.xev ]; + services.openssh = { + enable = true; + settings = { + X11Forwarding = true; + X11DisplayOffset = 10; + }; + }; + fileSystems = { "/" = { device = "/dev/disk/by-uuid/b1a1ae71-4277-45d5-a3d2-f49354f263d4"; diff --git a/hosts/terre-neuvas/configuration.nix b/hosts/terre-neuvas/configuration.nix index 2774051..b90388b 100644 --- a/hosts/terre-neuvas/configuration.nix +++ b/hosts/terre-neuvas/configuration.nix @@ -12,9 +12,18 @@ in { imports = [ # Include the results of the hardware scan. ./hardware.nix - ../../profiles/server-selfhosted.nix - ../../modules/services/ftp.nix + ../../modules/common/nix.nix + ../../modules/roles/server.nix + ../../modules/common/base.nix + ../../modules/common/smtp.nix + ../../modules/common/qemu.nix + + ../../modules/services/goaccess.nix + ../../modules/services/wikijs.nix ../../modules/services/forgejo.nix + ../../modules/sites/porzh.me.nix + ../../modules/sites/levr.porzh.me.nix + ]; # Bootloader. @@ -48,7 +57,32 @@ in { environment.systemPackages = with pkgs; [ neovim # Do not forget to add an editor to edit configuration.nix! The Nano editor is also installed by default. git + + btrfs-progs + cifs-utils + lm_sensors + wakeonlan + wget + curl + ripgrep + fd + pciutils + usbutils + p7zip + gdu + glances + tmux + ]; + + services.openssh = { + enable = true; + settings = { + PasswordAuthentication = false; + PubkeyAuthentication = true; + }; + }; + networking = { useNetworkd = true; firewall.allowedTCPPorts = [22 80 5900 5901 5902]; diff --git a/modules/roles/server.nix b/modules/roles/server.nix deleted file mode 100644 index 67c158d..0000000 --- a/modules/roles/server.nix +++ /dev/null @@ -1,19 +0,0 @@ -{pkgs, ...}: { - imports = [ - ../common/nix.nix - ]; - - environment.systemPackages = with pkgs; [ - git - wget - curl - ripgrep - fd - pciutils - usbutils - p7zip - gdu - glances - tmux - ]; -} diff --git a/modules/roles/workstation.nix b/modules/roles/workstation.nix deleted file mode 100644 index b99a5c7..0000000 --- a/modules/roles/workstation.nix +++ /dev/null @@ -1,27 +0,0 @@ -{pkgs, ...}: { - imports = [ - ../common/nix.nix - ../hardware/gpu-amd.nix - ../hardware/sensors-zenpower.nix - ../virtual/kvm-amd.nix - ../virtual/vfio.nix - ]; - - environment.systemPackages = with pkgs; [ - git - vim - wget - curl - ripgrep - fd - pciutils - usbutils - p7zip - gdu - glances - parted - tmux - discord - xorg.xauth - ]; -} diff --git a/modules/services/pihole.nix b/modules/services/pihole.nix deleted file mode 100644 index 78e4dc4..0000000 --- a/modules/services/pihole.nix +++ /dev/null @@ -1,24 +0,0 @@ -{ - virtualisation.oci-containers.containers.pihole = { - image = "pihole/pihole:latest"; - autoStart = true; - - ports = [ - "53:53/udp" - "53:53/tcp" - "80:80/tcp" - ]; - - environment = { - TZ = "Europe/Paris"; - WEBPASSWORD = "changeme"; # Change à ta convenance - PIHOLE_DNS_ = "1.1.1.1;1.0.0.1"; - }; - - volumes = [ - "/srv/pihole/etc-pihole:/etc/pihole" - "/srv/pihole/etc-dnsmasq.d:/etc/dnsmasq.d" - ]; - extraOptions = ["--cap-add=NET_ADMIN"]; - }; -} diff --git a/profiles/server-selfhosted.nix b/profiles/server-selfhosted.nix deleted file mode 100644 index 1f76436..0000000 --- a/profiles/server-selfhosted.nix +++ /dev/null @@ -1,30 +0,0 @@ -{pkgs, ...}: { - imports = [ - ../modules/roles/server.nix - ../modules/common/base.nix - ../modules/common/smtp.nix - ../modules/common/qemu.nix - ../modules/services/printing.nix - ../modules/services/goaccess.nix - ../modules/services/wikijs.nix - ../modules/sites/porzh.me.nix - ../modules/sites/levr.porzh.me.nix - ]; - - services.openssh = { - enable = true; - settings = { - PasswordAuthentication = false; - PubkeyAuthentication = true; - }; - }; - - environment.systemPackages = with pkgs; [ - btrfs-progs - cifs-utils - lm_sensors - wakeonlan - ]; -} -# vim: set ts=2 sw=2 sts=2 et : - diff --git a/profiles/workstation-bspwm.nix b/profiles/workstation-bspwm.nix deleted file mode 100644 index 6a1fa38..0000000 --- a/profiles/workstation-bspwm.nix +++ /dev/null @@ -1,39 +0,0 @@ -{pkgs, ...}: { - imports = [ - ../modules/roles/workstation.nix - ../modules/desktop/xorg-bspwm.nix - ../modules/common/base.nix - ../modules/common/fonts.nix - ../modules/common/networking.nix - ../modules/common/plymouth.nix - ../modules/hardware/firmware.nix - ../modules/hardware/gpu-amd.nix - ../modules/common/audio.nix - ../modules/common/bluetooth.nix - ../modules/common/gaming.nix - ../modules/services/printing.nix - ../modules/common/lockscreen.nix - ../modules/common/energy.nix - ../modules/common/qemu.nix - ../modules/common/smtp.nix - ]; - - services.openssh = { - enable = true; - settings = { - X11Forwarding = true; - X11DisplayOffset = 10; - }; - }; - - environment.systemPackages = with pkgs; [ - btrfs-progs - cifs-utils - evtest - lm_sensors - xorg.xev - xorg.xkbcomp - ]; -} -# vim: set ts=2 sw=2 sts=2 et : -