mirror of
https://github.com/ryan4yin/nix-config.git
synced 2026-04-26 18:58:28 +02:00
feat: add new wayland compositor - niri
This commit is contained in:
@@ -1,85 +0,0 @@
|
||||
{
|
||||
pkgs,
|
||||
anyrun,
|
||||
...
|
||||
}:
|
||||
{
|
||||
programs.anyrun = {
|
||||
enable = true;
|
||||
config = {
|
||||
plugins = with anyrun.packages.${pkgs.system}; [
|
||||
applications
|
||||
randr
|
||||
rink
|
||||
shell
|
||||
symbols
|
||||
translate
|
||||
];
|
||||
|
||||
width.fraction = 0.3;
|
||||
y.absolute = 15;
|
||||
hidePluginInfo = true;
|
||||
closeOnClick = true;
|
||||
};
|
||||
|
||||
# custom css for anyrun, based on catppuccin-mocha
|
||||
extraCss = ''
|
||||
@define-color bg-col rgba(30, 30, 46, 0.7);
|
||||
@define-color bg-col-light rgba(150, 220, 235, 0.7);
|
||||
@define-color border-col rgba(30, 30, 46, 0.7);
|
||||
@define-color selected-col rgba(150, 205, 251, 0.7);
|
||||
@define-color fg-col #D9E0EE;
|
||||
@define-color fg-col2 #F28FAD;
|
||||
|
||||
* {
|
||||
transition: 200ms ease;
|
||||
font-family: "Maple Mono NF CN";
|
||||
font-size: 1.3rem;
|
||||
}
|
||||
|
||||
#window {
|
||||
background: transparent;
|
||||
}
|
||||
|
||||
#plugin,
|
||||
#main {
|
||||
border: 3px solid @border-col;
|
||||
color: @fg-col;
|
||||
background-color: @bg-col;
|
||||
}
|
||||
/* anyrun's input window - Text */
|
||||
#entry {
|
||||
color: @fg-col;
|
||||
background-color: @bg-col;
|
||||
}
|
||||
|
||||
/* anyrun's output matches entries - Base */
|
||||
#match {
|
||||
color: @fg-col;
|
||||
background: @bg-col;
|
||||
}
|
||||
|
||||
/* anyrun's selected entry - Red */
|
||||
#match:selected {
|
||||
color: @fg-col2;
|
||||
background: @selected-col;
|
||||
}
|
||||
|
||||
#match {
|
||||
padding: 3px;
|
||||
border-radius: 16px;
|
||||
}
|
||||
|
||||
#entry, #plugin:hover {
|
||||
border-radius: 16px;
|
||||
}
|
||||
|
||||
box#main {
|
||||
background: rgba(30, 30, 46, 0.7);
|
||||
border: 1px solid @border-col;
|
||||
border-radius: 15px;
|
||||
padding: 5px;
|
||||
}
|
||||
'';
|
||||
};
|
||||
}
|
||||
@@ -1,6 +1,5 @@
|
||||
{
|
||||
pkgs,
|
||||
pkgs-stable,
|
||||
config,
|
||||
...
|
||||
}:
|
||||
@@ -11,38 +10,12 @@ in
|
||||
xdg.configFile =
|
||||
let
|
||||
mkSymlink = config.lib.file.mkOutOfStoreSymlink;
|
||||
hyprPath = "${config.home.homeDirectory}/nix-config/home/linux/gui/hyprland/conf";
|
||||
confPath = "${config.home.homeDirectory}/nix-config/home/linux/gui/hyprland/conf";
|
||||
in
|
||||
{
|
||||
"mako".source = mkSymlink "${hyprPath}/mako";
|
||||
"waybar".source = mkSymlink "${hyprPath}/waybar";
|
||||
"wlogout".source = mkSymlink "${hyprPath}/wlogout";
|
||||
"hypr/hypridle.conf".source = mkSymlink "${hyprPath}/hypridle.conf";
|
||||
"hypr/configs".source = mkSymlink "${hyprPath}/configs";
|
||||
"hypr/configs".source = mkSymlink confPath;
|
||||
};
|
||||
|
||||
# status bar
|
||||
programs.waybar = {
|
||||
enable = true;
|
||||
systemd.enable = true;
|
||||
};
|
||||
# Disable catppuccin to avoid conflict with my non-nix config.
|
||||
catppuccin.waybar.enable = false;
|
||||
|
||||
# screen locker
|
||||
programs.swaylock.enable = true;
|
||||
|
||||
# Logout Menu
|
||||
programs.wlogout.enable = true;
|
||||
catppuccin.wlogout.enable = false;
|
||||
|
||||
# Hyprland idle daemon
|
||||
services.hypridle.enable = true;
|
||||
|
||||
# notification daemon, the same as dunst
|
||||
services.mako.enable = true;
|
||||
catppuccin.mako.enable = false;
|
||||
|
||||
# NOTE:
|
||||
# We have to enable hyprland/i3's systemd user service in home-manager,
|
||||
# so that gammastep/wallpaper-switcher's user service can be start correctly!
|
||||
|
||||
@@ -1,20 +0,0 @@
|
||||
{
|
||||
pkgs,
|
||||
...
|
||||
}:
|
||||
{
|
||||
|
||||
home.packages = with pkgs; [
|
||||
swaybg # the wallpaper
|
||||
wl-clipboard # copying and pasting
|
||||
hyprpicker # color picker
|
||||
brightnessctl
|
||||
|
||||
hyprshot # screen shot
|
||||
wf-recorder # screen recording
|
||||
|
||||
# audio
|
||||
alsa-utils # provides amixer/alsamixer/...
|
||||
networkmanagerapplet # provide GUI app: nm-connection-editor
|
||||
];
|
||||
}
|
||||
@@ -1,54 +0,0 @@
|
||||
{
|
||||
pkgs,
|
||||
...
|
||||
}:
|
||||
{
|
||||
home.packages = with pkgs; [
|
||||
# firefox-wayland
|
||||
nixpaks.firefox
|
||||
nixpaks.firefox-desktop-item
|
||||
];
|
||||
|
||||
programs = {
|
||||
# source code: https://github.com/nix-community/home-manager/blob/master/modules/programs/chromium.nix
|
||||
google-chrome = {
|
||||
enable = true;
|
||||
package = if pkgs.stdenv.isAarch64 then pkgs.chromium else pkgs.google-chrome;
|
||||
|
||||
# https://wiki.archlinux.org/title/Chromium#Native_Wayland_support
|
||||
commandLineArgs = [
|
||||
"--ozone-platform-hint=auto"
|
||||
"--ozone-platform=wayland"
|
||||
# make it use GTK_IM_MODULE if it runs with Gtk4, so fcitx5 can work with it.
|
||||
# (only supported by chromium/chrome at this time, not electron)
|
||||
"--gtk-version=4"
|
||||
# make it use text-input-v1, which works for kwin 5.27 and weston
|
||||
"--enable-wayland-ime"
|
||||
|
||||
# enable hardware acceleration - vulkan api
|
||||
# "--enable-features=Vulkan"
|
||||
];
|
||||
};
|
||||
|
||||
vscode = {
|
||||
enable = true;
|
||||
package = pkgs.vscode.override {
|
||||
isInsiders = false;
|
||||
# https://wiki.archlinux.org/title/Wayland#Electron
|
||||
commandLineArgs = [
|
||||
"--ozone-platform-hint=auto"
|
||||
"--ozone-platform=wayland"
|
||||
# make it use GTK_IM_MODULE if it runs with Gtk4, so fcitx5 can work with it.
|
||||
# (only supported by chromium/chrome at this time, not electron)
|
||||
"--gtk-version=4"
|
||||
# make it use text-input-v1, which works for kwin 5.27 and weston
|
||||
"--enable-wayland-ime"
|
||||
|
||||
# TODO: fix https://github.com/microsoft/vscode/issues/187436
|
||||
# still not works...
|
||||
"--password-store=gnome" # use gnome-keyring as password store
|
||||
];
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
Reference in New Issue
Block a user