From 8fab8b01aec1af24404f577091ca66e55744fc60 Mon Sep 17 00:00:00 2001 From: Don Harper Date: Fri, 15 Sep 2023 07:22:50 -0500 Subject: [PATCH] testing build --- flake.lock | 66 ++++++++++++++++++++++++++ flake.nix | 3 +- home/packages-cli.nix | 3 +- hosts/smaug/hardware-configuration.nix | 42 ++++++++++++++++ workstation/default.nix | 2 + 5 files changed, 113 insertions(+), 3 deletions(-) create mode 100644 flake.lock create mode 100644 hosts/smaug/hardware-configuration.nix diff --git a/flake.lock b/flake.lock new file mode 100644 index 0000000..3198520 --- /dev/null +++ b/flake.lock @@ -0,0 +1,66 @@ +{ + "nodes": { + "home-manager": { + "inputs": { + "nixpkgs": [ + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1694465129, + "narHash": "sha256-8BQiuobMrCfCbGM7w6Snx+OBYdtTIm0+cGVaKwQ5BFg=", + "owner": "nix-community", + "repo": "home-manager", + "rev": "9787dffff5d315c9593d3f9fb0f9bf2097e1b57b", + "type": "github" + }, + "original": { + "owner": "nix-community", + "ref": "release-23.05", + "repo": "home-manager", + "type": "github" + } + }, + "nixos-hardware": { + "locked": { + "lastModified": 1694710316, + "narHash": "sha256-uRh46iIC86D8BD1wCDA5gRrt+hslUXiD0kx/UjnjBcs=", + "owner": "NixOS", + "repo": "nixos-hardware", + "rev": "570256327eb6ca6f7bebe8d93af49459092a0c43", + "type": "github" + }, + "original": { + "owner": "NixOS", + "ref": "master", + "repo": "nixos-hardware", + "type": "github" + } + }, + "nixpkgs": { + "locked": { + "lastModified": 1694422566, + "narHash": "sha256-lHJ+A9esOz9vln/3CJG23FV6Wd2OoOFbDeEs4cMGMqc=", + "owner": "nixos", + "repo": "nixpkgs", + "rev": "3a2786eea085f040a66ecde1bc3ddc7099f6dbeb", + "type": "github" + }, + "original": { + "owner": "nixos", + "ref": "nixos-unstable", + "repo": "nixpkgs", + "type": "github" + } + }, + "root": { + "inputs": { + "home-manager": "home-manager", + "nixos-hardware": "nixos-hardware", + "nixpkgs": "nixpkgs" + } + } + }, + "root": "root", + "version": 7 +} diff --git a/flake.nix b/flake.nix index 04d37df..2711410 100644 --- a/flake.nix +++ b/flake.nix @@ -34,12 +34,13 @@ networking.hostName = "loki"; } ./wm/sway + ./hosts/smaug/hardware-configuration.nix ]; }; vm2 = inputs.nixpkgs.lib.nixosSystem { system = "x86_64-linux"; modules = workstation.modules ++ [ - nixos-hardware.nixosModules.lenovo-thinkpad-x260 + inputs.nixos-hardware.nixosModules.lenovo-thinkpad-x260 { services.getty.autologinUser = "don"; networking.hostName = "vm2"; diff --git a/home/packages-cli.nix b/home/packages-cli.nix index 24cd5f0..fe195c1 100644 --- a/home/packages-cli.nix +++ b/home/packages-cli.nix @@ -18,14 +18,13 @@ file fzf gdu - git-crypt - gitFull gitui gh gnumake gnupg gping gtop + htop hugo jq keychain diff --git a/hosts/smaug/hardware-configuration.nix b/hosts/smaug/hardware-configuration.nix new file mode 100644 index 0000000..fe56a8f --- /dev/null +++ b/hosts/smaug/hardware-configuration.nix @@ -0,0 +1,42 @@ +# 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" "uas" "sd_mod" "rtsx_pci_sdmmc" ]; + boot.initrd.kernelModules = [ ]; + boot.kernelModules = [ "kvm-intel" ]; + boot.extraModulePackages = [ ]; + + + fileSystems."/" = + { device = "/dev/sda2"; + fsType = "ext4"; + }; + + fileSystems."/boot" = + { device = "/dev/sda1"; + fsType = "vfat"; + }; + + swapDevices = + [ { device = "/dev/sda3"; } + ]; + + # 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"; + powerManagement.cpuFreqGovernor = lib.mkDefault "powersave"; + hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware; +} diff --git a/workstation/default.nix b/workstation/default.nix index 5ba3ea8..5ffbcd2 100644 --- a/workstation/default.nix +++ b/workstation/default.nix @@ -154,6 +154,8 @@ in nix-bash-completions btop espeak-classic + git-crypt + gitFull headsetcontrol home-manager hunspell