Compare commits

...

23 Commits

Author SHA1 Message Date
alex
7caf8a0a66 更新到25.11 2025-08-18 12:03:21 +08:00
70c052c850 增加sqlite和jq 2025-05-29 18:44:22 +08:00
ce7331fb35 增加 1. apc ups 服务 2. flatpak desktop目录 2025-05-28 14:30:28 +08:00
b1540dfb96 修改mimeapps.list的配置方式 2025-05-19 10:41:29 +08:00
91b8e65a79 1 封装nix-fhs使用nix-ld
2 修改生成hylrland配置文件的方式
3 启用flatpak
2025-05-19 10:20:28 +08:00
05c8ab6c82 调整项目结构和readme 2025-05-09 14:40:19 +08:00
79d3ca7ec4 更新gnome/docker配置 2025-05-07 15:20:28 +08:00
457028533e 更新hyprland配置 2025-05-07 15:16:40 +08:00
c133e5637f 简化stable/unstable切换的方式;增加兼容性代码,根据版本引用 2025-05-05 18:59:34 +08:00
e6891f9f8e 单独定义nix-ld; 增加smartmontools; 增添docker配置; 修改hyprland样式 2025-05-05 12:17:26 +08:00
d605c0f637 配置nix-ld可以运行fhs应用; 移除nix idea软件包,使用下载的binary 2025-05-02 00:18:47 +08:00
057beb27e2 禁用声音休眠,避免播放后n秒才出现声音 2025-04-30 15:14:32 +08:00
5d43285e9e 重设网关; 增加gopath 2025-04-30 10:18:19 +08:00
87c1617885 更新hyprland配置 2025-04-29 22:19:29 +08:00
e69345b654 修复错误的循环引用 2025-04-29 20:15:06 +08:00
9a39e2512e 抽象mkOutOfStoreSymlink,为以后更新为引用相对路径做准备 2025-04-29 15:16:45 +08:00
d4177d6823 修改hyprland样式,增加nextcloud-client 2025-04-29 15:16:13 +08:00
4e98a706ab 更新UI规则 2025-04-28 10:12:54 +08:00
a86f6dd7d2 修改 xdg 文件夹 2025-04-28 08:54:21 +08:00
6377ceef93 更新hyprland配置; 更新flake配置的方式 2025-04-28 00:21:50 +08:00
a07936cff7 修改配置方式,删除多余的wlogout配置 2025-04-27 18:32:38 +08:00
992fee7199 update network and waybar component 2025-04-26 20:22:51 +08:00
3088f2aea8 change file copy to soft link 2025-04-26 19:35:04 +08:00
91 changed files with 1380 additions and 1729 deletions

1
.gitignore vendored Normal file
View File

@@ -0,0 +1 @@
result

View File

@@ -10,27 +10,26 @@
│ ├── desktop.nix # 桌面环境配置
│ └── server.nix # 服务器配置
├── libs # 自定义库函数
│ ├── default.nix # 导出所有库函数
│ └── mkNixosSystem.nix # 创建nixosSystem的通用函数
├── modules # 通用模块,不同机器可以根据的需要引入
│ ├── home # home manager 通用模块
│ │ └── - # home manager 通用模块
│ └── nixos # nixos 通用模块
│ └── - # nixos 通用模块
├── overlays # 安装包的修改配置
│ └── - # 安装包的修改配置
│ └── default.nix # 覆盖配置入口
├── pkgs # 自定义软件包
│ └── -
├── profiles # 不同机器的配置文件, 放置只有特定主机可以使用的配置
│ ├── apollo # 主服务器配置
│ │ ├── configuration.nix # 主要配置文件,包含系统模块、服务、用户设置等
│ │ ── default.nix # 入口文件负责创建nixosSystem并选择使用的nixpkgs版本
│ │ ├── default.nix # 入口文件负责创建nixosSystem并选择使用的nixpkgs版本
│ │ ── home # apollo的home-manager配置
│ │ └── nixos # apollo的NixOS配置
│ │ └── network.nix # 网络配置
│ ├── gaea # 主用机配置
│ │ ├── configuration.nix # 主要配置文件,包含系统模块、服务、用户设置等
│ │ ── default.nix # 入口文件负责创建nixosSystem并选择使用的nixpkgs版本
│ │ ├── default.nix # 入口文件负责创建nixosSystem并选择使用的nixpkgs版本
│ │ ── home # gaea的home-manager配置
│ │ └── nixos # gaea的NixOS配置
│ └── luna # 虚拟机配置
│ ├── configuration.nix # 主要配置文件,包含系统模块、服务、用户设置等
── default.nix # 入口文件负责创建nixosSystem并选择使用的nixpkgs版本
│ ├── default.nix # 入口文件负责创建nixosSystem并选择使用的nixpkgs版本
── hardware-configuration.nix # 硬件配置
│ └── network.nix # 网络配置
├── flake.lock # flake 锁定文件
├── flake.nix # nix flake 入口
├── nixos-install.sh # nixos 全新安装脚本
@@ -170,3 +169,45 @@ nixos-switch
2. **profiles/[hostname]/default.nix** - 这是配置的入口文件,负责选择使用的 nixpkgs 版本并调用 libs.mkNixosSystem 函数。
3. **profiles/[hostname]/configuration.nix** - 包含实际的配置内容,如系统模块、服务、用户设置等。
## 垃圾清理
home-manager profiles 文件夹
```bash
~/.local/state/nix/profiles/
```
1. 列出历史版本
```bash
# 最新api
nix profile history --profile /nix/var/nix/profiles/system
nix profile history --profile ~/.local/state/nix/profiles/home-manager
# nixos系统api
nixos-rebuild list-generations
# 旧版api
nix-env --list-generations -p /nix/var/nix/profiles/system
```
2. 查看根依赖
```bash
nix-store --query --roots /nix/store/ijr7hck016n92ds7zh9syv51qv4cl8zg-wechat-uos-4.0.0.23
```
3. 删除历史generations
```bash
nix profile wipe-history --profile ~/.local/state/nix/profiles/home-manager # 清除所有非当前
nix profile wipe-history --older-than 1d --profile /nix/var/nix/profiles/system # 保留最近7天
nix profile wipe-history --older-than 7d --profile ~/.local/state/nix/profiles/home-manager # home-manager单独清除
```
4. 删除旧版本
```bash
nix-collect-garbage --delete-older-than 30d
nix-collect-garbage -d # --delete-old 清除所有未使用的
```

24
flake.lock generated
View File

