2024-05-20 01:17:07 -04:00
|
|
|
{
|
|
|
|
inputs = let
|
2024-08-05 16:40:32 -04:00
|
|
|
inherit (import ./inputs.nix) mkDep mkInput otherInputs;
|
2024-05-20 01:17:07 -04:00
|
|
|
|
|
|
|
mainInputs = {
|
2024-08-06 13:27:06 -04:00
|
|
|
systems = mkInput {
|
|
|
|
owner = "nix-systems";
|
|
|
|
repo = "default-linux";
|
|
|
|
};
|
|
|
|
|
2024-05-20 01:17:07 -04:00
|
|
|
nixpkgs = mkInput {
|
|
|
|
owner = "NixOS";
|
|
|
|
repo = "nixpkgs";
|
2024-09-22 14:05:24 -04:00
|
|
|
ref = "nixos-unstable";
|
2024-05-20 01:17:07 -04:00
|
|
|
};
|
|
|
|
|
|
|
|
home-manager = mkDep {
|
2024-06-11 19:17:20 -04:00
|
|
|
owner = "nix-community";
|
2024-05-20 01:17:07 -04:00
|
|
|
repo = "home-manager";
|
|
|
|
};
|
|
|
|
|
|
|
|
nix-on-droid = mkDep {
|
|
|
|
owner = "nix-community";
|
|
|
|
repo = "nix-on-droid";
|
|
|
|
|
|
|
|
inputs.home-manager.follows = "home-manager";
|
|
|
|
};
|
|
|
|
|
|
|
|
sops-nix = mkDep {
|
|
|
|
owner = "Mic92";
|
|
|
|
repo = "sops-nix";
|
|
|
|
};
|
|
|
|
|
|
|
|
secrets = mkDep {
|
|
|
|
type = "git";
|
|
|
|
url = "ssh://git@git.nelim.org/matt1432/nixos-secrets";
|
|
|
|
|
|
|
|
inputs.sops-nix.follows = "sops-nix";
|
|
|
|
};
|
2024-06-28 13:44:12 -04:00
|
|
|
|
|
|
|
jovian = mkDep {
|
|
|
|
owner = "Jovian-Experiments";
|
|
|
|
repo = "Jovian-NixOS";
|
|
|
|
};
|
2024-05-20 01:17:07 -04:00
|
|
|
};
|
|
|
|
in
|
|
|
|
mainInputs // otherInputs;
|
|
|
|
|
|
|
|
outputs = inputs @ {
|
|
|
|
nixpkgs,
|
|
|
|
secrets,
|
2024-07-14 22:59:33 -04:00
|
|
|
self,
|
2024-08-06 13:27:06 -04:00
|
|
|
systems,
|
2024-05-20 01:17:07 -04:00
|
|
|
...
|
|
|
|
}: let
|
2024-08-07 14:47:32 -04:00
|
|
|
inherit (import ./lib {inherit inputs;}) mkVersion mkNixOS mkNixOnDroid mkPkgs;
|
2024-05-20 22:41:45 -04:00
|
|
|
|
2024-05-20 01:17:07 -04:00
|
|
|
perSystem = attrs:
|
2024-08-06 13:27:06 -04:00
|
|
|
nixpkgs.lib.genAttrs (import systems) (system:
|
2024-09-04 23:41:56 -04:00
|
|
|
attrs (mkPkgs {inherit system nixpkgs;}));
|
2024-05-20 01:17:07 -04:00
|
|
|
in {
|
2024-08-02 22:32:29 -04:00
|
|
|
nixosModules = import ./nixosModules self;
|
|
|
|
|
|
|
|
homeManagerModules = import ./homeManagerModules self;
|
2024-06-27 00:56:27 -04:00
|
|
|
|
2024-05-20 01:17:07 -04:00
|
|
|
nixosConfigurations = {
|
2024-05-20 22:41:45 -04:00
|
|
|
# Desktops
|
2024-09-04 23:41:56 -04:00
|
|
|
wim = mkNixOS {
|
|
|
|
extraModules = [
|
|
|
|
./devices/wim
|
|
|
|
secrets.nixosModules.default
|
|
|
|
];
|
|
|
|
};
|
|
|
|
binto = mkNixOS {
|
2024-09-28 13:31:03 -04:00
|
|
|
cudaSupport = true;
|
2024-09-04 23:41:56 -04:00
|
|
|
extraModules = [./devices/binto];
|
|
|
|
};
|
2024-05-20 01:17:07 -04:00
|
|
|
|
2024-09-04 23:41:56 -04:00
|
|
|
bbsteamie = mkNixOS {extraModules = [./devices/bbsteamie];};
|
2024-06-29 03:45:06 -04:00
|
|
|
|
2024-05-20 22:41:45 -04:00
|
|
|
# NAS
|
2024-09-04 23:41:56 -04:00
|
|
|
nos = mkNixOS {
|
2024-09-28 13:31:03 -04:00
|
|
|
cudaSupport = true;
|
2024-09-04 23:41:56 -04:00
|
|
|
extraModules = [
|
|
|
|
./devices/nos
|
|
|
|
secrets.nixosModules.nos
|
|
|
|
];
|
|
|
|
};
|
2024-05-20 01:17:07 -04:00
|
|
|
|
2024-05-20 22:41:45 -04:00
|
|
|
# Build / test server
|
2024-09-04 23:41:56 -04:00
|
|
|
servivi = mkNixOS {
|
|
|
|
extraModules = [
|
|
|
|
./devices/servivi
|
|
|
|
secrets.nixosModules.servivi
|
|
|
|
];
|
|
|
|
};
|
2024-05-20 01:17:07 -04:00
|
|
|
|
2024-08-18 20:59:01 -04:00
|
|
|
# Home-assistant
|
2024-09-05 22:42:17 -04:00
|
|
|
homie = mkNixOS {
|
2024-09-07 22:04:53 -04:00
|
|
|
extraModules = [
|
|
|
|
./devices/homie
|
|
|
|
secrets.nixosModules.homie
|
|
|
|
];
|
|
|
|
};
|
2024-08-18 20:59:01 -04:00
|
|
|
|
2024-05-20 01:17:07 -04:00
|
|
|
# Cluster
|
2024-09-04 23:41:56 -04:00
|
|
|
thingone = mkNixOS {
|
|
|
|
extraModules = [
|
|
|
|
(import ./devices/cluster "thingone")
|
|
|
|
secrets.nixosModules.thingy
|
|
|
|
];
|
|
|
|
};
|
|
|
|
thingtwo = mkNixOS {
|
|
|
|
extraModules = [
|
|
|
|
(import ./devices/cluster "thingtwo")
|
|
|
|
secrets.nixosModules.thingy
|
|
|
|
];
|
|
|
|
};
|
|
|
|
|
|
|
|
live-image = mkNixOS {
|
|
|
|
extraModules = [
|
|
|
|
"${nixpkgs}/nixos/modules/installer/cd-dvd/installation-cd-minimal.nix"
|
|
|
|
{
|
|
|
|
vars = {
|
|
|
|
mainUser = "nixos";
|
|
|
|
hostName = "nixos";
|
|
|
|
};
|
|
|
|
}
|
|
|
|
];
|
|
|
|
};
|
2024-05-20 01:17:07 -04:00
|
|
|
};
|
|
|
|
|
2024-07-21 17:12:26 -04:00
|
|
|
nixOnDroidConfigurations.default =
|
|
|
|
mkNixOnDroid [./devices/android];
|
2024-05-20 01:17:07 -04:00
|
|
|
|
2024-07-21 17:12:26 -04:00
|
|
|
legacyPackages =
|
|
|
|
perSystem (pkgs:
|
|
|
|
import ./legacyPackages {inherit mkVersion pkgs inputs;});
|
2024-06-10 22:57:20 -04:00
|
|
|
|
2024-06-08 22:21:04 -04:00
|
|
|
packages =
|
2024-07-21 17:12:26 -04:00
|
|
|
perSystem (pkgs:
|
|
|
|
import ./packages {inherit self pkgs mkVersion inputs;});
|
|
|
|
|
2024-08-04 18:44:53 -04:00
|
|
|
overlays = import ./overlays {};
|
|
|
|
|
2024-07-21 17:12:26 -04:00
|
|
|
apps =
|
|
|
|
perSystem (pkgs:
|
|
|
|
import ./apps {inherit inputs pkgs;});
|
2024-06-08 22:21:04 -04:00
|
|
|
|
2024-07-21 17:12:26 -04:00
|
|
|
devShells = perSystem (pkgs: {
|
2024-05-20 01:17:07 -04:00
|
|
|
default = pkgs.mkShell {
|
2024-08-31 19:16:06 -04:00
|
|
|
packages = [
|
|
|
|
(pkgs.writeShellScriptBin "mkIso" ''
|
2024-07-21 17:12:26 -04:00
|
|
|
isoConfig="nixosConfigurations.live-image.config.system.build.isoImage"
|
|
|
|
nom build $(realpath /etc/nixos)#$isoConfig
|
|
|
|
'')
|
2024-05-20 01:17:07 -04:00
|
|
|
];
|
|
|
|
};
|
|
|
|
|
2024-10-05 12:38:13 -04:00
|
|
|
netdaemon = pkgs.mkShell {
|
|
|
|
packages = [
|
|
|
|
pkgs.dotnet-sdk_8
|
|
|
|
];
|
|
|
|
};
|
|
|
|
|
2024-07-20 09:38:17 -04:00
|
|
|
node = pkgs.mkShell {
|
2024-08-31 19:16:06 -04:00
|
|
|
packages =
|
|
|
|
(builtins.attrValues {
|
|
|
|
inherit
|
|
|
|
(pkgs)
|
|
|
|
nodejs_latest
|
|
|
|
typescript
|
|
|
|
;
|
2024-08-06 20:35:11 -04:00
|
|
|
})
|
2024-08-31 19:16:06 -04:00
|
|
|
++ [
|
|
|
|
(pkgs.writeShellApplication {
|
|
|
|
name = "updateNpmDeps";
|
|
|
|
runtimeInputs = builtins.attrValues {
|
|
|
|
inherit
|
|
|
|
(pkgs)
|
|
|
|
prefetch-npm-deps
|
|
|
|
nodejs_latest
|
|
|
|
;
|
|
|
|
};
|
|
|
|
|
|
|
|
text = ''
|
|
|
|
npm i --package-lock-only || true # this command will fail but still updates the main lockfile
|
|
|
|
prefetch-npm-deps ./package-lock.json
|
|
|
|
'';
|
|
|
|
})
|
|
|
|
];
|
2024-05-20 01:17:07 -04:00
|
|
|
};
|
|
|
|
|
|
|
|
subtitles-dev = pkgs.mkShell {
|
2024-08-31 19:16:06 -04:00
|
|
|
packages = builtins.attrValues {
|
|
|
|
inherit
|
|
|
|
(pkgs)
|
2024-05-20 01:17:07 -04:00
|
|
|
nodejs_latest
|
|
|
|
ffmpeg-full
|
|
|
|
typescript
|
2024-08-31 19:16:06 -04:00
|
|
|
;
|
|
|
|
|
|
|
|
inherit
|
|
|
|
(pkgs.nodePackages)
|
2024-05-20 01:17:07 -04:00
|
|
|
ts-node
|
2024-08-31 19:16:06 -04:00
|
|
|
;
|
|
|
|
};
|
2024-05-20 01:17:07 -04:00
|
|
|
};
|
|
|
|
});
|
2024-05-20 22:41:45 -04:00
|
|
|
|
2024-08-05 16:40:32 -04:00
|
|
|
# For nix-fast-build. I use a custom output to alleviate eval time of this flake. ie. when doing nix flake show
|
|
|
|
nixFastChecks =
|
2024-07-21 17:12:26 -04:00
|
|
|
perSystem (pkgs:
|
2024-08-05 16:40:32 -04:00
|
|
|
import ./checks {inherit pkgs self;});
|
2024-07-21 17:12:26 -04:00
|
|
|
|
|
|
|
formatter = perSystem (pkgs: pkgs.alejandra);
|
2024-05-20 01:17:07 -04:00
|
|
|
};
|
|
|
|
}
|