test
This commit is contained in:
parent
c32e803f2c
commit
f56c07e288
5 changed files with 26 additions and 22 deletions
|
@ -30,7 +30,6 @@
|
||||||
modules = [ ../home-manager/${type}.nix ];
|
modules = [ ../home-manager/${type}.nix ];
|
||||||
};
|
};
|
||||||
|
|
||||||
# Helper function for generating container configs
|
|
||||||
mkContainer = {
|
mkContainer = {
|
||||||
hostname,
|
hostname,
|
||||||
username ? "albert",
|
username ? "albert",
|
||||||
|
@ -40,17 +39,21 @@
|
||||||
type ? "default",
|
type ? "default",
|
||||||
repo ? "nixpkgs",
|
repo ? "nixpkgs",
|
||||||
unfree ? false,
|
unfree ? false,
|
||||||
|
tskey ? null,
|
||||||
pkgs ? import inputs.${repo}
|
pkgs ? import inputs.${repo}
|
||||||
{ inherit system; config.allowUnfree = unfree; hostPlatform = system; },
|
{ inherit system; config.allowUnfree = unfree; hostPlatform = system; },
|
||||||
pkgs-unstable ? import inputs.nixpkgs-unstable
|
pkgs-unstable ? import inputs.nixpkgs-unstable
|
||||||
{ inherit system; config.allowUnfree = unfree; hostPlatform = system; }
|
{ inherit system; config.allowUnfree = unfree; hostPlatform = system; }
|
||||||
}: {
|
}: {
|
||||||
autoStart = true;
|
autoStart = true;
|
||||||
privateNetwork = false;
|
privateNetwork = true;
|
||||||
specialArgs = { inherit pkgs pkgs-unstable hostname username desktop theme system repo unfree stateVersion; };
|
hostBridge = "br0";
|
||||||
config = { lib, config, pkgs, pkgs-unstable, hostname, username, desktop, theme, system, repo, stateVersion, ... }: {
|
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;
|
system.stateVersion = stateVersion;
|
||||||
imports = [ ../nixos/containers ];
|
imports = [
|
||||||
|
../nixos/containers
|
||||||
|
];
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -7,16 +7,11 @@
|
||||||
};
|
};
|
||||||
|
|
||||||
useDHCP = lib.mkDefault true;
|
useDHCP = lib.mkDefault true;
|
||||||
# enableIPv6 = lib.mkForce false;
|
enableIPv6 = lib.mkForce false;
|
||||||
firewall = {
|
firewall = {
|
||||||
enable = true;
|
enable = true;
|
||||||
allowedTCPPorts = [ ];
|
allowedTCPPorts = [ ];
|
||||||
allowedUDPPorts = [ ];
|
allowedUDPPorts = [ ];
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
# boot.kernel.sysctl = {
|
|
||||||
# "net.ipv6.conf.all.disable_ipv6" = true;
|
|
||||||
# };
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,11 +1,10 @@
|
||||||
{ hostname, username, ... }: {
|
{ hostname, username, ... }: {
|
||||||
import = [
|
imports = [
|
||||||
./${hostname}
|
./${hostname}
|
||||||
../users/${username}
|
../users/${username}
|
||||||
../common/modules/nixos.nix
|
../common/modules/nixos.nix
|
||||||
../common/modules/networking.nix
|
../common/modules/networking.nix
|
||||||
../common/services/tailscale-autoconnect.nix
|
|
||||||
];
|
];
|
||||||
|
|
||||||
networking.hostname = "${hostname}";
|
networking.hostName = "${hostname}";
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,9 +1,8 @@
|
||||||
{ hostname, username, desktop, ... }: {
|
{ hostname, username, desktop, tailscalekey, ... }: {
|
||||||
imports = [
|
imports = [
|
||||||
../../common/desktops/${desktop}
|
../../common/desktops/${desktop}
|
||||||
];
|
];
|
||||||
|
|
||||||
networking.hostName = "${hostname}";
|
|
||||||
networking.firewall.allowedTCPPorts = [ 3389 ];
|
networking.firewall.allowedTCPPorts = [ 3389 ];
|
||||||
|
|
||||||
services.xrdp = {
|
services.xrdp = {
|
||||||
|
|
|
@ -2,6 +2,14 @@
|
||||||
let
|
let
|
||||||
libx = import ../../../lib {inherit self inputs outputs stateVersion hmStateVersion pkgs-unstable pkgs; };
|
libx = import ../../../lib {inherit self inputs outputs stateVersion hmStateVersion pkgs-unstable pkgs; };
|
||||||
in {
|
in {
|
||||||
|
# TODO: Set up Tailscale key
|
||||||
|
|
||||||
|
# Set up the bridge network:
|
||||||
|
networking = {
|
||||||
|
bridges.br0.interfaces = [ "enp0s13f0u4" ]; # nmcli con show | grep Wired\ connection\ 2
|
||||||
|
interfaces.br0.useDHCP = true;
|
||||||
|
};
|
||||||
|
|
||||||
containers = {
|
containers = {
|
||||||
rdesktop = libx.mkContainer { hostname = "rdesktop"; desktop = "xfce"; unfree = true; };
|
rdesktop = libx.mkContainer { hostname = "rdesktop"; desktop = "xfce"; unfree = true; };
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in a new issue