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