put ipmihddtemp in separate repo

This commit is contained in:
nyanloutre 2021-11-03 20:10:03 +01:00
parent 99ce7ced42
commit 6098357ec2
3 changed files with 30 additions and 18 deletions

22
flake.lock generated
View File

@ -21,6 +21,27 @@
"type": "gitlab" "type": "gitlab"
} }
}, },
"ipmihddtemp": {
"inputs": {
"nixpkgs": [
"nixpkgs-unstable"
]
},
"locked": {
"lastModified": 1635966341,
"narHash": "sha256-Y70jZPL3/fY8SzkPnpw9Ta411zbbkJ1D3qOYJ76zuIA=",
"owner": "nyanloutre",
"repo": "ipmihddtemp",
"rev": "6fe5d14f588956dfff89716f81b8101c7a94cd6d",
"type": "gitlab"
},
"original": {
"owner": "nyanloutre",
"ref": "master",
"repo": "ipmihddtemp",
"type": "gitlab"
}
},
"nixpkgs": { "nixpkgs": {
"locked": { "locked": {
"lastModified": 1635806954, "lastModified": 1635806954,
@ -54,6 +75,7 @@
"root": { "root": {
"inputs": { "inputs": {
"dogetipbot-telegram": "dogetipbot-telegram", "dogetipbot-telegram": "dogetipbot-telegram",
"ipmihddtemp": "ipmihddtemp",
"nixpkgs": "nixpkgs", "nixpkgs": "nixpkgs",
"nixpkgs-unstable": "nixpkgs-unstable", "nixpkgs-unstable": "nixpkgs-unstable",
"simple-nixos-mailserver": "simple-nixos-mailserver" "simple-nixos-mailserver": "simple-nixos-mailserver"

View File

@ -10,9 +10,13 @@
url = "gitlab:nyanloutre/dogetipbot-telegram/master"; url = "gitlab:nyanloutre/dogetipbot-telegram/master";
inputs.nixpkgs.follows = "nixpkgs"; inputs.nixpkgs.follows = "nixpkgs";
}; };
ipmihddtemp = {
url = "gitlab:nyanloutre/ipmihddtemp/master";
inputs.nixpkgs.follows = "nixpkgs-unstable";
};
}; };
outputs = { self, nixpkgs, nixpkgs-unstable, simple-nixos-mailserver, dogetipbot-telegram }: { outputs = { self, nixpkgs, nixpkgs-unstable, simple-nixos-mailserver, dogetipbot-telegram, ipmihddtemp }: {
nixosConfigurations.loutreos = nixpkgs.lib.nixosSystem { nixosConfigurations.loutreos = nixpkgs.lib.nixosSystem {
system = "x86_64-linux"; system = "x86_64-linux";
modules = [ modules = [
@ -25,24 +29,8 @@
"${nixpkgs-unstable}/nixos/modules/services/audio/navidrome.nix" "${nixpkgs-unstable}/nixos/modules/services/audio/navidrome.nix"
simple-nixos-mailserver.nixosModule simple-nixos-mailserver.nixosModule
dogetipbot-telegram.nixosModule dogetipbot-telegram.nixosModule
ipmihddtemp.nixosModule
./systems/LoutreOS/configuration.nix ./systems/LoutreOS/configuration.nix
({ pkgs, ... }: {
systemd.services.ipmihddtemp = {
description = "IPMI HDD temp fan control";
wantedBy = ["multi-user.target"];
path = with pkgs;[ ipmitool smartmontools ];
serviceConfig = {
ExecStart = with nixpkgs-unstable.legacyPackages.x86_64-linux;
let env = python3Packages.python.buildEnv.override {
extraLibs = with python3Packages;[ pysmart ];
ignoreCollisions = true;
};
in "${pkgs.writeShellScriptBin "run.sh" ''
${env}/bin/python ${pkgs.writeScript "ipmihddtemp.py" "${builtins.readFile ./ipmihddtemp.py}"}
''}/bin/run.sh";
};
};
})
]; ];
}; };

View File

@ -676,6 +676,8 @@ in
dogetipbot-telegram.enable = true; dogetipbot-telegram.enable = true;
ipmihddtemp.enable = true;
# systemd.services.minecraft-overviewer = # systemd.services.minecraft-overviewer =
# let # let
# clientJar = pkgs.fetchurl { # clientJar = pkgs.fetchurl {