diff --git a/hosts/hime/default.nix b/hosts/hime/default.nix index e69de29..7ac7bbd 100644 --- a/hosts/hime/default.nix +++ b/hosts/hime/default.nix @@ -0,0 +1,68 @@ +{ config, pkgs, ... }: + +{ + imports = + [ + ./hardware-configuration.nix + ]; + + boot.loader.grub.enable = true; + boot.loader.grub.device = "/dev/sda"; + boot.loader.grub.useOSProber = true; + + networking.hostName = "hime"; + networking.networkmanager.enable = true; + + time.timeZone = "America/New_York"; + + i18n.defaultLocale = "en_US.UTF-8"; + + i18n.extraLocaleSettings = { + LC_ADDRESS = "en_US.UTF-8"; + LC_IDENTIFICATION = "en_US.UTF-8"; + LC_MEASUREMENT = "en_US.UTF-8"; + LC_MONETARY = "en_US.UTF-8"; + LC_NAME = "en_US.UTF-8"; + LC_NUMERIC = "en_US.UTF-8"; + LC_PAPER = "en_US.UTF-8"; + LC_TELEPHONE = "en_US.UTF-8"; + LC_TIME = "en_US.UTF-8"; + }; + + services.xserver = { + layout = "us"; + xkbVariant = ""; + }; + + services.openssh = { + enable = true; + passwordAuthentication = true; + kbdInteractiveAuthentication = false; + }; + + virtualisation.docker.enable = true; + users.users.oh = { + isNormalUser = true; + description = "oh"; + extraGroups = [ "networkmanager" "wheel" ]; + packages = with pkgs; [ + neofetch + helix + lazygit + hugo + ]; + }; + + nixpkgs.config.allowUnfree = true; + + environment.systemPackages = with pkgs; [ + docker-compose + wget + python3Full + python3.pkgs.pip + git + gh + ]; + + system.stateVersion = "22.11"; +} diff --git a/hosts/hime/hardware-configuration.nix b/hosts/hime/hardware-configuration.nix new file mode 100644 index 0000000..a0f3ac5 --- /dev/null +++ b/hosts/hime/hardware-configuration.nix @@ -0,0 +1,31 @@ +{ config, lib, pkgs, modulesPath, ... }: + +{ + imports = + [ (modulesPath + "/profiles/qemu-guest.nix") + ]; + + boot.initrd.availableKernelModules = [ "ata_piix" "uhci_hcd" "virtio_pci" "virtio_scsi" "sd_mod" "sr_mod" ]; + boot.initrd.kernelModules = [ ]; + boot.kernelModules = [ ]; + boot.extraModulePackages = [ ]; + + fileSystems."/" = + { device = "/dev/disk/by-uuid/154e6059-35f9-49bb-b049-085b325ac997"; + fsType = "ext4"; + }; + + swapDevices = + [ { device = "/dev/disk/by-uuid/15978bb3-da9b-4ec2-bd35-1716dd97812b"; } + ]; + + # 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.ens18.useDHCP = lib.mkDefault true; + + nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux"; + hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware; +}