1
0
Fork 0
forked from emily/nixfiles

Add build-worker container image

This commit is contained in:
emily 2024-08-18 21:48:41 +02:00
parent 10c7e7cee8
commit e4dae7955a
Signed by untrusted user: emily
GPG key ID: F6F4C66207FCF995
7 changed files with 34 additions and 8 deletions

1
.gitignore vendored
View file

@ -1 +1,2 @@
testing/**
result

View file

@ -9,7 +9,6 @@ with lib; {
../../modules
];
environment.systemPackages = with pkgs; [
kitty.terminfo
bat
dig
htop
@ -23,6 +22,8 @@ with lib; {
unzip
zip
figlet
] ++ lib.optionals (!config.kyouma.machine-type.container) [
kitty.terminfo
];
programs = {
mtr.enable = true;
@ -57,7 +58,7 @@ with lib; {
nix.gc.automatic = true;
nix.gc.options = "--delete-older-than 7d";
nix.optimise.automatic = true;
nix.registry.nixpkgs.to = {
nix.registry.nixpkgs.to = lib.mkIf (!config.kyouma.machine-type.container) {
type = "path";
path = pkgs.path;
};

View file

@ -0,0 +1,15 @@
{ lib, modulesPath, ... }: {
imports = [
"${modulesPath}/virtualisation/docker-image.nix"
../../common
../../profiles/builder.nix
../../profiles/headless.nix
];
networking.hostName = "build-worker-oci";
services.resolved.enable = lib.mkForce false;
kyouma = {
machine-type.container = true;
deployment.auto-upgrade.enable = lib.mkForce false;
};
}

View file

@ -212,7 +212,8 @@
plugins.luasnip.enable = true;
plugins.nvim-autopairs.enable = true;
plugins.rainbow-delimiters.enable = true;
plugins.rustaceanvim.enable = true;
# Broken
plugins.rustaceanvim.enable = false;
plugins.treesitter-context.enable = true;
};
}

View file

@ -107,7 +107,10 @@
];
};
};
images.lain = self.nixosConfigurations.lain-minimal.config.system.build.sdImage;
images = {
lain = self.nixosConfigurations.lain-minimal.config.system.build.sdImage;
build-worker-oci = self.nixosConfigurations.build-worker-oci.config.system.build.tarball;
};
overlays = {
kyouma = import ./pkgs/overlay.nix;

View file

@ -38,6 +38,11 @@ in {
default = false;
description = mdDoc "Mark machine as portable.";
};
container = mkOption {
type = types.bool;
default = false;
description = mdDoc "Mark machine as container image.";
};
};
config = {
assertions = [