{ config, pkgs, ... }: let home = config.constants.homeDir; usr = config.constants.userName; usrPwdFile = "users/${usr}/password"; in { console.enable = false; 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; [ alejandra dua fd nil 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; firefox.enable = config.programs.plasma.enable; 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"; }; }; kitty = { enable = config.programs.plasma.enable; settings = { background_opacity = "0.96"; remember_window_size = "no"; }; theme = "Tokyo Night Moon"; }; plasma = { configFile = { baloofilerc = { "Basic Settings".Indexing-Enabled = true; General."only basic indexing" = true; }; kded5rc.Module-browserintegrationreminder.autoload = false; kdeglobals.General = { TerminalApplication = "kitty"; TerminalService = "kitty.desktop"; }; }; input.touchpads = [ { enable = false; name = "ASUE120A:00 04F3:319B Touchpad"; productId = "319B"; vendorId = "04F3"; } ]; kscreenlocker = { autoLock = true; lockOnResume = true; passwordRequired = true; appearance.wallpaperPictureOfTheDay.provider = "bing"; }; kwin = { effects = { blur.enable = true; desktopSwitching.animation = "slide"; dimAdminMode.enable = true; windowOpenClose.animation = "glide"; }; scripts.polonium = { enable = true; settings = { layout.engine = "binaryTree"; tilePopups = false; }; }; virtualDesktops = { number = 4; rows = 1; }; }; overrideConfig = true; panels = [ { floating = false; height = 36; widgets = [ { kickoff = { icon = "nix-snowflake-white"; sortAlphabetically = true; }; } "org.kde.plasma.pager" { iconTasks.launchers = []; } "org.kde.plasma.marginsseparator" { systemTray.items = { shown = [ "org.kde.kdeconnect" ]; hidden = [ "org.kde.plasma.battery" "org.kde.plasma.bluetooth" "org.kde.plasma.brightness" "org.kde.plasma.devicenotifier" "org.kde.plasma.manage-inputmethod" "Fcitx" ]; }; } "org.kde.plasma.digitalclock" ]; } ]; powerdevil.AC = { autoSuspend.action = "nothing"; dimDisplay.enable = true; powerButtonAction = "showLogoutScreen"; whenLaptopLidClosed = "turnOffScreen"; whenSleepingEnter = "standby"; }; spectacle.shortcuts.captureRectangularRegion = "Meta+Shift+S"; workspace = { colorScheme = "SweetAmbarBlue"; desktop.icons = { alignment = "left"; arrangement = "leftToRight"; lockInPlace = true; sorting = { foldersFirst = true; mode = "type"; }; }; iconTheme = "Sweet-Rainbow"; lookAndFeel = "Sweet-Ambar-Blue"; soundTheme = "yorha"; }; }; ripgrep.enable = true; starship = { enable = true; enableTransience = true; }; tealdeer.enable = true; zoxide = { enable = true; options = ["--cmd cd"]; }; }; }; }; i18n = { defaultLocale = "zh_CN.UTF-8"; supportedLocales = ["all"]; }; 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; }; }; }