profiles/sway: init from legacy

This commit is contained in:
Felix Buehler 2023-03-19 12:38:08 +01:00
parent 97afc505cb
commit d72190bee6
11 changed files with 166 additions and 125 deletions

View file

@ -1,26 +0,0 @@
{ config, lib, pkgs, ... }:
{
location.provider = "geoclue2";
services.geoclue2 = {
enable = true;
enableDemoAgent = true;
appConfig."gammastep" = {
desktopID = "gammastep";
isAllowed = true;
isSystem = false;
# Empty list allows all users
users = [ ];
};
appConfig."gammastep-indicator" = {
desktopID = "gammastep-indicator";
isAllowed = true;
isSystem = false;
# Empty list allows all users
users = [ ];
};
};
}

View file

@ -1,25 +0,0 @@
{ config, lib, pkgs, ... }:
{
environment.systemPackages = with pkgs; [
remmina
teamviewer
];
services.pipewire.enable = true;
xdg.portal = {
enable = true;
extraPortals = with pkgs; [
xdg-desktop-portal-gtk
xdg-desktop-portal-wlr
];
};
# for firefox
environment.sessionVariables = {
MOZ_ENABLE_WAYLAND = "1";
XDG_CURRENT_DESKTOP = "sway";
XDG_SESSION_TYPE = "wayland";
GTK_USE_PORTAL = "1";
};
}

View file

@ -1,54 +0,0 @@
{ config, lib, pkgs, ... }:
{
imports = [
../modules/theme.nix
];
programs.light.enable = true;
environment.systemPackages = with pkgs; [
polkit_gnome
];
environment.pathsToLink = [ "/libexec" ];
programs.wshowkeys.enable = true;
programs.sway = {
enable = true;
wrapperFeatures = {
gtk = true;
base = true;
};
extraPackages = with pkgs; [
brightnessctl
dmenu
foot
gammastep
grim
i3status-rust
mako
slurp
swayidle
swaylock
wdisplays
wf-recorder
wl-clipboard
wofi
xwayland
wshowkeys
];
extraSessionCommands = ''
export XDG_SESSION_TYPE=wayland
export XDG_CURRENT_DESKTOP=sway
export SDL_VIDEODRIVER=wayland
export QT_QPA_PLATFORM=wayland
export QT_WAYLAND_DISABLE_WINDOWDECORATION="1"
export _JAVA_AWT_WM_NONREPARENTING=1
export CLUTTER_BACKEND=wayland
export SAL_USE_VCLPLUGIN=gtk3
export MOZ_ENABLE_WAYLAND=1
export MOZ_USE_XINPUT2=1
'';
};
}

View file

@ -1,17 +0,0 @@
{ config, lib, pkgs, ... }:
{
environment.systemPackages = with pkgs; [
gtk-engine-murrine
gtk_engines
gsettings-desktop-schemas
lxappearance
qgnomeplatform
numix-cursor-theme
numix-icon-theme
numix-icon-theme-circle
adwaita-qt
arc-kde-theme
arc-theme
];
qt5.platformTheme = "qt5ct";
}

View file

@ -14,11 +14,8 @@
../../legacy/modules/gaming.nix ../../legacy/modules/gaming.nix
../../legacy/modules/hardware-base.nix ../../legacy/modules/hardware-base.nix
../../legacy/modules/intel-video.nix ../../legacy/modules/intel-video.nix
../../legacy/modules/location.nix
../../legacy/modules/media.nix ../../legacy/modules/media.nix
../../legacy/modules/meeting.nix ../../legacy/modules/meeting.nix
../../legacy/modules/screen-sharing.nix
../../legacy/modules/sway.nix
../../legacy/modules/systemd-user.nix ../../legacy/modules/systemd-user.nix
../../legacy/modules/systemduefi.nix ../../legacy/modules/systemduefi.nix
../../legacy/modules/webcam.nix ../../legacy/modules/webcam.nix

View file

@ -11,6 +11,7 @@ in
latex.enable = true; latex.enable = true;
powersave.enable = true; powersave.enable = true;
printing.enable = true; printing.enable = true;
sway.enable = true;
sync.enable = true; sync.enable = true;
}; };
} }

