Radish alpha
r
rad:z254T5p17bdFPmzfDojsdjo4HjpoZ
Radicle Infrastructure as Code (NixOS, OpenTofu, …)
Radicle
Git
os: Introduce common mixin
Lorenz Leutgeb committed 10 months ago
commit a37fba1779caea7c7b548397bae7f2589a959919
parent b3117ca
2 files changed +47 -35
modified os/host/seed/default.nix
@@ -8,6 +8,7 @@
}: {
  imports = [
    ../../mixin/cache.nix
+
    ../../mixin/common.nix
    ../../mixin/kmscon.nix
    ../../mixin/nix.nix
    ../../mixin/motd.nix
@@ -52,7 +53,6 @@
    };

  boot = {
-
    kernel.sysctl."net.ipv4.ip_forward" = 1;
    loader.grub = {
      enable = true;
      efiSupport = false;
@@ -75,8 +75,6 @@

  networking = {
    hostName = "seed";
-
    domain = "radicle.xyz";
-
    useNetworkd = true;
    useDHCP = false;

    firewall = {
@@ -93,37 +91,5 @@
    };
  };

-
  time.timeZone = "UTC";
-
  i18n.defaultLocale = "en_US.UTF-8";
-

-
  environment.systemPackages = with pkgs; [
-
    coreutils-full
-
    dmidecode
-
    exfat
-
    libvirt
-
    lshw
-
    lsof
-
    nfs-utils
-
    utillinux
-
    which
-
    config.boot.kernelPackages.perf
-
  ];
-

-
  services = {
-
    accounts-daemon.enable = true;
-
    resolved.enable = true;
-
    nginx.enable = true;
-
  };
-

  networking.interfaces.enp1s0.useDHCP = lib.mkDefault true;
-

-
  nixpkgs.hostPlatform = "x86_64-linux";
-

-
  security = {
-
    acme = {
-
      defaults.email = "team@radicle.xyz";
-
      acceptTerms = true;
-
    };
-
    sudo.wheelNeedsPassword = false;
-
  };
}
added os/mixin/common.nix
@@ -0,0 +1,46 @@
+
{
+
  pkgs,
+
  config,
+
  ...
+
}: {
+
  time.timeZone = "UTC";
+
  i18n.defaultLocale = "en_US.UTF-8";
+

+
  boot.kernel.sysctl."net.ipv4.ip_forward" = 1;
+

+
  networking = {
+
    domain = "radicle.xyz";
+
    useNetworkd = true;
+
  };
+

+
  security = {
+
    acme = {
+
      defaults.email = "team@${config.networking.domain}";
+
      acceptTerms = true;
+
    };
+
    sudo.wheelNeedsPassword = false;
+
  };
+

+
  nixpkgs.hostPlatform = "x86_64-linux";
+

+
  environment.systemPackages = with pkgs; [
+
    config.boot.kernelPackages.perf
+
    coreutils-full
+
    curl
+
    dmidecode
+
    exfat
+
    gitMinimal
+
    libvirt
+
    lshw
+
    lsof
+
    nfs-utils
+
    utillinux
+
    which
+
  ];
+

+
  services = {
+
    accounts-daemon.enable = true;
+
    resolved.enable = true;
+
    nginx.enable = true;
+
  };
+
}