1
0
Fork 0

hosts/krypton: add nixos-hardware for x270

This commit is contained in:
clerie 2023-06-30 23:31:13 +02:00
parent 1c52fc0dab
commit 64ace7d041
3 changed files with 27 additions and 3 deletions

View File

@ -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",

View File

@ -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"; };

View File

@ -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.