Add Synit config to README
This commit is contained in:
parent
e1dd2b0aa4
commit
266d09cad0
75
README.md
75
README.md
|
@ -4,3 +4,78 @@ To add to your local flake registry:
|
||||||
```sh
|
```sh
|
||||||
nix registry add syndicate "git+https://git.syndicate-lang.org/ehmry/syndicate-flake"
|
nix registry add syndicate "git+https://git.syndicate-lang.org/ehmry/syndicate-flake"
|
||||||
```
|
```
|
||||||
|
|
||||||
|
## 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};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
];
|
||||||
|
};
|
||||||
|
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
```
|
||||||
|
|
Loading…
Reference in New Issue