-
Notifications
You must be signed in to change notification settings - Fork 0
Vesuvius dnsmasq netboot #6
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from all commits
6e757d8
3fcba78
10ebb8f
eb25e22
56bf0e8
7128fff
4dc169a
194b9cb
3845c0b
3a8573f
6041f78
95545c0
5364e33
946ab79
86cf66c
4e48b2b
ba8cc98
77c1bbc
a3db521
790c86e
d220159
a0c8787
946dbc4
59c9833
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,16 +1,18 @@ | ||
| # keep-sorted start | ||
| [ | ||
| "backbiter" | ||
| "damocles" | ||
| "durendal" | ||
| "eyelander" | ||
| "excalibur" | ||
| "gram" | ||
| "gryffindor" | ||
| "kusanagi" | ||
| "narsil" | ||
| "oathbringer" | ||
| "riptide" | ||
| "sting" | ||
| ] | ||
| # keep-sorted end | ||
| { | ||
| # TODO: prospit's a special case and won't remain here forever | ||
| "d8:9e:f3:3e:f9:41" = "prospit"; | ||
|
|
||
| "40:f2:e9:c6:65:5f" = "backbiter"; | ||
| "40:f2:e9:c6:69:43" = "damocles"; | ||
| "40:f2:e9:c6:69:67" = "durendal"; | ||
| "40:f2:e9:c6:74:59" = "eyelander"; | ||
| "40:f2:e9:c6:75:f1" = "excalibur"; | ||
| "40:f2:e9:c6:76:21" = "gram"; | ||
|
|
||
| "unassigned-0" = "gryffindor"; | ||
| "unassigned-1" = "kusanagi"; | ||
| "unassigned-2" = "narsil"; | ||
| "unassigned-3" = "oathbringer"; | ||
| "unassigned-4" = "riptide"; | ||
| "unassigned-5" = "sting"; | ||
| } |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,23 @@ | ||
| { modulesPath, pkgs, lib, ... }: { | ||
| imports = [ | ||
| ./eno1-imm-disable.nix | ||
| (import ../common/k3s.nix {}) | ||
| ../common/nix.nix | ||
| ../common/sshd.nix | ||
| ../common/users-local.nix | ||
| (modulesPath + "/installer/netboot/netboot-minimal.nix") | ||
| ]; | ||
|
|
||
| # Get hostname from DHCP request | ||
| networking.hostName = ""; | ||
|
|
||
| # when making the ISO, the initialHashedPassword is set to "" for some reason | ||
| # we already set a hashed password, so null this | ||
| users.users.root.initialHashedPassword = lib.mkForce null; | ||
|
|
||
| environment.systemPackages = [ | ||
| pkgs.fastfetch | ||
| ]; | ||
|
|
||
| system.stateVersion = "25.11"; | ||
| } |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,30 @@ | ||
| { pkgs, lib, ... }: | ||
| let | ||
| eno1-imm-disable = pkgs.writeShellApplication { | ||
| name = "eno1-imm-disable"; | ||
|
|
||
| runtimeInputs = [ | ||
| pkgs.iproute2 | ||
| ]; | ||
|
|
||
| text = '' | ||
| if grep "Lenovo NeXtScale nx360 M5" /sys/devices/virtual/dmi/id/product_name; then | ||
| ip link set down eno1 | ||
| fi | ||
| ''; | ||
| }; | ||
| in { | ||
| systemd.services."eno1-imm-disable" = { | ||
| wantedBy = [ "multi-user.target" ]; | ||
| after = [ "network.target" ]; | ||
|
|
||
| unitConfig = { | ||
| Description = "Disable eno1 on Lenovo NeXtScale nodes to avoid issues with using the imm interface"; | ||
| }; | ||
|
|
||
| serviceConfig = { | ||
| Type = "oneshot"; | ||
| ExecStart = "${lib.getExe eno1-imm-disable}"; | ||
| }; | ||
| }; | ||
| } |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,17 @@ | ||
| { role ? "agent", clusterInit ? false }: { | ||
| networking.firewall.allowedTCPPorts = [ | ||
| 6443 | ||
| ]; | ||
|
|
||
| networking.firewall.allowedUDPPorts = [ | ||
| 8472 | ||
| ]; | ||
|
|
||
| services.k3s = { | ||
| inherit role clusterInit; | ||
|
|
||
| enable = true; | ||
| token = "garbage secret"; | ||
| serverAddr = "https://10.98.3.2:6443"; | ||
| }; | ||
| } | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,20 @@ | ||
| { config, pkgs, ... }: | ||
| let | ||
| mkNfs = {path, options ? [ "vers=4.0" "soft" "nodev" "nosuid" ]}: { | ||
| device = "${path}"; | ||
| fsType = "nfs"; | ||
| inherit options; | ||
| }; | ||
| in | ||
| { | ||
| environment.systemPackages = [ pkgs.nfs-utils ]; | ||
|
|
||
| fileSystems."/nfs/cistern/share" = mkNfs {path = "10.98.0.7:/cistern/nfs/share";}; | ||
| fileSystems."/nfs/cistern/files" = mkNfs {path = "10.98.0.7:/cistern/nfs/files";}; | ||
| fileSystems."/nfs/cistern/home" = mkNfs { | ||
| path = "10.98.0.7:/cistern/nfs/home"; | ||
| options = [ "vers=4.0" "soft" "nodev" "nosuid" ]; | ||
| }; | ||
| fileSystems."/nfs/cistern/libvirt" = mkNfs {path = "10.98.0.7:/cistern/nfs/libvirt";}; | ||
| fileSystems."/nfs/cistern/docker/data" = mkNfs {path = "10.98.0.7:/cistern/nfs/docker/data";}; | ||
| } |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -2,9 +2,16 @@ | |
| { | ||
| imports = [ | ||
| ./hardware-configuration.nix | ||
| (import ../common/k3s.nix { role = "server"; clusterInit = true; }) | ||
| ./nix.nix | ||
| ./zfs.nix | ||
| ./ipa.nix | ||
| ./netboot.nix | ||
|
|
||
| ../common/nfs.nix | ||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Should we mount Dirtycow on Vesuvius? We're planning to migrate most things onto Bastille and Dirtycow will be moved to McBryde so the latency might not be very good. Also in that migration, the IP will change too (probably should use IPv6 addresses too so we're 21st century compliant. Dirtycow's shares are already setup for our IPv6 subnet).
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. it's so ipa users (which you should use!!!!!) have homedirs. also: why not?
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. We can mount Dirtycow for now. Since Acidburn will be moved to the cluster, the homedirs (and other things) need to be migrated to Vesuvius. |
||
| ../common/tz-locale.nix | ||
| ../common/users-local.nix | ||
| ../common/sshd.nix | ||
| ]; | ||
|
|
||
| boot.loader.systemd-boot.enable = true; | ||
|
|
@@ -15,44 +22,11 @@ | |
| networking.networkmanager.enable = true; | ||
| networking.networkmanager.unmanaged = [ "interface-name:enp1s0f1" ]; | ||
|
|
||
| time.timeZone = "America/New_York"; | ||
|
|
||
| i18n.defaultLocale = "en_US.UTF-8"; | ||
|
|
||
| i18n.extraLocaleSettings = { | ||
| LC_ADDRESS = "en_US.UTF-8"; | ||
| LC_IDENTIFICATION = "en_US.UTF-8"; | ||
| LC_MEASUREMENT = "en_US.UTF-8"; | ||
| LC_MONETARY = "en_US.UTF-8"; | ||
| LC_NAME = "en_US.UTF-8"; | ||
| LC_NUMERIC = "en_US.UTF-8"; | ||
| LC_PAPER = "en_US.UTF-8"; | ||
| LC_TELEPHONE = "en_US.UTF-8"; | ||
| LC_TIME = "en_US.UTF-8"; | ||
| }; | ||
|
|
||
| users.users.papatux = { | ||
| isNormalUser = true; | ||
| description = "papatux"; | ||
| extraGroups = [ "networkmanager" "wheel" ]; | ||
| openssh.authorizedKeys.keys = import ../../papatux-keys.nix; | ||
| }; | ||
|
|
||
| security.sudo.wheelNeedsPassword = false; | ||
|
|
||
| nixpkgs.config.allowUnfree = true; | ||
|
|
||
| environment.systemPackages = with pkgs; [ | ||
| neovim | ||
| ]; | ||
|
|
||
| services.openssh.enable = true; | ||
|
|
||
| # This value determines the NixOS release from which the default | ||
| # settings for stateful data, like file locations and database versions | ||
| # on your system were taken. It‘s perfectly fine and recommended to leave | ||
| # this value at the release version of the first install of this system. | ||
| # Before changing this value read the documentation for this option | ||
| # (e.g. man configuration.nix or on https://nixos.org/nixos/options.html). | ||
| system.stateVersion = "25.05"; # Did you read the comment? | ||
| } | ||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
use real secret
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could be added to the agenix secrets