forked from nyanloutre/nixos-config
57 lines
1.9 KiB
Nix
57 lines
1.9 KiB
Nix
{
|
|
inputs = {
|
|
nixpkgs.url = "flake:nixpkgs/nixos-21.05";
|
|
nixpkgs-unstable.url = "flake:nixpkgs/nixos-unstable";
|
|
nixpkgs-nyanloutre-pysmart.url = "github:nyanloutre/nixpkgs/pysmart-init";
|
|
simple-nixos-mailserver.url = "gitlab:simple-nixos-mailserver/nixos-mailserver/nixos-21.05";
|
|
};
|
|
|
|
outputs = { self, nixpkgs, nixpkgs-unstable, simple-nixos-mailserver, nixpkgs-nyanloutre-pysmart }: {
|
|
nixosConfigurations.loutreos = nixpkgs.lib.nixosSystem {
|
|
system = "x86_64-linux";
|
|
modules = [
|
|
({ pkgs, ... }: {
|
|
nix.nixPath = [
|
|
"nixpkgs=${nixpkgs}"
|
|
];
|
|
})
|
|
nixpkgs.nixosModules.notDetected
|
|
"${nixpkgs-unstable}/nixos/modules/services/audio/navidrome.nix"
|
|
simple-nixos-mailserver.nixosModule
|
|
./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-nyanloutre-pysmart.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";
|
|
};
|
|
};
|
|
})
|
|
];
|
|
};
|
|
|
|
nixosConfigurations.paul-fixe = nixpkgs-unstable.lib.nixosSystem {
|
|
system = "x86_64-linux";
|
|
modules = [
|
|
({ pkgs, ... }: {
|
|
nix.nixPath = [
|
|
"nixpkgs=${nixpkgs-unstable}"
|
|
];
|
|
})
|
|
nixpkgs-unstable.nixosModules.notDetected
|
|
./systems/PC-Fixe/configuration.nix
|
|
];
|
|
};
|
|
};
|
|
}
|
|
|