mirror of
https://github.com/ryan4yin/nix-config.git
synced 2026-07-08 13:55:07 +02:00
feat: adjust overlays
This commit is contained in:
@@ -3,6 +3,7 @@
|
|||||||
{
|
{
|
||||||
|
|
||||||
imports = [
|
imports = [
|
||||||
|
./fcitx5
|
||||||
./hyprland
|
./hyprland
|
||||||
# ./i3
|
# ./i3
|
||||||
./programs
|
./programs
|
||||||
|
|||||||
@@ -0,0 +1,15 @@
|
|||||||
|
{pkgs, config, ... }: {
|
||||||
|
|
||||||
|
i18n.inputMethod = {
|
||||||
|
enabled = "fcitx5";
|
||||||
|
fcitx5.addons = with pkgs; [
|
||||||
|
# for flypy chinese input method
|
||||||
|
fcitx5-rime
|
||||||
|
# needed enable rime using configtool after installed
|
||||||
|
fcitx5-configtool
|
||||||
|
fcitx5-chinese-addons
|
||||||
|
# fcitx5-mozc # japanese input method
|
||||||
|
fcitx5-gtk # gtk im module
|
||||||
|
];
|
||||||
|
};
|
||||||
|
}
|
||||||
@@ -6,35 +6,26 @@
|
|||||||
{ config, pkgs, home-manager, nur, ... } @ args:
|
{ config, pkgs, home-manager, nur, ... } @ args:
|
||||||
|
|
||||||
{
|
{
|
||||||
imports =
|
imports = [
|
||||||
[
|
# This adds a nur configuration option.
|
||||||
({pkgs, config, ... }: {
|
# Use `config.nur.repos.<user>.<package-name>` in NixOS Module for packages from the NUR.
|
||||||
config = {
|
nur.nixosModules.nur
|
||||||
# use it as an overlay
|
|
||||||
nixpkgs.overlays = [
|
|
||||||
args.nixpkgs-wayland.overlay
|
|
||||||
];
|
|
||||||
};
|
|
||||||
})
|
|
||||||
|
|
||||||
# This adds a nur configuration option.
|
./cifs-mount.nix
|
||||||
# Use `config.nur.repos.<user>.<package-name>` in NixOS Module for packages from the NUR.
|
# Include the results of the hardware scan.
|
||||||
nur.nixosModules.nur
|
./hardware-configuration.nix
|
||||||
|
|
||||||
./cifs-mount.nix
|
../../modules/fhs-fonts.nix
|
||||||
# Include the results of the hardware scan.
|
../../modules/hyprland.nix
|
||||||
./hardware-configuration.nix
|
#../../modules/i3.nix
|
||||||
|
../../modules/nur-packages.nix
|
||||||
|
../../modules/system.nix
|
||||||
|
../../modules/user_group.nix
|
||||||
|
|
||||||
../../modules/fcitx5
|
../../secrets
|
||||||
../../modules/fhs-fonts.nix
|
];
|
||||||
../../modules/hyprland.nix
|
|
||||||
#../../modules/i3.nix
|
|
||||||
../../modules/nur-packages.nix
|
|
||||||
../../modules/system.nix
|
|
||||||
../../modules/user_group.nix
|
|
||||||
|
|
||||||
../../secrets
|
nixpkgs.overlays = import ../../overlays args;
|
||||||
];
|
|
||||||
|
|
||||||
# Bootloader.
|
# Bootloader.
|
||||||
boot.loader = {
|
boot.loader = {
|
||||||
|
|||||||
@@ -5,34 +5,25 @@
|
|||||||
{ config, pkgs, home-manager, nur, ... } @args:
|
{ config, pkgs, home-manager, nur, ... } @args:
|
||||||
|
|
||||||
{
|
{
|
||||||
imports =
|
imports = [
|
||||||
[
|
# This adds a nur configuration option.
|
||||||
({pkgs, config, ... }: {
|
# Use `config.nur.repos.<user>.<package-name>` in NixOS Module for packages from the NUR.
|
||||||
config = {
|
nur.nixosModules.nur
|
||||||
# use it as an overlay
|
|
||||||
nixpkgs.overlays = [
|
|
||||||
args.nixpkgs-wayland.overlay
|
|
||||||
];
|
|
||||||
};
|
|
||||||
})
|
|
||||||
|
|
||||||
# This adds a nur configuration option.
|
# Include the results of the hardware scan.
|
||||||
# Use `config.nur.repos.<user>.<package-name>` in NixOS Module for packages from the NUR.
|
./hardware-configuration.nix
|
||||||
nur.nixosModules.nur
|
|
||||||
|
|
||||||
# Include the results of the hardware scan.
|
../../modules/fhs-fonts.nix
|
||||||
./hardware-configuration.nix
|
../../modules/hyprland.nix
|
||||||
|
#../../modules/i3.nix
|
||||||
|
../../modules/nur-packages.nix
|
||||||
|
../../modules/system.nix
|
||||||
|
../../modules/user_group.nix
|
||||||
|
|
||||||
../../modules/fcitx5
|
../../secrets
|
||||||
../../modules/fhs-fonts.nix
|
];
|
||||||
../../modules/hyprland.nix
|
|
||||||
#../../modules/i3.nix
|
|
||||||
../../modules/nur-packages.nix
|
|
||||||
../../modules/system.nix
|
|
||||||
../../modules/user_group.nix
|
|
||||||
|
|
||||||
../../secrets
|
nixpkgs.overlays = import ../../overlays args;
|
||||||
];
|
|
||||||
|
|
||||||
# Bootloader.
|
# Bootloader.
|
||||||
boot.loader = {
|
boot.loader = {
|
||||||
|
|||||||
@@ -1,28 +0,0 @@
|
|||||||
{ config, pkgs, ... }:
|
|
||||||
|
|
||||||
# related issues: https://github.com/hyprwm/Hyprland/discussions/421
|
|
||||||
{
|
|
||||||
# 为了不使用默认的 rime-data,改用我自定义的小鹤音形数据,这里需要 override
|
|
||||||
# 参考 https://github.com/NixOS/nixpkgs/blob/e4246ae1e7f78b7087dce9c9da10d28d3725025f/pkgs/tools/inputmethods/fcitx5/fcitx5-rime.nix
|
|
||||||
nixpkgs.overlays = [
|
|
||||||
(self: super: {
|
|
||||||
# 小鹤音形配置,配置来自 flypy.com 官方网盘的鼠须管配置压缩包「小鹤音形“鼠须管”for macOS.zip」
|
|
||||||
# 我仅修改了 default.yaml 文件,将其中的半角括号改为了直角括号「 与 」。
|
|
||||||
rime-data = ./rime-data-flypy;
|
|
||||||
fcitx5-rime = super.fcitx5-rime.override { rimeDataPkgs = [ ./rime-data-flypy ]; };
|
|
||||||
})
|
|
||||||
];
|
|
||||||
|
|
||||||
i18n.inputMethod = {
|
|
||||||
enabled = "fcitx5";
|
|
||||||
fcitx5.addons = with pkgs; [
|
|
||||||
# for flypy chinese input method
|
|
||||||
fcitx5-rime
|
|
||||||
# needed enable rime using configtool after installed
|
|
||||||
fcitx5-configtool
|
|
||||||
fcitx5-chinese-addons
|
|
||||||
# fcitx5-mozc # japanese input method
|
|
||||||
fcitx5-gtk # gtk im module
|
|
||||||
];
|
|
||||||
};
|
|
||||||
}
|
|
||||||
@@ -0,0 +1,7 @@
|
|||||||
|
args:
|
||||||
|
# execute and import all overlay files in the current directory with the given args
|
||||||
|
builtins.map
|
||||||
|
(f: (import (./. + "/${f}") args)) # execute and import the overlay file
|
||||||
|
(builtins.filter # find all overlay files in the current directory
|
||||||
|
(f: f != "default.nix")
|
||||||
|
(builtins.attrNames (builtins.readDir ./.)))
|
||||||
@@ -0,0 +1,10 @@
|
|||||||
|
# 为了不使用默认的 rime-data,改用我自定义的小鹤音形数据,这里需要 override
|
||||||
|
# 参考 https://github.com/NixOS/nixpkgs/blob/e4246ae1e7f78b7087dce9c9da10d28d3725025f/pkgs/tools/inputmethods/fcitx5/fcitx5-rime.nix
|
||||||
|
{...}:
|
||||||
|
|
||||||
|
(self: super: {
|
||||||
|
# 小鹤音形配置,配置来自 flypy.com 官方网盘的鼠须管配置压缩包「小鹤音形“鼠须管”for macOS.zip」
|
||||||
|
# 我仅修改了 default.yaml 文件,将其中的半角括号改为了直角括号「 与 」。
|
||||||
|
rime-data = ./rime-data-flypy;
|
||||||
|
fcitx5-rime = super.fcitx5-rime.override { rimeDataPkgs = [ ./rime-data-flypy ]; };
|
||||||
|
})
|
||||||
Reference in New Issue
Block a user