Move window manager exclusive to wm module

This commit is contained in:
2024-07-08 15:23:58 +07:00
parent 184ff78c09
commit 125f9a5eab
52 changed files with 70 additions and 139 deletions

View File

@@ -1,11 +1,8 @@
{
config,
lib,
pkgs,
inputs,
...
}:
{
}: {
services.xserver = {
enable = true;
displayManager = {
@@ -31,7 +28,7 @@
fileSystems."/home/zoriya/.local/share/gnome-shell/extensions/fairy@zoriya.dev" = {
device = "/home/zoriya/projects/fairy/";
fsType = "none";
options = [ "bind" ];
options = ["bind"];
};
environment.systemPackages = with pkgs; [gnome3.gnome-tweaks];

View File

@@ -1,5 +1,4 @@
{
config,
lib,
pkgs,
...
@@ -199,7 +198,7 @@ in {
show-indicator = false;
};
"org/gnome/shell/extensions/fairy" = {
"org/gnome/shell/extensions/fairy" = {
tag-names = ["" "" "" " " "" "" "" "" ""];
};

View File

@@ -0,0 +1,41 @@
{pkgs, ...}: {
imports = [
../../modules/wm
];
services.greetd = {
enable = true;
settings = {
default_session = {
command = "agreety --cmd /bin/sh";
user = "greeter";
};
initial_session = {
# TODO: Start river in locked mode or exit if locker crashes.
# zsh -c is to give river access to profile variables
command = "zsh -c river";
user = "zoriya";
};
};
};
xdg.portal = {
enable = true;
wlr.enable = true;
# gtk portal needed to make gtk apps happy
extraPortals = [pkgs.xdg-desktop-portal-gtk];
config.common.default = "*";
};
environment.systemPackages = with pkgs; [
wineWowPackages.stable
wineWowPackages.waylandFull
winetricks
];
hardware.steam-hardware.enable = true;
programs.gamescope.enable = true;
services.flatpak.enable = true;
virtualisation.libvirtd.enable = true;
programs.virt-manager.enable = true;
}

View File

@@ -21,7 +21,8 @@
};
in {
imports = [
../gui/apps.nix
../../modules/gui
../../modules/wm/home.nix
];
services.cliphist.enable = true;

View File

@@ -1,7 +1,7 @@
{lib, ...}: {
imports = [
# Install apps that I open with wslg (and tools like wl-clipboard which works)
../gui/apps.nix
../../modules/gui
];
gtk.enable = lib.mkForce false;

18
flake.lock generated
View File

@@ -1,22 +1,5 @@
{
"nodes": {
"dwl-source": {
"flake": false,
"locked": {
"lastModified": 1694364153,
"narHash": "sha256-dzSct9JfjeE65tdL4ny5VZhrhkWYX4hRQvjxJrfSXqU=",
"owner": "djpohly",
"repo": "dwl",
"rev": "755fcae2afbed51f38c167bdc56a5437cda8137a",
"type": "github"
},
"original": {
"owner": "djpohly",
"ref": "755fcae2afbed51f38c167bdc56a5437cda8137a",
"repo": "dwl",
"type": "github"
}
},
"flake-compat": {
"flake": false,
"locked": {
@@ -520,7 +503,6 @@
},
"root": {
"inputs": {
"dwl-source": "dwl-source",
"flood": "flood",
"ghostty": "ghostty",
"home-manager": "home-manager",

View File

@@ -102,8 +102,6 @@
wally-cli
ghostty.packages.x86_64-linux.default
];
programs.gamescope.enable = true;
})
];

View File

@@ -1,36 +1,21 @@
{
lib,
config,
pkgs,
...
}:
with lib; let
}: let
# When editing this, don't forget to edit home.sessionVariables.
browser = "firefox.desktop";
editor = "nvim.desktop";
pdf = "org.pwmt.zathura.desktop";
player = "mpv.desktop";
wallpaper = pkgs.writeShellScriptBin "wallpaper" ''
WALLPAPERS=~/wallpapers/
WP=$(find $WALLPAPERS -type f | shuf -n 1)
ln -fs "$WP" ~/.cache/current-wallpaper
${pkgs.wbg}/bin/wbg "$WP" > /dev/null 2> /dev/null & disown
echo "$WP"
'';
in {
imports = [
./ghostty.nix
./kitty.nix
./gtk.nix
./rofi
./ags
];
home.packages = with pkgs; [
wallpaper
google-chrome
discord
firefox
@@ -39,7 +24,6 @@ in {
zathura
libreoffice
qbittorrent
xdg-utils
youtube-music
wl-clipboard
wlr-randr

View File

@@ -1,55 +0,0 @@
{
lib,
config,
pkgs,
...
}:
with lib; let
cfg = config.modules.fcitx5;
in {
options.modules.fcitx5 = {enable = mkEnableOption "fcitx5";};
config = mkIf cfg.enable {
i18n = {
inputMethod = {
enabled = "fcitx5";
fcitx5.addons = with pkgs; [
fcitx5-mozc
];
};
};
xdg.configFile."fcitx5/config" = {
force = true;
text = ''
[Hotkey/TriggerKeys]
0=Shift+Super+L
[Behavior]
ShowInputMethodInformation=False
CompactInputMethodInformation=False
ShowFirstInputMethodInformation=False
'';
};
xdg.configFile."fcitx5/profile" = {
force = true;
text = ''
[Groups/0]
Name=Default
Default Layout=us
DefaultIM=mozc
[Groups/0/Items/0]
Name=keyboard-us
Layout=
[Groups/0/Items/1]
Name=mozc
Layout=
[GroupOrder]
0=Default
'';
};
};
}

View File

@@ -1,8 +1,4 @@
{
pkgs,
lib,
...
}: let
{pkgs, ...}: let
covercolors = pkgs.stdenv.mkDerivation {
name = "covercolors";
dontUnpack = true;

View File

@@ -9,9 +9,9 @@
"checkJs": true,
"strict": true,
"noImplicitAny": false,
"baseUrl": "../../gui/ags",
"baseUrl": ".",
"typeRoots": [
"../../gui/ags/types"
"./types"
],
"skipLibCheck": true
}

View File

@@ -1,20 +1,4 @@
{pkgs, ...}: {
services.greetd = {
enable = true;
settings = {
default_session = {
command = "agreety --cmd /bin/sh";
user = "greeter";
};
initial_session = {
# TODO: Start river in locked mode or exit if locker crashes.
# zsh -c is to give river access to profile variables
command = "zsh -c river";
user = "zoriya";
};
};
};
networking.networkmanager.enable = true;
hardware.pulseaudio.enable = false;
hardware.bluetooth = {
@@ -50,24 +34,9 @@
programs.dconf.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];
config.common.default = "*";
};
environment.systemPackages = with pkgs; [
gnome.gnome-bluetooth
polkit_gnome
wineWowPackages.stable
wineWowPackages.waylandFull
winetricks
];
hardware.steam-hardware.enable = true;
services.flatpak.enable = true;
virtualisation.libvirtd.enable = true;
programs.virt-manager.enable = true;
}

19
modules/wm/home.nix Normal file
View File

@@ -0,0 +1,19 @@
{pkgs, ...}: let
wallpaper = pkgs.writeShellScriptBin "wallpaper" ''
WALLPAPERS=~/wallpapers/
WP=$(find $WALLPAPERS -type f | shuf -n 1)
ln -fs "$WP" ~/.cache/current-wallpaper
${pkgs.wbg}/bin/wbg "$WP" > /dev/null 2> /dev/null & disown
echo "$WP"
'';
in {
imports = [
./rofi
./ags
];
home.packages = [
wallpaper
];
}