Initial stab at a custom image
May not work, haven't tested it, need to switch systems
This commit is contained in:
parent
c2edcac785
commit
e800fdea4e
2 changed files with 31 additions and 0 deletions
13
README.md
Normal file
13
README.md
Normal file
|
|
@ -0,0 +1,13 @@
|
|||
# nixos-systems
|
||||
|
||||
These are the system definitions for various systems being run by Gleipnir Technology.
|
||||
|
||||
## From Zero
|
||||
|
||||
Hat tip to [the negation](https://thenegation.com/posts/nixos-do-colmena/) for some ideas here.
|
||||
|
||||
Build a custom image for Digital Ocean:
|
||||
|
||||
```
|
||||
nix-build digitalocean/custom-image.nix
|
||||
```
|
||||
18
digitalocean/custom-image.nix
Normal file
18
digitalocean/custom-image.nix
Normal file
|
|
@ -0,0 +1,18 @@
|
|||
let
|
||||
## Pin the latest NixOS stable (nixos-25.05) release:
|
||||
nixpkgs = builtins.fetchTarball {
|
||||
url = "https://github.com/NixOS/nixpkgs/archive/refs/tags/25.05.tar.gz";
|
||||
sha256 = "sha256:0q96nxw7jg9l9zlpa3wkma5xzmgkdnnajapwhgb2fk2ll224rgs1";
|
||||
};
|
||||
|
||||
## Import nixpkgs:
|
||||
pkgs = import nixpkgs { };
|
||||
|
||||
## Prepare the NixOS configuration:
|
||||
config = {
|
||||
imports = [
|
||||
"${nixpkgs}/nixos/modules/virtualisation/digital-ocean-image.nix"
|
||||
];
|
||||
};
|
||||
in
|
||||
(pkgs.nixos config).digitalOceanImage
|
||||
Loading…
Add table
Add a link
Reference in a new issue