From 9abe4bb8ac7690e556b2554f9fa7539b320fdbda Mon Sep 17 00:00:00 2001 From: notohh Date: Sat, 10 Jun 2023 16:41:06 -0400 Subject: [PATCH] hosts: init ame, upgrade linux kernels --- hosts/README.md | 1 + hosts/ame/default.nix | 56 ++++++++++++++++++++++++++++ hosts/ame/hardware-configuration.nix | 41 ++++++++++++++++++++ hosts/ame/home.nix | 35 +++++++++++++++++ hosts/default.nix | 21 +++++++++++ hosts/kariru/default.nix | 4 +- hosts/sakura/default.nix | 2 + hosts/yuki/default.nix | 4 +- 8 files changed, 162 insertions(+), 2 deletions(-) create mode 100644 hosts/ame/default.nix create mode 100644 hosts/ame/hardware-configuration.nix create mode 100755 hosts/ame/home.nix diff --git a/hosts/README.md b/hosts/README.md index 0e7c81b..6f1c6a8 100644 --- a/hosts/README.md +++ b/hosts/README.md @@ -4,6 +4,7 @@ my different hosts, each with their own unique configurations and purposes. Name | Description --------------- | ----------- +`ame` | T480 laptop, mainly used for experimenting atm `kariru` | *arr stack / seedbox vm `sakura` | WIP new main vm `tsuki` | main machine running hyprland diff --git a/hosts/ame/default.nix b/hosts/ame/default.nix new file mode 100644 index 0000000..aa09cb7 --- /dev/null +++ b/hosts/ame/default.nix @@ -0,0 +1,56 @@ +{ + config, + pkgs, + ... +}: { + imports = [ + ./hardware-configuration.nix + ../../modules + ../../modules/fonts.nix + ]; + + boot.loader = { + systemd-boot = { + enable = true; + configurationLimit = 8; + }; + efi = { + canTouchEfiVariables = true; + efiSysMountPoint = "/boot/efi"; + }; + }; + + boot.kernelPackages = pkgs.linuxPackages_latest; + + networking.hostName = "ame"; + networking.wireless.enable = true; + services.xserver.enable = true; + + services.xserver.displayManager.sddm.enable = true; + services.xserver.desktopManager.plasma5.enable = true; + + services.xserver = { + layout = "us"; + xkbVariant = ""; + }; + + services.printing.enable = true; + + sound.enable = true; + hardware.pulseaudio.enable = false; + security.rtkit.enable = true; + services.pipewire = { + enable = true; + alsa.enable = true; + alsa.support32Bit = true; + pulse.enable = true; + }; + + environment.systemPackages = with pkgs; [ + firefox + kate + git + helix + croc + ]; +} diff --git a/hosts/ame/hardware-configuration.nix b/hosts/ame/hardware-configuration.nix new file mode 100644 index 0000000..1e30de2 --- /dev/null +++ b/hosts/ame/hardware-configuration.nix @@ -0,0 +1,41 @@ +# 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" "usb_storage" "sd_mod" ]; + boot.initrd.kernelModules = [ ]; + boot.kernelModules = [ "kvm-intel" ]; + boot.extraModulePackages = [ ]; + + fileSystems."/" = + { device = "/dev/disk/by-uuid/57411820-f154-497e-9c7e-dfcb1f21c5cf"; + fsType = "ext4"; + }; + + fileSystems."/boot/efi" = + { device = "/dev/disk/by-uuid/4D09-1D57"; + fsType = "vfat"; + }; + + swapDevices = + [ { device = "/dev/disk/by-uuid/4f69ab31-f6a9-4799-92f1-5abbe0dc9180"; } + ]; + + # 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.enp0s31f6.useDHCP = lib.mkDefault true; + # networking.interfaces.wlp3s0.useDHCP = lib.mkDefault true; + + nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux"; + powerManagement.cpuFreqGovernor = lib.mkDefault "powersave"; + hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware; +} diff --git a/hosts/ame/home.nix b/hosts/ame/home.nix new file mode 100755 index 0000000..83decd8 --- /dev/null +++ b/hosts/ame/home.nix @@ -0,0 +1,35 @@ +{pkgs, ...}: { + imports = [ + ../../home + ../../home/librewolf + ../../home/wezterm + ../../home/zathura + ../../home/lf + ../../home/zellij + ]; + + systemd.user.startServices = "sd-switch"; + programs.home-manager.enable = true; + + home = { + username = "notoh"; + homeDirectory = "/home/notoh"; + packages = with pkgs; [ + webcord + discord + spotify-player + pavucontrol + unzip + p7zip + imv + mpv + rustypaste-cli + playerctl + logseq + cryptomator + (callPackage ../../pkgs/chatterino7 {}) + ]; + + stateVersion = "23.05"; + }; +} diff --git a/hosts/default.nix b/hosts/default.nix index 497c480..ef55469 100644 --- a/hosts/default.nix +++ b/hosts/default.nix @@ -94,4 +94,25 @@ in { } ]; }; + ame = nixosSystem { + inherit system; + specialArgs = {inherit inputs;}; + modules = [ + ./ame + sopsModule + diskoModule + hmModule + { + home-manager = { + useGlobalPkgs = true; + useUserPackages = true; + users.notoh = { + imports = [ + ./ame/home.nix + ]; + }; + }; + } + ]; + }; } diff --git a/hosts/kariru/default.nix b/hosts/kariru/default.nix index b91e350..183fd8c 100644 --- a/hosts/kariru/default.nix +++ b/hosts/kariru/default.nix @@ -1,4 +1,4 @@ -{...}: { +{pkgs, ...}: { imports = [ ./hardware-configuration.nix ./services @@ -14,6 +14,8 @@ }; }; + boot.kernelPackages = pkgs.linuxPackages_latest; + networking = { hostName = "kariru"; }; diff --git a/hosts/sakura/default.nix b/hosts/sakura/default.nix index b60ee16..ee7ef4a 100644 --- a/hosts/sakura/default.nix +++ b/hosts/sakura/default.nix @@ -18,6 +18,8 @@ }; }; + boot.kernelPackages = pkgs.linuxPackages_latest; + networking = { hostName = "sakura"; }; diff --git a/hosts/yuki/default.nix b/hosts/yuki/default.nix index 3e369c8..44835c6 100644 --- a/hosts/yuki/default.nix +++ b/hosts/yuki/default.nix @@ -1,4 +1,4 @@ -{...}: { +{pkgs, ...}: { imports = [ ./hardware-configuration.nix ./services @@ -16,6 +16,8 @@ }; }; + boot.kernelPackages = pkgs.linuxPackages_latest; + networking.hostName = "yuki"; networking.networkmanager.enable = true;