@@ -7,11 +7,11 @@
]
},
"locked": {
"lastModified": 1744743431,
"narHash": "sha256-iyn/WBYDc7OtjSawbegINDe/gIkok888kQxk3aVnkgg=",
"lastModified": 1747688870,
"narHash": "sha256-ypL9WAZfmJr5V70jEVzqGjjQzF0uCkz+AFQF7n9NmNc=",
"owner": "nix-community",
"repo": "home-manager",
"rev": "c61bfe3ae692f42ce688b5865fac9e0de58e1387",
"rev": "d5f1f641b289553927b3801580598d200a501863",
"type": "github"
},
"original": {
@@ -28,11 +28,11 @@
]
},
"locked": {
"lastModified": 1745205007,
"narHash": "sha256-k67bEcLkSo13TIBfs0CGYkJjG12aaikabMtxWbSeqr0=",
"lastModified": 1755442500,
"narHash": "sha256-RHK4H6SWzkAtW/5WBHsyugaXJX25yr5y7FAZznxcBJs=",
"owner": "nix-community",
"repo": "home-manager",
"rev": "3fbe9a2b76ff5c4dcb2a2a2027dac31cfc993c8c",
"rev": "d2ffdedfc39c591367b1ddf22b4ce107f029dcc3",
"type": "github"
},
"original": {
@@ -58,11 +58,11 @@
},
"nixpkgs": {
"locked": {
"lastModified": 1744440957,
"narHash": "sha256-FHlSkNqFmPxPJvy+6fNLaNeWnF1lZSgqVCl/eWaJRc4=",
"lastModified": 1751274312,
"narHash": "sha256-/bVBlRpECLVzjV19t5KMdMFWSwKLtb5RyXdjz3LJT+g=",
"owner": "nixos",
"repo": "nixpkgs",
"rev": "26d499fc9f1d567283d5d56fcf367edd815dba1d",
"rev": "50ab793786d9de88ee30ec4e4c24fb4236fc2674",
"type": "github"
},
"original": {
@@ -74,11 +74,11 @@
},
"nixpkgs-unstable": {
"locked": {
"lastModified": 1744932701,
"narHash": "sha256-fusHbZCyv126cyArUwwKrLdCkgVAIaa/fQJYFlCEqiU=",
"lastModified": 1755186698,
"narHash": "sha256-wNO3+Ks2jZJ4nTHMuks+cxAiVBGNuEBXsT29Bz6HASo=",
"owner": "nixos",
"repo": "nixpkgs",
"rev": "b024ced1aac25639f8ca8fdfc2f8c4fbd66c48ef",
"rev": "fbcf476f790d8a217c3eab4e12033dc4a0f6d23c",
"type": "github"
},
"original": {

View File

@@ -5,9 +5,21 @@
inherit (nixpkgs) lib;
username = "alex";
useremail = "reizero@live.com";
hostname = "luna";
sysversion = "24.11";
sourcepath = "/home/${username}/.nix";
libs = import ./libs;
nixos = {
stable = {
nixpkgs = nixpkgs;
home-manager = home-manager;
version = "25.05";
};
unstable = {
nixpkgs = nixpkgs-unstable;
home-manager = home-manager-unstable;
version = "25.11";
};
};
in
rec {
# Your custom packages and modifications, exported as overlays
@@ -21,7 +33,8 @@
(profile: {
name = profile;
value = import ./profiles/${profile} {
inherit self libs inputs outputs username useremail sysversion;
inherit self inputs outputs libs nixos profile sourcepath username useremail;
hostname = profile;
};
})
(attrNames (readDir ./profiles))
@@ -34,8 +47,9 @@
"${username}" = home-manager-unstable.lib.homeManagerConfiguration {
pkgs = nixpkgs-unstable.packages.x86_64-linux; # Home-manager requires 'pkgs' instance
extraSpecialArgs = {
inherit inputs outputs username useremail sysversion;
inherit inputs outputs username useremail;
hyprland = inputs.hyprland;
version = "${nixos.unstable.version}";
};
modules = [
# > Our main home-manager configuration file <

View File

@@ -1,7 +1,10 @@
# This is your home-manager configuration file
# Use this to configure your home environment (it replaces ~/.config/nixpkgs/home.nix)
{ outputs, lib, config, pkgs, username, useremail, sysversion, ... }: {
{ self, outputs, pkgs, username, useremail, version, ... }: {
imports = [
"${self}/libs/home-libs.nix"
];
home = {
inherit username;
@@ -108,5 +111,5 @@
systemd.user.startServices = "sd-switch";
# https://nixos.wiki/wiki/FAQ/When_do_I_update_stateVersion
home.stateVersion = sysversion;
home.stateVersion = version;
}

View File

@@ -1,7 +1,7 @@
# This is your home-manager configuration file
# Use this to configure your home environment (it replaces ~/.config/nixpkgs/home.nix)
{ inputs, outputs, lib, config, pkgs, username, useremail, ... }:
{ inputs, outputs, pkgs, ... }:
{
# You can import other home-manager modules here
imports = [
@@ -13,10 +13,9 @@
# You can also split up your configuration and import pieces of it here:
./core.nix
../modules/home/hyprland
../modules/home/vscode
../modules/home/zsh
../modules/home/xdg.nix
../modules/home/xdg
../modules/home/theme.nix
../modules/home/fcitx.nix
../modules/home/wechat.nix
@@ -35,15 +34,11 @@
zip
unzip
usbutils # lsusb etc.
lsof # lsof process util
htop # process monitor
pciutils # lspci etc.
usbutils # lsusb etc.
lsof # lsof process util
htop # process monitor
pciutils # lspci etc.
];
sessionVariables = {
JAVA_HOME = "";
};
};

18
libs/home-libs.nix Normal file
View File

@@ -0,0 +1,18 @@
{ lib, config, sourcepath, ... }: # 声明你可能需要的参数
{
options = {
# 使用一个独特的顶层选项名,如 myLib
home-libs = lib.mkOption {
type = lib.types.attrsOf lib.types.anything;
default = { };
description = "Home manager custom utility functions.";
};
};
config.home-libs = {
# path 参数目前无法通过内置函数的方式获取
# 需要是相对于 flake 的相对路径,直接由目录开始不需要加 `./`。
mkOutOfStoreSymlink = path:
config.lib.file.mkOutOfStoreSymlink "${sourcepath}/${path}";
};
}

View File

@@ -1,9 +1,9 @@
{ pkgs, ... }:
{ config, pkgs, ... }:
{
imports = [
];
home = {
packages = with pkgs.unstable; [
dbeaver-bin
@@ -11,8 +11,14 @@
nodejs
yarn
steam-run
jetbrains.idea-community
sqlite
jq
# steam-run
# jetbrains.idea-community # use prebuild binary
];
sessionVariables = {
GOPATH = "${config.home.homeDirectory}/data/go";
};
};
}

View File

@@ -1,16 +1,21 @@
# 输入法配置模块
{ config, lib, pkgs, ... }: {
i18n.inputMethod = {
i18n.inputMethod = (if lib.versionAtLeast config.home.stateVersion "25.05" then {
enable = true;
type = "fcitx5";
} else {
enabled = "fcitx5";
}) // {
fcitx5 = {
addons = with pkgs; [
fcitx5-gtk
fcitx5-chinese-addons
fcitx5-nord
];
waylandFrontend = true; # available in home-manager-25.05
};
} // (lib.optionalAttrs (lib.versionAtLeast config.home.stateVersion "25.05") {
waylandFrontend = true;
});
};
gtk = {

View File

@@ -26,39 +26,22 @@ monitor = ,preferred,auto,auto
# See https://wiki.hyprland.org/Configuring/Keywords/ for more
# Execute your favorite apps at launch
exec-once = dbus-update-activation-environment --systemd WAYLAND_DISPLAY XDG_CURRENT_DESKTOP # for XDPH
exec-once = systemctl --user import-environment WAYLAND_DISPLAY XDG_CURRENT_DESKTOP # for XDPH
exec-once = /usr/lib/polkit-kde-authentication-agent-1 # authentication dialogue for GUI apps
exec-once = waybar # launch the system panel
exec-once = blueman-applet # systray app for BT
exec-once = nm-applet --indicator # systray app for Network/Wifi
exec-once = mako # start notification demon
exec-once = wl-paste --type text --watch cliphist store # clipboard store text data
exec-once = wl-paste --type image --watch cliphist store # clipboard store image data
exec-once = ~/.config/swww/swwwallpaper.sh # start wallpaper daemon
exec-once = fcitx5 -d -r
exec-once = swww-daemon
# exec-once = nm-applet --indicator # systray app for Network/Wifi
# exec-once = dbus-update-activation-environment --systemd WAYLAND_DISPLAY XDG_CURRENT_DESKTOP # for XDPH
# exec-once = systemctl --user import-environment WAYLAND_DISPLAY XDG_CURRENT_DESKTOP # for XDPH
# exec-once = /usr/lib/polkit-kde-authentication-agent-1 # authentication dialogue for GUI apps
# exec-once = wl-paste --type text --watch cliphist store # clipboard store text data
# exec-once = wl-paste --type image --watch cliphist store # clipboard store image data
# exec-once = ~/.config/swww/swwwallpaper.sh # start wallpaper daemon
#exec-once = swayidle -w timeout 900 'hyprctl dispatch dpms off' resume 'hyprctl dispatch dpms on' # turn off monitor after 15 mins
# █▀▀ █▄░█ █░█
# ██▄ █░▀█ ▀▄▀
# Some default env vars.
# env = XDG_CURRENT_DESKTOP,Hyprland
# env = XDG_SESSION_TYPE,wayland
# env = XDG_SESSION_DESKTOP,Hyprland
# env = GDK_BACKEND,wayland
# env = QT_QPA_PLATFORM,wayland
# #env = QT_STYLE_OVERRIDE,kvantum
# env = QT_QPA_PLATFORMTHEME,qt5ct
# env = QT_WAYLAND_DISABLE_WINDOWDECORATION,1
# env = QT_AUTO_SCREEN_SCALE_FACTOR,1
# env = XDG_PICTURES_DIR,$HOME/Pictures
# █ █▄░█ █▀█ █░█ ▀█▀
# █ █░▀█ █▀▀ █▄█ ░█░
@@ -81,15 +64,6 @@ input {
numlock_by_default = true
}
# Example per-device config
# See https://wiki.hyprland.org/Configuring/Keywords/#executing for more
#device:epic mouse V1 {
# sensitivity = -0.5
#}
# See https://wiki.hyprland.org/Configuring/Variables/ for more
gestures {
workspace_swipe = true
workspace_swipe_fingers = 3
@@ -97,23 +71,6 @@ gestures {
# █░░ ▄▀█ █▄█ █▀█ █░█ ▀█▀ █▀
# █▄▄ █▀█ ░█░ █▄█ █▄█ ░█░ ▄█
# See https://wiki.hyprland.org/Configuring/Dwindle-Layout/ for more
dwindle {
pseudotile = yes # master switch for pseudotiling. Enabling is bound to mainMod + P in the keybinds section below
preserve_split = yes # you probably want this
}
# See https://wiki.hyprland.org/Configuring/Master-Layout/ for more
#master {
# new_is_master = true
#}
# █▀▄▀█ █ █▀ █▀▀
# █░▀░█ █ ▄█ █▄▄
@@ -139,5 +96,4 @@ source = ~/.config/hypr/theme.conf
source = ~/.config/hypr/monitors.conf # initially empty, to be configured by user and remains static
source = ~/.config/hypr/userprefs.conf # initially empty, to be configured by user and remains static
# Note: as userprefs.conf is sourced at the end, settings configured in this file will override the defaults

View File

@@ -8,7 +8,7 @@
################################################
# Main modifier
################################################
$mainMod = SUPER # windows key
$mod = SUPER # windows key
$terminal = kitty
$filemanager = dolphin
@@ -17,130 +17,137 @@ $filemanager = dolphin
################################################
# Main actions
################################################
bind = $mainMod, Q, exec, ~/.config/hypr/scripts/dontkillsteam.sh # killactive, # kill the window on focus
bind = $mainMod CTRL, delete, exit, # kill hyperland session
bind = $mainMod, F, togglefloating, # toggle the window on focus to float
bind = $mainMod, L, exec, swaylock # lock screen
bind = $mainMod, P, pseudo, # dwindle
bind = $mainMod, S, togglesplit, # split screen
bind = $mainMod, return, fullscreen, # toggle the window on focus to fullscreen
bind = $mod, C, killactive # killactive, kill the window on focus
bind = $mod CTRL, delete, exit, # kill hyperland session
bind = $mod, F, togglefloating, # toggle the window on focus to float
bind = $mod CTRL, L, exec, swaylock # lock screen
bind = $mod, P, pseudo, # dwindle
bind = $mod, S, togglesplit, # split screen
bind = $mod, return, fullscreen, # toggle the window on focus to fullscreen
bind = $mod, F1, exec, ~/.config/hypr/scripts/keybinds.sh
# Application shortcuts
bind = $mainMod, grave, exec, $terminal # ~ open terminal
bind = $mainMod, E, exec, $filemanager # open file manager
bind = $mainMod, V, exec, code # open vscode
bind = $mod, grave, exec, $terminal # ~ open terminal
bind = $mod, E, exec, $filemanager # open file manager
bind = $mod, V, exec, code # open vscode
################################################
# Control actions
################################################
# Rofi is toggled on/off if you repeat the key presses
bind = $mainMod, SPACE, exec, pkill rofi || rofi -show drun # launch desktop applications
bind = $mainMod, tab, exec, pkill rofi || rofi -show window # switch between desktop applications
bind = $mainMod, D, exec, pkill rofi || rofi -show filebrowser # browse system files
bind = $mainMod, R, exec, pkill rofi || rofi -show run # run a command
bind = $mod, SPACE, exec, pkill rofi || rofi -show drun # launch desktop applications
bind = $mod, E, exec, pkill rofi || rofi -show filebrowser # browse system files
bind = $mod, R, exec, pkill rofi || rofi -show run # run a command
# Audio control
# bind = , F10, exec, ~/.config/hypr/scripts/volumecontrol.sh -o m # toggle audio mute
# binde = , F11, exec, ~/.config/hypr/scripts/volumecontrol.sh -o d # decrease volume
# binde = , F12, exec, ~/.config/hypr/scripts/volumecontrol.sh -o i # increase volume
bind = , XF86AudioMute, exec, ~/.config/hypr/scripts/volumecontrol.sh -o m # toggle audio mute
bind = , XF86AudioMicMute, exec, ~/.config/hypr/scripts/volumecontrol.sh -i m # toggle microphone mute
binde = , XF86AudioLowerVolume, exec, ~/.config/hypr/scripts/volumecontrol.sh -o d # decrease volume
binde = , XF86AudioRaiseVolume, exec, ~/.config/hypr/scripts/volumecontrol.sh -o i # increase volume
bind = , XF86AudioMute, exec, pamixer -t # toggle audio mute
bind = , XF86AudioMicMute, exec, pamixer --default-source -t # toggle microphone mute
binde = , XF86AudioLowerVolume, exec, pamixer -d 2# decrease volume
binde = , XF86AudioRaiseVolume, exec, pamixer -i 2# increase volume
bind = , XF86AudioPlay, exec, playerctl play-pause
bind = , XF86AudioPause, exec, playerctl play-pause
bind = , XF86AudioNext, exec, playerctl next
bind = , XF86AudioPrev, exec, playerctl previous
# Brightness control
binde = , XF86MonBrightnessUp, exec, ~/.config/hypr/scripts/brightnesscontrol.sh i # increase brightness
binde = , XF86MonBrightnessDown, exec, ~/.config/hypr/scripts/brightnesscontrol.sh d # decrease brightness
# Screenshot/screencapture
bind = , PRINT, exec, hyprshot -m window # logout menu
bind = ALT, PRINT, exec, hyprshot -m region # logout menu
bind = $CONTROL SHIFT, P, pass, ^(com\.obsproject\.Studio)$ # start/stop obs screen recording
bind = , PRINT, exec, hyprshot -z -m window
bind = ALT, PRINT, exec, hyprshot -z -m region
################################################
# Exec custom scripts
################################################
bind = $mainMod, G, exec, ~/.config/hypr/scripts/gamemode.sh # disable hypr effects for gamemode
bind = $mod, G, exec, ~/.config/hypr/scripts/gamemode.sh # disable hypr effects for gamemode
################################################
# Window actions
################################################
# Move focus with mainMod + arrow keys
bind = $mainMod, left, movefocus, l
bind = $mainMod, right, movefocus, r
bind = $mainMod, up, movefocus, u
bind = $mainMod, down, movefocus, d
bind = ALT, Tab, movefocus, d
# Move focus with mod + arrow keys
bind = $mod, left, movefocus, l
bind = $mod, H, movefocus, l
bind = $mod, right, movefocus, r
bind = $mod, L, movefocus, r
bind = $mod, up, movefocus, u
bind = $mod, K, movefocus, u
bind = $mod, down, movefocus, d
bind = $mod, J, movefocus, d
# Resize windows
binde = $mainMod CONTROL, right, resizeactive, 10 0
binde = $mainMod CONTROL, left, resizeactive, -10 0
binde = $mainMod CONTROL, up, resizeactive, 0 -10
binde = $mainMod CONTROL, down, resizeactive, 0 10
binde = $mod CONTROL, right, resizeactive, 10 0
binde = $mod CONTROL, H, resizeactive, 10 0
binde = $mod CONTROL, left, resizeactive, -10 0
binde = $mod CONTROL, L, resizeactive, -10 0
binde = $mod CONTROL, up, resizeactive, 0 -10
binde = $mod CONTROL, K, resizeactive, 0 -10
binde = $mod CONTROL, down, resizeactive, 0 10
binde = $mod CONTROL, J, resizeactive, 0 10
# Move Window with mainMod + SHIFT + arrow keys
bind = $mainMod SHIFT, left, movewindow, l
bind = $mainMod SHIFT, right, movewindow, r
bind = $mainMod SHIFT, up, movewindow, u
bind = $mainMod SHIFT, down, movewindow, d
# Move Window with mod + SHIFT + arrow keys
bind = $mod SHIFT, left, movewindow, l
bind = $mod SHIFT, H, movewindow, l
bind = $mod SHIFT, right, movewindow, r
bind = $mod SHIFT, L, movewindow, r
bind = $mod SHIFT, up, movewindow, u
bind = $mod SHIFT, K, movewindow, u
bind = $mod SHIFT, down, movewindow, d
bind = $mod SHIFT, J, movewindow, d
# Move/resize windows with mainMod + LMB/RMB and dragging
bindm = $mainMod, mouse:272, movewindow
bindm = $mainMod, mouse:273, resizewindow
# Move/resize windows with mod + LMB/RMB and dragging
bindm = $mod, mouse:272, movewindow
bindm = $mod, mouse:273, resizewindow
################################################
# Workspace actions
################################################
# Switch workspaces with mainMod + [0-9]
bind = $mainMod, 1, workspace, 1
bind = $mainMod, 2, workspace, 2
bind = $mainMod, 3, workspace, 3
bind = $mainMod, 4, workspace, 4
bind = $mainMod, 5, workspace, 5
bind = $mainMod, 6, workspace, 6
bind = $mainMod, 7, workspace, 7
bind = $mainMod, 8, workspace, 8
bind = $mainMod, 9, workspace, 9
bind = $mainMod, 0, workspace, 10
# Switch workspaces with mod + [0-9]
bind = $mod, 1, workspace, 1
bind = $mod, 2, workspace, 2
bind = $mod, 3, workspace, 3
bind = $mod, 4, workspace, 4
bind = $mod, 5, workspace, 5
bind = $mod, 6, workspace, 6
bind = $mod, 7, workspace, 7
bind = $mod, 8, workspace, 8
bind = $mod, 9, workspace, 9
bind = $mod, 0, workspace, 10
# Move active window to a workspace with mainMod + SHIFT + [0-9]
bind = $mainMod SHIFT, 1, movetoworkspace, 1
bind = $mainMod SHIFT, 2, movetoworkspace, 2
bind = $mainMod SHIFT, 3, movetoworkspace, 3
bind = $mainMod SHIFT, 4, movetoworkspace, 4
bind = $mainMod SHIFT, 5, movetoworkspace, 5
bind = $mainMod SHIFT, 6, movetoworkspace, 6
bind = $mainMod SHIFT, 7, movetoworkspace, 7
bind = $mainMod SHIFT, 8, movetoworkspace, 8
bind = $mainMod SHIFT, 9, movetoworkspace, 9
bind = $mainMod SHIFT, 0, movetoworkspace, 10
# Move active window to a workspace with mod + SHIFT + [0-9]
bind = $mod SHIFT, 1, movetoworkspace, 1
bind = $mod SHIFT, 2, movetoworkspace, 2
bind = $mod SHIFT, 3, movetoworkspace, 3
bind = $mod SHIFT, 4, movetoworkspace, 4
bind = $mod SHIFT, 5, movetoworkspace, 5
bind = $mod SHIFT, 6, movetoworkspace, 6
bind = $mod SHIFT, 7, movetoworkspace, 7
bind = $mod SHIFT, 8, movetoworkspace, 8
bind = $mod SHIFT, 9, movetoworkspace, 9
bind = $mod SHIFT, 0, movetoworkspace, 10
# Move window to workspace Super + Alt + [0-9]
bind = $mainMod ALT, 1, movetoworkspacesilent, 1
bind = $mainMod ALT, 2, movetoworkspacesilent, 2
bind = $mainMod ALT, 3, movetoworkspacesilent, 3
bind = $mainMod ALT, 4, movetoworkspacesilent, 4
bind = $mainMod ALT, 5, movetoworkspacesilent, 5
bind = $mainMod ALT, 6, movetoworkspacesilent, 6
bind = $mainMod ALT, 7, movetoworkspacesilent, 7
bind = $mainMod ALT, 8, movetoworkspacesilent, 8
bind = $mainMod ALT, 9, movetoworkspacesilent, 9
bind = $mainMod ALT, 0, movetoworkspacesilent, 10
bind = $mod ALT, 1, movetoworkspacesilent, 1
bind = $mod ALT, 2, movetoworkspacesilent, 2
bind = $mod ALT, 3, movetoworkspacesilent, 3
bind = $mod ALT, 4, movetoworkspacesilent, 4
bind = $mod ALT, 5, movetoworkspacesilent, 5
bind = $mod ALT, 6, movetoworkspacesilent, 6
bind = $mod ALT, 7, movetoworkspacesilent, 7
bind = $mod ALT, 8, movetoworkspacesilent, 8
bind = $mod ALT, 9, movetoworkspacesilent, 9
bind = $mod ALT, 0, movetoworkspacesilent, 10
# Special workspaces (scratchpad)
bind = $mainMod ALT, S, movetoworkspacesilent, special
bind = $mainMod CONTROL, S, togglespecialworkspace,
bind = $mod ALT, S, movetoworkspacesilent, special
bind = $mod CONTROL, S, togglespecialworkspace,
# Scroll through existing workspaces with mainMod + scroll
bind = $mainMod CTRL, right, workspace, e+1
bind = $mainMod, mouse_up, workspace, e+1
bind = $mainMod CTRL, left, workspace, e-1
bind = $mainMod, mouse_down, workspace, e-1
# Scroll through existing workspaces with mod + scroll
bind = $mod CTRL, right, workspace, e+1
bind = $mod CTRL, left, workspace, e-1
bind = $mod, TAB, exec, ~/.config/hypr/scripts/switch.sh

View File

@@ -1,42 +0,0 @@
#!/usr/bin/env bash
ncolor="-h string:bgcolor:#343d46 -h string:fgcolor:#c0c5ce -h string:frcolor:#c0c5ce"
function send_notification {
brightness=`brightnessctl info | grep -oP "(?<=\()\d+(?=%)" | cat`
brightinfo=$(brightnessctl info | awk -F"'" '/Device/ {print $2}')
angle="$(((($brightness + 2) / 5) * 5))"
ico="~/.config/dunst/icons/vol/vol-${angle}.svg"
bar=$(seq -s "." $(($brightness / 15)) | sed 's/[0-9]//g')
if [ $brightness -ne 0 ]; then
notify-send $ncolor "brightctl" -i $ico -a "$brightness$bar" "Device: $brightinfo" -r 91190 -t 800
else
notify-send -i $ico "Brightness: ${brightness}%" -a "$brightinfo" -u low -r 91190 -t 800
fi
}
function get_brightness {
brightnessctl -m | grep -o '[0-9]\+%' | head -c-2
}
case $1 in
i)
# increase the backlight by 5%
brightnessctl set +5%
send_notification
;;
d)
if [[ $(get_brightness) -lt 5 ]]; then
# avoid 0% brightness
brightnessctl set 1%
else
# decrease the backlight by 5%
brightnessctl set 5%-
fi
send_notification
;;
esac

View File

@@ -1,64 +0,0 @@
#!/usr/bin/env sh
theme_file="$HOME/.config/hypr/themes/theme.conf"
roconf="~/.config/rofi/clipboard.rasi"
# set position
case $2 in
1) # top left
pos="window {location: north west; anchor: north west; x-offset: 20px; y-offset: 20px;}"
;;
2) # top right
pos="window {location: north east; anchor: north east; x-offset: -20px; y-offset: 20px;}"
;;
3) # bottom left
pos="window {location: south east; anchor: south east; x-offset: -20px; y-offset: -20px;}"
;;
4) # bottom right
pos="window {location: south west; anchor: south west; x-offset: 20px; y-offset: -20px;}"
;;
esac
# read hypr theme border
hypr_border=`awk -F '=' '{if($1~" rounding ") print $2}' $theme_file | sed 's/ //g'`
hypr_width=`awk -F '=' '{if($1~" border_size ") print $2}' $theme_file | sed 's/ //g'`
wind_border=$(( hypr_border * 3/2 ))
elem_border=`[ $hypr_border -eq 0 ] && echo "5" || echo $hypr_border`
r_override="window {border: ${hypr_width}px; border-radius: ${wind_border}px;} entry {border-radius: ${elem_border}px;} element {border-radius: ${elem_border}px;}"
# read hypr font size
#fnt_size=`awk '{if($6=="monospace-font-name") print $NF}' $theme_file | sed "s/'//g"`
fnt_override=`gsettings get org.gnome.desktop.interface monospace-font-name | awk '{gsub(/'\''/,""); print $NF}'`
fnt_override="configuration {font: \"JetBrainsMono Nerd Font ${fnt_override}\";}"
# clipboard action
case $1 in
c) cliphist list | rofi -dmenu -theme-str "entry { placeholder: \"Copy...\";} ${pos} ${r_override}" -theme-str "${fnt_override}" -config $roconf | cliphist decode | wl-copy
;;
d) cliphist list | rofi -dmenu -theme-str "entry { placeholder: \"Delete...\";} ${pos} ${r_override}" -theme-str "${fnt_override}" -config $roconf | cliphist delete
;;
w) if [ `echo -e "Yes\nNo" | rofi -dmenu -theme-str "entry { placeholder: \"Clear Clipboard History?\";} ${pos} ${r_override}" -theme-str "${fnt_override}" -config $roconf` == "Yes" ] ; then
cliphist wipe
fi
;;
*) echo -e "cliphist.sh [action] [position]\nwhere action,"
echo "c : cliphist list and copy selected"
echo "d : cliphist list and delete selected"
echo "w : cliphist wipe database"
echo "where position,"
echo "1 : top left"
echo "2 : top right"
echo "3 : bottom right"
echo "4 : bottom left"
exit 1
;;
esac

View File

@@ -1,4 +0,0 @@
#!/usr/bin/env bash
# 创建截图目录
mkdir -p $HOME/tmp/Screenshots

View File

@@ -1,5 +0,0 @@
if [[ $(hyprctl activewindow -j | jq -r ".class") == "Steam" ]]; then
xdotool windowunmap $(xdotool getactivewindow)
else
hyprctl dispatch killactive ""
fi

View File

@@ -0,0 +1,12 @@
#!/usr/bin/env sh
# 简单示例:从 hyprland.conf 提取非注释的 bind= 行
# 注意:这可能需要根据你的配置复杂性进行调整(例如处理逗号后的空格、多行绑定等)
grep '^bind =' ~/.config/hypr/keybindings.conf | \
sed 's/^bind = //; s/, /\t/' | \
# 可以进一步处理,比如移除 exec 后面的命令细节,只留动作描述
# sed -E 's/,(.+)/ : \1/' | # 简单替换
column -t -s $'\t' | \
rofi -dmenu -i -p "Hyprland Keybinds" -markup-rows -config ~/.config/rofi/config-keybinds.rasi
# 或者使用 wofi:
# wofi --dmenu --prompt "Hyprland Keybinds" --insensitive

View File

@@ -1,49 +0,0 @@
#!/usr/bin/env sh
# detect monitor y res
res=`cat /sys/class/drm/*/modes | head -1 | cut -d 'x' -f 2`
# scale config layout and style
case $1 in
1) wlColms=6
export mgn=$(( res * 10 / 100 ))
export hvr=$(( res * 5 / 100 )) ;;
2) wlColms=2
export mgn=$(( res * 8 / 100 ))
export mgn2=$(( res * 65 / 100 ))
export hvr=$(( res * 3 / 100 ))
export hvr2=$(( res * 60 / 100 )) ;;
*) echo "Error: invalid parameter passed..."
exit 1 ;;
esac
# scale font size
export fntSize=$(( res * 2 / 100 ))
# detect gtk system theme
export gtkThm="Catppuccin-Latte" #`gsettings get org.gnome.desktop.interface gtk-theme | sed "s/'//g"`
export csMode=`gsettings get org.gnome.desktop.interface color-scheme | sed "s/'//g" | awk -F '-' '{print $2}'`
export BtnCol=`[ "$csMode" == "dark" ] && ( echo "black" ) || ( echo "white" )`
export BtnBkg=`[ "$csMode" == "dark" ] && ( echo "color" ) || ( echo "bg" )`
export WindBg=`[ "$csMode" == "dark" ] && ( echo "rgba(0,0,0,0.5)" ) || ( echo "rgba(255,255,255,0.6)" )`
export wbarTheme="$HOME/.config/waybar/themes/${gtkThm}.css"
# eval hypr border radius
hyprTheme="$HOME/.config/hypr/themes/${gtkThm}.conf"
hypr_border=`awk -F '=' '{if($1~" rounding ") print $2}' $hyprTheme | sed 's/ //g'`
export active_rad=$(( hypr_border * 5 ))
export button_rad=$(( hypr_border * 8 ))
# set file variables
wLayout="$HOME/.config/wlogout/layout_$1"
wlTmplt="$HOME/.config/wlogout/style_$1.css"
# eval config files
wlStyle=`envsubst < $wlTmplt`
# eval padding
y_pad=$(( res * 20 / 100 ))
# launch wlogout
wlogout -b $wlColms -c 0 -r 0 -T $y_pad -B $y_pad --layout $wLayout --css <(echo "$wlStyle") --protocol layer-shell

View File

@@ -1,52 +0,0 @@
#!/usr/bin/env sh
## main script ##
CFGDIR="$HOME/.config"
X_MODE=$1
## check mode ##
if [ "$X_MODE" == "dark" ] || [ "$X_MODE" == "light" ] ; then
S_MODE="$X_MODE"
elif [ "$X_MODE" == "switch" ] ; then
X_MODE=`readlink $CFGDIR/swww/wall.set | awk -F "." '{print $NF}'`
if [ "$X_MODE" == "dark" ] ; then
S_MODE="light"
flatpak --user override --env=GTK_THEME=Catppuccin-Latte
elif [ "$X_MODE" == "light" ] ; then
S_MODE="dark"
flatpak --user override --env=GTK_THEME=Catppuccin-Mocha
else
echo "ERROR: unable to fetch wallpaper mode."
fi
else
echo "ERROR: unknown mode, use 'dark', 'light' or 'switch'."
exit 1
fi
### hyprland ###
ln -fs $CFGDIR/hypr/${S_MODE}.conf $CFGDIR/hypr/theme.conf
hyprctl reload
### swwwallpaper ###
x=`echo $S_MODE | cut -c 1`
$CFGDIR/swww/swwwallpaper.sh -$x
### qt5ct ###
ln -fs $CFGDIR/qt5ct/colors/${S_MODE}.conf $CFGDIR/qt5ct/colors/theme.conf
### rofi ###
ln -fs $CFGDIR/rofi/${S_MODE}.rasi $CFGDIR/rofi/theme.rasi
### kitty ###
ln -fs $CFGDIR/kitty/${S_MODE}.conf $CFGDIR/kitty/theme.conf
killall -SIGUSR1 kitty
### waybar ###
ln -fs $CFGDIR/waybar/${S_MODE}.css $CFGDIR/waybar/style.css
sleep 1
killall -SIGUSR2 waybar

View File

@@ -0,0 +1,34 @@
#!/usr/bin/env bash
# 获取窗口列表,格式为 "ADDRESS [Workspace] Class: Title"
# 使用 jq 解析 hyprctl clients -j 的 JSON 输出
# select(.workspace.id != -1) 过滤掉特殊工作区(如概览)的窗口
WINDOWS_LIST=$(hyprctl clients -j | jq -r '.[] | select(.workspace.id != -1) | "\(.address)\t[\(.workspace.name)] \(.class): \(.title)"')
# 如果没有窗口,显示提示并退出
if [ -z "$WINDOWS_LIST" ]; then
rofi -e "No open windows found."
exit 1
fi
# 使用 Rofi 显示窗口列表,允许用户选择
# -dmenu: dmenu 模式
# -i: 不区分大小写搜索
# -p: 提示符文本
# -markup-rows: (可选) 如果你想在列表中使用 Pango 标记
# -format 's': 输出选择的完整行
CHOSEN_WINDOW_LINE=$(echo -e "$WINDOWS_LIST" | rofi -dmenu -i -p "󰖯 Switch Window" -format 's')
# 你可以使用其他图标,例如  或 Window:
# 如果用户取消了选择 (Rofi 返回空),则退出
if [ -z "$CHOSEN_WINDOW_LINE" ]; then
exit 0
fi
# 从选择的行中提取窗口地址 (它是第一个字段,以制表符分隔)
CHOSEN_ADDRESS=$(echo "$CHOSEN_WINDOW_LINE" | awk -F'\t' '{print $1}')
# 使用 hyprctl 切换到选定的窗口
hyprctl dispatch focuswindow address:"$CHOSEN_ADDRESS"
exit 0

View File

@@ -1,27 +0,0 @@
#!/usr/bin/env bash
# Check release
if [ ! -f /etc/arch-release ] ; then
exit 0
fi
# Check for updates
aur=$(yay -Qua | wc -l)
ofc=$(pacman -Qu | wc -l)
# Calculate total available updates
upd=$(( ofc + aur ))
echo "$upd"
# Show tooltip
if [ $upd -eq 0 ] ; then
echo " Packages are up to date"
else
echo "󱓽 Official $ofc 󱓾 AUR $aur"
fi
# Trigger upgrade
if [ "$1" == "up" ] ; then
kitty --title systemupdate sh -c 'yay -Syu'
fi

View File

@@ -1,49 +0,0 @@
#!/usr/bin/env sh
## set variables ##
BaseDir=`dirname $(realpath $0)`
ThemeCtl="$HOME/.config/swww/wall.ctl"
ThumbDir="$HOME/.config/swww/Themes-Ctl"
RofiConf="$HOME/.config/rofi/themeselect.rasi"
ThemeSet="$HOME/.config/hypr/themes/theme.conf"
## show and apply theme ##
if [ -z "$1" ] ; then
hypr_border=`awk -F '=' '{if($1~" rounding ") print $2}' $ThemeSet | sed 's/ //g'`
elem_border=$(( hypr_border * 5 ))
icon_border=$(( elem_border - 5 ))
r_override="element {border-radius: ${elem_border}px;} element-icon {border-radius: ${icon_border}px;}"
ThemeSel=$(cat $ThemeCtl | while read line
do
thm=`echo $line | cut -d '|' -f 2`
wal=`echo $line | cut -d '|' -f 3`
echo -en "$thm\x00icon\x1f$ThumbDir/${thm}.png\n"
done | rofi -dmenu -theme-str "${r_override}" -config $RofiConf)
if [ ! -z $ThemeSel ] ; then
${BaseDir}/themeswitch.sh -s $ThemeSel
fi
## regenerate thumbnails ##
elif [ "$1" == "T" ] ; then
echo "refreshing thumbnails..."
cat $ThemeCtl | while read line
do
thm=`echo $line | cut -d '|' -f 2`
wal=`echo $line | cut -d '|' -f 3`
wal=`eval echo $wal`
echo "croping image from wallpaper $ThumbDir/${thm}.png..."
convert $wal -thumbnail 500x500^ -gravity center -extent 500x500 $ThumbDir/${thm}.png
#convert $wal -gravity Center -crop 1080x1080+0+0 $ThumbDir/${thm}.png
#echo "applying rounded corner mask and generating $ThumbDir/${thm}.png..."
#convert -size 1080x1080 xc:none -draw "roundrectangle 0,0,1080,1080,80,80" $ThumbDir/roundedmask.png
#convert $ThumbDir/${thm}_tmp.png -matte $ThumbDir/roundedmask.png -compose DstIn -composite $ThumbDir/${thm}.png
done
fi

View File

@@ -1,125 +0,0 @@
#!/usr/bin/env sh
# set variables
BaseDir=`dirname $(realpath $0)`
ConfDir="$HOME/.config"
ThemeCtl="$ConfDir/swww/wall.ctl"
# evaluate options
while getopts "npst" option ; do
case $option in
n ) # set next theme
ThemeSet=`head -1 $ThemeCtl | cut -d '|' -f 2` #default value
flg=0
while read line
do
if [ $flg -eq 1 ] ; then
ThemeSet=`echo $line | cut -d '|' -f 2`
break
elif [ `echo $line | cut -d '|' -f 1` -eq 1 ] ; then
flg=1
fi
done < $ThemeCtl
export xtrans="center" ;;
p ) # set previous theme
ThemeSet=`tail -1 $ThemeCtl | cut -d '|' -f 2` #default value
flg=0
while read line
do
if [ $flg -eq 1 ] ; then
ThemeSet=`echo $line | cut -d '|' -f 2`
break
elif [ `echo $line | cut -d '|' -f 1` -eq 1 ] ; then
flg=1
fi
done < <( tac $ThemeCtl )
export xtrans="outer" ;;
s ) # set selected theme
shift $((OPTIND -1))
ThemeSet=$1 ;;
t ) # display tooltip
echo ""
echo "󰆊 Next/Previous Theme"
exit 0 ;;
* ) # invalid option
echo "n : set next theme"
echo "p : set previous theme"
echo "s : set theme from parameter"
echo "t : display tooltip"
exit 1 ;;
esac
done
# update theme control
if [ `cat $ThemeCtl | awk -F '|' -v thm=$ThemeSet '{if($2==thm) print$2}' | wc -w` -ne 1 ] ; then
echo "Unknown theme selected: $ThemeSet"
echo "Available themes are:"
cat $ThemeCtl | cut -d '|' -f 2
exit 1
else
echo "Selected theme: $ThemeSet"
sed -i "s/^1/0/g" $ThemeCtl
awk -F '|' -v thm=$ThemeSet '{OFS=FS} {if($2==thm) $1=1; print$0}' $ThemeCtl > $BaseDir/tmp && mv $BaseDir/tmp $ThemeCtl
fi
# swwwallpaper
getWall=`grep '^1|' $ThemeCtl | cut -d '|' -f 3`
getWall=`eval echo $getWall`
ln -fs $getWall $ConfDir/swww/wall.set
$ConfDir/swww/swwwallpaper.sh
if [ $? -ne 0 ] ; then
echo "ERROR: Unable to set wallpaper"
exit 1
fi
# vs code
sed -i "/workbench.colorTheme/c\ \"workbench.colorTheme\": \"${ThemeSet}\"," $ConfDir/Code/User/settings.json
# kitty
ln -fs $ConfDir/kitty/themes/${ThemeSet}.conf $ConfDir/kitty/themes/theme.conf
killall -SIGUSR1 kitty
# qt5ct
sed -i "/^color_scheme_path=/c\color_scheme_path=$ConfDir/qt5ct/colors/${ThemeSet}.conf" $ConfDir/qt5ct/qt5ct.conf
IconSet=`awk -F "'" '$0 ~ /gsettings set org.gnome.desktop.interface icon-theme/{print $2}' $ConfDir/hypr/themes/${ThemeSet}.conf`
sed -i "/^icon_theme=/c\icon_theme=${IconSet}" $ConfDir/qt5ct/qt5ct.conf
# flatpak GTK
flatpak --user override --env=GTK_THEME="${ThemeSet}"
flatpak --user override --env=ICON_THEME="${IconSet}"
# rofi
ln -fs $ConfDir/rofi/themes/${ThemeSet}.rasi $ConfDir/rofi/themes/theme.rasi
# hyprland
ln -fs $ConfDir/hypr/themes/${ThemeSet}.conf $ConfDir/hypr/themes/theme.conf
hyprctl reload
# refresh thumbnails
$BaseDir/themeselect.sh T &
# send notification
ncolor="-h string:bgcolor:#343d46 -h string:fgcolor:#c0c5ce -h string:frcolor:#c0c5ce"
notify-send $ncolor "theme" -a " ${ThemeSet}" -i "~/.config/dunst/icons/paint.svg" -r 91190 -t 2200
# waybar
$ConfDir/waybar/wbarconfgen.sh

View File

@@ -1,76 +0,0 @@
#!/usr/bin/env sh
# define functions
function print_error
{
cat << "EOF"
./volumecontrol.sh -[device] <action>
...valid device are...
i -- [i]nput decive
o -- [o]utput device
...valid actions are...
i -- <i>ncrease volume [+5]
d -- <d>ecrease volume [-5]
m -- <m>ute [x]
EOF
exit 1
}
function notify_vol
{
vol=`pamixer $srce --get-volume | cat`
angle="$(( (($vol+2)/5) * 5 ))"
ico="${icodir}/vol-${angle}.svg"
bar=$(seq -s "." $(($vol / 15)) | sed 's/[0-9]//g')
notify-send $ncolor "volctl" -a "$vol$bar" "$nsink" -i $ico -r 91190 -t 800
}
function notify_mute
{
mute=`pamixer $srce --get-mute | cat`
if [ "$mute" == "true" ] ; then
notify-send $ncolor "volctl" -a "muted" "$nsink" -i ${icodir}/muted-${dvce}.svg -r 91190 -t 800
else
notify-send $ncolor "volctl" -a "unmuted" "$nsink" -i ${icodir}/unmuted-${dvce}.svg -r 91190 -t 800
fi
}
# set device source
while getopts io SetSrc
do
case $SetSrc in
i) nsink=$(pamixer --list-sources | grep "_input." | head -1 | awk -F '" "' '{print $NF}' | sed 's/"//')
srce="--default-source"
dvce="mic" ;;
o) nsink=$(pamixer --get-default-sink | grep "_output." | awk -F '" "' '{print $NF}' | sed 's/"//')
srce=""
dvce="speaker" ;;
esac
done
if [ $OPTIND -eq 1 ] ; then
print_error
fi
# set device action
shift $((OPTIND -1))
step="${2:-5}"
icodir="~/.config/dunst/icons/vol"
ncolor="-h string:bgcolor:#343d46 -h string:fgcolor:#c0c5ce -h string:frcolor:#c0c5ce"
case $1 in
i) pamixer $srce -i ${step}
notify_vol ;;
d) pamixer $srce -d ${step}
notify_vol ;;
m) pamixer $srce -t
notify_mute ;;
*) print_error ;;
esac

View File

@@ -1,20 +1,13 @@
exec = hyprctl setcursor Bibata-Modern-Ice 20
exec = gsettings set org.gnome.desktop.interface cursor-theme 'Bibata-Modern-Ice'
exec = gsettings set org.gnome.desktop.interface cursor-size 20
exec = kvantummanager --set Catppuccin-Latte
exec = gsettings set org.gnome.desktop.interface icon-theme 'Tela-circle-grey'
exec = gsettings set org.gnome.desktop.interface gtk-theme 'Catppuccin-Latte'
exec = gsettings set org.gnome.desktop.interface color-scheme 'prefer-light'
# █░░ ▄▀█ █▄█ █▀█ █░█ ▀█▀ █▀
# █▄▄ █▀█ ░█░ █▄█ █▄█ ░█░ ▄█
exec = gsettings set org.gnome.desktop.interface font-name 'Cantarell 10'
exec = gsettings set org.gnome.desktop.interface document-font-name 'Cantarell 10'
exec = gsettings set org.gnome.desktop.interface monospace-font-name 'CaskaydiaCove Nerd Font Mono 9'
exec = gsettings set org.gnome.desktop.interface font-antialiasing 'rgba'
exec = gsettings set org.gnome.desktop.interface font-hinting 'full'
# See https://wiki.hyprland.org/Configuring/Dwindle-Layout/ for more
env = XCURSOR_THEME,Bibata-Modern-Ice
env = XCURSOR_SIZE,20
dwindle {
pseudotile = yes # master switch for pseudotiling. Enabling is bound to mainMod + P in the keybinds section below
preserve_split = yes # you probably want this
}
general {
gaps_in = 2
@@ -36,6 +29,4 @@ decoration {
ignore_opacity = on
xray = false
}
}
blurls = waybar
}

View File

@@ -10,21 +10,30 @@
# See https://wiki.hyprland.org/Configuring/Window-Rules/ for more
# Float rules for system dialogs and popups
# windowrulev2 = center, class:^((?!fcitx).)*$
windowrulev2 = center,class:^(.*)$,title:^(Open [Ff]ile)
windowrulev2 = float,class:^(.*)$,title:^(Open [Ff]iles?)
windowrulev2 = center,class:^(.*)$,title:^(Open [Ff]iles?)
windowrulev2 = float,class:^(.*)$,title:^(Open [Ff]older)
windowrulev2 = center,class:^(.*)$,title:^(Open [Ff]older)
windowrulev2 = float,class:^(.*)$,title:^(Save [Ff]ile)
windowrulev2 = center,class:^(.*)$,title:^(Save [Ff]ile)
windowrulev2 = float,class:^(.*)$,title:^(Save [Aa]s)
windowrulev2 = center,class:^(.*)$,title:^(Save [Aa]s)
windowrulev2 = float,class:^(wechat)$,title:^(预览)$
windowrulev2 = center,class:^(wechat)$,title:^(预览)$
windowrulev2 = center,class:^(.*)$,title:^(Location)$
windowrulev2 = center,class:^(Code)$
windowrulev2 = opacity 0.90 0.90,class:^(Code)$
windowrulev2 = opacity 0.80 0.80,class:^(code-url-handler)$
windowrulev2 = opacity 0.80 0.80,class:^(kitty)$
windowrulev2 = float,class:^(org.pulseaudio.pavucontrol)$
windowrulev2 = opacity 0.80 0.70,class:^(org.pulseaudio.pavucontrol)$
windowrulev2 = opacity 0.80 0.70,class:^(pavucontrol)$
windowrulev2 = float,class:^(blueman-manager)$
windowrulev2 = opacity 0.80 0.70,class:^(blueman-manager)$
windowrulev2 = float,class:^(pavucontrol)$
windowrulev2 = float,class:^(blueman-manager)$
windowrulev2 = opacity 1.00 1.00,class:^(code)$
windowrulev2 = opacity 0.80 0.80,class:^(code-url-handler)$

View File

@@ -1,11 +1,27 @@
# vim:ft=kitty
# 背景透明度
background_opacity 0.6
## name: Catppuccin Latte 🐑
## author: Pocco81 (https://github.com/Pocco81)
## license: MIT
## upstream: https://github.com/catppuccin/kitty/blob/main/latte.conf
## blurb: Soothing pastel theme for the high-spirited!
# 开启抗锯齿
enable_ligatures yes
# 开启字体平滑
font_antialias true
# 开启子像素渲染
font_hinting full
# 终端兼容性设置
term xterm-256color
shell_integration no-rc
# 修复 SSH 退格键问题
map ctrl+h send_text all \x08
backspace_sends_backspace yes
# 设置四周边距(单位:像素)
window_padding_width 8
map ctrl+shift+equal change_font_size all +1
map ctrl+shift+minus change_font_size all -1
map ctrl+shift+backspace change_font_size all 0
# The basic colors
@@ -77,12 +93,4 @@ color14 #179299
# white
color7 #ACB0BE
color15 #ACB0BE
# 终端兼容性设置
term xterm-256color
shell_integration no-rc
# 修复 SSH 退格键问题
map ctrl+h send_text all \x08
backspace_sends_backspace yes
color15 #ACB0BE

View File

@@ -33,8 +33,8 @@ configuration {
window {
background-color: @bg0;
location: center;
width: 560px;
height: 450px;
width: 720px;
height: 500px;
border-radius: 8px;
border: 1px;
border-color: @bg1;

View File

@@ -1,23 +1,19 @@
// --// waybar config generated by wbarconfgen.sh //-- //
{
// sourced from header module //
"layer": "top",
"position": "top",
"mod": "dock",
"height": 28,
"height": 30,
"exclusive": true,
"passthrough": false,
"gtk-layer-shell": true,
// positions generated based on config.ctl //
"modules-left": [
"custom/lr",
"hyprland/workspaces",
"hyprland/window",
"custom/rr"
// "custom/lr",
// "hyprland/window",
// "custom/rr"
],
"modules-center": ["custom/lr", "clock", "custom/rr"],
"modules-right": [
@@ -36,8 +32,6 @@
"network",
"bluetooth",
"wireplumber",
"wireplumber#microphone",
"custom/cliphist",
"custom/power",
"custom/rr"
],
@@ -46,28 +40,8 @@
"custom/power": {
"format": "{}",
"exec": "echo ; echo  logout",
"on-click": "~/.config/hypr/scripts/logoutlaunch.sh 2",
"interval": 86400, // once every day
"tooltip": true
},
"custom/cliphist": {
"format": "{}",
"exec": "echo ; echo 󰅇 clipboard history",
"on-click": "sleep 0.1 && ~/.config/hypr/scripts/cliphist.sh c 1",
//"on-click-right": "sleep 0.1 && ~/.config/hypr/scripts/cliphist.sh d",
"on-click-middle": "sleep 0.1 && ~/.config/hypr/scripts/cliphist.sh w 1",
"interval": 86400, // once every day
"tooltip": true
},
"custom/mode": {
"format": "{}",
"exec": "echo ; echo 󰟡 switch mode",
"on-click": "~/.config/hypr/scripts/themeswitch.sh -n",
"on-click-right": "~/.config/hypr/scripts/themeswitch.sh -p",
"on-click-middle": "sleep 0.1 && ~/.config/hypr/scripts/themeselect.sh",
"exec": "echo ; echo  Power Manage",
"on-click": "wlogout",
"interval": 86400, // once every day
"tooltip": true
},
@@ -86,28 +60,71 @@
"8": ["HDMI-A-2"],
"9": ["HDMI-A-2"],
"10": ["HDMI-A-2"]
},
"format": "<sub>{icon}</sub> {windows}",
"format-window-separator": " ",
"window-rewrite-default": "",
"window-rewrite": {
"fcitx": "󰌌",
"code": "󰨞",
"Cursor": "󰅪",
"jetbrains-idea-ce": "",
"dbeaver": "",
"class<microsoft-edge>": "",
"class<chromium-browser>": "",
"title<.*youtube.*>": "",
"rofi": "󱓞",
"kitty": "",
"nemo": "󰪶",
"wechat": "",
"wps": "󰈬",
"class<et>": "󰈛",
"vlc": "󰕼"
}
},
"hyprland/window": {
"format": "{title}",
"tooltip-format": "[{class}]: {title}",
"max-length": 30,
"separate-outputs": true
},
"clock": {
"format": "{:%Y/%m/%d %H:%M}",
"format-alt": "{:%I:%M%p 周%u}",
"tooltip-format": "<tt><big>{calendar}</big></tt>",
"locale": "zh_CN.UTF-8"
"format-alt": "{:L%A, %B %d %Y (%R)} ",
"timezones": ["Asia/Shanghai"],
"calendar": {
"mode": "year",
"mode-mon-col": 3,
"weeks-pos": "right",
"on-scroll": 1,
"format": {
"months": "<span color='#ffead3'><b>{}</b></span>",
"days": "<span color='#ecc6d9'><b>{}</b></span>",
"weeks": "<span color='#99ffdd'><b>W{}</b></span>",
"weekdays": "<span color='#ffcc66'><b>{}</b></span>",
"today": "<span color='#ff6699'><b><u>{}</u></b></span>"
}
},
"actions": {
"on-click-right": "mode",
"on-scroll-up": "shift_up",
"on-scroll-down": "shift_down"
},
"tooltip-format": "<span size='9pt' font='WenQuanYi Zen Hei Mono'><tt>{calendar}</tt></span>",
"locale": "en_US.UTF-8"
},
"wlr/taskbar": {
"format": "{icon}",
"icon-size": 14,
"icon-theme": "papirus-icon-theme",
"icon-theme": "Papirus-Dark",
"spacing": 0,
"tooltip-format": "{title}",
"on-click": "activate",
"on-click-middle": "close",
"ignore-list": ["Alacritty"],
"app_ids-mapping": {
"firefoxdeveloperedition": "firefox-developer-edition"
}
"on-click-middle": "close"
},
"tray": {
@@ -116,14 +133,14 @@
},
"cpu": {
"interval": 10,
"interval": 5,
"format": "󰍛 {usage}%",
"format-alt": "{icon0}{icon1}{icon2}{icon3}",
"format-icons": ["▁", "▂", "▃", "▄", "▅", "▆", "▇", "█"]
},
"temperature": {
"interval": 10,
"interval": 5,
"hwmon-path": "/sys/devices/platform/coretemp.0/hwmon/hwmon2/temp1_input",
"format": " {temperatureC}°C"
},
@@ -138,14 +155,14 @@
},
"network": {
"interval": 5,
// "interface": "wlp2*", // (Optional) To force the use of this interface
"format-wifi": "󰤨 {essid}",
"format-ethernet": "󱘖 Wired",
"tooltip-format": "󱘖 {ipaddr}  {bandwidthUpBytes}  {bandwidthDownBytes}",
"format-linked": "󱘖 {ifname} (No IP)",
"format-disconnected": " Disconnected",
"format-alt": "󰤨 {signalStrength}%",
"interval": 5
"format-alt": "󰤨 {signalStrength}%"
},
"bluetooth": {
@@ -161,32 +178,10 @@
"format": "{icon} {volume}",
"format-muted": "󰝟",
"on-click": "pavucontrol -t 3",
"on-click-middle": "~/.config/hypr/scripts/volumecontrol.sh -o m",
"on-scroll-up": "~/.config/hypr/scripts/volumecontrol.sh -o i",
"on-scroll-down": "~/.config/hypr/scripts/volumecontrol.sh -o d",
"on-click-middle": "pamixer -t",
"tooltip-format": "{icon} {desc} // {volume}%",
"scroll-step": 5,
"format-icons": {
"headphone": "",
"hands-free": "",
"headset": "",
"phone": "",
"portable": "",
"car": "",
"default": ["", "", ""]
}
},
"wireplumber#microphone": {
"format": "{format_source}",
"format-source": "",
"format-source-muted": "",
"on-click": "c -t 4",
"on-click-middle": "~/.config/hypr/scripts/volumecontrol.sh -i m",
"on-scroll-up": "~/.config/hypr/scripts/volumecontrol.sh -i i",
"on-scroll-down": "~/.config/hypr/scripts/volumecontrol.sh -i d",
"tooltip-format": "{format_source} {source_desc} // {source_volume}%",
"scroll-step": 5
"scroll-step": 2,
"format-icons": ["", "", ""]
},
// modules for padding //

View File

@@ -19,83 +19,6 @@
min-height: 12px;
}
window#waybar {
background: @bar-bg;
}
tooltip {
background: @tool-bg;
color: @tool-color;
border-radius: 16px;
border-width: 1px;
border-style: solid;
border-color: @tool-border;
}
#workspaces button {
box-shadow: none;
text-shadow: none;
padding: 0px;
border-radius: 8px;
margin-top: 2px;
margin-bottom: 2px;
margin-left: 2px;
margin-right: 2px;
padding-left: 2px;
padding-right: 2px;
color: @wb-color;
animation: gradient_f 20s ease-in infinite;
transition: all 0.5s cubic-bezier(0.55, -0.68, 0.48, 1.682);
}
#workspaces button.active {
background: @wb-act-bg;
color: @wb-act-color;
animation: gradient_f 20s ease-in infinite;
transition: all 0.3s cubic-bezier(0.55, -0.68, 0.48, 1.682);
}
#workspaces button:hover {
background: @wb-hvr-bg;
color: @wb-hvr-color;
padding-left: 2px;
padding-right: 2px;
animation: gradient_f 20s ease-in infinite;
transition: all 0.3s cubic-bezier(0.55, -0.68, 0.48, 1.682);
}
#taskbar button {
box-shadow: none;
text-shadow: none;
padding: 0px;
border-radius: 8px;
margin-top: 2px;
margin-bottom: 2px;
margin-right: 2px;
padding-left: 2px;
padding-left: 2px;
padding-right: 2px;
color: @wb-color;
animation: gradient_f 20s ease-in infinite;
transition: all 0.5s cubic-bezier(0.55, -0.68, 0.48, 1.682);
}
#taskbar button.active {
background: @wb-act-bg;
color: @wb-act-color;
animation: gradient_f 20s ease-in infinite;
transition: all 0.3s cubic-bezier(0.55, -0.68, 0.48, 1.682);
}
#taskbar button:hover {
background: @wb-hvr-bg;
color: @wb-hvr-color;
padding-left: 2px;
padding-right: 2px;
animation: gradient_f 20s ease-in infinite;
transition: all 0.3s cubic-bezier(0.55, -0.68, 0.48, 1.682);
}
#cpu,
#memory,
#temperature,
@@ -120,9 +43,71 @@ tooltip {
color: @main-color;
background: @main-bg;
opacity: 1;
margin: 4px 0px 4px 0px;
padding-left: 4px;
padding-right: 4px;
margin: 2px 0px;
padding: 0px 4px;
}
window#waybar {
background: @bar-bg;
}
tooltip {
background: @tool-bg;
color: @tool-color;
border-radius: 16px;
border-width: 1px;
border-style: solid;
border-color: @tool-border;
}
#workspaces button {
margin: 2px;
padding: 0px 6px;
box-shadow: none;
text-shadow: none;
border-radius: 8px;
color: @wb-color;
animation: gradient_f 20s ease-in infinite;
transition: all 0.5s cubic-bezier(0.55, -0.68, 0.48, 1.682);
}
#workspaces button.active {
background: @wb-act-bg;
color: @wb-act-color;
animation: gradient_f 20s ease-in infinite;
transition: all 0.3s cubic-bezier(0.55, -0.68, 0.48, 1.682);
}
#workspaces button:hover {
background: @wb-hvr-bg;
color: @wb-hvr-color;
animation: gradient_f 20s ease-in infinite;
transition: all 0.3s cubic-bezier(0.55, -0.68, 0.48, 1.682);
}
#taskbar button {
box-shadow: none;
text-shadow: none;
padding: 0px 4px;
border-radius: 8px;
margin: 2px;
color: @wb-color;
animation: gradient_f 20s ease-in infinite;
transition: all 0.5s cubic-bezier(0.55, -0.68, 0.48, 1.682);
}
#taskbar button.active {
background: @wb-act-bg;
color: @wb-act-color;
animation: gradient_f 20s ease-in infinite;
transition: all 0.3s cubic-bezier(0.55, -0.68, 0.48, 1.682);
}
#taskbar button:hover {
background: @wb-hvr-bg;
color: @wb-hvr-color;
animation: gradient_f 20s ease-in infinite;
transition: all 0.3s cubic-bezier(0.55, -0.68, 0.48, 1.682);
}
#workspaces,

Binary file not shown.

Before

Width:  |  Height:  |  Size: 17 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 7.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 10 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 11 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 8.8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 15 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 17 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 16 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 7.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 16 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 19 KiB

View File

@@ -4,38 +4,33 @@
"text" : "Lock",
"keybind" : "l"
}
{
"label" : "logout",
"action" : "hyprctl dispatch exit 0",
"text" : "Logout",
"keybind" : "e"
}
{
"label" : "suspend",
"action" : "systemctl suspend",
"text" : "Suspend",
"keybind" : "u"
}
{
"label" : "shutdown",
"action" : "systemctl poweroff",
"text" : "Shutdown",
"keybind" : "s"
}
{
"label" : "hibernate",
"action" : "systemctl hibernate",
"text" : "Hibernate",
"keybind" : "h"
}
{
"label" : "logout",
"action" : "loginctl terminate-user $USER",
"text" : "Logout",
"keybind" : "e"
}
{
"label" : "shutdown",
"action" : "systemctl poweroff",
"text" : "Shutdown",
"keybind" : "s"
}
{
"label" : "suspend",
"action" : "systemctl suspend",
"text" : "Suspend",
"keybind" : "u"
}
{
"label" : "reboot",
"action" : "systemctl reboot",
"text" : "Reboot",
"keybind" : "r"
}
}

View File

@@ -1,27 +0,0 @@
{
"label" : "lock",
"action" : "swaylock",
"text" : "Lock",
"keybind" : "l"
}
{
"label" : "logout",
"action" : "hyprctl dispatch exit 0",
"text" : "Logout",
"keybind" : "e"
}
{
"label" : "shutdown",
"action" : "systemctl poweroff",
"text" : "Shutdown",
"keybind" : "s"
}
{
"label" : "reboot",
"action" : "systemctl reboot",
"text" : "Reboot",
"keybind" : "r"
}

View File

@@ -1,104 +0,0 @@
* {
background-image: none;
font-size: ${fntSize}px;
}
@import "${wbarTheme}";
window {
background-color: ${WindBg};
}
button {
color: ${BtnCol};
background-color: @main-${BtnBkg};
outline-style: none;
border: none;
border-width: 0px;
background-repeat: no-repeat;
background-position: center;
background-size: 20%;
border-radius: 0px;
box-shadow: none;
text-shadow: none;
animation: gradient_f 20s ease-in infinite;
}
button:focus {
background-color: @wb-act-bg;
background-size: 30%;
}
button:hover {
background-color: @wb-hvr-bg;
background-size: 40%;
border-radius: ${active_rad}px;
animation: gradient_f 20s ease-in infinite;
transition: all 0.3s cubic-bezier(.55,0.0,.28,1.682);
}
button:hover#lock {
border-radius: ${active_rad}px;
margin : ${hvr}px 0px ${hvr}px ${mgn}px;
}
button:hover#logout {
border-radius: ${active_rad}px;
margin : ${hvr}px 0px ${hvr}px 0px;
}
button:hover#suspend {
border-radius: ${active_rad}px;
margin : ${hvr}px 0px ${hvr}px 0px;
}
button:hover#shutdown {
border-radius: ${active_rad}px;
margin : ${hvr}px 0px ${hvr}px 0px;
}
button:hover#hibernate {
border-radius: ${active_rad}px;
margin : ${hvr}px 0px ${hvr}px 0px;
}
button:hover#reboot {
border-radius: ${active_rad}px;
margin : ${hvr}px ${mgn}px ${hvr}px 0px;
}
#lock {
background-image: image(url("$HOME/.config/wlogout/icons/lock_${csMode}.png"), url("/usr/share/wlogout/icons/lock.png"), url("/usr/local/share/wlogout/icons/lock.png"));
border-radius: ${button_rad}px 0px 0px ${button_rad}px;
margin : ${mgn}px 0px ${mgn}px ${mgn}px;
}
#logout {
background-image: image(url("$HOME/.config/wlogout/icons/logout_${csMode}.png"), url("/usr/share/wlogout/icons/logout.png"), url("/usr/local/share/wlogout/icons/logout.png"));
border-radius: 0px 0px 0px 0px;
margin : ${mgn}px 0px ${mgn}px 0px;
}
#suspend {
background-image: image(url("$HOME/.config/wlogout/icons/suspend_${csMode}.png"), url("/usr/share/wlogout/icons/suspend.png"), url("/usr/local/share/wlogout/icons/suspend.png"));
border-radius: 0px 0px 0px 0px;
margin : ${mgn}px 0px ${mgn}px 0px;
}
#shutdown {
background-image: image(url("$HOME/.config/wlogout/icons/shutdown_${csMode}.png"), url("/usr/share/wlogout/icons/shutdown.png"), url("/usr/local/share/wlogout/icons/shutdown.png"));
border-radius: 0px 0px 0px 0px;
margin : ${mgn}px 0px ${mgn}px 0px;
}
#hibernate {
background-image: image(url("$HOME/.config/wlogout/icons/hibernate_${csMode}.png"), url("/usr/share/wlogout/icons/hibernate.png"), url("/usr/local/share/wlogout/icons/hibernate.png"));
border-radius: 0px 0px 0px 0px;
margin : ${mgn}px 0px ${mgn}px 0px;
}
#reboot {
background-image: image(url("$HOME/.config/wlogout/icons/reboot_${csMode}.png"), url("/usr/share/wlogout/icons/reboot.png"), url("/usr/local/share/wlogout/icons/reboot.png"));
border-radius: 0px ${button_rad}px ${button_rad}px 0px;
margin : ${mgn}px ${mgn}px ${mgn}px 0px;
}

View File

@@ -1,82 +0,0 @@
* {
background-image: none;
font-size: ${fntSize}px;
}
@import "${wbarTheme}";
window {
background-color: ${WindBg};
}
button {
color: ${BtnCol};
background-color: @main-${BtnBkg};
outline-style: none;
border: none;
border-width: 0px;
background-repeat: no-repeat;
background-position: center;
background-size: 10%;
border-radius: 0px;
box-shadow: none;
text-shadow: none;
animation: gradient_f 20s ease-in infinite;
}
button:focus {
background-color: @wb-act-bg;
background-size: 20%;
}
button:hover {
background-color: @wb-hvr-bg;
background-size: 25%;
border-radius: ${active_rad}px;
animation: gradient_f 20s ease-in infinite;
transition: all 0.3s cubic-bezier(.55,0.0,.28,1.682);
}
button:hover#lock {
border-radius: ${active_rad}px ${active_rad}px 0px ${active_rad}px;
margin : ${hvr}px 0px 0px ${hvr2}px;
}
button:hover#logout {
border-radius: ${active_rad}px 0px ${active_rad}px ${active_rad}px;
margin : 0px 0px ${hvr}px ${hvr2}px;
}
button:hover#shutdown {
border-radius: ${active_rad}px ${active_rad}px ${active_rad}px 0px;
margin : ${hvr}px ${hvr2}px 0px 0px;
}
button:hover#reboot {
border-radius: 0px ${active_rad}px ${active_rad}px ${active_rad}px;
margin : 0px ${hvr2}px ${hvr}px 0px;
}
#lock {
background-image: image(url("$HOME/.config/wlogout/icons/lock_${csMode}.png"), url("/usr/share/wlogout/icons/lock.png"), url("/usr/local/share/wlogout/icons/lock.png"));
border-radius: ${button_rad}px 0px 0px 0px;
margin : ${mgn}px 0px 0px ${mgn2}px;
}
#logout {
background-image: image(url("$HOME/.config/wlogout/icons/logout_${csMode}.png"), url("/usr/share/wlogout/icons/logout.png"), url("/usr/local/share/wlogout/icons/logout.png"));
border-radius: 0px 0px 0px ${button_rad}px;
margin : 0px 0px ${mgn}px ${mgn2}px;
}
#shutdown {
background-image: image(url("$HOME/.config/wlogout/icons/shutdown_${csMode}.png"), url("/usr/share/wlogout/icons/shutdown.png"), url("/usr/local/share/wlogout/icons/shutdown.png"));
border-radius: 0px ${button_rad}px 0px 0px;
margin : ${mgn}px ${mgn2}px 0px 0px;
}
#reboot {
background-image: image(url("$HOME/.config/wlogout/icons/reboot_${csMode}.png"), url("/usr/share/wlogout/icons/reboot.png"), url("/usr/local/share/wlogout/icons/reboot.png"));
border-radius: 0px 0px ${button_rad}px 0px;
margin : 0px ${mgn2}px ${mgn}px 0px;
}

View File

@@ -1,5 +1,7 @@
{ config, lib, pkgs, ... }:
{ config, libs, pkgs, ... }:
let
confPath = "modules/home/hyprland/conf";
in
{
imports = [
./env.nix
@@ -12,82 +14,40 @@
package = pkgs.hyprland;
# Whether to enable XWayland
xwayland.enable = true;
# Optional
# Whether to enable hyprland-session.target on hyprland startup
# systemd.enable = true;
settings = lib.mkDefault {
decoration = {
shadow_offset = "0 5";
"col.shadow" = "rgba(00000099)";
};
};
systemd.enable = false;
};
home.packages = with pkgs; [
hyprshot #screenshot
waybar # the status bar
swww # wallpaper
libnotify # for notify-send command
mako # notify daemon
hyprshot #screenshot
rofi # app launcher
kitty # terminal
wlogout # logout menu
killall
pavucontrol # audio control
nautilus #file manager for GNOME
nemo #file manager
jq # json query util
];
programs = {
bash = {
initExtra = ''
if [ -z $DISPLAY ] && [ "$(tty)" = "/dev/tty1" ];
then
echo 'Welcome! '
fi
'';
};
swaylock.enable = true;
};
# hyprland configs, based on https://github.com/notwidow/hyprland
home.file.".config/hypr" = {
source = ./conf/hypr;
# copy the scripts directory recursively
recursive = true;
};
home.file.".config/rofi" = {
source = ./conf/rofi;
recursive = true;
};
home.file.".config/kitty" = {
source = ./conf/kitty;
recursive = true;
};
home.file.".config/mako" = {
source = ./conf/mako;
recursive = true;
};
# home.file.".config/swww" = {
# source = ./conf/swww;
# recursive = true;
# };
home.file.".config/waybar" = {
source = ./conf/waybar;
recursive = true;
};
home.file.".config/wlogout" = {
source = ./conf/wlogout;
recursive = true;
};
# 使用map函数循环 conf 变量,动态的生成 home.file.<user>.config.${i}
xdg.configFile = builtins.listToAttrs
(builtins.map
(name: {
inherit name;
value = {
source = config.home-libs.mkOutOfStoreSymlink "${confPath}/${name}";
};
})
(builtins.attrNames (builtins.readDir ./conf))
);
}

View File

@@ -29,7 +29,6 @@
XDG_SESSION_DESKTOP = "Hyprland";
XDG_SESSION_TYPE = "wayland";
XDG_BIN_HOME = "\${HOME}/.local/bin";
XDG_PICTURES_DIR = "\${HOME}/tmp";
};
sessionPath = [
"$HOME/.npm-global/bin"

View File

@@ -48,5 +48,10 @@
"workbench.colorTheme": "Default Light Modern",
"augment.chat.userGuidelines": "Always response in 中文",
"augment.completions.enableAutomaticCompletions": true,
"editor.fontFamily": "'Droid Sans Mono', 'monospace', monospace, 'JetBrainsMono Nerd Font'"
"editor.fontFamily": "'Source Code Pro', 'JetBrainsMono Nerd Font'",
"github.copilot.nextEditSuggestions.enabled": true,
"update.mode": "none",
"github.copilot.chat.localeOverride": "zh-CN",
"github.copilot.selectedCompletionModel": "GPT-4.1",
"diffEditor.ignoreTrimWhitespace": false
}

View File

@@ -1,31 +1,39 @@
{ pkgs, ... }:
{ config, pkgs, lib, libs, ... }:
let
extensions = with pkgs.vscode-extensions; [
bierner.markdown-mermaid
esbenp.prettier-vscode
foxundermoon.shell-format
github.copilot
github.copilot-chat
golang.go
jnoortheen.nix-ide
pkief.material-icon-theme
] ++ pkgs.vscode-utils.extensionsFromVscodeMarketplace [
];
in
{
imports = [
];
programs = {
vscode = {
enable = true;
profiles.default = {
extensions = with pkgs.vscode-extensions; [
bierner.markdown-mermaid
esbenp.prettier-vscode
foxundermoon.shell-format
github.copilot
github.copilot-chat
golang.go
jnoortheen.nix-ide
pkief.material-icon-theme
] ++ pkgs.vscode-utils.extensionsFromVscodeMarketplace [
];
userSettings = builtins.fromJSON (builtins.readFile ./settings.json);
};
};
} // (if lib.versionAtLeast config.home.stateVersion "25.05" then {
profiles.default = { inherit extensions; };
} else {
inherit extensions;
});
};
home = {
file.".config/Code/User/keybindings.json" = {
source = ./keybindings.json;
};
};
# 使用map函数循环 conf 变量,动态的生成 home.file.<user>.config.${i}
xdg.configFile = builtins.listToAttrs
(builtins.map
(name: {
name = "Code/User/${name}";
value = {
source = config.home-libs.mkOutOfStoreSymlink "modules/home/vscode/conf/${name}";
};
})
(builtins.attrNames (builtins.readDir ./conf))
);
}

View File

@@ -1,84 +0,0 @@
# XDG stands for "Cross-Desktop Group", with X used to mean "cross".
# It's a bunch of specifications from freedesktop.org intended to standardize desktops and
# other GUI applications on various systems (primarily Unix-like) to be interoperable:
# https://www.freedesktop.org/wiki/Specifications/
{ config, pkgs, ... }: {
home.packages = with pkgs; [
xdg-utils # provides cli tools such as `xdg-mime` `xdg-open`
xdg-user-dirs
];
xdg = {
enable = true;
cacheHome = config.home.homeDirectory + "/.cache";
# manage $XDG_CONFIG_HOME/mimeapps.list
# xdg search all desktop entries from $XDG_DATA_DIRS, check it by command:
# echo $XDG_DATA_DIRS
# the system-level desktop entries can be list by command:
# ls -l /run/current-system/sw/share/applications/
# the user-level desktop entries can be list by command(user ryan):
# ls /etc/profiles/per-user/ryan/share/applications/
mimeApps = {
enable = true;
defaultApplications =
let
browser = [ "microsoft-edge.desktop" ];
in
{
"application/json" = browser;
"application/pdf" = browser; # TODO: pdf viewer
"text/html" = browser;
"text/xml" = browser;
"application/xml" = browser;
"application/xhtml+xml" = browser;
"application/xhtml_xml" = browser;
"application/rdf+xml" = browser;
"application/rss+xml" = browser;
"application/x-extension-htm" = browser;
"application/x-extension-html" = browser;
"application/x-extension-shtml" = browser;
"application/x-extension-xht" = browser;
"application/x-extension-xhtml" = browser;
"x-scheme-handler/about" = browser;
"x-scheme-handler/ftp" = browser;
"x-scheme-handler/http" = browser;
"x-scheme-handler/https" = browser;
"x-scheme-handler/unknown" = browser;
"x-scheme-handler/discord" = [ "discord.desktop" ];
"x-scheme-handler/tg" = [ "telegramdesktop.desktop" ];
"audio/*" = [ "vlc.desktop" ];
"video/*" = [ "vlc.dekstop" ];
"image/*" = [ "imv.desktop" ];
"image/gif" = [ "imv.desktop" ];
"image/jpeg" = [ "imv.desktop" ];
"image/png" = [ "imv.desktop" ];
"image/webp" = [ "imv.desktop" ];
};
associations.removed =
{
# ......
};
};
userDirs = {
enable = false;
createDirectories = false;
documents = config.home.homeDirectory + "/doc";
music = config.home.homeDirectory + "/doc/music";
desktop = config.home.homeDirectory + "/tmp";
download = config.home.homeDirectory + "/tmp";
videos = config.home.homeDirectory + "/tmp";
pictures = config.home.homeDirectory + "/tmp";
templates = config.home.homeDirectory + "/tmp";
extraConfig = {
XDG_SCREENSHOTS_DIR = config.home.homeDirectory + "/tmp/Screenshots";
};
};
};
}

View File

@@ -0,0 +1,31 @@
[Default Applications]
application/json=microsoft-edge.desktop
application/pdf=microsoft-edge.desktop
application/rdf+xml=microsoft-edge.desktop
application/rss+xml=microsoft-edge.desktop
application/x-extension-htm=microsoft-edge.desktop
application/x-extension-html=microsoft-edge.desktop
application/x-extension-shtml=microsoft-edge.desktop
application/x-extension-xht=microsoft-edge.desktop
application/x-extension-xhtml=microsoft-edge.desktop
application/xhtml+xml=microsoft-edge.desktop
application/xhtml_xml=microsoft-edge.desktop
application/xml=microsoft-edge.desktop
audio/*=vlc.desktop
image/*=imv.desktop
image/gif=imv.desktop
image/jpeg=imv.desktop
image/png=imv.desktop
image/webp=imv.desktop
inode/directory=nemo.desktop;xdg-open.desktop;nemo.desktop;thunar.desktop;org.gnome.Nautilus.desktop
text/html=microsoft-edge.desktop
text/xml=microsoft-edge.desktop
video/*=vlc.dekstop
x-scheme-handler/about=microsoft-edge.desktop
x-scheme-handler/discord=discord.desktop
x-scheme-handler/ftp=microsoft-edge.desktop
x-scheme-handler/http=microsoft-edge.desktop
x-scheme-handler/https=microsoft-edge.desktop
x-scheme-handler/tg=telegramdesktop.desktop
x-scheme-handler/unknown=microsoft-edge.desktop
text/plain=code.desktop

View File

@@ -0,0 +1,50 @@
# XDG stands for "Cross-Desktop Group", with X used to mean "cross".
# It's a bunch of specifications from freedesktop.org intended to standardize desktops and
# other GUI applications on various systems (primarily Unix-like) to be interoperable:
# https://www.freedesktop.org/wiki/Specifications/
{ config, pkgs, ... }: {
home.packages = with pkgs; [
xdg-utils # provides cli tools such as `xdg-mime` `xdg-open`
xdg-user-dirs
];
xdg = {
enable = true;
cacheHome = config.home.homeDirectory + "/.cache";
systemDirs = {
data = [
"${config.home.homeDirectory}/.local/share/flatpak/exports/share"
"/var/lib/flatpak/exports/share"
];
};
userDirs = {
enable = true;
createDirectories = false;
documents = config.home.homeDirectory + "/doc";
music = config.home.homeDirectory + "/doc/music";
desktop = config.home.homeDirectory + "/tmp";
download = config.home.homeDirectory + "/tmp";
videos = config.home.homeDirectory + "/tmp";
pictures = config.home.homeDirectory + "/tmp";
# templates = config.home.homeDirectory + "/tmp";
# publicShare = config.home.homeDirectory + "/tmp";
extraConfig = {
XDG_SCREENSHOTS_DIR = config.home.homeDirectory + "/tmp/Screenshots";
};
};
};
# 使用map函数循环 conf 变量,动态的生成 home.file.<user>.config.${i}
xdg.configFile = builtins.listToAttrs
(builtins.map
(name: {
inherit name;
value = {
source = config.home-libs.mkOutOfStoreSymlink "modules/home/xdg/conf/${name}";
};
})
(builtins.attrNames (builtins.readDir ./conf))
);
}

View File

@@ -17,7 +17,7 @@
history.size = 10000;
history.ignoreAllDups = true;
history.path = "$HOME/.zsh_history";
history.ignorePatterns = [ "rm *" "pkill *" "cp *" ];
# history.ignorePatterns = [ "rm *" "pkill *" "cp *" ];
oh-my-zsh = {
enable = true;
@@ -37,10 +37,5 @@
}
];
};
thefuck = {
enable = true;
enableZshIntegration = true; # 自动为 Zsh 设置别名 (通常是 'fuck')
};
};
}

View File

@@ -8,18 +8,67 @@
# If you want to use JACK applications, uncomment this
#jack.enable = true;
wireplumber.extraConfig.bluetoothEnhancements = {
"monitor.bluez.properties" = {
"bluez5.enable-sbc-xq" = true;
"bluez5.enable-msbc" = true;
"bluez5.enable-hw-volume" = true;
"bluez5.roles" = [ "hsp_hs" "hsp_ag" "hfp_hf" "hfp_ag" ];
wireplumber = {
enable = true;
extraConfig = {
"80-bluetooth-enhancements" = {
"monitor.bluez.properties" = {
"bluez5.enable-sbc-xq" = true;
"bluez5.enable-msbc" = true;
"bluez5.enable-hw-volume" = true;
"bluez5.roles" = [ "hsp_hs" "hsp_ag" "hfp_hf" "hfp_ag" ];
};
};
# Disable suspend for all ALSA nodes
"99-disable-suspend" = {
# ALSA Rules: Separate rule for input and output
"monitor.alsa.rules" = [
# Rule for ALSA outputs
{
matches = [
{
# Matches all sinks (outputs)
"node.name" = "~alsa_output.*";
}
{
# Matches all sources (inputs)
"node.name" = "~alsa_input.*";
}
];
actions = {
"update-props" = {
"session.suspend-timeout-seconds" = 0;
};
};
}
];
# Bluez Rules: Separate rule for input and output
"monitor.bluez.rules" = [
# Rule for Bluez outputs
{
matches = [
{
"node.name" = "~bluez_output.*";
}
{
"node.name" = "~bluez_input.*";
}
];
actions = {
"update-props" = {
"session.suspend-timeout-seconds" = 0;
};
};
}
];
};
};
};
};
};
environment.systemPackages = with pkgs;[
environment.systemPackages = with pkgs; [
# audio control software
pamixer
];

View File

@@ -15,8 +15,5 @@
device = "nodev";
};
};
# Allow to modify store. It's dangerous!!
readOnlyNixStore = lib.mkDefault true;
};
}

View File

@@ -1,40 +1,44 @@
{ lib, ... }:
{ lib, pkgs, ... }:
{
imports = [
./boot.nix
./system.nix
./nixfhs.nix
../user.nix
];
environment = {
systemPackages = with pkgs;
[
smartmontools
];
};
programs = {
git.enable = true;
dconf.enable = true;
nix-ld.enable = true;
};
# Configure firewall
networking.firewall = lib.mkDefault {
networking.firewall = {
enable = true;
allowedTCPPorts = [ 22 80 443 ]; # 根据需要调整
allowedUDPPorts = [ 53 ]; # 根据需要调整
# 如果需要,可以添加特定服务的规则
allowedTCPPortRanges = [
{ from = 1714; to = 1764; } # KDE Connect
];
allowedUDPPorts = [ 9 53 ]; # 9: wol, 53: dns
};
# Select internationalisation properties.
i18n.defaultLocale = "en_US.UTF-8";
i18n.extraLocaleSettings = {
LC_ADDRESS = "zh_CN.UTF-8";
LC_IDENTIFICATION = "zh_CN.UTF-8";
LC_MEASUREMENT = "zh_CN.UTF-8";
LC_MONETARY = "zh_CN.UTF-8";
LC_NAME = "zh_CN.UTF-8";
LC_NUMERIC = "zh_CN.UTF-8";
LC_PAPER = "zh_CN.UTF-8";
LC_TELEPHONE = "zh_CN.UTF-8";
LC_TIME = "zh_CN.UTF-8";
i18n = {
defaultLocale = "en_US.UTF-8";
extraLocaleSettings = {
LC_ADDRESS = "zh_CN.UTF-8";
LC_IDENTIFICATION = "zh_CN.UTF-8";
LC_MEASUREMENT = "zh_CN.UTF-8";
LC_MONETARY = "zh_CN.UTF-8";
LC_NAME = "zh_CN.UTF-8";
LC_NUMERIC = "zh_CN.UTF-8";
LC_PAPER = "zh_CN.UTF-8";
LC_TELEPHONE = "zh_CN.UTF-8";
LC_TIME = "zh_CN.UTF-8";
};
};
time.timeZone = "Asia/Shanghai";

View File

@@ -0,0 +1,143 @@
{ config, lib, pkgs, ... }:
let
conf = config.services.nix-fhs;
inherit (lib) mkOption mkEnableOption types;
in
{
options.services.nix-fhs = with lib; {
enable = mkEnableOption "nix-fhs module";
gui.enable = mkEnableOption "/GUI//";
# 在这里定义其他选项
extraPackages = mkOption {
type = types.listOf types.package;
default = [ ];
example = [ pkgs.gcc pkgs.gdb ];
description = "nix-ld";
};
};
config = lib.mkIf conf.enable {
# NixOS 系统级配置
programs.nix-ld = {
enable = true;
# 这里可以添加其他nix-ld相关的配置
libraries = with pkgs;[
bzip2 # 高质量的数据压缩库
cups # 通用Unix打印系统提供打印功能
curlWithGnuTls # 使用GnuTLS的URL传输库用于网络请求
dbus # 进程间通信系统,用于应用程序之间的通信
dbus-glib # D-Bus的GLib绑定
e2fsprogs # ext2/3/4文件系统工具
expat # XML解析库
fontconfig # 字体配置和自定义库
freetype # 字体渲染引擎
fribidi # Unicode双向文本算法实现
fuse # 用户空间文件系统接口
fuse3 # FUSE的第3版用户空间文件系统接口
gmp # GNU多精度算术库
icu # 国际化组件提供Unicode和全球化支持
keyutils.lib # Linux密钥管理工具库
libcap # POSIX能力库
libgcrypt # GNU加密库
libgpg-error # GnuPG错误报告库
libidn # 国际化域名库
libpng12 # PNG图像编解码库1.2版本
libsamplerate # 音频采样率转换库
libuuid # UUID生成和解析库
libxcrypt-legacy # 旧版密码哈希库
libxml2 # XML解析和生成库
nspr # Netscape可移植运行时
nss # 网络安全服务
openssl # 安全套接字层库
p11-kit # PKCS#11模块加载库
pixman # 像素操作库
python3 # Python编程语言解释器
stdenv.cc.cc # 标准C编译器
tbb # 英特尔线程构建块库
udev # 设备管理器
] ++
(lib.optionals conf.gui.enable [
atk # 辅助技术工具包,提供辅助功能支持
cairo # 2D图形渲染库支持多种输出设备
desktop-file-utils # 用于处理桌面条目文件的工具
gdk-pixbuf # 图像加载库GNOME的一部分
glib # 通用工具库,提供数据结构处理、移植等功能
gtk2 # 图形用户界面工具包第2版
gtk3 # 图形用户界面工具包第3版
harfbuzz # 文本整形引擎
pango # 文本布局和渲染库
alsa-lib # 高级Linux声音架构库提供音频功能
flac # 无损音频编解码器
libcanberra # 声音主题规范的实现
libjack2 # JACK音频连接套件第2版
libmikmod # 模块音乐库
libogg # Ogg多媒体容器格式库
libvorbis # Vorbis音频编解码库
speex # 语音压缩格式
freeglut # OpenGL实用工具包用于创建OpenGL上下文
glew110 # OpenGL扩展加载库1.10版本
gst_all_1.gst-plugins-base # GStreamer基础插件集
gst_all_1.gst-plugins-ugly # GStreamer非自由插件集
gst_all_1.gstreamer # 多媒体框架
libGL # OpenGL库
libGLU # OpenGL实用工具库
librsvg # SVG渲染库
libtheora # Theora视频编解码库
libtiff # TIFF图像编解码库
libvdpau # 视频解码和呈现API
libvpx # VP8/VP9视频编解码库
mesa # 开源OpenGL实现
vulkan-loader # Vulkan图形API加载器
wayland # 显示服务器协议
at-spi2-atk # 辅助技术服务提供者接口连接ATK和AT-SPI
at-spi2-core # 辅助技术服务提供者接口核心组件
libappindicator-gtk2 # 应用程序指示器库,用于系统托盘图标
libcaca # 彩色ASCII艺术库
libclang.lib # Clang编译器库
libdbusmenu # D-Bus菜单库
libjpeg # JPEG图像编解码库
libudev0-shim # 旧版udev库兼容层
libusb1 # USB设备访问库
libxkbcommon
mesa # 开源OpenGL实现
]) ++
(lib.optionals (lib.versionAtLeast config.system.stateVersion "25.05") [
pkgs.libgbm # 通用缓冲区管理库25.05之前包含在mesa中
]) ++ (
if config.services.xserver.enable then
[
xorg.libICE # X11 Inter-Client Exchange库
xorg.libSM # X11会话管理库
xorg.libX11 # X11客户端库
xorg.libXScrnSaver # X11屏幕保护扩展库
xorg.libXcomposite # X11合成扩展库
xorg.libXcursor # X11光标管理库
xorg.libXdamage # X11损坏扩展库
xorg.libXext # X11通用扩展库
xorg.libXfixes # X11修复扩展库
xorg.libXft # X11 FreeType接口库
xorg.libXi # X11输入扩展库
xorg.libXinerama # X11多显示器扩展库
xorg.libXmu # X11杂项实用工具库
xorg.libXrandr # X11调整大小和旋转扩展库
xorg.libXrender # X11渲染扩展库
xorg.libXt # X11工具包内省库
xorg.libXtst # X11测试扩展库
xorg.libXxf86vm # X11 XFree86视频模式扩展库
xorg.libpciaccess # X11 PCI访问库
xorg.libxcb # X11 C绑定库
xorg.xcbutil # XCB实用工具库
xorg.xcbutilimage # XCB图像实用工具库
xorg.xcbutilkeysyms # XCB键符号实用工具库
xorg.xcbutilrenderutil # XCB渲染实用工具库
xorg.xcbutilwm # XCB窗口管理实用工具库
xorg.xkeyboardconfig # X11键盘配置数据库
]
else
[ ]
) ++ conf.extraPackages;
};
};
}

View File

@@ -10,6 +10,7 @@
printing.enable = true;
acpid.enable = true;
upower.enable = true;
nix-fhs.enable = true;
openssh = {
enable = true;
@@ -23,6 +24,7 @@
};
};
# Enable the Avahi daemon for mDNS/DNS-SD support
avahi = {
enable = true;
nssmdns4 = true; # 非常重要,允许系统解析 .local 地址

View File

@@ -18,9 +18,9 @@
# Noto 系列字体是 Google 主导的名字的含义是「没有豆腐」qno tofu因为缺字时显示的方框或者方框被叫作 tofu
# Noto 系列字族名只支持英文,命名规则是 Noto + Sans 或 Serif + 文字名称。
# 其中汉字部分叫 Noto Sans/Serif CJK SC/TC/HK/JP/KR最后一个词是地区变种。
noto-fonts # 大部分文字的常见样式,不包含汉字
noto-fonts-cjk-sans # 汉字部分
noto-fonts-color-emoji # 彩色的表情符号字体
# noto-fonts # 大部分文字的常见样式,不包含汉字
# noto-fonts-cjk-sans # 汉字部分
# noto-fonts-color-emoji # 彩色的表情符号字体
# 思源系列字体是 Adobe 主导的。其中汉字部分被称为「思源黑体」和「思源宋体」,是由 Adobe + Google 共同开发的
source-sans # 无衬线字体,不含汉字。字族名叫 Source Sans 3 和 Source Sans Pro以及带字重的变体加上 Source Sans 3 VF
@@ -28,16 +28,20 @@
source-han-sans # 思源黑体
source-han-serif # 思源宋体
# wqy_zenhei # 文泉驿正黑
] ++ (
# nerdfonts
nerd-fonts.jetbrains-mono
# (nerdfonts.override {
# fonts = [
# # "FiraCode"
# "JetBrainsMono"
# # "Iosevka"
# ];
# })
];
if lib.versionAtLeast config.system.stateVersion "25.05" then
[ nerd-fonts.jetbrains-mono ]
else [
(nerdfonts.override {
fonts = [
# "FiraCode"
"JetBrainsMono"
# "Iosevka"
];
})
]
);
};
}

View File

@@ -1,5 +1,4 @@
{ config, pkgs, ... }:
{
{ config, pkgs, lib, username, ... }: {
services.xserver = {
enable = true;
displayManager.gdm.enable = true;
@@ -8,22 +7,21 @@
environment = {
systemPackages = (with pkgs;[
gnome.gnome-tweaks
gnome-tweaks
gnome-shell-extensions
]) ++ (with pkgs.gnomeExtensions;[
dash-to-dock
captivate # cap button indicator
appindicator # tray icon
]);
gnome.excludePackages = (with pkgs; [
atomix # puzzle game
cheese # webcam tool
gnome-photos
gnome-tour
gnome-text-editor
]) ++ (with pkgs.gnome; [
atomix # puzzle game
cheese # webcam tool
epiphany # web browser
# geary # email reader
geary # email reader
evince # document viewer
gedit # text editor
gnome-contacts
@@ -39,9 +37,126 @@
tali # poker game
yelp # help viewer
]);
variables = {
"GTK_IM_MODULE" = "fcitx";
"QT_IM_MODULE" = "fcitx";
"XMODIFIERS" = "@im=fcitx";
"SDL_IM_MODULE" = "fcitx";
"GLFW_IM_MODULE" = "ibus";
};
};
programs = {
dconf = {
enable = true;
profiles = {
# TODO: Investigate customizing gdm greeter.
user.databases = [{
settings = with lib.gvariant; {
"org/gnome/desktop/interface" = {
clock-show-weekday = true;
cursor-size = mkUint32 16;
cursor-theme = "capitaine-cursors";
enable-hot-corners = false;
icon-theme = "Papirus-Dark";
locate-pointer = false;
monospace-font-name = "JetBrainsMono Nerd Font Mono 10";
overlay-scrolling = true;
};
"org/gnome/mutter" = {
edge-tiling = true;
attach-modal-dialogs = true;
experimental-features = [ "scale-monitor-framebuffer" ];
};
"org/gnome/shell" = {
last-selected-power-profile = "power-saver";
};
"org/gnome/desktop/session" = {
idle-delay = mkUint32 900;
};
"org/gnome/settings-daemon/plugins/power" = {
power-button-action = "interactive";
sleep-inactive-ac-timeout = mkUint32 7200;
sleep-inactive-ac-type = "nothing";
};
"org/gtk/gtk4/settings/file-chooser" = {
sort-directories-first = true;
# show-hidden = true;
view-type = "list";
};
"org/gnome/desktop/wm/keybindings" = {
minimize = mkEmptyArray type.string;
move-to-workspace-1 = [ "<Shift><Super>1" ];
move-to-workspace-2 = [ "<Shift><Super>2" ];
move-to-workspace-3 = [ "<Shift><Super>3" ];
move-to-workspace-4 = [ "<Shift><Super>4" ];
switch-to-workspace-1 = [ "<Super>1" ];
switch-to-workspace-2 = [ "<Super>2" ];
switch-to-workspace-3 = [ "<Super>3" ];
switch-to-workspace-4 = [ "<Super>4" ];
switch-to-workspace-left = [ "<Control><Super>h" ];
switch-to-workspace-right = [ "<Control><Super>l" ];
switch-windows = [ "<Alt>Tab" ];
switch-windows-backward = [ "<Shift><Alt>Tab" ];
switch-applications = [ "<Super>Tab" ];
switch-applications-backward = [ "<Shift><Super>Tab" ];
};
"org/gnome/shell/keybindings" = {
# Following binds are replaced by the ones above.
switch-to-application-1 = mkEmptyArray type.string;
switch-to-application-2 = mkEmptyArray type.string;
switch-to-application-3 = mkEmptyArray type.string;
switch-to-application-4 = mkEmptyArray type.string;
};
"org/gnome/shell" = {
enabled-extensions = [
"appindicatorsupport@rgcjonas.gmail.com"
"dash-to-dock@micxgx.gmail.com"
"status-icons@gnome-shell-extensions.gcampax.github.com"
"system-monitor@gnome-shell-extensions.gcampax.github.com"
];
};
"org/gnome/shell/extensions/dash-to-panel" = {
apply-custom-theme = false;
background-opacity = 0.8;
click-action = "previews";
custom-background-color = false;
custom-theme-shrink = true;
dash-max-icon-size = mkUint32 40;
dock-position = "BOTTOM";
extend-height = false;
height-fraction = 0.9;
hot-keys = false;
icon-size-fixed = true;
isolate-monitors = true;
max-alpha = 0.8;
multi-monitor = true;
preview-size-scale = 0.0;
running-indicator-style = "DOTS";
scroll-action = "cycle-windows";
show-mounts = false;
show-mounts-only-mounted = true;
transparency-mode = "DYNAMIC";
};
"org/gnome/shell/extensions/system-monitor" = {
show-download = true;
show-swap = false;
show-upload = false;
};
};
}];
};
};
};
}

View File

@@ -17,8 +17,8 @@ in
extraGroups = [
"users"
"wheel"
"networkmanager"
"audio"
"networkmanager"
];
openssh.authorizedKeys.keys = [
"ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABgQCc62MxAVqX8LDFAiDiXlc8d3JU1S3xYVO8WpfgoVYPyrd2fkK2Dr1tSedJyGWc3ADOxzUbsTic8b1BOdmbx4ZPwI+a3nJrVVkmIRSAs5haEZqG8NXDv1kl4xL+J9tVA2jwScl6MRzqyVMgtIAvnsVW9+DrL2Y2b20NvuWz3XndZ8vEUFZLLCQJQRpGrY2ZnTvNXZo12GrD5daiMii52ZuhfNBx17oFnf70sj+phZbp5m2mKL9jfKaDSG+E7Pa/IbB/iivD/QSm0SueYXbsdtMBhtsxvH/i0pJogUlVpa42CRIDUVoHOvfk0Hk83xyIIl2b78xfGEyCQBBU6sSk726xXpqzfxJJ7FiYqhLMKKDFmD28EOs4BUveyZudWNcP0a1+uBBcrefNAwU6EOSg65BOxxvZFbNG1I7YDTiKvYFy965+WkN5QKbBVSy08ziS1MQt224ZooAdxCKESGRr9IqKvq9ONnb0MtmC4ht/n8U9VaeLVq3XDXZZHEUq0cw748k= alex@gaea"
@@ -59,7 +59,7 @@ in
options = [ "NOPASSWD" ];
}
{
command = "/run/wrappers/bin/umount";
command = "/run/wrappers/bin/unmount";
options = [ "NOPASSWD" ];
}
];
@@ -67,4 +67,4 @@ in
];
};
}

View File

@@ -4,6 +4,17 @@
virtualisation.docker = {
enable = true;
storageDriver = "btrfs";
daemon.settings = {
userland-proxy = false;
experimental = true;
ipv6 = true;
ip6tables = true;
fixed-cidr-v6 = "fd00::/80";
metrics-addr = "0.0.0.0:9323";
log-driver = "json-file";
log-opts.max-size = "10m";
log-opts.max-file = "3";
};
};
# Enable Podman

View File

@@ -1,67 +0,0 @@
args@{ inputs, outputs, lib, pkgs, home-manager, self, username, useremail, hostname, sysversion, ... }: {
# You can import other NixOS modules here
imports = [
# If you want to use modules your own flake exports (from modules/nixos):
# outputs.nixosModules.example
# Or modules from other flakes (such as nixos-hardware):
# inputs.hardware.nixosModules.common-cpu-amd
# inputs.hardware.nixosModules.common-ssd
# You can also split up your configuration and import pieces of it here:
# ./users.nix
# Import your generated (nixos-generate-config) hardware configuration
./mount.nix
./network.nix
./hardware-configuration.nix
"${self}/modules/nixos/core"
"${self}/modules/nixos/fonts"
"${self}/modules/nixos/user.nix"
"${self}/modules/nixos/audio.nix"
"${self}/modules/nixos/samba.nix"
"${self}/modules/nixos/virtualize/appimage.nix"
"${self}/modules/nixos/virtualize/docker.nix"
home-manager.nixosModules.home-manager
{
# home-manager.useGlobalPkgs = true;
# home-manager.useUserPackages = true;
home-manager.extraSpecialArgs = {
inherit inputs outputs hostname username useremail sysversion;
};
home-manager.users."${username}" = { ... }: {
imports = [
./hm
"${self}/home/desktop.nix"
"${self}/modules/home/develop.nix"
];
};
}
];
hardware.graphics = {
enable = true;
extraPackages = with pkgs; [
vaapiIntel
intel-media-driver
];
};
services = {
gnome.gnome-keyring.enable = true;
};
security.pam.services.swaylock = { };
programs.zsh = {
enable = true;
};
users.users."${username}".shell = pkgs.zsh;
# https://nixos.wiki/wiki/FAQ/When_do_I_update_stateVersion
system.stateVersion = sysversion;
}

View File

@@ -1,14 +1,30 @@
args@{ libs, inputs, ... }:
args@{ libs, inputs, nixos, ... }:
let
# 这里可以选择使用稳定版或不稳定版的nixpkgs
# nixpkgs = inputs.nixpkgs;
nixpkgs = inputs.nixpkgs-unstable; # 如果需要使用unstable版本取消这行注释并注释上一行
home-manager = inputs.home-manager-unstable;
sysArgs = args // { inherit home-manager; };
# 使用pkgs.unstable中的nixpkgs和home-manager
inherit (nixos.unstable) nixpkgs home-manager version;
specialArgs = args // { inherit home-manager version; };
configuration = conf-args@{ self, pkgs, home-manager, username, version, ... }: {
imports = [
./nixos
home-manager.nixosModules.home-manager
{
# home-manager.useGlobalPkgs = true;
# home-manager.useUserPackages = true;
home-manager = {
extraSpecialArgs = {
inherit (conf-args) self inputs outputs libs sourcepath hostname username useremail version;
};
users."${username}" = ./home;
};
}
];
};
in
# 使用libs.mkNixosSystem创建nixosSystem
libs.mkNixosSystem {
inherit nixpkgs;
args = sysArgs;
path = ./.;
nixpkgs.lib.nixosSystem {
inherit specialArgs;
modules = [
configuration
];
}

View File

@@ -1,6 +0,0 @@
{ ... }: {
imports = [
./ssh
./hyprland.nix
];
}

View File

@@ -1,66 +0,0 @@
Host *
ForwardAgent no
AddKeysToAgent no
Compression no
ServerAliveInterval 0
ServerAliveCountMax 3
HashKnownHosts no
UserKnownHostsFile ~/.ssh/known_hosts
ControlMaster no
ControlPath ~/.ssh/master-%r@%n:%p
ControlPersist no
Host gaea
HostName 10.7.43.20
Host zion
HostName 10.7.43.1
User root
Host themis
HostName 10.7.43.30
Host armor
HostName armor.synebula.com
Host server.company
HostName file.xzdcbj.com.cn
User xzdc
Port 57982
Host server.info
HostName info.xzdcbj.com.cn
User info
Host server.file
HostName file.xzdcbj.com.cn
User file
Host server.armor
HostName armor.synebula.com
Host ems.hc
Port 57991
User root
Host ems.cx
Port 57996
Host ems.ph
Port 57996
Host ems.yt
Port 57996
User xzdc
Host ems.*
HostName file.xzdcbj.com.cn
User ems
Host *
Port 22
User alex
IdentityFile ~/.ssh/id_rsa

View File

@@ -1,10 +0,0 @@
{ config, ... }:
{
programs.ssh = {
enable = true;
};
home.file.".ssh/config" = {
source = ./config;
};
}

View File

@@ -0,0 +1,12 @@
{ self, pkgs, ... }: {
imports = [
./ssh
"${self}/home/desktop.nix"
"${self}/modules/home/develop.nix"
];
home.packages = with pkgs; [
nextcloud-client
kodi
];
}

View File

@@ -5,7 +5,8 @@
sessionVariables = {
# for hyprland with nvidia gpu, ref https://wiki.hyprland.org/Nvidia/
# 启用注释部分会导致NVIDIA下无法启动hyprland
WLR_DRM_DEVICES = "/dev/dri/card1:/dev/dri/card0";
WLR_DRM_DEVICES = "/dev/dri/card1";
AQ_DRM_DEVICES = "/dev/dri/card1";
};
};
}

View File

@@ -0,0 +1,64 @@
Host *
ForwardAgent no
AddKeysToAgent no
Compression no
ServerAliveInterval 0
ServerAliveCountMax 3
HashKnownHosts no
UserKnownHostsFile ~/.ssh/known_hosts
ControlMaster no
ControlPath ~/.ssh/master-%r@%n:%p
ControlPersist no
Host gaea
HostName 10.7.43.20
Host zion
HostName 10.7.43.1
User root
Host themis
HostName 10.7.43.30
Host armor
HostName armor.synebula.com
Host server.company
HostName file.xzdcbj.com.cn
User xzdc
Port 57982
Host server.info
HostName info.xzdcbj.com.cn
User info
Host server.file
HostName file.xzdcbj.com.cn
User file
Host server.armor
HostName armor.synebula.com
Host ems.hc
Port 57991
User root
Host ems.cx
Port 57996
Host ems.ph
Port 57996
Host ems.yt
Port 57996
User xzdc
Host ems.*
HostName file.xzdcbj.com.cn
User ems
Host *
Port 22
User alex
IdentityFile ~/.ssh/id_rsa

View File

@@ -0,0 +1,9 @@
{ config, flakesPath, ... }: {
programs.ssh = {
enable = true;
};
home.file.".ssh/config" = {
source = config.home-libs.mkOutOfStoreSymlink "profiles/apollo/home/ssh/config";
};
}

View File

@@ -1,42 +0,0 @@
{ config, pkgs, hostname, ... }: {
networking = {
hostId = "6fa8b74d";
hostName = "${hostname}";
wireless.enable = false; # Enables wireless support via wpa_supplicant.
# Configure network proxy if necessary
# proxy.default = "http://user:password@proxy:port/";
# proxy.noProxy = "127.0.0.1,localhost,internal.domain";
networkmanager = {
enable = true;
};
enableIPv6 = true;
# Set up bridge network
interfaces.eno1 = {
useDHCP = false;
};
bridges = {
br0 = { interfaces = [ "eno1" ]; };
};
interfaces.br0 = {
useDHCP = false;
ipv4.addresses = [
{
address = "10.7.43.10";
prefixLength = 24;
}
];
};
defaultGateway = {
address = "10.7.43.30";
interface = "br0";
};
nameservers = [ "10.7.43.1" ];
};
}

View File

@@ -0,0 +1,43 @@
{ self, pkgs, username, version, lib, config, ... }: {
imports = [
./mount.nix
./network.nix
./hardware-configuration.nix
"${self}/modules/nixos/core"
"${self}/modules/nixos/fonts"
"${self}/modules/nixos/audio.nix"
"${self}/modules/nixos/samba.nix"
"${self}/modules/nixos/virtualize/appimage.nix"
"${self}/modules/nixos/virtualize/docker.nix"
"${self}/modules/nixos/gnome.nix"
];
hardware.graphics = {
enable = true;
extraPackages = with pkgs; [
vaapiIntel
intel-media-driver
];
};
services = {
gnome.gnome-keyring.enable = true;
nix-fhs.gui.enable = true;
flatpak.enable = true;
apcupsd = {
enable = true;
};
};
security.pam.services.swaylock = { };
programs.zsh = {
enable = true;
};
users.users."${username}".shell = pkgs.zsh;
# https://nixos.wiki/wiki/FAQ/When_do_I_update_stateVersion
system.stateVersion = version;
}

View File

@@ -0,0 +1,42 @@
{ config, pkgs, hostname, ... }: {
networking = {
hostId = "6fa8b74d";
hostName = "${hostname}";
networkmanager = {
enable = true;
ensureProfiles.profiles = {
"eno1" = {
connection = {
id = "eno1";
type = "ethernet"; # 有线连接
autoconnect = true; # 自动连接
};
ipv4 = {
method = "manual"; # 设置为手动配置 IPv4
addresses = "10.7.43.10/24,10.7.43.30";
# 如果需要,可以添加 DNS 服务器
# dns = [ "10.7.43.1" "8.8.8.8" ];
};
ipv6 = {
method = "auto"; # 设置为自动配置 IPv6 (动态)
};
ethernet = {
wake-on-lan=64;
};
};
};
};
interfaces = {
eno1 = {
wakeOnLan = {
enable = true;
policy = [
"magic"
];
};
};
};
};
}

View File

@@ -1,52 +0,0 @@
args@{ inputs, outputs, lib, pkgs, home-manager, self, username, useremail, hostname, sysversion, ... }: {
# You can import other NixOS modules here
imports = [
# If you want to use modules your own flake exports (from modules/nixos):
# outputs.nixosModules.example
# Or modules from other flakes (such as nixos-hardware):
# inputs.hardware.nixosModules.common-cpu-amd
# inputs.hardware.nixosModules.common-ssd
# You can also split up your configuration and import pieces of it here:
# ./users
# Import your generated (nixos-generate-config) hardware configuration
./mount.nix
./network.nix
./hardware-configuration.nix
"${self}/modules/nixos/core"
"${self}/modules/nixos/fonts"
"${self}/modules/nixos/user.nix"
"${self}/modules/nixos/audio.nix"
"${self}/modules/nixos/nvidia.nix"
"${self}/modules/nixos/samba.nix"
"${self}/modules/nixos/zfs.nix"
"${self}/modules/nixos/sysatomic.nix"
"${self}/modules/nixos/virtualize/libvirtd"
"${self}/modules/nixos/virtualize/docker.nix"
home-manager.nixosModules.home-manager
{
# home-manager.useGlobalPkgs = true;
# home-manager.useUserPackages = true;
home-manager = {
extraSpecialArgs = {
inherit inputs outputs hostname username useremail sysversion;
};
users."${username}" = { ... }: {
imports = [
./hm
"${self}/home/desktop.nix"
"${self}/modules/home/develop.nix"
];
};
};
}
];
# https://nixos.wiki/wiki/FAQ/When_do_I_update_stateVersion
system.stateVersion = sysversion;
}

View File

@@ -1,14 +1,29 @@
args@{ libs, inputs, ... }:
args@{ libs, inputs, nixos, ... }:
let
# 这里可以选择使用稳定版或不稳定版的nixpkgs
# nixpkgs = inputs.nixpkgs;
nixpkgs = inputs.nixpkgs-unstable; # 如果需要使用unstable版本取消这行注释并注释上一行
home-manager = inputs.home-manager-unstable;
sysArgs = args // { inherit home-manager; };
inherit (nixos.unstable) nixpkgs home-manager version;
specialArgs = args // { inherit home-manager version; };
configuration = conf-args@{ self, home-manager, username, ... }: {
imports = [
./nixos
home-manager.nixosModules.home-manager
{
# home-manager.useGlobalPkgs = true;
# home-manager.useUserPackages = true;
home-manager = {
extraSpecialArgs = {
inherit (conf-args) self inputs outputs libs sourcepath hostname username useremail version;
};
users."${username}" = ./home;
};
}
];
};
in
# 使用libs.mkNixosSystem创建nixosSystem
libs.mkNixosSystem {
inherit nixpkgs;
args = sysArgs;
path = ./.;
nixpkgs.lib.nixosSystem {
inherit specialArgs;
modules = [
configuration
];
}

View File

@@ -1,6 +0,0 @@
{ ... }: {
imports = [
./ssh.nix
./hyprland.nix
];
}

View File

@@ -1,61 +0,0 @@
{ config, ... }:
{
programs.ssh = {
enable = true;
# 全局 SSH 配置
extraConfig = ''
Host apollo
HostName 10.7.43.10
Host zion
HostName 10.7.43.1
User root
Host themis
HostName 10.7.43.30
Host armor
HostName armor.synebula.com
Host server.company
HostName file.xzdcbj.com.cn
User xzdc
Port 57982
Host server.info
HostName info.xzdcbj.com.cn
User info
Host server.file
HostName file.xzdcbj.com.cn
User file
Host server.armor
HostName armor.synebula.com
Host ems.hc
Port 57991
User root
Host ems.cx
Port 57996
Host ems.ph
Port 57996
Host ems.yt
Port 57996
User xzdc
Host ems.*
HostName file.xzdcbj.com.cn
User ems
Host *
Port 22
User alex
IdentityFile ~/.ssh/id_rsa
'';
};
}

View File

@@ -0,0 +1,12 @@
{ self, pkgs, ... }: {
imports = [
./ssh
"${self}/home/desktop.nix"
"${self}/modules/home/develop.nix"
];
home.packages = with pkgs; [
nextcloud-client
kodi
];
}

View File

@@ -5,11 +5,8 @@
sessionVariables = {
# for hyprland with nvidia gpu, ref https://wiki.hyprland.org/Nvidia/
# 启用注释部分会导致NVIDIA下无法启动hyprland
LIBVA_DRIVER_NAME = "nvidia";
__GLX_VENDOR_LIBRARY_NAME = "nvidia";
# WLR_RENDERER = "vulkan";
# GBM_BACKEND = "nvidia-drm";
WLR_DRM_DEVICES = "/dev/dri/card1";
AQ_DRM_DEVICES = "/dev/dri/card1";
};
};
}

View File

@@ -0,0 +1,64 @@
Host *
ForwardAgent no
AddKeysToAgent no
Compression no
ServerAliveInterval 0
ServerAliveCountMax 3
HashKnownHosts no
UserKnownHostsFile ~/.ssh/known_hosts
ControlMaster no
ControlPath ~/.ssh/master-%r@%n:%p
ControlPersist no
Host apollo
HostName 10.7.43.10
Host zion
HostName 10.7.43.1
User root
Host themis
HostName 10.7.43.30
Host armor
HostName armor.synebula.com
Host server.company
HostName file.xzdcbj.com.cn
User xzdc
Port 57982
Host server.info
HostName info.xzdcbj.com.cn
User info
Host server.file
HostName file.xzdcbj.com.cn
User file
Host server.armor
HostName armor.synebula.com
Host ems.hc
Port 57991
User root
Host ems.cx
Port 57996
Host ems.ph
Port 57996
Host ems.yt
Port 57996
User xzdc
Host ems.*
HostName file.xzdcbj.com.cn
User ems
Host *
Port 22
User alex
IdentityFile ~/.ssh/id_rsa

View File

@@ -0,0 +1,9 @@
{ config, flakesPath, ... }: {
programs.ssh = {
enable = true;
};
home.file.".ssh/config" = {
source = config.home-libs.mkOutOfStoreSymlink "profiles/gaea/home/ssh/config";
};
}

View File

@@ -0,0 +1,21 @@
{ self, pkgs, version, ... }: {
imports = [
./mount.nix
./network.nix
./hardware-configuration.nix
"${self}/modules/nixos/core"
"${self}/modules/nixos/fonts"
"${self}/modules/nixos/audio.nix"
"${self}/modules/nixos/nvidia.nix"
"${self}/modules/nixos/samba.nix"
"${self}/modules/nixos/zfs.nix"
"${self}/modules/nixos/sysatomic.nix"
"${self}/modules/nixos/virtualize/libvirtd"
"${self}/modules/nixos/virtualize/docker.nix"
];
# https://nixos.wiki/wiki/FAQ/When_do_I_update_stateVersion
system.stateVersion = version;
}

View File

@@ -1,42 +0,0 @@
args@{ inputs, outputs, lib, pkgs, home-manager, self, username, useremail, hostname, sysversion, ... }: {
# You can import other NixOS modules here
imports = [
# If you want to use modules your own flake exports (from modules/nixos):
# outputs.nixosModules.example
# Or modules from other flakes (such as nixos-hardware):
# inputs.hardware.nixosModules.common-cpu-amd
# inputs.hardware.nixosModules.common-ssd
# You can also split up your configuration and import pieces of it here:
# ./users.nix
# Import your generated (nixos-generate-config) hardware configuration
./network.nix
./hardware-configuration.nix
"${self}/modules/nixos/core"
"${self}/modules/nixos/user.nix"
"${self}/modules/nixos/sysatomic.nix"
home-manager.nixosModules.home-manager
{
# home-manager.useGlobalPkgs = true;
# home-manager.useUserPackages = true;
home-manager = {
extraSpecialArgs = {
inherit inputs outputs hostname username useremail sysversion;
};
users."${username}" = { ... }: {
imports = [
"${self}/home/desktop.nix"
];
};
};
}
];
# https://nixos.wiki/wiki/FAQ/When_do_I_update_stateVersion
system.stateVersion = sysversion;
}

View File

@@ -1,14 +1,54 @@
args@{ libs, inputs, ... }:
args@{ libs, inputs, nixos, ... }:
let
# 这里可以选择使用稳定版或不稳定版的nixpkgs
# nixpkgs = inputs.nixpkgs;
nixpkgs = inputs.nixpkgs-unstable; # 如果需要使用unstable版本取消这行注释并注释上一行
home-manager = inputs.home-manager-unstable;
sysArgs = args // { inherit home-manager; };
# 使用pkgs.unstable中的nixpkgs和home-manager
inherit (nixos.unstable) nixpkgs home-manager version;
specialArgs = args // { inherit home-manager version; };
configuration = conf-args@{ self, home-manager, username, version, ... }: {
# You can import other NixOS modules here
imports = [
# If you want to use modules your own flake exports (from modules/nixos):
# outputs.nixosModules.example
# Or modules from other flakes (such as nixos-hardware):
# inputs.hardware.nixosModules.common-cpu-amd
# inputs.hardware.nixosModules.common-ssd
# You can also split up your configuration and import pieces of it here:
# ./users.nix
# Import your generated (nixos-generate-config) hardware configuration
./network.nix
./hardware-configuration.nix
"${self}/modules/nixos/core"
"${self}/modules/nixos/sysatomic.nix"
home-manager.nixosModules.home-manager
{
# home-manager.useGlobalPkgs = true;
# home-manager.useUserPackages = true;
home-manager = {
extraSpecialArgs = {
inherit (conf-args) self inputs outputs libs sourcepath hostname username useremail version;
};
users."${username}" = { ... }: {
imports = [
"${self}/home/desktop.nix"
];
};
};
}
];
# https://nixos.wiki/wiki/FAQ/When_do_I_update_stateVersion
system.stateVersion = version;
};
in
# 使用libs.mkNixosSystem创建nixosSystem
libs.mkNixosSystem {
inherit nixpkgs;
args = sysArgs;
path = ./.;
nixpkgs.lib.nixosSystem {
inherit specialArgs;
modules = [
configuration
];
}