Reformat with alejandra

This commit is contained in:
Invariantspace 2024-08-14 11:14:20 -07:00
parent 7b2b5b3b80
commit 52a81ddb21
No known key found for this signature in database
GPG key ID: EBC4A20067373921
53 changed files with 764 additions and 746 deletions

View file

@ -1,18 +1,19 @@
{ config, pkgs, ... }:
let
{
config,
pkgs,
...
}: let
home = config.constants.homeDir;
usr = config.constants.userName;
usrPwdFile = "users/${usr}/password";
in
{
in {
console.enable = false;
fonts = {
fontDir.enable = true;
fontconfig.defaultFonts = {
sansSerif = [ "Inter" "Noto Sans CJK SC" ];
monospace = [ "Iosevka" "Noto Sans Mono CJK SC" ];
sansSerif = ["Inter" "Noto Sans CJK SC"];
monospace = ["Iosevka" "Noto Sans Mono CJK SC"];
};
packages = with pkgs; [
inter
@ -24,182 +25,209 @@ in
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; [
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
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 = {
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";
};
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" ];
};
};
xdg.enable = true;
]
++ (
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 = {
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";
};
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" ];
supportedLocales = ["all"];
};
programs = {
@ -209,12 +237,14 @@ in
services = {
openssh = {
hostKeys = [{
comment = "host@${config.networking.hostName}";
path = "/etc/ssh/host";
rounds = 100;
type = "ed25519";
}];
hostKeys = [
{
comment = "host@${config.networking.hostName}";
path = "/etc/ssh/host";
rounds = 100;
type = "ed25519";
}
];
settings = {
PasswordAuthentication = false;
KbdInteractiveAuthentication = false;