From 8b38230a5d942bc4b70a2c74798b6ab914929b57 Mon Sep 17 00:00:00 2001 From: osbm Date: Thu, 1 May 2025 23:40:09 +0300 Subject: [PATCH] welcome wallfacer Luo Ji --- flake.nix | 4 ++ hosts/wallfacer/configuration.nix | 20 ++++++++++ hosts/wallfacer/hardware-configuration.nix | 43 ++++++++++++++++++++++ 3 files changed, 67 insertions(+) create mode 100644 hosts/wallfacer/configuration.nix create mode 100644 hosts/wallfacer/hardware-configuration.nix diff --git a/flake.nix b/flake.nix index 7fb21f8..3b70628 100644 --- a/flake.nix +++ b/flake.nix @@ -93,6 +93,10 @@ "${nixpkgs}/nixos/modules/installer/cd-dvd/installation-cd-graphical-calamares-plasma6.nix" ]; }; + wallfacer = nixpkgs.lib.nixosSystem { + specialArgs = {inherit inputs outputs;}; + modules = [./hosts/wallfacer/configuration.nix]; + }; }; nixOnDroidConfigurations.default = nix-on-droid.lib.nixOnDroidConfiguration { extraSpecialArgs = {inherit inputs outputs;}; diff --git a/hosts/wallfacer/configuration.nix b/hosts/wallfacer/configuration.nix new file mode 100644 index 0000000..9da8079 --- /dev/null +++ b/hosts/wallfacer/configuration.nix @@ -0,0 +1,20 @@ +{ + lib, + ... +}: { + imports = [ + ./hardware-configuration.nix + ../../modules + ]; + myModules = { + enableKDE = false; + enableFonts = false; + }; + i18n.inputMethod.enable = lib.mkForce false; + networking.hostName = "wallfacer"; + environment.systemPackages = [ + ]; + + services.getty.autologinUser = "osbm"; + system.stateVersion = "25.05"; +} diff --git a/hosts/wallfacer/hardware-configuration.nix b/hosts/wallfacer/hardware-configuration.nix new file mode 100644 index 0000000..0565019 --- /dev/null +++ b/hosts/wallfacer/hardware-configuration.nix @@ -0,0 +1,43 @@ +# 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 = [ "ahci" "ehci_pci" "megaraid_sas" "usbhid" "usb_storage" "sd_mod" ]; + boot.initrd.kernelModules = [ ]; + boot.kernelModules = [ "kvm-intel" ]; + boot.extraModulePackages = [ ]; + + fileSystems."/" = + { device = "/dev/disk/by-uuid/46b73f8b-3ff6-40dd-8af2-b5147721f0ef"; + fsType = "ext4"; + }; + + fileSystems."/boot" = + { device = "/dev/disk/by-uuid/7F4A-78DC"; + fsType = "vfat"; + options = [ "fmask=0077" "dmask=0077" ]; + }; + + swapDevices = + [ { device = "/dev/disk/by-uuid/9c358d49-467a-4dd1-91f2-b590dd5d60e7"; } + ]; + + # 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.eno1np0.useDHCP = lib.mkDefault true; + # networking.interfaces.eno2np1.useDHCP = lib.mkDefault true; + # networking.interfaces.eno3.useDHCP = lib.mkDefault true; + # networking.interfaces.eno4.useDHCP = lib.mkDefault true; + + nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux"; + hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware; +}