template: Fixed incorrect nix code
This commit is contained in:
@@ -9,46 +9,58 @@
|
|||||||
system = "x86_64-linux";
|
system = "x86_64-linux";
|
||||||
pkgs = clan-core.inputs.nixpkgs.legacyPackages.${system};
|
pkgs = clan-core.inputs.nixpkgs.legacyPackages.${system};
|
||||||
clan = clan-core.lib.buildClan {
|
clan = clan-core.lib.buildClan {
|
||||||
specialArgs = { }; # Add arguments to every nix import in here
|
|
||||||
directory = self;
|
directory = self;
|
||||||
clanName = "__CHANGE_ME__"; # Ensure this is internet wide unique.
|
clanName = "__CHANGE_ME__"; # Ensure this is internet wide unique.
|
||||||
|
clanIcon = null; # Optional, a path to an image file
|
||||||
|
# TODO: boot into the installer
|
||||||
|
# remote> nixos-generate-config --root /tmp/config --no-filesystems
|
||||||
|
# local> mkdir -p ./machines/machine1
|
||||||
|
# local> scp -r root@machine1:/tmp/config ./machines/machine1
|
||||||
|
# local> Edit ./machines/machine1/configuration.nix to your liking
|
||||||
machines = {
|
machines = {
|
||||||
jon = {
|
jon = {
|
||||||
nixpkgs.hostPlatform = system;
|
nixpkgs.hostPlatform = system;
|
||||||
imports = [
|
imports = [
|
||||||
# TODO: boot into the installer
|
|
||||||
# remote> nixos-generate-config --root /tmp/config --no-filesystems
|
|
||||||
# local> mkdir -p ./machines/machine1
|
|
||||||
# local> scp -r root@machine1:/tmp/config ./machines/machine1
|
|
||||||
# local> Edit ./machines/machine1/configuration.nix to your liking
|
|
||||||
./modules/disko.nix
|
|
||||||
./machines/jon/configuration.nix
|
./machines/jon/configuration.nix
|
||||||
clan-core.clanModules.sshd
|
clan-core.clanModules.sshd
|
||||||
|
clan-core.clanModules.diskLayouts
|
||||||
{
|
{
|
||||||
|
config.clanCore.machineIcon = null; # Optional, a path to an image file
|
||||||
|
|
||||||
# Set this for clan commands use ssh i.e. `clan machines update`
|
# Set this for clan commands use ssh i.e. `clan machines update`
|
||||||
clan.networking.targetHost = pkgs.lib.mkDefault "root@<IP_ADDRESS>";
|
config.clan.networking.targetHost = pkgs.lib.mkDefault "root@<IP_ADDRESS>";
|
||||||
|
|
||||||
|
# TODO: Example how to use disko for more complicated setups
|
||||||
|
|
||||||
# remote> lsblk --output NAME,PTUUID,FSTYPE,SIZE,MOUNTPOINT
|
# remote> lsblk --output NAME,PTUUID,FSTYPE,SIZE,MOUNTPOINT
|
||||||
|
config.clan.diskLayouts.singleDiskExt4 = {
|
||||||
|
device = "/dev/disk/by-id/__CHANGE_ME__";
|
||||||
|
};
|
||||||
|
|
||||||
config.disko.devices.disk.main.device = "/dev/disk/by-id/__CHANGE_ME__";
|
config.services.getty.autologinUser = "root";
|
||||||
|
|
||||||
clan.networking.zerotier.controller.enable = true;
|
# TODO: Document that there needs to be one controller
|
||||||
|
config.clan.networking.zerotier.controller.enable = true;
|
||||||
}
|
}
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
sara = {
|
sara = {
|
||||||
nixpkgs.hostPlatform = system;
|
nixpkgs.hostPlatform = system;
|
||||||
imports = [
|
imports = [
|
||||||
# ./machines/machine2/configuration.nix
|
|
||||||
./modules/disko.nix
|
|
||||||
./machines/sara/configuration.nix
|
./machines/sara/configuration.nix
|
||||||
clan-core.clanModules.sshd
|
clan-core.clanModules.sshd
|
||||||
|
clan-core.clanModules.diskLayouts
|
||||||
{
|
{
|
||||||
# Set this for clan commands use ssh i.e. `clan machines update`
|
config.clanCore.machineIcon = null; # Optional, a path to an image file
|
||||||
clan.networking.targetHost = pkgs.lib.mkDefault "root@<IP_ADDRESS>";
|
|
||||||
|
# Set this for clan commands use ssh i.e. `clan machines update`
|
||||||
|
config.clan.networking.targetHost = pkgs.lib.mkDefault "root@<IP_ADDRESS>";
|
||||||
|
|
||||||
config.disko.devices.disk.main.device = "/dev/disk/by-id/__CHANGE_ME__";
|
|
||||||
# local> clan facts generate
|
# local> clan facts generate
|
||||||
clan.networking.zerotier.networkId = builtins.readFile ./machines/machine1/facts/zerotier-network-id;
|
|
||||||
|
config.clan.diskLayouts.singleDiskExt4 = {
|
||||||
|
device = "/dev/disk/by-id/__CHANGE_ME__";
|
||||||
|
};
|
||||||
}
|
}
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
|
|||||||
Reference in New Issue
Block a user