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 = { fae = {
hostname = "192.168.178.35"; hostname = "192.168.13.35";
sshUser = "pub-solar"; sshUser = "pub-solar";
}; };
powder = { powder = {

View file

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

View file

@ -11,7 +11,7 @@
networking.networkmanager = { networking.networkmanager = {
# Enable networkmanager. REMEMBER to add yourself to group in order to use nm related stuff. # 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 # not as stable as wpa_supplicant yet, also more trouble with 5 GHz networks
#wifi.backend = "iwd"; #wifi.backend = "iwd";
}; };

View file

@ -12,9 +12,9 @@ in {
historyControl = ["ignorespace"]; historyControl = ["ignorespace"];
# Run when initializing a login shell # 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 [ "$(tty)" = "/dev/tty1" ] && exec systemd-cat --identifier=sway ${pkgs.sway}/bin/sway
''; '' else "";
# Run when initializing an interactive shell # Run when initializing an interactive shell
initExtra = '' initExtra = ''

View file

@ -24,7 +24,8 @@
VISUAL = "/etc/profiles/per-user/${psCfg.user.name}/bin/nvim"; VISUAL = "/etc/profiles/per-user/${psCfg.user.name}/bin/nvim";
# fix "xdg-open fork-bomb" your preferred browser from here # 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
NODE_REPL_HISTORY = "${xdg.dataHome}/node_repl_history"; NODE_REPL_HISTORY = "${xdg.dataHome}/node_repl_history";