update test system config
This commit is contained in:
parent
67c2250833
commit
7e3457a724
8 changed files with 117 additions and 43 deletions
|
@ -1,7 +1,7 @@
|
|||
{ flake }:
|
||||
let
|
||||
nixpkgs = flake.inputs.nixpkgs;
|
||||
|
||||
|
||||
# utility function to create a new nixos configuration
|
||||
# call like `mkSystem "x86_64-linux" "<hostname>.eh22.intern"`
|
||||
mkSystem =
|
||||
|
@ -13,6 +13,7 @@ let
|
|||
flake.inputs.home-manager.nixosModules.home-manager
|
||||
flake.inputs.sops-nix.nixosModules.default
|
||||
flake.inputs.lix.nixosModules.lixFromNixpkgs
|
||||
flake.inputs.disko.nixosModules.default
|
||||
|
||||
../modules/base_system.nix
|
||||
../modules/user_account.nix
|
||||
|
@ -36,6 +37,9 @@ let
|
|||
};
|
||||
in
|
||||
{
|
||||
# exposed hosts at myroot
|
||||
# prod hosts
|
||||
|
||||
# misc hosts
|
||||
"test.eh22.intern" = mkSystem "x86_64-linux" "test.eh22.intern";
|
||||
"installer" = mkSystem "x86_64-linux" "installer";
|
||||
}
|
||||
|
|
32
systems/installer.nix
Normal file
32
systems/installer.nix
Normal file
|
@ -0,0 +1,32 @@
|
|||
|
||||
{
|
||||
config,
|
||||
modulesPath,
|
||||
lib,
|
||||
pkgs,
|
||||
...
|
||||
}:
|
||||
{
|
||||
imports = [
|
||||
(modulesPath + "/installer/cd-dvd/installation-cd-minimal.nix")
|
||||
];
|
||||
|
||||
networking.hostName = lib.mkForce "eh22-nixos-installer";
|
||||
networking.wireless.enable = false;
|
||||
system.installer.channel.enable = true;
|
||||
environment.systemPackages = with pkgs; [
|
||||
disko
|
||||
];
|
||||
|
||||
# configure our own user account in the installer
|
||||
services.getty.autologinUser = lib.mkForce "noc";
|
||||
|
||||
# conflict resolutions
|
||||
services.openssh.settings.PermitRootLogin = lib.mkForce "no";
|
||||
boot.initrd.systemd.enable = lib.mkForce false;
|
||||
boot.loader.grub.enable = lib.mkForce false;
|
||||
|
||||
# this is only okay because the installer does not have any persistence so no data can be in an old/incompatible format
|
||||
system.stateVersion = config.system.nixos.release;
|
||||
home-manager.users.noc.home.stateVersion = config.system.stateVersion;
|
||||
}
|
|
@ -4,45 +4,8 @@
|
|||
{
|
||||
imports = [ ];
|
||||
|
||||
# boot config
|
||||
fileSystems = {
|
||||
"/boot" = {
|
||||
device = "/dev/disk/by-uuid/94A7-6995";
|
||||
fsType = "vfat";
|
||||
options = [
|
||||
"fmask=0077"
|
||||
"dmask=0077"
|
||||
];
|
||||
};
|
||||
"/" = {
|
||||
device = "/dev/disk/by-uuid/4e0b7ea5-8c74-478f-a4e3-ddc5691e4065";
|
||||
fsType = "ext4";
|
||||
};
|
||||
"/srv/data/k8s" = {
|
||||
device = "10.0.10.14:/srv/data/k8s";
|
||||
fsType = "nfs";
|
||||
options = [
|
||||
"defaults"
|
||||
"_netdev"
|
||||
];
|
||||
};
|
||||
};
|
||||
|
||||
# networking config
|
||||
networking.useDHCP = false;
|
||||
systemd.network = {
|
||||
enable = true;
|
||||
networks.enp1s0 = {
|
||||
matchConfig = {
|
||||
Type = "ether";
|
||||
MACAddress = "52:54:00:e6:1f:51";
|
||||
};
|
||||
networkConfig = {
|
||||
IPv6AcceptRA = false;
|
||||
};
|
||||
DHCP = "yes";
|
||||
};
|
||||
};
|
||||
networking.useDHCP = true;
|
||||
|
||||
# DO NOT CHANGE
|
||||
# this defines the first version of NixOS that was installed on the machine so that programs with non-migratable data files are kept compatible
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue