{ config, pkgs, ... }: with config.constants; let usrPwdFile = "users/${userName}/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-sans ]; }; home-manager = { useGlobalPkgs = true; useUserPackages = true; users.${userName} = { 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 jjui nil rclone sops ] ++ ( if config.programs.plasma.enable then [ kdePackages.qtstyleplugin-kvantum sweet-ambar-blue yorha-sound-theme ] 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; ignores = [ ".direnv" ".envrc" ]; userEmail = postMaster; userName = 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"; hide_window_decorations = "yes"; remember_window_size = "no"; }; themeFile = "tokyo_night_moon"; }; jujutsu = { enable = true; settings = { git.sign-on-push = true; signing = { behaviour = "own"; backend = "gpg"; }; ui = { default-command = "status"; editor = "hx"; paginate = "never"; }; user = { email = postMaster; name = userName; }; }; }; plasma = { enable = osConfig.services.desktopManager.plasma6.enable; configFile = { baloofilerc = { "Basic Settings".Indexing-Enabled = true; General."only basic indexing" = true; }; kded5rc.Module-browserintegrationreminder.autoload = false; kdeglobals.General = { TerminalApplication = "kitty"; TerminalService = "kitty.desktop"; }; }; desktop.icons = { alignment = "left"; arrangement = "leftToRight"; lockInPlace = true; sorting = { foldersFirst = true; mode = "type"; }; }; immutableByDefault = true; kscreenlocker = { appearance.wallpaperPictureOfTheDay.provider = "bing"; autoLock = true; lockOnResume = true; passwordRequired = true; timeout = 30; }; kwin = { borderlessMaximizedWindows = true; effects = { blur.enable = true; desktopSwitching.animation = "slide"; dimAdminMode.enable = true; windowOpenClose.animation = "glide"; }; virtualDesktops = { number = 4; rows = 1; }; }; overrideConfig = true; panels = [ { floating = false; height = 36; widgets = [ { kickoff = { icon = "nix-snowflake-white"; showButtonsFor = "power"; sortAlphabetically = true; }; } { pager.general.navigationWrapsAround = true; } { iconTasks.launchers = []; } { systemTray = { icons.scaleToFit = false; items.showAll = true; }; } { digitalClock.timeZone.selected = ["Local"]; } ]; } ]; powerdevil.AC = { autoSuspend.action = "nothing"; dimDisplay = { enable = true; idleTimeout = 600; }; powerButtonAction = "sleep"; powerProfile = "performance"; turnOffDisplay = { idleTimeout = 1200; idleTimeoutWhenLocked = 60; }; whenSleepingEnter = "standby"; }; spectacle.shortcuts.captureRectangularRegion = "Meta+Shift+S"; workspace = { colorScheme = "SweetAmbarBlue"; iconTheme = "Sweet-Rainbow"; lookAndFeel = "Sweet-Ambar-Blue"; soundTheme = "yorha"; wallpaperPictureOfTheDay.provider = "bing"; }; }; 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 = { command-not-found.enable = false; fish.enable = true; nh.enable = true; nix-index.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 = "${homeDir}/.config/syncthing"; dataDir = "${homeDir}/.local/share/syncthing"; openDefaultPorts = true; overrideDevices = true; overrideFolders = true; settings.devices = syncthingDevices; user = userName; }; }; sops.secrets.${usrPwdFile}.neededForUsers = true; users = { mutableUsers = false; users.${userName} = { description = "Sicheng Pan"; extraGroups = [ "audio" "dialout" "input" "networkmanager" "storage" "wheel" ]; hashedPasswordFile = config.sops.secrets.${usrPwdFile}.path; home = homeDir; isNormalUser = true; openssh.authorizedKeys.keys = publicKeys; shell = pkgs.fish; }; }; }