Various updates

This commit is contained in:
albert 2024-04-07 21:05:15 +09:00
parent e6d0788eb7
commit 68626d74f2
No known key found for this signature in database
GPG key ID: 64F6C4EB46C4543A
5 changed files with 20 additions and 44 deletions

View file

@ -50,7 +50,7 @@
( import ../nixos/containers/mounts.nix ) ( import ../nixos/containers/mounts.nix )
( import ../nixos/containers/${hostname}/mounts.nix ) ( import ../nixos/containers/${hostname}/mounts.nix )
]; ];
ephemeral = false; ephemeral = ephemeral;
autoStart = true; autoStart = true;
privateNetwork = true; privateNetwork = true;
hostBridge = "nix-br0"; hostBridge = "nix-br0";

View file

@ -8,6 +8,7 @@
../common/services/promtail.nix ../common/services/promtail.nix
../common/services/telegraf.nix ../common/services/telegraf.nix
../common/services/openssh.nix ../common/services/openssh.nix
../common/services/gnupg-agent.nix
]; ];
networking.interfaces.eth0.ipv4.addresses = [{ networking.interfaces.eth0.ipv4.addresses = [{
@ -50,4 +51,18 @@
100.64.0.14 influx.sysctl.io 100.64.0.14 influx.sysctl.io
100.64.0.14 loki.sysctl.io 100.64.0.14 loki.sysctl.io
''; '';
# Select internationalisation properties.
i18n.defaultLocale = "en_US.UTF-8";
i18n.extraLocaleSettings = {
LC_ADDRESS = "en_US.UTF-8";
LC_IDENTIFICATION = "en_US.UTF-8";
LC_MEASUREMENT = "en_US.UTF-8";
LC_MONETARY = "en_US.UTF-8";
LC_NAME = "en_US.UTF-8";
LC_NUMERIC = "en_US.UTF-8";
LC_PAPER = "en_US.UTF-8";
LC_TELEPHONE = "en_US.UTF-8";
LC_TIME = "en_US.UTF-8";
};
} }

View file

@ -1,8 +1,4 @@
{ username, ... }: { desktop, username, ... }: {
let
unfree = true;
desktop = "xfce";
in {
imports = [ imports = [
../../users/${username} ../../users/${username}
../../common/desktops/${desktop} ../../common/desktops/${desktop}

View file

@ -4,7 +4,7 @@ let
in { in {
containers = { containers = {
rdesktop = libx.mkContainer { hostname = "rdesktop"; ip = "2"; }; rdesktop = libx.mkContainer { hostname = "rdesktop"; ip = "2"; desktop = "xfce"; unfree = true; };
}; };
# Networking config # Networking config

View file

@ -1,5 +1,4 @@
# Auto-generated using compose2nix v0.1.6. { ... }: {
{ pkgs, lib, ... }: {
# Containers # Containers
virtualisation.oci-containers.containers."piaware" = { virtualisation.oci-containers.containers."piaware" = {
image = "ghcr.io/sdr-enthusiasts/docker-piaware:latest"; image = "ghcr.io/sdr-enthusiasts/docker-piaware:latest";
@ -18,38 +17,4 @@
"--network=piaware-default" "--network=piaware-default"
]; ];
}; };
systemd.services."podman-piaware" = {
serviceConfig = {
Restart = lib.mkOverride 500 "always";
};
after = [ "podman-network-piaware-default.service" ];
requires = [ "podman-network-piaware-default.service" ];
partOf = [ "podman-compose-piaware-root.target" ];
wantedBy = [ "podman-compose-piaware-root.target" ];
};
# Networks
systemd.services."podman-network-piaware-default" = {
path = [ pkgs.podman ];
serviceConfig = {
Type = "oneshot";
RemainAfterExit = true;
ExecStop = "${pkgs.podman}/bin/podman network rm -f piaware-default";
};
script = ''
podman network inspect piaware-default || podman network create piaware-default --opt isolate=true
'';
partOf = [ "podman-compose-piaware-root.target" ];
wantedBy = [ "podman-compose-piaware-root.target" ];
};
# Root service
# When started, this will automatically create all resources and start
# the containers. When stopped, this will teardown all resources.
systemd.targets."podman-compose-piaware-root" = {
unitConfig = {
Description = "Root target generated by compose2nix.";
};
wantedBy = [ "multi-user.target" ];
};
} }