forked from emily/nixfiles
Add build-worker container image
This commit is contained in:
parent
10c7e7cee8
commit
e4dae7955a
7 changed files with 34 additions and 8 deletions
1
.gitignore
vendored
1
.gitignore
vendored
|
@ -1 +1,2 @@
|
||||||
testing/**
|
testing/**
|
||||||
|
result
|
||||||
|
|
|
@ -9,7 +9,6 @@ with lib; {
|
||||||
../../modules
|
../../modules
|
||||||
];
|
];
|
||||||
environment.systemPackages = with pkgs; [
|
environment.systemPackages = with pkgs; [
|
||||||
kitty.terminfo
|
|
||||||
bat
|
bat
|
||||||
dig
|
dig
|
||||||
htop
|
htop
|
||||||
|
@ -23,7 +22,9 @@ with lib; {
|
||||||
unzip
|
unzip
|
||||||
zip
|
zip
|
||||||
figlet
|
figlet
|
||||||
];
|
] ++ lib.optionals (!config.kyouma.machine-type.container) [
|
||||||
|
kitty.terminfo
|
||||||
|
];
|
||||||
programs = {
|
programs = {
|
||||||
mtr.enable = true;
|
mtr.enable = true;
|
||||||
fish.enable = true;
|
fish.enable = true;
|
||||||
|
@ -57,7 +58,7 @@ with lib; {
|
||||||
nix.gc.automatic = true;
|
nix.gc.automatic = true;
|
||||||
nix.gc.options = "--delete-older-than 7d";
|
nix.gc.options = "--delete-older-than 7d";
|
||||||
nix.optimise.automatic = true;
|
nix.optimise.automatic = true;
|
||||||
nix.registry.nixpkgs.to = {
|
nix.registry.nixpkgs.to = lib.mkIf (!config.kyouma.machine-type.container) {
|
||||||
type = "path";
|
type = "path";
|
||||||
path = pkgs.path;
|
path = pkgs.path;
|
||||||
};
|
};
|
||||||
|
|
15
config/hosts/build-worker-oci/configuration.nix
Normal file
15
config/hosts/build-worker-oci/configuration.nix
Normal 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;
|
||||||
|
};
|
||||||
|
}
|
|
@ -212,7 +212,8 @@
|
||||||
plugins.luasnip.enable = true;
|
plugins.luasnip.enable = true;
|
||||||
plugins.nvim-autopairs.enable = true;
|
plugins.nvim-autopairs.enable = true;
|
||||||
plugins.rainbow-delimiters.enable = true;
|
plugins.rainbow-delimiters.enable = true;
|
||||||
plugins.rustaceanvim.enable = true;
|
# Broken
|
||||||
|
plugins.rustaceanvim.enable = false;
|
||||||
plugins.treesitter-context.enable = true;
|
plugins.treesitter-context.enable = true;
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
@ -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 = {
|
overlays = {
|
||||||
kyouma = import ./pkgs/overlay.nix;
|
kyouma = import ./pkgs/overlay.nix;
|
||||||
|
|
|
@ -38,6 +38,11 @@ in {
|
||||||
default = false;
|
default = false;
|
||||||
description = mdDoc "Mark machine as portable.";
|
description = mdDoc "Mark machine as portable.";
|
||||||
};
|
};
|
||||||
|
container = mkOption {
|
||||||
|
type = types.bool;
|
||||||
|
default = false;
|
||||||
|
description = mdDoc "Mark machine as container image.";
|
||||||
|
};
|
||||||
};
|
};
|
||||||
config = {
|
config = {
|
||||||
assertions = [
|
assertions = [
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
final: prev: {
|
final: prev: {
|
||||||
nyastodon = final.callPackage ./nyastodon/default.nix { };
|
nyastodon = final.callPackage ./nyastodon/default.nix {};
|
||||||
upgrade-system = final.callPackage ./upgrade-system/default.nix { };
|
upgrade-system = final.callPackage ./upgrade-system/default.nix {};
|
||||||
update-nixfiles = final.callPackage ./update-nixfiles/default.nix { };
|
update-nixfiles = final.callPackage ./update-nixfiles/default.nix {};
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue