aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKarel Kočí <cynerd@email.cz>2022-10-06 13:30:21 +0200
committerKarel Kočí <cynerd@email.cz>2022-10-06 13:30:21 +0200
commitfbb909aedbc677f86f6cdebf1d1ba819caebf70a (patch)
tree3820084f90ea049c8f5e96abc6dd92d07e3b0a76
parente8c8fe8d137f8ddb8dc4e547c80e762cd849bee4 (diff)
downloadnixos-personal-fbb909aedbc677f86f6cdebf1d1ba819caebf70a.tar.gz
nixos-personal-fbb909aedbc677f86f6cdebf1d1ba819caebf70a.tar.bz2
nixos-personal-fbb909aedbc677f86f6cdebf1d1ba819caebf70a.zip
nixos/mrpump: use vpsadminos container configuration
-rw-r--r--flake.nix78
-rw-r--r--nixos/machine/default.nix4
-rw-r--r--nixos/machine/mrpump.nix3
3 files changed, 52 insertions, 33 deletions
diff --git a/flake.nix b/flake.nix
index 693eaa3..4c24a59 100644
--- a/flake.nix
+++ b/flake.nix
@@ -9,6 +9,8 @@
#url = "/home/cynerd/projects/nixturris";
inputs.nixpkgs.follows = "nixpkgs";
};
+ #vpsadminos.url = "github:vpsfreecz/vpsadminos";
+ vpsadminos.url = "github:Cynerd/vpsadminos/nix-flake";
sterm.url = "github:wentasah/sterm";
};
@@ -16,6 +18,7 @@
outputs = { self
, nixpkgs, flake-utils, nixos-hardware
, shellrc, nixturris, personal-secret
+ , vpsadminos
, sterm
}:
with flake-utils.lib;
@@ -39,37 +42,50 @@
}
];
- genericSystem = {system, extra_modules ? []}: hostname: {
- ${hostname} = nixpkgs.lib.nixosSystem {
- system = system;
- modules = (modules hostname) ++ extra_modules;
+ genericSystem = {system ? "x86_64-linux", extra_modules ? []}:
+ hostname: {
+ ${hostname} = nixpkgs.lib.nixosSystem {
+ system = system;
+ modules = (modules hostname) ++ extra_modules;
+ };
};
+ amd64System = genericSystem { };
+ vpsSystem = genericSystem {
+ extra_modules = [ vpsadminos.nixosConfigurations.default ];
+ };
+ raspi2System = genericSystem {
+ system = "armv7l-linux";
+ extra_modules = [
+ nixos-hardware.nixosModules.raspberry-pi-2
+ nixturris.nixosModules.turris-crossbuild
+ nixturris.nixosModules.armv7l-overlay
+ { boot.loader.systemd-boot.enable = false; }
+ { nixpkgs.overlays = [ (final: super: {
+ makeModulesClosure = x:
+ super.makeModulesClosure (x // { allowMissing = true; });
+ })]; }
+ ];
+ };
+ raspi3System = genericSystem {
+ system = "aarch64-linux";
+ extra_modules = [
+ nixturris.nixosModules.turris-crossbuild
+ ({pkgs, ...}: {
+ boot.loader.systemd-boot.enable = false;
+ boot.loader.grub.enable = false;
+ boot.loader.generic-extlinux-compatible.enable = true;
+ #boot.kernelPackages = pkgs.linuxKernel.packages.linux_rpi3;
+ })
+ ];
+ };
+ beagleboneSystem = genericSystem {
+ system = "armv7l-linux";
+ extra_modules = [
+ nixturris.nixosModules.turris-crossbuild
+ nixturris.nixosModules.armv7l-overlay
+ # TODO
+ ];
};
- amd64System = genericSystem {system = "x86_64-linux";};
- raspi2System = genericSystem {system = "armv7l-linux"; extra_modules = [
- nixos-hardware.nixosModules.raspberry-pi-2
- nixturris.nixosModules.turris-crossbuild
- nixturris.nixosModules.armv7l-overlay
- { boot.loader.systemd-boot.enable = false; }
- { nixpkgs.overlays = [ (final: super: {
- makeModulesClosure = x:
- super.makeModulesClosure (x // { allowMissing = true; });
- })]; }
- ];};
- raspi3System = genericSystem {system = "aarch64-linux"; extra_modules = [
- nixturris.nixosModules.turris-crossbuild
- ({pkgs, ...}: {
- boot.loader.systemd-boot.enable = false;
- boot.loader.grub.enable = false;
- boot.loader.generic-extlinux-compatible.enable = true;
- #boot.kernelPackages = pkgs.linuxKernel.packages.linux_rpi3;
- })
- ];};
- beagleboneSystem = genericSystem {system = "armv7l-linux"; extra_modules = [
- nixturris.nixosModules.turris-crossbuild
- nixturris.nixosModules.armv7l-overlay
- # TODO
- ];};
turrisSystem = board: hostname: {
${hostname} = nixturris.lib.nixturrisSystem {
@@ -85,10 +101,10 @@
amd64System "albert" //
amd64System "binky" //
amd64System "errol" //
- amd64System "lipwig" //
amd64System "ridcully" //
amd64System "susan" //
- amd64System "mrpump" //
+ vpsSystem "lipwig" //
+ vpsSystem "mrpump" //
raspi2System "spt-mpd" //
raspi3System "adm-mpd" //
beagleboneSystem "gaspode" //
diff --git a/nixos/machine/default.nix b/nixos/machine/default.nix
index 4286d06..2efe2da 100644
--- a/nixos/machine/default.nix
+++ b/nixos/machine/default.nix
@@ -3,10 +3,12 @@
machine-binky = import ./binky.nix;
machine-dean = import ./dean.nix;
machine-errol = import ./errol.nix;
- machine-lipwig = import ./lipwig.nix;
machine-ridcully = import ./ridcully.nix;
machine-susan = import ./susan.nix;
+ machine-lipwig = import ./lipwig.nix;
+ machine-mrpump = import ./mrpump.nix;
+
machine-gaspode = import ./gaspode.nix;
machine-spt-omnia = import ./spt-omnia.nix;
diff --git a/nixos/machine/mrpump.nix b/nixos/machine/mrpump.nix
index 818652c..66cdbb5 100644
--- a/nixos/machine/mrpump.nix
+++ b/nixos/machine/mrpump.nix
@@ -13,9 +13,10 @@ with lib;
enable = true;
services.docker = {
registrationConfigFile = "/run/secrets/gitlab-runner-registration";
- executor = "docker";
tagList = ["docker"];
runUntagged = true;
+ executor = "docker";
+ dockerImage = "alpine";
description = "Docker runner";
};
};