change phone

This commit is contained in:
2023-09-24 02:18:16 +02:00
parent 58c174a1fc
commit 8cc3783614
2 changed files with 39 additions and 3 deletions

View File

@@ -38,9 +38,9 @@
zramSwap.enable = true; zramSwap.enable = true;
# Auto-login for phosh # Auto-login for phosh
services.xserver.desktopManager.phosh = { # services.xserver.desktopManager.phosh = {
user = "dominik"; # user = "dominik";
}; # };
# #
# User configuration # User configuration
@@ -59,6 +59,7 @@
]; ];
}; };
# Auto-login and start sway
services.getty.autologinUser = "dominik"; services.getty.autologinUser = "dominik";
environment.loginShellInit = '' environment.loginShellInit = ''
[[ "$(tty)" == /dev/tty1 ]] && sway [[ "$(tty)" == /dev/tty1 ]] && sway

View File

@@ -1,10 +1,37 @@
{ pkgs, ... }: { pkgs, ... }:
let 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 pipewire pipewire-media-session xdg-desktop-portal xdg-desktop-portal-wlr
systemctl --user start pipewire pipewire-media-session 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 'Dracula'
'';
};
in in
{ {
environment.systemPackages = with pkgs; [ environment.systemPackages = with pkgs; [
alsaUtils alsaUtils
dracula-theme dracula-theme
dbus-sway-environment
configure-gtk
firefox firefox
foot foot
git git
@@ -32,6 +59,14 @@ in
virtualisation.waydroid.enable = true; virtualisation.waydroid.enable = true;
services.dbus.enable = true;
xdg.portal = {
enable = true;
wlr.enable = true;
# gtk portal needed to make gtk apps happy
extraPortals = [ pkgs.xdg-desktop-portal-gtk ];
};
programs.sway = { programs.sway = {
enable = true; enable = true;
wrapperFeatures.gtk = true; wrapperFeatures.gtk = true;