add cloudnix config
This commit is contained in:
parent
c430d14133
commit
02b736cc0c
11
flake.nix
11
flake.nix
|
@ -130,6 +130,17 @@
|
|||
modules = [
|
||||
./hosts/citadel
|
||||
|
||||
home-manager.nixosModules.home-manager
|
||||
{
|
||||
home-manager.extraSpecialArgs = specialArgs;
|
||||
}
|
||||
];
|
||||
};
|
||||
cloudnix = nixpkgs.lib.nixosSystem {
|
||||
inherit specialArgs;
|
||||
modules = [
|
||||
./hosts/cloudnix
|
||||
|
||||
home-manager.nixosModules.home-manager
|
||||
{
|
||||
home-manager.extraSpecialArgs = specialArgs;
|
||||
|
|
|
@ -0,0 +1,57 @@
|
|||
{
|
||||
configVars,
|
||||
outputs,
|
||||
...
|
||||
}: let
|
||||
user = "admin";
|
||||
merlinIp = configVars.networking.addresses.merlin.ip;
|
||||
in {
|
||||
imports = [
|
||||
# Create users for this host
|
||||
../common/users/${user}
|
||||
|
||||
# Import core options
|
||||
./hardware-configuration.nix
|
||||
../common/core
|
||||
|
||||
# Import optional options
|
||||
../common/optional/persistence.nix
|
||||
../common/optional/openssh.nix
|
||||
|
||||
../common/optional/distributed-builds/local-machine.nix
|
||||
|
||||
outputs.nixosModules.nixosAutoUpgrade
|
||||
];
|
||||
|
||||
boot = {
|
||||
loader = {
|
||||
grub.enable = true;
|
||||
};
|
||||
};
|
||||
|
||||
services = {
|
||||
earlyoom = {
|
||||
enable = true;
|
||||
freeMemThreshold = 5; # <%5 free
|
||||
};
|
||||
};
|
||||
|
||||
system.services.nixosAutoUpgrade = {
|
||||
enable = true;
|
||||
persistent = true;
|
||||
remote = "remotebuild@${merlinIp}";
|
||||
reboot = false;
|
||||
pushUpdates = false;
|
||||
configDir = "/etc/nixos";
|
||||
onCalendar = "*-*-* 06:00:00";
|
||||
user = "sam";
|
||||
};
|
||||
|
||||
networking = {
|
||||
hostName = "cloudnix";
|
||||
nameservers = ["8.8.8.8"];
|
||||
firewall.enable = true;
|
||||
};
|
||||
|
||||
services.libinput.enable = true;
|
||||
}
|
|
@ -0,0 +1,41 @@
|
|||
# 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, ... }:
|
||||
|
||||
{
|
||||
imports =
|
||||
[ (modulesPath + "/profiles/qemu-guest.nix")
|
||||
];
|
||||
|
||||
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/e12d0dfd-9753-44d4-b65f-dc5549db3edf";
|
||||
fsType = "ext4";
|
||||
};
|
||||
|
||||
fileSystems."/boot" =
|
||||
{ device = "/dev/disk/by-uuid/c29f698d-eb89-4618-be8b-046b4907aed8";
|
||||
fsType = "ext4";
|
||||
};
|
||||
|
||||
swapDevices = [
|
||||
{
|
||||
device = "/.swapfile";
|
||||
size = 2 * 1024;
|
||||
}
|
||||
];
|
||||
|
||||
# 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
|
||||
# still possible to use this option, but it's recommended to use it in conjunction
|
||||
# with explicit per-interface declarations with `networking.interfaces.<interface>.useDHCP`.
|
||||
networking.useDHCP = lib.mkDefault true;
|
||||
# networking.interfaces.enp1s0.useDHCP = lib.mkDefault true;
|
||||
|
||||
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
|
||||
}
|
Loading…
Reference in New Issue