[nidaros] Add initial Nidaros homelab config
This commit is contained in:
@@ -90,6 +90,13 @@
|
|||||||
address.private = common.localIpAddr 231;
|
address.private = common.localIpAddr 231;
|
||||||
address.tailnet = common.tailnetAddr "admin";
|
address.tailnet = common.tailnetAddr "admin";
|
||||||
}
|
}
|
||||||
|
{
|
||||||
|
hostName = "nidaros";
|
||||||
|
wayland.enable = false;
|
||||||
|
ssh.publicKey = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIMKhK/EDIDf0htrJuBogNOUSuCiOcyc/b6UuBW/i+c29";
|
||||||
|
address.private = common.localIpAddr 228;
|
||||||
|
}
|
||||||
|
|
||||||
];
|
];
|
||||||
|
|
||||||
defaultAttrs = {
|
defaultAttrs = {
|
||||||
|
69
hosts/nidaros/configuration.nix
Normal file
69
hosts/nidaros/configuration.nix
Normal file
@@ -0,0 +1,69 @@
|
|||||||
|
# Edit this configuration file to define what should be installed on
|
||||||
|
# your system. Help is available in the configuration.nix(5) man page
|
||||||
|
# and in the NixOS manual (accessible by running ‘nixos-help’).
|
||||||
|
|
||||||
|
{
|
||||||
|
# Bootloader.
|
||||||
|
boot.loader.systemd-boot.enable = true;
|
||||||
|
boot.loader.efi.canTouchEfiVariables = true;
|
||||||
|
|
||||||
|
# networking.wireless.enable = true; # Enables wireless support via wpa_supplicant.
|
||||||
|
|
||||||
|
# Configure network proxy if necessary
|
||||||
|
# networking.proxy.default = "http://user:password@proxy:port/";
|
||||||
|
# networking.proxy.noProxy = "127.0.0.1,localhost,internal.domain";
|
||||||
|
|
||||||
|
# Enable networking
|
||||||
|
networking.networkmanager.enable = true;
|
||||||
|
|
||||||
|
# Set your time zone.
|
||||||
|
time.timeZone = "Europe/Oslo";
|
||||||
|
|
||||||
|
# Select internationalisation properties.
|
||||||
|
i18n.defaultLocale = "en_GB.UTF-8";
|
||||||
|
|
||||||
|
i18n.extraLocaleSettings = {
|
||||||
|
LC_ADDRESS = "nb_NO.UTF-8";
|
||||||
|
LC_IDENTIFICATION = "nb_NO.UTF-8";
|
||||||
|
LC_MEASUREMENT = "nb_NO.UTF-8";
|
||||||
|
LC_MONETARY = "nb_NO.UTF-8";
|
||||||
|
LC_NAME = "nb_NO.UTF-8";
|
||||||
|
LC_NUMERIC = "nb_NO.UTF-8";
|
||||||
|
LC_PAPER = "nb_NO.UTF-8";
|
||||||
|
LC_TELEPHONE = "nb_NO.UTF-8";
|
||||||
|
LC_TIME = "nb_NO.UTF-8";
|
||||||
|
};
|
||||||
|
|
||||||
|
# Configure keymap in X11
|
||||||
|
services.xserver.xkb = {
|
||||||
|
layout = "gb";
|
||||||
|
variant = "";
|
||||||
|
};
|
||||||
|
|
||||||
|
# Configure console keymap
|
||||||
|
console.keyMap = "uk";
|
||||||
|
|
||||||
|
# Define a user account. Don't forget to set a password with ‘passwd’.
|
||||||
|
# Enable automatic login for the user.
|
||||||
|
services.getty.autologinUser = "martin";
|
||||||
|
|
||||||
|
# Some programs need SUID wrappers, can be configured further or are
|
||||||
|
# started in user sessions.
|
||||||
|
# programs.mtr.enable = true;
|
||||||
|
# programs.gnupg.agent = {
|
||||||
|
# enable = true;
|
||||||
|
# enableSSHSupport = true;
|
||||||
|
# };
|
||||||
|
|
||||||
|
# List services that you want to enable:
|
||||||
|
|
||||||
|
# Enable the OpenSSH daemon.
|
||||||
|
services.openssh.enable = true;
|
||||||
|
|
||||||
|
# Open ports in the firewall.
|
||||||
|
# networking.firewall.allowedTCPPorts = [ ... ];
|
||||||
|
# networking.firewall.allowedUDPPorts = [ ... ];
|
||||||
|
# Or disable the firewall altogether.
|
||||||
|
networking.firewall.enable = false;
|
||||||
|
|
||||||
|
}
|
13
hosts/nidaros/default.nix
Normal file
13
hosts/nidaros/default.nix
Normal file
@@ -0,0 +1,13 @@
|
|||||||
|
{ lib, systemConfig, ... }:
|
||||||
|
|
||||||
|
{
|
||||||
|
imports = with lib.custom; [
|
||||||
|
(relativeToBase "modules")
|
||||||
|
./configuration.nix
|
||||||
|
./hardware.nix
|
||||||
|
];
|
||||||
|
|
||||||
|
# Temp fix to not override password until sops have been implemented
|
||||||
|
users.users.${systemConfig.username}.hashedPasswordFile = lib.mkForce null;
|
||||||
|
|
||||||
|
}
|
55
hosts/nidaros/hardware.nix
Normal file
55
hosts/nidaros/hardware.nix
Normal file
@@ -0,0 +1,55 @@
|
|||||||
|
# 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,
|
||||||
|
modulesPath,
|
||||||
|
...
|
||||||
|
}:
|
||||||
|
|
||||||
|
{
|
||||||
|
imports = [
|
||||||
|
(modulesPath + "/installer/scan/not-detected.nix")
|
||||||
|
];
|
||||||
|
|
||||||
|
boot.initrd.availableKernelModules = [
|
||||||
|
"xhci_pci"
|
||||||
|
"ahci"
|
||||||
|
"nvme"
|
||||||
|
"usb_storage"
|
||||||
|
"usbhid"
|
||||||
|
"sd_mod"
|
||||||
|
];
|
||||||
|
boot.initrd.kernelModules = [ ];
|
||||||
|
boot.kernelModules = [ "kvm-intel" ];
|
||||||
|
boot.extraModulePackages = [ ];
|
||||||
|
|
||||||
|
fileSystems."/" = {
|
||||||
|
device = "/dev/disk/by-uuid/cc66d953-c0b5-449d-8790-1dd113661da3";
|
||||||
|
fsType = "ext4";
|
||||||
|
};
|
||||||
|
|
||||||
|
fileSystems."/boot" = {
|
||||||
|
device = "/dev/disk/by-uuid/E198-D3D4";
|
||||||
|
fsType = "vfat";
|
||||||
|
options = [
|
||||||
|
"fmask=0077"
|
||||||
|
"dmask=0077"
|
||||||
|
];
|
||||||
|
};
|
||||||
|
|
||||||
|
swapDevices = [
|
||||||
|
{ device = "/dev/disk/by-uuid/9631df4c-632f-49ec-8c97-bb66012fa26a"; }
|
||||||
|
];
|
||||||
|
|
||||||
|
# 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.eno1.useDHCP = lib.mkDefault true;
|
||||||
|
|
||||||
|
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
|
||||||
|
hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
|
||||||
|
}
|
9
hosts/nidaros/home-manager/default.nix
Normal file
9
hosts/nidaros/home-manager/default.nix
Normal file
@@ -0,0 +1,9 @@
|
|||||||
|
{ lib, ... }:
|
||||||
|
|
||||||
|
{
|
||||||
|
imports = with lib.custom; [
|
||||||
|
(relativeToBase "home-manager")
|
||||||
|
];
|
||||||
|
home.stateVersion = "25.05";
|
||||||
|
programs.git.signing.key = "E4E751ECB68CD7BF";
|
||||||
|
}
|
Reference in New Issue
Block a user