-
Notifications
You must be signed in to change notification settings - Fork 0
/
misc.nix
executable file
·148 lines (133 loc) · 3.66 KB
/
misc.nix
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
# Edit this configuration file to define what should be installed on
# your system. Help is available in the configuration.nix(5) man page
# and in the NixOS manual (accessible by running ‘nixos-help’).
{ config
, pkgs
, lib
, user
, ...
}:
{
nixpkgs.config.chromium.commandLineArgs = "--enable-features=UseOzonePlatform --ozone-platform=wayland";
nixpkgs.config.permittedInsecurePackages = [
"qtwebkit-5.212.0-alpha4"
"electron-21.4.0"
];
nixpkgs.config.allowUnfreePredicate = pkg: builtins.elem (lib.getName pkg) [
"steam"
"steam-original"
"steam-runtime"
];
nixpkgs.config.allowUnfree = true;
virtualisation = {
docker.enable = true;
libvirtd = {
enable = true;
};
};
nix = {
# settings.substituters = [ "https://mirrors.bfsu.edu.cn/nix-channels/store" ];
package = pkgs.nixVersions.stable;
settings = {
trusted-public-keys = [
"cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY="
"nur-pkgs.cachix.org-1:PAvPHVwmEBklQPwyNZfy4VQqQjzVIaFOkYYnmnKco78="
];
substituters = [
"https://cache.nixos.org"
"https://nur-pkgs.cachix.org"
];
auto-optimise-store = true;
experimental-features = [ "nix-command" "flakes" "ca-derivations" ];
trusted-users = [ "root" "frnks" ];
};
};
systemd.user.services.kanshi = {
description = "kanshi daemon";
serviceConfig = {
Type = "simple";
ExecStart = ''${pkgs.kanshi}/bin/kanshi -c kanshi_config_file'';
};
};
xdg.portal = {
enable = true;
# wlr.enable = true;
# gtk portal needed to make gtk apps happy
extraPortals = [ pkgs.xdg-desktop-portal-gtk ];
};
# Set your time zone.
time.timeZone = "Asia/Shanghai";
# Select internationalisation properties.
i18n.defaultLocale = "en_US.UTF-8";
console = {
font = "Lat2-Terminus16";
keyMap = "us";
};
fonts = {
enableDefaultFonts = true;
fontDir.enable = true;
enableGhostscriptFonts = true;
fonts = with pkgs; [
(nerdfonts.override {
fonts = [
"FiraCode"
"DroidSansMono"
"JetBrainsMono"
"FantasqueSansMono"
"CascadiaCode"
];
})
noto-fonts
noto-fonts-cjk-sans
noto-fonts-cjk-serif
noto-fonts-emoji
sarasa-gothic
twemoji-color-font
liberation_ttf
corefonts
vistafonts
vistafonts-chs
vistafonts-cht
] ++ (with (pkgs.callPackage ./modules/packs/glowsans/default.nix { }); [ glowsansSC glowsansTC glowsansJ ])
++ (with nur-pkgs;[
san-francisco
plangothic ]);
fontconfig = {
antialias = true;
hinting.enable = false;
subpixel = {
lcdfilter = "light";
};
defaultFonts = {
serif = [ "Glow Sans SC" "Glow Sans TC" "Glow Sans J" "Noto Serif" "Noto Serif CJK SC" "Noto Serif CJK TC" "Noto Serif CJK JP" ];
monospace = [ "SF Mono" ];
sansSerif = [ "Glow Sans SC" "Glow Sans TC" "Glow Sans J" "SF Pro Text" ];
emoji = [ "twemoji-color-font" "noto-fonts-emoji" ];
};
};
};
i18n.inputMethod = {
# enabled = "ibus";
# ibus.panel = "${pkgs.plasma5Packages.plasma-desktop}/lib/libexec/kimpanel-ibus-panel";
enabled = "fcitx5";
ibus.engines = with pkgs.ibus-engines; [
libpinyin
typing-booster
table
rime
table-chinese
uniemoji
];
fcitx5.addons = with pkgs; [
fcitx5-chinese-addons
fcitx5-mozc
fcitx5-lua
fcitx5-table-other
fcitx5-rime
libsForQt5.fcitx5-qt
fcitx5-gtk
fcitx5-configtool
];
};
system.stateVersion = "22.11"; # Did you read the comment?
}