From 19b4ca7c2dda71cef3b89e6e560851c9096ec129 Mon Sep 17 00:00:00 2001 From: albert Date: Wed, 20 Mar 2024 11:44:14 +0900 Subject: [PATCH] Testing --- home-manager/common/software/cli/starship.nix | 9 +++--- nixos/common/desktops/xfce/default.nix | 29 +++++++++++++++++++ nixos/containers/rdesktop.nix | 26 +++++++++++++++++ nixos/hosts/framework-server/default.nix | 1 + 4 files changed, 61 insertions(+), 4 deletions(-) create mode 100644 nixos/common/desktops/xfce/default.nix create mode 100644 nixos/containers/rdesktop.nix diff --git a/home-manager/common/software/cli/starship.nix b/home-manager/common/software/cli/starship.nix index db332dae..8ead493b 100644 --- a/home-manager/common/software/cli/starship.nix +++ b/home-manager/common/software/cli/starship.nix @@ -21,10 +21,11 @@ in enableBashIntegration = true; settings = { format = lib.concatStrings [ - "[](${usernameBG})" - "$username" - "$hostname" - "[](bg:${directoryBG} fg:${usernameBG})" +# "[](${usernameBG})" +# "$username" +# "$hostname" +# "[](bg:${directoryBG} fg:${usernameBG})" + "[](${directoryBG})" "$directory" "[](fg:${directoryBG} bg:${statusBG})" "$git_branch" diff --git a/nixos/common/desktops/xfce/default.nix b/nixos/common/desktops/xfce/default.nix new file mode 100644 index 00000000..169d4963 --- /dev/null +++ b/nixos/common/desktops/xfce/default.nix @@ -0,0 +1,29 @@ +{ lib, inputs, config, pkgs, username, hostname, gpu, ... }: { + # Enable sound with pipewire. + sound.enable = true; + hardware.pulseaudio.enable = false; + security.rtkit.enable = true; + services.pipewire = { + enable = true; + alsa.enable = true; + alsa.support32Bit = true; + pulse.enable = true; + }; + + # Configure keymap in X11 + services.xserver = { + enable = true; + layout = "us"; + xkbVariant = ""; + autorun = true; + desktopManager.xfce.enable = true; + }; + + environment.systemPackages = with pkgs; [ + arc-kde-theme + arc-theme + papirus-icon-theme + plasma-theme-switcher + tailscale-systray + ]; +} diff --git a/nixos/containers/rdesktop.nix b/nixos/containers/rdesktop.nix new file mode 100644 index 00000000..2ac73514 --- /dev/null +++ b/nixos/containers/rdesktop.nix @@ -0,0 +1,26 @@ +{ stateversion, username, ... }: { + containers.desktop = { + autoStart = true; + privateNetwork = false; + config = { config, pkgs, lib, ... }: { + networking.hostName = "nixos-rdesktop"; + system.stateVersion = stateversion; + + imports = [ + ../common/desktops/xfce + ]; + + networking.firewall = { + enable = true; + allowedTCPPorts = [ 3390 ]; + }; + + services.xrdp = { + enable = true; + openFirewall = true; + port = 3390; + defaultWindowManager = "xfce4-session"; + }; + }; + }; +} diff --git a/nixos/hosts/framework-server/default.nix b/nixos/hosts/framework-server/default.nix index bd075067..9dc89d08 100644 --- a/nixos/hosts/framework-server/default.nix +++ b/nixos/hosts/framework-server/default.nix @@ -8,6 +8,7 @@ ../../common/modules/ssh-luks.nix ../../common/services/docker.nix ../../common/services/tailscale-autoconnect.nix + ../../containers/rdesktop.nix ./disks.nix ./builder.nix ./wireguard.nix