mirror of
https://github.com/moons-14/dotfiles.git
synced 2026-10-06 06:08:11 +09:00
delete
This commit is contained in:
@@ -1,26 +0,0 @@
|
||||
{
|
||||
lib,
|
||||
config,
|
||||
...
|
||||
}:
|
||||
let
|
||||
cfg = config.my.applications."1password";
|
||||
in
|
||||
{
|
||||
options.my.applications."1password" = {
|
||||
enable = lib.mkEnableOption "1Password password manager";
|
||||
};
|
||||
|
||||
config = lib.mkIf cfg.enable {
|
||||
programs._1password.enable = true;
|
||||
programs._1password-gui = {
|
||||
enable = true;
|
||||
polkitPolicyOwners = [ "moons" ];
|
||||
};
|
||||
|
||||
programs.ssh.startAgent = lib.mkForce false;
|
||||
programs.gnupg.agent.enableSSHSupport = lib.mkForce false;
|
||||
|
||||
services.gnome.gcr-ssh-agent.enable = lib.mkForce false;
|
||||
};
|
||||
}
|
||||
@@ -1,29 +0,0 @@
|
||||
{
|
||||
pkgs,
|
||||
lib,
|
||||
config,
|
||||
...
|
||||
}:
|
||||
let
|
||||
cfg = config.my.applications.arduino;
|
||||
arduinoIdeX11 = pkgs.arduino-ide.overrideAttrs (old: {
|
||||
nativeBuildInputs = (old.nativeBuildInputs or [ ]) ++ [ pkgs.makeWrapper ];
|
||||
|
||||
postFixup = (old.postFixup or "") + ''
|
||||
wrapProgram $out/bin/arduino-ide \
|
||||
--add-flags "--ozone-platform=x11"
|
||||
'';
|
||||
});
|
||||
in
|
||||
{
|
||||
options.my.applications.arduino = {
|
||||
enable = lib.mkEnableOption "Arduino development tools";
|
||||
};
|
||||
|
||||
config = lib.mkIf cfg.enable {
|
||||
environment.systemPackages = with pkgs; [
|
||||
arduino-cli # Arduino command-line interface
|
||||
arduinoIdeX11 # Arduino IDE with X11 support
|
||||
];
|
||||
};
|
||||
}
|
||||
@@ -1,23 +0,0 @@
|
||||
{
|
||||
lib,
|
||||
config,
|
||||
...
|
||||
}:
|
||||
let
|
||||
cfg = config.my.applications.btop;
|
||||
in
|
||||
{
|
||||
imports = [
|
||||
./home.nix
|
||||
./system.nix
|
||||
];
|
||||
|
||||
options.my.applications.btop = {
|
||||
enable = lib.mkEnableOption "btop system monitor";
|
||||
};
|
||||
|
||||
config = lib.mkIf cfg.enable {
|
||||
my.applications.btop.system.enable = lib.mkDefault true;
|
||||
my.applications.btop.homeManager.enable = lib.mkDefault true;
|
||||
};
|
||||
}
|
||||
@@ -1,89 +0,0 @@
|
||||
#Bashtop theme with nord palette (https://www.nordtheme.com)
|
||||
#by Justin Zobel <[email protected]>
|
||||
|
||||
# Colors should be in 6 or 2 character hexadecimal or single spaced rgb decimal: "#RRGGBB", "#BW" or "0-255 0-255 0-255"
|
||||
# example for white: "#ffffff", "#ff" or "255 255 255".
|
||||
|
||||
# All graphs and meters can be gradients
|
||||
# For single color graphs leave "mid" and "end" variable empty.
|
||||
# Use "start" and "end" variables for two color gradient
|
||||
# Use "start", "mid" and "end" for three color gradient
|
||||
|
||||
# Main background, empty for terminal default, need to be empty if you want transparent background
|
||||
theme[main_bg]="#282A36"
|
||||
|
||||
# Main text color
|
||||
theme[main_fg]="#BD93F9"
|
||||
|
||||
# Title color for boxes
|
||||
theme[title]="#f8f8f2"
|
||||
|
||||
# Higlight color for keyboard shortcuts
|
||||
theme[hi_fg]="#ff79c6"
|
||||
|
||||
# Background color of selected item in processes box
|
||||
theme[selected_bg]="#44475A"
|
||||
|
||||
# Foreground color of selected item in processes box
|
||||
theme[selected_fg]="#ECEFF4"
|
||||
|
||||
# Color of inactive/disabled text
|
||||
theme[inactive_fg]="#6272a4"
|
||||
|
||||
# Misc colors for processes box including mini cpu graphs, details memory graph and details status text
|
||||
theme[proc_misc]="#BD93F9"
|
||||
|
||||
# Cpu box outline color
|
||||
theme[cpu_box]="#ff79c6"
|
||||
|
||||
# Memory/disks box outline color
|
||||
theme[mem_box]="#ff79c6"
|
||||
|
||||
# Net up/down box outline color
|
||||
theme[net_box]="#ff79c6"
|
||||
|
||||
# Processes box outline color
|
||||
theme[proc_box]="#ff79c6"
|
||||
|
||||
# Box divider line and small boxes line color
|
||||
theme[div_line]="#ff79c6"
|
||||
|
||||
# Temperature graph colors
|
||||
theme[temp_start]="#bd93f9"
|
||||
theme[temp_mid]="#bd93f9"
|
||||
theme[temp_end]="#bd93f9"
|
||||
|
||||
# CPU graph colors
|
||||
theme[cpu_start]="#bd93f9"
|
||||
theme[cpu_mid]="#bd93f9"
|
||||
theme[cpu_end]="#bd93f9"
|
||||
|
||||
# Mem/Disk free meter
|
||||
theme[free_start]="#bd93f9"
|
||||
theme[free_mid]="#bd93f9"
|
||||
theme[free_end]="#bd93f9"
|
||||
|
||||
# Mem/Disk cached meter
|
||||
theme[cached_start]="#bd93f9"
|
||||
theme[cached_mid]="#bd93f9"
|
||||
theme[cached_end]="#bd93f9"
|
||||
|
||||
# Mem/Disk available meter
|
||||
theme[available_start]="#bd93f9"
|
||||
theme[available_mid]="#bd93f9"
|
||||
theme[available_end]="#bd93f9"
|
||||
|
||||
# Mem/Disk used meter
|
||||
theme[used_start]="#bd93f9"
|
||||
theme[used_mid]="#bd93f9"
|
||||
theme[used_end]="#bd93f9"
|
||||
|
||||
# Download graph colors
|
||||
theme[download_start]="#bd93f9"
|
||||
theme[download_mid]="#bd93f9"
|
||||
theme[download_end]="#bd93f9"
|
||||
|
||||
# Upload graph colors
|
||||
theme[upload_start]="#bd93f9"
|
||||
theme[upload_mid]="#bd93f9"
|
||||
theme[upload_end]="#bd93f9"
|
||||
@@ -1,25 +0,0 @@
|
||||
{
|
||||
lib,
|
||||
config,
|
||||
...
|
||||
}:
|
||||
let
|
||||
cfg = config.my.applications.btop.homeManager;
|
||||
in
|
||||
{
|
||||
options.my.applications.btop.homeManager = {
|
||||
enable = lib.mkEnableOption "btop home-manager configuration";
|
||||
};
|
||||
|
||||
config.home-manager.sharedModules = [
|
||||
{
|
||||
config = lib.mkIf cfg.enable {
|
||||
programs.btop = {
|
||||
enable = true;
|
||||
settings.color_theme = "dracula";
|
||||
themes.dracula = builtins.readFile ./dracula.theme;
|
||||
};
|
||||
};
|
||||
}
|
||||
];
|
||||
}
|
||||
@@ -1,20 +0,0 @@
|
||||
{
|
||||
pkgs,
|
||||
lib,
|
||||
config,
|
||||
...
|
||||
}:
|
||||
let
|
||||
cfg = config.my.applications.btop.system;
|
||||
in
|
||||
{
|
||||
options.my.applications.btop.system = {
|
||||
enable = lib.mkEnableOption "btop system configuration";
|
||||
};
|
||||
|
||||
config = lib.mkIf cfg.enable {
|
||||
environment.systemPackages = with pkgs; [
|
||||
btop # Resource monitor that shows usage and stats
|
||||
];
|
||||
};
|
||||
}
|
||||
@@ -1,44 +0,0 @@
|
||||
{
|
||||
pkgs,
|
||||
lib,
|
||||
config,
|
||||
...
|
||||
}:
|
||||
let
|
||||
cfg = config.my.applications.chrome;
|
||||
in
|
||||
{
|
||||
options.my.applications.chrome = {
|
||||
enable = lib.mkEnableOption "Google Chrome browser";
|
||||
};
|
||||
|
||||
config = lib.mkIf cfg.enable {
|
||||
home-manager.sharedModules = [
|
||||
{
|
||||
home.packages = with pkgs; [
|
||||
google-chrome # Popular web browser from Google
|
||||
];
|
||||
|
||||
xdg.desktopEntries."google-chrome" = {
|
||||
name = "Google Chrome";
|
||||
genericName = "Web Browser";
|
||||
exec = "${pkgs.google-chrome}/bin/google-chrome-stable --enable-features=TouchpadOverscrollHistoryNavigation %U";
|
||||
terminal = false;
|
||||
icon = "google-chrome";
|
||||
categories = [
|
||||
"Network"
|
||||
"WebBrowser"
|
||||
];
|
||||
startupNotify = true;
|
||||
type = "Application";
|
||||
};
|
||||
|
||||
xdg.mimeApps.defaultApplications = {
|
||||
"text/html" = "google-chrome.desktop";
|
||||
"x-scheme-handler/http" = "google-chrome.desktop";
|
||||
"x-scheme-handler/https" = "google-chrome.desktop";
|
||||
};
|
||||
}
|
||||
];
|
||||
};
|
||||
}
|
||||
@@ -1,23 +0,0 @@
|
||||
{
|
||||
lib,
|
||||
config,
|
||||
...
|
||||
}:
|
||||
let
|
||||
cfg = config.my.applications.claude;
|
||||
in
|
||||
{
|
||||
imports = [
|
||||
./home.nix
|
||||
./system.nix
|
||||
];
|
||||
|
||||
options.my.applications.claude = {
|
||||
enable = lib.mkEnableOption "Claude Code AI assistant";
|
||||
};
|
||||
|
||||
config = lib.mkIf cfg.enable {
|
||||
my.applications.claude.system.enable = lib.mkDefault true;
|
||||
my.applications.claude.homeManager.enable = lib.mkDefault true;
|
||||
};
|
||||
}
|
||||
@@ -1,27 +0,0 @@
|
||||
{
|
||||
lib,
|
||||
config,
|
||||
...
|
||||
}:
|
||||
let
|
||||
cfg = config.my.applications.claude.homeManager;
|
||||
in
|
||||
{
|
||||
options.my.applications.claude.homeManager = {
|
||||
enable = lib.mkEnableOption "Claude Code home-manager configuration";
|
||||
};
|
||||
|
||||
config.home-manager.sharedModules = [
|
||||
{
|
||||
config = lib.mkIf cfg.enable {
|
||||
home.file.".claude/settings.json".text = builtins.toJSON {
|
||||
statusLine = {
|
||||
type = "command";
|
||||
command = "bun x ccusage statusline --no-offline";
|
||||
padding = 0;
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
];
|
||||
}
|
||||
@@ -1,20 +0,0 @@
|
||||
{
|
||||
pkgs,
|
||||
lib,
|
||||
config,
|
||||
...
|
||||
}:
|
||||
let
|
||||
cfg = config.my.applications.claude.system;
|
||||
in
|
||||
{
|
||||
options.my.applications.claude.system = {
|
||||
enable = lib.mkEnableOption "Claude Code system configuration";
|
||||
};
|
||||
|
||||
config = lib.mkIf cfg.enable {
|
||||
environment.systemPackages = [
|
||||
pkgs.llm-agents.claude-code # AI coding assistant
|
||||
];
|
||||
};
|
||||
}
|
||||
@@ -1,65 +0,0 @@
|
||||
{
|
||||
inputs,
|
||||
pkgs,
|
||||
lib,
|
||||
config,
|
||||
...
|
||||
}:
|
||||
let
|
||||
cfg = config.my.applications.codexDesktop;
|
||||
codexCliPackage = pkgs.llm-agents.codex;
|
||||
codexDesktopPackage =
|
||||
inputs.codex-desktop-linux.packages.${pkgs.stdenv.hostPlatform.system}.codex-desktop-computer-use-ui;
|
||||
codexDesktopLauncher = pkgs.makeDesktopItem {
|
||||
name = "codex";
|
||||
desktopName = "Codex";
|
||||
genericName = "ChatGPT Desktop";
|
||||
comment = "Run Codex Desktop on Linux";
|
||||
exec = "env CODEX_CLI_PATH=${lib.getExe' codexCliPackage "codex"} BAMF_DESKTOP_FILE_HINT=codex.desktop CHROME_DESKTOP=codex.desktop ${lib.getExe' codexDesktopPackage "codex-desktop"} %u";
|
||||
icon = "codex-desktop";
|
||||
terminal = false;
|
||||
categories = [ "Development" ];
|
||||
keywords = [
|
||||
"codex"
|
||||
"chatgpt"
|
||||
"openai"
|
||||
"ai"
|
||||
"assistant"
|
||||
];
|
||||
startupNotify = true;
|
||||
startupWMClass = "codex-desktop";
|
||||
actions = {
|
||||
new-window = {
|
||||
name = "New Window";
|
||||
exec = "env CODEX_CLI_PATH=${lib.getExe' codexCliPackage "codex"} BAMF_DESKTOP_FILE_HINT=codex.desktop CHROME_DESKTOP=codex.desktop CODEX_MULTI_LAUNCH=1 ${lib.getExe' codexDesktopPackage "codex-desktop"} --new-instance";
|
||||
};
|
||||
};
|
||||
extraConfig = {
|
||||
X-GNOME-WMClass = "codex-desktop";
|
||||
};
|
||||
};
|
||||
in
|
||||
{
|
||||
imports = [
|
||||
inputs.codex-desktop-linux.nixosModules.default
|
||||
];
|
||||
|
||||
options.my.applications.codexDesktop = {
|
||||
enable = lib.mkEnableOption "ChatGPT Desktop for Linux";
|
||||
};
|
||||
|
||||
config = lib.mkIf cfg.enable {
|
||||
my.applications.codex.enable = true;
|
||||
|
||||
programs.codexDesktopLinux = {
|
||||
enable = true;
|
||||
package = codexDesktopPackage;
|
||||
cliPackage = codexCliPackage;
|
||||
computerUseUi.enable = true;
|
||||
};
|
||||
|
||||
environment.systemPackages = [
|
||||
codexDesktopLauncher # Vicinae-searchable Codex Desktop launcher alias
|
||||
];
|
||||
};
|
||||
}
|
||||
@@ -1,20 +0,0 @@
|
||||
{
|
||||
pkgs,
|
||||
lib,
|
||||
config,
|
||||
...
|
||||
}:
|
||||
let
|
||||
cfg = config.my.applications.codex;
|
||||
in
|
||||
{
|
||||
options.my.applications.codex = {
|
||||
enable = lib.mkEnableOption "Codex AI coding assistant";
|
||||
};
|
||||
|
||||
config = lib.mkIf cfg.enable {
|
||||
environment.systemPackages = [
|
||||
pkgs.llm-agents.codex # OpenAI Codex CLI
|
||||
];
|
||||
};
|
||||
}
|
||||
@@ -1,47 +0,0 @@
|
||||
{
|
||||
imports = [
|
||||
./1password.nix
|
||||
./arduino.nix
|
||||
./btop
|
||||
./chrome.nix
|
||||
./claude
|
||||
./codex-desktop.nix
|
||||
./codex.nix
|
||||
./direnv.nix
|
||||
./discord.nix
|
||||
./docker.nix
|
||||
./fcitx5
|
||||
./ghostty
|
||||
./git
|
||||
./gnupg
|
||||
./grok.nix
|
||||
./gnome.nix
|
||||
./greetd.nix
|
||||
./ly
|
||||
./gtk
|
||||
./java
|
||||
./kde.nix
|
||||
./nautilus.nix
|
||||
./nh.nix
|
||||
./niri
|
||||
./nix-index
|
||||
./noctalia
|
||||
./opencode.nix
|
||||
./openssh.nix
|
||||
./slack.nix
|
||||
./ssh
|
||||
./swayidle.nix
|
||||
./swaylock
|
||||
./tailscale.nix
|
||||
./vicinae.nix
|
||||
./vim
|
||||
./vscode
|
||||
./wayland.nix
|
||||
./yazi.nix
|
||||
./zed
|
||||
./zellij
|
||||
./zoom.nix
|
||||
./zoxide.nix
|
||||
./zsh
|
||||
];
|
||||
}
|
||||
@@ -1,16 +0,0 @@
|
||||
{ lib, config, ... }:
|
||||
let
|
||||
cfg = config.my.applications.direnv;
|
||||
in
|
||||
{
|
||||
options.my.applications.direnv = {
|
||||
enable = lib.mkEnableOption "direnv environment variable manager";
|
||||
};
|
||||
|
||||
config = lib.mkIf cfg.enable {
|
||||
programs.direnv = {
|
||||
enable = true;
|
||||
nix-direnv.enable = true;
|
||||
};
|
||||
};
|
||||
}
|
||||
@@ -1,23 +0,0 @@
|
||||
{
|
||||
lib,
|
||||
config,
|
||||
...
|
||||
}:
|
||||
let
|
||||
cfg = config.my.applications.discord;
|
||||
in
|
||||
{
|
||||
options.my.applications.discord = {
|
||||
enable = lib.mkEnableOption "Discord (Vesktop)";
|
||||
};
|
||||
|
||||
config = lib.mkIf cfg.enable {
|
||||
home-manager.sharedModules = [
|
||||
{
|
||||
programs.vesktop = {
|
||||
enable = true;
|
||||
};
|
||||
}
|
||||
];
|
||||
};
|
||||
}
|
||||
@@ -1,34 +0,0 @@
|
||||
{
|
||||
pkgs,
|
||||
lib,
|
||||
config,
|
||||
...
|
||||
}:
|
||||
let
|
||||
cfg = config.my.applications.docker;
|
||||
in
|
||||
{
|
||||
options.my.applications.docker = {
|
||||
enable = lib.mkEnableOption "Docker container runtime";
|
||||
};
|
||||
|
||||
config = lib.mkIf cfg.enable {
|
||||
virtualisation.docker = {
|
||||
enable = true;
|
||||
autoPrune = {
|
||||
enable = true;
|
||||
dates = "weekly";
|
||||
};
|
||||
daemon.settings = {
|
||||
ipv6 = true;
|
||||
"fixed-cidr-v6" = "fd00:30::/64";
|
||||
ip6tables = true;
|
||||
};
|
||||
};
|
||||
|
||||
environment.systemPackages = with pkgs; [
|
||||
docker # Container runtime
|
||||
oxker # Docker TUI Tool
|
||||
];
|
||||
};
|
||||
}
|
||||
@@ -1,69 +0,0 @@
|
||||
[Hotkey]
|
||||
# トリガーキーを押すたびに切り替える
|
||||
EnumerateWithTriggerKeys=False
|
||||
# 一時的に第1入力メソッドに切り替える
|
||||
AltTriggerKeys=
|
||||
# 切り替え時は第1入力メソッドをスキップする
|
||||
EnumerateSkipFirst=False
|
||||
# Time limit in milliseconds for triggering modifier key shortcuts
|
||||
ModifierOnlyKeyTimeout=250
|
||||
|
||||
[Hotkey/TriggerKeys]
|
||||
1=Zenkaku_Hankaku
|
||||
|
||||
[Hotkey/ActivateKeys]
|
||||
0=Henkan
|
||||
|
||||
[Hotkey/DeactivateKeys]
|
||||
0=Muhenkan
|
||||
|
||||
[Hotkey/PrevPage]
|
||||
0=Up
|
||||
|
||||
[Hotkey/NextPage]
|
||||
0=Down
|
||||
|
||||
[Hotkey/PrevCandidate]
|
||||
0=Shift+Tab
|
||||
|
||||
[Hotkey/NextCandidate]
|
||||
0=Tab
|
||||
|
||||
[Hotkey/TogglePreedit]
|
||||
0=Control+Alt+P
|
||||
|
||||
[Behavior]
|
||||
# デフォルトで有効にする
|
||||
ActiveByDefault=False
|
||||
# フォーカス時に状態をリセット
|
||||
resetStateWhenFocusIn=No
|
||||
# 入力状態を共有する
|
||||
ShareInputState=No
|
||||
# アプリケーションにプリエディットを表示する
|
||||
PreeditEnabledByDefault=True
|
||||
# 入力メソッドを切り替える際に入力メソッドの情報を表示する
|
||||
ShowInputMethodInformation=True
|
||||
# フォーカスを変更する際に入力メソッドの情報を表示する
|
||||
showInputMethodInformationWhenFocusIn=False
|
||||
# 入力メソッドの情報をコンパクトに表示する
|
||||
CompactInputMethodInformation=True
|
||||
# 第1入力メソッドの情報を表示する
|
||||
ShowFirstInputMethodInformation=True
|
||||
# デフォルトのページサイズ
|
||||
DefaultPageSize=5
|
||||
# XKB オプションより優先する
|
||||
OverrideXkbOption=False
|
||||
# カスタム XKB オプション
|
||||
CustomXkbOption=
|
||||
# Force Enabled Addons
|
||||
EnabledAddons=
|
||||
# Force Disabled Addons
|
||||
DisabledAddons=
|
||||
# Preload input method to be used by default
|
||||
PreloadInputMethod=True
|
||||
# パスワード欄に入力メソッドを許可する
|
||||
AllowInputMethodForPassword=False
|
||||
# パスワード入力時にプリエディットテキストを表示する
|
||||
ShowPreeditForPassword=False
|
||||
# ユーザーデータを保存する間隔(分)
|
||||
AutoSavePeriod=30
|
||||
@@ -1,23 +0,0 @@
|
||||
{
|
||||
lib,
|
||||
config,
|
||||
...
|
||||
}:
|
||||
let
|
||||
cfg = config.my.applications.fcitx5;
|
||||
in
|
||||
{
|
||||
imports = [
|
||||
./home.nix
|
||||
./system.nix
|
||||
];
|
||||
|
||||
options.my.applications.fcitx5 = {
|
||||
enable = lib.mkEnableOption "fcitx5 input method";
|
||||
};
|
||||
|
||||
config = lib.mkIf cfg.enable {
|
||||
my.applications.fcitx5.system.enable = lib.mkDefault true;
|
||||
my.applications.fcitx5.homeManager.enable = lib.mkDefault true;
|
||||
};
|
||||
}
|
||||
@@ -1,24 +0,0 @@
|
||||
{
|
||||
lib,
|
||||
config,
|
||||
...
|
||||
}:
|
||||
let
|
||||
cfg = config.my.applications.fcitx5.homeManager;
|
||||
in
|
||||
{
|
||||
options.my.applications.fcitx5.homeManager = {
|
||||
enable = lib.mkEnableOption "fcitx5 home-manager configuration";
|
||||
};
|
||||
|
||||
config.home-manager.sharedModules = [
|
||||
{
|
||||
config = lib.mkIf cfg.enable {
|
||||
home.file.".config/fcitx5/config" = {
|
||||
recursive = true;
|
||||
source = ./config;
|
||||
};
|
||||
};
|
||||
}
|
||||
];
|
||||
}
|
||||
@@ -1,68 +0,0 @@
|
||||
{
|
||||
pkgs,
|
||||
lib,
|
||||
config,
|
||||
inputs,
|
||||
...
|
||||
}:
|
||||
let
|
||||
system = pkgs.stdenv.hostPlatform.system;
|
||||
|
||||
cfg = config.my.applications.fcitx5.system;
|
||||
in
|
||||
{
|
||||
options.my.applications.fcitx5.system = {
|
||||
enable = lib.mkEnableOption "fcitx5 system configuration";
|
||||
};
|
||||
|
||||
imports = [
|
||||
inputs.nix-hazkey.nixosModules.hazkey
|
||||
];
|
||||
|
||||
config = lib.mkIf cfg.enable {
|
||||
|
||||
services.hazkey = {
|
||||
enable = true;
|
||||
server.package = inputs.nix-hazkey.packages.${system}.hazkey-server.override {
|
||||
enableVulkan = true;
|
||||
};
|
||||
installHazkeySettings = false;
|
||||
installFcitx5Addon = false;
|
||||
};
|
||||
|
||||
environment.systemPackages = [ inputs.nix-hazkey.packages.${system}.hazkey-settings ];
|
||||
|
||||
i18n.inputMethod = {
|
||||
enable = true;
|
||||
type = "fcitx5";
|
||||
fcitx5 = {
|
||||
waylandFrontend = true;
|
||||
addons = with pkgs; [
|
||||
inputs.nix-hazkey.packages.${system}.fcitx5-hazkey
|
||||
fcitx5-mozc-ut
|
||||
fcitx5-gtk
|
||||
kdePackages.fcitx5-qt
|
||||
qt6Packages.fcitx5-configtool
|
||||
];
|
||||
settings.inputMethod = {
|
||||
GroupOrder = {
|
||||
"0" = "Default";
|
||||
};
|
||||
"Groups/0" = {
|
||||
Name = "Default";
|
||||
"Default Layout" = "jp";
|
||||
DefaultIM = "mozc";
|
||||
};
|
||||
"Groups/0/Items/0" = {
|
||||
Name = "keyboard-jp";
|
||||
Layout = "";
|
||||
};
|
||||
"Groups/0/Items/1" = {
|
||||
Name = "mozc";
|
||||
Layout = "";
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
@@ -1,40 +0,0 @@
|
||||
theme = dracula
|
||||
background-blur-radius = 20
|
||||
background-opacity = 0.9
|
||||
font-family = BlexMono Nerd Font Mono
|
||||
mouse-hide-while-typing = true
|
||||
window-decoration = true
|
||||
|
||||
|
||||
# keybind
|
||||
|
||||
# Copy/Paste
|
||||
keybind = performable:ctrl+shift+c=copy_to_clipboard
|
||||
keybind = ctrl+shift+v=paste_from_clipboard
|
||||
|
||||
# create new tab
|
||||
keybind = ctrl+shift+t=new_tab
|
||||
|
||||
# move tabs
|
||||
keybind = ctrl+alt+left_bracket=previous_tab
|
||||
keybind = ctrl+alt+right_bracket=next_tab
|
||||
|
||||
# close tab
|
||||
keybind = ctrl+alt+q=close_window
|
||||
|
||||
# font size
|
||||
keybind = ctrl+shift+semicolon=increase_font_size:1
|
||||
keybind = ctrl+shift+minus=increase_font_size:1
|
||||
|
||||
|
||||
# quick terminal
|
||||
keybind = global:super+space=toggle_quick_terminal
|
||||
quick-terminal-position = top
|
||||
quick-terminal-size = 100%
|
||||
gtk-quick-terminal-layer = overlay
|
||||
quick-terminal-keyboard-interactivity = exclusive
|
||||
quick-terminal-autohide = false
|
||||
quit-after-last-window-closed = false
|
||||
|
||||
shell-integration-features = ssh-terminfo,ssh-env
|
||||
|
||||
@@ -1,23 +0,0 @@
|
||||
{
|
||||
lib,
|
||||
config,
|
||||
...
|
||||
}:
|
||||
let
|
||||
cfg = config.my.applications.ghostty;
|
||||
in
|
||||
{
|
||||
imports = [
|
||||
./home.nix
|
||||
./system.nix
|
||||
];
|
||||
|
||||
options.my.applications.ghostty = {
|
||||
enable = lib.mkEnableOption "ghostty terminal emulator";
|
||||
};
|
||||
|
||||
config = lib.mkIf cfg.enable {
|
||||
my.applications.ghostty.system.enable = lib.mkDefault true;
|
||||
my.applications.ghostty.homeManager.enable = lib.mkDefault true;
|
||||
};
|
||||
}
|
||||
@@ -1,45 +0,0 @@
|
||||
# MIT License
|
||||
#
|
||||
# Copyright (c) 2023 Dracula Theme
|
||||
#
|
||||
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
# of this software and associated documentation files (the "Software"), to deal
|
||||
# in the Software without restriction, including without limitation the rights
|
||||
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
# copies of the Software, and to permit persons to whom the Software is
|
||||
# furnished to do so, subject to the following conditions:
|
||||
#
|
||||
# The above copyright notice and this permission notice shall be included in all
|
||||
# copies or substantial portions of the Software.
|
||||
#
|
||||
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
# SOFTWARE.
|
||||
|
||||
palette = 0=#21222c
|
||||
palette = 1=#ff5555
|
||||
palette = 2=#50fa7b
|
||||
palette = 3=#f1fa8c
|
||||
palette = 4=#bd93f9
|
||||
palette = 5=#ff79c6
|
||||
palette = 6=#8be9fd
|
||||
palette = 7=#f8f8f2
|
||||
palette = 8=#6272a4
|
||||
palette = 9=#ff6e6e
|
||||
palette = 10=#69ff94
|
||||
palette = 11=#ffffa5
|
||||
palette = 12=#d6acff
|
||||
palette = 13=#ff92df
|
||||
palette = 14=#a4ffff
|
||||
palette = 15=#ffffff
|
||||
background = #282a36
|
||||
foreground = #f8f8f2
|
||||
cursor-color = #f8f8f2
|
||||
cursor-text = #282a36
|
||||
selection-foreground = #f8f8f2
|
||||
selection-background = #44475a
|
||||
|
||||
@@ -1,83 +0,0 @@
|
||||
{
|
||||
pkgs,
|
||||
lib,
|
||||
config,
|
||||
inputs,
|
||||
...
|
||||
}:
|
||||
let
|
||||
cfg = config.my.applications.ghostty.homeManager;
|
||||
|
||||
system = pkgs.stdenv.hostPlatform.system;
|
||||
|
||||
ghosttyPkg = inputs.ghostty.packages.${system}.ghostty-releasefast;
|
||||
in
|
||||
{
|
||||
options.my.applications.ghostty.homeManager = {
|
||||
enable = lib.mkEnableOption "ghostty home-manager configuration";
|
||||
};
|
||||
|
||||
config.home-manager.sharedModules = [
|
||||
(
|
||||
{ lib, ... }:
|
||||
{
|
||||
config = lib.mkIf cfg.enable {
|
||||
programs.ghostty = {
|
||||
enable = true;
|
||||
|
||||
package = ghosttyPkg;
|
||||
|
||||
systemd.enable = true;
|
||||
|
||||
settings = {
|
||||
theme = "dracula";
|
||||
|
||||
background-blur-radius = 20;
|
||||
background-opacity = 0.9;
|
||||
|
||||
font-family = "BlexMono Nerd Font Mono";
|
||||
|
||||
mouse-hide-while-typing = true;
|
||||
|
||||
window-decoration = "auto";
|
||||
|
||||
keybind = [
|
||||
# Copy/Paste
|
||||
"performable:ctrl+shift+c=copy_to_clipboard"
|
||||
"ctrl+shift+v=paste_from_clipboard"
|
||||
|
||||
# Create new tab
|
||||
"ctrl+shift+t=new_tab"
|
||||
|
||||
# Move tabs
|
||||
"ctrl+alt+left_bracket=previous_tab"
|
||||
"ctrl+alt+right_bracket=next_tab"
|
||||
|
||||
# Close window
|
||||
"ctrl+alt+q=close_window"
|
||||
|
||||
# Font size
|
||||
"ctrl+shift+semicolon=increase_font_size:1"
|
||||
"ctrl+shift+minus=decrease_font_size:1"
|
||||
];
|
||||
|
||||
# Quick terminal
|
||||
quick-terminal-position = "top";
|
||||
quick-terminal-size = "98%,100%";
|
||||
|
||||
quick-terminal-autohide = false;
|
||||
quick-terminal-keyboard-interactivity = "on-demand";
|
||||
gtk-quick-terminal-layer = "top";
|
||||
|
||||
quit-after-last-window-closed = false;
|
||||
|
||||
shell-integration-features = "no-ssh-env,no-ssh-terminfo";
|
||||
};
|
||||
};
|
||||
|
||||
xdg.configFile."ghostty/themes/dracula".source = ./dracula.theme;
|
||||
};
|
||||
}
|
||||
)
|
||||
];
|
||||
}
|
||||
@@ -1,26 +0,0 @@
|
||||
{
|
||||
pkgs,
|
||||
lib,
|
||||
config,
|
||||
inputs,
|
||||
...
|
||||
}:
|
||||
let
|
||||
cfg = config.my.applications.ghostty.system;
|
||||
|
||||
system = pkgs.stdenv.hostPlatform.system;
|
||||
|
||||
ghosttyPkg = inputs.ghostty.packages.${system}.ghostty-releasefast;
|
||||
in
|
||||
{
|
||||
options.my.applications.ghostty.system = {
|
||||
enable = lib.mkEnableOption "ghostty system configuration";
|
||||
};
|
||||
|
||||
config = lib.mkIf cfg.enable {
|
||||
environment.systemPackages = [
|
||||
ghosttyPkg # A fast and minimal terminal emulator for Wayland
|
||||
ghosttyPkg.terminfo # Terminfo database for ghostty
|
||||
];
|
||||
};
|
||||
}
|
||||
@@ -1,35 +0,0 @@
|
||||
{
|
||||
lib,
|
||||
config,
|
||||
...
|
||||
}:
|
||||
let
|
||||
cfg = config.my.applications.git;
|
||||
in
|
||||
{
|
||||
imports = [
|
||||
./home.nix
|
||||
./system.nix
|
||||
];
|
||||
|
||||
options.my.applications.git = {
|
||||
enable = lib.mkEnableOption "git version control";
|
||||
|
||||
userName = lib.mkOption {
|
||||
type = lib.types.singleLineStr;
|
||||
default = "moons";
|
||||
description = "Default Git user.name.";
|
||||
};
|
||||
|
||||
userEmail = lib.mkOption {
|
||||
type = lib.types.singleLineStr;
|
||||
default = "moons@moons14.com";
|
||||
description = "Default Git user.email.";
|
||||
};
|
||||
};
|
||||
|
||||
config = lib.mkIf cfg.enable {
|
||||
my.applications.git.system.enable = lib.mkDefault true;
|
||||
my.applications.git.homeManager.enable = lib.mkDefault true;
|
||||
};
|
||||
}
|
||||
@@ -1,111 +0,0 @@
|
||||
{
|
||||
pkgs,
|
||||
lib,
|
||||
config,
|
||||
...
|
||||
}:
|
||||
let
|
||||
cfg = config.my.applications.git;
|
||||
hmCfg = config.my.applications.git.homeManager;
|
||||
|
||||
signingKeyPath = ".ssh/1password-git-signing.pub";
|
||||
signingKeyFile = "~/${signingKeyPath}";
|
||||
|
||||
gitSshSign = pkgs.writeShellScript "git-ssh-sign" ''
|
||||
one_password_sock="$HOME/.1password/agent.sock"
|
||||
|
||||
if { [ -n "''${SSH_CONNECTION:-}" ] || [ -n "''${SSH_CLIENT:-}" ]; } \
|
||||
&& [ -n "''${SSH_AUTH_SOCK:-}" ] \
|
||||
&& [ -S "$SSH_AUTH_SOCK" ]; then
|
||||
exec ${pkgs.openssh}/bin/ssh-keygen "$@"
|
||||
fi
|
||||
|
||||
if [ -S "$one_password_sock" ]; then
|
||||
export SSH_AUTH_SOCK="$one_password_sock"
|
||||
exec ${pkgs.openssh}/bin/ssh-keygen "$@"
|
||||
fi
|
||||
|
||||
if [ -n "''${SSH_AUTH_SOCK:-}" ] && [ -S "$SSH_AUTH_SOCK" ]; then
|
||||
exec ${pkgs.openssh}/bin/ssh-keygen "$@"
|
||||
fi
|
||||
|
||||
echo "git ssh signing failed: no forwarded SSH agent or 1Password agent socket found" >&2
|
||||
echo "expected: forwarded SSH_AUTH_SOCK or $one_password_sock" >&2
|
||||
exit 1
|
||||
'';
|
||||
in
|
||||
{
|
||||
options.my.applications.git.homeManager = {
|
||||
enable = lib.mkEnableOption "git home-manager configuration";
|
||||
|
||||
signingPublicKey = lib.mkOption {
|
||||
type = lib.types.nullOr lib.types.singleLineStr;
|
||||
default = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIPLwReAiwhXoO34S2+MrvqUhi8IWp4IzUq4OSp3niJdq 1password-git-signing";
|
||||
example = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIPLwReAiwhXoO34S2+MrvqUhi8IWp4IzUq4OSp3niJdq 1password-git-signing";
|
||||
description = "SSH public key copied from the 1Password SSH key item used for Git signing.";
|
||||
};
|
||||
|
||||
signingKey = lib.mkOption {
|
||||
type = lib.types.str;
|
||||
default = signingKeyFile;
|
||||
readOnly = true;
|
||||
description = "SSH public key path used for Git commit and tag signing.";
|
||||
};
|
||||
};
|
||||
|
||||
config = lib.mkIf hmCfg.enable {
|
||||
assertions = [
|
||||
{
|
||||
assertion = hmCfg.signingPublicKey != null && hmCfg.signingPublicKey != "";
|
||||
message = "my.applications.git.homeManager.signingPublicKey must be set to the public key copied from 1Password.";
|
||||
}
|
||||
];
|
||||
|
||||
home-manager.sharedModules = [
|
||||
{
|
||||
home.file.${signingKeyPath}.text = hmCfg.signingPublicKey + "\n";
|
||||
|
||||
programs.git = {
|
||||
enable = true;
|
||||
|
||||
ignores = [
|
||||
".direnv/"
|
||||
".envrc"
|
||||
"!.envrc.example"
|
||||
];
|
||||
|
||||
signing = {
|
||||
key = hmCfg.signingKey;
|
||||
format = "ssh";
|
||||
signByDefault = true;
|
||||
};
|
||||
|
||||
settings = {
|
||||
user.name = cfg.userName;
|
||||
user.email = cfg.userEmail;
|
||||
|
||||
push.default = "simple";
|
||||
credential.helper = "cache --timeout=7200";
|
||||
init.defaultBranch = "main";
|
||||
log.decorate = "full";
|
||||
log.date = "iso";
|
||||
merge.conflictStyle = "diff3";
|
||||
|
||||
gpg.ssh.program = "${gitSshSign}";
|
||||
|
||||
alias = {
|
||||
br = "branch --sort=-committerdate";
|
||||
co = "checkout";
|
||||
df = "diff";
|
||||
com = "commit -a";
|
||||
gs = "stash";
|
||||
gp = "pull";
|
||||
lg = "log --graph --pretty=format:'%Cred%h%Creset - %C(yellow)%d%Creset %s %C(green)(%cr)%C(bold blue) <%an>%Creset' --abbrev-commit";
|
||||
st = "status";
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
];
|
||||
};
|
||||
}
|
||||
@@ -1,21 +0,0 @@
|
||||
{
|
||||
pkgs,
|
||||
lib,
|
||||
config,
|
||||
...
|
||||
}:
|
||||
let
|
||||
cfg = config.my.applications.git.system;
|
||||
in
|
||||
{
|
||||
options.my.applications.git.system = {
|
||||
enable = lib.mkEnableOption "git system configuration";
|
||||
};
|
||||
|
||||
config = lib.mkIf cfg.enable {
|
||||
environment.systemPackages = with pkgs; [
|
||||
git # Distributed version control system
|
||||
gh # GitHub CLI
|
||||
];
|
||||
};
|
||||
}
|
||||
@@ -1,94 +0,0 @@
|
||||
{
|
||||
pkgs,
|
||||
lib,
|
||||
config,
|
||||
...
|
||||
}:
|
||||
let
|
||||
cfg = config.my.applications.gnome;
|
||||
in
|
||||
{
|
||||
options.my.applications.gnome = {
|
||||
enable = lib.mkEnableOption "GNOME desktop environment";
|
||||
};
|
||||
|
||||
config = lib.mkIf cfg.enable {
|
||||
services.desktopManager.gnome.enable = true;
|
||||
|
||||
# ly is the display manager for switching between installed sessions.
|
||||
services.displayManager.gdm.enable = lib.mkForce false;
|
||||
|
||||
home-manager.sharedModules = [
|
||||
{
|
||||
dconf.settings = {
|
||||
"org/gnome/desktop/sound" = {
|
||||
event-sounds = false;
|
||||
input-feedback-sounds = false;
|
||||
};
|
||||
|
||||
"org/gnome/desktop/wm/keybindings" = {
|
||||
close = [ "<Super>q" ];
|
||||
show-desktop = [ ];
|
||||
};
|
||||
|
||||
"org/gnome/settings-daemon/plugins/media-keys" = {
|
||||
home = [ ];
|
||||
screensaver = [ "<Super>l" ];
|
||||
custom-keybindings = [
|
||||
"/org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/custom0/"
|
||||
"/org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/custom1/"
|
||||
"/org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/custom2/"
|
||||
"/org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/custom3/"
|
||||
"/org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/custom4/"
|
||||
];
|
||||
};
|
||||
|
||||
"org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/custom0" = {
|
||||
name = "Open Terminal";
|
||||
command = "ghostty";
|
||||
binding = "<Super>t";
|
||||
};
|
||||
|
||||
"org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/custom1" = {
|
||||
name = "Run Application";
|
||||
command = "vicinae toggle";
|
||||
binding = "<Super>d";
|
||||
};
|
||||
|
||||
"org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/custom2" = {
|
||||
name = "Open File Manager";
|
||||
command = "nautilus --new-window";
|
||||
binding = "<Super>e";
|
||||
};
|
||||
|
||||
"org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/custom3" = {
|
||||
name = "Clipboard History";
|
||||
command = "vicinae vicinae://extensions/vicinae/clipboard/history";
|
||||
binding = "<Super>v";
|
||||
};
|
||||
|
||||
"org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/custom4" = {
|
||||
name = "Log Out";
|
||||
command = "gnome-session-quit --logout --no-prompt";
|
||||
binding = "<Super><Shift>e";
|
||||
};
|
||||
|
||||
"org/gnome/shell" = {
|
||||
favorite-apps = [
|
||||
"google-chrome.desktop"
|
||||
"code.desktop"
|
||||
"com.mitchellh.ghostty.desktop"
|
||||
"slack.desktop"
|
||||
"vesktop.desktop"
|
||||
];
|
||||
};
|
||||
};
|
||||
}
|
||||
];
|
||||
|
||||
environment.systemPackages = with pkgs; [
|
||||
gnome-tweaks # GNOME desktop customization tool
|
||||
gnome-extension-manager # GNOME Shell extension manager
|
||||
];
|
||||
};
|
||||
}
|
||||
@@ -1,23 +0,0 @@
|
||||
{
|
||||
lib,
|
||||
config,
|
||||
...
|
||||
}:
|
||||
let
|
||||
cfg = config.my.applications.gnupg;
|
||||
in
|
||||
{
|
||||
imports = [
|
||||
./home.nix
|
||||
./system.nix
|
||||
];
|
||||
|
||||
options.my.applications.gnupg = {
|
||||
enable = lib.mkEnableOption "GnuPG agent";
|
||||
};
|
||||
|
||||
config = lib.mkIf cfg.enable {
|
||||
my.applications.gnupg.system.enable = lib.mkDefault true;
|
||||
my.applications.gnupg.homeManager.enable = lib.mkDefault true;
|
||||
};
|
||||
}
|
||||
@@ -1,22 +0,0 @@
|
||||
{
|
||||
lib,
|
||||
config,
|
||||
...
|
||||
}:
|
||||
let
|
||||
hmCfg = config.my.applications.gnupg.homeManager;
|
||||
in
|
||||
{
|
||||
options.my.applications.gnupg.homeManager = {
|
||||
enable = lib.mkEnableOption "GnuPG home-manager configuration";
|
||||
};
|
||||
|
||||
config.home-manager.sharedModules = [
|
||||
{
|
||||
config = lib.mkIf hmCfg.enable {
|
||||
services.gpg-agent.enable = false;
|
||||
services.gpg-agent.enableSshSupport = false;
|
||||
};
|
||||
}
|
||||
];
|
||||
}
|
||||
@@ -1,20 +0,0 @@
|
||||
{
|
||||
lib,
|
||||
config,
|
||||
...
|
||||
}:
|
||||
let
|
||||
cfg = config.my.applications.gnupg.system;
|
||||
in
|
||||
{
|
||||
options.my.applications.gnupg.system = {
|
||||
enable = lib.mkEnableOption "GnuPG system configuration";
|
||||
};
|
||||
|
||||
config = lib.mkIf cfg.enable {
|
||||
programs.gnupg.agent = {
|
||||
enable = true;
|
||||
enableSSHSupport = false;
|
||||
};
|
||||
};
|
||||
}
|
||||
@@ -1,26 +0,0 @@
|
||||
{
|
||||
pkgs,
|
||||
lib,
|
||||
config,
|
||||
...
|
||||
}:
|
||||
let
|
||||
cfg = config.my.applications.greetd;
|
||||
in
|
||||
{
|
||||
options.my.applications.greetd = {
|
||||
enable = lib.mkEnableOption "greetd login manager";
|
||||
};
|
||||
|
||||
config = lib.mkIf cfg.enable {
|
||||
services.greetd = {
|
||||
enable = true;
|
||||
settings = {
|
||||
default_session = {
|
||||
user = "greeter";
|
||||
command = "${pkgs.tuigreet}/bin/tuigreet --time --remember --cmd niri-session";
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
@@ -1,24 +0,0 @@
|
||||
{
|
||||
pkgs,
|
||||
lib,
|
||||
config,
|
||||
...
|
||||
}:
|
||||
let
|
||||
cfg = config.my.applications.grok;
|
||||
|
||||
grok = pkgs.llm-agents.grok.overrideAttrs (_old: {
|
||||
versionCheckProgram = "${placeholder "out"}/libexec/grok/grok-launcher";
|
||||
});
|
||||
in
|
||||
{
|
||||
options.my.applications.grok = {
|
||||
enable = lib.mkEnableOption "Grok AI assistant";
|
||||
};
|
||||
|
||||
config = lib.mkIf cfg.enable {
|
||||
environment.systemPackages = [
|
||||
grok
|
||||
];
|
||||
};
|
||||
}
|
||||
@@ -1,23 +0,0 @@
|
||||
{
|
||||
lib,
|
||||
config,
|
||||
...
|
||||
}:
|
||||
let
|
||||
cfg = config.my.applications.gtk;
|
||||
in
|
||||
{
|
||||
imports = [
|
||||
./home.nix
|
||||
./system.nix
|
||||
];
|
||||
|
||||
options.my.applications.gtk = {
|
||||
enable = lib.mkEnableOption "GTK theme configuration";
|
||||
};
|
||||
|
||||
config = lib.mkIf cfg.enable {
|
||||
my.applications.gtk.system.enable = lib.mkDefault true;
|
||||
my.applications.gtk.homeManager.enable = lib.mkDefault true;
|
||||
};
|
||||
}
|
||||
@@ -1,36 +0,0 @@
|
||||
{
|
||||
pkgs,
|
||||
lib,
|
||||
config,
|
||||
...
|
||||
}:
|
||||
let
|
||||
cfg = config.my.applications.gtk.homeManager;
|
||||
in
|
||||
{
|
||||
options.my.applications.gtk.homeManager = {
|
||||
enable = lib.mkEnableOption "GTK home-manager configuration";
|
||||
};
|
||||
|
||||
config.home-manager.sharedModules = [
|
||||
{
|
||||
config = lib.mkIf cfg.enable {
|
||||
gtk = {
|
||||
enable = true;
|
||||
theme = {
|
||||
name = "Dracula";
|
||||
package = pkgs.dracula-theme;
|
||||
};
|
||||
cursorTheme = {
|
||||
package = pkgs.adwaita-icon-theme;
|
||||
name = "Adwaita";
|
||||
};
|
||||
iconTheme = {
|
||||
package = pkgs.papirus-icon-theme;
|
||||
name = "Papirus-Dark";
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
];
|
||||
}
|
||||
@@ -1,20 +0,0 @@
|
||||
{
|
||||
lib,
|
||||
config,
|
||||
...
|
||||
}:
|
||||
let
|
||||
cfg = config.my.applications.gtk.system;
|
||||
in
|
||||
{
|
||||
options.my.applications.gtk.system = {
|
||||
enable = lib.mkEnableOption "GTK system configuration";
|
||||
};
|
||||
|
||||
config = lib.mkIf cfg.enable {
|
||||
programs.dconf.enable = true;
|
||||
programs.seahorse.enable = true;
|
||||
|
||||
services.gnome.gnome-keyring.enable = true;
|
||||
};
|
||||
}
|
||||
@@ -1,23 +0,0 @@
|
||||
{
|
||||
lib,
|
||||
config,
|
||||
...
|
||||
}:
|
||||
let
|
||||
cfg = config.my.applications.java;
|
||||
in
|
||||
{
|
||||
imports = [
|
||||
./home.nix
|
||||
./system.nix
|
||||
];
|
||||
|
||||
options.my.applications.java = {
|
||||
enable = lib.mkEnableOption "Java runtime";
|
||||
};
|
||||
|
||||
config = lib.mkIf cfg.enable {
|
||||
my.applications.java.system.enable = lib.mkDefault true;
|
||||
my.applications.java.homeManager.enable = lib.mkDefault true;
|
||||
};
|
||||
}
|
||||
@@ -1,23 +0,0 @@
|
||||
{
|
||||
lib,
|
||||
config,
|
||||
...
|
||||
}:
|
||||
let
|
||||
cfg = config.my.applications.java.homeManager;
|
||||
in
|
||||
{
|
||||
options.my.applications.java.homeManager = {
|
||||
enable = lib.mkEnableOption "Java home-manager configuration";
|
||||
};
|
||||
|
||||
config.home-manager.sharedModules = [
|
||||
{
|
||||
config = lib.mkIf cfg.enable {
|
||||
programs.java = {
|
||||
enable = true;
|
||||
};
|
||||
};
|
||||
}
|
||||
];
|
||||
}
|
||||
@@ -1,27 +0,0 @@
|
||||
{
|
||||
pkgs,
|
||||
lib,
|
||||
config,
|
||||
...
|
||||
}:
|
||||
let
|
||||
cfg = config.my.applications.java.system;
|
||||
in
|
||||
{
|
||||
options.my.applications.java.system = {
|
||||
enable = lib.mkEnableOption "Java system configuration";
|
||||
};
|
||||
|
||||
config = lib.mkIf cfg.enable {
|
||||
programs.java = {
|
||||
enable = true;
|
||||
package = pkgs.jdk25;
|
||||
};
|
||||
|
||||
environment.systemPackages = with pkgs; [
|
||||
jdk25 # Java Development Kit 25
|
||||
maven # Java Build Tool
|
||||
gradle # Java Build Tool
|
||||
];
|
||||
};
|
||||
}
|
||||
@@ -1,19 +0,0 @@
|
||||
{
|
||||
lib,
|
||||
config,
|
||||
...
|
||||
}:
|
||||
let
|
||||
cfg = config.my.applications.kde;
|
||||
in
|
||||
{
|
||||
options.my.applications.kde = {
|
||||
enable = lib.mkEnableOption "KDE Connect";
|
||||
};
|
||||
|
||||
config = lib.mkIf cfg.enable {
|
||||
programs.kdeconnect = {
|
||||
enable = true;
|
||||
};
|
||||
};
|
||||
}
|
||||
@@ -1,36 +0,0 @@
|
||||
{
|
||||
lib,
|
||||
config,
|
||||
pkgs,
|
||||
...
|
||||
}:
|
||||
let
|
||||
cfg = config.my.applications.ly;
|
||||
indyzLinuxfire = pkgs.fetchurl {
|
||||
url = "https://codeberg.org/attachments/f336d6ac-8331-4323-91fc-0e4619803401";
|
||||
hash = "sha256-fRm0wlkq9/GdLrVBOzMEnQG/i2ng+uGIzq0u9hu3m9g=";
|
||||
};
|
||||
in
|
||||
{
|
||||
options.my.applications.ly = {
|
||||
enable = lib.mkEnableOption "ly TUI display manager";
|
||||
};
|
||||
|
||||
config = lib.mkIf cfg.enable {
|
||||
services.displayManager.defaultSession = lib.mkDefault "niri";
|
||||
|
||||
services.displayManager.ly = {
|
||||
enable = true;
|
||||
settings = {
|
||||
default_session = "niri";
|
||||
|
||||
animate = true;
|
||||
animation = "dur_file";
|
||||
dur_file_path = "${indyzLinuxfire}";
|
||||
dur_offset_alignment = "center";
|
||||
|
||||
full_color = true;
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
@@ -1,22 +0,0 @@
|
||||
{
|
||||
pkgs,
|
||||
lib,
|
||||
config,
|
||||
...
|
||||
}:
|
||||
let
|
||||
cfg = config.my.applications.nautilus;
|
||||
in
|
||||
{
|
||||
options.my.applications.nautilus = {
|
||||
enable = lib.mkEnableOption "Nautilus file manager";
|
||||
};
|
||||
|
||||
config = lib.mkIf cfg.enable {
|
||||
environment.systemPackages = with pkgs; [
|
||||
nautilus # GNOME file manager
|
||||
gvfs # GNOME virtual file system
|
||||
sushi # Nautilus file previewer
|
||||
];
|
||||
};
|
||||
}
|
||||
@@ -1,27 +0,0 @@
|
||||
{
|
||||
username,
|
||||
lib,
|
||||
config,
|
||||
...
|
||||
}:
|
||||
let
|
||||
cfg = config.my.applications.nh;
|
||||
in
|
||||
{
|
||||
options.my.applications.nh = {
|
||||
enable = lib.mkEnableOption "nh Nix CLI helper";
|
||||
};
|
||||
|
||||
config = lib.mkIf cfg.enable {
|
||||
programs.nh = {
|
||||
enable = true;
|
||||
flake = "/home/${username}/dotfiles";
|
||||
|
||||
clean = {
|
||||
enable = true;
|
||||
dates = "weekly";
|
||||
extraArgs = "--keep-since 14d --keep 10";
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
@@ -1,23 +0,0 @@
|
||||
{
|
||||
lib,
|
||||
config,
|
||||
...
|
||||
}:
|
||||
let
|
||||
cfg = config.my.applications.niri;
|
||||
in
|
||||
{
|
||||
imports = [
|
||||
./home.nix
|
||||
./system.nix
|
||||
];
|
||||
|
||||
options.my.applications.niri = {
|
||||
enable = lib.mkEnableOption "niri window manager";
|
||||
};
|
||||
|
||||
config = lib.mkIf cfg.enable {
|
||||
my.applications.niri.system.enable = lib.mkDefault true;
|
||||
my.applications.niri.homeManager.enable = lib.mkDefault true;
|
||||
};
|
||||
}
|
||||
@@ -1,166 +0,0 @@
|
||||
{
|
||||
"Mod+Shift+Slash".action.show-hotkey-overlay = { };
|
||||
|
||||
"XF86AudioRaiseVolume" = {
|
||||
allow-when-locked = true;
|
||||
action.spawn = [
|
||||
"wpctl"
|
||||
"set-volume"
|
||||
"@DEFAULT_AUDIO_SINK@"
|
||||
"0.1+"
|
||||
];
|
||||
};
|
||||
"XF86AudioLowerVolume" = {
|
||||
allow-when-locked = true;
|
||||
action.spawn = [
|
||||
"wpctl"
|
||||
"set-volume"
|
||||
"@DEFAULT_AUDIO_SINK@"
|
||||
"0.1-"
|
||||
];
|
||||
};
|
||||
"XF86AudioMute" = {
|
||||
allow-when-locked = true;
|
||||
action.spawn = [
|
||||
"wpctl"
|
||||
"set-mute"
|
||||
"@DEFAULT_AUDIO_SINK@"
|
||||
"toggle"
|
||||
];
|
||||
};
|
||||
"XF86AudioMicMute" = {
|
||||
allow-when-locked = true;
|
||||
action.spawn = [
|
||||
"wpctl"
|
||||
"set-mute"
|
||||
"@DEFAULT_AUDIO_SOURCE@"
|
||||
"toggle"
|
||||
];
|
||||
};
|
||||
|
||||
"Mod+Q".action.close-window = { };
|
||||
|
||||
"Mod+Left".action.focus-column-left = { };
|
||||
"Mod+Down".action.focus-window-down = { };
|
||||
"Mod+Up".action.focus-window-up = { };
|
||||
"Mod+Right".action.focus-column-right = { };
|
||||
"Mod+H".action.focus-column-left = { };
|
||||
"Mod+J".action.focus-window-down = { };
|
||||
"Mod+K".action.focus-window-up = { };
|
||||
"Mod+L".action.focus-column-right = { };
|
||||
|
||||
"Mod+Ctrl+Left".action.move-column-left = { };
|
||||
"Mod+Ctrl+Down".action.move-window-down = { };
|
||||
"Mod+Ctrl+Up".action.move-window-up = { };
|
||||
"Mod+Ctrl+Right".action.move-column-right = { };
|
||||
"Mod+Ctrl+H".action.move-column-left = { };
|
||||
"Mod+Ctrl+J".action.move-window-down = { };
|
||||
"Mod+Ctrl+K".action.move-window-up = { };
|
||||
"Mod+Ctrl+L".action.move-column-right = { };
|
||||
|
||||
"Mod+Home".action.focus-column-first = { };
|
||||
"Mod+End".action.focus-column-last = { };
|
||||
"Mod+Ctrl+Home".action.move-column-to-first = { };
|
||||
"Mod+Ctrl+End".action.move-column-to-last = { };
|
||||
|
||||
"Mod+Shift+Left".action.focus-monitor-left = { };
|
||||
"Mod+Shift+Down".action.focus-monitor-down = { };
|
||||
"Mod+Shift+Up".action.focus-monitor-up = { };
|
||||
"Mod+Shift+Right".action.focus-monitor-right = { };
|
||||
"Mod+Shift+H".action.focus-monitor-left = { };
|
||||
"Mod+Shift+J".action.focus-monitor-down = { };
|
||||
"Mod+Shift+K".action.focus-monitor-up = { };
|
||||
"Mod+Shift+L".action.focus-monitor-right = { };
|
||||
|
||||
"Mod+Shift+Ctrl+Left".action.move-column-to-monitor-left = { };
|
||||
"Mod+Shift+Ctrl+Down".action.move-column-to-monitor-down = { };
|
||||
"Mod+Shift+Ctrl+Up".action.move-column-to-monitor-up = { };
|
||||
"Mod+Shift+Ctrl+Right".action.move-column-to-monitor-right = { };
|
||||
"Mod+Shift+Ctrl+H".action.move-column-to-monitor-left = { };
|
||||
"Mod+Shift+Ctrl+J".action.move-column-to-monitor-down = { };
|
||||
"Mod+Shift+Ctrl+K".action.move-column-to-monitor-up = { };
|
||||
"Mod+Shift+Ctrl+L".action.move-column-to-monitor-right = { };
|
||||
|
||||
"Mod+Page_Down".action.focus-workspace-down = { };
|
||||
"Mod+Page_Up".action.focus-workspace-up = { };
|
||||
"Mod+U".action.focus-workspace-down = { };
|
||||
"Mod+I".action.focus-workspace-up = { };
|
||||
"Mod+Ctrl+Page_Down".action.move-column-to-workspace-down = { };
|
||||
"Mod+Ctrl+Page_Up".action.move-column-to-workspace-up = { };
|
||||
"Mod+Ctrl+U".action.move-column-to-workspace-down = { };
|
||||
"Mod+Ctrl+I".action.move-column-to-workspace-up = { };
|
||||
|
||||
"Mod+Shift+Page_Down".action.move-workspace-down = { };
|
||||
"Mod+Shift+Page_Up".action.move-workspace-up = { };
|
||||
"Mod+Shift+U".action.move-workspace-down = { };
|
||||
"Mod+Shift+I".action.move-workspace-up = { };
|
||||
|
||||
"Mod+WheelScrollDown" = {
|
||||
cooldown-ms = 150;
|
||||
action.focus-workspace-down = { };
|
||||
};
|
||||
"Mod+WheelScrollUp" = {
|
||||
cooldown-ms = 150;
|
||||
action.focus-workspace-up = { };
|
||||
};
|
||||
"Mod+Ctrl+WheelScrollDown" = {
|
||||
cooldown-ms = 150;
|
||||
action.move-column-to-workspace-down = { };
|
||||
};
|
||||
"Mod+Ctrl+WheelScrollUp" = {
|
||||
cooldown-ms = 150;
|
||||
action.move-column-to-workspace-up = { };
|
||||
};
|
||||
|
||||
"Mod+WheelScrollRight".action.focus-column-right = { };
|
||||
"Mod+WheelScrollLeft".action.focus-column-left = { };
|
||||
"Mod+Ctrl+WheelScrollRight".action.move-column-right = { };
|
||||
"Mod+Ctrl+WheelScrollLeft".action.move-column-left = { };
|
||||
|
||||
"Mod+Shift+WheelScrollDown".action.focus-column-right = { };
|
||||
"Mod+Shift+WheelScrollUp".action.focus-column-left = { };
|
||||
"Mod+Ctrl+Shift+WheelScrollDown".action.move-column-right = { };
|
||||
"Mod+Ctrl+Shift+WheelScrollUp".action.move-column-left = { };
|
||||
|
||||
"Mod+1".action.focus-workspace = 1;
|
||||
"Mod+2".action.focus-workspace = 2;
|
||||
"Mod+3".action.focus-workspace = 3;
|
||||
"Mod+4".action.focus-workspace = 4;
|
||||
"Mod+5".action.focus-workspace = 5;
|
||||
"Mod+6".action.focus-workspace = 6;
|
||||
"Mod+7".action.focus-workspace = 7;
|
||||
"Mod+8".action.focus-workspace = 8;
|
||||
"Mod+9".action.focus-workspace = 9;
|
||||
"Mod+Ctrl+1".action.move-column-to-workspace = 1;
|
||||
"Mod+Ctrl+2".action.move-column-to-workspace = 2;
|
||||
"Mod+Ctrl+3".action.move-column-to-workspace = 3;
|
||||
"Mod+Ctrl+4".action.move-column-to-workspace = 4;
|
||||
"Mod+Ctrl+5".action.move-column-to-workspace = 5;
|
||||
"Mod+Ctrl+6".action.move-column-to-workspace = 6;
|
||||
"Mod+Ctrl+7".action.move-column-to-workspace = 7;
|
||||
"Mod+Ctrl+8".action.move-column-to-workspace = 8;
|
||||
"Mod+Ctrl+9".action.move-column-to-workspace = 9;
|
||||
|
||||
"Mod+Comma".action.consume-window-into-column = { };
|
||||
"Mod+Period".action.expel-window-from-column = { };
|
||||
|
||||
"Mod+R".action.switch-preset-column-width = { };
|
||||
"Mod+Shift+R".action.reset-window-height = { };
|
||||
"Mod+F".action.maximize-column = { };
|
||||
"Mod+Shift+F".action.fullscreen-window = { };
|
||||
"Mod+C".action.center-column = { };
|
||||
|
||||
"Mod+Minus".action.set-column-width = "-10%";
|
||||
"Mod+Equal".action.set-column-width = "+10%";
|
||||
|
||||
"Mod+Shift+Minus".action.set-window-height = "-10%";
|
||||
"Mod+Shift+Equal".action.set-window-height = "+10%";
|
||||
|
||||
"Print".action.screenshot = { };
|
||||
"Ctrl+Print".action.screenshot-screen = { };
|
||||
"Alt+Print".action.screenshot-window = { };
|
||||
|
||||
"Mod+Shift+E".action.quit = { };
|
||||
|
||||
"Mod+Shift+P".action.power-off-monitors = { };
|
||||
}
|
||||
@@ -1,255 +0,0 @@
|
||||
{
|
||||
inputs,
|
||||
pkgs,
|
||||
lib,
|
||||
config,
|
||||
...
|
||||
}:
|
||||
let
|
||||
cfg = config.my.applications.niri.homeManager;
|
||||
defaultKeyBind = import ./defaultKeyBind.nix;
|
||||
in
|
||||
{
|
||||
options.my.applications.niri.homeManager = {
|
||||
enable = lib.mkEnableOption "niri home-manager configuration";
|
||||
};
|
||||
|
||||
config.home-manager.sharedModules = [
|
||||
inputs.niri-flake.homeModules.niri
|
||||
{
|
||||
config = lib.mkIf cfg.enable {
|
||||
programs.niri.package = pkgs.niri;
|
||||
|
||||
programs.niri.settings = {
|
||||
input.touchpad = {
|
||||
natural-scroll = true;
|
||||
scroll-factor = 4.0;
|
||||
scroll-method = "two-finger";
|
||||
click-method = "clickfinger";
|
||||
drag = true;
|
||||
drag-lock = true;
|
||||
};
|
||||
|
||||
input.keyboard.xkb = {
|
||||
layout = "jp";
|
||||
options = "ctrl:nocaps";
|
||||
};
|
||||
|
||||
input.mouse = {
|
||||
accel-profile = "flat";
|
||||
accel-speed = -0.1;
|
||||
};
|
||||
|
||||
input.warp-mouse-to-focus.enable = true;
|
||||
input.focus-follows-mouse = {
|
||||
enable = true;
|
||||
max-scroll-amount = "0%";
|
||||
};
|
||||
|
||||
spawn-at-startup = [
|
||||
{ command = [ "noctalia" ]; }
|
||||
{
|
||||
command = [
|
||||
"${pkgs.polkit_gnome}/libexec/polkit-gnome-authentication-agent-1"
|
||||
];
|
||||
}
|
||||
];
|
||||
|
||||
cursor.size = 16;
|
||||
|
||||
outputs = {
|
||||
# x1g13 monitor
|
||||
"eDP-1" = {
|
||||
scale = 1.2;
|
||||
position = {
|
||||
x = 0;
|
||||
y = 0;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
layout = {
|
||||
focus-ring = {
|
||||
active.color = "#bd93f9";
|
||||
inactive.color = "#6272a4";
|
||||
};
|
||||
border = {
|
||||
active.color = "#ffc87f";
|
||||
inactive.color = "#505050";
|
||||
urgent.color = "#9b0000";
|
||||
};
|
||||
shadow = {
|
||||
color = "#0007";
|
||||
};
|
||||
background-color = "transparent";
|
||||
};
|
||||
|
||||
binds = defaultKeyBind // {
|
||||
"Mod+T" = {
|
||||
action.spawn = "ghostty";
|
||||
hotkey-overlay.title = "Open a Terminal: ghostty";
|
||||
};
|
||||
"Mod+D" = {
|
||||
action.spawn = [
|
||||
"vicinae"
|
||||
"toggle"
|
||||
];
|
||||
hotkey-overlay.title = "Run an Application: vicinae";
|
||||
};
|
||||
"Mod+E" = {
|
||||
action.spawn = [
|
||||
"nautilus"
|
||||
"--new-window"
|
||||
];
|
||||
hotkey-overlay.title = "Open File Manager: nautilus";
|
||||
};
|
||||
"Mod+L" = {
|
||||
action.spawn = [
|
||||
(lib.getExe' pkgs.systemd "loginctl")
|
||||
"lock-session"
|
||||
];
|
||||
hotkey-overlay.title = "Lock the Screen";
|
||||
};
|
||||
"Mod+V" = {
|
||||
action.spawn = [
|
||||
"vicinae"
|
||||
"vicinae://launch/clipboard/history?toggle=true"
|
||||
];
|
||||
hotkey-overlay.title = "Clipboard History";
|
||||
};
|
||||
"Mod+Space" = {
|
||||
action.spawn = [
|
||||
"ghostty"
|
||||
"+toggle-quick-terminal"
|
||||
];
|
||||
hotkey-overlay.title = "Toggle Quick Terminal: ghostty";
|
||||
};
|
||||
|
||||
# Focus monitor
|
||||
"Mod+Shift+Left" = {
|
||||
action.focus-monitor-left = [ ];
|
||||
hotkey-overlay.title = "Focus Monitor Left";
|
||||
};
|
||||
"Mod+Shift+Right" = {
|
||||
action.focus-monitor-right = [ ];
|
||||
hotkey-overlay.title = "Focus Monitor Right";
|
||||
};
|
||||
"Mod+Shift+Up" = {
|
||||
action.focus-monitor-up = [ ];
|
||||
hotkey-overlay.title = "Focus Monitor Up";
|
||||
};
|
||||
"Mod+Shift+Down" = {
|
||||
action.focus-monitor-down = [ ];
|
||||
hotkey-overlay.title = "Focus Monitor Down";
|
||||
};
|
||||
|
||||
# Move focused window to monitor
|
||||
"Mod+Shift+Ctrl+Left" = {
|
||||
action.move-window-to-monitor-left = [ ];
|
||||
hotkey-overlay.title = "Move Window to Monitor Left";
|
||||
};
|
||||
"Mod+Shift+Ctrl+Right" = {
|
||||
action.move-window-to-monitor-right = [ ];
|
||||
hotkey-overlay.title = "Move Window to Monitor Right";
|
||||
};
|
||||
"Mod+Shift+Ctrl+Up" = {
|
||||
action.move-window-to-monitor-up = [ ];
|
||||
hotkey-overlay.title = "Move Window to Monitor Up";
|
||||
};
|
||||
"Mod+Shift+Ctrl+Down" = {
|
||||
action.move-window-to-monitor-down = [ ];
|
||||
hotkey-overlay.title = "Move Window to Monitor Down";
|
||||
};
|
||||
|
||||
"XF86AudioRaiseVolume" = {
|
||||
action.spawn = [
|
||||
"noctalia"
|
||||
"msg"
|
||||
"volume-up"
|
||||
];
|
||||
};
|
||||
"XF86AudioLowerVolume" = {
|
||||
action.spawn = [
|
||||
"noctalia"
|
||||
"msg"
|
||||
"volume-down"
|
||||
];
|
||||
};
|
||||
"XF86AudioMute" = {
|
||||
action.spawn = [
|
||||
"noctalia"
|
||||
"msg"
|
||||
"volume-mute"
|
||||
];
|
||||
};
|
||||
"XF86AudioMicMute" = {
|
||||
action.spawn = [
|
||||
"noctalia"
|
||||
"msg"
|
||||
"mic-mute"
|
||||
];
|
||||
};
|
||||
|
||||
"XF86MonBrightnessUp" = {
|
||||
action.spawn = [
|
||||
"noctalia"
|
||||
"msg"
|
||||
"brightness-up"
|
||||
];
|
||||
};
|
||||
"XF86MonBrightnessDown" = {
|
||||
action.spawn = [
|
||||
"noctalia"
|
||||
"msg"
|
||||
"brightness-down"
|
||||
];
|
||||
};
|
||||
|
||||
"XF86Favorites" = {
|
||||
action.spawn = [
|
||||
"noctalia"
|
||||
"msg"
|
||||
"caffeine-toggle"
|
||||
];
|
||||
};
|
||||
};
|
||||
|
||||
window-rules = [
|
||||
{
|
||||
geometry-corner-radius = {
|
||||
top-left = 20.0;
|
||||
top-right = 20.0;
|
||||
bottom-left = 20.0;
|
||||
bottom-right = 20.0;
|
||||
};
|
||||
clip-to-geometry = true;
|
||||
}
|
||||
{
|
||||
matches = [ { app-id = "^dev\\.noctalia\\.Noctalia$"; } ];
|
||||
open-floating = true;
|
||||
default-column-width = {
|
||||
fixed = 1080;
|
||||
};
|
||||
default-window-height = {
|
||||
fixed = 920;
|
||||
};
|
||||
}
|
||||
];
|
||||
|
||||
layer-rules = [
|
||||
{
|
||||
matches = [ { namespace = "^noctalia-wallpaper"; } ];
|
||||
place-within-backdrop = true;
|
||||
}
|
||||
];
|
||||
|
||||
overview = {
|
||||
workspace-shadow = {
|
||||
enable = false;
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
];
|
||||
}
|
||||
@@ -1,24 +0,0 @@
|
||||
{
|
||||
pkgs,
|
||||
lib,
|
||||
config,
|
||||
...
|
||||
}:
|
||||
let
|
||||
cfg = config.my.applications.niri.system;
|
||||
in
|
||||
{
|
||||
options.my.applications.niri.system = {
|
||||
enable = lib.mkEnableOption "niri system configuration";
|
||||
};
|
||||
|
||||
config = lib.mkIf cfg.enable {
|
||||
programs.niri.enable = true;
|
||||
|
||||
environment.systemPackages = with pkgs; [
|
||||
wdisplays # Wayland display configuration GUI
|
||||
wlr-randr # Wayland output management CLI
|
||||
polkit_gnome # Polkit authentication agent for GNOME
|
||||
];
|
||||
};
|
||||
}
|
||||
@@ -1,23 +0,0 @@
|
||||
{
|
||||
lib,
|
||||
config,
|
||||
...
|
||||
}:
|
||||
let
|
||||
cfg = config.my.applications.nix-index;
|
||||
in
|
||||
{
|
||||
imports = [
|
||||
./home.nix
|
||||
./system.nix
|
||||
];
|
||||
|
||||
options.my.applications.nix-index = {
|
||||
enable = lib.mkEnableOption "nix-index and comma command runner";
|
||||
};
|
||||
|
||||
config = lib.mkIf cfg.enable {
|
||||
my.applications.nix-index.system.enable = lib.mkDefault true;
|
||||
my.applications.nix-index.homeManager.enable = lib.mkDefault true;
|
||||
};
|
||||
}
|
||||
@@ -1,21 +0,0 @@
|
||||
{
|
||||
lib,
|
||||
config,
|
||||
...
|
||||
}:
|
||||
let
|
||||
cfg = config.my.applications.nix-index.homeManager;
|
||||
in
|
||||
{
|
||||
options.my.applications.nix-index.homeManager = {
|
||||
enable = lib.mkEnableOption "nix-index home-manager configuration";
|
||||
};
|
||||
|
||||
config.home-manager.sharedModules = [
|
||||
{
|
||||
config = lib.mkIf cfg.enable {
|
||||
programs.nix-index.enable = true;
|
||||
};
|
||||
}
|
||||
];
|
||||
}
|
||||
@@ -1,20 +0,0 @@
|
||||
{
|
||||
inputs,
|
||||
lib,
|
||||
config,
|
||||
...
|
||||
}:
|
||||
let
|
||||
cfg = config.my.applications.nix-index.system;
|
||||
in
|
||||
{
|
||||
imports = [ inputs.nix-index-database.nixosModules.default ];
|
||||
|
||||
options.my.applications.nix-index.system = {
|
||||
enable = lib.mkEnableOption "nix-index system configuration";
|
||||
};
|
||||
|
||||
config = lib.mkIf cfg.enable {
|
||||
programs.nix-index-database.comma.enable = true;
|
||||
};
|
||||
}
|
||||
@@ -1,23 +0,0 @@
|
||||
{
|
||||
lib,
|
||||
config,
|
||||
...
|
||||
}:
|
||||
let
|
||||
cfg = config.my.applications.noctalia;
|
||||
in
|
||||
{
|
||||
imports = [
|
||||
./home.nix
|
||||
./system.nix
|
||||
];
|
||||
|
||||
options.my.applications.noctalia = {
|
||||
enable = lib.mkEnableOption "noctalia";
|
||||
};
|
||||
|
||||
config = lib.mkIf cfg.enable {
|
||||
my.applications.noctalia.system.enable = lib.mkDefault true;
|
||||
my.applications.noctalia.homeManager.enable = lib.mkDefault true;
|
||||
};
|
||||
}
|
||||
@@ -1,225 +0,0 @@
|
||||
{
|
||||
inputs,
|
||||
pkgs,
|
||||
lib,
|
||||
config,
|
||||
...
|
||||
}:
|
||||
let
|
||||
cfg = config.my.applications.noctalia.homeManager;
|
||||
walls = pkgs.fetchFromGitHub {
|
||||
owner = "moons-14";
|
||||
repo = "wallpapers";
|
||||
rev = "cc3256f4aaf2c8e7d16fb000b1ee251af54085db";
|
||||
hash = "sha256-emQ/FqKqMq3YI5bLx8gBZg/ZE72OG9Ilh71ggq78WdQ=";
|
||||
};
|
||||
in
|
||||
{
|
||||
options.my.applications.noctalia.homeManager = {
|
||||
enable = lib.mkEnableOption "noctalia home-manager configuration";
|
||||
};
|
||||
|
||||
config.home-manager.sharedModules = [
|
||||
inputs.noctalia.homeModules.default
|
||||
{
|
||||
config = lib.mkIf cfg.enable {
|
||||
home.file.".face" = {
|
||||
recursive = true;
|
||||
source = ../../../images/avatar.jpg;
|
||||
};
|
||||
|
||||
home.file.".wallpapers" = {
|
||||
source = walls;
|
||||
recursive = true;
|
||||
};
|
||||
|
||||
home.file.".cache/noctalia/wallpapers.json" = {
|
||||
text = builtins.toJSON {
|
||||
defaultWallpaper = "~/.wallpapers/1.jpg";
|
||||
wallpapers = {
|
||||
"DP-1" = "~/.wallpapers/1.jpg";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
programs.noctalia = {
|
||||
enable = true;
|
||||
settings = {
|
||||
theme = {
|
||||
mode = "auto";
|
||||
source = "wallpaper";
|
||||
templates = {
|
||||
enable_builtin_templates = false;
|
||||
enable_community_templates = false;
|
||||
};
|
||||
};
|
||||
desktop_widgets.enabled = false;
|
||||
lockscreen = {
|
||||
enabled = false;
|
||||
fingerprint = false;
|
||||
};
|
||||
widget = {
|
||||
cpu = {
|
||||
type = "sysmon";
|
||||
stat = "cpu_usage";
|
||||
};
|
||||
cpu-graph = {
|
||||
type = "sysmon";
|
||||
stat = "cpu_usage";
|
||||
display = "graph";
|
||||
show_label = false;
|
||||
};
|
||||
ram = {
|
||||
type = "sysmon";
|
||||
stat = "ram_used";
|
||||
};
|
||||
media = {
|
||||
type = "media";
|
||||
hide_when_no_media = true;
|
||||
title_scroll = "always";
|
||||
};
|
||||
battery = {
|
||||
type = "battery";
|
||||
display_mode = "graphic";
|
||||
warning_threshold = 30;
|
||||
};
|
||||
brightness = {
|
||||
type = "brightness";
|
||||
show_label = false;
|
||||
};
|
||||
input-volume = {
|
||||
type = "volume";
|
||||
device = "input";
|
||||
};
|
||||
output-volume = {
|
||||
type = "volume";
|
||||
device = "output";
|
||||
};
|
||||
clock = {
|
||||
type = "clock";
|
||||
format = "{:%Y/%m/%d %H:%M}";
|
||||
vertical_format = "{:%Y/%m/%d\n%H:%M}";
|
||||
tooltip_format = "{:%Y/%m/%d %H:%M (%a)}";
|
||||
};
|
||||
network-connection = {
|
||||
type = "custom_button";
|
||||
glyph = "access-point";
|
||||
command = "nm-connection-editor";
|
||||
};
|
||||
tray = {
|
||||
type = "tray";
|
||||
pinned = [ "org.fcitx.Fcitx5" ];
|
||||
};
|
||||
};
|
||||
|
||||
bar = {
|
||||
order = [ "main" ];
|
||||
main = {
|
||||
margin_ends = 15;
|
||||
position = "top";
|
||||
start = [
|
||||
"network"
|
||||
"bluetooth"
|
||||
"network-connection"
|
||||
"spacer"
|
||||
"cpu"
|
||||
"cpu-graph"
|
||||
"ram"
|
||||
];
|
||||
center = [ "workspaces" ];
|
||||
end = [
|
||||
"media"
|
||||
"spacer"
|
||||
"notifications"
|
||||
"tray"
|
||||
"spacer"
|
||||
"battery"
|
||||
"input-volume"
|
||||
"output-volume"
|
||||
"privacy"
|
||||
"brightness"
|
||||
"clock"
|
||||
"control-center"
|
||||
];
|
||||
};
|
||||
};
|
||||
colorSchemes.predefinedScheme = "dracula";
|
||||
general = {
|
||||
avatarImage = "~/.face";
|
||||
radiusRatio = 0.2;
|
||||
};
|
||||
location = {
|
||||
monthBeforeDay = true;
|
||||
weatherEnabled = false;
|
||||
name = "Tokyo";
|
||||
};
|
||||
wallpaper = {
|
||||
enabled = true;
|
||||
directory = "~/.wallpapers/";
|
||||
fillMode = "crop";
|
||||
automation = {
|
||||
enabled = true;
|
||||
order = "random";
|
||||
interval_seconds = 60;
|
||||
};
|
||||
default.path = "~/.wallpapers/1.jpg";
|
||||
};
|
||||
dock = {
|
||||
enabled = true;
|
||||
position = "left";
|
||||
auto_hide = true;
|
||||
show_dots = true;
|
||||
background_opacity = 0.8;
|
||||
size = 1;
|
||||
onlySameOutput = true;
|
||||
reserve_space = false;
|
||||
monitors = [ "eDP-1" ];
|
||||
pinned = [
|
||||
"com.mitchellh.ghostty"
|
||||
"google-chrome"
|
||||
"code"
|
||||
];
|
||||
colorizeIcons = false;
|
||||
};
|
||||
shell = {
|
||||
clipboard_enabled = false;
|
||||
};
|
||||
controlCenter = {
|
||||
position = "close_to_bar_button";
|
||||
shortcuts = {
|
||||
left = [
|
||||
{ id = "WiFi"; }
|
||||
{ id = "Bluetooth"; }
|
||||
{ id = "ScreenRecorder"; }
|
||||
{ id = "WallpaperSelector"; }
|
||||
];
|
||||
right = [
|
||||
{ id = "Notifications"; }
|
||||
{ id = "NightLight"; }
|
||||
];
|
||||
};
|
||||
cards = [
|
||||
{
|
||||
enabled = true;
|
||||
id = "profile-card";
|
||||
}
|
||||
{
|
||||
enabled = true;
|
||||
id = "shortcuts-card";
|
||||
}
|
||||
{
|
||||
enabled = true;
|
||||
id = "audio-card";
|
||||
}
|
||||
{
|
||||
enabled = true;
|
||||
id = "media-sysmon-card";
|
||||
}
|
||||
];
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
];
|
||||
}
|
||||
@@ -1,32 +0,0 @@
|
||||
{
|
||||
pkgs,
|
||||
inputs,
|
||||
lib,
|
||||
config,
|
||||
...
|
||||
}:
|
||||
let
|
||||
cfg = config.my.applications.noctalia.system;
|
||||
in
|
||||
{
|
||||
options.my.applications.noctalia.system = {
|
||||
enable = lib.mkEnableOption "noctalia system package";
|
||||
};
|
||||
|
||||
imports = [
|
||||
inputs.noctalia.nixosModules.default
|
||||
];
|
||||
|
||||
config = lib.mkIf cfg.enable {
|
||||
|
||||
environment.systemPackages = with pkgs; [
|
||||
inputs.noctalia.packages.${pkgs.stdenv.hostPlatform.system}.default
|
||||
];
|
||||
|
||||
programs.noctalia = {
|
||||
enable = true;
|
||||
recommendedServices.enable = true;
|
||||
systemd.enable = true;
|
||||
};
|
||||
};
|
||||
}
|
||||
@@ -1,20 +0,0 @@
|
||||
{
|
||||
pkgs,
|
||||
lib,
|
||||
config,
|
||||
...
|
||||
}:
|
||||
let
|
||||
cfg = config.my.applications.opencode;
|
||||
in
|
||||
{
|
||||
options.my.applications.opencode = {
|
||||
enable = lib.mkEnableOption "OpenCode AI coding assistant";
|
||||
};
|
||||
|
||||
config = lib.mkIf cfg.enable {
|
||||
environment.systemPackages = [
|
||||
pkgs.llm-agents.opencode # OpenCode CLI
|
||||
];
|
||||
};
|
||||
}
|
||||
@@ -1,23 +0,0 @@
|
||||
{ lib, config, ... }:
|
||||
let
|
||||
cfg = config.my.applications.openssh;
|
||||
in
|
||||
{
|
||||
options.my.applications.openssh = {
|
||||
enable = lib.mkEnableOption "OpenSSH server";
|
||||
};
|
||||
|
||||
config = lib.mkIf cfg.enable {
|
||||
services.openssh = {
|
||||
enable = true;
|
||||
openFirewall = true;
|
||||
|
||||
settings = {
|
||||
PermitRootLogin = "no";
|
||||
PasswordAuthentication = false;
|
||||
KbdInteractiveAuthentication = false;
|
||||
PubkeyAuthentication = "yes";
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
@@ -1,24 +0,0 @@
|
||||
{
|
||||
pkgs,
|
||||
lib,
|
||||
config,
|
||||
...
|
||||
}:
|
||||
let
|
||||
cfg = config.my.applications.slack;
|
||||
in
|
||||
{
|
||||
options.my.applications.slack = {
|
||||
enable = lib.mkEnableOption "Slack messaging client";
|
||||
};
|
||||
|
||||
config = lib.mkIf cfg.enable {
|
||||
home-manager.sharedModules = [
|
||||
{
|
||||
home.packages = with pkgs; [
|
||||
slack # Team messaging and collaboration platform
|
||||
];
|
||||
}
|
||||
];
|
||||
};
|
||||
}
|
||||
@@ -1,23 +0,0 @@
|
||||
{
|
||||
lib,
|
||||
config,
|
||||
...
|
||||
}:
|
||||
let
|
||||
cfg = config.my.applications.ssh;
|
||||
in
|
||||
{
|
||||
imports = [
|
||||
./home.nix
|
||||
./system.nix
|
||||
];
|
||||
|
||||
options.my.applications.ssh = {
|
||||
enable = lib.mkEnableOption "OpenSSH client";
|
||||
};
|
||||
|
||||
config = lib.mkIf cfg.enable {
|
||||
my.applications.ssh.system.enable = lib.mkDefault true;
|
||||
my.applications.ssh.homeManager.enable = lib.mkDefault true;
|
||||
};
|
||||
}
|
||||
@@ -1,63 +0,0 @@
|
||||
{
|
||||
pkgs,
|
||||
lib,
|
||||
config,
|
||||
...
|
||||
}:
|
||||
let
|
||||
hmCfg = config.my.applications.ssh.homeManager;
|
||||
in
|
||||
{
|
||||
options.my.applications.ssh.homeManager = {
|
||||
enable = lib.mkEnableOption "SSH home-manager configuration";
|
||||
|
||||
matchBlocks = lib.mkOption {
|
||||
type = lib.types.attrs;
|
||||
default = { };
|
||||
description = "SSH match blocks";
|
||||
};
|
||||
};
|
||||
|
||||
config.home-manager.sharedModules = [
|
||||
{
|
||||
config = lib.mkIf hmCfg.enable {
|
||||
home.packages = [
|
||||
pkgs.openssh
|
||||
];
|
||||
|
||||
systemd.user.sockets.gcr-ssh-agent.Install.WantedBy = lib.mkForce [ ];
|
||||
|
||||
services.ssh-agent.enable = lib.mkForce false;
|
||||
|
||||
programs.ssh = {
|
||||
enable = true;
|
||||
enableDefaultConfig = false;
|
||||
|
||||
settings = hmCfg.matchBlocks // {
|
||||
"github.com" = {
|
||||
HostName = "github.com";
|
||||
User = "git";
|
||||
AddKeysToAgent = "no";
|
||||
};
|
||||
|
||||
"*.sfc.wide.ad.jp" = {
|
||||
identityFile = "~/.ssh/id_ed25519_sk_rk";
|
||||
identitiesOnly = true;
|
||||
};
|
||||
"*" = {
|
||||
AddKeysToAgent = "no";
|
||||
SetEnv = {
|
||||
TERM = "xterm-256color";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
extraConfig = ''
|
||||
Match exec "test -S %d/.1password/agent.sock"
|
||||
IdentityAgent %d/.1password/agent.sock
|
||||
'';
|
||||
};
|
||||
};
|
||||
}
|
||||
];
|
||||
}
|
||||
@@ -1,23 +0,0 @@
|
||||
{
|
||||
pkgs,
|
||||
lib,
|
||||
config,
|
||||
...
|
||||
}:
|
||||
let
|
||||
cfg = config.my.applications.ssh.system;
|
||||
in
|
||||
{
|
||||
options.my.applications.ssh.system = {
|
||||
enable = lib.mkEnableOption "SSH system configuration";
|
||||
};
|
||||
|
||||
config = lib.mkIf cfg.enable {
|
||||
environment.systemPackages = with pkgs; [
|
||||
openssh # OpenSSH client and server
|
||||
];
|
||||
|
||||
programs.ssh.startAgent = false;
|
||||
services.gnome.gcr-ssh-agent.enable = false;
|
||||
};
|
||||
}
|
||||
@@ -1,96 +0,0 @@
|
||||
{
|
||||
pkgs,
|
||||
lib,
|
||||
config,
|
||||
...
|
||||
}:
|
||||
let
|
||||
cfg = config.my.applications.swayidle;
|
||||
|
||||
brightnessctl = lib.getExe pkgs.brightnessctl;
|
||||
niri = lib.getExe pkgs.niri;
|
||||
rm = "${pkgs.coreutils}/bin/rm";
|
||||
systemctl = lib.getExe' pkgs.systemd "systemctl";
|
||||
|
||||
brightnessState = "$XDG_RUNTIME_DIR/swayidle-brightness";
|
||||
|
||||
# AC 接続中は何もしない。
|
||||
# つまり、以下のアイドル処理をバッテリー駆動時のみにする。
|
||||
skipIfOnAC = ''
|
||||
for supply in /sys/class/power_supply/*; do
|
||||
if [ -f "$supply/type" ] \
|
||||
&& [ "$(< "$supply/type")" = "Mains" ] \
|
||||
&& [ -f "$supply/online" ] \
|
||||
&& [ "$(< "$supply/online")" = "1" ]; then
|
||||
exit 0
|
||||
fi
|
||||
done
|
||||
'';
|
||||
|
||||
dimScreen = pkgs.writeShellScript "swayidle-dim-screen" ''
|
||||
${skipIfOnAC}
|
||||
|
||||
${brightnessctl} get > "${brightnessState}" 2>/dev/null || exit 0
|
||||
${brightnessctl} set 10% >/dev/null 2>&1 || true
|
||||
'';
|
||||
|
||||
restoreBrightness = pkgs.writeShellScript "swayidle-restore-brightness" ''
|
||||
if [ -f "${brightnessState}" ]; then
|
||||
saved=$(< "${brightnessState}")
|
||||
${brightnessctl} set "$saved" >/dev/null 2>&1 || true
|
||||
${rm} -f "${brightnessState}"
|
||||
fi
|
||||
'';
|
||||
|
||||
suspendOnBattery = pkgs.writeShellScript "swayidle-suspend-on-battery" ''
|
||||
${skipIfOnAC}
|
||||
|
||||
exec ${systemctl} suspend
|
||||
'';
|
||||
|
||||
afterResume = pkgs.writeShellScript "swayidle-after-resume" ''
|
||||
${niri} msg action power-on-monitors
|
||||
${restoreBrightness}
|
||||
'';
|
||||
in
|
||||
{
|
||||
options.my.applications.swayidle = {
|
||||
enable = lib.mkEnableOption "swayidle idle manager";
|
||||
};
|
||||
|
||||
config = lib.mkIf cfg.enable {
|
||||
home-manager.sharedModules = [
|
||||
{
|
||||
services.swayidle = {
|
||||
enable = true;
|
||||
|
||||
systemdTargets = [
|
||||
"graphical-session.target"
|
||||
];
|
||||
|
||||
timeouts = [
|
||||
{
|
||||
timeout = 300;
|
||||
command = "${dimScreen}";
|
||||
resumeCommand = "${restoreBrightness}";
|
||||
}
|
||||
{
|
||||
timeout = 360;
|
||||
command = "${suspendOnBattery}";
|
||||
}
|
||||
];
|
||||
|
||||
events = {
|
||||
after-resume = "${afterResume}";
|
||||
};
|
||||
};
|
||||
|
||||
systemd.user.services.swayidle.Service.PassEnvironment = [
|
||||
"WAYLAND_DISPLAY"
|
||||
"XDG_RUNTIME_DIR"
|
||||
"DBUS_SESSION_BUS_ADDRESS"
|
||||
];
|
||||
}
|
||||
];
|
||||
};
|
||||
}
|
||||
@@ -1,23 +0,0 @@
|
||||
{
|
||||
lib,
|
||||
config,
|
||||
...
|
||||
}:
|
||||
let
|
||||
cfg = config.my.applications.swaylock;
|
||||
in
|
||||
{
|
||||
imports = [
|
||||
./home.nix
|
||||
./system.nix
|
||||
];
|
||||
|
||||
options.my.applications.swaylock = {
|
||||
enable = lib.mkEnableOption "swaylock screen locker";
|
||||
};
|
||||
|
||||
config = lib.mkIf cfg.enable {
|
||||
my.applications.swaylock.system.enable = lib.mkDefault true;
|
||||
my.applications.swaylock.homeManager.enable = lib.mkDefault true;
|
||||
};
|
||||
}
|
||||
@@ -1,48 +0,0 @@
|
||||
{
|
||||
lib,
|
||||
config,
|
||||
...
|
||||
}:
|
||||
let
|
||||
cfg = config.my.applications.swaylock;
|
||||
hmCfg = config.my.applications.swaylock.homeManager;
|
||||
in
|
||||
{
|
||||
options.my.applications.swaylock.homeManager = {
|
||||
enable = lib.mkEnableOption "swaylock home-manager configuration";
|
||||
};
|
||||
|
||||
config.home-manager.sharedModules = [
|
||||
(
|
||||
{ lib, pkgs, ... }:
|
||||
{
|
||||
config = lib.mkIf (cfg.enable && hmCfg.enable) {
|
||||
home.packages = with pkgs; [
|
||||
swaylock # Wayland screen locker using ext-session-lock-v1
|
||||
];
|
||||
|
||||
# systemd-lock-handler holds a sleep inhibitor until this service is
|
||||
# ready. swaylock forks only after the compositor confirms the lock.
|
||||
systemd.user.services.swaylock = {
|
||||
Unit = {
|
||||
Description = "Screen locker for Wayland";
|
||||
Documentation = [ "man:swaylock(1)" ];
|
||||
OnSuccess = [ "unlock.target" ];
|
||||
PartOf = [ "lock.target" ];
|
||||
Before = [ "lock.target" ];
|
||||
};
|
||||
|
||||
Service = {
|
||||
Type = "forking";
|
||||
ExecStart = "${lib.getExe pkgs.swaylock} -f -i %h/.wallpapers/28.jpg";
|
||||
Restart = "on-failure";
|
||||
RestartSec = 0;
|
||||
};
|
||||
|
||||
Install.WantedBy = [ "lock.target" ];
|
||||
};
|
||||
};
|
||||
}
|
||||
)
|
||||
];
|
||||
}
|
||||
@@ -1,26 +0,0 @@
|
||||
{
|
||||
lib,
|
||||
config,
|
||||
...
|
||||
}:
|
||||
let
|
||||
cfg = config.my.applications.swaylock.system;
|
||||
in
|
||||
{
|
||||
options.my.applications.swaylock.system = {
|
||||
enable = lib.mkEnableOption "swaylock system configuration";
|
||||
};
|
||||
|
||||
config = lib.mkIf cfg.enable {
|
||||
services.systemd-lock-handler.enable = true;
|
||||
|
||||
security.pam.services.swaylock.fprintAuth = true;
|
||||
|
||||
# PAM authentication is serial. Let a supplied password succeed before
|
||||
# starting fprintd, whose scan otherwise blocks password verification until
|
||||
# its timeout expires. Submit an empty password to start fingerprint
|
||||
# authentication in upstream swaylock.
|
||||
security.pam.services.swaylock.rules.auth.fprintd.order =
|
||||
config.security.pam.services.swaylock.rules.auth.unix.order + 50;
|
||||
};
|
||||
}
|
||||
@@ -1,118 +0,0 @@
|
||||
{ lib, config, ... }:
|
||||
|
||||
let
|
||||
cfg = config.my.applications.tailscale;
|
||||
|
||||
hasAdvertiseRoutes = cfg.advertiseRoutes != [ ];
|
||||
|
||||
computedRoutingFeatures =
|
||||
if cfg.routingFeatures != "auto" then
|
||||
cfg.routingFeatures
|
||||
else if hasAdvertiseRoutes && cfg.acceptRoutes then
|
||||
"both"
|
||||
else if hasAdvertiseRoutes then
|
||||
"server"
|
||||
else if cfg.acceptRoutes then
|
||||
"client"
|
||||
else
|
||||
"none";
|
||||
|
||||
computedOpenFirewall = if cfg.openFirewall != null then cfg.openFirewall else hasAdvertiseRoutes;
|
||||
|
||||
computedSetFlags = [
|
||||
"--accept-dns=${lib.boolToString cfg.acceptDns}"
|
||||
"--accept-routes=${lib.boolToString cfg.acceptRoutes}"
|
||||
]
|
||||
++ lib.optionals hasAdvertiseRoutes [
|
||||
"--advertise-routes=${lib.concatStringsSep "," cfg.advertiseRoutes}"
|
||||
]
|
||||
++ cfg.extraSetFlags;
|
||||
in
|
||||
{
|
||||
options.my.applications.tailscale = {
|
||||
enable = lib.mkEnableOption "Tailscale";
|
||||
|
||||
acceptDns = lib.mkOption {
|
||||
type = lib.types.bool;
|
||||
default = false;
|
||||
description = "Accept DNS configuration from Tailscale.";
|
||||
};
|
||||
|
||||
acceptRoutes = lib.mkOption {
|
||||
type = lib.types.bool;
|
||||
default = false;
|
||||
description = "Accept subnet routes advertised by other Tailscale nodes.";
|
||||
};
|
||||
|
||||
advertiseRoutes = lib.mkOption {
|
||||
type = lib.types.listOf lib.types.str;
|
||||
default = [ ];
|
||||
example = [ "10.50.0.0/16" ];
|
||||
description = "Subnet routes to advertise through this Tailscale node.";
|
||||
};
|
||||
|
||||
routingFeatures = lib.mkOption {
|
||||
type = lib.types.enum [
|
||||
"auto"
|
||||
"none"
|
||||
"client"
|
||||
"server"
|
||||
"both"
|
||||
];
|
||||
default = "auto";
|
||||
description = ''
|
||||
Routing feature mode for Tailscale.
|
||||
|
||||
auto:
|
||||
- advertiseRoutes only -> server
|
||||
- acceptRoutes only -> client
|
||||
- both -> both
|
||||
- neither -> none
|
||||
'';
|
||||
};
|
||||
|
||||
openFirewall = lib.mkOption {
|
||||
type = lib.types.nullOr lib.types.bool;
|
||||
default = null;
|
||||
description = ''
|
||||
Whether to open the firewall for Tailscale's UDP port.
|
||||
|
||||
null means automatic:
|
||||
- true when advertiseRoutes is non-empty
|
||||
- false otherwise
|
||||
'';
|
||||
};
|
||||
|
||||
extraSetFlags = lib.mkOption {
|
||||
type = lib.types.listOf lib.types.str;
|
||||
default = [ ];
|
||||
description = "Additional flags to pass to `tailscale set`.";
|
||||
};
|
||||
|
||||
extraUpFlags = lib.mkOption {
|
||||
type = lib.types.listOf lib.types.str;
|
||||
default = [ ];
|
||||
description = ''
|
||||
Additional flags to pass to `tailscale up`.
|
||||
|
||||
Note: on current NixOS this is only applied by the built-in
|
||||
autoconnect service when services.tailscale.authKeyFile is set.
|
||||
'';
|
||||
};
|
||||
};
|
||||
|
||||
config = lib.mkIf cfg.enable {
|
||||
services.tailscale = {
|
||||
enable = true;
|
||||
|
||||
openFirewall = computedOpenFirewall;
|
||||
useRoutingFeatures = computedRoutingFeatures;
|
||||
|
||||
# 常時反映したい設定は tailscale set に寄せる
|
||||
extraSetFlags = computedSetFlags;
|
||||
|
||||
# authKeyFile を使う場合だけ効くものとして残す
|
||||
inherit (cfg) extraUpFlags;
|
||||
};
|
||||
};
|
||||
}
|
||||
@@ -1,66 +0,0 @@
|
||||
{
|
||||
inputs,
|
||||
pkgs,
|
||||
lib,
|
||||
config,
|
||||
...
|
||||
}:
|
||||
let
|
||||
cfg = config.my.applications.vicinae;
|
||||
in
|
||||
{
|
||||
options.my.applications.vicinae = {
|
||||
enable = lib.mkEnableOption "Vicinae application launcher";
|
||||
};
|
||||
|
||||
config = lib.mkIf cfg.enable {
|
||||
home-manager.sharedModules = [
|
||||
inputs.vicinae.homeManagerModules.default
|
||||
{
|
||||
programs.vicinae = {
|
||||
enable = true;
|
||||
systemd = {
|
||||
enable = true;
|
||||
autoStart = true;
|
||||
environment = {
|
||||
USE_LAYER_SHELL = 1;
|
||||
};
|
||||
};
|
||||
|
||||
settings = {
|
||||
font.size = 11;
|
||||
close_on_focus_loss = true;
|
||||
consider_preedit = true;
|
||||
pop_to_root_on_close = true;
|
||||
favicon_service = "twenty";
|
||||
search_files_in_root = true;
|
||||
theme = {
|
||||
light = {
|
||||
name = "dracula";
|
||||
icon_theme = "default";
|
||||
};
|
||||
dark = {
|
||||
name = "vicinae-light";
|
||||
icon_theme = "default";
|
||||
};
|
||||
};
|
||||
window = {
|
||||
csd = true;
|
||||
opacity = 0.95;
|
||||
rounding = 10;
|
||||
};
|
||||
};
|
||||
extensions = with inputs.vicinae-extensions.packages.${pkgs.stdenv.hostPlatform.system}; [
|
||||
nix
|
||||
power-profile
|
||||
niri
|
||||
zoxide-recent-directories
|
||||
ssh
|
||||
port-killer
|
||||
noctalia-shell-wallpaper-selector
|
||||
];
|
||||
};
|
||||
}
|
||||
];
|
||||
};
|
||||
}
|
||||
@@ -1,23 +0,0 @@
|
||||
{
|
||||
lib,
|
||||
config,
|
||||
...
|
||||
}:
|
||||
let
|
||||
cfg = config.my.applications.vim;
|
||||
in
|
||||
{
|
||||
imports = [
|
||||
./home
|
||||
./system.nix
|
||||
];
|
||||
|
||||
options.my.applications.vim = {
|
||||
enable = lib.mkEnableOption "vim text editor";
|
||||
};
|
||||
|
||||
config = lib.mkIf cfg.enable {
|
||||
my.applications.vim.system.enable = lib.mkDefault true;
|
||||
my.applications.vim.homeManager.enable = lib.mkDefault true;
|
||||
};
|
||||
}
|
||||
@@ -1,8 +0,0 @@
|
||||
_: {
|
||||
programs.nixvim.autoCmd = [
|
||||
{
|
||||
event = "TextYankPost";
|
||||
callback.__raw = "function() vim.highlight.on_yank() end";
|
||||
}
|
||||
];
|
||||
}
|
||||
@@ -1,6 +0,0 @@
|
||||
_: {
|
||||
programs.nixvim.colorschemes.catppuccin = {
|
||||
enable = true;
|
||||
settings.transparent_background = true;
|
||||
};
|
||||
}
|
||||
@@ -1,64 +0,0 @@
|
||||
{
|
||||
pkgs,
|
||||
unstable,
|
||||
inputs,
|
||||
lib,
|
||||
config,
|
||||
...
|
||||
}:
|
||||
let
|
||||
cfg = config.my.applications.vim.homeManager;
|
||||
in
|
||||
{
|
||||
options.my.applications.vim.homeManager = {
|
||||
enable = lib.mkEnableOption "vim home-manager configuration";
|
||||
};
|
||||
|
||||
config = lib.mkIf cfg.enable {
|
||||
home-manager.sharedModules = [
|
||||
inputs.nixvim.homeModules.nixvim
|
||||
./options.nix
|
||||
./autocmds.nix
|
||||
./keymaps.nix
|
||||
./language.nix
|
||||
./colorscheme.nix
|
||||
./lsp.nix
|
||||
./plugins
|
||||
{
|
||||
programs.nixvim = {
|
||||
enable = true;
|
||||
vimAlias = true;
|
||||
viAlias = true;
|
||||
withNodeJs = true;
|
||||
|
||||
nixpkgs = {
|
||||
source = pkgs.path;
|
||||
config.allowUnfree = true;
|
||||
};
|
||||
|
||||
extraPackages = with pkgs; [
|
||||
git
|
||||
ripgrep
|
||||
fd
|
||||
nodejs
|
||||
zellij
|
||||
|
||||
# LSP / formatter / misc
|
||||
vtsls
|
||||
vscode-langservers-extracted
|
||||
tailwindcss-language-server
|
||||
prettierd
|
||||
unstable.prettier
|
||||
biome
|
||||
stylua
|
||||
shfmt
|
||||
alejandra
|
||||
nixfmt
|
||||
lua-language-server
|
||||
nixd
|
||||
];
|
||||
};
|
||||
}
|
||||
];
|
||||
};
|
||||
}
|
||||
@@ -1,202 +0,0 @@
|
||||
_:
|
||||
let
|
||||
mk = key: action: desc: {
|
||||
mode = "n";
|
||||
inherit key action;
|
||||
options = {
|
||||
silent = true;
|
||||
inherit desc;
|
||||
};
|
||||
};
|
||||
|
||||
mkRaw = key: raw: desc: {
|
||||
mode = "n";
|
||||
inherit key;
|
||||
action.__raw = raw;
|
||||
options = {
|
||||
silent = true;
|
||||
inherit desc;
|
||||
};
|
||||
};
|
||||
|
||||
mkExpr = key: raw: desc: {
|
||||
mode = "n";
|
||||
inherit key;
|
||||
action.__raw = raw;
|
||||
options = {
|
||||
silent = true;
|
||||
expr = true;
|
||||
inherit desc;
|
||||
};
|
||||
};
|
||||
|
||||
mkSmartWindowNav = key: direction: zellijDirection: desc: {
|
||||
mode = "n";
|
||||
inherit key;
|
||||
action.__raw = ''
|
||||
function()
|
||||
local current_win = vim.api.nvim_get_current_win()
|
||||
vim.cmd.wincmd("${direction}")
|
||||
|
||||
local at_edge = vim.api.nvim_get_current_win() == current_win
|
||||
local in_zellij = vim.env.ZELLIJ ~= nil
|
||||
local has_zellij_cli = vim.fn.executable("zellij") == 1
|
||||
|
||||
if at_edge and in_zellij and has_zellij_cli then
|
||||
vim.system({ "zellij", "action", "move-focus-or-tab", "${zellijDirection}" })
|
||||
end
|
||||
end
|
||||
'';
|
||||
options = {
|
||||
silent = true;
|
||||
inherit desc;
|
||||
};
|
||||
};
|
||||
in
|
||||
{
|
||||
programs.nixvim = {
|
||||
opts = {
|
||||
# ジャンプ履歴をスタック寄りに扱う
|
||||
jumpoptions = "stack";
|
||||
|
||||
# 既に開いているバッファや直前のウィンドウを優先して再利用
|
||||
switchbuf = "useopen,uselast";
|
||||
};
|
||||
|
||||
keymaps = [
|
||||
# Search
|
||||
(mk "<Esc>" "<cmd>nohlsearch<CR>" "検索ハイライトを解除")
|
||||
|
||||
# Screen line movement
|
||||
(mkExpr "j" "function() return vim.v.count == 0 and 'gj' or 'j' end" "下へ移動(画面行優先)")
|
||||
(mkExpr "k" "function() return vim.v.count == 0 and 'gk' or 'k' end" "上へ移動(画面行優先)")
|
||||
|
||||
# LSP: hover / direct jump
|
||||
(mkRaw "K" "vim.lsp.buf.hover" "シンボル情報を表示")
|
||||
(mkRaw "gd" "vim.lsp.buf.definition" "定義へジャンプ")
|
||||
(mkRaw "grr" "vim.lsp.buf.references" "参照一覧を開く")
|
||||
(mkRaw "gri" "vim.lsp.buf.implementation" "実装一覧を開く")
|
||||
(mkRaw "grt" "vim.lsp.buf.type_definition" "型定義一覧を開く")
|
||||
(mkRaw "grn" "vim.lsp.buf.rename" "シンボル名を一括変換")
|
||||
(mkRaw "gra" "vim.lsp.buf.code_action" "コードアクション")
|
||||
(mkRaw "gO" "vim.lsp.buf.document_symbol" "現在ファイルのシンボル一覧")
|
||||
|
||||
# Glance: preview / peek
|
||||
(mk "gD" "<cmd>Glance definitions<CR>" "定義をプレビュー")
|
||||
(mk "gR" "<cmd>Glance references<CR>" "参照をプレビュー")
|
||||
(mk "gM" "<cmd>Glance implementations<CR>" "実装をプレビュー")
|
||||
(mk "gY" "<cmd>Glance type_definitions<CR>" "型定義をプレビュー")
|
||||
(mk "g." "<cmd>Glance resume<CR>" "直前のGlanceを再開")
|
||||
|
||||
# Convenience aliases
|
||||
(mkRaw "<leader>rn" "vim.lsp.buf.rename" "シンボル名を一括変換")
|
||||
(mkRaw "<leader>cf"
|
||||
"function() require('conform').format({ timeout_ms = 1000, lsp_format = 'fallback' }) end"
|
||||
"コードをフォーマット"
|
||||
)
|
||||
(mkRaw "<leader>ca" "vim.lsp.buf.code_action" "コードアクション")
|
||||
|
||||
# Diagnostics
|
||||
(mkRaw "]d" "vim.diagnostic.goto_next" "次の診断へ移動")
|
||||
(mkRaw "[d" "vim.diagnostic.goto_prev" "前の診断へ移動")
|
||||
(mkRaw "<leader>dl" "vim.diagnostic.open_float" "診断の詳細を表示")
|
||||
|
||||
# File tree
|
||||
(mk "<leader>e" "<cmd>Neotree toggle left<CR>" "ファイルツリー")
|
||||
|
||||
# Terminal
|
||||
(mk "<leader>tt" "<cmd>ToggleTerm direction=float<CR>" "ターミナル")
|
||||
|
||||
# Trouble
|
||||
(mk "<leader>xx" "<cmd>Trouble diagnostics toggle<CR>" "診断一覧")
|
||||
(mk "<leader>xq" "<cmd>Trouble qflist toggle<CR>" "Quickfix一覧")
|
||||
(mk "<leader>xl" "<cmd>Trouble loclist toggle<CR>" "Location List一覧")
|
||||
(mk "<leader>xs" "<cmd>Trouble symbols toggle<CR>" "シンボル一覧")
|
||||
(mk "<leader>xw" "<cmd>Trouble lsp toggle<CR>" "LSP一覧")
|
||||
|
||||
# Quickfix / Location list navigation
|
||||
(mk "]q" "<cmd>cnext<CR>" "次のQuickfixへ")
|
||||
(mk "[q" "<cmd>cprev<CR>" "前のQuickfixへ")
|
||||
(mk "]l" "<cmd>lnext<CR>" "次のLocation Listへ")
|
||||
(mk "[l" "<cmd>lprev<CR>" "前のLocation Listへ")
|
||||
|
||||
# Window navigation
|
||||
(mkSmartWindowNav "<C-h>" "h" "left" "左のウィンドウへ(端ならZellijペイン/タブへ)")
|
||||
(mkSmartWindowNav "<C-j>" "j" "down" "下のウィンドウへ(端ならZellijペインへ)")
|
||||
(mkSmartWindowNav "<C-k>" "k" "up" "上のウィンドウへ(端ならZellijペインへ)")
|
||||
(mkSmartWindowNav "<C-l>" "l" "right" "右のウィンドウへ(端ならZellijペイン/タブへ)")
|
||||
(mkSmartWindowNav "<C-Left>" "h" "left" "左のウィンドウへ(端ならZellijペイン/タブへ)")
|
||||
(mkSmartWindowNav "<C-Down>" "j" "down" "下のウィンドウへ(端ならZellijペインへ)")
|
||||
(mkSmartWindowNav "<C-Up>" "k" "up" "上のウィンドウへ(端ならZellijペインへ)")
|
||||
(mkSmartWindowNav "<C-Right>" "l" "right" "右のウィンドウへ(端ならZellijペイン/タブへ)")
|
||||
|
||||
# Alternate file / previous file
|
||||
(mk "<leader><leader>" "<C-^>" "直前のファイルへ戻る")
|
||||
(mk "<leader>w-" "<C-w><C-^>" "直前のファイルをsplitで開く")
|
||||
|
||||
# Buffer Bar
|
||||
(mk "[b" "<Cmd>BufferPrevious<CR>" "前のバッファーに移動")
|
||||
(mk "]b" "<Cmd>BufferNext<CR>" "次のバッファーに移動")
|
||||
(mk "<leader>bc" "<Cmd>BufferClose<CR>" "バッファーを閉じる")
|
||||
|
||||
# Git Conflict
|
||||
(mk "<leader>gco" "<cmd>GitConflictChooseOurs<CR>" "現在のブランチを選択")
|
||||
(mk "<leader>gct" "<cmd>GitConflictChooseTheirs<CR>" "相手のブランチを選択")
|
||||
(mk "<leader>gcb" "<cmd>GitConflictChooseBoth<CR>" "両方を選択")
|
||||
(mk "<leader>gcx" "<cmd>GitConflictListQf<CR>" "コンフリクト一覧")
|
||||
(mk "]x" "<cmd>GitConflictNextConflict<CR>" "次のコンフリクト")
|
||||
(mk "[x" "<cmd>GitConflictPrevConflict<CR>" "前のコンフリクト")
|
||||
|
||||
# Git
|
||||
(mk "<leader>gl" "<cmd>LazyGit<CR>" "LazyGitを開く")
|
||||
(mk "<leader>gd" "<cmd>DiffviewOpen<CR>" "差分を開く")
|
||||
(mk "<leader>gH" "<cmd>DiffviewFileHistory<CR>" "リポジトリ履歴")
|
||||
(mk "<leader>gh" "<cmd>DiffviewFileHistory %<CR>" "現在ファイルの履歴")
|
||||
(mk "<leader>gq" "<cmd>DiffviewClose<CR>" "差分を閉じる")
|
||||
|
||||
# Markview
|
||||
(mk "<leader>mp" "<cmd>Markview splitToggle<CR>" "Markdownプレビュー")
|
||||
|
||||
# Zen Mode
|
||||
(mk "<leader>zz" "<cmd>ZenMode<CR>" "Zen Modeを開く/閉じる")
|
||||
|
||||
# UFO (folding)
|
||||
(mkRaw "zR" "require('ufo').openAllFolds" "全て展開")
|
||||
(mkRaw "zM" "require('ufo').closeAllFolds" "全て折りたたむ")
|
||||
|
||||
# Dropbar
|
||||
(mkRaw "<leader>dp" "function() require('dropbar.api').pick() end" "dropbarでナビゲート")
|
||||
|
||||
# Snacks
|
||||
(mkRaw "<leader>sd" "function() Snacks.dim.toggle() end" "Dimモードをトグル")
|
||||
|
||||
# Flash
|
||||
(mkRaw "s" "function() require('flash').jump() end" "Flashジャンプ")
|
||||
(mkRaw "S" "function() require('flash').treesitter() end" "Flashツリーシッタ選択")
|
||||
|
||||
# Todo Comments
|
||||
(mk "]t" "<cmd>TodoNext<CR>" "次のTODO")
|
||||
(mk "[t" "<cmd>TodoPrev<CR>" "前のTODO")
|
||||
(mkRaw "<leader>ft" "function() Snacks.picker.todo_comments() end" "TODO一覧")
|
||||
|
||||
# Spectre
|
||||
(mkRaw "<leader>sr" "function() require('spectre').toggle() end" "検索・置換")
|
||||
|
||||
# Snacks Picker: generic
|
||||
(mkRaw "<leader>ff" "function() Snacks.picker.files() end" "ファイルを探す")
|
||||
(mkRaw "<leader>fg" "function() Snacks.picker.grep() end" "文字列を全文検索")
|
||||
(mkRaw "<leader>fb" "function() Snacks.picker.buffers() end" "開いているバッファを探す")
|
||||
(mkRaw "<leader>fh" "function() Snacks.picker.help() end" "ヘルプ項目を探す")
|
||||
(mkRaw "<leader>fk" "function() Snacks.picker.keymaps() end" "キーマップを探す")
|
||||
(mkRaw "<leader>fc" "function() Snacks.picker.commands() end" "コマンドを探す")
|
||||
|
||||
# Snacks Picker: code navigation
|
||||
(mkRaw "<leader>fs" "function() Snacks.picker.lsp_symbols() end" "現在ファイルのシンボルを探す")
|
||||
(mkRaw "<leader>fS" "function() Snacks.picker.lsp_workspace_symbols() end" "ワークスペース全体のシンボルを探す")
|
||||
(mkRaw "<leader>fr" "function() Snacks.picker.registers() end" "レジスタを探す")
|
||||
(mkRaw "<leader>fj" "function() Snacks.picker.jumps() end" "ジャンプ履歴を探す")
|
||||
(mkRaw "<leader>fq" "function() Snacks.picker.qflist() end" "Quickfixを探す")
|
||||
(mkRaw "<leader>fl" "function() Snacks.picker.loclist() end" "Location Listを探す")
|
||||
];
|
||||
};
|
||||
}
|
||||
@@ -1,13 +0,0 @@
|
||||
_: {
|
||||
programs.nixvim = {
|
||||
env = {
|
||||
LANG = "ja_JP.UTF-8";
|
||||
LC_MESSAGES = "ja_JP.UTF-8";
|
||||
};
|
||||
|
||||
extraConfigLua = ''
|
||||
vim.cmd.language("ja_JP.utf8")
|
||||
vim.opt.helplang = { "ja", "en" }
|
||||
'';
|
||||
};
|
||||
}
|
||||
@@ -1,65 +0,0 @@
|
||||
_: {
|
||||
programs.nixvim = {
|
||||
plugins.lsp = {
|
||||
enable = true;
|
||||
|
||||
servers = {
|
||||
# TypeScript / JavaScript
|
||||
vtsls = {
|
||||
enable = true;
|
||||
packageFallback = true;
|
||||
rootMarkers = [
|
||||
"pnpm-workspace.yaml"
|
||||
"package.json"
|
||||
"tsconfig.json"
|
||||
"jsconfig.json"
|
||||
".git"
|
||||
];
|
||||
extraOptions.settings.typescript.locale = "ja";
|
||||
};
|
||||
|
||||
# Biome for lint / format
|
||||
biome = {
|
||||
enable = true;
|
||||
packageFallback = true;
|
||||
rootMarkers = [
|
||||
"biome.json"
|
||||
"biome.jsonc"
|
||||
"package.json"
|
||||
"pnpm-workspace.yaml"
|
||||
".git"
|
||||
];
|
||||
};
|
||||
|
||||
# Frontend / config languages
|
||||
tailwindcss.enable = true;
|
||||
cssls.enable = true;
|
||||
jsonls.enable = true;
|
||||
yamlls.enable = true;
|
||||
lua_ls.enable = true;
|
||||
nixd.enable = true;
|
||||
|
||||
# Other languages
|
||||
rust_analyzer = {
|
||||
enable = true;
|
||||
installCargo = true;
|
||||
installRustc = true;
|
||||
};
|
||||
svelte.enable = true;
|
||||
ty.enable = true;
|
||||
ruff.enable = true;
|
||||
astro.enable = true;
|
||||
gopls.enable = true;
|
||||
};
|
||||
};
|
||||
|
||||
# Diagnostic UI
|
||||
diagnostic.settings = {
|
||||
virtual_text = true;
|
||||
float = {
|
||||
border = "rounded";
|
||||
source = true;
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
@@ -1,50 +0,0 @@
|
||||
_: {
|
||||
programs.nixvim = {
|
||||
opts = {
|
||||
# display
|
||||
number = true;
|
||||
relativenumber = true;
|
||||
signcolumn = "yes";
|
||||
termguicolors = true;
|
||||
|
||||
# action
|
||||
mouse = "a";
|
||||
clipboard = "unnamedplus";
|
||||
updatetime = 200;
|
||||
timeoutlen = 300;
|
||||
undofile = true;
|
||||
|
||||
# display
|
||||
wrap = false;
|
||||
scrolloff = 8;
|
||||
|
||||
# search
|
||||
ignorecase = true;
|
||||
smartcase = true;
|
||||
|
||||
# window split
|
||||
splitright = true;
|
||||
splitbelow = true;
|
||||
|
||||
# indent
|
||||
tabstop = 2;
|
||||
shiftwidth = 2;
|
||||
expandtab = true;
|
||||
|
||||
# file encoding
|
||||
encoding = "utf-8";
|
||||
fileencoding = "utf-8";
|
||||
fileencodings = "utf-8,sjis,euc-jp,iso-2022-jp";
|
||||
|
||||
# invisible characters
|
||||
list = true;
|
||||
listchars = "tab:»-,trail:-,extends:»,precedes:«,nbsp:%";
|
||||
};
|
||||
|
||||
globals = {
|
||||
mapleader = " ";
|
||||
maplocalleader = " ";
|
||||
clipboard = "osc52";
|
||||
};
|
||||
};
|
||||
}
|
||||
@@ -1,7 +0,0 @@
|
||||
{ ... }:
|
||||
{
|
||||
imports = [
|
||||
./editor
|
||||
./ui
|
||||
];
|
||||
}
|
||||
@@ -1,3 +0,0 @@
|
||||
_: {
|
||||
programs.nixvim.plugins.nvim-autopairs.enable = true;
|
||||
}
|
||||
@@ -1,56 +0,0 @@
|
||||
_: {
|
||||
programs.nixvim.plugins.blink-cmp = {
|
||||
enable = true;
|
||||
setupLspCapabilities = true;
|
||||
|
||||
settings = {
|
||||
keymap = {
|
||||
preset = "enter";
|
||||
|
||||
"<C-Space>" = [ "show" ];
|
||||
"<C-d>" = [ "scroll_documentation_up" ];
|
||||
"<C-e>" = [ "hide" ];
|
||||
"<C-f>" = [ "scroll_documentation_down" ];
|
||||
|
||||
"<Tab>" = [
|
||||
"accept"
|
||||
{
|
||||
__raw = ''
|
||||
function()
|
||||
local ok, copilot = pcall(require, "copilot.suggestion")
|
||||
if ok and copilot.is_visible() then
|
||||
copilot.accept()
|
||||
return true
|
||||
end
|
||||
end
|
||||
'';
|
||||
}
|
||||
"fallback"
|
||||
];
|
||||
"<S-Tab>" = [
|
||||
"select_prev"
|
||||
"fallback"
|
||||
];
|
||||
"<C-n>" = [
|
||||
"select_next"
|
||||
"fallback"
|
||||
];
|
||||
"<C-p>" = [
|
||||
"select_prev"
|
||||
"fallback"
|
||||
];
|
||||
};
|
||||
|
||||
completion.list.selection = {
|
||||
preselect = true;
|
||||
auto_insert = false;
|
||||
};
|
||||
|
||||
sources.default = [
|
||||
"lsp"
|
||||
"path"
|
||||
"buffer"
|
||||
];
|
||||
};
|
||||
};
|
||||
}
|
||||
@@ -1,3 +0,0 @@
|
||||
_: {
|
||||
programs.nixvim.plugins.comment.enable = true;
|
||||
}
|
||||
@@ -1,27 +0,0 @@
|
||||
_: {
|
||||
programs.nixvim.plugins."conform-nvim" = {
|
||||
enable = true;
|
||||
settings = {
|
||||
formatters_by_ft = {
|
||||
javascript.__raw = ''{ "biome", "prettierd", "prettier", stop_after_first = true }'';
|
||||
javascriptreact.__raw = ''{ "biome", "prettierd", "prettier", stop_after_first = true }'';
|
||||
typescript.__raw = ''{ "biome", "prettierd", "prettier", stop_after_first = true }'';
|
||||
typescriptreact.__raw = ''{ "biome", "prettierd", "prettier", stop_after_first = true }'';
|
||||
json.__raw = ''{ "biome", "prettierd", "prettier", stop_after_first = true }'';
|
||||
yaml.__raw = ''{ "prettierd", "prettier", stop_after_first = true }'';
|
||||
markdown.__raw = ''{ "prettierd", "prettier", stop_after_first = true }'';
|
||||
lua = [ "stylua" ];
|
||||
nix.__raw = ''{ "nix_fmt", "alejandra", stop_after_first = true }'';
|
||||
sh = [ "shfmt" ];
|
||||
};
|
||||
formatters.nix_fmt = {
|
||||
command = "nixfmt";
|
||||
};
|
||||
format_on_save.__raw = ''
|
||||
function(_)
|
||||
return { timeout_ms = 1000, lsp_format = "fallback" }
|
||||
end
|
||||
'';
|
||||
};
|
||||
};
|
||||
}
|
||||
@@ -1,11 +0,0 @@
|
||||
_: {
|
||||
programs.nixvim.plugins.copilot-lua = {
|
||||
enable = true;
|
||||
settings = {
|
||||
suggestion = {
|
||||
auto_trigger = true;
|
||||
keymap.enabled = false;
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
@@ -1,23 +0,0 @@
|
||||
{ ... }:
|
||||
{
|
||||
imports = [
|
||||
./autopairs.nix
|
||||
./blink-cmp.nix
|
||||
./comment.nix
|
||||
./conform.nix
|
||||
./copilot.nix
|
||||
./flash.nix
|
||||
./git-conflict.nix
|
||||
./git.nix
|
||||
./gitsigns.nix
|
||||
./glance.nix
|
||||
./lsp-signature.nix
|
||||
./snacks.nix
|
||||
./spectre.nix
|
||||
./surround.nix
|
||||
./todo-comments.nix
|
||||
./treesitter.nix
|
||||
./trouble.nix
|
||||
./wakatime.nix
|
||||
];
|
||||
}
|
||||
@@ -1,9 +0,0 @@
|
||||
{ pkgs, ... }:
|
||||
{
|
||||
programs.nixvim = {
|
||||
extraPlugins = [ pkgs.vimPlugins.flash-nvim ];
|
||||
extraConfigLua = ''
|
||||
require("flash").setup()
|
||||
'';
|
||||
};
|
||||
}
|
||||
@@ -1,9 +0,0 @@
|
||||
{ pkgs, ... }:
|
||||
{
|
||||
programs.nixvim = {
|
||||
extraPlugins = [ pkgs.vimPlugins.git-conflict-nvim ];
|
||||
extraConfigLua = ''
|
||||
require("git-conflict").setup()
|
||||
'';
|
||||
};
|
||||
}
|
||||
@@ -1,11 +0,0 @@
|
||||
{ pkgs, ... }:
|
||||
{
|
||||
programs.nixvim = {
|
||||
extraPackages = [ pkgs.lazygit ];
|
||||
|
||||
plugins = {
|
||||
lazygit.enable = true;
|
||||
diffview.enable = true;
|
||||
};
|
||||
};
|
||||
}
|
||||
@@ -1,25 +0,0 @@
|
||||
_: {
|
||||
# git change view
|
||||
programs.nixvim.plugins.gitsigns = {
|
||||
enable = true;
|
||||
settings = {
|
||||
signs = {
|
||||
add = {
|
||||
text = "+";
|
||||
};
|
||||
change = {
|
||||
text = "~";
|
||||
};
|
||||
delete = {
|
||||
text = "_";
|
||||
};
|
||||
topdelete = {
|
||||
text = "‾";
|
||||
};
|
||||
changedelete = {
|
||||
text = "~";
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
@@ -1,9 +0,0 @@
|
||||
{ pkgs, ... }:
|
||||
{
|
||||
programs.nixvim = {
|
||||
extraPlugins = [ pkgs.vimPlugins.glance-nvim ];
|
||||
extraConfigLua = ''
|
||||
require("glance").setup()
|
||||
'';
|
||||
};
|
||||
}
|
||||
@@ -1,11 +0,0 @@
|
||||
_: {
|
||||
programs.nixvim.plugins.lsp-signature = {
|
||||
enable = true;
|
||||
settings = {
|
||||
hint_enable = true;
|
||||
hint_prefix = " ";
|
||||
floating_window = true;
|
||||
bind = true;
|
||||
};
|
||||
};
|
||||
}
|
||||
@@ -1,32 +0,0 @@
|
||||
{ pkgs, ... }:
|
||||
{
|
||||
programs.nixvim = {
|
||||
extraPlugins = [ pkgs.vimPlugins.snacks-nvim ];
|
||||
|
||||
extraConfigLua = ''
|
||||
require("snacks").setup({
|
||||
picker = {
|
||||
enabled = true,
|
||||
|
||||
actions = require("trouble.sources.snacks").actions,
|
||||
|
||||
win = {
|
||||
input = {
|
||||
keys = {
|
||||
["<C-t>"] = {
|
||||
"trouble_open",
|
||||
mode = { "n", "i" },
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
|
||||
notifier = { enabled = true },
|
||||
words = { enabled = true },
|
||||
scroll = { enabled = true },
|
||||
dim = { enabled = true },
|
||||
})
|
||||
'';
|
||||
};
|
||||
}
|
||||
@@ -1,10 +0,0 @@
|
||||
{ pkgs, ... }:
|
||||
{
|
||||
programs.nixvim = {
|
||||
extraPackages = [ pkgs.ripgrep ];
|
||||
extraPlugins = [ pkgs.vimPlugins.nvim-spectre ];
|
||||
extraConfigLua = ''
|
||||
require("spectre").setup()
|
||||
'';
|
||||
};
|
||||
}
|
||||
@@ -1,3 +0,0 @@
|
||||
_: {
|
||||
programs.nixvim.plugins.nvim-surround.enable = true;
|
||||
}
|
||||
@@ -1,9 +0,0 @@
|
||||
{ pkgs, ... }:
|
||||
{
|
||||
programs.nixvim = {
|
||||
extraPlugins = [ pkgs.vimPlugins.todo-comments-nvim ];
|
||||
extraConfigLua = ''
|
||||
require("todo-comments").setup()
|
||||
'';
|
||||
};
|
||||
}
|
||||
@@ -1,17 +0,0 @@
|
||||
{ pkgs, ... }:
|
||||
{
|
||||
programs.nixvim = {
|
||||
plugins.treesitter = {
|
||||
enable = true;
|
||||
settings = {
|
||||
highlight.enable = true;
|
||||
indent.enable = true;
|
||||
};
|
||||
};
|
||||
|
||||
extraPlugins = [ pkgs.vimPlugins.nvim-ts-autotag ];
|
||||
extraConfigLua = ''
|
||||
require("nvim-ts-autotag").setup()
|
||||
'';
|
||||
};
|
||||
}
|
||||
@@ -1,3 +0,0 @@
|
||||
_: {
|
||||
programs.nixvim.plugins.trouble.enable = true;
|
||||
}
|
||||
@@ -1,4 +0,0 @@
|
||||
{ pkgs, ... }:
|
||||
{
|
||||
programs.nixvim.extraPlugins = [ pkgs.vimPlugins.vim-wakatime ];
|
||||
}
|
||||
@@ -1,26 +0,0 @@
|
||||
_: {
|
||||
programs.nixvim.plugins.barbar = {
|
||||
enable = true;
|
||||
settings = {
|
||||
animation = false;
|
||||
auto_hide = 1;
|
||||
tabpages = true;
|
||||
clickable = true;
|
||||
focus_on_close = "left";
|
||||
|
||||
icons = {
|
||||
button = "";
|
||||
separator = {
|
||||
left = "▎";
|
||||
right = "";
|
||||
};
|
||||
separator_at_end = false;
|
||||
filetype.enabled = true;
|
||||
};
|
||||
|
||||
sidebar_filetypes = {
|
||||
neo-tree = true;
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
@@ -1,20 +0,0 @@
|
||||
_: {
|
||||
programs.nixvim.plugins.indent-blankline = {
|
||||
enable = true;
|
||||
settings = {
|
||||
scope = {
|
||||
enabled = true;
|
||||
show_start = true;
|
||||
show_end = true;
|
||||
};
|
||||
exclude = {
|
||||
filetypes = [
|
||||
"help"
|
||||
"neo-tree"
|
||||
"toggleterm"
|
||||
"lazy"
|
||||
];
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
@@ -1,26 +0,0 @@
|
||||
_: {
|
||||
programs.nixvim.plugins.colorizer = {
|
||||
enable = true;
|
||||
|
||||
settings = {
|
||||
filetypes = [
|
||||
"*"
|
||||
"!markdown"
|
||||
];
|
||||
user_commands = true;
|
||||
|
||||
options = {
|
||||
parsers = {
|
||||
css = true;
|
||||
tailwind = {
|
||||
enable = true;
|
||||
lsp = true;
|
||||
update_names = true;
|
||||
};
|
||||
};
|
||||
|
||||
display.mode = "background";
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
@@ -1,20 +0,0 @@
|
||||
{ ... }:
|
||||
{
|
||||
imports = [
|
||||
./barbar.nix
|
||||
./blankline.nix
|
||||
./colorizer.nix
|
||||
./dropbar.nix
|
||||
./lightbulb.nix
|
||||
./lualine.nix
|
||||
./markview.nix
|
||||
./neo-tree.nix
|
||||
./scrollbar.nix
|
||||
./toggleterm.nix
|
||||
./treesitter.nix
|
||||
./ufo.nix
|
||||
./web-devicons.nix
|
||||
./which-key.nix
|
||||
./zen-mode.nix
|
||||
];
|
||||
}
|
||||
@@ -1,3 +0,0 @@
|
||||
_: {
|
||||
programs.nixvim.plugins.dropbar.enable = true;
|
||||
}
|
||||
@@ -1,6 +0,0 @@
|
||||
_: {
|
||||
programs.nixvim.plugins.nvim-lightbulb = {
|
||||
enable = true;
|
||||
settings.autocmd.enabled = true;
|
||||
};
|
||||
}
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user