{ config, pkgs, ... }: let home = config.constants.homeDir; usr = config.constants.userName; usrPwdFile = "users/${usr}/password"; in { fonts = { fontDir.enable = true; fontconfig.defaultFonts = { sansSerif = [ "Inter" "Noto Sans CJK SC" ]; monospace = [ "Iosevka" "Noto Sans Mono CJK SC" ]; }; packages = with pkgs; [ inter iosevka noto-fonts-cjk ]; }; home-manager = { useGlobalPkgs = true; useUserPackages = true; users.${usr} = { config, osConfig, pkgs, ... }: { home = { file = { kvantum = { enable = config.programs.plasma.enable; target = ".config/Kvantum/kvantum.kvconfig"; text = '' [General] theme=Sweet-Ambar-Blue ''; }; }; packages = with pkgs; [ dua fd nil nixpkgs-fmt rclone sops ] ++ (if config.programs.plasma.enable then [ sweet-ambar-blue wallpaper-engine-plasma6-plugin yorha-sound-theme ] ++ (with kdePackages; [ qtmultimedia qtstyleplugin-kvantum qtwebchannel qtwebengine qtwebsockets ]) else [ ]); stateVersion = osConfig.system.stateVersion; }; programs = { bat.enable = true; bottom.enable = true; direnv = { enable = true; nix-direnv.enable = true; }; eza.enable = true; fish.enable = true; fzf.enable = true; git = { enable = true; extraConfig = { core.autocrlf = "input"; init.defaultBranch = "development"; pull.rebase = false; push.autoSetupRemote = true; }; ignores = [ ".direnv" ".envrc" ]; userEmail = osConfig.constants.postMaster; userName = osConfig.constants.userName; }; helix = { enable = true; defaultEditor = true; settings = { editor = { lsp.display-inlay-hints = true; soft-wrap.enable = true; }; theme = "base16_transparent"; }; }; plasma = { configFile = { kscreenlockerrc.Daemon.Autolock = false; kscreenlockerrc.Greeter.WallpaperPlugin = "org.kde.potd"; }; spectacle.shortcuts.captureRectangularRegion = "Meta+Shift+S"; workspace = { colorScheme = "SweetAmbarBlue"; cursor.theme = "Sweet-cursors"; iconTheme = "Sweet-Rainbow"; lookAndFeel = "Sweet-Ambar-Blue"; theme = "Sweet-Ambar-Blue"; }; }; ripgrep.enable = true; starship = { enable = true; enableTransience = true; }; tealdeer.enable = true; zoxide = { enable = true; options = [ "--cmd cd" ]; }; }; xdg.enable = true; }; }; i18n.supportedLocales = [ "C.UTF-8/UTF-8" "en_US.UTF-8/UTF-8" "ja_JP.UTF-8/UTF-8" "zh_CN.UTF-8/UTF-8" ]; programs = { fish.enable = true; nh.enable = true; }; services = { openssh = { hostKeys = [{ comment = "host@${config.networking.hostName}"; path = "/etc/ssh/host"; rounds = 100; type = "ed25519"; }]; settings = { PasswordAuthentication = false; KbdInteractiveAuthentication = false; }; }; resolved.enable = true; syncthing = { configDir = "${home}/.config/syncthing"; dataDir = "${home}/.local/share/syncthing"; openDefaultPorts = true; overrideDevices = true; overrideFolders = true; settings.devices = config.constants.syncthingDevices; user = usr; }; }; sops.secrets.${usrPwdFile}.neededForUsers = true; users = { mutableUsers = false; users.${usr} = { description = "Sicheng Pan"; extraGroups = [ "audio" "input" "networkmanager" "uinput" "wheel" ]; hashedPasswordFile = config.sops.secrets.${usrPwdFile}.path; home = config.constants.homeDir; isNormalUser = true; openssh.authorizedKeys.keys = config.constants.publicKeys; shell = pkgs.fish; }; }; }