fae: improve headless setup by conditionally

checking if sway is enabled
This commit is contained in:
teutat3s 2024-04-13 02:05:59 +02:00
parent 0370dd3c0c
commit e36a4d48f3
Signed by: teutat3s
GPG key ID: 4FA1D3FA524F22C1
5 changed files with 9 additions and 7 deletions

View file

@ -109,7 +109,7 @@
#};
fae = {
hostname = "192.168.178.35";
hostname = "192.168.13.35";
sshUser = "pub-solar";
};
powder = {

View file

@ -15,7 +15,7 @@
};
};
networking.hostName = "fae";
networking.hostName = "paperless";
services.openssh = {
enable = true;
@ -26,7 +26,8 @@
"boot.shell_on_fail=1"
];
environment.noXlibs = true;
# Would decrease closure size, but currenly broken (cairo)
#environment.noXlibs = true;
nix = {
gc.automatic = true;

View file

@ -11,7 +11,7 @@
networking.networkmanager = {
# Enable networkmanager. REMEMBER to add yourself to group in order to use nm related stuff.
enable = lib.mkDefault true;
enable = if config.programs.sway.enable then lib.mkDefault true else false;
# not as stable as wpa_supplicant yet, also more trouble with 5 GHz networks
#wifi.backend = "iwd";
};

View file

@ -12,9 +12,9 @@ in {
historyControl = ["ignorespace"];
# Run when initializing a login shell
profileExtra = ''
profileExtra = if config.programs.sway.enable then ''
[ "$(tty)" = "/dev/tty1" ] && exec systemd-cat --identifier=sway ${pkgs.sway}/bin/sway
'';
'' else "";
# Run when initializing an interactive shell
initExtra = ''

View file

@ -24,7 +24,8 @@
VISUAL = "/etc/profiles/per-user/${psCfg.user.name}/bin/nvim";
# fix "xdg-open fork-bomb" your preferred browser from here
BROWSER = "${pkgs.firefox-wayland}/bin/firefox";
BROWSER = if config.programs.sway.enable then "${pkgs.firefox-wayland}/bin/firefox" else "";
# node
NODE_REPL_HISTORY = "${xdg.dataHome}/node_repl_history";