chore: hacking
This commit is contained in:
parent
0a9f9f28e3
commit
57d59e5f69
8 changed files with 20 additions and 123 deletions
|
@ -7,103 +7,26 @@
|
||||||
, ...
|
, ...
|
||||||
}: {
|
}: {
|
||||||
imports = [
|
imports = [
|
||||||
# Host-specific
|
|
||||||
./hardware-configuration.nix
|
|
||||||
|
|
||||||
# Common imports
|
|
||||||
../common/nixos/users/truxnell
|
|
||||||
../common/optional/fish.nix
|
../common/optional/fish.nix
|
||||||
../common/optional/monitoring.nix
|
../common/optional/monitoring.nix
|
||||||
../common/optional/reboot-required.nix
|
../common/optional/reboot-required.nix
|
||||||
../common/optional/sops-nix.nix
|
|
||||||
|
|
||||||
../common/optional/dnscrypt-proxy2.nix
|
../common/optional/dnscrypt-proxy2.nix
|
||||||
../common/optional/cloudflare-dyndns.nix
|
../common/optional/cloudflare-dyndns.nix
|
||||||
../common/optional/maddy.nix
|
../common/optional/maddy.nix
|
||||||
];
|
];
|
||||||
|
|
||||||
# Use the extlinux boot loader. (NixOS wants to enable GRUB by default)
|
|
||||||
boot.loader.grub.enable = false;
|
|
||||||
# Enables the generation of /boot/extlinux/extlinux.conf
|
|
||||||
boot.loader.generic-extlinux-compatible.enable = true;
|
|
||||||
|
|
||||||
networking.hostName = "dns01"; # Define your hostname.
|
networking.hostName = "dns01"; # Define your hostname.
|
||||||
|
networking.useDHCP = lib.mkDefault true;
|
||||||
|
|
||||||
console.enable = false;
|
fileSystems."/" =
|
||||||
environment.systemPackages = with pkgs; [
|
{
|
||||||
libraspberrypi
|
device = "/dev/disk/by-uuid/44444444-4444-4444-8888-888888888888";
|
||||||
raspberrypi-eeprom
|
fsType = "ext4";
|
||||||
];
|
};
|
||||||
|
|
||||||
# Pick only one of the below networking options.
|
swapDevices = [ ];
|
||||||
# networking.wireless.enable = true; # Enables wireless support via wpa_supplicant.
|
|
||||||
# networking.networkmanager.enable = true; # Easiest to use and most distros use this by default.
|
|
||||||
|
|
||||||
# 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";
|
|
||||||
# useXkbConfig = true; # use xkb.options in tty.
|
|
||||||
# };
|
|
||||||
|
|
||||||
# Enable the X11 windowing system.
|
|
||||||
# services.xserver.enable = true;
|
|
||||||
|
|
||||||
# Configure keymap in X11
|
|
||||||
# services.xserver.xkb.layout = "us";
|
|
||||||
# services.xserver.xkb.options = "eurosign:e,caps:escape";
|
|
||||||
|
|
||||||
# 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;
|
|
||||||
|
|
||||||
# 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:
|
|
||||||
|
|
||||||
# Open ports in the firewall.
|
|
||||||
# networking.firewall.allowedTCPPorts = [ ... ];
|
|
||||||
# networking.firewall.allowedUDPPorts = [ ... ];
|
|
||||||
# Or disable the firewall altogether.
|
|
||||||
# networking.firewall.enable = false;
|
|
||||||
|
|
||||||
# Copy the NixOS configuration file and link it from the resulting system
|
|
||||||
# (/run/current-system/configuration.nix). This is useful in case you
|
|
||||||
# accidentally delete configuration.nix.
|
|
||||||
# system.copySystemConfiguration = true;
|
|
||||||
|
|
||||||
# This option defines the first version of NixOS you have installed on this particular machine,
|
|
||||||
# and is used to maintain compatibility with application data (e.g. databases) created on older NixOS versions.
|
|
||||||
#
|
|
||||||
# Most users should NEVER change this value after the initial install, for any reason,
|
|
||||||
# even if you've upgraded your system to a new NixOS release.
|
|
||||||
#
|
|
||||||
# This value does NOT affect the Nixpkgs version your packages and OS are pulled from,
|
|
||||||
# so changing it will NOT upgrade your system.
|
|
||||||
#
|
|
||||||
# This value being lower than the current NixOS release does NOT mean your system is
|
|
||||||
# out of date, out of support, or vulnerable.
|
|
||||||
#
|
|
||||||
# Do NOT change this value unless you have manually inspected all the changes it would make to your configuration,
|
|
||||||
# and migrated your data accordingly.
|
|
||||||
#
|
|
||||||
# For more information, see `man configuration.nix` or https://nixos.org/manual/nixos/stable/options#opt-system.stateVersion .
|
|
||||||
system.stateVersion = "23.11"; # Did you read the comment?
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -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" "usb_storage" ];
|
|
||||||
boot.initrd.kernelModules = [ ];
|
|
||||||
boot.kernelModules = [ ];
|
|
||||||
boot.extraModulePackages = [ ];
|
|
||||||
|
|
||||||
fileSystems."/" =
|
|
||||||
{ device = "/dev/disk/by-uuid/44444444-4444-4444-8888-888888888888";
|
|
||||||
fsType = "ext4";
|
|
||||||
};
|
|
||||||
|
|
||||||
swapDevices = [ ];
|
|
||||||
|
|
||||||
# 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.end0.useDHCP = lib.mkDefault true;
|
|
||||||
# networking.interfaces.wlan0.useDHCP = lib.mkDefault true;
|
|
||||||
|
|
||||||
nixpkgs.hostPlatform = lib.mkDefault "aarch64-linux";
|
|
||||||
}
|
|
|
@ -3,5 +3,7 @@
|
||||||
./openssh.nix
|
./openssh.nix
|
||||||
./time.nix
|
./time.nix
|
||||||
./security.nix
|
./security.nix
|
||||||
|
./systempackages.nix
|
||||||
|
./nix.nix
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
|
@ -30,7 +30,7 @@ in
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
nix = {
|
config.nix = {
|
||||||
|
|
||||||
optimise.automatic = cfg.autoOptimiseStore;
|
optimise.automatic = cfg.autoOptimiseStore;
|
||||||
|
|
||||||
|
|
|
@ -8,10 +8,10 @@ let
|
||||||
cfg = config.mySystem.system;
|
cfg = config.mySystem.system;
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
options.mySystem.system.packages = {
|
options.mySystem.system = {
|
||||||
autoOptimiseStore = mkOption
|
packages = mkOption
|
||||||
{
|
{
|
||||||
type = lib.types.list;
|
type = with types; listOf package;
|
||||||
description = "List of system level package installs";
|
description = "List of system level package installs";
|
||||||
default = [ ];
|
default = [ ];
|
||||||
};
|
};
|
||||||
|
@ -21,6 +21,6 @@ in
|
||||||
# This is NixOS so lets keep this liiight?
|
# This is NixOS so lets keep this liiight?
|
||||||
# Ideally i'd keep most of it to home-manager user only stuff
|
# Ideally i'd keep most of it to home-manager user only stuff
|
||||||
# and keep server role as light as possible
|
# and keep server role as light as possible
|
||||||
config.environment.system.packages = cfg.packages;
|
config.environment.systemPackages = cfg.packages;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -25,6 +25,7 @@ with lib;
|
||||||
# basics for all devices
|
# basics for all devices
|
||||||
time.timeZone = "Australia/Melbourne";
|
time.timeZone = "Australia/Melbourne";
|
||||||
security.increaseWheelLoginLimits = true;
|
security.increaseWheelLoginLimits = true;
|
||||||
|
system.packages = [ pkgs.bat ];
|
||||||
};
|
};
|
||||||
|
|
||||||
i18n = {
|
i18n = {
|
||||||
|
|
|
@ -3,9 +3,11 @@
|
||||||
with lib;
|
with lib;
|
||||||
{
|
{
|
||||||
boot = {
|
boot = {
|
||||||
|
|
||||||
initrd.availableKernelModules = [ "nvme" "xhci_pci" "ahci" "usbhid" "usb_storage" "sd_mod" ];
|
initrd.availableKernelModules = [ "nvme" "xhci_pci" "ahci" "usbhid" "usb_storage" "sd_mod" ];
|
||||||
kernelModules = [ "kvm-amd" ];
|
kernelModules = [ "kvm-amd" ];
|
||||||
extraModulePackages = [ ];
|
extraModulePackages = [ ];
|
||||||
|
|
||||||
loader = {
|
loader = {
|
||||||
systemd-boot.enable = true;
|
systemd-boot.enable = true;
|
||||||
efi.canTouchEfiVariables = true;
|
efi.canTouchEfiVariables = true;
|
||||||
|
|
|
@ -5,9 +5,10 @@ with lib;
|
||||||
boot = {
|
boot = {
|
||||||
|
|
||||||
initrd.availableKernelModules = [ "nvme" "xhci_pci" "usbhid" "usb_storage" "sd_mod" ];
|
initrd.availableKernelModules = [ "nvme" "xhci_pci" "usbhid" "usb_storage" "sd_mod" ];
|
||||||
|
initrd.kernelModules = [ "amdgpu" ];
|
||||||
kernelModules = [ "kvm-amd" ];
|
kernelModules = [ "kvm-amd" ];
|
||||||
extraModulePackages = [ ];
|
extraModulePackages = [ ];
|
||||||
initrd.kernelModules = [ "amdgpu" ];
|
|
||||||
loader = {
|
loader = {
|
||||||
systemd-boot.enable = true;
|
systemd-boot.enable = true;
|
||||||
efi.canTouchEfiVariables = true;
|
efi.canTouchEfiVariables = true;
|
||||||
|
|
Reference in a new issue