Browse Source

Add SemaphoreBravo host

main
Leonora Tindall 10 months ago
parent
commit
2e2da7eac5
  1. 75
      hosts/semaphorebravo/configuration.nix
  2. 40
      hosts/semaphorebravo/hardware-configuration.nix
  3. 8
      hosts/semaphorebravo/home.nix
  4. 8
      ops/home/network.nix

75
hosts/semaphorebravo/configuration.nix

@ -0,0 +1,75 @@
# 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’).
{ config, pkgs, ... }:
{
imports =
[ # Include the results of the hardware scan.
./hardware-configuration.nix
./home.nix
../../common/common.nix
../../common/fragments/avahi.nix
#../../common/fragments/unifi.nix
../../common/fragments/prometheus_exporters.nix
../../common/fragments/mosh.nix
];
# Bootloader.
boot.loader.systemd-boot.enable = true;
boot.loader.efi.canTouchEfiVariables = true;
boot.loader.efi.efiSysMountPoint = "/boot/efi";
networking.hostName = "semaphorebravo"; # Define your hostname.
networking.wireless.enable = false; # Enables wireless support via wpa_supplicant.
# Enable networking
networking.networkmanager.enable = true;
# Set your time zone.
time.timeZone = "America/Chicago";
# Select internationalisation properties.
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";
};
# Configure keymap in X11
services.xserver = {
layout = "us";
xkbVariant = "";
};
# Unique user account.
users.users.sebbi = {
isNormalUser = true;
description = "Semaphore Bravo";
extraGroups = [ "networkmanager" "wheel" ];
packages = with pkgs; [];
};
# List services that you want to enable:
# Enable the OpenSSH daemon.
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 = "22.11"; # Did you read the comment?
}

40
hosts/semaphorebravo/hardware-configuration.nix

@ -0,0 +1,40 @@
# 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 + "/installer/scan/not-detected.nix")
];
boot.initrd.availableKernelModules = [ "xhci_pci" "ahci" "usbhid" "usb_storage" "sd_mod" ];
boot.initrd.kernelModules = [ ];
boot.kernelModules = [ "kvm-intel" ];
boot.extraModulePackages = [ ];
fileSystems."/" =
{ device = "/dev/disk/by-uuid/35505246-f786-4c06-a65c-7bb3d6b35679";
fsType = "ext4";
};
fileSystems."/boot/efi" =
{ device = "/dev/disk/by-uuid/D60C-714F";
fsType = "vfat";
};
swapDevices =
[ { device = "/dev/disk/by-uuid/59675d27-08c3-4b72-a09e-d2568ba6becc"; }
];
# 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.enp0s31f6.useDHCP = lib.mkDefault true;
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
powerManagement.cpuFreqGovernor = lib.mkDefault "powersave";
hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
}

8
hosts/semaphorebravo/home.nix

@ -0,0 +1,8 @@
{ pkgs, ...}:
{
imports = [
../../common/home_manager/common.nix
../../common/home_manager/fragments/terminal.nix
../../common/fragments/iperf.nix
];
}

8
ops/home/network.nix

@ -24,4 +24,12 @@
deployment.targetUser = "root";
deployment.targetHost = "crimespoon";
};
"semaphorebravo" = { config, pkgs, lib, ... }: {
imports = [
../../common/default.nix
../../hosts/semaphorebravo/configuration.nix
];
deployment.targetUser = "root";
deployment.targetHost = "192.168.88.43";
};
}

Loading…
Cancel
Save