diff --git a/flake.lock b/flake.lock index a792ba0..d15ce22 100644 --- a/flake.lock +++ b/flake.lock @@ -159,6 +159,22 @@ "url": "https://git.clerie.de/clerie/nixos-exporter.git" } }, + "nixos-hardware": { + "locked": { + "lastModified": 1686838567, + "narHash": "sha256-aqKCUD126dRlVSKV6vWuDCitfjFrZlkwNuvj5LtjRRU=", + "owner": "NixOS", + "repo": "nixos-hardware", + "rev": "429f232fe1dc398c5afea19a51aad6931ee0fb89", + "type": "github" + }, + "original": { + "owner": "NixOS", + "ref": "master", + "repo": "nixos-hardware", + "type": "github" + } + }, "nixpkgs": { "locked": { "lastModified": 1665732960, @@ -230,6 +246,7 @@ "fernglas": "fernglas", "fieldpoc": "fieldpoc", "nixos-exporter": "nixos-exporter", + "nixos-hardware": "nixos-hardware", "nixpkgs": "nixpkgs_2", "nixpkgs-krypton": "nixpkgs-krypton", "nixpkgs-schule": "nixpkgs-schule", diff --git a/flake.nix b/flake.nix index 1957063..2c2e855 100644 --- a/flake.nix +++ b/flake.nix @@ -3,6 +3,7 @@ nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable"; nixpkgs-krypton.url = "github:NixOS/nixpkgs/nixos-unstable"; nixpkgs-schule.url = "github:NixOS/nixpkgs/nixos-unstable"; + nixos-hardware.url = "github:NixOS/nixos-hardware/master"; agenix = { url = "github:ryantm/agenix"; inputs.nixpkgs.follows = "nixpkgs"; @@ -25,7 +26,7 @@ inputs.nixpkgs.follows = "nixpkgs"; }; }; - outputs = { self, nixpkgs, chaosevents, fernglas, nixos-exporter, solid-xmpp-alarm, ... }@inputs: let + outputs = { self, nixpkgs, nixos-hardware, chaosevents, fernglas, nixos-exporter, solid-xmpp-alarm, ... }@inputs: let helper = (import ./lib/flake-helper.nix) inputs; in { clerie.hosts = { @@ -52,7 +53,12 @@ gatekeeper = { name = "gatekeeper"; }; hydra-1 = { name = "hydra-1"; }; hydra-2 = { name = "hydra-2"; }; - krypton = { name = "krypton"; }; + krypton = { + name = "krypton"; + modules = [ + nixos-hardware.nixosModules.lenovo-thinkpad-x270 + ]; + }; mail-2 = { name = "mail-2"; }; minecraft-2 = { name = "minecraft-2"; }; monitoring-3 = { name = "monitoring-3"; }; diff --git a/lib/flake-helper.nix b/lib/flake-helper.nix index 8c21ba6..cbb26ea 100644 --- a/lib/flake-helper.nix +++ b/lib/flake-helper.nix @@ -5,11 +5,12 @@ rec { name, system ? "x86_64-linux", group ? null, + modules ? [], }: let localNixpkgs = nixpkgs.lib.attrByPath [ "nixpkgs-${name}" ] nixpkgs inputs; in localNixpkgs.lib.nixosSystem { system = system; - modules = [ + modules = modules ++ [ ({ ... }: { /* Make the contents of the flake availiable to modules.