This commit is contained in:
albert 2024-04-05 18:25:03 +09:00
parent 98ab0aa25e
commit 9f62a205c7
No known key found for this signature in database
GPG key ID: 64F6C4EB46C4543A
5 changed files with 22 additions and 30 deletions

View file

@ -1,67 +1,67 @@
{ lib, ... }: { { ... }: {
xdg.configFile."displays" = { xdg.configFile."displays" = {
enable = true; enable = true;
target = "xfce4/xfconf/xfce-perchannel-xml/displays.xml"; target = "xfce4/xfconf/xfce-perchannel-xml/displays.xml";
text = lib.readFile "xfce/xfconf/displays.xml"; text = builtins.readFile ./xfconf/displays.xml;
}; };
xdg.configFile."thunar" = { xdg.configFile."thunar" = {
enable = true; enable = true;
target = "xfce4/xfconf/xfce-perchannel-xml/thunar.xml"; target = "xfce4/xfconf/xfce-perchannel-xml/thunar.xml";
text = lib.readFile "xfce/xfconf/thunar.xml"; text = builtins.readFile ./xfconf/thunar.xml;
}; };
xdg.configFile."xfce4-appfinder" = { xdg.configFile."xfce4-appfinder" = {
enable = true; enable = true;
target = "xfce4/xfconf/xfce-perchannel-xml/xfce4-appfinder.xml"; target = "xfce4/xfconf/xfce-perchannel-xml/xfce4-appfinder.xml";
text = lib.readFile "xfce/xfconf/xfce4-appfinder.xml"; text = builtins.readFile ./xfconf/xfce4-appfinder.xml;
}; };
xdg.configFile."xfce4-desktop" = { xdg.configFile."xfce4-desktop" = {
enable = true; enable = true;
target = "xfce4/xfconf/xfce-perchannel-xml/xfce4-desktop.xml"; target = "xfce4/xfconf/xfce-perchannel-xml/xfce4-desktop.xml";
text = lib.readFile "xfce/xfconf/xfce4-desktop.xml"; text = builtins.readFile ./xfconf/xfce4-desktop.xml;
}; };
xdg.configFile."xfce4-keyboard-shortcuts" = { xdg.configFile."xfce4-keyboard-shortcuts" = {
enable = true; enable = true;
target = "xfce4/xfconf/xfce-perchannel-xml/xfce4-keyboard-shortcuts.xml"; target = "xfce4/xfconf/xfce-perchannel-xml/xfce4-keyboard-shortcuts.xml";
text = lib.readFile "xfce/xfconf/xfce4-keyboard-shortcuts.xml"; text = builtins.readFile ./xfconf/xfce4-keyboard-shortcuts.xml;
}; };
xdg.configFile."xfce4-notifyd" = { xdg.configFile."xfce4-notifyd" = {
enable = true; enable = true;
target = "xfce4/xfconf/xfce-perchannel-xml/xfce4-notifyd.xml"; target = "xfce4/xfconf/xfce-perchannel-xml/xfce4-notifyd.xml";
text = lib.readFile "xfce/xfconf/xfce4-notifyd.xml"; text = builtins.readFile ./xfconf/xfce4-notifyd.xml;
}; };
xdg.configFile."xfce4-panel" = { xdg.configFile."xfce4-panel" = {
enable = true; enable = true;
target = "xfce4/xfconf/xfce-perchannel-xml/xfce4-panel.xml"; target = "xfce4/xfconf/xfce-perchannel-xml/xfce4-panel.xml";
text = lib.readFile "xfce/xfconf/xfce4-panel.xml"; text = builtins.readFile ./xfconf/xfce4-panel.xml;
}; };
xdg.configFile."xfce4-power-manager" = { xdg.configFile."xfce4-power-manager" = {
enable = true; enable = true;
target = "xfce4/xfconf/xfce-perchannel-xml/xfce4-power-manager.xml"; target = "xfce4/xfconf/xfce-perchannel-xml/xfce4-power-manager.xml";
text = lib.readFile "xfce/xfconf/xfce4-power-manager.xml"; text = builtins.readFile ./xfconf/xfce4-power-manager.xml;
}; };
xdg.configFile."xfce4-screenshotter" = { xdg.configFile."xfce4-screenshotter" = {
enable = true; enable = true;
target = "xfce4/xfconf/xfce-perchannel-xml/xfce4-screenshotter.xml"; target = "xfce4/xfconf/xfce-perchannel-xml/xfce4-screenshotter.xml";
text = lib.readFile "xfce/xfconf/xfce4-screenshotter.xml"; text = builtins.readFile ./xfconf/xfce4-screenshooter.xml;
}; };
xdg.configFile."xfce4-settings-editor" = { xdg.configFile."xfce4-settings-editor" = {
enable = true; enable = true;
target = "xfce4/xfconf/xfce-perchannel-xml/xfce4-settings-editor.xml"; target = "xfce4/xfconf/xfce-perchannel-xml/xfce4-settings-editor.xml";
text = lib.readFile "xfce/xfconf/xfce4-settings-editor.xml"; text = builtins.readFile ./xfconf/xfce4-settings-editor.xml;
}; };
xdg.configFile."xfce4-terminal" = { xdg.configFile."xfce4-terminal" = {
enable = true; enable = true;
target = "xfce4/xfconf/xfce-perchannel-xml/xfce4-terminal.xml"; target = "xfce4/xfconf/xfce-perchannel-xml/xfce4-terminal.xml";
text = lib.readFile "xfce/xfconf/xfce4-terminal.xml"; text = builtins.readFile ./xfconf/xfce4-terminal.xml;
}; };
xdg.configFile."xfwm4" = { xdg.configFile."xfwm4" = {
enable = true; enable = true;
target = "xfce4/xfconf/xfce-perchannel-xml/xfwm4.xml"; target = "xfce4/xfconf/xfce-perchannel-xml/xfwm4.xml";
text = lib.readFile "xfce/xfconf/xfwm4.xml"; text = builtins.readFile ./xfconf/xfwm4.xml;
}; };
xdg.configFile."xsettings.xml" = { xdg.configFile."xsettings.xml" = {
enable = true; enable = true;
target = "xfce4/xfconf/xfce-perchannel-xml/xsettings.xml.xml"; target = "xfce4/xfconf/xfce-perchannel-xml/xsettings.xml.xml";
text = lib.readFile "xfce/xfconf/xsettings.xml.xml"; text = builtins.readFile ./xfconf/xsettings.xml.xml;
}; };
} }