View file

@ -8,6 +8,7 @@
./latex ./latex
./powersave ./powersave
./printing ./printing
./sway
./sync ./sync
]; ];
} }

72
profiles/sway/default.nix Normal file
View file

@ -0,0 +1,72 @@
{ config, lib, pkgs, ... }:
let
cfg = config.my.profiles.sway;
in
{
imports = [
./location.nix
./screen-sharing.nix
./theme.nix
];
options.my.profiles.sway = with lib; {
enable = mkEnableOption "sway profile";
};
config = lib.mkIf cfg.enable {
my.profiles = {
sway-location.enable = true;
sway-screen-sharing.enable = true;
sway-theme.enable = true;
};
environment.systemPackages = with pkgs; [
polkit_gnome
];
environment.pathsToLink = [ "/libexec" ];
programs.wshowkeys.enable = true;
programs.light.enable = true;
programs.sway = {
enable = true;
wrapperFeatures = {
gtk = true;
base = true;
};
extraPackages = with pkgs; [
brightnessctl
dmenu
foot
gammastep
grim
i3status-rust
mako
slurp
swayidle
swaylock
wdisplays
wf-recorder
wl-clipboard
wofi
xwayland
# wshowkeys
];
extraSessionCommands = ''
export XDG_SESSION_TYPE=wayland
export XDG_CURRENT_DESKTOP=sway
export SDL_VIDEODRIVER=wayland
export QT_QPA_PLATFORM=wayland
export QT_WAYLAND_DISABLE_WINDOWDECORATION="1"
export _JAVA_AWT_WM_NONREPARENTING=1
export CLUTTER_BACKEND=wayland
export SAL_USE_VCLPLUGIN=gtk3
export MOZ_ENABLE_WAYLAND=1
export MOZ_USE_XINPUT2=1
'';
};
};
}

View file

@ -0,0 +1,33 @@
{ config, lib, pkgs, ... }:
let
cfg = config.my.profiles.sway-location;
in
{
options.my.profiles.sway-location = with lib; {
enable = mkEnableOption "sway-location profile";
};
config = lib.mkIf cfg.enable {
location.provider = "geoclue2";
services.geoclue2 = {
enable = true;
enableDemoAgent = true;
appConfig."gammastep" = {
desktopID = "gammastep";
isAllowed = true;
isSystem = false;
# Empty list allows all users
users = [ ];
};
appConfig."gammastep-indicator" = {
desktopID = "gammastep-indicator";
isAllowed = true;
isSystem = false;
# Empty list allows all users
users = [ ];
};
};
};
}

View file

@ -0,0 +1,33 @@
{ config, lib, pkgs, ... }:
let
cfg = config.my.profiles.sway-screen-sharing;
in
{
options.my.profiles.sway-screen-sharing = with lib; {
enable = mkEnableOption "sway-screen-sharing profile";
};
config = lib.mkIf cfg.enable {
environment.systemPackages = with pkgs; [
remmina
];
services.pipewire.enable = true;
xdg.portal = {
enable = true;
extraPortals = with pkgs; [
xdg-desktop-portal-gtk
xdg-desktop-portal-wlr
];
};
# for firefox
environment.sessionVariables = {
MOZ_ENABLE_WAYLAND = "1";
XDG_CURRENT_DESKTOP = "sway";
XDG_SESSION_TYPE = "wayland";
GTK_USE_PORTAL = "1";
};
};
}

26
profiles/sway/theme.nix Normal file
View file

@ -0,0 +1,26 @@
{ config, lib, pkgs, ... }:
let
cfg = config.my.profiles.sway-theme;
in
{
options.my.profiles.sway-theme = with lib; {
enable = mkEnableOption "sway-theme profile";
};
config = lib.mkIf cfg.enable {
environment.systemPackages = with pkgs; [
gtk-engine-murrine
gtk_engines
gsettings-desktop-schemas
lxappearance
qgnomeplatform
numix-cursor-theme
numix-icon-theme
numix-icon-theme-circle
adwaita-qt
arc-kde-theme
arc-theme
];
qt5.platformTheme = "qt5ct";
};
}