mirror of
https://github.com/ryan4yin/nix-config.git
synced 2026-04-25 18:28:41 +02:00
feat: modular i3's configurations
This commit is contained in:
@@ -8,7 +8,7 @@ with lib; let
|
||||
cfg = config.modules.desktop.i3;
|
||||
in {
|
||||
imports = [
|
||||
./nvidia.nix
|
||||
./options
|
||||
];
|
||||
|
||||
options.modules.desktop.i3 = {
|
||||
@@ -16,13 +16,6 @@ in {
|
||||
};
|
||||
|
||||
config = mkIf cfg.enable (
|
||||
mkMerge
|
||||
(map
|
||||
(path: import path args)
|
||||
[
|
||||
./i3.nix
|
||||
./packages.nix
|
||||
./x11-apps.nix
|
||||
])
|
||||
mkMerge (import ./values args)
|
||||
);
|
||||
}
|
||||
|
||||
3
home/linux/desktop/i3/options/default.nix
Normal file
3
home/linux/desktop/i3/options/default.nix
Normal file
@@ -0,0 +1,3 @@
|
||||
{mylib, ...}: {
|
||||
imports = mylib.scanPaths ./.;
|
||||
}
|
||||
4
home/linux/desktop/i3/values/default.nix
Normal file
4
home/linux/desktop/i3/values/default.nix
Normal file
@@ -0,0 +1,4 @@
|
||||
{mylib, ...} @ args:
|
||||
map
|
||||
(path: import path args)
|
||||
(mylib.scanPaths ./.)
|
||||
@@ -9,7 +9,7 @@ _: {
|
||||
enable = true;
|
||||
windowManager.i3 = {
|
||||
enable = true;
|
||||
extraConfig = builtins.readFile ./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
|
||||
@@ -17,20 +17,20 @@ _: {
|
||||
};
|
||||
|
||||
xdg.configFile = {
|
||||
"i3/i3blocks.conf".source = ./i3blocks.conf;
|
||||
"i3/i3blocks.conf".source = ../conf/i3blocks.conf;
|
||||
"i3/scripts" = {
|
||||
source = ./scripts;
|
||||
source = ../conf/scripts;
|
||||
# copy the scripts directory recursively
|
||||
recursive = true;
|
||||
executable = true; # make all scripts executable
|
||||
};
|
||||
"i3/layouts" = {
|
||||
source = ./layouts;
|
||||
source = ../conf/layouts;
|
||||
recursive = true;
|
||||
};
|
||||
# rofi is a application launcher and dmenu replacement
|
||||
"rofi" = {
|
||||
source = ./rofi-conf;
|
||||
source = ../conf/rofi;
|
||||
# copy the scripts directory recursively
|
||||
recursive = true;
|
||||
};
|
||||
@@ -38,16 +38,16 @@ _: {
|
||||
|
||||
home.file = {
|
||||
".local/bin/bright" = {
|
||||
source = ./bin/bright;
|
||||
source = ../bin/bright;
|
||||
executable = true;
|
||||
};
|
||||
".local/bin/logout" = {
|
||||
source = ./bin/logout;
|
||||
source = ../bin/logout;
|
||||
executable = true;
|
||||
};
|
||||
|
||||
# xrandr - set primary screen
|
||||
".screenlayout/monitor.sh".source = ./dual-monitor-4k-1080p.sh;
|
||||
".screenlayout/monitor.sh".source = ../conf/dual-monitor-4k-1080p.sh;
|
||||
};
|
||||
|
||||
# allow fontconfig to discover fonts and configurations installed through home.packages
|
||||
@@ -10,6 +10,7 @@
|
||||
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
|
||||
@@ -1,7 +1,6 @@
|
||||
{pkgs, ...}: {
|
||||
home.packages = with pkgs; [
|
||||
firefox
|
||||
xsel # for clipboard support in x11, required by tmux's clipboard support
|
||||
];
|
||||
|
||||
# TODO vscode & chrome both have wayland support, but they don't work with fcitx5, need to fix it.
|
||||
Reference in New Issue
Block a user