This commit is contained in:
albert 2024-03-22 22:10:30 +09:00
parent eff13f8fc6
commit 2960b29fb1
No known key found for this signature in database
GPG key ID: 64F6C4EB46C4543A
4 changed files with 16 additions and 31 deletions

View file

@ -33,24 +33,24 @@
mkContainer = {
hostname,
username ? "albert",
desktop ? null,
system ? "x86_64-linux",
theme ? "stylix",
type ? "default",
repo ? "nixpkgs",
unfree ? false,
tskey ? null,
pkgs ? import inputs.${repo}
{ inherit system; config.allowUnfree = unfree; hostPlatform = system; },
pkgs-unstable ? import inputs.nixpkgs-unstable
{ inherit system; config.allowUnfree = unfree; hostPlatform = system; }
unfree ? false
}: {
bindMounts = import ../nixos/containers/${hostname}/mounts.nix;
autoStart = true;
privateNetwork = false;
specialArgs = { inherit pkgs pkgs-unstable hostname username desktop theme system repo unfree stateVersion tskey; };
config = { lib, config, pkgs, pkgs-unstable, hostname, username, desktop, theme, system, repo, stateVersion, tskey, ... }: {
system.stateVersion = stateVersion;
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;
};
imports = [
../nixos/containers
];

View file

@ -5,6 +5,5 @@
../common/modules/nixos.nix
../common/modules/networking.nix
];
networking.hostName = "${hostname}";
}

View file

@ -1,15 +1,9 @@
{ desktop, ... }: {
{ ... }: {
imports = [
../../common/desktops/${desktop}
../../common/software/packages.nix
../../common/desktops/plasma6
];
system.stateVersion = "24.05";
networking.firewall.allowedTCPPorts = [ 3389 ];
services.xrdp = {
enable = true;
openFirewall = true;
};
services.xrdp.enable = true;
}

View file

@ -1,19 +1,11 @@
{ self, inputs, outputs, stateVersion, hmStateVersion, pkgs, pkgs-unstable, ... }:
let
libx = import ../../../lib {
inherit self inputs outputs hmStateVersion pkgs-unstable pkgs;
stateVersion = "24.05";
};
libx = import ../../../lib { inherit self inputs outputs stateVersion hmStateVersion; };
in {
# TODO: Set up Tailscale key
# Set up the bridge network:
containers = {
rdesktop = libx.mkContainer {
hostname = "rdesktop";
desktop = "plasma6";
unfree = true;
repo = "nixpkgs-unstable";
};
rdesktop = libx.mkContainer { hostname = "rdesktop"; unfree = true; repo = "nixpkgs-unstable"; };
};
}