2022-04-29 14:23:10 -04:00
|
|
|
{
|
|
|
|
description = "walkah's little city state";
|
|
|
|
|
|
|
|
inputs = {
|
|
|
|
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
|
|
|
|
home-manager.url = "github:nix-community/home-manager";
|
|
|
|
flake-utils.url = "github:numtide/flake-utils";
|
|
|
|
deploy-rs.url = "github:serokell/deploy-rs";
|
2022-05-03 21:00:37 -04:00
|
|
|
|
|
|
|
# My stuff
|
|
|
|
dotfiles = {
|
|
|
|
url = "github:walkah/dotfiles";
|
|
|
|
inputs.nixpkgs.follows = "nixpkgs";
|
|
|
|
};
|
2022-04-29 14:23:10 -04:00
|
|
|
};
|
|
|
|
|
2022-05-03 21:00:37 -04:00
|
|
|
outputs = { self, nixpkgs, deploy-rs, flake-utils, home-manager, dotfiles, ... }@attrs:
|
|
|
|
let
|
|
|
|
mkSystem = hostName: system: modules:
|
|
|
|
nixpkgs.lib.nixosSystem {
|
|
|
|
system = system;
|
|
|
|
modules = [
|
|
|
|
home-manager.nixosModules.home-manager
|
|
|
|
({ config, ... }: {
|
|
|
|
networking.hostName = hostName;
|
|
|
|
home-manager.useGlobalPkgs = true;
|
|
|
|
home-manager.useUserPackages = true;
|
|
|
|
})
|
|
|
|
]
|
|
|
|
++ modules;
|
|
|
|
};
|
|
|
|
in
|
2022-04-29 14:23:10 -04:00
|
|
|
flake-utils.lib.eachDefaultSystem
|
|
|
|
(system:
|
|
|
|
let
|
|
|
|
pkgs = nixpkgs.legacyPackages.${system};
|
|
|
|
in
|
|
|
|
{
|
|
|
|
devShells.default = pkgs.mkShell {
|
2022-05-03 21:00:37 -04:00
|
|
|
buildInputs = [ deploy-rs.packages.${system}.deploy-rs pkgs.sops ];
|
2022-04-29 14:23:10 -04:00
|
|
|
};
|
2022-05-03 21:00:37 -04:00
|
|
|
}) // {
|
2022-04-29 14:23:10 -04:00
|
|
|
nixosConfigurations = {
|
2022-05-03 21:00:37 -04:00
|
|
|
# Aristotle
|
|
|
|
agent = mkSystem "agent" "aarch64-linux" [ ./hosts/aristotle/configuration.nix ];
|
|
|
|
form = mkSystem "form" "aarch64-linux" [ ./hosts/aristotle/configuration.nix ];
|
|
|
|
matter = mkSystem "matter" "aarch64-linux" [ ./hosts/aristotle/configuration.nix ];
|
|
|
|
purpose = mkSystem "purpose" "aarch64-linux" [ ./hosts/aristotle/configuration.nix ];
|
2022-04-29 14:23:10 -04:00
|
|
|
|
2022-05-03 21:00:37 -04:00
|
|
|
plato = mkSystem "plato" "x86_64-linux" [ ./hosts/plato/configuration.nix ];
|
|
|
|
socrates = mkSystem "socrates" "x86_64-linux" [ ./hosts/socrates/configuration.nix ];
|
2022-04-29 14:23:10 -04:00
|
|
|
};
|
|
|
|
|
|
|
|
deploy.nodes = {
|
|
|
|
agent = {
|
|
|
|
hostname = "agent";
|
|
|
|
sshUser = "root";
|
|
|
|
profiles.system = {
|
|
|
|
user = "root";
|
|
|
|
path = deploy-rs.lib.aarch64-linux.activate.nixos
|
|
|
|
self.nixosConfigurations.agent;
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
form = {
|
|
|
|
hostname = "form";
|
|
|
|
sshUser = "root";
|
|
|
|
profiles.system = {
|
|
|
|
user = "root";
|
|
|
|
path = deploy-rs.lib.aarch64-linux.activate.nixos
|
|
|
|
self.nixosConfigurations.form;
|
|
|
|
};
|
|
|
|
};
|
2022-05-03 21:00:37 -04:00
|
|
|
|
|
|
|
matter = {
|
|
|
|
hostname = "matter";
|
|
|
|
sshUser = "root";
|
|
|
|
profiles.system = {
|
|
|
|
user = "root";
|
|
|
|
path = deploy-rs.lib.aarch64-linux.activate.nixos
|
|
|
|
self.nixosConfigurations.matter;
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
purpose = {
|
|
|
|
hostname = "purpose";
|
|
|
|
sshUser = "root";
|
|
|
|
profiles.system = {
|
|
|
|
user = "root";
|
|
|
|
path = deploy-rs.lib.aarch64-linux.activate.nixos
|
|
|
|
self.nixosConfigurations.purpose;
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
plato = {
|
|
|
|
hostname = "plato";
|
|
|
|
profiles = {
|
|
|
|
system = {
|
|
|
|
user = "root";
|
|
|
|
path = deploy-rs.lib.x86_64-linux.activate.nixos
|
|
|
|
self.nixosConfigurations.plato;
|
|
|
|
};
|
|
|
|
walkah = {
|
|
|
|
user = "walkah";
|
|
|
|
path = deploy-rs.lib.x86_64-linux.activate.home-manager
|
|
|
|
dotfiles.homeConfigurations.x86_64-linux;
|
|
|
|
};
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
socrates = {
|
|
|
|
hostname = "socrates";
|
|
|
|
sshUser = "root";
|
|
|
|
profiles = {
|
|
|
|
system = {
|
|
|
|
user = "root";
|
|
|
|
path = deploy-rs.lib.x86_64-linux.activate.nixos
|
|
|
|
self.nixosConfigurations.socrates;
|
|
|
|
};
|
|
|
|
walkah = {
|
|
|
|
user = "walkah";
|
|
|
|
path = deploy-rs.lib.x86_64-linux.activate.home-manager
|
|
|
|
dotfiles.homeConfigurations.x86_64-linux;
|
|
|
|
};
|
|
|
|
};
|
|
|
|
};
|
2022-04-29 14:23:10 -04:00
|
|
|
};
|
|
|
|
};
|
|
|
|
}
|