View file

@ -1,9 +1,8 @@
{ pkgs, lib, stateVersion, hostname, username, ... }: { { stateVersion, hostname, username, ... }: {
imports = [ imports = [
./${hostname} ./${hostname}
../users/${username} ../users/${username}
../common/modules/nixos.nix ../common/modules/nixos.nix
# ,../common/modules/networking.nix
# Services # Services
../common/services/promtail.nix ../common/services/promtail.nix
../common/services/telegraf.nix ../common/services/telegraf.nix
@ -12,8 +11,7 @@
boot.isContainer = true; boot.isContainer = true;
system.stateVersion = stateVersion; system.stateVersion = stateVersion;
networking.hostName = hostname;
networking.hostName = "${hostname}";
# Set up the secrets file: # Set up the secrets file:
sops.secrets."tailscale_key" = { sops.secrets."tailscale_key" = {

View file

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

View file

@ -4,13 +4,6 @@ let
lanInterface = "enp0s13f0u4"; lanInterface = "enp0s13f0u4";
in { in {
containers = { containers = {
rdesktop = libx.mkContainer { hostname = "rdesktop"; }; rdesktop = libx.mkContainer { hostname = "rdesktop"; unfree = true; desktop = "xfce"; };
};
networking = {
nat.enable = true;
nat.internalInterfaces = [ "ve-+" ];
nat.externalInterface = lanInterface;
firewall.extraCommands = ''iptables -t nat -A POSTROUTING -o ${lanInterface} -j MASQUERADE'';
}; };
} }

View file

@ -15,6 +15,7 @@ in {
++ ifExists [ "video" ] ++ ifExists [ "video" ]
++ ifExists [ "docker" ] ++ ifExists [ "docker" ]
++ ifExists [ "podman" ] ++ ifExists [ "podman" ]
++ ifExists [ "xrdp" ]
++ ifExists [ "syncthing" ]; ++ ifExists [ "syncthing" ];
# mkpasswd -m sha-512 # mkpasswd -m sha-512
hashedPassword = "$y$j9T$wKLsIWaA4Gf63RvjedwLJ0$EHKL6BBJV0CAxEKcHHjaBqW085KJ/MGvmbyWzmcWOy6"; hashedPassword = "$y$j9T$wKLsIWaA4Gf63RvjedwLJ0$EHKL6BBJV0CAxEKcHHjaBqW085KJ/MGvmbyWzmcWOy6";