From e896aa25f54d405f739674a83714423d0631d98f Mon Sep 17 00:00:00 2001 From: ooks-io Date: Tue, 14 May 2024 21:07:37 +1200 Subject: [PATCH] refactor(ookst480s): change to new host structure --- flake.nix | 7 +++++-- system/hosts/ookst480s/default.nix | 29 ++++++++++++++++++----------- 2 files changed, 23 insertions(+), 13 deletions(-) diff --git a/flake.nix b/flake.nix index 3c73b0f..41603e5 100644 --- a/flake.nix +++ b/flake.nix @@ -121,8 +121,11 @@ nixosConfigurations = { # T480s ookst480s = lib.nixosSystem { - modules = [ ./system/hosts/ookst480s ]; - specialArgs = { inherit inputs outputs; }; + modules = [ + ./system/hosts/ookst480s + hm + ]; + specialArgs = { inherit inputs outputs self; }; }; # Main Desktop ooksdesk = lib.nixosSystem { diff --git a/system/hosts/ookst480s/default.nix b/system/hosts/ookst480s/default.nix index f9255c0..7963fc9 100644 --- a/system/hosts/ookst480s/default.nix +++ b/system/hosts/ookst480s/default.nix @@ -1,23 +1,31 @@ -{ config, inputs, pkgs, ... }: +{ inputs, pkgs, lib, ... }: + +let + inherit (lib) mkDefault; + key = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIBn3ff3HaZHIyH4K13k8Mwqu/o7jIABJ8rANK+r2PfJk"; +in { imports = [ - inputs.hardware.nixosModules.lenovo-thinkpad-t480s ./hardware-configuration.nix - ../../profiles + ../../modules ]; - activeProfiles = ["base"]; - systemModules = { - user = { - ooks.enable = true; + systemModules.host = { + name = "ookst480s"; + type = "laptop"; + function = [ "workstation" ]; + admin = { + name = "ooks"; shell = "fish"; + sshKey = key; + homeManager = true; }; hardware = { cpu.type = "intel"; gpu.type = "intel"; - features = [ "bluetooth" "backlight" "battery" ]; + features = [ "bluetooth" "backlight" "battery" "ssd" ]; battery = { powersave = { minFreq = 800; @@ -31,10 +39,9 @@ }; }; - networking = { - hostName = "ookst480s"; - }; boot = { kernelPackages = pkgs.linuxKernel.packages.linux_zen; }; + + system.stateVersion = mkDefault "23.11"; }