[NixOS] Move nixified config into importable file

This commit is contained in:
Ivan Malison 2023-07-18 11:39:18 -06:00
parent 69b33ce1ad
commit 9f6816ffd0
No known key found for this signature in database
GPG Key ID: 62530EFBE99DC2F8
3 changed files with 19 additions and 10 deletions

View File

@ -1,8 +1,9 @@
{ config, lib, pkgs, ... }: { config, lib, pkgs, inputs, ... }:
{ {
imports = [ imports = [
../full.nix ../full.nix
../kat.nix ../kat.nix
../nixified.ai.nix
]; ];
networking.hostName = "nixquick"; networking.hostName = "nixquick";

View File

@ -3,21 +3,13 @@
{ {
imports = [ imports = [
../full.nix ../full.nix
inputs.nixified-ai.nixosModules.invokeai ../nixified.ai.nix
]; ];
services.invokeai = {
enable = true;
host = "0.0.0.0";
nsfwChecker = false;
package = inputs.nixified-ai.packages.${config.nixpkgs.system}.invokeai-nvidia;
};
networking.hostName = "ryzen-shine"; networking.hostName = "ryzen-shine";
environment.systemPackages = with pkgs; [ environment.systemPackages = with pkgs; [
linuxPackages_latest.perf linuxPackages_latest.perf
inputs.nixified-ai.packages.${config.nixpkgs.system}.invokeai-nvidia
]; ];
hardware.enableRedistributableFirmware = true; hardware.enableRedistributableFirmware = true;

16
nixos/nixified.ai.nix Normal file
View File

@ -0,0 +1,16 @@
{ inputs, config }: {
imports = [
inputs.nixified-ai.nixosModules.invokeai
];
environment.systemPackages = [
inputs.nixified-ai.packages.${config.nixpkgs.system}.invokeai-nvidia
];
services.invokeai = {
enable = true;
host = "0.0.0.0";
nsfwChecker = false;
package = inputs.nixified-ai.packages.${config.nixpkgs.system}.invokeai-nvidia;
};
}