├── .gitignore
├── .secretlintrc.json
├── dotfiles
├── app
│ ├── ghostty
│ │ └── default.nix
│ ├── git
│ │ ├── default.nix
│ │ └── gitignore.nix
│ ├── hyprland
│ │ └── default.nix
│ ├── labwc
│ │ ├── autostart.nix
│ │ ├── default.nix
│ │ └── rc.nix
│ ├── mlterm
│ │ ├── aafont.nix
│ │ ├── color.nix
│ │ ├── default.nix
│ │ ├── key.nix
│ │ └── main.nix
│ └── xdg
│ │ └── default.nix
├── config
│ ├── app
│ │ ├── browser.nix
│ │ ├── chat.nix
│ │ ├── creative.nix
│ │ ├── multimedia.nix
│ │ ├── office.nix
│ │ └── wine.nix
│ ├── desktop
│ │ ├── desktop-session.nix
│ │ ├── dunst.nix
│ │ ├── swaylock.nix
│ │ ├── theme.nix
│ │ └── ydotoold.nix
│ ├── files
│ │ └── skk.nix
│ ├── nixos
│ │ └── gsettings.nix
│ ├── services
│ │ ├── polkit.nix
│ │ └── syncthing.nix
│ ├── shell
│ │ ├── starship.nix
│ │ └── zsh.nix
│ ├── tools
│ │ ├── archiver.nix
│ │ └── development.nix
│ └── vars
│ │ ├── appmenu.nix
│ │ ├── theme.nix
│ │ └── xml.nix
├── files
│ ├── desktop
│ │ ├── creative-menu.desktop
│ │ └── root-menu.desktop
│ ├── scripts
│ │ ├── mount-btrfs.sh
│ │ ├── prepare-generative-ai
│ │ ├── prepare-windows-vm
│ │ ├── snapper-clean-all
│ │ ├── synthv
│ │ ├── vanish-check
│ │ ├── vm-snapshot-for-daw
│ │ ├── waydroid-start
│ │ ├── waydroid-stop
│ │ └── zrythm-launch
│ └── wine
│ │ ├── Kindle
│ │ └── MP3TAGS
└── user
│ └── nyarla.nix
├── flake.lock
├── flake.nix
├── lib
└── nixosSystem.nix
├── patches
├── tmux3.5a-utf8.patch
├── utf8_force_wide.h
└── weylus.patch
├── pkgs
├── aria-misskey
│ ├── default.nix
│ └── rust_lib_aria.patch
├── audiogridder
│ └── default.nix
├── carla
│ ├── default.nix
│ └── nixos.patch
├── cskk
│ └── default.nix
├── cuda-shell
│ └── default.nix
├── currennt
│ └── default.nix
├── deadbeef-fb
│ └── default.nix
├── default.nix
├── dexed
│ └── default.nix
├── fcitx5-cskk
│ └── default.nix
├── fcitx5-fbterm
│ └── default.nix
├── fluent-kde
│ └── default.nix
├── galendae
│ └── default.nix
├── glibc-locales-eaw
│ └── default.nix
├── gyazo-diy
│ └── default.nix
├── igsc
│ └── default.nix
├── ildaeil
│ ├── default.nix
│ └── nixos.patch
├── kaunas
│ └── default.nix
├── noise-suppression-for-voice
│ └── default.nix
├── noto-fonts-jp
│ ├── default.nix
│ ├── fonts.nix
│ └── update.sh
├── nvim-run
│ └── default.nix
├── openjtalk
│ └── default.nix
├── perl-shell
│ └── default.nix
├── restic-run
│ └── default.nix
├── shoreman
│ └── default.nix
├── skk-dicts-xl
│ ├── default.nix
│ ├── skk.nix
│ └── update.sh
├── sononym-bin
│ └── default.nix
├── stability-matrix
│ ├── default.nix
│ ├── deps.nix
│ └── nixos.patch
├── temporary.nix
├── wcwidh-cjk
│ ├── default.nix
│ └── locale-eaw-console.patch
├── wine-run
│ └── default.nix
├── wine-vst-wrapper
│ └── default.nix
├── wineasio
│ └── default.nix
└── xembed-sni-proxy
│ └── default.nix
└── system
├── config
├── audio
│ ├── daw.nix
│ ├── pipewire.nix
│ └── tts.nix
├── cpu
│ ├── amd.nix
│ └── intel.nix
├── datetime
│ └── jp.nix
├── desktop
│ ├── files.nix
│ ├── gnome-compatible.nix
│ ├── wayland.nix
│ ├── xdg.nix
│ └── xorg.nix
├── gadgets
│ └── android.nix
├── graphic
│ ├── fonts.nix
│ ├── hidpi.nix
│ └── lodpi.nix
├── hardware
│ ├── dell-xps-9560-jp.nix
│ ├── firmware.nix
│ └── weylus.nix
├── i18n
│ ├── fcitx5.nix
│ └── locales.nix
├── keyboard
│ ├── jp.nix
│ ├── us.nix
│ └── zinc.nix
├── linux
│ ├── console.nix
│ ├── dbus.nix
│ ├── docker.nix
│ ├── filesystem.nix
│ ├── hardware.nix
│ ├── lodpi.nix
│ ├── optical.nix
│ ├── optimize.nix
│ ├── process.nix
│ ├── waydroid.nix
│ └── wine.nix
├── networking
│ ├── agent.nix
│ ├── avahi.nix
│ ├── network-manager.nix
│ ├── printer.nix
│ └── tailscale.nix
├── nixos
│ ├── gsettings.nix
│ ├── nix-ld.nix
│ └── nixpkgs.nix
├── security
│ ├── clamav.nix
│ ├── firewall-home.nix
│ ├── gnupg.nix
│ ├── ulimit.nix
│ └── yubikey.nix
├── services
│ └── nyzen9.nix
├── tools
│ ├── editors.nix
│ └── git.nix
├── user
│ ├── nixos.nix
│ └── nyarla.nix
├── video
│ ├── droidcam.nix
│ └── intel-with-nvidia.nix
├── vmm
│ └── kvm.nix
└── wireless
│ ├── AX200.nix
│ ├── bluetooth.nix
│ └── jp.nix
└── profile
└── NyZen9.nix
/.gitignore:
--------------------------------------------------------------------------------
1 | .node_modules
2 | result
3 | .snapshots
4 |
--------------------------------------------------------------------------------
/.secretlintrc.json:
--------------------------------------------------------------------------------
1 | {
2 | "rules": [
3 | {
4 | "id": "@secretlint/secretlint-rule-preset-recommend"
5 | }
6 | ]
7 | }
8 |
--------------------------------------------------------------------------------
/dotfiles/app/ghostty/default.nix:
--------------------------------------------------------------------------------
1 | { pkgs, ... }:
2 | {
3 | home.packages = with pkgs; [
4 | ghostty
5 | ];
6 |
7 | xdg.configFile."ghostty/config".text = ''
8 | theme = kalaclista
9 |
10 | font-family = Mononspace
11 | font-size = 12
12 | font-feature = -dlig
13 |
14 | grapheme-width-method = legacy
15 |
16 | cursor-style = block
17 | cursor-style-blink = true
18 |
19 | keybind = ctrl+p=paste_from_clipboard
20 |
21 | gtk-single-instance = true
22 | gtk-tabs-location = bottom
23 | gtk-adwaita = false
24 | '';
25 |
26 | xdg.configFile."ghostty/themes/kalaclista".text = ''
27 | palette = 0=#111111
28 | palette = 1=#f77468
29 | palette = 2=#aee46f
30 | palette = 3=#ffcb61
31 | palette = 4=#8cc8ff
32 | palette = 5=#fb7fd5
33 | palette = 6=#00efff
34 | palette = 7=#f1f1f1
35 | palette = 8=#9e9e9e
36 | palette = 9=#ff8274
37 | palette = 10=#bcf27c
38 | palette = 11=#ffd96e
39 | palette = 12=#abe4ff
40 | palette = 13=#ffb7ff
41 | palette = 14=#00ffff
42 | palette = 15=#ffffff
43 |
44 | background = 111111
45 | foreground = ffffff
46 |
47 | cursor-color = bcf27c
48 |
49 | selection-background = abe4ff
50 | selection-foreground = 000000
51 | '';
52 | }
53 |
--------------------------------------------------------------------------------
/dotfiles/app/git/default.nix:
--------------------------------------------------------------------------------
1 | { pkgs, config, ... }:
2 | {
3 | programs.git = {
4 | enable = true;
5 | lfs.enable = true;
6 | package = pkgs.gitFull;
7 | aliases = {
8 | co = "checkout";
9 | ci = "commit";
10 | force-push = "push -f --force-with-lease --force-if-includes";
11 | st = "status";
12 | cleanup = "!git branch --merged | grep -v main | grep -v master | xargs -I{} git branch -d {}";
13 | };
14 | extraConfig = {
15 | color = {
16 | ui = true;
17 | };
18 | init = {
19 | defaultBranch = "main";
20 | };
21 | core = {
22 | autoCRLF = false;
23 | fileMode = false;
24 | fscache = true;
25 | preloadindex = true;
26 | quotepath = false;
27 | hooksPath = "${config.home.homeDirectory}/Applications/Development/githooks/hooks";
28 | };
29 | credential.helper = "${pkgs.gitFull}/bin/git-credential-libsecret";
30 | };
31 | ignores = import ./gitignore.nix;
32 | };
33 | }
34 |
--------------------------------------------------------------------------------
/dotfiles/app/git/gitignore.nix:
--------------------------------------------------------------------------------
1 | [
2 | # Created by https://www.toptal.com/developers/gitignore/api/node,perl
3 | # Edit at https://www.toptal.com/developers/gitignore?templates=node,perl
4 |
5 | ### Node ###
6 | # Logs
7 | "logs"
8 | "*.log"
9 | "npm-debug.log*"
10 | "yarn-debug.log*"
11 | "yarn-error.log*"
12 | "lerna-debug.log*"
13 | ".pnpm-debug.log*"
14 |
15 | # Diagnostic reports (https://nodejs.org/api/report.html)
16 | "report.[0-9]*.[0-9]*.[0-9]*.[0-9]*.json"
17 |
18 | # Runtime data
19 | "pids"
20 | "*.pid"
21 | "*.seed"
22 | "*.pid.lock"
23 |
24 | # Directory for instrumented libs generated by jscoverage/JSCover
25 | "lib-cov"
26 |
27 | # Coverage directory used by tools like istanbul
28 | "coverage"
29 | "*.lcov"
30 |
31 | # nyc test coverage
32 | ".nyc_output"
33 |
34 | # Grunt intermediate storage (https://gruntjs.com/creating-plugins#storing-task-files)
35 | ".grunt"
36 |
37 | # Bower dependency directory (https://bower.io/)
38 | "bower_components"
39 |
40 | # node-waf configuration
41 | ".lock-wscript"
42 |
43 | # Compiled binary addons (https://nodejs.org/api/addons.html)
44 | "build/Release"
45 |
46 | # Dependency directories
47 | "node_modules/"
48 | "jspm_packages/"
49 |
50 | # Snowpack dependency directory (https://snowpack.dev/)
51 | "web_modules/"
52 |
53 | # TypeScript cache
54 | "*.tsbuildinfo"
55 |
56 | # Optional npm cache directory
57 | ".npm"
58 |
59 | # Optional eslint cache
60 | ".eslintcache"
61 |
62 | # Microbundle cache
63 | ".rpt2_cache/"
64 | ".rts2_cache_cjs/"
65 | ".rts2_cache_es/"
66 | ".rts2_cache_umd/"
67 |
68 | # Optional REPL history
69 | ".node_repl_history"
70 |
71 | # Output of 'npm pack'
72 | "*.tgz"
73 |
74 | # Yarn Integrity file
75 | ".yarn-integrity"
76 |
77 | # dotenv environment variables file
78 | ".env"
79 | ".env.test"
80 | ".env.production"
81 |
82 | # parcel-bundler cache (https://parceljs.org/)
83 | ".cache"
84 | ".parcel-cache"
85 |
86 | # Next.js build output
87 | ".next"
88 | "out"
89 |
90 | # Nuxt.js build / generate output
91 | ".nuxt"
92 | "dist"
93 |
94 | # Gatsby files
95 | ".cache/"
96 | # Comment in the public line in if your project uses Gatsby and not Next.js
97 | # https://nextjs.org/blog/next-9-1#public-directory-support
98 | # public
99 |
100 | # vuepress build output
101 | ".vuepress/dist"
102 |
103 | # Serverless directories
104 | ".serverless/"
105 |
106 | # FuseBox cache
107 | ".fusebox/"
108 |
109 | # DynamoDB Local files
110 | ".dynamodb/"
111 |
112 | # TernJS port file
113 | ".tern-port"
114 |
115 | # Stores VSCode versions used for testing VSCode extensions
116 | ".vscode-test"
117 |
118 | # yarn v2
119 | ".yarn/cache"
120 | ".yarn/unplugged"
121 | ".yarn/build-state.yml"
122 | ".yarn/install-state.gz"
123 | ".pnp.*"
124 |
125 | ### Node Patch ###
126 | # Serverless Webpack directories
127 | ".webpack/"
128 |
129 | # Optional stylelint cache
130 | ".stylelintcache"
131 |
132 | # SvelteKit build / generate output
133 | ".svelte-kit"
134 |
135 | ### Perl ###
136 | "!Build/"
137 | ".last_cover_stats"
138 | "/META.yml"
139 | "/META.json"
140 | "/MYMETA.*"
141 | "*.o"
142 | "*.pm.tdy"
143 | "*.bs"
144 |
145 | # Devel::Cover
146 | "cover_db/"
147 |
148 | # Devel::NYTProf
149 | "nytprof.out"
150 |
151 | # Dizt::Zilla
152 | "/.build/"
153 |
154 | # Module::Build
155 | "_build/"
156 | "Build"
157 | "Build.bat"
158 |
159 | # Module::Install
160 | "inc/"
161 |
162 | # ExtUtils::MakeMaker
163 | "/blib/"
164 | "/_eumm/"
165 | "/*.gz"
166 | "/Makefile.old"
167 | "/MANIFEST.bak"
168 | "/pm_to_blib"
169 | "/*.zip"
170 |
171 | # End of https://www.toptal.com/developers/gitignore/api/node,perl
172 |
173 | "lefthook.yml"
174 | ".lefthook"
175 | ]
176 |
--------------------------------------------------------------------------------
/dotfiles/app/hyprland/default.nix:
--------------------------------------------------------------------------------
1 | { pkgs, ... }:
2 | {
3 | imports = [
4 | ../../config/desktop/desktop-session.nix
5 | ../../config/desktop/dunst.nix
6 | ../../config/desktop/theme.nix
7 | ../../config/desktop/ydotoold.nix
8 | ];
9 |
10 | home.packages = with pkgs; [
11 | # wayland compositor
12 | hyprland
13 | hypridle
14 | hyprlock
15 | swaylock-effects # TODO: switch to hyprlock
16 |
17 | xwayland
18 |
19 | # desktop
20 | waybar
21 | wofi
22 |
23 | gyazo-diy
24 | libsecret
25 | mission-center
26 |
27 | # apps
28 | libsecret
29 | mission-center
30 | gyazo-diy
31 |
32 | # background services
33 | blueman
34 | networkmanagerapplet
35 | xembed-sni-proxy
36 |
37 | # utilities
38 | grim
39 | slurp
40 | wayout
41 | wev
42 | wlr-randr
43 | ydotool
44 |
45 | wl-clipboard
46 | xclip
47 | ];
48 |
49 | home.file.".local/bin/hy".source = toString (
50 | pkgs.writeShellScript "starthyprland" ''
51 | exec >$HOME/Reports/hyprland.log 2>&1
52 |
53 | for rc in $(ls /etc/profile.d); do
54 | . /etc/profile.d/$rc
55 | done
56 |
57 | for rc in $(ls $HOME/.config/profile.d); do
58 | . $HOME/.config/profile.d/$rc
59 | done
60 |
61 | export DESKTOP_SESSION=hyprland
62 | export LIBSEAT_BACKEND=logind
63 |
64 | export XDG_SESSION_CLASS=user
65 | export XDG_SESSION_TYPE=wayland
66 |
67 | if systemctl --user -q is-active desktop-session.target ; then
68 | echo "Desktop session already exists." >&2
69 | exit 1
70 | fi
71 |
72 | if hash dbus-update-activation-environment 2>/dev/null; then
73 | dbus-update-activation-environment --systemd --all
74 | fi
75 |
76 | systemctl --user reset-failed
77 |
78 | cleanup() {
79 | if systemctl --user -q is-active desktop-session.target ; then
80 | systemctl --user stop desktop-session.target
81 | fi
82 | }
83 | trap cleanup INT TERM
84 |
85 | dbus-launch --exit-with-session ${pkgs.hyprland}/bin/Hyprland
86 | cleanup
87 | ''
88 | );
89 | }
90 |
--------------------------------------------------------------------------------
/dotfiles/app/labwc/autostart.nix:
--------------------------------------------------------------------------------
1 | {
2 | fetchurl,
3 | writeShellScript,
4 | writeText,
5 |
6 | blueman,
7 | calibre,
8 | goreman,
9 | lxqt,
10 | networkmanagerapplet,
11 | qpwgraph,
12 | xembed-sni-proxy,
13 | }:
14 | let
15 | wallpaper = fetchurl {
16 | url = "https://raw.githubusercontent.com/NixOS/nixos-artwork/refs/heads/master/wallpapers/nix-wallpaper-mosaic-blue.png";
17 | sha256 = "1cbcssa8qi0giza0k240w5yy4yb2bhc1p1r7pw8qmziprcmwv5n5";
18 | };
19 |
20 | procfile = writeText "Procfile" ''
21 | blueman: ${blueman}/bin/blueman-applet
22 | calibre: env QT_IM_MODULE= GTK_IM_MODULE= ${calibre}/bin/calibre --start-in-tray
23 | clipboard: wl-paste -t text -w xclip -selection clipboard
24 | fcitx5: fcitx5 -r
25 | nm-applet: ${networkmanagerapplet}/bin/nm-applet --indicator
26 | lxqt-panel: ${lxqt.lxqt-panel}/bin/lxqt-panel
27 | xembedsniproxy: ${xembed-sni-proxy}/bin/xembedsniproxy
28 | qpwgraph: ${qpwgraph}/bin/qpwgraph -m
29 | '';
30 | in
31 | writeShellScript "autostart" ''
32 | cd $HOME
33 | chmod +w .Procfile
34 | cp ${procfile} .Procfile
35 |
36 | systemctl --user import-environment WAYLAND_DISPLAY
37 |
38 | systemctl --user start desktop-session.target
39 | systemctl --user start swaylock
40 |
41 | eval "$(/run/wrappers/bin/gnome-keyring-daemon --components=pkcs11,secrets,ssh --replace --daemonize)"
42 | export SSH_AUTH_SOCK
43 | export GNOME_KEYRING_CONTROL
44 |
45 | ${goreman}/bin/goreman -f .Procfile start &
46 |
47 | swaybg -i ${wallpaper} -m fit &
48 | ''
49 |
--------------------------------------------------------------------------------
/dotfiles/app/labwc/default.nix:
--------------------------------------------------------------------------------
1 | { pkgs, ... }:
2 | let
3 | require = path: pkgs.callPackage (import path);
4 | in
5 | {
6 | imports = [
7 | ../../config/desktop/desktop-session.nix
8 | ../../config/desktop/dunst.nix
9 | ../../config/desktop/swaylock.nix
10 | ../../config/desktop/theme.nix
11 | ../../config/desktop/ydotoold.nix
12 | ];
13 |
14 | home.packages = with pkgs; [
15 | # credential
16 | libsecret
17 |
18 | # desktop
19 | mission-center
20 |
21 | # wayland
22 | grim
23 | slurp
24 | wl-clipboard
25 | xclip
26 | gyazo-diy
27 |
28 | labwc
29 | swaybg
30 | swayidle
31 | swaylock-effects
32 | goreman
33 |
34 | wayout
35 | wev
36 | wlr-randr
37 | ydotool
38 | ];
39 |
40 | xdg.configFile = {
41 | "labwc/autostart".source = toString (require ./autostart.nix { });
42 | "labwc/menu.xml".text = require ../../config/vars/appmenu.nix { };
43 | "labwc/rc.xml".text = require ./rc.nix { };
44 |
45 | "labwc/environment".text = ''
46 | GTK2_RC_FILES=$HOME/.gtkrc-2.0
47 |
48 | LANG=ja_JP.UTF_8
49 | LC_ALL=ja_JP.UTF-8
50 |
51 | XKB_DEFAULT_LAYOUT=us
52 |
53 | GDK_BACKEND=wayland
54 | CLUTTER_BACKEND=wayland
55 | QT_QPA_PLATFORM=wayland
56 |
57 | MOZ_DISABLE_RDD_SANDBOX=1
58 | MOZ_ENABLE_WAYLAND=1
59 | MOZ_USE_XINPUT2=1
60 | MOZ_WEBRENDER=1
61 |
62 | SDL_VIDEODRIVER=wayland
63 | _JAVA_AWT_WM_NONREPARENTING=1
64 | '';
65 | };
66 |
67 | home.file.".local/bin/sw".source = toString (
68 | pkgs.writeShellScript "startlabwc" ''
69 | exec >$HOME/Reports/sw.log 2>&1
70 |
71 | for rc in $(ls /etc/profile.d); do
72 | . /etc/profile.d/$rc
73 | done
74 |
75 | for rc in $(ls $HOME/.config/profile.d); do
76 | . $HOME/.config/profile.d/$rc
77 | done
78 |
79 | export DESKTOP_SESSION=wlroots
80 | export LIBSEAT_BACKEND=logind
81 |
82 | export XDG_CURRENT_DESKTOP=labwc:wlroots
83 | export XDG_SESSION_CLASS=user
84 | export XDG_SESSION_DESKTOP=labwc:wlroots
85 | export XDG_SESSION_TYPE=wayland
86 |
87 | export WLR_RENDERER_ALLOW_SOFTWARE=1
88 | export WLR_RENDERER=gles2
89 |
90 | if systemctl --user -q is-active desktop-session.target ; then
91 | echo "Desktop session already exists." >&2
92 | exit 1
93 | fi
94 |
95 | if hash dbus-update-activation-environment 2>/dev/null; then
96 | dbus-update-activation-environment --systemd --all
97 | fi
98 |
99 | systemctl --user reset-failed
100 |
101 | cleanup() {
102 | pkill goreman
103 | if systemctl --user -q is-active desktop-session.target ; then
104 | systemctl --user stop desktop-session.target
105 | fi
106 | }
107 | trap cleanup INT TERM
108 |
109 | dbus-launch --exit-with-session ${pkgs.labwc}/bin/labwc -V
110 | cleanup
111 | ''
112 | );
113 | }
114 |
--------------------------------------------------------------------------------
/dotfiles/app/labwc/rc.nix:
--------------------------------------------------------------------------------
1 | { lib }:
2 | let
3 | inherit (import ../../config/vars/xml.nix { inherit lib; })
4 | tag2
5 | el2
6 | el3
7 | ;
8 |
9 | p = name: contains: el2 name (if builtins.isList contains then contains else [ contains ]);
10 | a = name: attrs: tag2 name attrs;
11 |
12 | font =
13 | place:
14 | { name, size }:
15 | el3 "font" { inherit place; } [
16 | (p "name" name)
17 | (p "size" size)
18 | ];
19 |
20 | keybind = key: actions: el3 "keybind" { inherit key; } actions;
21 | mousebind =
22 | button: action: actions:
23 | el3 "mousebind" { inherit button action; } actions;
24 |
25 | run =
26 | commandline:
27 | el3 "action" { name = "Execute"; } [
28 | (el2 "command" [ commandline ])
29 | ];
30 |
31 | action =
32 | name: contains:
33 | if (builtins.length contains) == 0 then
34 | el2 "action" { inherit name; }
35 | else
36 | el3 "action" { inherit name; } contains;
37 | in
38 | ''
39 |
40 | ''
41 | + (p "labwc_config" [
42 |
43 | (p "regions" [
44 | (a "region" {
45 | name = "center";
46 | x = "25%";
47 | y = "25%";
48 | width = "50%";
49 | height = "50%";
50 | })
51 | ])
52 |
53 | (p "theme" [
54 | (p "name" "Kaunas")
55 | (p "icon" "Fluent-light")
56 | (p "cornerRadius" "0")
57 | (p "dropShadow" "yes")
58 | (font "ActiveWindow" {
59 | name = "sans";
60 | size = "9";
61 | })
62 | (font "MenuItem" {
63 | name = "sans";
64 | size = "10";
65 | })
66 | (font "OSD" {
67 | name = "sans";
68 | size = "9";
69 | })
70 | ])
71 |
72 | (p "keyboard" [
73 | (keybind "A-Left" [ (action "SnapToEdge" [ (p "direction" "left") ]) ])
74 | (keybind "A-Right" [ (action "SnapToEdge" [ (p "direction" "right") ]) ])
75 | (keybind "A-Up" [ (action "SnapToEdge" [ (p "direction" "up") ]) ])
76 | (keybind "A-Down" [ (action "SnapToEdge" [ (p "direction" "down") ]) ])
77 |
78 | (keybind "A-o" [ (action "SnapToRegion" [ (p "region" "center") ]) ])
79 |
80 | (keybind "A-F1" [ (action "ShowMenu" [ (p "menu" "root-menu") ]) ])
81 | (keybind "A-F2" [ (action "ShowMenu" [ (p "menu" "applications-creative") ]) ])
82 | (keybind "C-W-q" [ (run "swaylock -C ~/.config/swaylock/config -f") ])
83 |
84 | (keybind "S-Print" [ (run "gyazo screenshot") ])
85 | (keybind "C-Print" [ (run "gyazo capture") ])
86 | ])
87 | ])
88 |
--------------------------------------------------------------------------------
/dotfiles/app/mlterm/aafont.nix:
--------------------------------------------------------------------------------
1 | { system, ... }:
2 | let
3 | mapEmoji = font: {
4 | "U+A9" = font;
5 | "U+AE" = font;
6 | "U+200D" = font;
7 | "U+203C" = font;
8 | "U+2049" = font;
9 | "U+20E3" = font;
10 | "U+2122" = font;
11 | "U+2139" = font;
12 | "U+2194-2199" = font;
13 | "U+21A9-21AA" = font;
14 | "U+231A-231B" = font;
15 | "U+2328" = font;
16 | "U+23CF" = font;
17 | "U+23E9-23F3" = font;
18 | "U+23F8-23FA" = font;
19 | "U+24C2" = font;
20 | "U+25AA-25AB" = font;
21 | "U+25B6" = font;
22 | "U+25C0" = font;
23 | "U+25FB-25FE" = font;
24 | "U+2600-2604" = font;
25 | "U+260E" = font;
26 | "U+2611" = font;
27 | "U+2614-2615" = font;
28 | "U+2618" = font;
29 | "U+261D" = font;
30 | "U+2620" = font;
31 | "U+2622-2623" = font;
32 | "U+2626" = font;
33 | "U+262A" = font;
34 | "U+262E-262F" = font;
35 | "U+2638-263A" = font;
36 | "U+2640" = font;
37 | "U+2642" = font;
38 | "U+2648-2653" = font;
39 | "U+265F-2660" = font;
40 | "U+2663" = font;
41 | "U+2665-2666" = font;
42 | "U+2668" = font;
43 | "U+267B" = font;
44 | "U+267E-267F" = font;
45 | "U+2692-2697" = font;
46 | "U+2699" = font;
47 | "U+269B-269C" = font;
48 | "U+26A0-26A1" = font;
49 | "U+26AA-26AB" = font;
50 | "U+26B0-26B1" = font;
51 | "U+26BD-26BE" = font;
52 | "U+26C4-26C5" = font;
53 | "U+26C8" = font;
54 | "U+26CE-26CF" = font;
55 | "U+26D1" = font;
56 | "U+26D3-26D4" = font;
57 | "U+26E9-26EA" = font;
58 | "U+26F0-26F5" = font;
59 | "U+26F7-26FA" = font;
60 | "U+26FD" = font;
61 | "U+2702" = font;
62 | "U+2705" = font;
63 | "U+2708-270D" = font;
64 | "U+270F" = font;
65 | "U+2712" = font;
66 | "U+2714" = font;
67 | "U+2716" = font;
68 | "U+271D" = font;
69 | "U+2721" = font;
70 | "U+2728" = font;
71 | "U+2733-2734" = font;
72 | "U+2744" = font;
73 | "U+2747" = font;
74 | "U+274C" = font;
75 | "U+274E" = font;
76 | "U+2753-2755" = font;
77 | "U+2757" = font;
78 | "U+2763-2764" = font;
79 | "U+2795-2797" = font;
80 | "U+27A1" = font;
81 | "U+27B0" = font;
82 | "U+27BF" = font;
83 | "U+2934-2935" = font;
84 | "U+2B05-2B07" = font;
85 | "U+2B1B-2B1C" = font;
86 | "U+2B50" = font;
87 | "U+2B55" = font;
88 | "U+3030" = font;
89 | "U+303D" = font;
90 | "U+3297" = font;
91 | "U+3299" = font;
92 | "U+FE0F" = font;
93 | "U+1F004" = font;
94 | "U+1F0CF" = font;
95 | "U+1F170-1F171" = font;
96 | "U+1F17E-1F17F" = font;
97 | "U+1F18E" = font;
98 | "U+1F191-1F19A" = font;
99 | "U+1F1E6-1F1FF" = font;
100 | "U+1F201-1F202" = font;
101 | "U+1F21A" = font;
102 | "U+1F22F" = font;
103 | "U+1F232-1F23A" = font;
104 | "U+1F250-1F251" = font;
105 | "U+1F300-1F321" = font;
106 | "U+1F324-1F393" = font;
107 | "U+1F396-1F397" = font;
108 | "U+1F399-1F39B" = font;
109 | "U+1F39E-1F3F0" = font;
110 | "U+1F3F3-1F3F5" = font;
111 | "U+1F3F7-1F4FD" = font;
112 | "U+1F4FF-1F53D" = font;
113 | "U+1F549-1F54E" = font;
114 | "U+1F550-1F567" = font;
115 | "U+1F56F-1F570" = font;
116 | "U+1F573-1F57A" = font;
117 | "U+1F587" = font;
118 | "U+1F58A-1F58D" = font;
119 | "U+1F590" = font;
120 | "U+1F595-1F596" = font;
121 | "U+1F5A4-1F5A5" = font;
122 | "U+1F5A8" = font;
123 | "U+1F5B1-1F5B2" = font;
124 | "U+1F5BC" = font;
125 | "U+1F5C2-1F5C4" = font;
126 | "U+1F5D1-1F5D3" = font;
127 | "U+1F5DC-1F5DE" = font;
128 | "U+1F5E1" = font;
129 | "U+1F5E3" = font;
130 | "U+1F5E8" = font;
131 | "U+1F5EF" = font;
132 | "U+1F5F3" = font;
133 | "U+1F5FA-1F64F" = font;
134 | "U+1F680-1F6C5" = font;
135 | "U+1F6CB-1F6D2" = font;
136 | "U+1F6D5" = font;
137 | "U+1F6E0-1F6E5" = font;
138 | "U+1F6E9" = font;
139 | "U+1F6EB-1F6EC" = font;
140 | "U+1F6F0" = font;
141 | "U+1F6F3-1F6FA" = font;
142 | "U+1F7E0-1F7EB" = font;
143 | "U+1F90D-1F93A" = font;
144 | "U+1F93C-1F945" = font;
145 | "U+1F947-1F971" = font;
146 | "U+1F973-1F976" = font;
147 | "U+1F97A-1F9A2" = font;
148 | "U+1F9A5-1F9AA" = font;
149 | "U+1F9AE-1F9CA" = font;
150 | "U+1F9CD-1F9FF" = font;
151 | "U+1FA70-1FA73" = font;
152 | "U+1FA78-1FA7A" = font;
153 | "U+1FA80-1FA82" = font;
154 | "U+1FA90-1FA95" = font;
155 | "U+E0062-E0063" = font;
156 | "U+E0065" = font;
157 | "U+E0067" = font;
158 | "U+E006C" = font;
159 | "U+E006E" = font;
160 | "U+E0073-E0074" = font;
161 | "U+E0077" = font;
162 | "U+E007F" = font;
163 | };
164 | in
165 | {
166 | x86_64-linux = {
167 | DEFAULT = "Monospace";
168 | "U+E000-F8FF" = "Hack Nerd Font";
169 | "U+F0000-FFFFD" = "Hack Nerd Font";
170 | } // mapEmoji "Noto Color Emoji";
171 | }
172 | ."${system}"
173 |
--------------------------------------------------------------------------------
/dotfiles/app/mlterm/color.nix:
--------------------------------------------------------------------------------
1 | {
2 | black = "#111111"; # 5
3 | red = "#f77468"; # 65
4 | green = "#aee46f"; # 85
5 | yellow = "#ffcb61"; # 85
6 | blue = "#8cc8ff"; # 85
7 | magenta = "#fb7fd5"; # 85
8 | cyan = "#00efff"; # 85
9 | white = "#f1f1f1"; # 95
10 |
11 | hl_black = "#9e9e9e"; # 65
12 | hl_red = "#ff8274"; # 75
13 | hl_green = "#bcf27c"; # 90
14 | hl_yellow = "#ffd96e"; # 90
15 | hl_blue = "#abe4ff"; # 90
16 | hl_magenta = "#ffb7ff"; # 90
17 | hl_cyan = "#00ffff"; # 95
18 | hl_white = "#ffffff"; # 100
19 | }
20 |
--------------------------------------------------------------------------------
/dotfiles/app/mlterm/default.nix:
--------------------------------------------------------------------------------
1 | { lib, pkgs, ... }:
2 | let
3 | toKV = lib.generators.toKeyValue { };
4 |
5 | aafont = (import ./aafont.nix) { inherit (pkgs.stdenv) system; };
6 | main = (import ./main.nix) { inherit color pkgs; };
7 | color = import ./color.nix;
8 | key = import ./key.nix;
9 | in
10 | {
11 | home = {
12 | packages = with pkgs; [ mlterm-wayland ];
13 | file = {
14 | ".mlterm/aafont".text = toKV aafont;
15 | ".mlterm/color".text = toKV color;
16 | ".mlterm/key".text = toKV key;
17 | ".mlterm/main".text = toKV main;
18 | };
19 | };
20 | }
21 |
--------------------------------------------------------------------------------
/dotfiles/app/mlterm/key.nix:
--------------------------------------------------------------------------------
1 | {
2 | "Control+p" = ''"proto:paste"'';
3 | }
4 |
--------------------------------------------------------------------------------
/dotfiles/app/mlterm/main.nix:
--------------------------------------------------------------------------------
1 | { color, pkgs }:
2 | let
3 | config = {
4 | # terminal
5 | use_login_shell = true;
6 | termtype = "mlterm-256color";
7 | encoding = "UTF-8";
8 | col_size_of_width_a = 1;
9 | bidi_mode = "left";
10 |
11 | # font
12 | fontsize = 16;
13 | line_space = 0;
14 | use_anti_alias = true;
15 | box_drawing_font = "unicode";
16 | type_engine = "cairo";
17 | unicode_full_width_areas = "U+2030-2031,U+203B-203B,U+2121-2121,U+213B-213B,U+214F-214F,U+2160-2182,U+2190-21FF,U+2318-2318,U+2325-2325,U+2460-24FF,U+25A0-25D7,U+25D9-25E5,U+25E7-2653,U+2668-2668,U+2670-2712,U+2744-2744,U+2747-2747,U+2763-2763,U+2776-2793,U+27F5-27FF,U+2B33-2B33,U+3248-324F,U+E000-EDFF,U+EE0C-F8FF,U+1F000-1F02B,U+1F030-1F093,U+1F0A0-1F0F5,U+1F100-1FAF8,U+F0000-10FFFD";
18 | emoji_path = "${pkgs.noto-fonts-color-emoji}/share/fonts/noto/NotoColorEmoji.ttf";
19 |
20 | # appearance
21 | scrollbar_mode = false;
22 | vt_color_mode = true;
23 | blink_cursor = true;
24 |
25 | bg_color = color.black;
26 | fg_color = color.hl_white;
27 |
28 | cursor_bg_color = color.hl_green;
29 | cursor_fg_color = color.black;
30 |
31 | tab_size = 2;
32 | log_size = 100000;
33 |
34 | # others
35 | mod_meta_key = "alt";
36 | mod_meta_mode = "esc";
37 | use_clipboard = true;
38 | };
39 |
40 | extraConfig = {
41 | x86_64-linux = {
42 | use_xim = false;
43 | input_method = "ibus";
44 | };
45 | };
46 | in
47 | config // extraConfig."${pkgs.stdenv.system}"
48 |
--------------------------------------------------------------------------------
/dotfiles/app/xdg/default.nix:
--------------------------------------------------------------------------------
1 | { lib, ... }:
2 | {
3 | xdg.mimeApps = {
4 | enable = true;
5 | defaultApplications =
6 | let
7 | toMimeMap =
8 | apps:
9 | lib.attrsets.concatMapAttrs (
10 | app: mimeTypes: lib.attrsets.mergeAttrsList (lib.lists.map (mime: { "${mime}" = app; }) mimeTypes)
11 | ) apps;
12 | in
13 | toMimeMap {
14 | # web
15 | "firefox.desktop" = [
16 | # files
17 | "application/x-extension-htm"
18 | "application/x-extension-xhtml"
19 | "text/html"
20 |
21 | # schema
22 | "x-scheme-handler/http"
23 | "x-scheme-handler/https"
24 | ];
25 |
26 | # files
27 | "pluma.desktop" = [
28 | "text/plain"
29 | ];
30 |
31 | "eom.desktop" = [
32 | "image/apng"
33 | "image/bmp"
34 | "image/gif"
35 | "image/jp2"
36 | "image/jpeg"
37 | "image/jpm"
38 | "image/jpx"
39 | "image/jxl"
40 | "image/jxr"
41 | "image/png"
42 | "image/svg+xml"
43 | "image/svg+xml-compressed"
44 | "image/tiff"
45 | "image/vnd.microsoft.icon"
46 | "image/webp"
47 | ];
48 |
49 | "deadbeef.desktop" = [
50 | "audio/flac"
51 | "audio/mpeg"
52 | "audio/ogg"
53 | "audio/webm"
54 | "audio/x-ape"
55 | "audio/x-flac+ogg"
56 | "audio/x-ms-wma"
57 | "audio/x-opus+ogg"
58 | "audio/x-vorbis+ogg"
59 | ];
60 |
61 | "atril.desktop" = [
62 | "application/epub+zip"
63 | "application/pdf"
64 | "application/rtf"
65 | ];
66 |
67 | "thunar.desktop" = [
68 | "inode/directory"
69 | "inode/mount-point"
70 | ];
71 | };
72 | };
73 | }
74 |
--------------------------------------------------------------------------------
/dotfiles/config/app/browser.nix:
--------------------------------------------------------------------------------
1 | { pkgs, ... }:
2 | {
3 | programs = {
4 | firefox = {
5 | enable = true;
6 | package = pkgs.firefox-bin;
7 | };
8 |
9 | chromium = {
10 | enable = true;
11 | package = pkgs.google-chrome;
12 | };
13 | };
14 |
15 | home.packages = with pkgs; [
16 | bitwarden
17 | thunderbird-bin
18 | ];
19 | }
20 |
--------------------------------------------------------------------------------
/dotfiles/config/app/chat.nix:
--------------------------------------------------------------------------------
1 | { pkgs, ... }:
2 | {
3 | home.packages = with pkgs; [ tdesktop ];
4 | }
5 |
--------------------------------------------------------------------------------
/dotfiles/config/app/creative.nix:
--------------------------------------------------------------------------------
1 | { pkgs, config, ... }:
2 | {
3 | home.sessionVariables = {
4 | VST_PATH = "$HOME/.nix-profile/lib/vst:$HOME/.nix-profile/lib/lxvst";
5 | VST3_PATH = "$HOME/.nix-profile/lib/vst3";
6 | LV2_PATH = "$HOME/.nix-profile/lib/lv2";
7 | CLAP_PATH = "$HOME/.nix-profile/lib/clap";
8 | };
9 |
10 | # for zrythm
11 | xdg.dataFile."icons/zrythm-dark".source = "${pkgs.zrythm}/share/zrythm/themes/icons/zrythm-dark";
12 |
13 | home.packages =
14 | with pkgs;
15 | [
16 | # graphics
17 | gimp
18 | inkscape
19 | krita
20 |
21 | # pixel arts
22 | aseprite
23 | pixelorama
24 | ]
25 | ++ [
26 | # digital audio workstation
27 | bitwig-studio3
28 | famistudio
29 | helio-workstation
30 | musescore
31 | zrythm
32 |
33 | # voice synthesize
34 | openutau
35 | voicevox
36 |
37 | # sample manager
38 | sononym-bin
39 |
40 | # vst plugin host
41 | audiogridder
42 | carla-with-wine
43 | ildaeil
44 |
45 | # plugin bridge
46 | yabridge
47 | yabridgectl
48 |
49 | # vst plugins
50 | calf
51 | surge-XT
52 |
53 | # generator plugins
54 | adlplug
55 | aeolus
56 | ams
57 | bespokesynth-with-vst2
58 | bjumblr
59 | bristol
60 | chow-kick
61 | dexed
62 | drumgizmo
63 | drumkv1
64 | geonkick
65 | helm
66 | hydrogen
67 | librearp
68 | ninjas2
69 | odin2
70 | opnplug
71 | oxefmsynth
72 | padthv1
73 | qsynth
74 | samplv1
75 | sfizz
76 | sorcer
77 | sorcer
78 | synthv1
79 | tunefish
80 | tunefish
81 | vital
82 | x42-avldrums
83 | x42-gmsynth
84 | yoshimi
85 | zynaddsubfx
86 |
87 | # effect plugins
88 | aether-lv2
89 | airwindows
90 | artyFX
91 | bankstown-lv2
92 | bchoppr
93 | bolliedelayxt-lv2
94 | boops
95 | bs2b-lv2
96 | bshapr
97 | bslizr
98 | chow-tape-model
99 | eq10q
100 | fverb
101 | gxplugins-lv2
102 | kapitonov-plugins-pack
103 | lsp-plugins
104 | lsp-plugins
105 | mod-distortion
106 | molot-lite
107 | mooSpace
108 | neural-amp-modeler-lv2
109 | noise-repellent
110 | rkrlv2
111 | talentedhack
112 | tap-plugins
113 | vocproc
114 | x42-plugins
115 | zam-plugins
116 | calf
117 |
118 | # others
119 | bschaffl
120 | bsequencer
121 | calf
122 | fomp
123 | mda_lv2
124 | midi-trigger
125 | mod-arpeggiator-lv2
126 | plujain-ramp
127 | vcv-rack
128 |
129 | # assets
130 | aeolus-stops
131 | freepats
132 | ]
133 | ++ [
134 | blender
135 | ];
136 | }
137 |
--------------------------------------------------------------------------------
/dotfiles/config/app/multimedia.nix:
--------------------------------------------------------------------------------
1 | { pkgs, ... }:
2 | {
3 | home.packages = with pkgs; [
4 | calibre
5 | (deadbeef-with-plugins.override { plugins = [ deadbeef-fb ]; })
6 | easytag
7 | glib.out
8 | picard
9 | vlc
10 | ];
11 | }
12 |
--------------------------------------------------------------------------------
/dotfiles/config/app/office.nix:
--------------------------------------------------------------------------------
1 | { pkgs, ... }:
2 | {
3 | home.packages = with pkgs; [
4 | gucharmap
5 | libreoffice
6 | mate.mate-calc
7 | simple-scan
8 | ];
9 | }
10 |
--------------------------------------------------------------------------------
/dotfiles/config/app/wine.nix:
--------------------------------------------------------------------------------
1 | { pkgs, ... }:
2 | {
3 | home.packages = with pkgs; [
4 | winetricks
5 | wine-staging-run
6 | wine-vst-run
7 | ];
8 | }
9 |
--------------------------------------------------------------------------------
/dotfiles/config/desktop/desktop-session.nix:
--------------------------------------------------------------------------------
1 | _: {
2 | systemd.user.targets.desktop-session = {
3 | Unit = {
4 | Description = "Desktop Session target for Xorg and Wayland";
5 | BindsTo = [ "graphical-session.target" ];
6 | Wants = [ "graphical-session-pre.target" ];
7 | After = [ "graphical-session-pre.target" ];
8 | };
9 | };
10 |
11 | systemd.user.targets.desktop-xdg-autostart = {
12 | Unit = {
13 | Description = "XDG Autostart for Xorg and Wayland desktop";
14 | BindsTo = [ "xdg-desktop-autostart.target" ];
15 | PartOf = [ "desktop-session.target" ];
16 | After = [ "desktop-session.target" ];
17 | };
18 | };
19 |
20 | systemd.user.targets.desktop-session-shutdown = {
21 | Unit = {
22 | Description = "Shutdown running Xorg and Wayland Desktop";
23 | DefaultDependencies = "no";
24 | StopWhenUnneeded = true;
25 |
26 | Conflict = [
27 | "graphical-session.target"
28 | "graphical-session-pre.target"
29 | "desktop-session.target"
30 | ];
31 | After = [
32 | "graphical-session.target"
33 | "graphical-session-pre.target"
34 | "desktop-session.target"
35 | ];
36 | };
37 | };
38 | }
39 |
--------------------------------------------------------------------------------
/dotfiles/config/desktop/dunst.nix:
--------------------------------------------------------------------------------
1 | { pkgs, ... }:
2 | {
3 | services.dunst = {
4 | enable = true;
5 | package = pkgs.dunst;
6 | iconTheme = {
7 | name = "Fluent";
8 | package = pkgs.fluent-icon-theme;
9 | size = "16x16";
10 | };
11 | waylandDisplay = "wayland-0";
12 | settings = {
13 | global = {
14 | width = 240;
15 | hight = 135;
16 | offset = "48x24";
17 | progress_bar_hight = 3;
18 | progress_bar_min_width = 60;
19 | progress_bar_max_widthi = 120;
20 | separator_height = 16;
21 | padding = 4;
22 | horizontal_padding = 8;
23 | text_icon_padding = 8;
24 | font = "Noto Sans CJK JP 8";
25 | light_height = 11;
26 | icon_position = "left";
27 | min_icon_size = 16;
28 | max_icon_size = 16;
29 | frame_width = 1;
30 |
31 | vertical_alignment = "top";
32 | alignment = "left";
33 | format = ''
34 | %a
35 | %s
36 | %b
37 | '';
38 |
39 | background = "#F9F9F9";
40 | foreground = "#000000";
41 | highlight = "#666666";
42 | frame_color = "#000000";
43 | };
44 |
45 | urgency_low = {
46 | background = "#00CCFF";
47 | foreground = "#000000";
48 | };
49 | urgency_normal = {
50 | background = "#FFCC33";
51 | foreground = "#000000";
52 | };
53 | uergency_critical = {
54 | background = "#FF6633";
55 | foreground = "#000000";
56 | };
57 | };
58 | };
59 | }
60 |
--------------------------------------------------------------------------------
/dotfiles/config/desktop/swaylock.nix:
--------------------------------------------------------------------------------
1 | { pkgs, ... }:
2 | let
3 | swaylock-script = toString (
4 | with pkgs;
5 | writeShellScript "swaylock.sh" ''
6 | ${swayidle}/bin/swayidle -w \
7 | timeout 60 'swaylock -C ~/.config/swaylock/config -f' \
8 | timeout 60 '${wayout}/bin/wayout --off HDMI-A-3' resume '${wayout}/bin/wayout --on HDMI-A-3'
9 | before-sleep 'swaylock -C ~/.config/swaylock/config -f' \
10 | lock 'swaylock -C ~/.config/swaylock/config -f'
11 | ''
12 | );
13 |
14 | image = pkgs.fetchurl {
15 | url = "https://raw.githubusercontent.com/NixOS/nixos-artwork/master/wallpapers/nix-wallpaper-stripes.png";
16 | sha256 = "116337wv81xfg0g0bsylzzq2b7nbj6hjyh795jfc9mvzarnalwd3";
17 | };
18 | in
19 | {
20 | programs.swaylock.enable = true;
21 | programs.swaylock.package = pkgs.swaylock-effects;
22 | programs.swaylock.settings = {
23 | image = toString image;
24 | inside-color = "00000000";
25 | inside-ver-color = "00000000";
26 | inside-wrong-color = "00000000";
27 | ring-color = "00000000";
28 | ring-ver-color = "FFFFFF99";
29 | ring-wrong-color = "FF333399";
30 | line-color = "00000000";
31 | key-hl-color = "FFFFFF66";
32 | bs-hl-color = "FFFFFF33";
33 | separator-color = "00000000";
34 | datestr = "%A";
35 | };
36 |
37 | systemd.user.services.swaylock = {
38 | Unit = {
39 | Description = "Screen lock services by sway utilites";
40 | After = [ "graphical-session.target" ];
41 | PartOf = [ "graphical-session.target" ];
42 | };
43 |
44 | Service = {
45 | Type = "simple";
46 | Restart = "on-failure";
47 | ExecStart = swaylock-script;
48 | };
49 | };
50 | }
51 |
--------------------------------------------------------------------------------
/dotfiles/config/desktop/theme.nix:
--------------------------------------------------------------------------------
1 | { pkgs, ... }:
2 | {
3 | gtk = {
4 | enable = true;
5 |
6 | iconTheme = {
7 | name = "Fluent-light";
8 | package = pkgs.fluent-icon-theme;
9 | };
10 |
11 | theme = {
12 | name = "Fluent-Light-compact";
13 | package = pkgs.fluent-gtk-theme;
14 | };
15 |
16 | font = {
17 | name = "Sans";
18 | size = 9;
19 | };
20 | };
21 |
22 | qt = {
23 | enable = true;
24 | platformTheme.name = "gtk3";
25 | style.name = "kvantum";
26 | style.package = with pkgs; [
27 | libsForQt5.qtstyleplugin-kvantum
28 | qt6Packages.qtstyleplugin-kvantum
29 | ];
30 | };
31 |
32 | xdg.configFile."Kvantum/Fluent".source = with pkgs; "${fluent-kde}/share/Kvantum/Fluent";
33 |
34 | home.pointerCursor = {
35 | name = "capitaine-cursors-white";
36 | package = pkgs.capitaine-cursors;
37 | size = 24;
38 |
39 | gtk.enable = true;
40 | x11.enable = true;
41 | x11.defaultCursor = "left_ptr";
42 | };
43 |
44 | home.packages = with pkgs; [
45 | adwaita-icon-theme
46 | fluent-kde
47 | gnome-themes-extra
48 | gtk-engine-murrine
49 | gtk_engines
50 | hicolor-icon-theme
51 | kaunas
52 | ];
53 | }
54 |
--------------------------------------------------------------------------------
/dotfiles/config/desktop/ydotoold.nix:
--------------------------------------------------------------------------------
1 | { pkgs, config, ... }:
2 | {
3 | systemd.user.services.ydotoold = {
4 | Unit = {
5 | Description = "Autostart for ydotoold";
6 | After = [ "graphical-session.target" ];
7 | PartOf = [ "graphical-session.target" ];
8 | };
9 |
10 | Install = {
11 | WantedBy = [ "graphical-session.target" ];
12 | };
13 |
14 | Service = {
15 | Environment = [
16 | "HOME=${config.home.homeDirectory}"
17 | "LANG=ja_JP.UTF-8"
18 | "LC_ALL=ja_JP.UTF-8"
19 | ];
20 | ExecStart = "${pkgs.ydotool}/bin/ydotoold";
21 | Restart = "always";
22 | };
23 | };
24 | }
25 |
--------------------------------------------------------------------------------
/dotfiles/config/files/skk.nix:
--------------------------------------------------------------------------------
1 | { pkgs, ... }:
2 | {
3 | xdg.configFile."skk/SKK-JISYO.XL".source = "${pkgs.skk-dicts-xl}/share/skk/SkK-JISYO.XL";
4 | }
5 |
--------------------------------------------------------------------------------
/dotfiles/config/nixos/gsettings.nix:
--------------------------------------------------------------------------------
1 | {
2 | config,
3 | pkgs,
4 | lib,
5 | ...
6 | }:
7 | let
8 | nixos-gsettings-overrides = pkgs.runCommand "nixos-gsettings-overrides" { } ''
9 | mkdir -p $out/share/gsettings-schemas/nixos-gsettings-overrides/glib-2.0/schemas/
10 |
11 | ${lib.concatMapStrings (p: ''
12 | if test -d ${p}/share/gsettings-schemas; then
13 | find ${p}/share/gsettings-schemas -name '*.xml' \
14 | -exec cp -rf {} $out/share/gsettings-schemas/nixos-gsettings-overrides/glib-2.0/schemas/ \;
15 | fi
16 | '') config.home.packages}
17 |
18 | ${pkgs.glib.dev}/bin/glib-compile-schemas $out/share/gsettings-schemas/nixos-gsettings-overrides/glib-2.0/schemas/
19 | '';
20 | in
21 | {
22 | xdg.configFile."profile.d/gsettings.sh" = {
23 | text = ''
24 | rm -rf $HOME/.local/share/gsettings-schemas/nixos-gsettings-overrides/glib-2.0/schemas
25 | mkdir -p $HOME/.local/share/gsettings-schemas/nixos-gsettings-overrides/glib-2.0/schemas
26 |
27 | cp -RLf $NIX_GSETTINGS_OVERRIDES_DIR/*.xml \
28 | $HOME/.local/share/gsettings-schemas/nixos-gsettings-overrides/glib-2.0/schemas/
29 |
30 | cp -RLf ${nixos-gsettings-overrides}/share/gsettings-schemas/nixos-gsettings-overrides/glib-2.0/schemas/*.xml \
31 | $HOME/.local/share/gsettings-schemas/nixos-gsettings-overrides/glib-2.0/schemas/
32 |
33 | ${pkgs.glib.dev}/bin/glib-compile-schemas \
34 | $HOME/.local/share/gsettings-schemas/nixos-gsettings-overrides/glib-2.0/schemas/
35 |
36 | export NIX_GSETTINGS_OVERRIDES_DIR=$HOME/.local/share/gsettings-schemas/nixos-gsettings-overrides/glib-2.0/schemas
37 | '';
38 | };
39 | }
40 |
--------------------------------------------------------------------------------
/dotfiles/config/services/polkit.nix:
--------------------------------------------------------------------------------
1 | { pkgs, ... }:
2 | {
3 | systemd.user.services.polkit-mate-authentication-agent-1 = {
4 | Unit = {
5 | Description = "launch authentication-agent-1";
6 | After = [ "graphical-session.target" ];
7 | PartOf = [ "graphical-session.target" ];
8 | };
9 |
10 | Service = {
11 | Type = "simple";
12 | Restart = "on-failure";
13 | ExecStart = ''
14 | ${pkgs.mate.mate-polkit}/libexec/polkit-mate-authentication-agent-1
15 | '';
16 | Environment = [
17 | "WAYLAND_DISPLAY=wayland-0"
18 | "LANG=ja_JP.UTF-8"
19 | ];
20 | };
21 |
22 | Install = {
23 | WantedBy = [ "graphical-session.target" ];
24 | };
25 | };
26 | }
27 |
--------------------------------------------------------------------------------
/dotfiles/config/services/syncthing.nix:
--------------------------------------------------------------------------------
1 | _: { services.syncthing.enable = true; }
2 |
--------------------------------------------------------------------------------
/dotfiles/config/shell/starship.nix:
--------------------------------------------------------------------------------
1 | _: {
2 | programs.bash.enable = true;
3 |
4 | programs.starship = {
5 | enable = true;
6 | enableBashIntegration = true;
7 | enableZshIntegration = true;
8 | settings = {
9 | format = ''
10 | $directory$git_branch$git_status$env_var $cmd_duration
11 | $character'';
12 |
13 | add_newline = false;
14 |
15 | directory = {
16 | format = "[$path]($style)[$read_only]($read_only_style)";
17 | style = "blue";
18 | read_only = "";
19 | read_only_style = "yellow";
20 | truncation_symbol = ".../";
21 | truncate_to_repo = false;
22 | };
23 |
24 | character = {
25 | format = "$symbol ";
26 | success_symbol = "[\\$](purple)";
27 | error_symbol = "[\\$](red)";
28 | vicmd_symbol = "[!](green)";
29 | };
30 |
31 | cmd_duration = {
32 | format = "[$duration]($style)";
33 | style = "yellow";
34 | };
35 |
36 | git_branch = {
37 | format = " [$symbol$branch]($style)";
38 | symbol = "";
39 | style = "white";
40 | };
41 |
42 | git_status = {
43 | format = " [$ahead_behind](cyan)";
44 | };
45 |
46 | env_var = {
47 | IN_NIX_SHELL = {
48 | format = "[ ](bold gray)[](cyan)";
49 | variable = "IN_NIX_SHELL";
50 | };
51 |
52 | IN_PERL_SHELL = {
53 | format = "[ ](bold gray)[](purple)";
54 | variable = "IN_PERL_SHELL";
55 | };
56 | };
57 | };
58 | };
59 | }
60 |
--------------------------------------------------------------------------------
/dotfiles/config/shell/zsh.nix:
--------------------------------------------------------------------------------
1 | { pkgs, lib, ... }:
2 | {
3 | programs.zsh = {
4 | enable = true;
5 | autocd = true;
6 | shellAliases = {
7 | "l" = "ls --color -F -la";
8 | "ls" = "ls --color -F";
9 | "nixos-apply" =
10 | ''sudo nixos-rebuild switch --flake "/etc/nixos#$(hostname)" ; sudo systemctl restart home-manager-$(id -n -u).service'';
11 | "nixos-build" = ''sudo nixos-rebuild build --flake "/etc/nixos/#$(hostname)"'';
12 | "nixos-upgrade" = ''sudo nixos-rebuild boot --flake "/etc/nixos#$(hostname)"'';
13 | "waydroid" = "env XDG_DATA_HOME=/persist/home/nyarla/.local/share waydroid";
14 | };
15 | sessionVariables = {
16 | FAKE_RELEASE = 1;
17 | GOPATH = "$HOME/Applications/Development/go";
18 | NIXPKGS_ALLOW_UNFREE = 1;
19 | EDITOR = "nvim";
20 | };
21 | enableCompletion = true;
22 | syntaxHighlighting.enable = true;
23 | history = {
24 | size = 10000;
25 | path = "$HOME/.zsh_history";
26 | ignorePatterns = [ ];
27 | ignoreDups = true;
28 | share = true;
29 | };
30 | plugins = [
31 | {
32 | name = "enhancd";
33 | file = "init.sh";
34 | src = pkgs.fetchFromGitHub {
35 | owner = "babarot";
36 | repo = "enhancd";
37 | rev = "5afb4eb6ba36c15821de6e39c0a7bb9d6b0ba415";
38 | hash = "sha256-pKQbwiqE0KdmRDbHQcW18WfxyJSsKfymWt/TboY2iic=";
39 | };
40 | }
41 | ];
42 | initExtraFirst = ''
43 | # enable home-manager
44 | export PATH=${
45 | lib.strings.concatStringsSep ":" [
46 | "$HOME/.nix-profile/bin"
47 | "$HOME/.local/bin"
48 | "$HOME/.fly/bin"
49 | "$GOPATH/bin"
50 | "$PATH"
51 | ]
52 | }
53 |
54 | # utility function
55 | function has() {
56 | type "''${1:-}" >/dev/null 2>&1
57 | }
58 | '';
59 | initExtra = ''
60 | setopt auto_pushd
61 | setopt pushd_ignore_dups
62 | setopt pushd_to_home
63 | setopt hist_ignore_all_dups
64 | setopt hist_reduce_blanks
65 | setopt hist_find_no_dups
66 |
67 | function nixos-clean() {
68 | sudo nix-collect-garbage --delete-older-than 7d
69 | sudo /run/current-system/bin/switch-to-configuration boot
70 | }
71 |
72 | if has fzy ; then
73 | function fzy-history() {
74 | BUFFER="$(fc -l -n 1 | sort -u | fzy --query "''${LBUFFER}")"
75 | CURSOR=$#BUFFER
76 | zle -R -c
77 | }
78 |
79 | zle -N fzy-history
80 | bindkey '^R' fzy-history
81 | fi
82 |
83 | unset -f has
84 | '';
85 | };
86 |
87 | home.packages = with pkgs; [
88 | fzy
89 | mmv-go
90 | ripgrep
91 | tmux
92 | wcwidth-cjk
93 |
94 | file
95 | gawk
96 | gnumake
97 | gnused
98 |
99 | inotify-tools
100 |
101 | keychain
102 |
103 | bc
104 | tree
105 | ];
106 | }
107 |
--------------------------------------------------------------------------------
/dotfiles/config/tools/archiver.nix:
--------------------------------------------------------------------------------
1 | { pkgs, ... }:
2 | {
3 | home.packages = with pkgs; [
4 | bzip2
5 | cpio
6 | # dmg2img
7 | gnutar
8 | lzip
9 | nodePackages.asar
10 | p7zip
11 | # pbzx
12 | unrar
13 | unzip
14 | # xar
15 | xz
16 | zip
17 | zstd
18 | ];
19 | }
20 |
--------------------------------------------------------------------------------
/dotfiles/config/tools/development.nix:
--------------------------------------------------------------------------------
1 | { pkgs, ... }:
2 | {
3 | home.packages = with pkgs; [
4 | # container toolchain
5 | act
6 |
7 | # compiler
8 | clang-tools
9 | binutils
10 | gdb
11 | pkg-config
12 | stdenv.cc
13 |
14 | # go
15 | go
16 |
17 | # python3
18 | python3
19 |
20 | # perl
21 | perl-shell
22 |
23 | # nix
24 | nurl
25 |
26 | # editor
27 | editorconfig-core-c
28 | nvim-run
29 | devenv
30 | nodejs
31 |
32 | # vcs
33 | git-lfs
34 |
35 | # misc
36 | openssl
37 | ];
38 | }
39 |
--------------------------------------------------------------------------------
/dotfiles/config/vars/appmenu.nix:
--------------------------------------------------------------------------------
1 | { lib }:
2 | let
3 | inherit (import ./xml.nix { inherit lib; }) labwc;
4 | inherit (labwc)
5 | action
6 | run
7 | sep
8 | list
9 | include
10 | script
11 | wine
12 | id
13 | sys
14 | ;
15 |
16 | exec = label: command: ''
17 | -
18 |
19 | ${command}
20 |
21 |
22 | '';
23 |
24 | stop =
25 | label: commandline:
26 | run label "sh -c 'systemctl --user stop graphical-session.target ; ${commandline}'";
27 |
28 | menu = id: label: contains: ''
29 |
32 | '';
33 |
34 | jack =
35 | cmd:
36 | let
37 | set-samplerate = "pw-metadata -n settings 0 clock.force-rate 96000";
38 | set-buffer = "pw-metadata -n settings 0 clock.force-quantum 512";
39 | in
40 | ''sh -c "${set-samplerate} ; ${set-buffer} ; QT_QPA_PLATFORM=xcb GDK_BACKEND=x11 pw-jack ${cmd}"'';
41 |
42 | mainList = list "Main" (id "main") [
43 | (run "Terminal" "mlterm-wl")
44 | (list "Virtual Machine" (id "vm") [
45 | (run "Virtual Machine Manager" "virt-manager")
46 | (run "Looking Glass" "looking-glass-client")
47 | (run "Remmina" "remmina")
48 | sep
49 | (run "Take Snapshot" "bash /etc/nixos/dotfiles/files/scripts/vm-snapshot-for-daw")
50 | ])
51 | (list "Waydroid" (id "waydroid") [
52 | (script "start" "waydroid-start")
53 | (script "stop" "waydroid-stop")
54 | ])
55 | (run "Vial" "Vial")
56 | ];
57 |
58 | internetList = list "Internet" (id "internet") [
59 | (run "Firefox" "firefox")
60 | (run "Thunderbird" "thunderbird")
61 | sep
62 | (run "Google Chrome" "google-chrome-stable --enable-features=UseOzonePlatform --ozone-platform=wayland --enable-wayland-ime")
63 | sep
64 | (run "Telegram" "telegram-desktop")
65 | sep
66 | (run "Bitwaden" "bitwarden --enable-features=UseOzonePlatform --ozone-platform=wayland --enable-wayland-ime")
67 | ];
68 |
69 | filesList = list "Files" (id "files") [
70 | (run "Files" "Thunar")
71 | (run "eBooks" "calibre")
72 | (wine "Kindle" "Kindle")
73 | sep
74 | (run "Documents" "atril")
75 | (run "Music" "deadbeef")
76 | (run "Video" "vlc")
77 | sep
78 | (run "Text Edit" "pluma")
79 | sep
80 | (run "Picard" "picard")
81 | (run "EasyTag" "easytag")
82 | ];
83 |
84 | officeList = list "Office" (id "office") [
85 | (run "Calc" "mate-calc")
86 | (run "CharMap" "gucharmap")
87 | sep
88 | (run "Scanner" "simple-scan")
89 | ];
90 |
91 | sysutilList = list "Configure" (sys "util") [
92 | (run "Audio" "pwvucontrol")
93 | (run "Bluetooth" "blueman-manager")
94 | (run "DroidCam" "droidcam")
95 | sep
96 | (run "Keychain" "seahorse")
97 | sep
98 | (run "Task Manager" "missioncenter")
99 | ];
100 |
101 | sysDisplayList = list "Display" (sys "display") [
102 | (run "Always ON" "systemctl --user stop swaylock")
103 | (run "Enable AutoLock" "systemctl --user start swaylock")
104 | ];
105 |
106 | sysOperationList = list "System" (sys "operation") [
107 | (action "Reconfigure" "Reconfigure")
108 | sep
109 | (run "Lock" "swaylock -C ~/.config/swaylock/config -f")
110 | sep
111 | (stop "Logout" "loginctl terminate-session self")
112 | (stop "Exit" "labwc --exit")
113 | sep
114 | (stop "Reboot" "systemctl reboot")
115 | (stop "Shutdown" "shutdown -h now")
116 | ];
117 |
118 | contextCreativeRoot = list "Creative" (id "creative") [
119 | (list "Illustration" (id "illustration") [
120 | (run "Gimp" "gimp")
121 | (run "Inkspace" "inkscape")
122 | sep
123 | (run "Krita" "krita")
124 | ])
125 | (list "PixelArt" (id "pixelart") [
126 | (run "Pixelorama" "pixelorama --rendering-driver vulkan --gpu-index 0 --display-driver wayland")
127 | (run "Aseprite" "aseprite")
128 | ])
129 | sep
130 | (list "DAW" (id "daw") [
131 | (run "Bitwig Studio" (jack "bitwig-studio"))
132 | (run "Heilo Workstation" (jack "helio"))
133 | (run "MuseScore" (jack "mscore"))
134 | (run "Zrythm" (jack "bash /etc/nixos/dotfiles/files/scripts/zrythm-launch"))
135 | sep
136 | (run "FamiStudio" "FamiStudio")
137 | sep
138 | (run "Sononym" (jack "sononym"))
139 | ])
140 | (list "Plugins" (id "plugins") [
141 | (run "Carla" (jack "carla"))
142 | (run "Ildaeil" (jack "Ildaeil"))
143 | sep
144 | (run "AudioGridder" (jack "AudioGridderServer"))
145 | ])
146 | (list "VSinger" (id "vsynger") [
147 | (run "VoiceVox" "voicevox")
148 | (run "OpenUtau" "OpenUtau")
149 | ])
150 | ];
151 |
152 | contextMenuRoot = list "Menu" "root-menu" [
153 | (include (id "main"))
154 | (include (id "internet"))
155 | (include (id "files"))
156 | (include (id "office"))
157 | sep
158 | (include (sys "util"))
159 | (include (sys "display"))
160 | (include (sys "operation"))
161 | ];
162 | in
163 | labwc.openbox [
164 | mainList
165 | internetList
166 | filesList
167 | officeList
168 |
169 | sysutilList
170 | sysDisplayList
171 | sysOperationList
172 |
173 | contextMenuRoot
174 | contextCreativeRoot
175 | ]
176 |
--------------------------------------------------------------------------------
/dotfiles/config/vars/theme.nix:
--------------------------------------------------------------------------------
1 | {
2 | cursor = {
3 | name = "capitaine-cursors-white";
4 | size = "24";
5 | };
6 | }
7 |
--------------------------------------------------------------------------------
/dotfiles/config/vars/xml.nix:
--------------------------------------------------------------------------------
1 | { lib }:
2 | rec {
3 | attrs =
4 | attributes:
5 | lib.strings.concatMapAttrsStringSep " " (
6 | key: value: ''${key}="${lib.strings.escapeXML value}"''
7 | ) attributes;
8 |
9 | tag = el: "<${el} />";
10 | tag2 = el: attributes: "<${el} ${attrs attributes}/>";
11 |
12 | el2 = el: contains: "<${el}>${lib.strings.concatStrings contains}${el}>";
13 | el3 = el: attributes: contains: ''
14 | <${el} ${attrs attributes}>
15 | ${lib.strings.concatStringsSep "\n" contains}
16 | ${el}>
17 | '';
18 |
19 | labwc = rec {
20 | #
21 | execute = commandline: el2 "command" [ commandline ];
22 | stop =
23 | commandline: execute "bash -c 'systemctl --user stop graphic-session.target ; ${commandline}'";
24 |
25 | #
26 | action =
27 | label: name:
28 | el3 "item" { inherit label; } [
29 | (tag2 "action" { inherit name; })
30 | ];
31 | run =
32 | label: commandline:
33 | el3 "item" { inherit label; } [
34 | (el3 "action" { name = "Execute"; } [ (execute commandline) ])
35 | ];
36 | script = label: script: run label "bash /etc/nixos/dotfiles/files/scripts/${script}";
37 | wine = label: app: run label "bash /etc/nixos/dotfiles/files/wine/${app}";
38 |
39 | #
40 | sep = tag "separator";
41 |
42 | #