test
This commit is contained in:
parent
2960b29fb1
commit
45c6da610d
3 changed files with 19 additions and 16 deletions
|
@ -33,24 +33,28 @@
|
||||||
mkContainer = {
|
mkContainer = {
|
||||||
hostname,
|
hostname,
|
||||||
username ? "albert",
|
username ? "albert",
|
||||||
|
desktop ? null,
|
||||||
system ? "x86_64-linux",
|
system ? "x86_64-linux",
|
||||||
theme ? "stylix",
|
theme ? "stylix",
|
||||||
|
type ? "default",
|
||||||
repo ? "nixpkgs",
|
repo ? "nixpkgs",
|
||||||
unfree ? false
|
unfree ? false,
|
||||||
|
pkgs ? import inputs.${repo}
|
||||||
|
{ inherit system; config.allowUnfree = unfree; hostPlatform = system; },
|
||||||
|
pkgs-unstable ? import inputs.nixpkgs-unstable
|
||||||
|
{ inherit system; config.allowUnfree = unfree; hostPlatform = system; }
|
||||||
}: {
|
}: {
|
||||||
bindMounts = import ../nixos/containers/${hostname}/mounts.nix;
|
bindMounts = import ../nixos/containers/${hostname}/mounts.nix;
|
||||||
autoStart = true;
|
autoStart = true;
|
||||||
privateNetwork = false;
|
privateNetwork = false;
|
||||||
specialArgs = { inherit inputs unfree repo hostname username theme system; };
|
specialArgs = { inherit pkgs-unstable hostname username desktop theme system repo unfree stateVersion; };
|
||||||
config = { inputs, unfree, repo, hostname, username, theme, system, ... }: {
|
config = { lib, config, pkgs-unstable, hostname, username, desktop, theme, system, repo, stateVersion, ... }: {
|
||||||
# Choose whether to pull from stable or unstable
|
# Choose whether to pull from stable or unstable
|
||||||
# pkgs-unstable will always be inherited from the host system
|
nixpkgs.pkgs = import inputs.${repo} {
|
||||||
nixpkgs.pkgs = import inputs.${repo} {
|
inherit system;
|
||||||
inherit system;
|
config.allowUnfree = unfree;
|
||||||
config.allowUnfree = unfree;
|
hostPlatform = system;
|
||||||
hostPlatform = system;
|
};
|
||||||
};
|
|
||||||
|
|
||||||
imports = [
|
imports = [
|
||||||
../nixos/containers
|
../nixos/containers
|
||||||
];
|
];
|
||||||
|
|
|
@ -1,9 +1,8 @@
|
||||||
{ ... }: {
|
{ lib, desktop, ... }: {
|
||||||
imports = [
|
imports = [
|
||||||
../../common/software/packages.nix
|
../../common/software/packages.nix
|
||||||
../../common/desktops/plasma6
|
] ++ lib.optional (builtins.isString desktop) ../../common/desktops/${desktop};
|
||||||
];
|
|
||||||
|
|
||||||
networking.firewall.allowedTCPPorts = [ 3389 ];
|
networking.firewall.allowedTCPPorts = [ 3389 ];
|
||||||
services.xrdp.enable = true;
|
services.xrdp.enable = true;
|
||||||
}
|
}
|
||||||
|
|
|
@ -6,6 +6,6 @@ in {
|
||||||
|
|
||||||
# Set up the bridge network:
|
# Set up the bridge network:
|
||||||
containers = {
|
containers = {
|
||||||
rdesktop = libx.mkContainer { hostname = "rdesktop"; unfree = true; repo = "nixpkgs-unstable"; };
|
rdesktop = libx.mkContainer { hostname = "rdesktop"; unfree = true; repo = "nixpkgs-unstable"; desktop = "xfce"; };
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue