From 9c811c5b7720fb0dfda13de3ead573a706a9cba5 Mon Sep 17 00:00:00 2001 From: stupidcomputer Date: Sat, 31 Aug 2024 19:10:25 -0500 Subject: [PATCH] add new machine: aristotle --- boxes/aristotle/default.nix | 56 ++++++++++++++++++++++ boxes/aristotle/hardware-configuration.nix | 39 +++++++++++++++ boxes/aristotle/home.nix | 10 ++++ flake.nix | 14 ++++++ 4 files changed, 119 insertions(+) create mode 100644 boxes/aristotle/default.nix create mode 100644 boxes/aristotle/hardware-configuration.nix create mode 100644 boxes/aristotle/home.nix diff --git a/boxes/aristotle/default.nix b/boxes/aristotle/default.nix new file mode 100644 index 0000000..82f31ad --- /dev/null +++ b/boxes/aristotle/default.nix @@ -0,0 +1,56 @@ +{ lib, config, pkgs, ...}: + +{ + imports = [ + ./hardware-configuration.nix + ../../modules/bootstrap.nix + ../../modules/common.nix + ../../modules/x11.nix + ../../modules/pulse.nix + ../../modules/hosts.nix + ../../modules/tlp.nix + ../../modules/media.nix + ../../modules/anki.nix + ../../modules/power-control.nix + ../../modules/adb.nix + ../../modules/rbw.nix + ]; + + environment.systemPackages = with pkgs; [ + xscreensaver + texliveFull + libreoffice + + ecryptfs + ffmpeg + thunderbird + ledger + ranger + ]; + + hardware.bluetooth = { + enable = true; + }; + + services.printing.enable = true; + services.avahi = { + enable = true; + nssmdns = true; + openFirewall = true; + }; + + users.users.usr.extraGroups = [ "input" ]; + + services.getty.autologinUser = "usr"; + + boot.loader = { + systemd-boot.enable = true; + efi.canTouchEfiVariables = true; + }; + + hardware.pulseaudio.enable = true; + + networking.hostName = "aristotle"; + + system.stateVersion = "24.05"; +} diff --git a/boxes/aristotle/hardware-configuration.nix b/boxes/aristotle/hardware-configuration.nix new file mode 100644 index 0000000..761a437 --- /dev/null +++ b/boxes/aristotle/hardware-configuration.nix @@ -0,0 +1,39 @@ +# 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" "nvme" "usb_storage" "sd_mod" "rtsx_pci_sdmmc" ]; + boot.initrd.kernelModules = [ ]; + boot.kernelModules = [ ]; + boot.extraModulePackages = [ ]; + + fileSystems."/" = + { device = "/dev/disk/by-uuid/bcae81bd-95d9-457f-8694-709f887cf2e2"; + fsType = "ext4"; + }; + + fileSystems."/boot" = + { device = "/dev/disk/by-uuid/CAEA-2672"; + fsType = "vfat"; + options = [ "fmask=0077" "dmask=0077" ]; + }; + + 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..useDHCP`. + networking.useDHCP = lib.mkDefault true; + # networking.interfaces.enp0s31f6.useDHCP = lib.mkDefault true; + # networking.interfaces.wlp4s0.useDHCP = lib.mkDefault true; + + nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux"; + hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware; +} diff --git a/boxes/aristotle/home.nix b/boxes/aristotle/home.nix new file mode 100644 index 0000000..24f26c5 --- /dev/null +++ b/boxes/aristotle/home.nix @@ -0,0 +1,10 @@ +{ lib, inputs, config, pkgs, home, ... }: + +{ + imports = [ + ../../home/x11.nix + ../../home/chromium + ]; + + home.stateVersion = "24.05"; +} diff --git a/flake.nix b/flake.nix index aac774c..7e98288 100644 --- a/flake.nix +++ b/flake.nix @@ -136,6 +136,20 @@ } ]; }; + aristotle = nixpkgs.lib.nixosSystem { + system = "x86_64-linux"; + specialArgs = { inherit inputs; }; + modules = [ + ./boxes/aristotle + + home-manager.nixosModules.home-manager { + home-manager.useGlobalPkgs = true; + home-manager.useUserPackages = true; + home-manager.extraSpecialArgs = { inherit inputs; }; + home-manager.users.usr = import ./boxes/aristotle/home.nix; + } + ]; + }; mainsail = nixpkgs.lib.nixosSystem { system = "x86_64-linux"; specialArgs = { inherit inputs; };