SSH and sway and stuff

This commit is contained in:
Daniel Flanagan 2023-08-02 14:10:42 -05:00
parent 15a7aefef0
commit 84e5bf32b1
3 changed files with 109 additions and 55 deletions

View file

@ -5,7 +5,7 @@
programs.home-manager.enable = true; programs.home-manager.enable = true;
wayland.windowManager.sway = { # wayland.windowManager.sway = {
enable = true; # enable = true;
}; # };
} }

View file

@ -4,7 +4,33 @@
{ pkgs, ... }: { pkgs, ... }:
{ let
dbus-sway-environment = pkgs.writeTextFile {
name = "dbus-sway-environment";
destination = "/bin/dbus-sway-environment";
executable = true;
text = ''
dbus-update-activation-environment --systemd WAYLAND_DISPLAY XDG_CURRENT_DESKTOP=sway
systemctl --user stop wireplumber xdg-desktop-portal xdg-desktop-portal-wlr
systemctl --user start wireplumber xdg-desktop-portal xdg-desktop-portal-wlr
'';
};
configure-gtk = pkgs.writeTextFile {
name = "configure-gtk";
destination = "/bin/configure-gtk";
executable = true;
text = let
schema = pkgs.gsettings-desktop-schemas;
datadir = "${schema}/share/gsettings-schemas/${schema.name}";
in ''
export XDG_DATA_DIRS="${datadir}:$XDG_DATA_DIRS
gnome_schema = org.gnome.desktop.interface
gsettings set $gnome_schema gtk-theme 'Catppuccin-Mocha'
'';
};
in {
imports = imports =
[ # Include the results of the hardware scan. [ # Include the results of the hardware scan.
./thinker-hardware.nix ./thinker-hardware.nix
@ -14,6 +40,21 @@
boot.loader.systemd-boot.enable = true; boot.loader.systemd-boot.enable = true;
boot.loader.efi.canTouchEfiVariables = true; boot.loader.efi.canTouchEfiVariables = true;
hardware.opengl = {
enable = true;
driSupport = true;
};
xdg.portal = {
enable = true;
wlr.enable = true;
};
programs.sway = {
enable = true;
wrapperFeatures.gtk = true;
};
networking.hostName = "thinker"; # Define your hostname. networking.hostName = "thinker"; # Define your hostname.
# Pick only one of the below networking options. # Pick only one of the below networking options.
# networking.wireless.enable = true; # Enables wireless support via wpa_supplicant. # networking.wireless.enable = true; # Enables wireless support via wpa_supplicant.
@ -72,71 +113,75 @@
packages = []; packages = [];
}; };
services.dbus.enable = true;
# List packages installed in system profile. To search, run: # List packages installed in system profile. To search, run:
# $ nix search wget # $ nix search wget
# TODO: my font?
# TODO: wayland screensharing
# TODO: wireplumber?
environment.systemPackages = with pkgs; [ environment.systemPackages = with pkgs; [
age
bat
bind
bottom
brightnessctl
broot
curl curl
delta
dog
dtach dtach
dua
exa exa
fd fd
feh
firefox
fwupd fwupd
gimp
git git
delta
helix
ripgrep
sd
skim
mosh
bat
htop
bottom
hexyl
rsync
rclone
restic
unzip
dog
bind
nmap
traceroute
iputils
xh
age
sops
nnn
broot
dua
git-lfs git-lfs
grim
helix
hexyl
htop
inkscape
iputils
kitty
krita
libinput libinput
libinput-gestures libinput-gestures
brightnessctl
# TODO: my font?
noto-fonts
gimp
inkscape
krita
vlc
zathura
feh
kitty
pulsemixer
pavucontrol
pamixer
playerctl
# TODO: wireplumber?
swaybg
swaylock
waybar
wofi
swayidle
mako mako
mosh
nmap
nnn
noto-fonts
pamixer
pavucontrol
playerctl
pulsemixer
rclone
restic
ripgrep
rsync
sd
skim
slurp slurp
grim sops
wl-clipboard swaybg
wireplumber swayidle
# TODO: wayland screensharing swaylock
traceroute
unzip
vlc
watchexec watchexec
waybar
wget wget
wireplumber
wl-clipboard
wofi
xh
zathura
]; ];
programs.thunar.enable = true; programs.thunar.enable = true;
@ -159,8 +204,15 @@
# List services that you want to enable: # List services that you want to enable:
# Enable the OpenSSH daemon. services.openssh = {
services.openssh.enable = false; # TODO: disable password auth enable = true;
settings = {
PasswordAuthentication = false;
};
listenAddresses = [
{ addr = "0.0.0.0"; port = 22; }
];
};
# Open ports in the firewall. # Open ports in the firewall.
networking.firewall.allowedTCPPorts = [ 22 ]; networking.firewall.allowedTCPPorts = [ 22 ];

2
os/linux/nix/sway/config Normal file
View file

@ -0,0 +1,2 @@
exec dbus-sway-environment
exec configure-gtk