From 29ea7db3aa4c1f5c1af9a144f942e4fbad9b6b61 Mon Sep 17 00:00:00 2001 From: Vinzenz Schroeter Date: Thu, 2 Jan 2025 01:14:41 +0100 Subject: [PATCH] add ona-book --- common/i18n.nix | 9 ------ flake.nix | 1 + hosts/ona-book/default.nix | 37 ++++++++++++++++++++++ hosts/ona-book/hardware.nix | 57 ++++++++++++++++++++++++++++++++++ hosts/vinzenz-lpt2/default.nix | 9 ++++++ hosts/vinzenz-pc2/default.nix | 9 ++++++ 6 files changed, 113 insertions(+), 9 deletions(-) create mode 100644 hosts/ona-book/default.nix create mode 100644 hosts/ona-book/hardware.nix diff --git a/common/i18n.nix b/common/i18n.nix index c9506ad..3d789f0 100644 --- a/common/i18n.nix +++ b/common/i18n.nix @@ -15,14 +15,5 @@ _: { LC_TIME = "de_DE.UTF-8"; }; }; - - services.xserver.xkb = { - # Configure keymap in X11 - layout = "de"; - variant = ""; - }; - - # Configure console keymap - console.keyMap = "de"; }; } diff --git a/flake.nix b/flake.nix index 388dc45..4b4200e 100644 --- a/flake.nix +++ b/flake.nix @@ -43,6 +43,7 @@ vinzenz-lpt2 = import ./hosts/vinzenz-lpt2 host-params; vinzenz-pc2 = import ./hosts/vinzenz-pc2 host-params; hetzner-vpn2 = import ./hosts/hetzner-vpn2 host-params; + ona-book = import ./hosts/ona-book host-params; }; formatter = { diff --git a/hosts/ona-book/default.nix b/hosts/ona-book/default.nix new file mode 100644 index 0000000..bdc8952 --- /dev/null +++ b/hosts/ona-book/default.nix @@ -0,0 +1,37 @@ +{ + nixpkgs, + common-modules, + desktop-modules, + ... +}: +nixpkgs.lib.nixosSystem { + system = "x86_64-linux"; + modules = + common-modules + ++ desktop-modules + ++ [ + ./hardware.nix + ../../home/gnome.nix + ../../users/ronja.nix + ../../modules/gnome.nix + + { + networking.hostName = "ona-book"; + services.xserver.xkb = { + layout = "us"; + options = "eurosign:e,caps:escape"; + }; + } + + { + home-manager.users.ronja = import ../../home/ronja.nix; + + users.users.ronja.openssh.authorizedKeys.keys = [ + ]; + } + + { + + } + ]; +} diff --git a/hosts/ona-book/hardware.nix b/hosts/ona-book/hardware.nix new file mode 100644 index 0000000..3a1601b --- /dev/null +++ b/hosts/ona-book/hardware.nix @@ -0,0 +1,57 @@ +{ + config, + lib, + pkgs, + modulesPath, + ... +}: +{ + imports = [ + (modulesPath + "/hardware/network/broadcom-43xx.nix") + (modulesPath + "/installer/scan/not-detected.nix") + ]; + + config = { + boot = { + initrd.availableKernelModules = [ + "xhci_pci" + "nvme" + "usb_storage" + "sd_mod" + ]; + initrd.kernelModules = [ ]; + kernelModules = [ "kvm-intel" ]; + extraModulePackages = [ ]; + }; + + fileSystems = { + "/" = { + device = "/dev/disk/by-uuid/15220182-5617-4963-814e-19ff29b7db8c"; + fsType = "btrfs"; + }; + + "/boot" = { + device = "/dev/disk/by-uuid/1C7D-07C1"; + fsType = "vfat"; + options = [ + "fmask=0077" + "dmask=0077" + ]; + }; + }; + + swapDevices = [ + { device = "/dev/disk/by-uuid/e4c91c7e-8b62-48e4-923d-4d750ebbc7db"; } + ]; + + # 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..useDHCP`. + networking.useDHCP = lib.mkDefault true; + # networking.interfaces.wlp2s0.useDHCP = lib.mkDefault true; + + nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux"; + hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware; + }; +} diff --git a/hosts/vinzenz-lpt2/default.nix b/hosts/vinzenz-lpt2/default.nix index f9d0276..7114544 100644 --- a/hosts/vinzenz-lpt2/default.nix +++ b/hosts/vinzenz-lpt2/default.nix @@ -26,6 +26,15 @@ nixpkgs.lib.nixosSystem { "aarch64-linux" "i686-linux" ]; + + services.xserver.xkb = { + # Configure keymap in X11 + layout = "de"; + variant = ""; + }; + + # Configure console keymap + console.keyMap = "de"; } { diff --git a/hosts/vinzenz-pc2/default.nix b/hosts/vinzenz-pc2/default.nix index c8535c8..3fdcb70 100644 --- a/hosts/vinzenz-pc2/default.nix +++ b/hosts/vinzenz-pc2/default.nix @@ -25,6 +25,15 @@ nixpkgs.lib.nixosSystem { "aarch64-linux" "i686-linux" ]; + + services.xserver.xkb = { + # Configure keymap in X11 + layout = "de"; + variant = ""; + }; + + # Configure console keymap + console.keyMap = "de"; } { home-manager.users = {