diff --git a/flake.nix b/flake.nix
index 12d453c..cca8263 100644
--- a/flake.nix
+++ b/flake.nix
@@ -6,7 +6,6 @@
username = "alex";
useremail = "reizero@live.com";
hostname = "luna";
- sysversion = "24.11";
libs = import ./libs;
in
rec {
@@ -21,7 +20,7 @@
(profile: {
name = profile;
value = import ./profiles/${profile} {
- inherit self libs inputs outputs username useremail sysversion;
+ inherit self libs inputs outputs username useremail;
};
})
(attrNames (readDir ./profiles))
@@ -34,8 +33,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;
+ sysversion = "unstable";
};
modules = [
# > Our main home-manager configuration file <
diff --git a/modules/home/hyprland/conf/hypr/keybindings.conf b/modules/home/hyprland/conf/hypr/keybindings.conf
index 4c2a995..6e68435 100644
--- a/modules/home/hyprland/conf/hypr/keybindings.conf
+++ b/modules/home/hyprland/conf/hypr/keybindings.conf
@@ -20,7 +20,7 @@ $filemanager = dolphin
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 CTRL, 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
diff --git a/modules/home/hyprland/conf/waybar/config.jsonc b/modules/home/hyprland/conf/waybar/config.jsonc
index a413c71..f71d442 100644
--- a/modules/home/hyprland/conf/waybar/config.jsonc
+++ b/modules/home/hyprland/conf/waybar/config.jsonc
@@ -47,7 +47,7 @@
"custom/power": {
"format": "{}",
"exec": "echo ; echo logout",
- "on-click": "~/.config/hypr/scripts/logoutlaunch.sh 2",
+ "on-click": "wlogout",
"interval": 86400, // once every day
"tooltip": true
},
@@ -98,15 +98,34 @@
"clock": {
"format": "{:%Y/%m/%d %H:%M}",
- "format-alt": "{:%I:%M%p 周%u}",
- "tooltip-format": "{calendar}",
- "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": "{}",
+ "days": "{}",
+ "weeks": "W{}",
+ "weekdays": "{}",
+ "today": "{}"
+ }
+ },
+ "actions": {
+ "on-click-right": "mode",
+ "on-scroll-up": "shift_up",
+ "on-scroll-down": "shift_down"
+ },
+ "tooltip-format": "{calendar}",
+ "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",
diff --git a/modules/home/hyprland/conf/waybar/style.css b/modules/home/hyprland/conf/waybar/style.css
index 5852913..6abad11 100644
--- a/modules/home/hyprland/conf/waybar/style.css
+++ b/modules/home/hyprland/conf/waybar/style.css
@@ -120,7 +120,7 @@ tooltip {
color: @main-color;
background: @main-bg;
opacity: 1;
- margin: 4px 0px 4px 0px;
+ margin: 2px 0px 2px 0px;
padding-left: 4px;
padding-right: 4px;
}
diff --git a/modules/home/hyprland/conf/wlogout/icons/hibernate_dark.png b/modules/home/hyprland/conf/wlogout/icons/hibernate_dark.png
deleted file mode 100644
index 6f98a08..0000000
Binary files a/modules/home/hyprland/conf/wlogout/icons/hibernate_dark.png and /dev/null differ
diff --git a/modules/home/hyprland/conf/wlogout/icons/hibernate_light.png b/modules/home/hyprland/conf/wlogout/icons/hibernate_light.png
deleted file mode 100644
index cea1ebc..0000000
Binary files a/modules/home/hyprland/conf/wlogout/icons/hibernate_light.png and /dev/null differ
diff --git a/modules/home/hyprland/conf/wlogout/icons/lock_dark.png b/modules/home/hyprland/conf/wlogout/icons/lock_dark.png
deleted file mode 100644
index b4c8c52..0000000
Binary files a/modules/home/hyprland/conf/wlogout/icons/lock_dark.png and /dev/null differ
diff --git a/modules/home/hyprland/conf/wlogout/icons/lock_light.png b/modules/home/hyprland/conf/wlogout/icons/lock_light.png
deleted file mode 100644
index 2925c26..0000000
Binary files a/modules/home/hyprland/conf/wlogout/icons/lock_light.png and /dev/null differ
diff --git a/modules/home/hyprland/conf/wlogout/icons/logout_dark.png b/modules/home/hyprland/conf/wlogout/icons/logout_dark.png
deleted file mode 100644
index b918ce7..0000000
Binary files a/modules/home/hyprland/conf/wlogout/icons/logout_dark.png and /dev/null differ
diff --git a/modules/home/hyprland/conf/wlogout/icons/logout_light.png b/modules/home/hyprland/conf/wlogout/icons/logout_light.png
deleted file mode 100644
index 33ecdc1..0000000
Binary files a/modules/home/hyprland/conf/wlogout/icons/logout_light.png and /dev/null differ
diff --git a/modules/home/hyprland/conf/wlogout/icons/reboot_dark.png b/modules/home/hyprland/conf/wlogout/icons/reboot_dark.png
deleted file mode 100644
index 0bbf256..0000000
Binary files a/modules/home/hyprland/conf/wlogout/icons/reboot_dark.png and /dev/null differ
diff --git a/modules/home/hyprland/conf/wlogout/icons/reboot_light.png b/modules/home/hyprland/conf/wlogout/icons/reboot_light.png
deleted file mode 100644
index e4a6987..0000000
Binary files a/modules/home/hyprland/conf/wlogout/icons/reboot_light.png and /dev/null differ
diff --git a/modules/home/hyprland/conf/wlogout/icons/shutdown_dark.png b/modules/home/hyprland/conf/wlogout/icons/shutdown_dark.png
deleted file mode 100644
index e57ea3a..0000000
Binary files a/modules/home/hyprland/conf/wlogout/icons/shutdown_dark.png and /dev/null differ
diff --git a/modules/home/hyprland/conf/wlogout/icons/shutdown_light.png b/modules/home/hyprland/conf/wlogout/icons/shutdown_light.png
deleted file mode 100644
index a8892ae..0000000
Binary files a/modules/home/hyprland/conf/wlogout/icons/shutdown_light.png and /dev/null differ
diff --git a/modules/home/hyprland/conf/wlogout/icons/suspend_dark.png b/modules/home/hyprland/conf/wlogout/icons/suspend_dark.png
deleted file mode 100644
index e307b6e..0000000
Binary files a/modules/home/hyprland/conf/wlogout/icons/suspend_dark.png and /dev/null differ
diff --git a/modules/home/hyprland/conf/wlogout/icons/suspend_light.png b/modules/home/hyprland/conf/wlogout/icons/suspend_light.png
deleted file mode 100644
index ee09b8c..0000000
Binary files a/modules/home/hyprland/conf/wlogout/icons/suspend_light.png and /dev/null differ
diff --git a/modules/home/hyprland/conf/wlogout/layout_1 b/modules/home/hyprland/conf/wlogout/layout
similarity index 92%
rename from modules/home/hyprland/conf/wlogout/layout_1
rename to modules/home/hyprland/conf/wlogout/layout
index c6e3d7d..6841651 100644
--- a/modules/home/hyprland/conf/wlogout/layout_1
+++ b/modules/home/hyprland/conf/wlogout/layout
@@ -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"
-}
+}
\ No newline at end of file
diff --git a/modules/home/hyprland/conf/wlogout/layout_2 b/modules/home/hyprland/conf/wlogout/layout_2
deleted file mode 100644
index 9876330..0000000
--- a/modules/home/hyprland/conf/wlogout/layout_2
+++ /dev/null
@@ -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"
-}
diff --git a/modules/home/hyprland/conf/wlogout/style_1.css b/modules/home/hyprland/conf/wlogout/style_1.css
deleted file mode 100644
index 6a35ae9..0000000
--- a/modules/home/hyprland/conf/wlogout/style_1.css
+++ /dev/null
@@ -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;
-}
diff --git a/modules/home/hyprland/conf/wlogout/style_2.css b/modules/home/hyprland/conf/wlogout/style_2.css
deleted file mode 100644
index 5e371d7..0000000
--- a/modules/home/hyprland/conf/wlogout/style_2.css
+++ /dev/null
@@ -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;
-}
diff --git a/modules/nixos/core/default.nix b/modules/nixos/core/default.nix
index 8f10c19..51310df 100644
--- a/modules/nixos/core/default.nix
+++ b/modules/nixos/core/default.nix
@@ -12,7 +12,7 @@
};
# Configure firewall
- networking.firewall = lib.mkDefault {
+ networking.firewall = {
enable = true;
allowedTCPPorts = [ 22 80 443 ]; # 根据需要调整
allowedUDPPorts = [ 9 53 ]; # 9: wol, 53: dns
diff --git a/modules/nixos/fonts/default.nix b/modules/nixos/fonts/default.nix
index 14e2d1c..52f432c 100644
--- a/modules/nixos/fonts/default.nix
+++ b/modules/nixos/fonts/default.nix
@@ -18,9 +18,9 @@
# Noto 系列字体是 Google 主导的,名字的含义是「没有豆腐」q(no 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,6 +28,8 @@
source-han-sans # 思源黑体
source-han-serif # 思源宋体
+ # wqy_zenhei # 文泉驿正黑
+
# nerdfonts
nerd-fonts.jetbrains-mono
# (nerdfonts.override {
diff --git a/profiles/apollo/default.nix b/profiles/apollo/default.nix
index f040d02..cab690b 100644
--- a/profiles/apollo/default.nix
+++ b/profiles/apollo/default.nix
@@ -4,7 +4,8 @@ let
# nixpkgs = inputs.nixpkgs;
nixpkgs = inputs.nixpkgs-unstable; # 如果需要使用unstable版本,取消这行注释并注释上一行
home-manager = inputs.home-manager-unstable;
- sysArgs = args // { inherit home-manager; };
+ sysversion = "25.05";
+ sysArgs = args // { inherit home-manager sysversion; };
in
# 使用libs.mkNixosSystem创建nixosSystem
libs.mkNixosSystem {
diff --git a/profiles/apollo/network.nix b/profiles/apollo/network.nix
index 8aeb697..f93d186 100644
--- a/profiles/apollo/network.nix
+++ b/profiles/apollo/network.nix
@@ -3,7 +3,7 @@
hostId = "6fa8b74d";
hostName = "${hostname}";
- wireless.enable = false; # Enables wireless support via wpa_supplicant.
+ # wireless.enable = false; # Enables wireless support via wpa_supplicant.
# Configure network proxy if necessary
# proxy.default = "http://user:password@proxy:port/";
@@ -15,14 +15,20 @@
enableIPv6 = true;
- bridges = {
- br0 = { interfaces = [ "eno1" ]; };
- };
+ # bridges = {
+ # br0 = { interfaces = [ "eno1" ]; };
+ # };
# Set up bridge network
interfaces = {
eno1 = {
useDHCP = false;
+ ipv4.addresses = [
+ {
+ address = "10.7.43.10";
+ prefixLength = 24;
+ }
+ ];
wakeOnLan = {
enable = true;
policy = [
@@ -31,20 +37,21 @@
};
};
- br0 = {
- useDHCP = false;
- ipv4.addresses = [
- {
- address = "10.7.43.10";
- prefixLength = 24;
- }
- ];
- };
+ # br0 = {
+ # useDHCP = false;
+ # ipv4.addresses = [
+ # {
+ # address = "10.7.43.10";
+ # prefixLength = 24;
+ # }
+ # ];
+ # };
};
defaultGateway = {
- address = "10.7.43.30";
- interface = "br0";
+ address = "10.7.43.1";
+ interface = "eno1";
+ # interface = "br0";
};
nameservers = [ "10.7.43.1" ];
};
diff --git a/profiles/gaea/default.nix b/profiles/gaea/default.nix
index f040d02..cab690b 100644
--- a/profiles/gaea/default.nix
+++ b/profiles/gaea/default.nix
@@ -4,7 +4,8 @@ let
# nixpkgs = inputs.nixpkgs;
nixpkgs = inputs.nixpkgs-unstable; # 如果需要使用unstable版本,取消这行注释并注释上一行
home-manager = inputs.home-manager-unstable;
- sysArgs = args // { inherit home-manager; };
+ sysversion = "25.05";
+ sysArgs = args // { inherit home-manager sysversion; };
in
# 使用libs.mkNixosSystem创建nixosSystem
libs.mkNixosSystem {
diff --git a/profiles/luna/default.nix b/profiles/luna/default.nix
index f040d02..cab690b 100644
--- a/profiles/luna/default.nix
+++ b/profiles/luna/default.nix
@@ -4,7 +4,8 @@ let
# nixpkgs = inputs.nixpkgs;
nixpkgs = inputs.nixpkgs-unstable; # 如果需要使用unstable版本,取消这行注释并注释上一行
home-manager = inputs.home-manager-unstable;
- sysArgs = args // { inherit home-manager; };
+ sysversion = "25.05";
+ sysArgs = args // { inherit home-manager sysversion; };
in
# 使用libs.mkNixosSystem创建nixosSystem
libs.mkNixosSystem {