l: container hackery
This commit is contained in:
parent
e083b18e34
commit
21bd13b2de
@ -184,14 +184,17 @@ in {
|
|||||||
}
|
}
|
||||||
{
|
{
|
||||||
#hotdog
|
#hotdog
|
||||||
|
systemd.services."container@hotdog".reloadIfChanged = mkForce false;
|
||||||
containers.hotdog = {
|
containers.hotdog = {
|
||||||
config = { ... }: {
|
config = { ... }: {
|
||||||
|
imports = [ <stockholm/lass/2configs/rebuild-on-boot.nix> ];
|
||||||
environment.systemPackages = [ pkgs.git ];
|
environment.systemPackages = [ pkgs.git ];
|
||||||
services.openssh.enable = true;
|
services.openssh.enable = true;
|
||||||
users.users.root.openssh.authorizedKeys.keys = [
|
users.users.root.openssh.authorizedKeys.keys = [
|
||||||
config.krebs.users.lass.pubkey
|
config.krebs.users.lass.pubkey
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
|
autoStart = true;
|
||||||
enableTun = true;
|
enableTun = true;
|
||||||
privateNetwork = true;
|
privateNetwork = true;
|
||||||
hostAddress = "10.233.2.1";
|
hostAddress = "10.233.2.1";
|
||||||
@ -200,8 +203,10 @@ in {
|
|||||||
}
|
}
|
||||||
{
|
{
|
||||||
#kaepsele
|
#kaepsele
|
||||||
|
systemd.services."container@kaepsele".reloadIfChanged = mkForce false;
|
||||||
containers.kaepsele = {
|
containers.kaepsele = {
|
||||||
config = { ... }: {
|
config = { ... }: {
|
||||||
|
imports = [ <stockholm/lass/2configs/rebuild-on-boot.nix> ];
|
||||||
environment.systemPackages = [ pkgs.git ];
|
environment.systemPackages = [ pkgs.git ];
|
||||||
services.openssh.enable = true;
|
services.openssh.enable = true;
|
||||||
users.users.root.openssh.authorizedKeys.keys = with config.krebs.users; [
|
users.users.root.openssh.authorizedKeys.keys = with config.krebs.users; [
|
||||||
@ -209,6 +214,7 @@ in {
|
|||||||
tv.pubkey
|
tv.pubkey
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
|
autoStart = true;
|
||||||
enableTun = true;
|
enableTun = true;
|
||||||
privateNetwork = true;
|
privateNetwork = true;
|
||||||
hostAddress = "10.233.2.3";
|
hostAddress = "10.233.2.3";
|
||||||
@ -217,8 +223,10 @@ in {
|
|||||||
}
|
}
|
||||||
{
|
{
|
||||||
#onondaga
|
#onondaga
|
||||||
|
systemd.services."container@onondaga".reloadIfChanged = mkForce false;
|
||||||
containers.onondaga = {
|
containers.onondaga = {
|
||||||
config = { ... }: {
|
config = { ... }: {
|
||||||
|
imports = [ <stockholm/lass/2configs/rebuild-on-boot.nix> ];
|
||||||
environment.systemPackages = [ pkgs.git ];
|
environment.systemPackages = [ pkgs.git ];
|
||||||
services.openssh.enable = true;
|
services.openssh.enable = true;
|
||||||
users.users.root.openssh.authorizedKeys.keys = [
|
users.users.root.openssh.authorizedKeys.keys = [
|
||||||
@ -226,6 +234,7 @@ in {
|
|||||||
config.krebs.users.nin.pubkey
|
config.krebs.users.nin.pubkey
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
|
autoStart = true;
|
||||||
enableTun = true;
|
enableTun = true;
|
||||||
privateNetwork = true;
|
privateNetwork = true;
|
||||||
hostAddress = "10.233.2.5";
|
hostAddress = "10.233.2.5";
|
||||||
|
18
lass/2configs/rebuild-on-boot.nix
Normal file
18
lass/2configs/rebuild-on-boot.nix
Normal file
@ -0,0 +1,18 @@
|
|||||||
|
{ config, pkgs, ... }:
|
||||||
|
with import <stockholm/lib>;
|
||||||
|
{
|
||||||
|
systemd.services.rebuild-on-boot = {
|
||||||
|
wantedBy = [ "multi-user.target" ];
|
||||||
|
environment = {
|
||||||
|
NIX_REMOTE = "daemon";
|
||||||
|
HOME = "/var/empty";
|
||||||
|
};
|
||||||
|
serviceConfig = {
|
||||||
|
ExecStart = pkgs.writeScript "rebuild" ''
|
||||||
|
#!${pkgs.bash}/bin/bash
|
||||||
|
(/run/current-system/sw/bin/nixos-rebuild -I /var/src switch) &
|
||||||
|
'';
|
||||||
|
ExecStop = "${pkgs.coreutils}/bin/sleep 10";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
Loading…
Reference in New Issue
Block a user