commit 1ab77f0e341a707308f8f465855180f0f4a93b0f
parent 0ad28f14b0598d593ad0446b604edfddd7d156b1
Author: Toni Brown <me@tb148.net>
Date: Tue, 3 Mar 2026 21:06:20 +0800
reorder config
Diffstat:
| M | configuration.nix | | | 143 | +++++++++++++++++++++++++++++++++++++++---------------------------------------- |
1 file changed, 70 insertions(+), 73 deletions(-)
diff --git a/configuration.nix b/configuration.nix
@@ -42,7 +42,7 @@
boot.loader.efi.canTouchEfiVariables = true;
boot.kernelPackages = pkgs.linuxPackages_latest;
- nixpkgs.config.allowUnfree = true;
+ hardware.bluetooth.enable = true;
hardware.graphics.enable = true;
# services.xserver.videoDrivers = ["nvidia"];
@@ -56,40 +56,6 @@
# nvidiaBusId = "PCI:1:0:0";
# };
- hardware.bluetooth.enable = true;
-
- sops.defaultSopsFile = ./secrets.yaml;
- sops.age.sshKeyPaths = ["/etc/ssh/ssh_host_ed25519_key"];
- sops.secrets.doggygo = {};
-
- environment.systemPackages = with pkgs; [
- catppuccin-cursors.mochaMauve
- doas-sudo-shim
- git
- helix
- sarasa-gothic
- wget
- ];
-
- services = {
- desktopManager.plasma6.enable = true;
- displayManager.sddm = {
- enable = true;
- wayland.enable = true;
- };
- };
- catppuccin.sddm = {
- font = "等距更纱黑体 SC";
- fontSize = "12";
- };
-
- services.pipewire = {
- enable = true;
- pulse.enable = true;
- };
-
- services.printing.enable = true;
-
networking.hostName = "nixosion";
networking.networkmanager.enable = true;
networking.nftables.enable = true;
@@ -105,21 +71,6 @@
};
systemd.services.mihomo.environment.SKIP_SYSTEM_IPV6_CHECK = "true";
- nix.gc = {
- automatic = true;
- dates = "daily";
- options = "--delete-older-than 7d";
- };
- nix.package = pkgs.lixPackageSets.latest.lix;
- nix.settings = {
- auto-optimise-store = true;
- experimental-features = [
- "nix-command"
- "flakes"
- ];
- substituters = lib.mkForce ["https://mirrors.tuna.tsinghua.edu.cn/nix-channels/store"];
- };
-
time.timeZone = "Asia/Shanghai";
services.timesyncd = {
enable = true;
@@ -129,15 +80,6 @@
i18n.defaultLocale = "zh_CN.UTF-8";
services.xserver.xkb.layout = "cn(altgr-pinyin)";
- services.userborn.enable = true;
- users.users.tb148 = {
- isNormalUser = true;
- home = "/home/tb148";
- shell = pkgs.zsh;
- description = "Toni Brown";
- extraGroups = ["wheel"];
- };
-
security.sudo.enable = false;
security.doas.enable = true;
security.doas.extraRules =
@@ -157,6 +99,22 @@
catppuccin.accent = "mauve";
xdg.icons.fallbackCursorThemes = ["catppuccin-mocha-mauve-cursors"];
+ programs.nix-ld = {
+ enable = true;
+ libraries = [
+ ## Put here any library that is required when running a package
+ ## ...
+ ## Uncomment if you want to use the libraries provided by default in the steam distribution
+ ## but this is quite far from being exhaustive
+ ## https://github.com/NixOS/nixpkgs/issues/354513
+ (pkgs.runCommand "steamrun-lib" {} "mkdir $out; ln -s ${pkgs.steam-run.fhsenv}/usr/lib64 $out/lib")
+ ];
+ };
+
+ programs.steam.enable = true;
+
+ programs.zsh.enable = true;
+
services.btrbk.instances.btrbk = {
settings = {
ssh_identity = "/etc/btrbk/id_ed25519";
@@ -180,33 +138,72 @@
"d /var/lib/btrbk/backups 0750 btrbk btrbk"
];
- services.searx = {
+ services.desktopManager.plasma6.enable = true;
+ services.displayManager.sddm = {
enable = true;
- environmentFile = "${config.users.users.tb148.home}/.searxng.env";
+ wayland.enable = true;
};
- services.syncthing.enable = true;
+ services.pipewire = {
+ enable = true;
+ pulse.enable = true;
+ };
- programs.zsh.enable = true;
+ services.printing.enable = true;
- programs.nix-ld = {
+ services.searx = {
enable = true;
- libraries = [
- ## Put here any library that is required when running a package
- ## ...
- ## Uncomment if you want to use the libraries provided by default in the steam distribution
- ## but this is quite far from being exhaustive
- ## https://github.com/NixOS/nixpkgs/issues/354513
- (pkgs.runCommand "steamrun-lib" {} "mkdir $out; ln -s ${pkgs.steam-run.fhsenv}/usr/lib64 $out/lib")
- ];
+ environmentFile = "${config.users.users.tb148.home}/.searxng.env";
};
- programs.steam.enable = true;
+ services.syncthing.enable = true;
virtualisation.docker.enable = true;
virtualisation.waydroid.enable = true;
+ services.userborn.enable = true;
+ users.users.tb148 = {
+ isNormalUser = true;
+ home = "/home/tb148";
+ shell = pkgs.zsh;
+ description = "Toni Brown";
+ extraGroups = ["wheel"];
+ };
+
+ sops.defaultSopsFile = ./secrets.yaml;
+ sops.age.sshKeyPaths = ["/etc/ssh/ssh_host_ed25519_key"];
+ sops.secrets.doggygo = {};
+
+ environment.systemPackages = with pkgs; [
+ catppuccin-cursors.mochaMauve
+ doas-sudo-shim
+ git
+ helix
+ sarasa-gothic
+ wget
+ ];
+ catppuccin.sddm = {
+ font = "等距更纱黑体 SC";
+ fontSize = "12";
+ };
+
+ nixpkgs.config.allowUnfree = true;
+ nix.gc = {
+ automatic = true;
+ dates = "daily";
+ options = "--delete-older-than 7d";
+ };
+ nix.package = pkgs.lixPackageSets.latest.lix;
+ nix.settings = {
+ auto-optimise-store = true;
+ experimental-features = [
+ "nix-command"
+ "flakes"
+ ];
+ substituters = lib.mkForce ["https://mirrors.tuna.tsinghua.edu.cn/nix-channels/store"];
+ };
+
# Copy the NixOS configuration file and link it from the resulting system
# (/run/current-system/configuration.nix). This is useful in case you
# accidentally delete configuration.nix.