Cleanup unused variable, remove global with lib
This commit is contained in:
parent
dc16c9d4b8
commit
f97b96387d
|
@ -176,7 +176,6 @@
|
||||||
outputs = inputs@{ self, fenix, harmonia, heliwatch, microvm, naersk, nixos, nixos-hardware, nixos-unstable, caveman, oparl-scraper, scrapers, secrets, skyflake, sshlogd, sops-nix, spacemsg, ticker, tigger, yammat, zentralwerk, ... }:
|
outputs = inputs@{ self, fenix, harmonia, heliwatch, microvm, naersk, nixos, nixos-hardware, nixos-unstable, caveman, oparl-scraper, scrapers, secrets, skyflake, sshlogd, sops-nix, spacemsg, ticker, tigger, yammat, zentralwerk, ... }:
|
||||||
let
|
let
|
||||||
inherit (nixos) lib;
|
inherit (nixos) lib;
|
||||||
forAllSystems = lib.genAttrs [ "aarch64-linux" "x86_64-linux" ];
|
|
||||||
|
|
||||||
# all the input flakes for `nix copy` to the build machine,
|
# all the input flakes for `nix copy` to the build machine,
|
||||||
# allowing --override-input
|
# allowing --override-input
|
||||||
|
@ -318,7 +317,6 @@
|
||||||
target = ''root@"${host}"'';
|
target = ''root@"${host}"'';
|
||||||
rebuildArg = "--flake ${self}#${name} --option extra-substituters https://nix-serve.hq.c3d2.de";
|
rebuildArg = "--flake ${self}#${name} --option extra-substituters https://nix-serve.hq.c3d2.de";
|
||||||
hostConfig = self.nixosConfigurations."${name}".config;
|
hostConfig = self.nixosConfigurations."${name}".config;
|
||||||
profile = hostConfig.system.build.toplevel;
|
|
||||||
# let /var/lib/microvm/*/flake point to the flake-update branch so that
|
# let /var/lib/microvm/*/flake point to the flake-update branch so that
|
||||||
# `microvm -u $NAME` updates to what hydra built today.
|
# `microvm -u $NAME` updates to what hydra built today.
|
||||||
selfRef = "git+https://gitea.c3d2.de/c3d2/nix-config?ref=flake-update";
|
selfRef = "git+https://gitea.c3d2.de/c3d2/nix-config?ref=flake-update";
|
||||||
|
@ -1014,7 +1012,6 @@
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
nixosModule = self.nixosModules.c3d2;
|
|
||||||
nixosModules = {
|
nixosModules = {
|
||||||
c3d2 = {
|
c3d2 = {
|
||||||
imports = [
|
imports = [
|
||||||
|
|
|
@ -1,7 +1,5 @@
|
||||||
{ config, lib, pkgs, ... }:
|
{ config, lib, pkgs, ... }:
|
||||||
|
|
||||||
with lib;
|
|
||||||
|
|
||||||
let
|
let
|
||||||
# TODO: move to flake
|
# TODO: move to flake
|
||||||
nixcloud-webservices = pkgs.fetchFromGitHub {
|
nixcloud-webservices = pkgs.fetchFromGitHub {
|
||||||
|
@ -30,19 +28,15 @@ let
|
||||||
else
|
else
|
||||||
throw "Invalid LXC config value";
|
throw "Invalid LXC config value";
|
||||||
toLxcConfig = toLxcConfig' "";
|
toLxcConfig = toLxcConfig' "";
|
||||||
|
|
||||||
lxc-rootfs = pkgs.runCommand "lxc-rootfs" { } ''
|
|
||||||
mkdir -p $out/share/lxc/rootfs/{dev,nix/store,proc,run,sys,tmp}
|
|
||||||
'';
|
|
||||||
in {
|
in {
|
||||||
options = with types; {
|
options = with lib.types; {
|
||||||
lxc.containers = mkOption {
|
lxc.containers = mkOption {
|
||||||
type = attrs;
|
type = attrs;
|
||||||
default = { };
|
default = { };
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
config = mkIf (containers != { }) {
|
config = lib.mkIf (containers != { }) {
|
||||||
virtualisation.lxc.enable = true;
|
virtualisation.lxc.enable = true;
|
||||||
environment.systemPackages = [ nixcloud.container ];
|
environment.systemPackages = [ nixcloud.container ];
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue