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
|
|
@ -11,15 +11,6 @@
|
|||
}:
|
||||
|
||||
{
|
||||
# Bootloader.
|
||||
boot.kernelPackages = pkgs.linuxPackages_zen;
|
||||
boot.loader.systemd-boot.enable = true;
|
||||
boot.loader.efi.canTouchEfiVariables = true;
|
||||
|
||||
# services.asusd = {
|
||||
# enable = true;
|
||||
# };
|
||||
|
||||
# Configure network proxy if necessary
|
||||
# networking.proxy.default = "http://user:password@proxy:port/";
|
||||
# networking.proxy.noProxy = "127.0.0.1,localhost,internal.domain";
|
||||
|
|
@ -29,54 +20,6 @@
|
|||
spiceUSBRedirection.enable = true;
|
||||
};
|
||||
|
||||
networking = {
|
||||
hostName = "Tytonidae";
|
||||
networkmanager.enable = false;
|
||||
useNetworkd = true;
|
||||
useDHCP = false;
|
||||
|
||||
wireless.iwd = {
|
||||
enable = true;
|
||||
settings = {
|
||||
General = {
|
||||
EnableNetworkConfiguration = true;
|
||||
};
|
||||
Network = {
|
||||
EnableIPv6 = true;
|
||||
NameResolvingService = "systemd";
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
systemd.network = {
|
||||
enable = true;
|
||||
wait-online.enable = false;
|
||||
networks = {
|
||||
"eno2" = {
|
||||
matchConfig.Name = "eno2";
|
||||
networkConfig = {
|
||||
DHCP = "yes";
|
||||
IPv6AcceptRA = true;
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
time.timeZone = "Asia/Shanghai";
|
||||
|
||||
i18n.defaultLocale = "zh_CN.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.inputMethod = {
|
||||
enable = true;
|
||||
type = "fcitx5";
|
||||
|
|
@ -87,12 +30,15 @@
|
|||
fcitx5-configtool
|
||||
fcitx5-chinese-addons
|
||||
(fcitx5-rime.override {
|
||||
rimeDataPkgs = [
|
||||
rime-data
|
||||
nur.repos.xddxdd.rime-ice
|
||||
nur.repos.xddxdd.rime-zhwiki
|
||||
nur.repos.xddxdd.rime-moegirl
|
||||
];
|
||||
rimeDataPkgs =
|
||||
[
|
||||
rime-data
|
||||
]
|
||||
++ (with (pkgs.callPackage inputs.nur-xddxdd { }); [
|
||||
rime-ice
|
||||
rime-zhwiki
|
||||
rime-moegirl
|
||||
]);
|
||||
})
|
||||
];
|
||||
waylandFrontend = true;
|
||||
|
|
@ -146,8 +92,7 @@
|
|||
"aes192-ctr"
|
||||
"aes128-ctr"
|
||||
];
|
||||
KexAlgorithms = [
|
||||
"curve25519-sha256@libssh.org"
|
||||
KexAlgorithms = [ "curve25519-sha256@libssh.org"
|
||||
"ecdh-sha2-nistp521"
|
||||
"ecdh-sha2-nistp384"
|
||||
"ecdh-sha2-nistp256"
|
||||
|
|
@ -192,9 +137,6 @@
|
|||
# Install firefox.
|
||||
programs.firefox.enable = true;
|
||||
|
||||
# Allow unfree packages
|
||||
nixpkgs.config.allowUnfree = true;
|
||||
|
||||
# List packages installed in system profile. To search, run:
|
||||
environment.systemPackages = with pkgs; [
|
||||
nix-output-monitor
|
||||
|
|
@ -204,10 +146,38 @@
|
|||
helix
|
||||
nixd
|
||||
nixfmt-rfc-style
|
||||
fontconfig
|
||||
noto-fonts-cjk-sans
|
||||
noto-fonts-cjk-serif
|
||||
];
|
||||
|
||||
fonts = {
|
||||
enableDefaultPackages = false;
|
||||
packages = with pkgs; [
|
||||
nerd-fonts.fira-code
|
||||
noto-fonts
|
||||
noto-fonts-cjk-sans
|
||||
noto-fonts-cjk-serif
|
||||
noto-fonts-emoji
|
||||
lxgw-wenkai
|
||||
];
|
||||
fontconfig.defaultFonts = pkgs.lib.mkForce {
|
||||
serif = [
|
||||
"LXGW WenKai"
|
||||
"Noto Serif CJK SC"
|
||||
"Noto Serif"
|
||||
];
|
||||
sansSerif = [
|
||||
"Noto Serif CJK SC"
|
||||
"Noto Serif"
|
||||
];
|
||||
monospace = [
|
||||
"FiraCode Nerd Font"
|
||||
];
|
||||
emoji = [ "Noto Color Emoji" ];
|
||||
};
|
||||
};
|
||||
|
||||
environment.variables.EDITOR = "hx";
|
||||
# Some programs need SUID wrappers, can be configured further or are
|
||||
# started in user sessions.
|
||||
|
|
@ -219,12 +189,6 @@
|
|||
|
||||
# List services that you want to enable:
|
||||
|
||||
# Open ports in the firewall.
|
||||
# networking.firewall.allowedTCPPorts = [ ... ];
|
||||
# networking.firewall.allowedUDPPorts = [ ... ];
|
||||
# Or disable the firewall altogether.
|
||||
networking.firewall.enable = false;
|
||||
|
||||
# This value determines the NixOS release from which the default
|
||||
# settings for stateful data, like file locations and database versions
|
||||
# on your system were taken. It‘s perfectly fine and recommended to leave
|
||||
|
|
@ -232,11 +196,6 @@
|
|||
# Before changing this value read the documentation for this option
|
||||
# (e.g. man configuration.nix or on https://nixos.org/nixos/options.html).
|
||||
|
||||
nix.settings.experimental-features = [
|
||||
"nix-command"
|
||||
"flakes"
|
||||
];
|
||||
|
||||
system.stateVersion = "24.11"; # Did you read the comment?
|
||||
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue