mirror of
https://github.com/moons-14/dotfiles.git
synced 2026-10-07 03:14:09 +09:00
Compare commits
11
Commits
9771a85e3f
...
89eeb23d1c
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
89eeb23d1c | ||
|
|
bf94d1183f | ||
|
|
6bd05887db | ||
|
|
3e32c9874b | ||
|
|
684acef46c | ||
|
|
9061825c63 | ||
|
|
e703e1b31c | ||
|
|
79cc69045f | ||
|
|
5c2ff3cbcf | ||
|
|
c5d4de5a9d | ||
|
|
c58bdd30c3 |
@@ -4,6 +4,7 @@
|
||||
!README.md
|
||||
!LICENSE
|
||||
!AGENTS.md
|
||||
!/docs/
|
||||
|
||||
!.github/
|
||||
!.gitea/
|
||||
|
||||
@@ -0,0 +1,68 @@
|
||||
# Fingerprint Commands
|
||||
|
||||
This note covers the basic `fprintd` commands used by the fingerprint module.
|
||||
|
||||
## Enroll a new fingerprint
|
||||
|
||||
Register a fingerprint for the current user:
|
||||
|
||||
```sh
|
||||
fprintd-enroll $USER
|
||||
```
|
||||
|
||||
To enroll a specific finger, pass the finger name:
|
||||
|
||||
```sh
|
||||
fprintd-enroll -f right-index-finger $USER
|
||||
```
|
||||
|
||||
Common finger names include:
|
||||
|
||||
- `left-thumb`
|
||||
- `left-index-finger`
|
||||
- `right-thumb`
|
||||
- `right-index-finger`
|
||||
|
||||
Follow the prompts and swipe or touch the sensor until enrollment completes.
|
||||
|
||||
## List enrolled fingerprints
|
||||
|
||||
Show fingerprints registered for the current user:
|
||||
|
||||
```sh
|
||||
fprintd-list $USER
|
||||
```
|
||||
|
||||
You can also list fingerprints for another user:
|
||||
|
||||
```sh
|
||||
fprintd-list <username>
|
||||
```
|
||||
|
||||
## Delete fingerprints
|
||||
|
||||
Delete one enrolled fingerprint for the current user:
|
||||
|
||||
```sh
|
||||
fprintd-delete
|
||||
```
|
||||
|
||||
Delete all enrolled fingerprints for the current user:
|
||||
|
||||
```sh
|
||||
fprintd-delete $USER
|
||||
```
|
||||
|
||||
Delete fingerprints for another user:
|
||||
|
||||
```sh
|
||||
fprintd-delete <username>
|
||||
```
|
||||
|
||||
## Verify authentication
|
||||
|
||||
Test fingerprint authentication for the current user:
|
||||
|
||||
```sh
|
||||
fprintd-verify
|
||||
```
|
||||
+157
@@ -0,0 +1,157 @@
|
||||
# NixOSインストール手順
|
||||
|
||||
## 事前準備
|
||||
|
||||
1. [ISOビルド](iso-build.md)を参照してISOを作成
|
||||
2. USBに書き込んで対象マシンでブート
|
||||
|
||||
## ネットワーク接続
|
||||
|
||||
### 有線LAN
|
||||
|
||||
DHCPで自動設定される。
|
||||
|
||||
### WiFi(有線が使えない場合)
|
||||
|
||||
```bash
|
||||
nmcli device wifi connect <SSID> --ask
|
||||
```
|
||||
|
||||
## SSH接続
|
||||
|
||||
コンソールに表示されたIPアドレスに接続:
|
||||
|
||||
```bash
|
||||
ssh root@<ip-address>
|
||||
```
|
||||
|
||||
## インストール手順
|
||||
|
||||
### 1. dotfilesのクローン
|
||||
|
||||
```bash
|
||||
git clone [email protected]:moons-14/dotfiles.git ~/dotfiles
|
||||
```
|
||||
|
||||
### 2. SSHホストキーの生成
|
||||
|
||||
新しいホスト用のSSHホストキーを生成:
|
||||
|
||||
```bash
|
||||
ssh-keygen -t ed25519 -f /tmp/ssh_host_ed25519_key -N ""
|
||||
```
|
||||
|
||||
### 3. age公開鍵の取得
|
||||
|
||||
SSHホストキーからage公開鍵を取得:
|
||||
|
||||
```bash
|
||||
ssh-to-age -i /tmp/ssh_host_ed25519_key.pub
|
||||
```
|
||||
|
||||
出力されたage公開鍵をコピー。
|
||||
|
||||
### 4. .sops.yamlの編集
|
||||
|
||||
```bash
|
||||
cd ~/dotfiles
|
||||
vim .sops.yaml
|
||||
```
|
||||
|
||||
以下を追加:
|
||||
|
||||
```yaml
|
||||
keys:
|
||||
- &host_<hostname> <age公開鍵>
|
||||
|
||||
creation_rules:
|
||||
- path_regex: ^secrets/hosts/<hostname>/[^/]+\.ya?ml$
|
||||
key_groups:
|
||||
- age:
|
||||
- *admin_yubikey1
|
||||
- *host_<hostname>
|
||||
```
|
||||
|
||||
### 5. シークレットの再暗号化
|
||||
|
||||
```bash
|
||||
sops updatekeys secrets/common/system.yaml
|
||||
sops updatekeys secrets/hosts/<hostname>/*.yaml
|
||||
```
|
||||
|
||||
### 6. disko設定の作成
|
||||
|
||||
新しいホスト用の`hosts/<hostname>/disko.nix`を作成。
|
||||
|
||||
#### シンプル構成(暗号化なし)
|
||||
|
||||
```nix
|
||||
_:
|
||||
{
|
||||
disko.enableConfig = true;
|
||||
|
||||
disko.devices.disk.main = {
|
||||
type = "disk";
|
||||
device = "/dev/sda";
|
||||
content = {
|
||||
type = "gpt";
|
||||
partitions = {
|
||||
ESP = {
|
||||
size = "512M";
|
||||
type = "EF00";
|
||||
content = {
|
||||
type = "filesystem";
|
||||
format = "vfat";
|
||||
mountpoint = "/boot";
|
||||
};
|
||||
};
|
||||
root = {
|
||||
size = "100%";
|
||||
content = {
|
||||
type = "filesystem";
|
||||
format = "ext4";
|
||||
mountpoint = "/";
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
```
|
||||
|
||||
#### LUKS暗号化 + btrfs
|
||||
|
||||
`hosts/x1g13/disko.nix`を参照。
|
||||
|
||||
### 7. ディスクのパーティション
|
||||
|
||||
```bash
|
||||
cd ~/dotfiles
|
||||
nix run github:nix-community/disko -- --mode disko hosts/<hostname>/disko.nix
|
||||
```
|
||||
|
||||
### 8. ホストキーのコピー
|
||||
|
||||
```bash
|
||||
mkdir -p /mnt/etc/ssh
|
||||
cp /tmp/ssh_host_ed25519_key* /mnt/etc/ssh/
|
||||
chmod 600 /mnt/etc/ssh/ssh_host_ed25519_key
|
||||
```
|
||||
|
||||
### 9. NixOSインストール
|
||||
|
||||
```bash
|
||||
nixos-install --flake ~/dotfiles#<hostname>
|
||||
```
|
||||
|
||||
### 10. 再起動
|
||||
|
||||
```bash
|
||||
reboot
|
||||
```
|
||||
|
||||
## インストール後の確認
|
||||
|
||||
- SSHでログインできるか
|
||||
- sopsシークレットが復号できるか
|
||||
- diskoでパーティションが正しく設定されているか
|
||||
@@ -0,0 +1,26 @@
|
||||
# カスタムISOビルド
|
||||
|
||||
## ビルド
|
||||
|
||||
```bash
|
||||
nix build .#nixosConfigurations.installer.config.system.build.isoImage
|
||||
```
|
||||
|
||||
## ISO書き込み
|
||||
|
||||
```bash
|
||||
# USBデバイスの確認
|
||||
lsblk
|
||||
|
||||
# 書き込み(/dev/sdXは実際のデバイスに置き換える)
|
||||
sudo dd if=./result/nixos-minimal-*.iso of=/dev/sdX bs=4M status=progress
|
||||
sync
|
||||
```
|
||||
|
||||
## ISOの特徴
|
||||
|
||||
- SSH鍵認証でrootログイン可能
|
||||
- 有線LANはDHCPで自動設定
|
||||
- WiFiは`nmcli`で手動設定可能
|
||||
- disko/sops/ageなどのツールを内蔵
|
||||
- ブート時にIPアドレスとヘルプを表示
|
||||
@@ -0,0 +1,17 @@
|
||||
# Generate Sops key file
|
||||
|
||||
```bash
|
||||
mkdir -p ~/.config/sops/age
|
||||
chmod 700 ~/.config/sops/age
|
||||
|
||||
age-plugin-yubikey --identity --slot 1 \
|
||||
> ~/.config/sops/age/yubikey-identity.txt
|
||||
|
||||
chmod 600 ~/.config/sops/age/yubikey-identity.txt
|
||||
```
|
||||
|
||||
## Edit sops file
|
||||
|
||||
```bash
|
||||
sops secrets/common/system.yaml
|
||||
```
|
||||
+6
-2
@@ -1,13 +1,17 @@
|
||||
{
|
||||
x1g9 = {
|
||||
system = "x86_64-linux";
|
||||
stateVersion = "26.05";
|
||||
user = "moons";
|
||||
path = ./x1g9;
|
||||
|
||||
profiles = [
|
||||
"base"
|
||||
"interface.cli-minimal"
|
||||
"platform.laptop"
|
||||
"interface.gui"
|
||||
"platform.thinkpad"
|
||||
"workload.development"
|
||||
"workload.personal"
|
||||
"workload.tailscale.client"
|
||||
];
|
||||
};
|
||||
}
|
||||
|
||||
@@ -0,0 +1,52 @@
|
||||
# Do not modify this file! It was generated by ‘nixos-generate-config’
|
||||
# and may be overwritten by future invocations. Please make changes
|
||||
# to /etc/nixos/configuration.nix instead.
|
||||
{
|
||||
config,
|
||||
lib,
|
||||
modulesPath,
|
||||
...
|
||||
}:
|
||||
|
||||
{
|
||||
imports = [
|
||||
(modulesPath + "/installer/scan/not-detected.nix")
|
||||
];
|
||||
|
||||
boot.initrd.availableKernelModules = [
|
||||
"xhci_pci"
|
||||
"thunderbolt"
|
||||
"nvme"
|
||||
"usb_storage"
|
||||
"sd_mod"
|
||||
];
|
||||
boot.initrd.kernelModules = [ ];
|
||||
boot.kernelModules = [ ];
|
||||
boot.extraModulePackages = [ ];
|
||||
|
||||
fileSystems."/" = {
|
||||
device = "/dev/disk/by-uuid/16b29578-6836-414b-a5e1-863bc21c5fc3";
|
||||
fsType = "ext4";
|
||||
};
|
||||
|
||||
fileSystems."/boot" = {
|
||||
device = "/dev/disk/by-uuid/209A-C8C9";
|
||||
fsType = "vfat";
|
||||
options = [
|
||||
"fmask=0077"
|
||||
"dmask=0077"
|
||||
];
|
||||
};
|
||||
|
||||
swapDevices = [ ];
|
||||
|
||||
# Enables DHCP on each ethernet and wireless interface. In case of scripted networking
|
||||
# (the default) this is the recommended approach. When using systemd-networkd it's
|
||||
# still possible to use this option, but it's recommended to use it in conjunction
|
||||
# with explicit per-interface declarations with `networking.interfaces.<interface>.useDHCP`.
|
||||
networking.useDHCP = lib.mkDefault true;
|
||||
# networking.interfaces.wlp0s20f3.useDHCP = lib.mkDefault true;
|
||||
|
||||
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
|
||||
hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
|
||||
}
|
||||
@@ -1 +0,0 @@
|
||||
{ }
|
||||
@@ -1,7 +1,5 @@
|
||||
{
|
||||
imports = [
|
||||
./hardware.nix
|
||||
./hardware-configuration.nix
|
||||
];
|
||||
|
||||
system.stateVersion = "26.05";
|
||||
}
|
||||
|
||||
+24
-10
@@ -37,16 +37,25 @@ let
|
||||
"${name}: path must name an existing host directory"
|
||||
(
|
||||
ensure
|
||||
(lib.all
|
||||
(field: builtins.isList (spec.${field} or [ ]) && lib.all builtins.isString (spec.${field} or [ ]))
|
||||
[
|
||||
"profiles"
|
||||
"applications"
|
||||
"units"
|
||||
]
|
||||
(
|
||||
spec ? stateVersion
|
||||
&& builtins.isString spec.stateVersion
|
||||
&& builtins.match "[0-9][0-9]\\.[0-9][0-9]" spec.stateVersion != null
|
||||
)
|
||||
"${name}: stateVersion is required and must have the form YY.MM"
|
||||
(
|
||||
ensure
|
||||
(lib.all
|
||||
(field: builtins.isList (spec.${field} or [ ]) && lib.all builtins.isString (spec.${field} or [ ]))
|
||||
[
|
||||
"profiles"
|
||||
"applications"
|
||||
"units"
|
||||
]
|
||||
)
|
||||
"${name}: profiles, applications, and units must be lists of strings"
|
||||
(ensure (builtins.isBool (spec.homeManager or true)) "${name}: homeManager must be a boolean" spec)
|
||||
)
|
||||
"${name}: profiles, applications, and units must be lists of strings"
|
||||
(ensure (builtins.isBool (spec.homeManager or true)) "${name}: homeManager must be a boolean" spec)
|
||||
)
|
||||
)
|
||||
)
|
||||
@@ -67,6 +76,7 @@ let
|
||||
homeModules = [
|
||||
(registry.mkModule { class = "home"; })
|
||||
(registry.mkSelectionModule selected)
|
||||
{ home.stateVersion = spec.stateVersion; }
|
||||
]
|
||||
++ lib.optional (homePath != null) homePath;
|
||||
in
|
||||
@@ -88,6 +98,7 @@ let
|
||||
homeModules = [
|
||||
(registry.mkModule { class = "home"; })
|
||||
(registry.mkSelectionModule selected)
|
||||
{ home.stateVersion = spec.stateVersion; }
|
||||
]
|
||||
++ lib.optional (homePath != null) homePath;
|
||||
in
|
||||
@@ -111,7 +122,10 @@ let
|
||||
modules = [
|
||||
(registry.mkModule { class = "nixos"; })
|
||||
(registry.mkSelectionModule selected)
|
||||
{ networking.hostName = lib.mkDefault name; }
|
||||
{
|
||||
networking.hostName = lib.mkDefault name;
|
||||
system.stateVersion = spec.stateVersion;
|
||||
}
|
||||
]
|
||||
++ lib.optional (spec.homeManager or true) (mkHomeManagerModule name spec selected)
|
||||
++ lib.optional (nixosPath != null) nixosPath;
|
||||
|
||||
@@ -0,0 +1,8 @@
|
||||
{
|
||||
# The macOS app must live in /Applications for its background integrations,
|
||||
# including the SSH agent, to work correctly.
|
||||
homebrew = {
|
||||
enable = true;
|
||||
casks = [ "1password" ];
|
||||
};
|
||||
}
|
||||
@@ -0,0 +1,7 @@
|
||||
{ pkgs, ... }:
|
||||
{
|
||||
home.packages = [
|
||||
pkgs._1password-cli
|
||||
]
|
||||
++ pkgs.lib.optionals pkgs.stdenv.hostPlatform.isLinux [ pkgs._1password-gui ];
|
||||
}
|
||||
@@ -0,0 +1,12 @@
|
||||
{ primaryUser, lib, ... }:
|
||||
{
|
||||
programs._1password.enable = true;
|
||||
programs._1password-gui = {
|
||||
enable = true;
|
||||
polkitPolicyOwners = [ primaryUser ];
|
||||
};
|
||||
|
||||
programs.ssh.startAgent = lib.mkForce false;
|
||||
programs.gnupg.agent.enableSSHSupport = lib.mkForce false;
|
||||
services.gnome.gcr-ssh-agent.enable = lib.mkForce false;
|
||||
}
|
||||
@@ -0,0 +1,4 @@
|
||||
{ pkgs, ... }:
|
||||
{
|
||||
home.packages = [ pkgs.arduino-cli ];
|
||||
}
|
||||
@@ -0,0 +1,14 @@
|
||||
{ pkgs, ... }:
|
||||
let
|
||||
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
|
||||
{
|
||||
environment.systemPackages = [ arduinoIdeX11 ];
|
||||
}
|
||||
@@ -0,0 +1,4 @@
|
||||
{ pkgs, ... }:
|
||||
{
|
||||
home.packages = [ pkgs.google-chrome ];
|
||||
}
|
||||
@@ -0,0 +1,25 @@
|
||||
{ pkgs, ... }:
|
||||
let
|
||||
chromeLauncher = pkgs.makeDesktopItem {
|
||||
name = "google-chrome";
|
||||
desktopName = "Google Chrome";
|
||||
genericName = "Web Browser";
|
||||
exec = "${pkgs.google-chrome}/bin/google-chrome-stable --enable-features=TouchpadOverscrollHistoryNavigation %U";
|
||||
icon = "google-chrome";
|
||||
terminal = false;
|
||||
categories = [
|
||||
"Network"
|
||||
"WebBrowser"
|
||||
];
|
||||
startupNotify = true;
|
||||
};
|
||||
in
|
||||
{
|
||||
environment.systemPackages = [ chromeLauncher ];
|
||||
|
||||
xdg.mime.defaultApplications = {
|
||||
"text/html" = "google-chrome.desktop";
|
||||
"x-scheme-handler/http" = "google-chrome.desktop";
|
||||
"x-scheme-handler/https" = "google-chrome.desktop";
|
||||
};
|
||||
}
|
||||
@@ -0,0 +1,8 @@
|
||||
{
|
||||
# The former Codex app cask is deprecated in favor of ChatGPT, whose desktop
|
||||
# application includes the current Codex experience on macOS.
|
||||
homebrew = {
|
||||
enable = true;
|
||||
casks = [ "chatgpt" ];
|
||||
};
|
||||
}
|
||||
@@ -0,0 +1,10 @@
|
||||
{ inputs, ... }:
|
||||
{
|
||||
description = "Codex Desktop for Linux";
|
||||
|
||||
includes = [ "applications.codex" ];
|
||||
|
||||
imports.nixos = [
|
||||
inputs.codex-desktop-linux.nixosModules.default
|
||||
];
|
||||
}
|
||||
@@ -0,0 +1,37 @@
|
||||
{
|
||||
inputs,
|
||||
lib,
|
||||
pkgs,
|
||||
...
|
||||
}:
|
||||
let
|
||||
codexCliPackage = inputs.llm-agents.packages.${pkgs.stdenv.hostPlatform.system}.codex;
|
||||
codexDesktopPackage =
|
||||
inputs.codex-desktop-linux.packages.${pkgs.stdenv.hostPlatform.system}.codex-desktop-computer-use-ui;
|
||||
launcher = pkgs.makeDesktopItem {
|
||||
name = "codex";
|
||||
desktopName = "Codex";
|
||||
genericName = "ChatGPT Desktop";
|
||||
comment = "Run Codex Desktop";
|
||||
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" ];
|
||||
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";
|
||||
};
|
||||
};
|
||||
in
|
||||
{
|
||||
programs.codexDesktopLinux = {
|
||||
enable = true;
|
||||
package = codexDesktopPackage;
|
||||
cliPackage = codexCliPackage;
|
||||
computerUseUi.enable = true;
|
||||
};
|
||||
|
||||
environment.systemPackages = [ launcher ];
|
||||
}
|
||||
@@ -0,0 +1,6 @@
|
||||
{ inputs, pkgs, ... }:
|
||||
{
|
||||
home.packages = [
|
||||
inputs.llm-agents.packages.${pkgs.stdenv.hostPlatform.system}.codex
|
||||
];
|
||||
}
|
||||
@@ -0,0 +1,6 @@
|
||||
{
|
||||
programs.direnv = {
|
||||
enable = true;
|
||||
nix-direnv.enable = true;
|
||||
};
|
||||
}
|
||||
@@ -0,0 +1,3 @@
|
||||
{
|
||||
programs.vesktop.enable = true;
|
||||
}
|
||||
@@ -0,0 +1,6 @@
|
||||
{
|
||||
homebrew = {
|
||||
enable = true;
|
||||
casks = [ "orbstack" ];
|
||||
};
|
||||
}
|
||||
@@ -0,0 +1,7 @@
|
||||
{ pkgs, ... }:
|
||||
{
|
||||
home.packages = [
|
||||
pkgs.docker-client
|
||||
pkgs.oxker
|
||||
];
|
||||
}
|
||||
@@ -0,0 +1,5 @@
|
||||
{
|
||||
description = "Docker command-line client and NixOS daemon";
|
||||
|
||||
includes = [ "services.docker" ];
|
||||
}
|
||||
@@ -0,0 +1,6 @@
|
||||
{
|
||||
home.file.".config/fcitx5/config" = {
|
||||
recursive = true;
|
||||
source = ./config;
|
||||
};
|
||||
}
|
||||
@@ -0,0 +1,34 @@
|
||||
{ pkgs, ... }:
|
||||
{
|
||||
i18n.inputMethod = {
|
||||
enable = true;
|
||||
type = "fcitx5";
|
||||
|
||||
fcitx5 = {
|
||||
waylandFrontend = true;
|
||||
addons = with pkgs; [
|
||||
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 = "";
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
@@ -0,0 +1,6 @@
|
||||
{
|
||||
homebrew = {
|
||||
enable = true;
|
||||
casks = [ "ghostty" ];
|
||||
};
|
||||
}
|
||||
@@ -0,0 +1,44 @@
|
||||
# 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
|
||||
@@ -0,0 +1,49 @@
|
||||
{
|
||||
inputs,
|
||||
pkgs,
|
||||
...
|
||||
}:
|
||||
let
|
||||
package =
|
||||
if pkgs.stdenv.hostPlatform.isLinux then
|
||||
inputs.ghostty.packages.${pkgs.stdenv.hostPlatform.system}.ghostty-releasefast
|
||||
else
|
||||
null;
|
||||
in
|
||||
{
|
||||
programs.ghostty = {
|
||||
enable = true;
|
||||
inherit package;
|
||||
systemd.enable = pkgs.stdenv.hostPlatform.isLinux;
|
||||
|
||||
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 = [
|
||||
"performable:ctrl+shift+c=copy_to_clipboard"
|
||||
"ctrl+shift+v=paste_from_clipboard"
|
||||
"ctrl+shift+t=new_tab"
|
||||
"ctrl+alt+left_bracket=previous_tab"
|
||||
"ctrl+alt+right_bracket=next_tab"
|
||||
"ctrl+alt+q=close_window"
|
||||
"ctrl+shift+semicolon=increase_font_size:1"
|
||||
"ctrl+shift+minus=decrease_font_size:1"
|
||||
];
|
||||
|
||||
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;
|
||||
}
|
||||
@@ -0,0 +1,78 @@
|
||||
{ pkgs, ... }:
|
||||
let
|
||||
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
|
||||
{
|
||||
home.packages = [ pkgs.gh ];
|
||||
|
||||
home.file.${signingKeyPath}.text = ''
|
||||
ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIPLwReAiwhXoO34S2+MrvqUhi8IWp4IzUq4OSp3niJdq 1password-git-signing
|
||||
'';
|
||||
|
||||
programs.git = {
|
||||
enable = true;
|
||||
|
||||
ignores = [
|
||||
".direnv/"
|
||||
".envrc"
|
||||
"!.envrc.example"
|
||||
];
|
||||
|
||||
signing = {
|
||||
key = signingKeyFile;
|
||||
format = "ssh";
|
||||
signByDefault = true;
|
||||
};
|
||||
|
||||
settings = {
|
||||
user = {
|
||||
name = "moons";
|
||||
email = "moons@moons14.com";
|
||||
};
|
||||
|
||||
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";
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
@@ -0,0 +1,56 @@
|
||||
{ pkgs, lib, ... }:
|
||||
lib.mkIf pkgs.stdenv.hostPlatform.isLinux {
|
||||
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"
|
||||
];
|
||||
};
|
||||
}
|
||||
@@ -0,0 +1,10 @@
|
||||
{ pkgs, lib, ... }:
|
||||
{
|
||||
services.desktopManager.gnome.enable = true;
|
||||
services.displayManager.gdm.enable = lib.mkForce false;
|
||||
|
||||
environment.systemPackages = [
|
||||
pkgs.gnome-tweaks
|
||||
pkgs.gnome-extension-manager
|
||||
];
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
{ pkgs, ... }:
|
||||
{
|
||||
home.packages = [ pkgs.gnupg ];
|
||||
|
||||
services.gpg-agent = {
|
||||
enable = false;
|
||||
enableSshSupport = false;
|
||||
};
|
||||
}
|
||||
@@ -0,0 +1,6 @@
|
||||
{
|
||||
programs.gnupg.agent = {
|
||||
enable = true;
|
||||
enableSSHSupport = false;
|
||||
};
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
{ inputs, pkgs, ... }:
|
||||
let
|
||||
grok = inputs.llm-agents.packages.${pkgs.stdenv.hostPlatform.system}.grok.overrideAttrs (_: {
|
||||
versionCheckProgram = "${placeholder "out"}/libexec/grok/grok-launcher";
|
||||
});
|
||||
in
|
||||
{
|
||||
home.packages = [ grok ];
|
||||
}
|
||||
@@ -0,0 +1,18 @@
|
||||
{ pkgs, ... }:
|
||||
{
|
||||
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";
|
||||
};
|
||||
};
|
||||
}
|
||||
@@ -0,0 +1,5 @@
|
||||
{
|
||||
programs.dconf.enable = true;
|
||||
programs.seahorse.enable = true;
|
||||
services.gnome.gnome-keyring.enable = true;
|
||||
}
|
||||
@@ -0,0 +1,12 @@
|
||||
{ pkgs, ... }:
|
||||
{
|
||||
programs.java = {
|
||||
enable = true;
|
||||
package = pkgs.jdk25;
|
||||
};
|
||||
|
||||
home.packages = with pkgs; [
|
||||
maven
|
||||
gradle
|
||||
];
|
||||
}
|
||||
@@ -0,0 +1,6 @@
|
||||
{
|
||||
homebrew = {
|
||||
enable = true;
|
||||
casks = [ "kde-connect" ];
|
||||
};
|
||||
}
|
||||
@@ -0,0 +1,3 @@
|
||||
{
|
||||
programs.kdeconnect.enable = true;
|
||||
}
|
||||
@@ -0,0 +1,8 @@
|
||||
{ pkgs, lib, ... }:
|
||||
lib.mkIf pkgs.stdenv.hostPlatform.isLinux {
|
||||
home.packages = [
|
||||
pkgs.nautilus
|
||||
pkgs.gvfs
|
||||
pkgs.sushi
|
||||
];
|
||||
}
|
||||
@@ -0,0 +1,5 @@
|
||||
{ config, pkgs, ... }:
|
||||
{
|
||||
home.packages = [ pkgs.nh ];
|
||||
home.sessionVariables.NH_FLAKE = "${config.home.homeDirectory}/dotfiles";
|
||||
}
|
||||
@@ -0,0 +1,12 @@
|
||||
{ primaryUser, ... }:
|
||||
{
|
||||
programs.nh = {
|
||||
enable = true;
|
||||
flake = "/home/${primaryUser}/dotfiles";
|
||||
clean = {
|
||||
enable = true;
|
||||
dates = "weekly";
|
||||
extraArgs = "--keep-since 14d --keep 10";
|
||||
};
|
||||
};
|
||||
}
|
||||
@@ -0,0 +1,189 @@
|
||||
{ lib, pkgs, ... }:
|
||||
let
|
||||
keybindings = import ./keybindings.nix;
|
||||
in
|
||||
{
|
||||
programs.niri.settings = {
|
||||
input = {
|
||||
touchpad = {
|
||||
natural-scroll = true;
|
||||
scroll-factor = 4.0;
|
||||
scroll-method = "two-finger";
|
||||
click-method = "clickfinger";
|
||||
drag = true;
|
||||
drag-lock = true;
|
||||
};
|
||||
|
||||
keyboard.xkb = {
|
||||
layout = "jp";
|
||||
options = "ctrl:nocaps";
|
||||
};
|
||||
|
||||
mouse = {
|
||||
accel-profile = "flat";
|
||||
accel-speed = -0.1;
|
||||
};
|
||||
|
||||
warp-mouse-to-focus.enable = true;
|
||||
focus-follows-mouse = {
|
||||
enable = true;
|
||||
max-scroll-amount = "0%";
|
||||
};
|
||||
};
|
||||
|
||||
cursor.size = 16;
|
||||
|
||||
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 = keybindings // {
|
||||
"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";
|
||||
};
|
||||
|
||||
"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";
|
||||
};
|
||||
|
||||
"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;
|
||||
};
|
||||
}
|
||||
@@ -0,0 +1,160 @@
|
||||
{
|
||||
"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 = { };
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
{ inputs, ... }:
|
||||
{
|
||||
description = "niri Wayland compositor";
|
||||
|
||||
includes = [ "systems.wayland" ];
|
||||
|
||||
imports = {
|
||||
nixos = [ inputs.niri-flake.nixosModules.niri ];
|
||||
home = [ ./niri-home-module.nix ];
|
||||
};
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
{
|
||||
inputs,
|
||||
lib,
|
||||
system,
|
||||
...
|
||||
}:
|
||||
{
|
||||
imports = lib.optional (lib.hasSuffix "-darwin" system) inputs.niri-flake.homeModules.niri;
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
{ pkgs, ... }:
|
||||
{
|
||||
programs.niri.enable = true;
|
||||
|
||||
environment.systemPackages = with pkgs; [
|
||||
wdisplays # Wayland display configuration GUI
|
||||
wlr-randr # Wayland output management CLI
|
||||
];
|
||||
}
|
||||
@@ -0,0 +1,4 @@
|
||||
{
|
||||
programs.nix-index.enable = true;
|
||||
programs.nix-index-database.comma.enable = true;
|
||||
}
|
||||
@@ -0,0 +1,8 @@
|
||||
{ inputs, ... }:
|
||||
{
|
||||
description = "nix-index and the comma command runner";
|
||||
|
||||
imports.home = [
|
||||
inputs.nix-index-database.homeModules.default
|
||||
];
|
||||
}
|
||||
@@ -0,0 +1,168 @@
|
||||
{ pkgs, ... }:
|
||||
let
|
||||
wallpapers = pkgs.fetchFromGitHub {
|
||||
owner = "moons-14";
|
||||
repo = "wallpapers";
|
||||
rev = "cc3256f4aaf2c8e7d16fb000b1ee251af54085db";
|
||||
hash = "sha256-emQ/FqKqMq3YI5bLx8gBZg/ZE72OG9Ilh71ggq78WdQ=";
|
||||
};
|
||||
in
|
||||
{
|
||||
home.packages = [ pkgs.networkmanagerapplet ];
|
||||
|
||||
home.file = {
|
||||
".face".source = ../../../images/avatar.jpg;
|
||||
".wallpapers" = {
|
||||
source = wallpapers;
|
||||
recursive = true;
|
||||
};
|
||||
};
|
||||
|
||||
programs.noctalia = {
|
||||
enable = true;
|
||||
systemd.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;
|
||||
};
|
||||
|
||||
bar.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"
|
||||
];
|
||||
};
|
||||
|
||||
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" ];
|
||||
};
|
||||
};
|
||||
|
||||
shell = {
|
||||
avatar_path = "~/.face";
|
||||
corner_radius_scale = 0.2;
|
||||
clipboard_enabled = false;
|
||||
launch_apps_as_systemd_services = true;
|
||||
};
|
||||
|
||||
wallpaper = {
|
||||
enabled = true;
|
||||
directory = "~/.wallpapers";
|
||||
fill_mode = "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;
|
||||
active_monitor_only = true;
|
||||
reserve_space = false;
|
||||
pinned = [
|
||||
"com.mitchellh.ghostty"
|
||||
"google-chrome"
|
||||
"code"
|
||||
];
|
||||
};
|
||||
|
||||
control_center.shortcuts = [
|
||||
{ type = "wifi"; }
|
||||
{ type = "bluetooth"; }
|
||||
{ type = "screen_recorder"; }
|
||||
{ type = "wallpaper"; }
|
||||
{ type = "notifications"; }
|
||||
{ type = "nightlight"; }
|
||||
];
|
||||
};
|
||||
};
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
{ inputs, ... }:
|
||||
{
|
||||
description = "Noctalia Wayland desktop shell";
|
||||
|
||||
imports = {
|
||||
nixos = [ inputs.noctalia.nixosModules.default ];
|
||||
home = [ inputs.noctalia.homeModules.default ];
|
||||
};
|
||||
}
|
||||
@@ -0,0 +1,6 @@
|
||||
{
|
||||
programs.noctalia = {
|
||||
enable = true;
|
||||
recommendedServices.enable = true;
|
||||
};
|
||||
}
|
||||
@@ -0,0 +1,6 @@
|
||||
{ inputs, pkgs, ... }:
|
||||
{
|
||||
home.packages = [
|
||||
inputs.llm-agents.packages.${pkgs.stdenv.hostPlatform.system}.opencode
|
||||
];
|
||||
}
|
||||
@@ -0,0 +1,4 @@
|
||||
{ pkgs, ... }:
|
||||
{
|
||||
home.packages = [ pkgs.slack ];
|
||||
}
|
||||
@@ -0,0 +1,37 @@
|
||||
{ lib, pkgs, ... }:
|
||||
lib.mkMerge [
|
||||
{
|
||||
home.packages = [ pkgs.openssh ];
|
||||
|
||||
programs.ssh = {
|
||||
enable = true;
|
||||
enableDefaultConfig = false;
|
||||
|
||||
settings = {
|
||||
"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
|
||||
'';
|
||||
};
|
||||
}
|
||||
|
||||
(lib.mkIf pkgs.stdenv.hostPlatform.isLinux {
|
||||
systemd.user.sockets.gcr-ssh-agent.Install.WantedBy = lib.mkForce [ ];
|
||||
services.ssh-agent.enable = lib.mkForce false;
|
||||
})
|
||||
]
|
||||
@@ -0,0 +1,4 @@
|
||||
{
|
||||
programs.ssh.startAgent = false;
|
||||
services.gnome.gcr-ssh-agent.enable = false;
|
||||
}
|
||||
@@ -0,0 +1,56 @@
|
||||
{
|
||||
inputs,
|
||||
lib,
|
||||
pkgs,
|
||||
...
|
||||
}:
|
||||
let
|
||||
isLinux = pkgs.stdenv.hostPlatform.isLinux;
|
||||
extensions = inputs.vicinae-extensions.packages.${pkgs.stdenv.hostPlatform.system};
|
||||
in
|
||||
{
|
||||
programs.vicinae = {
|
||||
enable = true;
|
||||
systemd = lib.mkIf isLinux {
|
||||
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 extensions;
|
||||
[
|
||||
nix
|
||||
zoxide-recent-directories
|
||||
ssh
|
||||
port-killer
|
||||
]
|
||||
++ lib.optionals isLinux [
|
||||
power-profile
|
||||
niri
|
||||
noctalia-shell-wallpaper-selector
|
||||
];
|
||||
};
|
||||
}
|
||||
@@ -0,0 +1,8 @@
|
||||
{ inputs, ... }:
|
||||
{
|
||||
description = "Vicinae application launcher";
|
||||
|
||||
imports.home = [
|
||||
inputs.vicinae.homeManagerModules.default
|
||||
];
|
||||
}
|
||||
@@ -0,0 +1,678 @@
|
||||
{ pkgs, ... }:
|
||||
{
|
||||
home.sessionVariables = {
|
||||
EDITOR = "nvim";
|
||||
VISUAL = "nvim";
|
||||
};
|
||||
|
||||
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
|
||||
vtsls
|
||||
vscode-langservers-extracted
|
||||
tailwindcss-language-server
|
||||
prettierd
|
||||
prettier
|
||||
biome
|
||||
stylua
|
||||
shfmt
|
||||
alejandra
|
||||
nixfmt
|
||||
lua-language-server
|
||||
nixd
|
||||
lazygit
|
||||
];
|
||||
|
||||
opts = {
|
||||
number = true;
|
||||
relativenumber = true;
|
||||
signcolumn = "yes";
|
||||
termguicolors = true;
|
||||
mouse = "a";
|
||||
clipboard = "unnamedplus";
|
||||
updatetime = 200;
|
||||
timeoutlen = 300;
|
||||
undofile = true;
|
||||
wrap = false;
|
||||
scrolloff = 8;
|
||||
ignorecase = true;
|
||||
smartcase = true;
|
||||
splitright = true;
|
||||
splitbelow = true;
|
||||
tabstop = 2;
|
||||
shiftwidth = 2;
|
||||
expandtab = true;
|
||||
encoding = "utf-8";
|
||||
fileencoding = "utf-8";
|
||||
fileencodings = "utf-8,sjis,euc-jp,iso-2022-jp";
|
||||
list = true;
|
||||
listchars = "tab:»-,trail:-,extends:»,precedes:«,nbsp:%";
|
||||
jumpoptions = "stack";
|
||||
switchbuf = "useopen,uselast";
|
||||
foldcolumn = "1";
|
||||
foldlevel = 99;
|
||||
foldlevelstart = 99;
|
||||
foldenable = true;
|
||||
};
|
||||
|
||||
globals = {
|
||||
mapleader = " ";
|
||||
maplocalleader = " ";
|
||||
clipboard = "osc52";
|
||||
};
|
||||
|
||||
env = {
|
||||
LANG = "ja_JP.UTF-8";
|
||||
LC_MESSAGES = "ja_JP.UTF-8";
|
||||
};
|
||||
|
||||
autoCmd = [
|
||||
{
|
||||
event = "TextYankPost";
|
||||
callback.__raw = "function() vim.highlight.on_yank() end";
|
||||
}
|
||||
];
|
||||
|
||||
colorschemes.catppuccin = {
|
||||
enable = true;
|
||||
settings.transparent_background = true;
|
||||
};
|
||||
|
||||
diagnostic.settings = {
|
||||
virtual_text = true;
|
||||
float = {
|
||||
border = "rounded";
|
||||
source = true;
|
||||
};
|
||||
};
|
||||
|
||||
plugins = {
|
||||
lsp = {
|
||||
enable = true;
|
||||
servers = {
|
||||
vtsls = {
|
||||
enable = true;
|
||||
packageFallback = true;
|
||||
rootMarkers = [
|
||||
"pnpm-workspace.yaml"
|
||||
"package.json"
|
||||
"tsconfig.json"
|
||||
"jsconfig.json"
|
||||
".git"
|
||||
];
|
||||
extraOptions.settings.typescript.locale = "ja";
|
||||
};
|
||||
biome = {
|
||||
enable = true;
|
||||
packageFallback = true;
|
||||
rootMarkers = [
|
||||
"biome.json"
|
||||
"biome.jsonc"
|
||||
"package.json"
|
||||
"pnpm-workspace.yaml"
|
||||
".git"
|
||||
];
|
||||
};
|
||||
tailwindcss.enable = true;
|
||||
cssls.enable = true;
|
||||
jsonls.enable = true;
|
||||
yamlls.enable = true;
|
||||
lua_ls.enable = true;
|
||||
nixd.enable = true;
|
||||
rust_analyzer = {
|
||||
enable = true;
|
||||
installCargo = true;
|
||||
installRustc = true;
|
||||
};
|
||||
svelte.enable = true;
|
||||
ty.enable = true;
|
||||
ruff.enable = true;
|
||||
astro.enable = true;
|
||||
gopls.enable = true;
|
||||
};
|
||||
};
|
||||
|
||||
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"
|
||||
];
|
||||
};
|
||||
};
|
||||
|
||||
nvim-autopairs.enable = true;
|
||||
comment.enable = true;
|
||||
"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
|
||||
'';
|
||||
};
|
||||
};
|
||||
copilot-lua = {
|
||||
enable = true;
|
||||
settings.suggestion = {
|
||||
auto_trigger = true;
|
||||
keymap.enabled = false;
|
||||
};
|
||||
};
|
||||
lazygit.enable = true;
|
||||
diffview.enable = true;
|
||||
gitsigns = {
|
||||
enable = true;
|
||||
settings.signs = {
|
||||
add.text = "+";
|
||||
change.text = "~";
|
||||
delete.text = "_";
|
||||
topdelete.text = "‾";
|
||||
changedelete.text = "~";
|
||||
};
|
||||
};
|
||||
lsp-signature = {
|
||||
enable = true;
|
||||
settings = {
|
||||
hint_enable = true;
|
||||
hint_prefix = " ";
|
||||
floating_window = true;
|
||||
bind = true;
|
||||
};
|
||||
};
|
||||
nvim-surround.enable = true;
|
||||
treesitter = {
|
||||
enable = true;
|
||||
settings = {
|
||||
highlight.enable = true;
|
||||
indent.enable = true;
|
||||
};
|
||||
};
|
||||
trouble.enable = true;
|
||||
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;
|
||||
};
|
||||
};
|
||||
indent-blankline = {
|
||||
enable = true;
|
||||
settings = {
|
||||
scope = {
|
||||
enabled = true;
|
||||
show_start = true;
|
||||
show_end = true;
|
||||
};
|
||||
exclude.filetypes = [
|
||||
"help"
|
||||
"neo-tree"
|
||||
"toggleterm"
|
||||
"lazy"
|
||||
];
|
||||
};
|
||||
};
|
||||
colorizer = {
|
||||
enable = true;
|
||||
settings = {
|
||||
filetypes = [
|
||||
"*"
|
||||
"!markdown"
|
||||
];
|
||||
user_commands = true;
|
||||
options = {
|
||||
parsers = {
|
||||
css = true;
|
||||
tailwind = {
|
||||
enable = true;
|
||||
lsp = true;
|
||||
update_names = true;
|
||||
};
|
||||
};
|
||||
display.mode = "background";
|
||||
};
|
||||
};
|
||||
};
|
||||
dropbar.enable = true;
|
||||
nvim-lightbulb = {
|
||||
enable = true;
|
||||
settings.autocmd.enabled = true;
|
||||
};
|
||||
lualine = {
|
||||
enable = true;
|
||||
settings.sections.lualine_x = [
|
||||
{
|
||||
__raw = ''
|
||||
function()
|
||||
local ok, conform = pcall(require, "conform")
|
||||
if not ok then return "" end
|
||||
for _, formatter in ipairs(conform.list_formatters(0)) do
|
||||
if formatter.available then return " " .. formatter.name end
|
||||
end
|
||||
return ""
|
||||
end
|
||||
'';
|
||||
}
|
||||
"encoding"
|
||||
"fileformat"
|
||||
"filetype"
|
||||
];
|
||||
};
|
||||
neo-tree = {
|
||||
enable = true;
|
||||
settings = {
|
||||
close_if_last_window = true;
|
||||
filesystem = {
|
||||
follow_current_file = {
|
||||
enabled = true;
|
||||
leave_dirs_open = true;
|
||||
};
|
||||
filtered_items = {
|
||||
visible = true;
|
||||
hide_dotfiles = false;
|
||||
hide_gitignored = true;
|
||||
hide_ignored = false;
|
||||
hide_hidden = false;
|
||||
never_show = [
|
||||
".DS_Store"
|
||||
"thumbs.db"
|
||||
];
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
toggleterm.enable = true;
|
||||
"treesitter-context".enable = true;
|
||||
web-devicons.enable = true;
|
||||
which-key.enable = true;
|
||||
};
|
||||
|
||||
extraPlugins = with pkgs.vimPlugins; [
|
||||
flash-nvim
|
||||
git-conflict-nvim
|
||||
glance-nvim
|
||||
snacks-nvim
|
||||
nvim-spectre
|
||||
todo-comments-nvim
|
||||
nvim-ts-autotag
|
||||
vim-wakatime
|
||||
markview-nvim
|
||||
nvim-scrollbar
|
||||
nvim-ufo
|
||||
promise-async
|
||||
zen-mode-nvim
|
||||
];
|
||||
|
||||
extraConfigLua = ''
|
||||
vim.cmd.language("ja_JP.utf8")
|
||||
vim.opt.helplang = { "ja", "en" }
|
||||
|
||||
require("flash").setup()
|
||||
require("git-conflict").setup()
|
||||
require("glance").setup()
|
||||
require("spectre").setup()
|
||||
require("todo-comments").setup()
|
||||
require("nvim-ts-autotag").setup()
|
||||
require("markview").setup({ initial_state = false })
|
||||
require("scrollbar").setup()
|
||||
require("zen-mode").setup()
|
||||
require("ufo").setup({
|
||||
provider_selector = function()
|
||||
return { "treesitter", "indent" }
|
||||
end,
|
||||
})
|
||||
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 },
|
||||
})
|
||||
'';
|
||||
|
||||
keymaps = [
|
||||
{
|
||||
mode = "n";
|
||||
key = "<Esc>";
|
||||
action = "<cmd>nohlsearch<CR>";
|
||||
options = {
|
||||
silent = true;
|
||||
desc = "検索ハイライトを解除";
|
||||
};
|
||||
}
|
||||
{
|
||||
mode = "n";
|
||||
key = "j";
|
||||
action.__raw = "function() return vim.v.count == 0 and 'gj' or 'j' end";
|
||||
options = {
|
||||
silent = true;
|
||||
expr = true;
|
||||
desc = "下へ移動";
|
||||
};
|
||||
}
|
||||
{
|
||||
mode = "n";
|
||||
key = "k";
|
||||
action.__raw = "function() return vim.v.count == 0 and 'gk' or 'k' end";
|
||||
options = {
|
||||
silent = true;
|
||||
expr = true;
|
||||
desc = "上へ移動";
|
||||
};
|
||||
}
|
||||
{
|
||||
mode = "n";
|
||||
key = "K";
|
||||
action.__raw = "vim.lsp.buf.hover";
|
||||
options = {
|
||||
silent = true;
|
||||
desc = "シンボル情報";
|
||||
};
|
||||
}
|
||||
{
|
||||
mode = "n";
|
||||
key = "gd";
|
||||
action.__raw = "vim.lsp.buf.definition";
|
||||
options = {
|
||||
silent = true;
|
||||
desc = "定義へジャンプ";
|
||||
};
|
||||
}
|
||||
{
|
||||
mode = "n";
|
||||
key = "grr";
|
||||
action.__raw = "vim.lsp.buf.references";
|
||||
options = {
|
||||
silent = true;
|
||||
desc = "参照一覧";
|
||||
};
|
||||
}
|
||||
{
|
||||
mode = "n";
|
||||
key = "gri";
|
||||
action.__raw = "vim.lsp.buf.implementation";
|
||||
options = {
|
||||
silent = true;
|
||||
desc = "実装一覧";
|
||||
};
|
||||
}
|
||||
{
|
||||
mode = "n";
|
||||
key = "grt";
|
||||
action.__raw = "vim.lsp.buf.type_definition";
|
||||
options = {
|
||||
silent = true;
|
||||
desc = "型定義";
|
||||
};
|
||||
}
|
||||
{
|
||||
mode = "n";
|
||||
key = "grn";
|
||||
action.__raw = "vim.lsp.buf.rename";
|
||||
options = {
|
||||
silent = true;
|
||||
desc = "名前変更";
|
||||
};
|
||||
}
|
||||
{
|
||||
mode = "n";
|
||||
key = "gra";
|
||||
action.__raw = "vim.lsp.buf.code_action";
|
||||
options = {
|
||||
silent = true;
|
||||
desc = "コードアクション";
|
||||
};
|
||||
}
|
||||
{
|
||||
mode = "n";
|
||||
key = "<leader>cf";
|
||||
action.__raw = "function() require('conform').format({ timeout_ms = 1000, lsp_format = 'fallback' }) end";
|
||||
options = {
|
||||
silent = true;
|
||||
desc = "フォーマット";
|
||||
};
|
||||
}
|
||||
{
|
||||
mode = "n";
|
||||
key = "<leader>e";
|
||||
action = "<cmd>Neotree toggle left<CR>";
|
||||
options = {
|
||||
silent = true;
|
||||
desc = "ファイルツリー";
|
||||
};
|
||||
}
|
||||
{
|
||||
mode = "n";
|
||||
key = "<leader>tt";
|
||||
action = "<cmd>ToggleTerm direction=float<CR>";
|
||||
options = {
|
||||
silent = true;
|
||||
desc = "ターミナル";
|
||||
};
|
||||
}
|
||||
{
|
||||
mode = "n";
|
||||
key = "<leader>xx";
|
||||
action = "<cmd>Trouble diagnostics toggle<CR>";
|
||||
options = {
|
||||
silent = true;
|
||||
desc = "診断一覧";
|
||||
};
|
||||
}
|
||||
{
|
||||
mode = "n";
|
||||
key = "<leader>gl";
|
||||
action = "<cmd>LazyGit<CR>";
|
||||
options = {
|
||||
silent = true;
|
||||
desc = "LazyGit";
|
||||
};
|
||||
}
|
||||
{
|
||||
mode = "n";
|
||||
key = "<leader>gd";
|
||||
action = "<cmd>DiffviewOpen<CR>";
|
||||
options = {
|
||||
silent = true;
|
||||
desc = "差分";
|
||||
};
|
||||
}
|
||||
{
|
||||
mode = "n";
|
||||
key = "<leader>mp";
|
||||
action = "<cmd>Markview splitToggle<CR>";
|
||||
options = {
|
||||
silent = true;
|
||||
desc = "Markdown プレビュー";
|
||||
};
|
||||
}
|
||||
{
|
||||
mode = "n";
|
||||
key = "<leader>zz";
|
||||
action = "<cmd>ZenMode<CR>";
|
||||
options = {
|
||||
silent = true;
|
||||
desc = "Zen Mode";
|
||||
};
|
||||
}
|
||||
{
|
||||
mode = "n";
|
||||
key = "zR";
|
||||
action.__raw = "require('ufo').openAllFolds";
|
||||
options = {
|
||||
silent = true;
|
||||
desc = "全て展開";
|
||||
};
|
||||
}
|
||||
{
|
||||
mode = "n";
|
||||
key = "zM";
|
||||
action.__raw = "require('ufo').closeAllFolds";
|
||||
options = {
|
||||
silent = true;
|
||||
desc = "全て折りたたむ";
|
||||
};
|
||||
}
|
||||
{
|
||||
mode = "n";
|
||||
key = "s";
|
||||
action.__raw = "function() require('flash').jump() end";
|
||||
options = {
|
||||
silent = true;
|
||||
desc = "Flash ジャンプ";
|
||||
};
|
||||
}
|
||||
{
|
||||
mode = "n";
|
||||
key = "S";
|
||||
action.__raw = "function() require('flash').treesitter() end";
|
||||
options = {
|
||||
silent = true;
|
||||
desc = "Flash 選択";
|
||||
};
|
||||
}
|
||||
{
|
||||
mode = "n";
|
||||
key = "<leader>sr";
|
||||
action.__raw = "function() require('spectre').toggle() end";
|
||||
options = {
|
||||
silent = true;
|
||||
desc = "検索・置換";
|
||||
};
|
||||
}
|
||||
{
|
||||
mode = "n";
|
||||
key = "<leader>ff";
|
||||
action.__raw = "function() Snacks.picker.files() end";
|
||||
options = {
|
||||
silent = true;
|
||||
desc = "ファイルを探す";
|
||||
};
|
||||
}
|
||||
{
|
||||
mode = "n";
|
||||
key = "<leader>fg";
|
||||
action.__raw = "function() Snacks.picker.grep() end";
|
||||
options = {
|
||||
silent = true;
|
||||
desc = "全文検索";
|
||||
};
|
||||
}
|
||||
{
|
||||
mode = "n";
|
||||
key = "<leader>fb";
|
||||
action.__raw = "function() Snacks.picker.buffers() end";
|
||||
options = {
|
||||
silent = true;
|
||||
desc = "バッファを探す";
|
||||
};
|
||||
}
|
||||
{
|
||||
mode = "n";
|
||||
key = "<leader>fh";
|
||||
action.__raw = "function() Snacks.picker.help() end";
|
||||
options = {
|
||||
silent = true;
|
||||
desc = "ヘルプを探す";
|
||||
};
|
||||
}
|
||||
{
|
||||
mode = "n";
|
||||
key = "<leader>fs";
|
||||
action.__raw = "function() Snacks.picker.lsp_symbols() end";
|
||||
options = {
|
||||
silent = true;
|
||||
desc = "シンボルを探す";
|
||||
};
|
||||
}
|
||||
];
|
||||
};
|
||||
}
|
||||
@@ -0,0 +1,8 @@
|
||||
{ inputs, ... }:
|
||||
{
|
||||
description = "Neovim configured with Nixvim";
|
||||
|
||||
imports.home = [
|
||||
inputs.nixvim.homeModules.nixvim
|
||||
];
|
||||
}
|
||||
@@ -0,0 +1,277 @@
|
||||
{ pkgs, lib, ... }:
|
||||
let
|
||||
vsc = pkgs.vscode-extensions;
|
||||
inherit (lib) recursiveUpdate;
|
||||
localePath =
|
||||
if pkgs.stdenv.hostPlatform.isDarwin then
|
||||
"Library/Application Support/Code/User/locale.json"
|
||||
else
|
||||
".config/Code/User/locale.json";
|
||||
|
||||
rustEnvironment = lib.optionalAttrs pkgs.stdenv.hostPlatform.isLinux {
|
||||
"rust-analyzer.cargo.extraEnv" = {
|
||||
LIBCLANG_PATH = pkgs.lib.makeLibraryPath [ pkgs.llvmPackages_latest.libclang.lib ];
|
||||
BINDGEN_EXTRA_CLANG_ARGS = lib.concatStringsSep " " (
|
||||
(map (path: ''-I"${path}/include"'') [ pkgs.glibc.dev ])
|
||||
++ [
|
||||
''-I"${pkgs.llvmPackages_latest.libclang.lib}/lib/clang/${pkgs.llvmPackages_latest.libclang.version}/include"''
|
||||
''-I"${pkgs.glib.dev}/include/glib-2.0"''
|
||||
"-I${pkgs.glib.out}/lib/glib-2.0/include/"
|
||||
]
|
||||
);
|
||||
};
|
||||
};
|
||||
|
||||
layers = rec {
|
||||
common = {
|
||||
extensions =
|
||||
(with vsc; [
|
||||
github.copilot
|
||||
github.copilot-chat
|
||||
dracula-theme.theme-dracula
|
||||
ms-vscode-remote.vscode-remote-extensionpack
|
||||
dbaeumer.vscode-eslint
|
||||
ms-vscode-remote.remote-containers
|
||||
ms-vscode-remote.remote-ssh
|
||||
github.vscode-github-actions
|
||||
github.vscode-pull-request-github
|
||||
eamodio.gitlens
|
||||
streetsidesoftware.code-spell-checker
|
||||
ms-ceintl.vscode-language-pack-ja
|
||||
])
|
||||
++ pkgs.vscode-utils.extensionsFromVscodeMarketplace [
|
||||
{
|
||||
name = "hadolint";
|
||||
publisher = "exiasr";
|
||||
version = "1.1.2";
|
||||
hash = "sha256-6GO1f8SP4CE8yYl87/tm60FdGHqHsJA4c2B6UKVdpgM=";
|
||||
}
|
||||
{
|
||||
name = "chatgpt";
|
||||
publisher = "openai";
|
||||
version = "0.4.71";
|
||||
hash = "sha256-Q0le5rhVRgTDQXjIlhbzJOv/7+xC6JXwTp6fxZCP4ak=";
|
||||
}
|
||||
];
|
||||
userSettings = {
|
||||
"workbench.colorTheme" = "Dracula";
|
||||
"window.autoDetectColorScheme" = false;
|
||||
"editor.formatOnSave" = true;
|
||||
"editor.defaultFormatter" = "esbenp.prettier-vscode";
|
||||
"git.enableSmartCommit" = true;
|
||||
"files.autoSave" = "onFocusChange";
|
||||
"git.confirmSync" = false;
|
||||
"github.copilot.nextEditSuggestions.enabled" = true;
|
||||
"editor.suggestOnTriggerCharacters" = true;
|
||||
"editor.quickSuggestions" = {
|
||||
other = true;
|
||||
comments = false;
|
||||
strings = true;
|
||||
};
|
||||
"git.autofetch" = true;
|
||||
"workbench.editor.enablePreview" = false;
|
||||
"files.exclude" = {
|
||||
"**/.direnv" = true;
|
||||
"**/.direnv/**" = true;
|
||||
};
|
||||
"search.exclude" = {
|
||||
"**/.direnv" = true;
|
||||
"**/.direnv/**" = true;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
web = {
|
||||
extensions =
|
||||
(with vsc; [
|
||||
lokalise.i18n-ally
|
||||
bradlc.vscode-tailwindcss
|
||||
prisma.prisma
|
||||
hashicorp.terraform
|
||||
yoavbls.pretty-ts-errors
|
||||
])
|
||||
++ pkgs.vscode-utils.extensionsFromVscodeMarketplace [
|
||||
{
|
||||
name = "pnpm-catalog-lens";
|
||||
publisher = "antfu";
|
||||
version = "1.0.0";
|
||||
hash = "sha256-mCMBVxZRIb3Jao1XSS7EQRQX3Y2vrkpAmy6ldSqZa9c=";
|
||||
}
|
||||
{
|
||||
name = "explorer";
|
||||
publisher = "vitest";
|
||||
version = "1.32.1";
|
||||
hash = "sha256-MAfjS/oFfFuiE+Q2w6leSlao436QSw2fKjd7/BE/Q8Y=";
|
||||
}
|
||||
];
|
||||
userSettings = { };
|
||||
};
|
||||
|
||||
web-biome = {
|
||||
extensions = with vsc; [ biomejs.biome ];
|
||||
userSettings = {
|
||||
"editor.defaultFormatter" = "biomejs.biome";
|
||||
"[typescript].editor.defaultFormatter" = "biomejs.biome";
|
||||
"[typescriptreact].editor.defaultFormatter" = "biomejs.biome";
|
||||
};
|
||||
};
|
||||
|
||||
web-oxc = {
|
||||
extensions = pkgs.vscode-utils.extensionsFromVscodeMarketplace [
|
||||
{
|
||||
name = "oxc-vscode";
|
||||
publisher = "oxc";
|
||||
version = "1.48.0";
|
||||
hash = "sha256-RZ7mLcLJyn7lR6w6Au6fZeguB3wtk8sIXb67lPnPnrc=";
|
||||
}
|
||||
];
|
||||
userSettings = {
|
||||
"editor.defaultFormatter" = "oxc.oxc-vscode";
|
||||
"[typescript].editor.defaultFormatter" = "oxc.oxc-vscode";
|
||||
"[typescriptreact].editor.defaultFormatter" = "oxc.oxc-vscode";
|
||||
};
|
||||
};
|
||||
|
||||
nix = {
|
||||
extensions = with vsc; [
|
||||
bbenoist.nix
|
||||
jnoortheen.nix-ide
|
||||
];
|
||||
userSettings = {
|
||||
"nix.enableLanguageServer" = true;
|
||||
"nix.serverPath" = "nil";
|
||||
"[nix]" = {
|
||||
"editor.defaultFormatter" = "jnoortheen.nix-ide";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
jupyter = {
|
||||
extensions = with vsc; [
|
||||
ms-toolsai.jupyter
|
||||
ms-python.python
|
||||
];
|
||||
userSettings = { };
|
||||
};
|
||||
|
||||
java = {
|
||||
extensions = with vsc; [
|
||||
vscjava.vscode-java-pack
|
||||
sonarsource.sonarlint-vscode
|
||||
vscjava.vscode-java-debug
|
||||
redhat.java
|
||||
];
|
||||
userSettings = {
|
||||
"java.jdt.ls.java.home" = "${pkgs.jdk25.home}";
|
||||
"java.configuration.runtimes" = [
|
||||
{
|
||||
name = "JavaSE-25";
|
||||
path = "${pkgs.jdk25.home}";
|
||||
default = true;
|
||||
}
|
||||
];
|
||||
"editor.codeLens" = true;
|
||||
"java.debug.settings.enableRunDebugCodeLens" = true;
|
||||
"java.jdt.ls.vmargs" = "-Xms256m -Xmx2G -XX:+UseG1GC -XX:+UseStringDeduplication";
|
||||
"java.configuration.updateBuildConfiguration" = "interactive";
|
||||
"java.maven.downloadSources" = true;
|
||||
"java.eclipse.downloadSources" = true;
|
||||
"maven.executable.path" = "${pkgs.maven}/bin/mvn";
|
||||
"[java]" = {
|
||||
"editor.defaultFormatter" = "redhat.java";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
rust = {
|
||||
extensions = with vsc; [
|
||||
rust-lang.rust-analyzer
|
||||
vadimcn.vscode-lldb
|
||||
serayuzgur.crates
|
||||
tamasfe.even-better-toml
|
||||
];
|
||||
userSettings = recursiveUpdate {
|
||||
"[rust]" = {
|
||||
"editor.defaultFormatter" = "rust-lang.rust-analyzer";
|
||||
"editor.formatOnSave" = true;
|
||||
"editor.codeActionsOnSave" = {
|
||||
"source.organizeImports" = true;
|
||||
"source.fixAll" = true;
|
||||
};
|
||||
};
|
||||
"rust-analyzer.checkOnSave" = true;
|
||||
"rust-analyzer.check.command" = "clippy";
|
||||
"rust-analyzer.cargo.buildScripts.enable" = true;
|
||||
"rust-analyzer.procMacro.enable" = true;
|
||||
"rust-analyzer.cargo.targetDir" = true;
|
||||
"rust-analyzer.lens.enable" = true;
|
||||
"rust-analyzer.lens.implementations.enable" = true;
|
||||
"rust-analyzer.lens.references.adt.enable" = true;
|
||||
"rust-analyzer.lens.references.enumVariant.enable" = true;
|
||||
"rust-analyzer.lens.references.method.enable" = true;
|
||||
"rust-analyzer.lens.references.trait.enable" = true;
|
||||
"files.watcherExclude" = {
|
||||
"**/target/**" = true;
|
||||
};
|
||||
"search.exclude" = {
|
||||
"**/target/**" = true;
|
||||
};
|
||||
} rustEnvironment;
|
||||
};
|
||||
};
|
||||
|
||||
combine =
|
||||
layersList:
|
||||
builtins.foldl'
|
||||
(acc: layer: {
|
||||
extensions = acc.extensions ++ layer.extensions;
|
||||
userSettings = recursiveUpdate acc.userSettings layer.userSettings;
|
||||
})
|
||||
{
|
||||
extensions = [ ];
|
||||
userSettings = { };
|
||||
}
|
||||
layersList;
|
||||
|
||||
mkProfile = combine;
|
||||
in
|
||||
{
|
||||
programs.vscode = {
|
||||
enable = true;
|
||||
profiles = {
|
||||
default = mkProfile [ layers.common ];
|
||||
nix = mkProfile [
|
||||
layers.common
|
||||
layers.nix
|
||||
];
|
||||
web = mkProfile [
|
||||
layers.common
|
||||
layers.web
|
||||
layers.web-biome
|
||||
];
|
||||
web-oxc = mkProfile [
|
||||
layers.common
|
||||
layers.web
|
||||
layers.web-oxc
|
||||
];
|
||||
jupyter = mkProfile [
|
||||
layers.common
|
||||
layers.jupyter
|
||||
];
|
||||
java = mkProfile [
|
||||
layers.common
|
||||
layers.java
|
||||
];
|
||||
rust = mkProfile [
|
||||
layers.common
|
||||
layers.rust
|
||||
];
|
||||
};
|
||||
};
|
||||
|
||||
home.file.${localePath}.text = ''
|
||||
{
|
||||
"locale": "ja"
|
||||
}
|
||||
'';
|
||||
}
|
||||
@@ -0,0 +1,134 @@
|
||||
{ pkgs, lib, ... }:
|
||||
let
|
||||
isLinux = pkgs.stdenv.hostPlatform.isLinux;
|
||||
in
|
||||
{
|
||||
programs.yazi = {
|
||||
enable = true;
|
||||
enableZshIntegration = true;
|
||||
shellWrapperName = "y";
|
||||
package = pkgs.yazi.override {
|
||||
_7zz = pkgs._7zz-rar;
|
||||
};
|
||||
extraPackages =
|
||||
with pkgs;
|
||||
[
|
||||
file
|
||||
ffmpeg
|
||||
_7zz-rar
|
||||
jq
|
||||
poppler
|
||||
fd
|
||||
ripgrep
|
||||
fzf
|
||||
zoxide
|
||||
resvg
|
||||
imagemagick
|
||||
]
|
||||
++ lib.optionals isLinux [
|
||||
wl-clipboard
|
||||
xdg-utils
|
||||
];
|
||||
plugins = {
|
||||
"full-border" = {
|
||||
package = pkgs.yaziPlugins.full-border;
|
||||
setup = true;
|
||||
};
|
||||
"toggle-pane" = pkgs.yaziPlugins.toggle-pane;
|
||||
chmod = pkgs.yaziPlugins.chmod;
|
||||
};
|
||||
keymap.mgr.prepend_keymap = [
|
||||
{
|
||||
on = "T";
|
||||
run = "plugin toggle-pane max-preview";
|
||||
desc = "Maximize or restore preview pane";
|
||||
}
|
||||
{
|
||||
on = [
|
||||
"c"
|
||||
"m"
|
||||
];
|
||||
run = "plugin chmod";
|
||||
desc = "Chmod selected files";
|
||||
}
|
||||
];
|
||||
settings = {
|
||||
mgr = {
|
||||
ratio = [
|
||||
1
|
||||
3
|
||||
4
|
||||
];
|
||||
sort_by = "natural";
|
||||
sort_sensitive = false;
|
||||
sort_dir_first = true;
|
||||
sort_reverse = false;
|
||||
linemode = "size";
|
||||
show_hidden = true;
|
||||
show_symlink = true;
|
||||
scrolloff = 8;
|
||||
};
|
||||
preview = {
|
||||
wrap = "yes";
|
||||
tab_size = 2;
|
||||
};
|
||||
opener = {
|
||||
edit = [
|
||||
{
|
||||
run = "${pkgs.neovim}/bin/nvim %s";
|
||||
block = true;
|
||||
for = "unix";
|
||||
}
|
||||
];
|
||||
open = [
|
||||
{
|
||||
run = "${pkgs.xdg-utils}/bin/xdg-open %s";
|
||||
orphan = true;
|
||||
desc = "Open";
|
||||
for = "linux";
|
||||
}
|
||||
{
|
||||
run = "open %s";
|
||||
orphan = true;
|
||||
desc = "Open";
|
||||
for = "macos";
|
||||
}
|
||||
];
|
||||
};
|
||||
open.prepend_rules = [
|
||||
{
|
||||
mime = "text/*";
|
||||
use = "edit";
|
||||
}
|
||||
{
|
||||
url = "*.nix";
|
||||
use = "edit";
|
||||
}
|
||||
{
|
||||
url = "*.json";
|
||||
use = "edit";
|
||||
}
|
||||
{
|
||||
url = "*.md";
|
||||
use = "edit";
|
||||
}
|
||||
{
|
||||
mime = "image/*";
|
||||
use = "open";
|
||||
}
|
||||
{
|
||||
mime = "video/*";
|
||||
use = "open";
|
||||
}
|
||||
{
|
||||
mime = "audio/*";
|
||||
use = "open";
|
||||
}
|
||||
{
|
||||
mime = "application/pdf";
|
||||
use = "open";
|
||||
}
|
||||
];
|
||||
};
|
||||
};
|
||||
}
|
||||
@@ -0,0 +1,41 @@
|
||||
{
|
||||
programs.zed-editor = {
|
||||
enable = true;
|
||||
extensions = [
|
||||
"catppuccin"
|
||||
"nix"
|
||||
];
|
||||
mutableUserSettings = false;
|
||||
|
||||
userSettings = {
|
||||
agent = {
|
||||
flexible = true;
|
||||
favorite_models = [ ];
|
||||
model_parameters = [ ];
|
||||
};
|
||||
project_panel.dock = "left";
|
||||
telemetry = {
|
||||
diagnostics = false;
|
||||
metrics = false;
|
||||
};
|
||||
vim_mode = true;
|
||||
agent_servers = {
|
||||
github-copilot-cli.type = "registry";
|
||||
codex-acp.type = "registry";
|
||||
claude-acp.type = "registry";
|
||||
};
|
||||
icon_theme = {
|
||||
mode = "dark";
|
||||
light = "Zed (Default)";
|
||||
dark = "Zed (Default)";
|
||||
};
|
||||
ui_font_size = 16;
|
||||
buffer_font_size = 16;
|
||||
theme = {
|
||||
mode = "dark";
|
||||
light = "Catppuccin Latte";
|
||||
dark = "Catppuccin Mocha";
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
@@ -0,0 +1,65 @@
|
||||
{ pkgs, ... }:
|
||||
{
|
||||
programs.zellij = {
|
||||
enable = true;
|
||||
enableZshIntegration = false;
|
||||
|
||||
settings = {
|
||||
pane_frames = true;
|
||||
copy_clipboard = "system";
|
||||
copy_on_select = false;
|
||||
default_mode = "locked";
|
||||
default_shell = "${pkgs.zsh}/bin/zsh";
|
||||
};
|
||||
|
||||
extraConfig = ''
|
||||
keybinds {
|
||||
locked {
|
||||
bind "Ctrl g" { SwitchToMode "normal"; }
|
||||
bind "Alt h" "Alt Left" { MoveFocusOrTab "Left"; }
|
||||
bind "Alt j" "Alt Down" { MoveFocus "Down"; }
|
||||
bind "Alt k" "Alt Up" { MoveFocus "Up"; }
|
||||
bind "Alt l" "Alt Right" { MoveFocusOrTab "Right"; }
|
||||
bind "Alt n" { NewPane; }
|
||||
bind "Alt t" { NewTab; }
|
||||
bind "Alt H" { Resize "Increase Left"; }
|
||||
bind "Alt J" { Resize "Increase Down"; }
|
||||
bind "Alt K" { Resize "Increase Up"; }
|
||||
bind "Alt L" { Resize "Increase Right"; }
|
||||
bind "Alt c" "Ctrl Shift c" { Copy; }
|
||||
}
|
||||
normal {
|
||||
bind "Alt h" "Alt Left" { MoveFocusOrTab "Left"; }
|
||||
bind "Alt j" "Alt Down" { MoveFocus "Down"; }
|
||||
bind "Alt k" "Alt Up" { MoveFocus "Up"; }
|
||||
bind "Alt l" "Alt Right" { MoveFocusOrTab "Right"; }
|
||||
bind "Alt n" { NewPane; }
|
||||
bind "Alt t" { NewTab; }
|
||||
bind "Ctrl Shift c" { Copy; }
|
||||
bind "Alt H" { Resize "Increase Left"; }
|
||||
bind "Alt J" { Resize "Increase Down"; }
|
||||
bind "Alt K" { Resize "Increase Up"; }
|
||||
bind "Alt L" { Resize "Increase Right"; }
|
||||
}
|
||||
}
|
||||
'';
|
||||
|
||||
layouts.dev = ''
|
||||
layout {
|
||||
pane split_direction="vertical" {
|
||||
pane {
|
||||
pane command="nvim"
|
||||
pane stacked=true size="30%" {
|
||||
pane expanded=true
|
||||
pane
|
||||
}
|
||||
}
|
||||
|
||||
pane size=1 borderless=true {
|
||||
plugin location="zellij:compact-bar"
|
||||
}
|
||||
}
|
||||
}
|
||||
'';
|
||||
};
|
||||
}
|
||||
@@ -0,0 +1,4 @@
|
||||
{ pkgs, ... }:
|
||||
{
|
||||
home.packages = [ pkgs.zoom-us ];
|
||||
}
|
||||
@@ -0,0 +1,6 @@
|
||||
{
|
||||
programs.zoxide = {
|
||||
enable = true;
|
||||
enableZshIntegration = true;
|
||||
};
|
||||
}
|
||||
@@ -0,0 +1,39 @@
|
||||
{
|
||||
programs.zsh = {
|
||||
enable = true;
|
||||
enableCompletion = true;
|
||||
|
||||
oh-my-zsh = {
|
||||
enable = true;
|
||||
theme = "robbyrussell";
|
||||
plugins = [ "git" ];
|
||||
};
|
||||
|
||||
autosuggestion.enable = true;
|
||||
syntaxHighlighting.enable = true;
|
||||
|
||||
initContent = ''
|
||||
export HISTSIZE=999999999
|
||||
export HISTFILESIZE=999999999
|
||||
|
||||
setopt extended_history
|
||||
setopt hist_allow_clobber
|
||||
setopt hist_fcntl_lock
|
||||
setopt hist_find_no_dups
|
||||
setopt hist_ignore_all_dups
|
||||
setopt hist_ignore_dups
|
||||
setopt hist_ignore_space
|
||||
setopt hist_reduce_blanks
|
||||
setopt hist_save_no_dups
|
||||
setopt hist_verify
|
||||
setopt inc_append_history_time
|
||||
|
||||
unsetopt SHARE_HISTORY
|
||||
setopt APPEND_HISTORY
|
||||
setopt INC_APPEND_HISTORY_TIME
|
||||
|
||||
alias docker-compose="docker compose"
|
||||
alias lssh='ssh -o KexAlgorithms=+diffie-hellman-group14-sha1,diffie-hellman-group1-sha1 -o Ciphers=+aes256-cbc,aes128-cbc -o HostKeyAlgorithms=+ssh-rsa -o SetEnv=TERM=xterm'
|
||||
'';
|
||||
};
|
||||
}
|
||||
@@ -0,0 +1,3 @@
|
||||
{
|
||||
programs.zsh.enable = true;
|
||||
}
|
||||
@@ -0,0 +1,8 @@
|
||||
{
|
||||
hardware.bluetooth = {
|
||||
enable = true;
|
||||
powerOnBoot = true;
|
||||
};
|
||||
|
||||
services.blueman.enable = true;
|
||||
}
|
||||
@@ -0,0 +1,3 @@
|
||||
{
|
||||
hardware.graphics.enable = true;
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
{ pkgs, ... }:
|
||||
{
|
||||
hardware.graphics.extraPackages = with pkgs; [
|
||||
intel-media-driver
|
||||
intel-vaapi-driver
|
||||
libva-vdpau-driver
|
||||
libvdpau-va-gl
|
||||
];
|
||||
}
|
||||
@@ -0,0 +1,21 @@
|
||||
{ pkgs, ... }:
|
||||
{
|
||||
boot.kernelModules = [ "uvcvideo" ];
|
||||
hardware.ipu6 = {
|
||||
enable = true;
|
||||
platform = "ipu6epmtl";
|
||||
};
|
||||
|
||||
environment.systemPackages = with pkgs; [
|
||||
v4l-utils
|
||||
ffmpeg-full
|
||||
libcamera
|
||||
];
|
||||
|
||||
services.pipewire = {
|
||||
enable = true;
|
||||
alsa.enable = true;
|
||||
pulse.enable = true;
|
||||
};
|
||||
security.rtkit.enable = true;
|
||||
}
|
||||
@@ -0,0 +1,3 @@
|
||||
{
|
||||
services.qemuGuest.enable = true;
|
||||
}
|
||||
@@ -2,8 +2,12 @@
|
||||
description = "base system configuration";
|
||||
|
||||
includes = [
|
||||
"systems.boot.base"
|
||||
"systems.disko"
|
||||
"systems.hardware"
|
||||
"systems.locale"
|
||||
"systems.networking"
|
||||
"systems.networking.base"
|
||||
"systems.nix"
|
||||
"systems.sops"
|
||||
];
|
||||
}
|
||||
|
||||
@@ -0,0 +1,4 @@
|
||||
{ pkgs, ... }:
|
||||
{
|
||||
home.packages = [ pkgs.tio ];
|
||||
}
|
||||
@@ -0,0 +1,10 @@
|
||||
{
|
||||
description = "interactive command-line environment";
|
||||
|
||||
includes = [
|
||||
"profiles.interface.cli-minimal"
|
||||
"applications.vim"
|
||||
"applications.yazi"
|
||||
"applications.zellij"
|
||||
];
|
||||
}
|
||||
@@ -0,0 +1,34 @@
|
||||
{ pkgs, ... }:
|
||||
{
|
||||
home.packages = with pkgs; [
|
||||
bat
|
||||
duf
|
||||
dust
|
||||
eza
|
||||
fd
|
||||
fastfetch
|
||||
fzf
|
||||
htop
|
||||
jq
|
||||
nurl
|
||||
ripgrep
|
||||
unrar
|
||||
unzip
|
||||
wget
|
||||
];
|
||||
|
||||
home.activation.generateSshKey = {
|
||||
after = [ "writeBoundary" ];
|
||||
before = [ ];
|
||||
data = ''
|
||||
key="$HOME/.ssh/id_ed25519"
|
||||
if [ ! -f "$key" ]; then
|
||||
umask 077
|
||||
mkdir -p "$HOME/.ssh"
|
||||
${pkgs.openssh}/bin/ssh-keygen -t ed25519 -N "" -f "$key" \
|
||||
-C "moons@$(${pkgs.hostname}/bin/hostname || echo host)"
|
||||
echo "Generated SSH key at $key"
|
||||
fi
|
||||
'';
|
||||
};
|
||||
}
|
||||
@@ -3,5 +3,13 @@
|
||||
|
||||
includes = [
|
||||
"applications.btop"
|
||||
"applications.direnv"
|
||||
"applications.git"
|
||||
"applications.gnupg"
|
||||
"applications.nh"
|
||||
"applications.nix-index"
|
||||
"applications.ssh"
|
||||
"applications.zoxide"
|
||||
"applications.zsh"
|
||||
];
|
||||
}
|
||||
|
||||
@@ -0,0 +1,14 @@
|
||||
{
|
||||
xdg.userDirs = {
|
||||
enable = true;
|
||||
createDirectories = true;
|
||||
desktop = "$HOME/Desktop";
|
||||
documents = "$HOME/Documents";
|
||||
download = "$HOME/Downloads";
|
||||
music = "$HOME/Music";
|
||||
pictures = "$HOME/Pictures";
|
||||
publicShare = "$HOME/Public";
|
||||
templates = "$HOME/Templates";
|
||||
videos = "$HOME/Videos";
|
||||
};
|
||||
}
|
||||
@@ -0,0 +1,23 @@
|
||||
{
|
||||
description = "NixOS graphical desktop environment";
|
||||
|
||||
includes = [
|
||||
"profiles.interface.cli-interactive"
|
||||
"applications.1password"
|
||||
"applications.fcitx5"
|
||||
"applications.ghostty"
|
||||
"applications.gnome"
|
||||
"applications.gtk"
|
||||
"applications.kde"
|
||||
"applications.nautilus"
|
||||
"applications.niri"
|
||||
"applications.noctalia"
|
||||
"applications.vicinae"
|
||||
"hardwares.graphics"
|
||||
"services.ly"
|
||||
"services.swayidle"
|
||||
"services.swaylock"
|
||||
"systems.audio"
|
||||
"systems.fonts"
|
||||
];
|
||||
}
|
||||
@@ -0,0 +1,8 @@
|
||||
{ pkgs, ... }:
|
||||
{
|
||||
environment.systemPackages = with pkgs; [
|
||||
grim
|
||||
slurp
|
||||
wf-recorder
|
||||
];
|
||||
}
|
||||
@@ -0,0 +1,5 @@
|
||||
{
|
||||
description = "UEFI desktop platform";
|
||||
|
||||
includes = [ "systems.boot.uefi" ];
|
||||
}
|
||||
@@ -2,6 +2,11 @@
|
||||
description = "laptop platform configuration";
|
||||
|
||||
includes = [
|
||||
"hardwares.bluetooth"
|
||||
"hardwares.ipu6-camera"
|
||||
"systems.boot.uefi"
|
||||
"systems.fingerprint"
|
||||
"systems.networking.wifi"
|
||||
"systems.power"
|
||||
];
|
||||
}
|
||||
|
||||
@@ -0,0 +1,8 @@
|
||||
{
|
||||
description = "ThinkPad laptop platform";
|
||||
|
||||
includes = [
|
||||
"profiles.platform.laptop"
|
||||
"hardwares.intel-driver"
|
||||
];
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
{
|
||||
description = "virtual-machine platform";
|
||||
|
||||
includes = [
|
||||
"hardwares.qemu-guest"
|
||||
"systems.boot.nfs"
|
||||
"systems.boot.uefi"
|
||||
];
|
||||
}
|
||||
@@ -0,0 +1,13 @@
|
||||
{ lib, pkgs, ... }:
|
||||
{
|
||||
home.packages =
|
||||
with pkgs;
|
||||
[
|
||||
bind
|
||||
bun
|
||||
nil
|
||||
python312
|
||||
uv
|
||||
]
|
||||
++ lib.optionals stdenv.hostPlatform.isLinux [ drawio ];
|
||||
}
|
||||
@@ -0,0 +1,16 @@
|
||||
{
|
||||
description = "software development workload";
|
||||
|
||||
includes = [
|
||||
"applications.arduino"
|
||||
"applications.claude"
|
||||
"applications.codex"
|
||||
"applications.codex-desktop"
|
||||
"applications.docker"
|
||||
"applications.grok"
|
||||
"applications.java"
|
||||
"applications.opencode"
|
||||
"applications.vscode"
|
||||
"applications.zed"
|
||||
];
|
||||
}
|
||||
@@ -0,0 +1,3 @@
|
||||
{
|
||||
documentation.doc.enable = false;
|
||||
}
|
||||
@@ -0,0 +1,10 @@
|
||||
{
|
||||
description = "personal communication and browser workload";
|
||||
|
||||
includes = [
|
||||
"applications.chrome"
|
||||
"applications.discord"
|
||||
"applications.slack"
|
||||
"applications.zoom"
|
||||
];
|
||||
}
|
||||
@@ -0,0 +1,5 @@
|
||||
{
|
||||
description = "remote-access workload";
|
||||
|
||||
includes = [ "services.openssh" ];
|
||||
}
|
||||
@@ -0,0 +1,8 @@
|
||||
{
|
||||
description = "secure boot and TPM-backed storage";
|
||||
|
||||
includes = [
|
||||
"systems.boot.secure-boot"
|
||||
"systems.boot.storage-crypto"
|
||||
];
|
||||
}
|
||||
@@ -0,0 +1,8 @@
|
||||
{
|
||||
description = "server workload";
|
||||
|
||||
includes = [
|
||||
"applications.docker"
|
||||
"services.openssh"
|
||||
];
|
||||
}
|
||||
@@ -0,0 +1,5 @@
|
||||
{
|
||||
description = "Tailscale client";
|
||||
|
||||
includes = [ "services.tailscale" ];
|
||||
}
|
||||
@@ -0,0 +1,10 @@
|
||||
{ lib, ... }:
|
||||
{
|
||||
services.tailscale = {
|
||||
useRoutingFeatures = lib.mkForce "client";
|
||||
extraSetFlags = lib.mkForce [
|
||||
"--accept-dns=false"
|
||||
"--accept-routes=true"
|
||||
];
|
||||
};
|
||||
}
|
||||
@@ -0,0 +1,5 @@
|
||||
{
|
||||
description = "Tailscale subnet-router server";
|
||||
|
||||
includes = [ "services.tailscale" ];
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
{ lib, ... }:
|
||||
{
|
||||
services.tailscale = {
|
||||
useRoutingFeatures = lib.mkForce "server";
|
||||
extraSetFlags = lib.mkForce [
|
||||
"--accept-dns=false"
|
||||
"--accept-routes=false"
|
||||
"--advertise-routes=10.50.0.0/16"
|
||||
];
|
||||
};
|
||||
}
|
||||
@@ -0,0 +1,17 @@
|
||||
{ primaryUser, ... }:
|
||||
{
|
||||
virtualisation.docker = {
|
||||
enable = true;
|
||||
autoPrune = {
|
||||
enable = true;
|
||||
dates = "weekly";
|
||||
};
|
||||
daemon.settings = {
|
||||
ipv6 = true;
|
||||
"fixed-cidr-v6" = "fd00:30::/64";
|
||||
ip6tables = true;
|
||||
};
|
||||
};
|
||||
|
||||
users.users.${primaryUser}.extraGroups = [ "docker" ];
|
||||
}
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user