Browse Source

Remove old hosts

main
Leonora Tindall 1 year ago
parent
commit
9c35d4da60
Signed by: nora GPG Key ID: 7A8B52EC67E09AAF
  1. 4
      README.md
  2. 109
      hosts/calembel/configuration.nix
  3. 36
      hosts/calembel/hardware-configuration.nix
  4. 12
      hosts/calembel/home.nix
  5. 103
      hosts/metis/configuration.nix
  6. 32
      hosts/metis/hardware-configuration.nix
  7. 12
      hosts/metis/home.nix
  8. 10
      ops/home/network.nix

4
README.md

@ -31,10 +31,10 @@ These files are "organized" as follows:
- `fragments/` contains small functions for configuring particular services or system aspects, like Syncthing
- `files/` contains files used by `home-manager` to deploy anything not covered by existing `home-manager` options.
- `hosts/` defines host-specific configurations for NixOS and `home-manager`.
- `calembel/` is my Thelio (thelio-r1)
- `felonyspork/` is the bastion/external server (Lenovo Tiny)
- `configuration.nix` is the core NixOS configuration file, copied from the installed system
- `hardware-configuration.nix` is the hardware config, imported in `configuration.nix`.
- `home.nix` is the `home-manager` config specifically for `calembel`.
- `home.nix` is the `home-manager` config specifically for `felonyspork`.
- `ops/` contains all the information needed to deploy using `morph`.
The import structure goes as follows:

109
hosts/calembel/configuration.nix

@ -1,109 +0,0 @@
# 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
../../common/fragments/avahi.nix
../../common/fragments/syncthing.nix
../../common/fragments/mullvad-vpn.nix
../../common/fragments/qbittorrent.nix
];
# Use the systemd-boot EFI boot loader.
boot.loader.systemd-boot.enable = true;
boot.loader.efi.canTouchEfiVariables = true;
networking.hostName = "calembel"; # Define your hostname.
networking.wireless.enable = false; # Enables wireless support via wpa_supplicant.
# Set your time zone.
time.timeZone = "America/Chicago";
# The global useDHCP flag is deprecated, therefore explicitly set to false here.
# Per-interface useDHCP will be mandatory in the future, so this generated config
# replicates the default behaviour.
networking.useDHCP = false;
networking.interfaces.enp9s0.useDHCP = true;
networking.interfaces.wlp7s0.useDHCP = false;
# Configure network proxy if necessary
# networking.proxy.default = "http://user:password@proxy:port/";
# networking.proxy.noProxy = "127.0.0.1,localhost,internal.domain";
# Select internationalisation properties.
# i18n.defaultLocale = "en_US.UTF-8";
# console = {
# font = "Lat2-Terminus16";
# keyMap = "us";
# };
# Enable the X11 windowing system.
services.xserver.enable = true;
# Enable the Plasma 5 Desktop Environment.
services.xserver.displayManager.sddm.enable = true;
services.xserver.desktopManager.plasma5.enable = true;
# Configure keymap in X11
services.xserver.layout = "us";
# services.xserver.xkbOptions = "eurosign:e";
# Enable CUPS to print documents.
services.printing.enable = true;
# Enable sound.
sound.enable = true;
hardware.pulseaudio.enable = true;
# Enable touchpad support (enabled default in most desktopManager).
services.xserver.libinput.enable = true;
# List packages installed in system profile. To search, run:
# $ nix search wget
environment.systemPackages = with pkgs; [
zsh
vim
wget
curl
];
# 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;
services.syncthing.configDir = "/home/nora/.config/syncthing";
# Enable Steam
programs.steam.enable = true;
# Open ports in the firewall.
# networking.firewall.allowedTCPPorts = [ ... ];
# networking.firewall.allowedUDPPorts = [ ... ];
# Or disable the firewall altogether.
# networking.firewall.enable = false;
# 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 = "21.11"; # Did you read the comment?
}

36
hosts/calembel/hardware-configuration.nix

@ -1,36 +0,0 @@
# 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 = [ "nvme" "xhci_pci" "ahci" "usb_storage" "usbhid" "sd_mod" ];
boot.initrd.kernelModules = [ ];
boot.kernelModules = [ "kvm-amd" ];
boot.extraModulePackages = [ ];
fileSystems."/" =
{ device = "/dev/disk/by-uuid/9a7c74c1-55c5-4561-bf56-da71c9ccbac5";
fsType = "ext4";
};
fileSystems."/boot" =
{ device = "/dev/disk/by-uuid/C080-BEE5";
fsType = "vfat";
};
fileSystems."/home" =
{ device = "/dev/disk/by-uuid/bd65772b-3c4e-40e0-9f6a-70cc939286cc";
fsType = "ext4";
};
swapDevices =
[ { device = "/dev/disk/by-uuid/e56eac1c-0bd9-46fa-8cb7-15f744a95169"; }
];
hardware.cpu.amd.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
}

12
hosts/calembel/home.nix

@ -1,12 +0,0 @@
{ pkgs, ...}:
{
imports = [
../../common/home_manager/common.nix
../../common/home_manager/fragments/desktop.nix
../../common/home_manager/fragments/terminal.nix
../../common/home_manager/fragments/graphical.nix
../../common/home_manager/fragments/communication.nix
../../common/home_manager/fragments/rust.nix
../../common/home_manager/fragments/python.nix
];
}

103
hosts/metis/configuration.nix

@ -1,103 +0,0 @@
# 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
../../common/fragments/avahi.nix
../../common/fragments/syncthing.nix
../../common/fragments/mullvad-vpn.nix
../../common/fragments/wireless.nix
../../common/fragments/laptop.nix
];
# Use the systemd-boot EFI boot loader.
boot.loader.systemd-boot.enable = true;
boot.loader.efi.canTouchEfiVariables = true;
networking.hostName = "metis"; # Define your hostname.
# Set your time zone.
time.timeZone = "America/Chicago";
# The global useDHCP flag is deprecated, therefore explicitly set to false here.
# Per-interface useDHCP will be mandatory in the future, so this generated config
# replicates the default behaviour.
networking.useDHCP = false;
networking.interfaces.enp0s31f6.useDHCP = true;
networking.interfaces.wlp3s0.useDHCP = true;
# Configure network proxy if necessary
# networking.proxy.default = "http://user:password@proxy:port/";
# networking.proxy.noProxy = "127.0.0.1,localhost,internal.domain";
# Select internationalisation properties.
# i18n.defaultLocale = "en_US.UTF-8";
# console = {
# font = "Lat2-Terminus16";
# keyMap = "us";
# };
# Enable the X11 windowing system.
services.xserver.enable = true;
# Enable the Plasma 5 Desktop Environment.
services.xserver.displayManager.sddm.enable = true;
services.xserver.desktopManager.plasma5.enable = true;
# Configure keymap in X11
services.xserver.layout = "us";
services.xserver.xkbOptions = "caps:swapescape";
# Enable CUPS to print documents.
services.printing.enable = true;
# Enable sound.
sound.enable = true;
hardware.pulseaudio.enable = true;
# Enable touchpad support (enabled default in most desktopManager).
services.xserver.libinput.enable = true;
# List packages installed in system profile. To search, run:
# $ nix search wget
environment.systemPackages = with pkgs; [
zsh
vim # Do not forget to add an editor to edit configuration.nix! The Nano editor is also installed by default.
wget
curl
];
# 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;
# 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 = "21.11"; # Did you read the comment?
}

32
hosts/metis/hardware-configuration.nix

@ -1,32 +0,0 @@
# 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" "nvme" "usb_storage" "sd_mod" ];
boot.initrd.kernelModules = [ ];
boot.kernelModules = [ "kvm-intel" ];
boot.extraModulePackages = [ ];
fileSystems."/" =
{ device = "/dev/disk/by-uuid/19e7af18-d5e3-421b-895d-f15c563d0b3c";
fsType = "ext4";
};
fileSystems."/boot" =
{ device = "/dev/disk/by-uuid/04A7-CDA4";
fsType = "vfat";
};
swapDevices =
[ { device = "/dev/disk/by-uuid/aa6bb311-7490-44da-9a3d-83684ca43a42"; }
];
powerManagement.cpuFreqGovernor = lib.mkDefault "powersave";
hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
}

12
hosts/metis/home.nix

@ -1,12 +0,0 @@
{ pkgs, ...}:
{
imports = [
../../common/home_manager/common.nix
../../common/home_manager/fragments/desktop.nix
../../common/home_manager/fragments/terminal.nix
../../common/home_manager/fragments/graphical.nix
../../common/home_manager/fragments/communication.nix
../../common/home_manager/fragments/rust.nix
../../common/home_manager/fragments/python.nix
];
}

10
ops/home/network.nix

@ -3,16 +3,6 @@
description = "Home network";
};
"calembel" = { config, pkgs, lib, ... }: {
imports = [
../../common/default.nix
../../hosts/calembel/configuration.nix
../../hosts/calembel/home.nix
];
deployment.targetUser = "root";
deployment.targetHost = "calembel.local";
};
"felonyspork" = { config, pkgs, lib, ... }: {
imports = [
../../common/default.nix

Loading…
Cancel
Save