mirror of
https://github.com/ryan4yin/nix-config.git
synced 2026-04-23 01:08:32 +02:00
refactor(home/linux/desktop): home/linux/desktop => home/linux/gui
This commit is contained in:
4
home/linux/gui/i3/values/default.nix
Normal file
4
home/linux/gui/i3/values/default.nix
Normal file
@@ -0,0 +1,4 @@
|
||||
{mylib, ...} @ args:
|
||||
map
|
||||
(path: import path args)
|
||||
(mylib.scanPaths ./.)
|
||||
51
home/linux/gui/i3/values/i3.nix
Normal file
51
home/linux/gui/i3/values/i3.nix
Normal file
@@ -0,0 +1,51 @@
|
||||
{
|
||||
lib,
|
||||
polybar-themes,
|
||||
...
|
||||
}: {
|
||||
# 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!
|
||||
# they are all depending on hyprland/i3's user graphical-session
|
||||
xsession = {
|
||||
enable = true;
|
||||
windowManager.i3 = {
|
||||
enable = true;
|
||||
config = lib.mkForce null; # ignores all home-manager's default i3 config
|
||||
extraConfig = builtins.readFile ../conf/i3-config;
|
||||
};
|
||||
# Path, relative to HOME, where Home Manager should write the X session script.
|
||||
# and NixOS will use it to start xorg session when system boot up
|
||||
scriptPath = ".xsession";
|
||||
};
|
||||
|
||||
xdg.configFile = {
|
||||
"i3/scripts" = {
|
||||
source = ../conf/scripts;
|
||||
# copy the scripts directory recursively
|
||||
recursive = true;
|
||||
executable = true; # make all scripts executable
|
||||
};
|
||||
};
|
||||
|
||||
home.file = {
|
||||
".config/polybar" = {
|
||||
source = ../conf/polybar;
|
||||
recursive = true;
|
||||
executable = true;
|
||||
};
|
||||
".local/share/fonts" = {
|
||||
source = "${polybar-themes}/fonts";
|
||||
recursive = true;
|
||||
};
|
||||
|
||||
".local/bin" = {
|
||||
source = ../bin;
|
||||
recursive = true;
|
||||
executable = true;
|
||||
};
|
||||
|
||||
# xrandr - set primary screen
|
||||
".screenlayout/monitor.sh".source = ../conf/dual-monitor-4k-1080p.sh;
|
||||
};
|
||||
}
|
||||
28
home/linux/gui/i3/values/packages.nix
Normal file
28
home/linux/gui/i3/values/packages.nix
Normal file
@@ -0,0 +1,28 @@
|
||||
{pkgs, ...}: {
|
||||
home.packages = with pkgs; [
|
||||
# required by https://github.com/adi1090x/polybar-themes
|
||||
rofi # application launcher, the same as dmenu
|
||||
polybar # status bar
|
||||
pywal # generate color scheme from wallpaper
|
||||
calc
|
||||
networkmanager_dmenu # network manager
|
||||
|
||||
dunst # notification daemon
|
||||
i3lock # default i3 screen locker
|
||||
xautolock # lock screen after some time
|
||||
picom # transparency and shadows
|
||||
feh # set wallpaper
|
||||
xcolor # color picker
|
||||
xsel # for clipboard support in x11, required by tmux's clipboard support
|
||||
|
||||
acpi # battery information
|
||||
arandr # screen layout manager
|
||||
dex # autostart applications
|
||||
xbindkeys # bind keys to commands
|
||||
xorg.xbacklight # control screen brightness, the same as light
|
||||
xorg.xdpyinfo # get screen information
|
||||
scrot # minimal screen capture tool, used by i3 blur lock to take a screenshot
|
||||
sysstat # get system information
|
||||
alsa-utils # provides amixer/alsamixer/...
|
||||
];
|
||||
}
|
||||
29
home/linux/gui/i3/values/x11-apps.nix
Normal file
29
home/linux/gui/i3/values/x11-apps.nix
Normal file
@@ -0,0 +1,29 @@
|
||||
{
|
||||
pkgs,
|
||||
pkgs-unstable,
|
||||
...
|
||||
}: {
|
||||
home.packages = with pkgs; [
|
||||
firefox
|
||||
];
|
||||
|
||||
programs = {
|
||||
# source code: https://github.com/nix-community/home-manager/blob/master/modules/programs/chromium.nix
|
||||
google-chrome = {
|
||||
enable = true;
|
||||
|
||||
# chrome wayland support was broken on nixos-unstable branch, so fallback to stable branch for now
|
||||
# https://github.com/swaywm/sway/issues/7562
|
||||
package = pkgs.google-chrome;
|
||||
|
||||
# commandLineArgs = [
|
||||
# ];
|
||||
};
|
||||
vscode = {
|
||||
enable = true;
|
||||
package = pkgs-unstable.vscode;
|
||||
# let vscode sync and update its configuration & extensions across devices, using github account.
|
||||
# userSettings = {};
|
||||
};
|
||||
};
|
||||
}
|
||||
Reference in New Issue
Block a user