feat: refactoring configuration with options to make it more modular
@@ -1,6 +1,3 @@
|
||||
{
|
||||
imports = [
|
||||
./shell.nix
|
||||
./system-tools.nix
|
||||
];
|
||||
{mylib, ...}: {
|
||||
imports = mylib.scanPaths ./.;
|
||||
}
|
||||
|
||||
@@ -1,8 +1,4 @@
|
||||
{
|
||||
config,
|
||||
nushell-scripts,
|
||||
...
|
||||
}: let
|
||||
{config, ...}: let
|
||||
d = config.xdg.dataHome;
|
||||
c = config.xdg.configHome;
|
||||
cache = config.xdg.cacheHome;
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
{
|
||||
imports = [
|
||||
../base/server
|
||||
../base/desktop
|
||||
../base/core.nix
|
||||
|
||||
./base
|
||||
./fcitx5
|
||||
./desktop
|
||||
];
|
||||
}
|
||||
|
||||
3
home/linux/desktop/base/default.nix
Normal file
@@ -0,0 +1,3 @@
|
||||
{mylib, ...}: {
|
||||
imports = mylib.scanPaths ./.;
|
||||
}
|
||||
30
home/linux/desktop/base/misc.nix
Normal file
@@ -0,0 +1,30 @@
|
||||
{
|
||||
pkgs,
|
||||
...
|
||||
}: {
|
||||
|
||||
home.packages = with pkgs; [
|
||||
# GUI apps
|
||||
# e-book viewer(.epub/.mobi/...)
|
||||
# do not support .pdf
|
||||
foliate
|
||||
|
||||
# instant messaging
|
||||
telegram-desktop
|
||||
discord
|
||||
qq # https://github.com/NixOS/nixpkgs/tree/master/pkgs/applications/networking/instant-messengers/qq
|
||||
|
||||
# remote desktop(rdp connect)
|
||||
remmina
|
||||
freerdp # required by remmina
|
||||
|
||||
# misc
|
||||
flameshot
|
||||
ventoy # multi-boot usb creator
|
||||
];
|
||||
|
||||
# GitHub CLI tool
|
||||
programs.gh = {
|
||||
enable = true;
|
||||
};
|
||||
}
|
||||
@@ -1,38 +1,3 @@
|
||||
{pkgs, ...}: {
|
||||
imports = [
|
||||
./wallpaper
|
||||
|
||||
./creative.nix
|
||||
./gtk.nix
|
||||
./immutable-file.nix
|
||||
./media.nix
|
||||
./ssh.nix
|
||||
./xdg.nix
|
||||
./eye-protection.nix
|
||||
];
|
||||
|
||||
home.packages = with pkgs; [
|
||||
# GUI apps
|
||||
# e-book viewer(.epub/.mobi/...)
|
||||
# do not support .pdf
|
||||
foliate
|
||||
|
||||
# instant messaging
|
||||
telegram-desktop
|
||||
discord
|
||||
qq # https://github.com/NixOS/nixpkgs/tree/master/pkgs/applications/networking/instant-messengers/qq
|
||||
|
||||
# remote desktop(rdp connect)
|
||||
remmina
|
||||
freerdp # required by remmina
|
||||
|
||||
# misc
|
||||
flameshot
|
||||
ventoy # multi-boot usb creator
|
||||
];
|
||||
|
||||
# GitHub CLI tool
|
||||
programs.gh = {
|
||||
enable = true;
|
||||
};
|
||||
{mylib, ...}: {
|
||||
imports = mylib.scanPaths ./.;
|
||||
}
|
||||
|
||||
@@ -3,10 +3,6 @@
|
||||
anyrun,
|
||||
...
|
||||
}: {
|
||||
imports = [
|
||||
anyrun.homeManagerModules.default
|
||||
];
|
||||
|
||||
programs.anyrun = {
|
||||
enable = true;
|
||||
config = {
|
||||
30
home/linux/desktop/hyprland/default.nix
Normal file
@@ -0,0 +1,30 @@
|
||||
{
|
||||
pkgs,
|
||||
config,
|
||||
lib,
|
||||
anyrun,
|
||||
...
|
||||
} @ args:
|
||||
with lib; let
|
||||
cfg = config.modules.desktop.hyprland;
|
||||
in {
|
||||
imports = [
|
||||
anyrun.homeManagerModules.default
|
||||
];
|
||||
|
||||
options.modules.desktop.hyprland = {
|
||||
enable = mkEnableOption "hyprland compositor";
|
||||
};
|
||||
|
||||
config = mkIf cfg.enable (
|
||||
mkMerge
|
||||
(map
|
||||
(path: import path args)
|
||||
[
|
||||
./hyprland.nix
|
||||
./packages.nix
|
||||
./anyrun.nix
|
||||
./wayland-apps.nix
|
||||
])
|
||||
);
|
||||
}
|
||||
|
Before Width: | Height: | Size: 32 KiB After Width: | Height: | Size: 32 KiB |
|
Before Width: | Height: | Size: 20 KiB After Width: | Height: | Size: 20 KiB |
|
Before Width: | Height: | Size: 23 KiB After Width: | Height: | Size: 23 KiB |
|
Before Width: | Height: | Size: 28 KiB After Width: | Height: | Size: 28 KiB |
|
Before Width: | Height: | Size: 32 KiB After Width: | Height: | Size: 32 KiB |
|
Before Width: | Height: | Size: 24 KiB After Width: | Height: | Size: 24 KiB |
|
Before Width: | Height: | Size: 27 KiB After Width: | Height: | Size: 27 KiB |
|
Before Width: | Height: | Size: 24 KiB After Width: | Height: | Size: 24 KiB |
|
Before Width: | Height: | Size: 26 KiB After Width: | Height: | Size: 26 KiB |
|
Before Width: | Height: | Size: 34 KiB After Width: | Height: | Size: 34 KiB |
|
Before Width: | Height: | Size: 29 KiB After Width: | Height: | Size: 29 KiB |
|
Before Width: | Height: | Size: 33 KiB After Width: | Height: | Size: 33 KiB |
|
Before Width: | Height: | Size: 27 KiB After Width: | Height: | Size: 27 KiB |
|
Before Width: | Height: | Size: 22 KiB After Width: | Height: | Size: 22 KiB |
|
Before Width: | Height: | Size: 24 KiB After Width: | Height: | Size: 24 KiB |
|
Before Width: | Height: | Size: 23 KiB After Width: | Height: | Size: 23 KiB |
|
Before Width: | Height: | Size: 8.4 KiB After Width: | Height: | Size: 8.4 KiB |
|
Before Width: | Height: | Size: 3.5 KiB After Width: | Height: | Size: 3.5 KiB |
|
Before Width: | Height: | Size: 5.8 KiB After Width: | Height: | Size: 5.8 KiB |
|
Before Width: | Height: | Size: 7.8 KiB After Width: | Height: | Size: 7.8 KiB |
|
Before Width: | Height: | Size: 5.7 KiB After Width: | Height: | Size: 5.7 KiB |
|
Before Width: | Height: | Size: 7.0 KiB After Width: | Height: | Size: 7.0 KiB |
@@ -1,16 +1,10 @@
|
||||
{
|
||||
lib,
|
||||
pkgs,
|
||||
lib,
|
||||
hyprland,
|
||||
nur-ryan4yin,
|
||||
...
|
||||
}: {
|
||||
imports = [
|
||||
./anyrun.nix
|
||||
./wayland-apps.nix
|
||||
./packages.nix
|
||||
];
|
||||
|
||||
# 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!
|
||||
@@ -8,7 +8,7 @@
|
||||
commandLineArgs = [
|
||||
# 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=5"
|
||||
"--gtk-version=4"
|
||||
"--enable-features=UseOzonePlatform"
|
||||
"--ozone-platform=wayland"
|
||||
# make it use text-input-v1, which works for kwin 5.27 and weston
|
||||
24
home/linux/desktop/i3/default.nix
Normal file
@@ -0,0 +1,24 @@
|
||||
{
|
||||
pkgs,
|
||||
config,
|
||||
lib,
|
||||
...
|
||||
} @ args:
|
||||
with lib; let
|
||||
cfg = config.modules.desktop.i3;
|
||||
in {
|
||||
options.modules.desktop.i3 = {
|
||||
enable = mkEnableOption "i3 window manager";
|
||||
};
|
||||
|
||||
config = mkIf cfg.enable (
|
||||
mkMerge
|
||||
(map
|
||||
(path: import path args)
|
||||
[
|
||||
./i3.nix
|
||||
./packages.nix
|
||||
./x11-apps.nix
|
||||
])
|
||||
);
|
||||
}
|
||||
@@ -1,11 +1,6 @@
|
||||
_: {
|
||||
# i3 window manager's config, based on https://github.com/endeavouros-team/endeavouros-i3wm-setup
|
||||
|
||||
imports = [
|
||||
./packages.nix
|
||||
./x11-apps.nix
|
||||
];
|
||||
|
||||
# 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!
|
||||
@@ -14,7 +9,7 @@ _: {
|
||||
enable = true;
|
||||
windowManager.i3 = {
|
||||
enable = true;
|
||||
extraConfig = builtins.readFile ./config;
|
||||
extraConfig = builtins.readFile ./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
|
||||