diff --git a/ops/nixos/default.nix b/ops/nixos/default.nix index 189fc14a23..ecd4138aab 100644 --- a/ops/nixos/default.nix +++ b/ops/nixos/default.nix @@ -15,9 +15,9 @@ let system = builtins.currentSystem; modules = [ (baseModule systemName) (args: { imports = [ lib/common.nix config ]; }) ]; }).config.system.build.toplevel; - systems = [ "porcorosso" "ixvm-fra01" "marukuru" "clouvider-fra01" ]; + systems = [ "porcorosso" "ixvm-fra01" "marukuru" "clouvider-fra01" "totoro" ]; rebuilder = system: (import ./lib/rebuilder.nix (args // { system = system; })); systemCfgs = lib.genAttrs systems (name: import (./. + "/${name}")); systemDrvs = mapAttrs systemFor systemCfgs; -in systemDrvs \ No newline at end of file +in systemDrvs diff --git a/ops/nixos/totoro/default.nix b/ops/nixos/totoro/default.nix new file mode 100644 index 0000000000..babdaacc4e --- /dev/null +++ b/ops/nixos/totoro/default.nix @@ -0,0 +1,50 @@ +# SPDX-FileCopyrightText: 2020 Luke Granger-Brown +# +# SPDX-License-Identifier: Apache-2.0 + +{ depot, lib, pkgs, rebuilder, config, ... }: +let + inherit (depot.ops) secrets; +in { + imports = + [ ]; + + boot.initrd.availableKernelModules = [ "xhci_pci" "ahci" "nvme" "usb_storage" "usbhid" "sd_mod" ]; + boot.kernelModules = lib.mkAfter [ "kvm-intel" ]; + boot.kernelParams = [ "mitigations=off" ]; + + fileSystems = let + zfs = device: { + device = device; + fsType = "zfs"; + }; + in { + "/" = zfs "zboot/safe/root"; + "/nix" = zfs "zboot/local/nix"; + + "/home" = zfs "tank/safe/home"; + + "/boot" = { + device = "/dev/disk/by-uuid/D178-4E19"; + fsType = "vfat"; + }; + }; + + # Use the systemd-boot EFI boot loader. + boot.loader.systemd-boot.enable = true; + boot.loader.efi.canTouchEfiVariables = true; + + nix.maxJobs = lib.mkDefault 8; + powerManagement.cpuFreqGovernor = lib.mkDefault "performance"; + + # Networking! + networking = { + hostName = "totoro"; # Define your hostname. + domain = "lukegb.xyz"; + hostId = "676c08c4"; + useDHCP = false; + interfaces.enp0s31f6.useDHCP = true; + }; + + system.stateVersion = "20.03"; +}