move some nixos configuration to ./nixos/modules and ./nixos/configurations. try to find a good arch to conbine home-manager and nixos modules.
This commit is contained in:
parent
6be554822c
commit
64db779064
32 changed files with 534 additions and 635 deletions
|
|
@ -8,7 +8,6 @@
|
|||
imports = [
|
||||
./starship
|
||||
./helix
|
||||
./wezterm
|
||||
./fish
|
||||
./rime-ice.nix
|
||||
./firefox.nix
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
{ pkgs, ... }:
|
||||
{ pkgs, firefox-addons, ... }:
|
||||
{
|
||||
programs.firefox = {
|
||||
enable = true;
|
||||
|
|
@ -9,8 +9,8 @@
|
|||
profiles.default = {
|
||||
name = "default";
|
||||
isDefault = true;
|
||||
extensions = with pkgs.nur.repos; [
|
||||
rycee.firefox-addons.immersive-translate
|
||||
extensions = with (pkgs.callPackage firefox-addons { }); [
|
||||
immersive-translate
|
||||
];
|
||||
search = {
|
||||
force = true;
|
||||
|
|
|
|||
|
|
@ -1,18 +0,0 @@
|
|||
{
|
||||
pkgs,
|
||||
wezterm,
|
||||
...
|
||||
}:
|
||||
{
|
||||
programs.wezterm = {
|
||||
enable = true;
|
||||
package = wezterm.packages."${pkgs.system}".default;
|
||||
};
|
||||
home.file.".config/wezterm" = {
|
||||
source = ./lua;
|
||||
recursive = true;
|
||||
};
|
||||
home.packages = with pkgs; [
|
||||
nerd-fonts.fira-code
|
||||
];
|
||||
}
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 3.9 MiB |
|
|
@ -1,33 +0,0 @@
|
|||
local wezterm = require("wezterm")
|
||||
|
||||
---@class Config
|
||||
---@filed options table
|
||||
local Config = {}
|
||||
|
||||
---Init Config
|
||||
---@return Config
|
||||
function Config:init()
|
||||
local o = {}
|
||||
self = setmetatable(o, { __index = Config })
|
||||
self.options = {}
|
||||
return o
|
||||
end
|
||||
|
||||
---Append to `Config.options`
|
||||
---@param new_options table new options to append
|
||||
---@return Config
|
||||
function Config:append(new_options)
|
||||
for key, val in pairs(new_options) do
|
||||
if self.options[key] ~= nil then
|
||||
wezterm.log_warn("Duplicate config option detected: ", {
|
||||
old = self.options[key],
|
||||
new = new_options[key],
|
||||
})
|
||||
else
|
||||
self.options[key] = val
|
||||
end
|
||||
end
|
||||
return self
|
||||
end
|
||||
|
||||
return Config
|
||||
|
|
@ -1,7 +0,0 @@
|
|||
return {
|
||||
---Check whether the current os is windows
|
||||
---@return boolean whether the current os is windows
|
||||
is_windows = function()
|
||||
return require("wezterm").target_triple:find("windows") ~= nil
|
||||
end,
|
||||
}
|
||||
|
|
@ -1,22 +0,0 @@
|
|||
return {
|
||||
family = [[FiraCode Nerd Font]],
|
||||
assume_emoji_presentation = false,
|
||||
style = [[Normal]],
|
||||
harfbuzz_features = {
|
||||
"calt=1",
|
||||
"clig=1",
|
||||
"liga=1",
|
||||
"cv01",
|
||||
"cv02",
|
||||
"cv06",
|
||||
"zero",
|
||||
"onum",
|
||||
"cv17",
|
||||
"ss05",
|
||||
"ss03",
|
||||
"cv16",
|
||||
"cv31",
|
||||
"cv29",
|
||||
"cv30",
|
||||
},
|
||||
}
|
||||
|
|
@ -1,4 +0,0 @@
|
|||
return {
|
||||
family = [[Noto Color Emiji]],
|
||||
assume_emoji_presentation = true,
|
||||
}
|
||||
|
|
@ -1,4 +0,0 @@
|
|||
return {
|
||||
family = [[Noto Sans CJK SC]],
|
||||
assume_emoji_presentation = false,
|
||||
}
|
||||
|
|
@ -1,4 +0,0 @@
|
|||
return {
|
||||
family = [[Segoe UI Emoji]],
|
||||
assume_emoji_presentation = true,
|
||||
}
|
||||
|
|
@ -1,5 +0,0 @@
|
|||
return {
|
||||
family = [[VictorMono Nerd Font]],
|
||||
assume_emoji_presentation = false,
|
||||
style = "Italic",
|
||||
}
|
||||
|
|
@ -1,17 +0,0 @@
|
|||
local wezterm = require("wezterm")
|
||||
|
||||
local M = {
|
||||
-- front_end = 'WebGpu',
|
||||
webgpu_power_preference = "HighPerformance",
|
||||
}
|
||||
|
||||
for _, gpu in ipairs(wezterm.gui.enumerate_gpus()) do
|
||||
if gpu.backend == "Vulkan" and gpu.device_type == "DiscreteGpu" then
|
||||
M.webgpu_preferred_adapter = gpu
|
||||
break
|
||||
elseif gpu.backend == "Vulkan" and M.webgpu_preferred_adapter == nil then
|
||||
M.webgpu_preferred_adapter = gpu
|
||||
end
|
||||
end
|
||||
|
||||
return M
|
||||
|
|
@ -1,28 +0,0 @@
|
|||
local wezterm = require("wezterm")
|
||||
|
||||
return {
|
||||
automatically_reload_config = true,
|
||||
cell_width = 1.0,
|
||||
audible_bell = "Disabled",
|
||||
tab_bar_at_bottom = true,
|
||||
use_fancy_tab_bar = false,
|
||||
hide_tab_bar_if_only_one_tab = true,
|
||||
window_decorations = "RESIZE|TITLE",
|
||||
underline_thickness = 3.0,
|
||||
enable_scroll_bar = true,
|
||||
color_scheme = "MaterialOcean",
|
||||
window_background_image = wezterm.config_dir .. [[/background/background.png]],
|
||||
window_background_image_hsb = {
|
||||
brightness = 0.02,
|
||||
hue = 1.0,
|
||||
saturation = 1.0,
|
||||
},
|
||||
window_padding = {
|
||||
left = "0.5cell",
|
||||
right = 0,
|
||||
top = "0cell",
|
||||
bottom = "0cell",
|
||||
},
|
||||
window_background_opacity = 0.9,
|
||||
text_background_opacity = 0.6,
|
||||
}
|
||||
|
|
@ -1,5 +0,0 @@
|
|||
if require("fn").is_windows() then
|
||||
return require("options.os.windows")
|
||||
else
|
||||
return require("options.os.other_os")
|
||||
end
|
||||
|
|
@ -1,30 +0,0 @@
|
|||
local wezterm = require("wezterm")
|
||||
|
||||
local fonts = {
|
||||
require("fonts.firacode_nerd_font"),
|
||||
require("fonts.noto_sans_cjk_sc"),
|
||||
require("fonts.noto_color_emoji"),
|
||||
}
|
||||
|
||||
return {
|
||||
term = "wezterm",
|
||||
font_size = 14.0,
|
||||
animation_fps = 1,
|
||||
max_fps = 1,
|
||||
font = wezterm.font_with_fallback(fonts),
|
||||
font_rules = {
|
||||
{
|
||||
italic = true,
|
||||
font = wezterm.font_with_fallback({
|
||||
require("fonts.victor_mono_nerd_font"),
|
||||
}),
|
||||
},
|
||||
{
|
||||
italic = false,
|
||||
font = wezterm.font_with_fallback({
|
||||
require("fonts.firacode_nerd_font"),
|
||||
require("fonts.noto_sans_cjk_sc"),
|
||||
}),
|
||||
},
|
||||
},
|
||||
}
|
||||
|
|
@ -1,31 +0,0 @@
|
|||
local wezterm = require("wezterm")
|
||||
|
||||
local fonts = {
|
||||
require("fonts.firacode_nerd_font"),
|
||||
require("fonts.segoe_ui_emoji"),
|
||||
}
|
||||
|
||||
return {
|
||||
font_size = 16.0,
|
||||
animation_fps = 144,
|
||||
max_fps = 144,
|
||||
default_prog = {
|
||||
[[pwsh]],
|
||||
},
|
||||
font = wezterm.font_with_fallback(fonts),
|
||||
font_rules = {
|
||||
{
|
||||
italic = true,
|
||||
font = wezterm.font_with_fallback({
|
||||
require("fonts.victor_mono_nerd_font"),
|
||||
}),
|
||||
},
|
||||
{
|
||||
italic = false,
|
||||
font = wezterm.font_with_fallback({
|
||||
require("fonts.firacode_nerd_font"),
|
||||
require("fonts.noto_sans_cjk_sc"),
|
||||
}),
|
||||
},
|
||||
},
|
||||
}
|
||||
|
|
@ -1,6 +0,0 @@
|
|||
indent_type = "Spaces"
|
||||
indent_width = 2
|
||||
column_width = 120
|
||||
|
||||
[sort_requires]
|
||||
enabled = true
|
||||
|
|
@ -1,5 +0,0 @@
|
|||
return require("config")
|
||||
:init()
|
||||
:append(require("options.base"))
|
||||
:append(require("options.backend"))
|
||||
:append(require("options.os")).options
|
||||
Loading…
Add table
Add a link
Reference in a new issue