2021-09-03 08:57:05 +00:00
|
|
|
# Syndicate Nix flake
|
|
|
|
|
|
|
|
To add to your local flake registry:
|
|
|
|
```sh
|
2022-03-01 23:37:59 +00:00
|
|
|
nix registry add syndicate "git+https://git.syndicate-lang.org/ehmry/syndicate-flake"
|
2021-09-03 08:57:05 +00:00
|
|
|
```
|
2022-09-15 14:09:43 +00:00
|
|
|
|
|
|
|
## Synit
|
|
|
|
|
|
|
|
``` nix
|
|
|
|
{
|
|
|
|
description = "Personal NixOS configurations";
|
|
|
|
|
|
|
|
inputs = {
|
|
|
|
|
|
|
|
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
|
|
|
|
|
|
|
|
syndicate = {
|
|
|
|
url =
|
|
|
|
"git+https://git.syndicate-lang.org/ehmry/syndicate-flake?ref=synit";
|
|
|
|
inputs.nixpkgs.follows = "nixpkgs";
|
|
|
|
};
|
|
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
outputs = { self, nixpkgs, syndicate }:
|
|
|
|
let
|
|
|
|
inherit (nixpkgs) lib;
|
|
|
|
overlays = [ syndicate.overlays.default ];
|
|
|
|
in {
|
|
|
|
|
|
|
|
legacyPackages =
|
|
|
|
lib.attrsets.mapAttrs (system: pkgs: pkgs.appendOverlays overlays)
|
|
|
|
nixpkgs.legacyPackages;
|
|
|
|
|
|
|
|
nixosConfigurations = {
|
|
|
|
|
|
|
|
yourhost = nixpkgs.lib.nixosSystem {
|
|
|
|
system = "x86_64-linux";
|
|
|
|
modules = [
|
|
|
|
|
|
|
|
# A common bootloader
|
|
|
|
{
|
|
|
|
boot.loader = {
|
|
|
|
efi.canTouchEfiVariables = false;
|
|
|
|
grub = {
|
|
|
|
enable = true;
|
|
|
|
efiSupport = true;
|
|
|
|
devices = [ "nodev" ];
|
|
|
|
efiInstallAsRemovable = true;
|
|
|
|
forceInstall = true;
|
|
|
|
};
|
|
|
|
systemd-boot.enable = false; # obviously not
|
|
|
|
};
|
|
|
|
}
|
|
|
|
|
|
|
|
# A normal NixOS system, the default boot profile.
|
|
|
|
./your-normal-host-config/default.nix
|
|
|
|
|
|
|
|
# A Synit system nested inside and an alternative boot profile.
|
|
|
|
{
|
|
|
|
specialisation.synit = {
|
|
|
|
inheritParentConfig = false; # keep it simple for now
|
|
|
|
configuration = { config, ... }: {
|
|
|
|
imports = [
|
|
|
|
syndicate.nixosModules.synit
|
|
|
|
./your-normal-host-config/hardware-configuration.nix
|
|
|
|
];
|
|
|
|
nixpkgs.pkgs = self.legacyPackages.${config.nixpkgs.system};
|
|
|
|
};
|
|
|
|
};
|
|
|
|
}
|
|
|
|
|
|
|
|
];
|
|
|
|
};
|
|
|
|
|
|
|
|
};
|
|
|
|
};
|
|
|
|
}
|
|
|
|
|
|
|
|
```
|