mirror of
https://github.com/zoriya/flake.git
synced 2025-12-06 06:36:19 +00:00
Move window manager exclusive to wm module
This commit is contained in:
@@ -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];
|
||||
@@ -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 = ["一" "二" "三" " 四" "五" "六" "七" "八" "九"];
|
||||
};
|
||||
|
||||
41
environments/river/default.nix
Normal file
41
environments/river/default.nix
Normal 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;
|
||||
}
|
||||
@@ -21,7 +21,8 @@
|
||||
};
|
||||
in {
|
||||
imports = [
|
||||
../gui/apps.nix
|
||||
../../modules/gui
|
||||
../../modules/wm/home.nix
|
||||
];
|
||||
services.cliphist.enable = true;
|
||||
|
||||
@@ -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
18
flake.lock
generated
@@ -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",
|
||||
|
||||
@@ -102,8 +102,6 @@
|
||||
wally-cli
|
||||
ghostty.packages.x86_64-linux.default
|
||||
];
|
||||
|
||||
programs.gamescope.enable = true;
|
||||
})
|
||||
];
|
||||
|
||||
|
||||
@@ -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
|
||||
@@ -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
|
||||
'';
|
||||
};
|
||||
};
|
||||
}
|
||||
@@ -1,8 +1,4 @@
|
||||
{
|
||||
pkgs,
|
||||
lib,
|
||||
...
|
||||
}: let
|
||||
{pkgs, ...}: let
|
||||
covercolors = pkgs.stdenv.mkDerivation {
|
||||
name = "covercolors";
|
||||
dontUnpack = true;
|
||||
@@ -9,9 +9,9 @@
|
||||
"checkJs": true,
|
||||
"strict": true,
|
||||
"noImplicitAny": false,
|
||||
"baseUrl": "../../gui/ags",
|
||||
"baseUrl": ".",
|
||||
"typeRoots": [
|
||||
"../../gui/ags/types"
|
||||
"./types"
|
||||
],
|
||||
"skipLibCheck": true
|
||||
}
|
||||
@@ -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
19
modules/wm/home.nix
Normal 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
|
||||
];
|
||||
}
|
||||
Reference in New Issue
Block a user