aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLinnea Gräf <nea@nea.moe>2025-04-14 00:34:23 +0200
committerLinnea Gräf <nea@nea.moe>2025-04-14 00:34:23 +0200
commit1f87077a48e9e9874101248376c8a3424073d1f7 (patch)
tree535885940228521e4d62f3156ef004f6f44b5ca4
parent0fd15c012d5d0f7ac9bdb0aa48cb488ded6b8aa2 (diff)
downloadnix-infra-1f87077a48e9e9874101248376c8a3424073d1f7.tar.gz
nix-infra-1f87077a48e9e9874101248376c8a3424073d1f7.tar.bz2
nix-infra-1f87077a48e9e9874101248376c8a3424073d1f7.zip
Add hadante
-rw-r--r--flake.nix4
-rw-r--r--srv/hadante/configuration.nix135
-rw-r--r--srv/hadante/flake.nix13
-rw-r--r--srv/hadante/hardware-configuration.nix70
4 files changed, 222 insertions, 0 deletions
diff --git a/flake.nix b/flake.nix
index b6f8e92..10b6a27 100644
--- a/flake.nix
+++ b/flake.nix
@@ -21,6 +21,10 @@
let
osConfig = {
nixosConfigurations = {
+ hadante = nixpkgs.lib.nixosSystem {
+ system = "x86_64-linux";
+ modules = [ ./srv/hadante/configuration.nix ];
+ };
alpha-site = nixpkgs.lib.nixosSystem {
system = "aarch64-linux";
modules = [
diff --git a/srv/hadante/configuration.nix b/srv/hadante/configuration.nix
new file mode 100644
index 0000000..a7a9fec
--- /dev/null
+++ b/srv/hadante/configuration.nix
@@ -0,0 +1,135 @@
+# 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
+ ];
+
+ # Bootloader.
+ boot.loader.systemd-boot.enable = true;
+ boot.loader.efi.canTouchEfiVariables = true;
+
+ networking.hostName = "hadante"; # Define your hostname.
+ # networking.wireless.enable = true; # Enables wireless support via wpa_supplicant.
+
+ # Use lesbian nix
+ nix.package = pkgs.lix;
+
+ # 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/Berlin";
+
+ # Select internationalisation properties.
+ i18n.defaultLocale = "en_US.UTF-8";
+
+ i18n.extraLocaleSettings = {
+ LC_ADDRESS = "de_DE.UTF-8";
+ LC_IDENTIFICATION = "de_DE.UTF-8";
+ LC_MEASUREMENT = "de_DE.UTF-8";
+ LC_MONETARY = "de_DE.UTF-8";
+ LC_NAME = "de_DE.UTF-8";
+ LC_NUMERIC = "de_DE.UTF-8";
+ LC_PAPER = "de_DE.UTF-8";
+ LC_TELEPHONE = "de_DE.UTF-8";
+ LC_TIME = "de_DE.UTF-8";
+ };
+
+ # Enable the X11 windowing system.
+ services.xserver.enable = true;
+
+ # Enable the GNOME Desktop Environment.
+ services.xserver.displayManager.gdm.enable = true;
+ services.xserver.desktopManager.gnome.enable = true;
+
+ # Configure keymap in X11
+ services.xserver.xkb = {
+ layout = "de";
+ variant = "";
+ };
+
+ # Configure console keymap
+ console.keyMap = "de";
+
+ # Enable CUPS to print documents.
+ services.printing.enable = true;
+
+ # Enable sound with pipewire.
+ hardware.pulseaudio.enable = false;
+ security.rtkit.enable = true;
+ services.pipewire = {
+ enable = true;
+ alsa.enable = true;
+ alsa.support32Bit = true;
+ pulse.enable = true;
+ # If you want to use JACK applications, uncomment this
+ #jack.enable = true;
+
+ # use the example session manager (no others are packaged yet so this is enabled by default,
+ # no need to redefine it in your config for now)
+ #media-session.enable = true;
+ };
+
+ # Enable touchpad support (enabled default in most desktopManager).
+ # services.xserver.libinput.enable = true;
+
+ # Define a user account. Don't forget to set a password with ‘passwd’.
+ users.users.nea = {
+ isNormalUser = true;
+ description = "Linnea Gräf";
+ extraGroups = [
+ "networkmanager"
+ "wheel"
+ ];
+ packages = with pkgs; [
+ # thunderbird
+ ];
+ };
+
+ # Enable automatic login for the user.
+ services.xserver.displayManager.autoLogin.enable = true;
+ services.xserver.displayManager.autoLogin.user = "nea";
+
+ # Workaround for GNOME autologin: https://github.com/NixOS/nixpkgs/issues/103746#issuecomment-945091229
+ systemd.services."getty@tty1".enable = false;
+ systemd.services."autovt@tty1".enable = false;
+
+ # Install firefox.
+ programs.firefox.enable = true;
+
+ # Allow unfree packages
+ nixpkgs.config.allowUnfree = true;
+
+ programs.gnupg.agent = {
+ enable = true;
+ enableSSHSupport = true;
+ pinentryPackage = pkgs.pinentry-qt;
+ };
+
+ nix.settings.experimental-features = [
+ "nix-command"
+ "flakes"
+ ];
+
+ system.stateVersion = "24.11"; # Did you read the comment?
+
+ environment.systemPackages = with pkgs; [
+ neovim
+ atuin
+ git
+ yadm
+ openssl
+ xxd
+ pinentry-qt
+ ];
+}
diff --git a/srv/hadante/flake.nix b/srv/hadante/flake.nix
new file mode 100644
index 0000000..c308163
--- /dev/null
+++ b/srv/hadante/flake.nix
@@ -0,0 +1,13 @@
+{
+ inputs = {
+ nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
+ };
+ outputs =
+ inputs@{ self, nixpkgs, ... }:
+ {
+ nixosConfigurations.nixos = nixpkgs.lib.nixosSystem {
+ system = "x86_64-linux";
+ modules = [ ./configuration.nix ];
+ };
+ };
+}
diff --git a/srv/hadante/hardware-configuration.nix b/srv/hadante/hardware-configuration.nix
new file mode 100644
index 0000000..445445b
--- /dev/null
+++ b/srv/hadante/hardware-configuration.nix
@@ -0,0 +1,70 @@
+# 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"
+ "nvme"
+ "usbhid"
+ "usb_storage"
+ "sd_mod"
+ ];
+ boot.initrd.kernelModules = [ ];
+ boot.kernelModules = [ "kvm-intel" ];
+ boot.extraModulePackages = [ ];
+
+ fileSystems."/" = {
+ device = "/dev/disk/by-uuid/7d4e62bd-3842-4eeb-99c3-3c883a843abc";
+ fsType = "btrfs";
+ options = [ "subvol=@" ];
+ };
+
+ fileSystems."/boot" = {
+ device = "/dev/disk/by-uuid/4A5C-3BBB";
+ fsType = "vfat";
+ options = [
+ "fmask=0077"
+ "dmask=0077"
+ ];
+ };
+
+ fileSystems."/data" = {
+ device = "/dev/disk/by-uuid/7b099b58-a3f5-46c7-b89c-18f3aa97e8c9";
+ fsType = "btrfs";
+ };
+
+ fileSystems."/nix" = {
+ device = "/dev/disk/by-uuid/7b099b58-a3f5-46c7-b89c-18f3aa97e8c9";
+ fsType = "btrfs";
+ options = [
+ "subvol=nix"
+ "noatime"
+ ];
+ neededForBoot = true;
+ };
+
+ 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.enp0s31f6.useDHCP = lib.mkDefault true;
+
+ nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
+ hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
+}