Compare commits
82 Commits
9c920b2cdf
...
master
| Author | SHA1 | Date | |
|---|---|---|---|
|
1da87ebdb8
|
|||
|
24d72349b2
|
|||
|
5630df0be7
|
|||
|
abeca5f52e
|
|||
| 211b4bef15 | |||
| 3417ee5618 | |||
| a4ed789ae9 | |||
| 2f6c5feda7 | |||
| e4087c9da8 | |||
| 291563bba3 | |||
|
993b77d5d0
|
|||
|
8c635dc3ad
|
|||
|
cffae80d70
|
|||
|
491a1ebb40
|
|||
|
25533605d3
|
|||
|
502920af58
|
|||
|
149397f16a
|
|||
|
3435e99cb1
|
|||
|
9faf6cdfe4
|
|||
|
3d116fe3a7
|
|||
|
97761a3af5
|
|||
|
92ee55e82a
|
|||
|
2d324de58a
|
|||
|
42fbf5cee6
|
|||
|
a1d873cc30
|
|||
|
e327d6acaf
|
|||
|
a9149d86c7
|
|||
|
bdddabcd52
|
|||
|
b2860d63c5
|
|||
|
dc15d79266
|
|||
|
b6992f554a
|
|||
|
06c0a24d98
|
|||
|
9aa25642ee
|
|||
|
b6a6f966dc
|
|||
|
754caf00d4
|
|||
|
ce8d76886a
|
|||
|
b3c173f0fa
|
|||
|
d6850b86dc
|
|||
|
9e38cb0712
|
|||
|
75b4d87dfa
|
|||
|
35358cf01c
|
|||
|
5a1880587f
|
|||
|
9c22723970
|
|||
|
cb3578bb0d
|
|||
|
3313dfc89b
|
|||
|
29734f85ba
|
|||
|
afe06213de
|
|||
|
69d6588c30
|
|||
|
aee0fb44d5
|
|||
|
602f599823
|
|||
|
df0a21913e
|
|||
|
a56e9bdaf2
|
|||
|
e574a70020
|
|||
|
c6a3fde1bd
|
|||
|
b3cd3fe209
|
|||
|
ad2aca84f0
|
|||
|
a07bcd9bab
|
|||
|
7eb32cfabc
|
|||
|
f9308dda9e
|
|||
|
99aea69128
|
|||
|
d0cffe4f1c
|
|||
|
b8597104b3
|
|||
|
3bd682e800
|
|||
|
296f250eba
|
|||
|
4ab322f08d
|
|||
|
e112f5f21d
|
|||
|
5bfd7bf857
|
|||
|
7a8e7ca9d7
|
|||
|
91c539ad99
|
|||
|
4c63836d35
|
|||
|
a2eaa6f72d
|
|||
|
c9edeca311
|
|||
|
6482506cc3
|
|||
|
7f250e19ef
|
|||
|
5feb543129
|
|||
|
454ad5885d
|
|||
|
f4c1b313ce
|
|||
|
4509f9edf5
|
|||
|
bc197eb3ca
|
|||
|
d5f027f586
|
|||
|
3d6620a308
|
|||
|
3196ebd920
|
30
.lazy.lua
30
.lazy.lua
@@ -1,9 +1,6 @@
|
|||||||
vim.lsp.config("nixd", {
|
vim.lsp.config("nixd", {
|
||||||
settings = {
|
settings = {
|
||||||
nixd = {
|
nixd = {
|
||||||
nixpkgs = {
|
|
||||||
expr = "import <nixpkgs> { }",
|
|
||||||
},
|
|
||||||
options = {
|
options = {
|
||||||
nixos = {
|
nixos = {
|
||||||
expr = '(builtins.getFlake ("git+file://" + toString ./.)).nixosConfigurations.'
|
expr = '(builtins.getFlake ("git+file://" + toString ./.)).nixosConfigurations.'
|
||||||
@@ -11,28 +8,13 @@ vim.lsp.config("nixd", {
|
|||||||
.. ".options",
|
.. ".options",
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
diagnostic = {
|
||||||
|
suppress = {
|
||||||
|
"sema-primop-overridden",
|
||||||
|
},
|
||||||
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
})
|
})
|
||||||
|
|
||||||
return {
|
return {}
|
||||||
{
|
|
||||||
"folke/lazydev.nvim",
|
|
||||||
ft = "lua",
|
|
||||||
opts = {
|
|
||||||
library = {
|
|
||||||
{ path = "${3rd}/luv/library", words = { "vim%.uv" } },
|
|
||||||
},
|
|
||||||
},
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"hrsh7th/nvim-cmp",
|
|
||||||
opts = function(_, opts)
|
|
||||||
opts.sources = opts.sources or {}
|
|
||||||
table.insert(opts.sources, {
|
|
||||||
name = "lazydev",
|
|
||||||
group_index = 0,
|
|
||||||
})
|
|
||||||
end,
|
|
||||||
},
|
|
||||||
}
|
|
||||||
|
|||||||
51
Justfile
Normal file
51
Justfile
Normal file
@@ -0,0 +1,51 @@
|
|||||||
|
set export
|
||||||
|
|
||||||
|
IMPURE_ROOT := `pwd`
|
||||||
|
|
||||||
|
all: fmt switch
|
||||||
|
|
||||||
|
@switch:
|
||||||
|
echo "Rebuilding NixOS..."
|
||||||
|
nh os switch . --impure
|
||||||
|
|
||||||
|
@switch-offline:
|
||||||
|
echo "Rebuilding NixOS without net..."
|
||||||
|
nh os switch . --impure --no-net
|
||||||
|
|
||||||
|
alias offline := switch-offline
|
||||||
|
|
||||||
|
@boot:
|
||||||
|
echo "Rebuilding NixOS..."
|
||||||
|
nh os boot . --impure
|
||||||
|
|
||||||
|
@test:
|
||||||
|
echo "Rebuilding NixOS..."
|
||||||
|
nh os test . --impure
|
||||||
|
|
||||||
|
@vm:
|
||||||
|
echo "Building NixOS VM..."
|
||||||
|
nh os build-vm . --impure
|
||||||
|
|
||||||
|
@update:
|
||||||
|
echo "Updating flakes..."
|
||||||
|
nix flake update
|
||||||
|
|
||||||
|
@repl:
|
||||||
|
nixos-rebuild repl --flake .
|
||||||
|
|
||||||
|
@cleandry:
|
||||||
|
echo "Listing all generations older than 15 days..."
|
||||||
|
sudo nix profile wipe-history --profile /nix/var/nix/profiles/system --dry-run --older-than 15d
|
||||||
|
nix profile wipe-history --profile ~/.local/state/nix/profiles/profile --dry-run --older-than 15d
|
||||||
|
|
||||||
|
@clean:
|
||||||
|
echo "Removing all generations older than 15 days..."
|
||||||
|
sudo nix profile wipe-history --profile /nix/var/nix/profiles/system --older-than 15d
|
||||||
|
nix profile wipe-history --profile ~/.local/state/nix/profiles/profile --older-than 15d
|
||||||
|
|
||||||
|
@gc:
|
||||||
|
nix store gc --debug
|
||||||
|
|
||||||
|
@fmt:
|
||||||
|
echo "Formatting files..."
|
||||||
|
nix fmt
|
||||||
51
Makefile
51
Makefile
@@ -1,51 +0,0 @@
|
|||||||
all: fmt switch
|
|
||||||
|
|
||||||
switch:
|
|
||||||
@echo "Rebuilding NixOS..."
|
|
||||||
@nh os switch .
|
|
||||||
|
|
||||||
switch-offline:
|
|
||||||
@echo "Rebuilding NixOS without net..."
|
|
||||||
@nh os switch . --no-net
|
|
||||||
|
|
||||||
offline:
|
|
||||||
@echo "Rebuilding NixOS without net..."
|
|
||||||
@nh os switch . --no-net
|
|
||||||
|
|
||||||
boot:
|
|
||||||
@echo "Rebuilding NixOS..."
|
|
||||||
@nh os boot .
|
|
||||||
|
|
||||||
test:
|
|
||||||
@echo "Rebuilding NixOS..."
|
|
||||||
@nh os test .
|
|
||||||
|
|
||||||
vm:
|
|
||||||
@echo "Building NixOS VM..."
|
|
||||||
@nh os build-vm .
|
|
||||||
|
|
||||||
update:
|
|
||||||
@echo "Updating flakes..."
|
|
||||||
@nix flake update
|
|
||||||
|
|
||||||
repl:
|
|
||||||
@nixos-rebuild repl --flake .
|
|
||||||
|
|
||||||
cleandry:
|
|
||||||
@echo "Listing all generations older than 15 days..."
|
|
||||||
@sudo nix profile wipe-history --profile /nix/var/nix/profiles/system --dry-run --older-than 15d
|
|
||||||
@nix profile wipe-history --profile ~/.local/state/nix/profiles/home-manager --dry-run --older-than 15d
|
|
||||||
|
|
||||||
clean:
|
|
||||||
@echo "Removing all generations older than 15 days..."
|
|
||||||
@sudo nix profile wipe-history --profile /nix/var/nix/profiles/system --older-than 15d
|
|
||||||
@nix profile wipe-history --profile ~/.local/state/nix/profiles/home-manager --older-than 15d
|
|
||||||
|
|
||||||
gc:
|
|
||||||
@nix store gc --debug
|
|
||||||
|
|
||||||
fmt:
|
|
||||||
@echo "Formatting nix files..."
|
|
||||||
@nix fmt
|
|
||||||
|
|
||||||
.PHONY: all switch switch-offline boot test vm update repl cleandry clean gc fmt
|
|
||||||
35
README.md
35
README.md
@@ -10,7 +10,7 @@ Currently, this repository contains the nix code that builds:
|
|||||||
2. NixOS home server
|
2. NixOS home server
|
||||||
3. NixOS WSL
|
3. NixOS WSL
|
||||||
|
|
||||||
See [./config/hosts](./config/hosts) for details of each host.
|
See [./hosts](./hosts) for details of each host.
|
||||||
|
|
||||||
## Why NixOS & Flakes?
|
## Why NixOS & Flakes?
|
||||||
|
|
||||||
@@ -22,28 +22,25 @@ forever. If someone else shares their configuration, anyone else can just use it
|
|||||||
As for Flakes, refer to
|
As for Flakes, refer to
|
||||||
[Introduction to Flakes - NixOS & Nix Flakes Book](https://nixos-and-flakes.thiscute.world/nixos-with-flakes/introduction-to-flakes)
|
[Introduction to Flakes - NixOS & Nix Flakes Book](https://nixos-and-flakes.thiscute.world/nixos-with-flakes/introduction-to-flakes)
|
||||||
|
|
||||||
## Components
|
This configuration uses [flake-parts](https://flake.parts/) for better flake organization and modularity,
|
||||||
|
enabling declarative host definitions and cleaner separation of concerns.
|
||||||
| | NixOS(Wayland) |
|
|
||||||
| ----------------------------- | :------------------------------------------- |
|
|
||||||
| **Window Manager** | Niri |
|
|
||||||
| **Desktop Shell** | Noctalia Shell |
|
|
||||||
| **Terminal Emulator** | Kitty |
|
|
||||||
| **Input method framework** | Fcitx5 |
|
|
||||||
| **Shell** | Zsh |
|
|
||||||
| **Netease Cloudmusic Player** | go-musicfox |
|
|
||||||
| **Media Player** | mpv |
|
|
||||||
| **Text Editor** | Neovim |
|
|
||||||
| **Fonts** | Noto Sans CJK & Jetbrains Mono & Nerd Font |
|
|
||||||
| **Filesystem** | Btrfs |
|
|
||||||
|
|
||||||
And more...
|
|
||||||
|
|
||||||
## Folder Structure
|
## Folder Structure
|
||||||
|
|
||||||
- `modules/` - custom NixOS modules
|
- `modules/` - custom NixOS modules
|
||||||
- `config/base.nix` - generic configs
|
- `modules/core/` - core system modules (nix, persistence, time, user, xdg)
|
||||||
- `config/hosts/<name>/` - hosts-specific configs
|
- `modules/cli/` - command-line tools and utilities
|
||||||
|
- `modules/coding/` - development environments and editors
|
||||||
|
- `modules/desktop/` - desktop applications and window managers
|
||||||
|
- `modules/virt/` - virtualization configurations
|
||||||
|
- `profiles/` - system configuration profiles
|
||||||
|
- `profiles/base.nix` - base configuration for all hosts
|
||||||
|
- `profiles/desktop.nix` - desktop environment configuration
|
||||||
|
- `profiles/server.nix` - server-specific configuration
|
||||||
|
- `profiles/wsl.nix` - WSL-specific configuration
|
||||||
|
- `hosts/<name>/` - host-specific configs
|
||||||
|
- `flake/` - flake-parts modules
|
||||||
|
- `flake/hosts.nix` - declarative host definitions
|
||||||
- `lib/` - custom nix library
|
- `lib/` - custom nix library
|
||||||
- `pkgs/` - custom packages
|
- `pkgs/` - custom packages
|
||||||
- `overlays/` - nixpkgs overlays
|
- `overlays/` - nixpkgs overlays
|
||||||
|
|||||||
@@ -1,42 +0,0 @@
|
|||||||
{
|
|
||||||
config,
|
|
||||||
hostname,
|
|
||||||
...
|
|
||||||
}:
|
|
||||||
{
|
|
||||||
# I prefer this to the default issue text
|
|
||||||
# ported from ArchLinux IIRC
|
|
||||||
environment.etc.issue.text = "\\e{lightcyan}\\S\\e{reset} Login (\\l)\n\n";
|
|
||||||
networking.hostName = hostname;
|
|
||||||
# don't change this unless you know what you are doing!
|
|
||||||
# for further information, see wiki.nixos.org
|
|
||||||
system.stateVersion = "24.11";
|
|
||||||
# disable this since we already have machine-id persisted
|
|
||||||
systemd.services."systemd-machine-id-commit".enable = !config.my.persist.enable;
|
|
||||||
|
|
||||||
my = {
|
|
||||||
hm = {
|
|
||||||
# nicely reload system units when changing configs
|
|
||||||
systemd.user.startServices = "sd-switch";
|
|
||||||
home.stateVersion = "24.11";
|
|
||||||
};
|
|
||||||
|
|
||||||
xdg.enable = true;
|
|
||||||
persist = {
|
|
||||||
nixosDirs = [
|
|
||||||
"/root"
|
|
||||||
"/var"
|
|
||||||
"/etc/ssh"
|
|
||||||
];
|
|
||||||
nixosFiles = [
|
|
||||||
"/etc/machine-id"
|
|
||||||
];
|
|
||||||
homeDirs = [
|
|
||||||
{
|
|
||||||
directory = ".ssh";
|
|
||||||
mode = "0700";
|
|
||||||
}
|
|
||||||
];
|
|
||||||
};
|
|
||||||
};
|
|
||||||
}
|
|
||||||
@@ -1,45 +0,0 @@
|
|||||||
{ pkgs, ... }:
|
|
||||||
{
|
|
||||||
services.grafana = {
|
|
||||||
enable = true;
|
|
||||||
settings = {
|
|
||||||
server = {
|
|
||||||
http_addr = "0.0.0.0";
|
|
||||||
http_port = 8090;
|
|
||||||
domain = "grafana.imxyy.top";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
|
||||||
services.prometheus = {
|
|
||||||
enable = true;
|
|
||||||
package = pkgs.stable.prometheus;
|
|
||||||
port = 8091;
|
|
||||||
exporters = {
|
|
||||||
node = {
|
|
||||||
enable = true;
|
|
||||||
port = 8092;
|
|
||||||
enabledCollectors = [
|
|
||||||
"systemd"
|
|
||||||
"zfs"
|
|
||||||
];
|
|
||||||
};
|
|
||||||
};
|
|
||||||
scrapeConfigs = [
|
|
||||||
{
|
|
||||||
job_name = "node";
|
|
||||||
static_configs = [
|
|
||||||
{
|
|
||||||
targets = [ "127.0.0.1:8092" ];
|
|
||||||
}
|
|
||||||
];
|
|
||||||
}
|
|
||||||
];
|
|
||||||
};
|
|
||||||
services.caddy.virtualHosts."grafana.imxyy.top" = {
|
|
||||||
extraConfig = ''
|
|
||||||
reverse_proxy :8090 {
|
|
||||||
header_up X-Real-IP {remote_host}
|
|
||||||
}
|
|
||||||
'';
|
|
||||||
};
|
|
||||||
}
|
|
||||||
@@ -1,546 +0,0 @@
|
|||||||
{
|
|
||||||
config,
|
|
||||||
lib,
|
|
||||||
pkgs,
|
|
||||||
username,
|
|
||||||
secrets,
|
|
||||||
...
|
|
||||||
}:
|
|
||||||
{
|
|
||||||
boot.kernelParams = [
|
|
||||||
"biosdevname=0"
|
|
||||||
"net.ifnames=0"
|
|
||||||
];
|
|
||||||
networking = {
|
|
||||||
useDHCP = lib.mkForce false;
|
|
||||||
dhcpcd = {
|
|
||||||
wait = "background";
|
|
||||||
IPv6rs = true;
|
|
||||||
extraConfig = ''
|
|
||||||
interface mac0
|
|
||||||
noipv4
|
|
||||||
'';
|
|
||||||
};
|
|
||||||
interfaces = {
|
|
||||||
eth0.wakeOnLan.enable = true;
|
|
||||||
eth1.wakeOnLan.enable = true;
|
|
||||||
mac0 = {
|
|
||||||
useDHCP = true;
|
|
||||||
ipv4.addresses = [
|
|
||||||
{
|
|
||||||
address = "192.168.3.2";
|
|
||||||
prefixLength = 24;
|
|
||||||
}
|
|
||||||
];
|
|
||||||
};
|
|
||||||
};
|
|
||||||
macvlans."mac0" = {
|
|
||||||
interface = "eth0";
|
|
||||||
mode = "bridge";
|
|
||||||
};
|
|
||||||
defaultGateway = {
|
|
||||||
address = "192.168.3.1";
|
|
||||||
interface = "mac0";
|
|
||||||
};
|
|
||||||
nameservers = [
|
|
||||||
"192.168.3.2"
|
|
||||||
];
|
|
||||||
|
|
||||||
firewall.enable = false;
|
|
||||||
nftables = {
|
|
||||||
enable = true;
|
|
||||||
flushRuleset = true;
|
|
||||||
ruleset = ''
|
|
||||||
table inet firewall {
|
|
||||||
set LANv4 {
|
|
||||||
type ipv4_addr
|
|
||||||
flags interval
|
|
||||||
|
|
||||||
elements = { 10.0.0.0/8, 100.64.0.0/10, 172.16.0.0/12, 192.168.0.0/16, 169.254.0.0/16 }
|
|
||||||
}
|
|
||||||
set LANv6 {
|
|
||||||
type ipv6_addr
|
|
||||||
flags interval
|
|
||||||
|
|
||||||
elements = { fd00::/8, fe80::/10 }
|
|
||||||
}
|
|
||||||
set tcp_ports {
|
|
||||||
type inet_service
|
|
||||||
flags interval
|
|
||||||
|
|
||||||
elements = {
|
|
||||||
http,
|
|
||||||
https,
|
|
||||||
2222,
|
|
||||||
25565
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
chain prerouting {
|
|
||||||
type filter hook prerouting priority mangle; policy accept;
|
|
||||||
|
|
||||||
ip daddr @LANv4 accept
|
|
||||||
ip6 daddr @LANv6 accept
|
|
||||||
}
|
|
||||||
|
|
||||||
chain output {
|
|
||||||
type filter hook output priority 100; policy accept;
|
|
||||||
|
|
||||||
ip daddr @LANv4 accept
|
|
||||||
ip6 daddr @LANv6 accept
|
|
||||||
}
|
|
||||||
|
|
||||||
chain input {
|
|
||||||
type filter hook input priority 0; policy drop;
|
|
||||||
iif lo accept
|
|
||||||
ct state invalid drop
|
|
||||||
ct state established,related accept
|
|
||||||
|
|
||||||
ip protocol { icmp, igmp } accept
|
|
||||||
|
|
||||||
ip saddr @LANv4 accept
|
|
||||||
ip6 saddr @LANv6 accept
|
|
||||||
|
|
||||||
tcp dport 2222 ct state new limit rate 15/minute counter accept
|
|
||||||
|
|
||||||
tcp dport @tcp_ports counter accept
|
|
||||||
}
|
|
||||||
|
|
||||||
chain forward {
|
|
||||||
type filter hook forward priority 0; policy accept;
|
|
||||||
}
|
|
||||||
|
|
||||||
chain nat {
|
|
||||||
type nat hook postrouting priority 0; policy accept;
|
|
||||||
ip saddr 192.168.3.0/24 masquerade
|
|
||||||
}
|
|
||||||
}
|
|
||||||
'';
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
services.openssh = {
|
|
||||||
enable = true;
|
|
||||||
settings = {
|
|
||||||
# PermitRootLogin = "yes";
|
|
||||||
PermitRootLogin = "prohibit-password";
|
|
||||||
PasswordAuthentication = true;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
users.users.root.openssh.authorizedKeys.keys = [
|
|
||||||
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIOEFLUkyeaK8ZPPZdVNEmtx8zvoxi7xqS2Z6oxRBuUPO imxyy@imxyy-nix"
|
|
||||||
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIBWOy0QmAyxENg/O5m3cus8U3c9jCLioivwcWsh5/a82 imxyy-hisense-pad"
|
|
||||||
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIK8pivvE8PMtsOxmccfNhH/4KehDKhBfUfJbQZxo/SZT imxyy-ace5"
|
|
||||||
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIMb5G/ieEYBOng66YeyttBQLThyM6W//z2POsNyq4Rw/ imxyy@imxyy-nix-x16"
|
|
||||||
];
|
|
||||||
users.users.${username}.openssh.authorizedKeys.keys = [
|
|
||||||
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIOEFLUkyeaK8ZPPZdVNEmtx8zvoxi7xqS2Z6oxRBuUPO imxyy@imxyy-nix"
|
|
||||||
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIBWOy0QmAyxENg/O5m3cus8U3c9jCLioivwcWsh5/a82 imxyy-hisense-pad"
|
|
||||||
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIK8pivvE8PMtsOxmccfNhH/4KehDKhBfUfJbQZxo/SZT imxyy-ace5"
|
|
||||||
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIMb5G/ieEYBOng66YeyttBQLThyM6W//z2POsNyq4Rw/ imxyy@imxyy-nix-x16"
|
|
||||||
];
|
|
||||||
|
|
||||||
sops.secrets.dae-imxyy-nix-server = {
|
|
||||||
sopsFile = secrets.dae-imxyy-nix-server;
|
|
||||||
restartUnits = [ "dae.service" ];
|
|
||||||
format = "binary";
|
|
||||||
};
|
|
||||||
services.dae = {
|
|
||||||
enable = true;
|
|
||||||
configFile = config.sops.secrets.dae-imxyy-nix-server.path;
|
|
||||||
};
|
|
||||||
systemd.services.dae = {
|
|
||||||
after = [ "sops-nix.service" ];
|
|
||||||
serviceConfig.MemoryMax = "1G";
|
|
||||||
};
|
|
||||||
sops.secrets.mihomo = {
|
|
||||||
sopsFile = secrets.mihomo;
|
|
||||||
restartUnits = [ "mihomo.service" ];
|
|
||||||
format = "yaml";
|
|
||||||
key = "";
|
|
||||||
};
|
|
||||||
systemd.services.mihomo.after = [ "sops-nix.service" ];
|
|
||||||
services.mihomo = {
|
|
||||||
enable = true;
|
|
||||||
configFile = config.sops.secrets.mihomo.path;
|
|
||||||
webui = pkgs.metacubexd;
|
|
||||||
};
|
|
||||||
|
|
||||||
sops.secrets.frp-env = {
|
|
||||||
sopsFile = secrets.frp;
|
|
||||||
restartUnits = [ "frp.service" ];
|
|
||||||
format = "dotenv";
|
|
||||||
};
|
|
||||||
systemd.services.frp.serviceConfig.EnvironmentFile = [
|
|
||||||
config.sops.secrets.frp-env.path
|
|
||||||
];
|
|
||||||
services.frp = {
|
|
||||||
enable = true;
|
|
||||||
role = "client";
|
|
||||||
settings = {
|
|
||||||
serverAddr = "{{ .Envs.FRP_SERVER_ADDR }}";
|
|
||||||
serverPort = 7000;
|
|
||||||
auth.token = "{{ .Envs.FRP_AUTH_TOKEN }}";
|
|
||||||
proxies = [
|
|
||||||
{
|
|
||||||
name = "nextcloud-http";
|
|
||||||
type = "http";
|
|
||||||
localIP = "127.0.0.1";
|
|
||||||
localPort = 80;
|
|
||||||
customDomains = [ "nextcloud.imxyy.top" ];
|
|
||||||
}
|
|
||||||
{
|
|
||||||
name = "nextcloud-https";
|
|
||||||
type = "https";
|
|
||||||
localIP = "127.0.0.1";
|
|
||||||
localPort = 443;
|
|
||||||
customDomains = [ "nextcloud.imxyy.top" ];
|
|
||||||
}
|
|
||||||
|
|
||||||
{
|
|
||||||
name = "oidc-http";
|
|
||||||
type = "http";
|
|
||||||
localIP = "127.0.0.1";
|
|
||||||
localPort = 80;
|
|
||||||
customDomains = [ "oidc.imxyy.top" ];
|
|
||||||
}
|
|
||||||
{
|
|
||||||
name = "oidc-https";
|
|
||||||
type = "https";
|
|
||||||
localIP = "127.0.0.1";
|
|
||||||
localPort = 443;
|
|
||||||
customDomains = [ "oidc.imxyy.top" ];
|
|
||||||
}
|
|
||||||
|
|
||||||
{
|
|
||||||
name = "mail-http";
|
|
||||||
type = "http";
|
|
||||||
localIP = "127.0.0.1";
|
|
||||||
localPort = 80;
|
|
||||||
customDomains = [ "mail.imxyy.top" ];
|
|
||||||
}
|
|
||||||
{
|
|
||||||
name = "mail-https";
|
|
||||||
type = "https";
|
|
||||||
localIP = "127.0.0.1";
|
|
||||||
localPort = 443;
|
|
||||||
customDomains = [ "mail.imxyy.top" ];
|
|
||||||
}
|
|
||||||
|
|
||||||
{
|
|
||||||
name = "gitea-ssh";
|
|
||||||
type = "tcp";
|
|
||||||
localIP = "127.0.0.1";
|
|
||||||
localPort = 2222;
|
|
||||||
remotePort = 2222;
|
|
||||||
}
|
|
||||||
{
|
|
||||||
name = "gitea-http";
|
|
||||||
type = "http";
|
|
||||||
localIP = "127.0.0.1";
|
|
||||||
localPort = 80;
|
|
||||||
customDomains = [ "git.imxyy.top" ];
|
|
||||||
}
|
|
||||||
{
|
|
||||||
name = "gitea-https";
|
|
||||||
type = "https";
|
|
||||||
localIP = "127.0.0.1";
|
|
||||||
localPort = 443;
|
|
||||||
customDomains = [ "git.imxyy.top" ];
|
|
||||||
}
|
|
||||||
|
|
||||||
{
|
|
||||||
name = "vault-http";
|
|
||||||
type = "http";
|
|
||||||
localIP = "127.0.0.1";
|
|
||||||
localPort = 80;
|
|
||||||
customDomains = [ "vault.imxyy.top" ];
|
|
||||||
}
|
|
||||||
{
|
|
||||||
name = "vault-https";
|
|
||||||
type = "https";
|
|
||||||
localIP = "127.0.0.1";
|
|
||||||
localPort = 443;
|
|
||||||
customDomains = [ "vault.imxyy.top" ];
|
|
||||||
}
|
|
||||||
|
|
||||||
{
|
|
||||||
name = "home-http";
|
|
||||||
type = "http";
|
|
||||||
localIP = "127.0.0.1";
|
|
||||||
localPort = 80;
|
|
||||||
customDomains = [ "home.imxyy.top" ];
|
|
||||||
}
|
|
||||||
{
|
|
||||||
name = "home-https";
|
|
||||||
type = "https";
|
|
||||||
localIP = "127.0.0.1";
|
|
||||||
localPort = 443;
|
|
||||||
customDomains = [ "home.imxyy.top" ];
|
|
||||||
}
|
|
||||||
|
|
||||||
{
|
|
||||||
name = "coder-http";
|
|
||||||
type = "http";
|
|
||||||
localIP = "127.0.0.1";
|
|
||||||
localPort = 80;
|
|
||||||
customDomains = [ "coder.imxyy.top" ];
|
|
||||||
}
|
|
||||||
{
|
|
||||||
name = "coder-https";
|
|
||||||
type = "https";
|
|
||||||
localIP = "127.0.0.1";
|
|
||||||
localPort = 443;
|
|
||||||
customDomains = [ "coder.imxyy.top" ];
|
|
||||||
}
|
|
||||||
|
|
||||||
{
|
|
||||||
name = "ai-http";
|
|
||||||
type = "http";
|
|
||||||
localIP = "127.0.0.1";
|
|
||||||
localPort = 80;
|
|
||||||
customDomains = [ "ai.imxyy.top" ];
|
|
||||||
}
|
|
||||||
{
|
|
||||||
name = "ai-https";
|
|
||||||
type = "https";
|
|
||||||
localIP = "127.0.0.1";
|
|
||||||
localPort = 443;
|
|
||||||
customDomains = [ "ai.imxyy.top" ];
|
|
||||||
}
|
|
||||||
|
|
||||||
{
|
|
||||||
name = "grafana-http";
|
|
||||||
type = "http";
|
|
||||||
localIP = "127.0.0.1";
|
|
||||||
localPort = 80;
|
|
||||||
customDomains = [ "grafana.imxyy.top" ];
|
|
||||||
}
|
|
||||||
{
|
|
||||||
name = "grafana-https";
|
|
||||||
type = "https";
|
|
||||||
localIP = "127.0.0.1";
|
|
||||||
localPort = 443;
|
|
||||||
customDomains = [ "grafana.imxyy.top" ];
|
|
||||||
}
|
|
||||||
|
|
||||||
{
|
|
||||||
name = "siyuan-http";
|
|
||||||
type = "http";
|
|
||||||
localIP = "127.0.0.1";
|
|
||||||
localPort = 80;
|
|
||||||
customDomains = [ "sy.imxyy.top" ];
|
|
||||||
}
|
|
||||||
{
|
|
||||||
name = "siyuan-https";
|
|
||||||
type = "https";
|
|
||||||
localIP = "127.0.0.1";
|
|
||||||
localPort = 443;
|
|
||||||
customDomains = [ "sy.imxyy.top" ];
|
|
||||||
}
|
|
||||||
|
|
||||||
{
|
|
||||||
name = "matrix-root-http";
|
|
||||||
type = "http";
|
|
||||||
localIP = "127.0.0.1";
|
|
||||||
localPort = 80;
|
|
||||||
customDomains = [ "imxyy.top" ];
|
|
||||||
}
|
|
||||||
{
|
|
||||||
name = "matrix-root-https";
|
|
||||||
type = "https";
|
|
||||||
localIP = "127.0.0.1";
|
|
||||||
localPort = 443;
|
|
||||||
customDomains = [ "imxyy.top" ];
|
|
||||||
}
|
|
||||||
{
|
|
||||||
name = "matrix-http";
|
|
||||||
type = "http";
|
|
||||||
localIP = "127.0.0.1";
|
|
||||||
localPort = 80;
|
|
||||||
customDomains = [ "matrix.imxyy.top" ];
|
|
||||||
}
|
|
||||||
{
|
|
||||||
name = "matrix-https";
|
|
||||||
type = "https";
|
|
||||||
localIP = "127.0.0.1";
|
|
||||||
localPort = 443;
|
|
||||||
customDomains = [ "matrix.imxyy.top" ];
|
|
||||||
}
|
|
||||||
|
|
||||||
{
|
|
||||||
name = "immich-http";
|
|
||||||
type = "http";
|
|
||||||
localIP = "127.0.0.1";
|
|
||||||
localPort = 80;
|
|
||||||
customDomains = [ "immich.imxyy.top" ];
|
|
||||||
}
|
|
||||||
{
|
|
||||||
name = "immich-https";
|
|
||||||
type = "https";
|
|
||||||
localIP = "127.0.0.1";
|
|
||||||
localPort = 443;
|
|
||||||
customDomains = [ "immich.imxyy.top" ];
|
|
||||||
}
|
|
||||||
|
|
||||||
{
|
|
||||||
name = "memo-http";
|
|
||||||
type = "http";
|
|
||||||
localIP = "127.0.0.1";
|
|
||||||
localPort = 80;
|
|
||||||
customDomains = [ "memo.imxyy.top" ];
|
|
||||||
}
|
|
||||||
{
|
|
||||||
name = "memo-https";
|
|
||||||
type = "https";
|
|
||||||
localIP = "127.0.0.1";
|
|
||||||
localPort = 443;
|
|
||||||
customDomains = [ "memo.imxyy.top" ];
|
|
||||||
}
|
|
||||||
|
|
||||||
{
|
|
||||||
name = "efl-matrix-http";
|
|
||||||
type = "http";
|
|
||||||
localIP = "127.0.0.1";
|
|
||||||
localPort = 80;
|
|
||||||
customDomains = [ "mtx.eflx.top" ];
|
|
||||||
}
|
|
||||||
{
|
|
||||||
name = "efl-matrix-https";
|
|
||||||
type = "https";
|
|
||||||
localIP = "127.0.0.1";
|
|
||||||
localPort = 443;
|
|
||||||
customDomains = [ "mtx.eflx.top" ];
|
|
||||||
}
|
|
||||||
{
|
|
||||||
name = "efl-send-http";
|
|
||||||
type = "http";
|
|
||||||
localIP = "127.0.0.1";
|
|
||||||
localPort = 80;
|
|
||||||
customDomains = [ "send.eflx.top" ];
|
|
||||||
}
|
|
||||||
{
|
|
||||||
name = "efl-send-https";
|
|
||||||
type = "https";
|
|
||||||
localIP = "127.0.0.1";
|
|
||||||
localPort = 443;
|
|
||||||
customDomains = [ "send.eflx.top" ];
|
|
||||||
}
|
|
||||||
];
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
sops.secrets.et-imxyy-nix-server = {
|
|
||||||
sopsFile = secrets.et-imxyy-nix-server;
|
|
||||||
restartUnits = [ "easytier.service" ];
|
|
||||||
format = "binary";
|
|
||||||
};
|
|
||||||
environment.systemPackages = [ pkgs.easytier ];
|
|
||||||
systemd.services."easytier" = {
|
|
||||||
enable = true;
|
|
||||||
script = "${pkgs.easytier}/bin/easytier-core -c ${config.sops.secrets.et-imxyy-nix-server.path}";
|
|
||||||
serviceConfig = {
|
|
||||||
Restart = "always";
|
|
||||||
RestartSec = 30;
|
|
||||||
User = "root";
|
|
||||||
};
|
|
||||||
wantedBy = [ "multi-user.target" ];
|
|
||||||
after = [
|
|
||||||
"network.target"
|
|
||||||
"sops-nix.service"
|
|
||||||
];
|
|
||||||
};
|
|
||||||
|
|
||||||
virtualisation.oci-containers.containers.obligator = {
|
|
||||||
image = "anderspitman/obligator:latest";
|
|
||||||
volumes = [
|
|
||||||
"/var/lib/obligator:/data"
|
|
||||||
"/var/lib/obligator:/api"
|
|
||||||
];
|
|
||||||
ports = [ "8081:1616" ];
|
|
||||||
cmd = [
|
|
||||||
"-storage-dir"
|
|
||||||
"/data"
|
|
||||||
"-api-socket-dir"
|
|
||||||
"/api"
|
|
||||||
"-root-uri"
|
|
||||||
"https://oidc.imxyy.top"
|
|
||||||
"-port"
|
|
||||||
"1616"
|
|
||||||
];
|
|
||||||
};
|
|
||||||
services.caddy.virtualHosts."oidc.imxyy.top" = {
|
|
||||||
extraConfig = ''
|
|
||||||
reverse_proxy :8081 {
|
|
||||||
header_up X-Real-IP {remote_host}
|
|
||||||
}
|
|
||||||
'';
|
|
||||||
};
|
|
||||||
|
|
||||||
systemd.services.ddns-go =
|
|
||||||
let
|
|
||||||
version = "6.6.7";
|
|
||||||
ddns-go = pkgs.buildGoModule {
|
|
||||||
inherit version;
|
|
||||||
pname = "ddns-go";
|
|
||||||
src = pkgs.fetchFromGitHub {
|
|
||||||
owner = "jeessy2";
|
|
||||||
repo = "ddns-go";
|
|
||||||
rev = "v${version}";
|
|
||||||
hash = "sha256-Ejoe6e9GFhHxQ9oIBDgDRQW9Xx1XZK+qSAXiRXLdn+c=";
|
|
||||||
};
|
|
||||||
meta.mainProgram = "ddns-go";
|
|
||||||
vendorHash = "sha256-XZii7gV3DmTunYyGYzt5xXhv/VpTPIoYKbW4LnmlAgs=";
|
|
||||||
doCheck = false;
|
|
||||||
};
|
|
||||||
in
|
|
||||||
{
|
|
||||||
description = "Go Dynamic DNS";
|
|
||||||
after = [ "network.target" ];
|
|
||||||
wantedBy = [ "multi-user.target" ];
|
|
||||||
serviceConfig = {
|
|
||||||
ExecStart = "${lib.getExe ddns-go} -l :9876 -f 10 -cacheTimes 180 -c /var/lib/ddns-go/config.yaml";
|
|
||||||
Restart = "always";
|
|
||||||
RestartSec = 120;
|
|
||||||
};
|
|
||||||
path = [
|
|
||||||
pkgs.bash
|
|
||||||
];
|
|
||||||
};
|
|
||||||
|
|
||||||
services.dnsmasq =
|
|
||||||
let
|
|
||||||
subDomains = [
|
|
||||||
"home"
|
|
||||||
"nextcloud"
|
|
||||||
"mail"
|
|
||||||
"git"
|
|
||||||
"vault"
|
|
||||||
"coder"
|
|
||||||
"grafana"
|
|
||||||
"matrix"
|
|
||||||
"note"
|
|
||||||
"oidc"
|
|
||||||
"mc"
|
|
||||||
"music"
|
|
||||||
"ai"
|
|
||||||
"sy"
|
|
||||||
"immich"
|
|
||||||
];
|
|
||||||
in
|
|
||||||
{
|
|
||||||
enable = true;
|
|
||||||
resolveLocalQueries = false;
|
|
||||||
settings = {
|
|
||||||
no-resolv = true;
|
|
||||||
server = [ "192.168.3.1" ];
|
|
||||||
address = map (sub: "/${sub}.imxyy.top/192.168.3.2") subDomains ++ [
|
|
||||||
"/imxyy-nix-server/192.168.3.2"
|
|
||||||
"/imxyy-cloudwin/192.168.3.4"
|
|
||||||
"/printer.home/192.168.3.53"
|
|
||||||
];
|
|
||||||
cache-size = 0;
|
|
||||||
log-queries = "extra";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
}
|
|
||||||
@@ -1,14 +0,0 @@
|
|||||||
{ lib, username, ... }:
|
|
||||||
{
|
|
||||||
my.hm.programs.zsh.shellAliases = {
|
|
||||||
localproxy_on = "export http_proxy=http://192.168.128.1:7890 https_proxy=http://192.168.128.1:7890 all_proxy=socks://192.168.128.1:7890";
|
|
||||||
};
|
|
||||||
my = {
|
|
||||||
sops.sshKeyFile = "/home/${username}/.ssh/id_ed25519";
|
|
||||||
coding.all.enable = true;
|
|
||||||
coding.editor.vscode.enable = lib.mkForce false;
|
|
||||||
cli.misc.enable = true;
|
|
||||||
xdg.enable = true;
|
|
||||||
cli.media.all.enable = true;
|
|
||||||
};
|
|
||||||
}
|
|
||||||
346
flake.lock
generated
346
flake.lock
generated
@@ -11,11 +11,11 @@
|
|||||||
"treefmt-nix": "treefmt-nix"
|
"treefmt-nix": "treefmt-nix"
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1764951243,
|
"lastModified": 1771000778,
|
||||||
"narHash": "sha256-BqPXmlbgStfxmzmZTbPTUj2XW6f2Dgt6Ghi+M0C/rik=",
|
"narHash": "sha256-Co3VdFeXl7abbNGEHEkjS9raX6P3yhigu162Mg6DV14=",
|
||||||
"owner": "linyinfeng",
|
"owner": "linyinfeng",
|
||||||
"repo": "angrr",
|
"repo": "angrr",
|
||||||
"rev": "d6f49eff3233d91c8235134ee1d4923b2c4229c9",
|
"rev": "6bea47aa18c2fb33aa9a363e452c037228893453",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
@@ -45,17 +45,17 @@
|
|||||||
"base16-fish": {
|
"base16-fish": {
|
||||||
"flake": false,
|
"flake": false,
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1754405784,
|
"lastModified": 1765809053,
|
||||||
"narHash": "sha256-l9xHIy+85FN+bEo6yquq2IjD1rSg9fjfjpyGP1W8YXo=",
|
"narHash": "sha256-XCUQLoLfBJ8saWms2HCIj4NEN+xNsWBlU1NrEPcQG4s=",
|
||||||
"owner": "tomyun",
|
"owner": "tomyun",
|
||||||
"repo": "base16-fish",
|
"repo": "base16-fish",
|
||||||
"rev": "23ae20a0093dca0d7b39d76ba2401af0ccf9c561",
|
"rev": "86cbea4dca62e08fb7fd83a70e96472f92574782",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
"owner": "tomyun",
|
"owner": "tomyun",
|
||||||
"repo": "base16-fish",
|
"repo": "base16-fish",
|
||||||
"rev": "23ae20a0093dca0d7b39d76ba2401af0ccf9c561",
|
"rev": "86cbea4dca62e08fb7fd83a70e96472f92574782",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@@ -130,11 +130,11 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1765485905,
|
"lastModified": 1771508520,
|
||||||
"narHash": "sha256-fk6zFzzcwz6su99K7UTxS2497+z/Cdk3FzNsacsmZKA=",
|
"narHash": "sha256-srt94sUlkaGEJHQg7k6gVrBF1QZcHUY/VBESjCgZmKI=",
|
||||||
"owner": "catppuccin",
|
"owner": "catppuccin",
|
||||||
"repo": "nix",
|
"repo": "nix",
|
||||||
"rev": "b49c675acd80931fc8b54290920a90189b461dcf",
|
"rev": "ec35c21e843e4748e60822cd5543983eb61dc87a",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
@@ -150,11 +150,11 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1765222869,
|
"lastModified": 1771363276,
|
||||||
"narHash": "sha256-LUYJ9Qgp0nELw3V2NyfMgAZnE+rx8eHbHgBKCNt5NWY=",
|
"narHash": "sha256-bW0untIUe6QMygBPABCMyrnaZCo8E4pKRQGZgLO9aGI=",
|
||||||
"owner": "Bali10050",
|
"owner": "Bali10050",
|
||||||
"repo": "Darkly",
|
"repo": "Darkly",
|
||||||
"rev": "f000d5a198d87ea2cb7fcb0a9906dcf0837dcdf8",
|
"rev": "b37438a974e39dea0c04a6d64633eab2125b9370",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
@@ -193,11 +193,11 @@
|
|||||||
"rust-analyzer-src": "rust-analyzer-src"
|
"rust-analyzer-src": "rust-analyzer-src"
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1765435813,
|
"lastModified": 1771571526,
|
||||||
"narHash": "sha256-C6tT7K1Lx6VsYw1BY5S3OavtapUvEnDQtmQB5DSgbCc=",
|
"narHash": "sha256-JvL7TMheC4pih3VbxVlPSgqhGxLiaFUppcsJoDnOg9Y=",
|
||||||
"owner": "nix-community",
|
"owner": "nix-community",
|
||||||
"repo": "fenix",
|
"repo": "fenix",
|
||||||
"rev": "6399553b7a300c77e7f07342904eb696a5b6bf9d",
|
"rev": "f677bc93ec72abced2828e2c7720df0f9c25f825",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
@@ -209,11 +209,11 @@
|
|||||||
"firefox-gnome-theme": {
|
"firefox-gnome-theme": {
|
||||||
"flake": false,
|
"flake": false,
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1764724327,
|
"lastModified": 1764873433,
|
||||||
"narHash": "sha256-OkFLrD3pFR952TrjQi1+Vdj604KLcMnkpa7lkW7XskI=",
|
"narHash": "sha256-1XPewtGMi+9wN9Ispoluxunw/RwozuTRVuuQOmxzt+A=",
|
||||||
"owner": "rafaelmardojai",
|
"owner": "rafaelmardojai",
|
||||||
"repo": "firefox-gnome-theme",
|
"repo": "firefox-gnome-theme",
|
||||||
"rev": "66b7c635763d8e6eb86bd766de5a1e1fbfcc1047",
|
"rev": "f7ffd917ac0d253dbd6a3bf3da06888f57c69f92",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
@@ -225,11 +225,11 @@
|
|||||||
"flake-compat": {
|
"flake-compat": {
|
||||||
"flake": false,
|
"flake": false,
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1764712249,
|
"lastModified": 1767039857,
|
||||||
"narHash": "sha256-DhsrZsMebdvpjZC2EzPsqiLGI84tD7kZz7zc6tTCmqg=",
|
"narHash": "sha256-vNpUSpF5Nuw8xvDLj2KCwwksIbjua2LZCqhV1LNRDns=",
|
||||||
"owner": "edolstra",
|
"owner": "edolstra",
|
||||||
"repo": "flake-compat",
|
"repo": "flake-compat",
|
||||||
"rev": "3b279e4317ccfa4865356387935310531357d919",
|
"rev": "5edf11c44bc78a0d334f6334cdaf7d60d732daab",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
@@ -257,11 +257,11 @@
|
|||||||
"flake-compat_3": {
|
"flake-compat_3": {
|
||||||
"flake": false,
|
"flake": false,
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1765121682,
|
"lastModified": 1767039857,
|
||||||
"narHash": "sha256-4VBOP18BFeiPkyhy9o4ssBNQEvfvv1kXkasAYd0+rrA=",
|
"narHash": "sha256-vNpUSpF5Nuw8xvDLj2KCwwksIbjua2LZCqhV1LNRDns=",
|
||||||
"owner": "edolstra",
|
"owner": "edolstra",
|
||||||
"repo": "flake-compat",
|
"repo": "flake-compat",
|
||||||
"rev": "65f23138d8d09a92e30f1e5c87611b23ef451bf3",
|
"rev": "5edf11c44bc78a0d334f6334cdaf7d60d732daab",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
@@ -278,11 +278,11 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1763759067,
|
"lastModified": 1769996383,
|
||||||
"narHash": "sha256-LlLt2Jo/gMNYAwOgdRQBrsRoOz7BPRkzvNaI/fzXi2Q=",
|
"narHash": "sha256-AnYjnFWgS49RlqX7LrC4uA+sCCDBj0Ry/WOJ5XWAsa0=",
|
||||||
"owner": "hercules-ci",
|
"owner": "hercules-ci",
|
||||||
"repo": "flake-parts",
|
"repo": "flake-parts",
|
||||||
"rev": "2cccadc7357c0ba201788ae99c4dfa90728ef5e0",
|
"rev": "57928607ea566b5db3ad13af0e57e921e6b12381",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
@@ -292,6 +292,26 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"flake-parts_2": {
|
"flake-parts_2": {
|
||||||
|
"inputs": {
|
||||||
|
"nixpkgs-lib": [
|
||||||
|
"nixpkgs"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1769996383,
|
||||||
|
"narHash": "sha256-AnYjnFWgS49RlqX7LrC4uA+sCCDBj0Ry/WOJ5XWAsa0=",
|
||||||
|
"owner": "hercules-ci",
|
||||||
|
"repo": "flake-parts",
|
||||||
|
"rev": "57928607ea566b5db3ad13af0e57e921e6b12381",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "hercules-ci",
|
||||||
|
"repo": "flake-parts",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"flake-parts_3": {
|
||||||
"inputs": {
|
"inputs": {
|
||||||
"nixpkgs-lib": [
|
"nixpkgs-lib": [
|
||||||
"go-musicfox",
|
"go-musicfox",
|
||||||
@@ -314,7 +334,7 @@
|
|||||||
"type": "github"
|
"type": "github"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"flake-parts_3": {
|
"flake-parts_4": {
|
||||||
"inputs": {
|
"inputs": {
|
||||||
"nixpkgs-lib": "nixpkgs-lib"
|
"nixpkgs-lib": "nixpkgs-lib"
|
||||||
},
|
},
|
||||||
@@ -331,7 +351,7 @@
|
|||||||
"type": "indirect"
|
"type": "indirect"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"flake-parts_4": {
|
"flake-parts_5": {
|
||||||
"inputs": {
|
"inputs": {
|
||||||
"nixpkgs-lib": [
|
"nixpkgs-lib": [
|
||||||
"stylix",
|
"stylix",
|
||||||
@@ -339,11 +359,11 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1763759067,
|
"lastModified": 1767609335,
|
||||||
"narHash": "sha256-LlLt2Jo/gMNYAwOgdRQBrsRoOz7BPRkzvNaI/fzXi2Q=",
|
"narHash": "sha256-feveD98mQpptwrAEggBQKJTYbvwwglSbOv53uCfH9PY=",
|
||||||
"owner": "hercules-ci",
|
"owner": "hercules-ci",
|
||||||
"repo": "flake-parts",
|
"repo": "flake-parts",
|
||||||
"rev": "2cccadc7357c0ba201788ae99c4dfa90728ef5e0",
|
"rev": "250481aafeb741edfe23d29195671c19b36b6dca",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
@@ -455,11 +475,11 @@
|
|||||||
"flake": false,
|
"flake": false,
|
||||||
"locked": {
|
"locked": {
|
||||||
"host": "gitlab.gnome.org",
|
"host": "gitlab.gnome.org",
|
||||||
"lastModified": 1764524476,
|
"lastModified": 1767737596,
|
||||||
"narHash": "sha256-bTmNn3Q4tMQ0J/P0O5BfTQwqEnCiQIzOGef9/aqAZvk=",
|
"narHash": "sha256-eFujfIUQDgWnSJBablOuG+32hCai192yRdrNHTv0a+s=",
|
||||||
"owner": "GNOME",
|
"owner": "GNOME",
|
||||||
"repo": "gnome-shell",
|
"repo": "gnome-shell",
|
||||||
"rev": "c0e1ad9f0f703fd0519033b8f46c3267aab51a22",
|
"rev": "ef02db02bf0ff342734d525b5767814770d85b49",
|
||||||
"type": "gitlab"
|
"type": "gitlab"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
@@ -473,7 +493,7 @@
|
|||||||
"go-musicfox": {
|
"go-musicfox": {
|
||||||
"inputs": {
|
"inputs": {
|
||||||
"devenv": "devenv",
|
"devenv": "devenv",
|
||||||
"flake-parts": "flake-parts_3",
|
"flake-parts": "flake-parts_4",
|
||||||
"flake-root": "flake-root",
|
"flake-root": "flake-root",
|
||||||
"mission-control": "mission-control",
|
"mission-control": "mission-control",
|
||||||
"mk-shell-bin": "mk-shell-bin",
|
"mk-shell-bin": "mk-shell-bin",
|
||||||
@@ -483,11 +503,11 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1762961141,
|
"lastModified": 1766200280,
|
||||||
"narHash": "sha256-q6B/qUbz2JvCLg3ZQKf24xsIICJz5Lh77Ki+fInfllU=",
|
"narHash": "sha256-FGYAy+d0lJrsjvlnJi79jYBXm8NP1BLiYmYXze/3pRA=",
|
||||||
"owner": "imxyy1soope1",
|
"owner": "imxyy1soope1",
|
||||||
"repo": "go-musicfox",
|
"repo": "go-musicfox",
|
||||||
"rev": "266ae5f6a791e16a7afdc3d08b6294ceff0ec4d8",
|
"rev": "d7ac9fe76572eeef9fb4c8113d52243430497790",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
@@ -524,11 +544,11 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1765480374,
|
"lastModified": 1771531206,
|
||||||
"narHash": "sha256-HlbvQAqLx7WqZFFQZ8nu5UUJAVlXiV/kqKbyueA8srw=",
|
"narHash": "sha256-1R3Wx6KUkMb4x4E5UOhW9p6rqiexzSGGWxZqSHqW5n0=",
|
||||||
"owner": "nix-community",
|
"owner": "nix-community",
|
||||||
"repo": "home-manager",
|
"repo": "home-manager",
|
||||||
"rev": "39cb677ed9e908e90478aa9fe5f3383dfc1a63f3",
|
"rev": "91be7cce763fa4022c7cf025a71b0c366d1b6e77",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
@@ -539,6 +559,27 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"home-manager_2": {
|
"home-manager_2": {
|
||||||
|
"inputs": {
|
||||||
|
"nixpkgs": [
|
||||||
|
"impermanence",
|
||||||
|
"nixpkgs"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1768598210,
|
||||||
|
"narHash": "sha256-kkgA32s/f4jaa4UG+2f8C225Qvclxnqs76mf8zvTVPg=",
|
||||||
|
"owner": "nix-community",
|
||||||
|
"repo": "home-manager",
|
||||||
|
"rev": "c47b2cc64a629f8e075de52e4742de688f930dc6",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "nix-community",
|
||||||
|
"repo": "home-manager",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"home-manager_3": {
|
||||||
"inputs": {
|
"inputs": {
|
||||||
"nixpkgs": [
|
"nixpkgs": [
|
||||||
"zen",
|
"zen",
|
||||||
@@ -546,11 +587,11 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1762964643,
|
"lastModified": 1771102945,
|
||||||
"narHash": "sha256-RYHN8O/Aja59XDji6WSJZPkJpYVUfpSkyH+PEupBJqM=",
|
"narHash": "sha256-e5NfW8NhC3qChR8bHVni/asrig/ZFzd1wzpq+cEE/tg=",
|
||||||
"owner": "nix-community",
|
"owner": "nix-community",
|
||||||
"repo": "home-manager",
|
"repo": "home-manager",
|
||||||
"rev": "827f2a23373a774a8805f84ca5344654c31f354b",
|
"rev": "ff5e5d882c51f9a032479595cbab40fd04f56399",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
@@ -560,12 +601,16 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"impermanence": {
|
"impermanence": {
|
||||||
|
"inputs": {
|
||||||
|
"home-manager": "home-manager_2",
|
||||||
|
"nixpkgs": "nixpkgs_4"
|
||||||
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1737831083,
|
"lastModified": 1769548169,
|
||||||
"narHash": "sha256-LJggUHbpyeDvNagTUrdhe/pRVp4pnS6wVKALS782gRI=",
|
"narHash": "sha256-03+JxvzmfwRu+5JafM0DLbxgHttOQZkUtDWBmeUkN8Y=",
|
||||||
"owner": "nix-community",
|
"owner": "nix-community",
|
||||||
"repo": "impermanence",
|
"repo": "impermanence",
|
||||||
"rev": "4b3e914cdf97a5b536a889e939fb2fd2b043a170",
|
"rev": "7b1d382faf603b6d264f58627330f9faa5cba149",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
@@ -577,11 +622,11 @@
|
|||||||
"infuse": {
|
"infuse": {
|
||||||
"flake": false,
|
"flake": false,
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1738726976,
|
"lastModified": 1768766368,
|
||||||
"narHash": "sha256-N+u3vnK3zyXLUuDj/vr62r9tM7uarhKVCaLHWxjo/YY=",
|
"narHash": "sha256-GW7S5dsFiQChSbGESrkFyNSzDLKGNH3H0EMeY+NLefY=",
|
||||||
"ref": "refs/heads/trunk",
|
"ref": "refs/heads/trunk",
|
||||||
"rev": "c8fb7397039215e1444c835e36a0da7dc3c743f8",
|
"rev": "e837ece1b9de6ebcb7abd261f54a09bad3a2f820",
|
||||||
"revCount": 48,
|
"revCount": 49,
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "https://codeberg.org/amjoseph/infuse.nix"
|
"url": "https://codeberg.org/amjoseph/infuse.nix"
|
||||||
},
|
},
|
||||||
@@ -655,17 +700,17 @@
|
|||||||
"inputs": {
|
"inputs": {
|
||||||
"niri-stable": "niri-stable",
|
"niri-stable": "niri-stable",
|
||||||
"niri-unstable": "niri-unstable",
|
"niri-unstable": "niri-unstable",
|
||||||
"nixpkgs": "nixpkgs_4",
|
"nixpkgs": "nixpkgs_5",
|
||||||
"nixpkgs-stable": "nixpkgs-stable",
|
"nixpkgs-stable": "nixpkgs-stable",
|
||||||
"xwayland-satellite-stable": "xwayland-satellite-stable",
|
"xwayland-satellite-stable": "xwayland-satellite-stable",
|
||||||
"xwayland-satellite-unstable": "xwayland-satellite-unstable"
|
"xwayland-satellite-unstable": "xwayland-satellite-unstable"
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1765528203,
|
"lastModified": 1771514840,
|
||||||
"narHash": "sha256-DTs3VkvRjW/Quu7y9hzNUrddysBXbcqv5Rpo4rtQYQI=",
|
"narHash": "sha256-t3WbZvwoDj/75YDX/nwkZuxanZLZaWr9meSfKswaN6g=",
|
||||||
"owner": "sodiboo",
|
"owner": "sodiboo",
|
||||||
"repo": "niri-flake",
|
"repo": "niri-flake",
|
||||||
"rev": "8f74fd85c7b42f2d06347a9c9eaff6d4904854f3",
|
"rev": "4f69ab280e9bb34e2c0b67fdfa6f0978a170ef56",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
@@ -694,11 +739,11 @@
|
|||||||
"niri-unstable": {
|
"niri-unstable": {
|
||||||
"flake": false,
|
"flake": false,
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1765524373,
|
"lastModified": 1771305475,
|
||||||
"narHash": "sha256-gi38XWhkb+H8iHhlXgv7MgUaQCuhmaTzKmq3yzYOg9g=",
|
"narHash": "sha256-lqweVTwHhYc+9T33cysp38gVwxaibGJHriOPZXWyhCY=",
|
||||||
"owner": "YaLTeR",
|
"owner": "YaLTeR",
|
||||||
"repo": "niri",
|
"repo": "niri",
|
||||||
"rev": "c22d8358c293f5e66748d8ac20600e6b114f9743",
|
"rev": "a2a52911757cb3b497db9407592f9b4c439571ea",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
@@ -713,7 +758,7 @@
|
|||||||
"go-musicfox",
|
"go-musicfox",
|
||||||
"devenv"
|
"devenv"
|
||||||
],
|
],
|
||||||
"flake-parts": "flake-parts_2",
|
"flake-parts": "flake-parts_3",
|
||||||
"libgit2": "libgit2",
|
"libgit2": "libgit2",
|
||||||
"nixpkgs": "nixpkgs_2",
|
"nixpkgs": "nixpkgs_2",
|
||||||
"nixpkgs-23-11": [
|
"nixpkgs-23-11": [
|
||||||
@@ -752,11 +797,11 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1764161084,
|
"lastModified": 1770922915,
|
||||||
"narHash": "sha256-HN84sByg9FhJnojkGGDSrcjcbeioFWoNXfuyYfJ1kBE=",
|
"narHash": "sha256-6J/JoK9iL7sHvKJcGW2KId2agaKv1OGypsa7kN+ZBD4=",
|
||||||
"owner": "nix-darwin",
|
"owner": "nix-darwin",
|
||||||
"repo": "nix-darwin",
|
"repo": "nix-darwin",
|
||||||
"rev": "e95de00a471d07435e0527ff4db092c84998698e",
|
"rev": "6c5a56295d2a24e43bcd8af838def1b9a95746b2",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
@@ -795,11 +840,11 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1765483419,
|
"lastModified": 1771563879,
|
||||||
"narHash": "sha256-w6wznH1lBzlSH3+pWDkE+L6xA0F02drFAzu2E7PD/Jo=",
|
"narHash": "sha256-vA5hocvdGhr+jfBN7A7ogeZqIz2qx01EixXwdVsQcnE=",
|
||||||
"owner": "nix-community",
|
"owner": "nix-community",
|
||||||
"repo": "NixOS-WSL",
|
"repo": "NixOS-WSL",
|
||||||
"rev": "0c040f28b44b18e0d4240e027096078e34dbb029",
|
"rev": "379d20c55f552e91fb9f3f0382e4a97d3f452943",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
@@ -838,11 +883,11 @@
|
|||||||
},
|
},
|
||||||
"nixpkgs-master": {
|
"nixpkgs-master": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1765536405,
|
"lastModified": 1771575107,
|
||||||
"narHash": "sha256-HTHfcqG8WsrJG0aW3edXF5nQJK3VjPWcUTEi/r0LV7o=",
|
"narHash": "sha256-RMiV8PRAuFFtJ0l6EZcADdBW1JP+DUIPpDXnMJp0w/k=",
|
||||||
"owner": "nixos",
|
"owner": "nixos",
|
||||||
"repo": "nixpkgs",
|
"repo": "nixpkgs",
|
||||||
"rev": "27225de9f2030213246e0d8d62957c43d5229368",
|
"rev": "6b0f198fe0363867d9f8cea387a3b9212b468839",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
@@ -854,11 +899,11 @@
|
|||||||
},
|
},
|
||||||
"nixpkgs-stable": {
|
"nixpkgs-stable": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1765311797,
|
"lastModified": 1771419570,
|
||||||
"narHash": "sha256-mSD5Ob7a+T2RNjvPvOA1dkJHGVrNVl8ZOrAwBjKBDQo=",
|
"narHash": "sha256-bxAlQgre3pcQcaRUm/8A0v/X8d2nhfraWSFqVmMcBcU=",
|
||||||
"owner": "NixOS",
|
"owner": "NixOS",
|
||||||
"repo": "nixpkgs",
|
"repo": "nixpkgs",
|
||||||
"rev": "09eb77e94fa25202af8f3e81ddc7353d9970ac1b",
|
"rev": "6d41bc27aaf7b6a3ba6b169db3bd5d6159cfaa47",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
@@ -870,11 +915,11 @@
|
|||||||
},
|
},
|
||||||
"nixpkgs-stable_2": {
|
"nixpkgs-stable_2": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1765534439,
|
"lastModified": 1771574726,
|
||||||
"narHash": "sha256-4gmRI9d5OCXKu6z2XeuLaBnnf9hzLZbXrl9Lgb0KMXQ=",
|
"narHash": "sha256-D1PA3xQv/s4W3lnR9yJFSld8UOLr0a/cBWMQMXS+1Qg=",
|
||||||
"owner": "nixos",
|
"owner": "nixos",
|
||||||
"repo": "nixpkgs",
|
"repo": "nixpkgs",
|
||||||
"rev": "44379cc241b3d3e90cc7c3e01d7719918f5d6fe0",
|
"rev": "c217913993d6c6f6805c3b1a3bda5e639adfde6d",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
@@ -886,11 +931,11 @@
|
|||||||
},
|
},
|
||||||
"nixpkgs-unstable": {
|
"nixpkgs-unstable": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1765186076,
|
"lastModified": 1771369470,
|
||||||
"narHash": "sha256-hM20uyap1a0M9d344I692r+ik4gTMyj60cQWO+hAYP8=",
|
"narHash": "sha256-0NBlEBKkN3lufyvFegY4TYv5mCNHbi5OmBDrzihbBMQ=",
|
||||||
"owner": "nixos",
|
"owner": "nixos",
|
||||||
"repo": "nixpkgs",
|
"repo": "nixpkgs",
|
||||||
"rev": "addf7cf5f383a3101ecfba091b98d0a1263dc9b8",
|
"rev": "0182a361324364ae3f436a63005877674cf45efb",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
@@ -900,22 +945,6 @@
|
|||||||
"type": "github"
|
"type": "github"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"nixpkgs-working": {
|
|
||||||
"locked": {
|
|
||||||
"lastModified": 1762844143,
|
|
||||||
"narHash": "sha256-SlybxLZ1/e4T2lb1czEtWVzDCVSTvk9WLwGhmxFmBxI=",
|
|
||||||
"owner": "nixos",
|
|
||||||
"repo": "nixpkgs",
|
|
||||||
"rev": "9da7f1cf7f8a6e2a7cb3001b048546c92a8258b4",
|
|
||||||
"type": "github"
|
|
||||||
},
|
|
||||||
"original": {
|
|
||||||
"owner": "nixos",
|
|
||||||
"repo": "nixpkgs",
|
|
||||||
"rev": "9da7f1cf7f8a6e2a7cb3001b048546c92a8258b4",
|
|
||||||
"type": "github"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"nixpkgs_2": {
|
"nixpkgs_2": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1717432640,
|
"lastModified": 1717432640,
|
||||||
@@ -950,15 +979,15 @@
|
|||||||
},
|
},
|
||||||
"nixpkgs_4": {
|
"nixpkgs_4": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1765186076,
|
"lastModified": 1768564909,
|
||||||
"narHash": "sha256-hM20uyap1a0M9d344I692r+ik4gTMyj60cQWO+hAYP8=",
|
"narHash": "sha256-Kell/SpJYVkHWMvnhqJz/8DqQg2b6PguxVWOuadbHCc=",
|
||||||
"owner": "NixOS",
|
"owner": "nixos",
|
||||||
"repo": "nixpkgs",
|
"repo": "nixpkgs",
|
||||||
"rev": "addf7cf5f383a3101ecfba091b98d0a1263dc9b8",
|
"rev": "e4bae1bd10c9c57b2cf517953ab70060a828ee6f",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
"owner": "NixOS",
|
"owner": "nixos",
|
||||||
"ref": "nixos-unstable",
|
"ref": "nixos-unstable",
|
||||||
"repo": "nixpkgs",
|
"repo": "nixpkgs",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
@@ -966,16 +995,16 @@
|
|||||||
},
|
},
|
||||||
"nixpkgs_5": {
|
"nixpkgs_5": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1761236834,
|
"lastModified": 1771369470,
|
||||||
"narHash": "sha256-+pthv6hrL5VLW2UqPdISGuLiUZ6SnAXdd2DdUE+fV2Q=",
|
"narHash": "sha256-0NBlEBKkN3lufyvFegY4TYv5mCNHbi5OmBDrzihbBMQ=",
|
||||||
"owner": "nixos",
|
"owner": "NixOS",
|
||||||
"repo": "nixpkgs",
|
"repo": "nixpkgs",
|
||||||
"rev": "d5faa84122bc0a1fd5d378492efce4e289f8eac1",
|
"rev": "0182a361324364ae3f436a63005877674cf45efb",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
"owner": "nixos",
|
"owner": "NixOS",
|
||||||
"ref": "nixpkgs-unstable",
|
"ref": "nixos-unstable",
|
||||||
"repo": "nixpkgs",
|
"repo": "nixpkgs",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
}
|
}
|
||||||
@@ -987,16 +1016,16 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1765298291,
|
"lastModified": 1771375091,
|
||||||
"narHash": "sha256-2vmjE1RD0ky+LkFQ1tUChfDQF9984o4ntFXIks0P7m8=",
|
"narHash": "sha256-Y5P0RYO9NKxa4UZBoGmmxtz3mEwJrBOfvdLJRGjV2Os=",
|
||||||
"owner": "noctalia-dev",
|
"owner": "noctalia-dev",
|
||||||
"repo": "noctalia-shell",
|
"repo": "noctalia-shell",
|
||||||
"rev": "83bdb5b0fcb5b1a4306a6fad3e7c7bba245010c4",
|
"rev": "dbfe3634df0c57faf9772cecae1f2e92bd04de66",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
"owner": "noctalia-dev",
|
"owner": "noctalia-dev",
|
||||||
"ref": "v3.6.2",
|
"ref": "v4.5.0",
|
||||||
"repo": "noctalia-shell",
|
"repo": "noctalia-shell",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
}
|
}
|
||||||
@@ -1013,11 +1042,11 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1764773531,
|
"lastModified": 1767810917,
|
||||||
"narHash": "sha256-mCBl7MD1WZ7yCG6bR9MmpPO2VydpNkWFgnslJRIT1YU=",
|
"narHash": "sha256-ZKqhk772+v/bujjhla9VABwcvz+hB2IaRyeLT6CFnT0=",
|
||||||
"owner": "nix-community",
|
"owner": "nix-community",
|
||||||
"repo": "NUR",
|
"repo": "NUR",
|
||||||
"rev": "1d9616689e98beded059ad0384b9951e967a17fa",
|
"rev": "dead29c804adc928d3a69dfe7f9f12d0eec1f1a4",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
@@ -1049,6 +1078,7 @@
|
|||||||
"catppuccin": "catppuccin",
|
"catppuccin": "catppuccin",
|
||||||
"darkly": "darkly",
|
"darkly": "darkly",
|
||||||
"fenix": "fenix",
|
"fenix": "fenix",
|
||||||
|
"flake-parts": "flake-parts_2",
|
||||||
"go-musicfox": "go-musicfox",
|
"go-musicfox": "go-musicfox",
|
||||||
"haumea": "haumea",
|
"haumea": "haumea",
|
||||||
"home-manager": "home-manager",
|
"home-manager": "home-manager",
|
||||||
@@ -1063,11 +1093,11 @@
|
|||||||
"nixpkgs-master": "nixpkgs-master",
|
"nixpkgs-master": "nixpkgs-master",
|
||||||
"nixpkgs-stable": "nixpkgs-stable_2",
|
"nixpkgs-stable": "nixpkgs-stable_2",
|
||||||
"nixpkgs-unstable": "nixpkgs-unstable",
|
"nixpkgs-unstable": "nixpkgs-unstable",
|
||||||
"nixpkgs-working": "nixpkgs-working",
|
|
||||||
"noctalia": "noctalia",
|
"noctalia": "noctalia",
|
||||||
"plant": "plant",
|
"plant": "plant",
|
||||||
"sops-nix": "sops-nix",
|
"sops-nix": "sops-nix",
|
||||||
"stylix": "stylix",
|
"stylix": "stylix",
|
||||||
|
"system76-scheduler-niri": "system76-scheduler-niri",
|
||||||
"treefmt": "treefmt",
|
"treefmt": "treefmt",
|
||||||
"zen": "zen"
|
"zen": "zen"
|
||||||
}
|
}
|
||||||
@@ -1075,11 +1105,11 @@
|
|||||||
"rust-analyzer-src": {
|
"rust-analyzer-src": {
|
||||||
"flake": false,
|
"flake": false,
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1765400135,
|
"lastModified": 1771505899,
|
||||||
"narHash": "sha256-D3+4hfNwUhG0fdCpDhOASLwEQ1jKuHi4mV72up4kLQM=",
|
"narHash": "sha256-MdRGkz3huAAhsHGnRv0XZV4RG/yO9HOrmhCbOclqcIk=",
|
||||||
"owner": "rust-lang",
|
"owner": "rust-lang",
|
||||||
"repo": "rust-analyzer",
|
"repo": "rust-analyzer",
|
||||||
"rev": "fface27171988b3d605ef45cf986c25533116f7e",
|
"rev": "d8e0e96766968bfebca2360ae4cb8f08d7bbab18",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
@@ -1096,11 +1126,11 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1765231721,
|
"lastModified": 1771575468,
|
||||||
"narHash": "sha256-VAVN68eE8UrXL5fBnXh7sy7EfIW34xhbKwdyftDFzZo=",
|
"narHash": "sha256-4FMXl7wWiGesb7Udh5CBZ6LtisHoDszwPn9dpUiUhS0=",
|
||||||
"owner": "Mic92",
|
"owner": "Mic92",
|
||||||
"repo": "sops-nix",
|
"repo": "sops-nix",
|
||||||
"rev": "83930bf82f59aec1f58d9685a50cbcd7e426a687",
|
"rev": "6f54775bc534535d6a206135bca7455dc5c1a7d9",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
@@ -1117,7 +1147,7 @@
|
|||||||
"base16-helix": "base16-helix",
|
"base16-helix": "base16-helix",
|
||||||
"base16-vim": "base16-vim",
|
"base16-vim": "base16-vim",
|
||||||
"firefox-gnome-theme": "firefox-gnome-theme",
|
"firefox-gnome-theme": "firefox-gnome-theme",
|
||||||
"flake-parts": "flake-parts_4",
|
"flake-parts": "flake-parts_5",
|
||||||
"gnome-shell": "gnome-shell",
|
"gnome-shell": "gnome-shell",
|
||||||
"nixpkgs": [
|
"nixpkgs": [
|
||||||
"nixpkgs"
|
"nixpkgs"
|
||||||
@@ -1131,11 +1161,11 @@
|
|||||||
"tinted-zed": "tinted-zed"
|
"tinted-zed": "tinted-zed"
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1765474444,
|
"lastModified": 1771541829,
|
||||||
"narHash": "sha256-sDG+c73xEnIw1pFNRWffKDnTWiTuyZiEP+Iub0D3mWA=",
|
"narHash": "sha256-jtrIUcFoZuS6R4P18907H0pPyHaGoF5Tomez7j3KIHs=",
|
||||||
"owner": "danth",
|
"owner": "danth",
|
||||||
"repo": "stylix",
|
"repo": "stylix",
|
||||||
"rev": "dd14de4432a94e93e10d0159f1d411487e435e1e",
|
"rev": "cb73f89d3ecef7e790c42f828e2228ff82975de5",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
@@ -1144,6 +1174,26 @@
|
|||||||
"type": "github"
|
"type": "github"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"system76-scheduler-niri": {
|
||||||
|
"inputs": {
|
||||||
|
"nixpkgs": [
|
||||||
|
"nixpkgs"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1769878625,
|
||||||
|
"narHash": "sha256-cOLzS70XjXcxPi4vkTjbvSBOZ5o+CmzkLXX/AgtJMRQ=",
|
||||||
|
"owner": "Kirottu",
|
||||||
|
"repo": "system76-scheduler-niri",
|
||||||
|
"rev": "9fe30d78748bd8f655c3f8ec8b3ce8cd25577182",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "Kirottu",
|
||||||
|
"repo": "system76-scheduler-niri",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
"systems": {
|
"systems": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1681028828,
|
"lastModified": 1681028828,
|
||||||
@@ -1210,11 +1260,11 @@
|
|||||||
"tinted-schemes": {
|
"tinted-schemes": {
|
||||||
"flake": false,
|
"flake": false,
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1763914658,
|
"lastModified": 1767710407,
|
||||||
"narHash": "sha256-Hju0WtMf3iForxtOwXqGp3Ynipo0EYx1AqMKLPp9BJw=",
|
"narHash": "sha256-+W1EB79Jl0/gm4JqmO0Nuc5C7hRdp4vfsV/VdzI+des=",
|
||||||
"owner": "tinted-theming",
|
"owner": "tinted-theming",
|
||||||
"repo": "schemes",
|
"repo": "schemes",
|
||||||
"rev": "0f6be815d258e435c9b137befe5ef4ff24bea32c",
|
"rev": "2800e2b8ac90f678d7e4acebe4fa253f602e05b2",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
@@ -1226,11 +1276,11 @@
|
|||||||
"tinted-tmux": {
|
"tinted-tmux": {
|
||||||
"flake": false,
|
"flake": false,
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1764465359,
|
"lastModified": 1767489635,
|
||||||
"narHash": "sha256-lbSVPqLEk2SqMrnpvWuKYGCaAlfWFMA6MVmcOFJjdjE=",
|
"narHash": "sha256-e6nnFnWXKBCJjCv4QG4bbcouJ6y3yeT70V9MofL32lU=",
|
||||||
"owner": "tinted-theming",
|
"owner": "tinted-theming",
|
||||||
"repo": "tinted-tmux",
|
"repo": "tinted-tmux",
|
||||||
"rev": "edf89a780e239263cc691a987721f786ddc4f6aa",
|
"rev": "3c32729ccae99be44fe8a125d20be06f8d7d8184",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
@@ -1242,11 +1292,11 @@
|
|||||||
"tinted-zed": {
|
"tinted-zed": {
|
||||||
"flake": false,
|
"flake": false,
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1764464512,
|
"lastModified": 1767488740,
|
||||||
"narHash": "sha256-rCD/pAhkMdCx6blsFwxIyvBJbPZZ1oL2sVFrH07lmqg=",
|
"narHash": "sha256-wVOj0qyil8m+ouSsVZcNjl5ZR+1GdOOAooAatQXHbuU=",
|
||||||
"owner": "tinted-theming",
|
"owner": "tinted-theming",
|
||||||
"repo": "base16-zed",
|
"repo": "base16-zed",
|
||||||
"rev": "907dbba5fb8cf69ebfd90b00813418a412d0a29a",
|
"rev": "11abb0b282ad3786a2aae088d3a01c60916f2e40",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
@@ -1257,14 +1307,16 @@
|
|||||||
},
|
},
|
||||||
"treefmt": {
|
"treefmt": {
|
||||||
"inputs": {
|
"inputs": {
|
||||||
"nixpkgs": "nixpkgs_5"
|
"nixpkgs": [
|
||||||
|
"nixpkgs"
|
||||||
|
]
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1762938485,
|
"lastModified": 1770228511,
|
||||||
"narHash": "sha256-AlEObg0syDl+Spi4LsZIBrjw+snSVU4T8MOeuZJUJjM=",
|
"narHash": "sha256-wQ6NJSuFqAEmIg2VMnLdCnUc0b7vslUohqqGGD+Fyxk=",
|
||||||
"owner": "numtide",
|
"owner": "numtide",
|
||||||
"repo": "treefmt-nix",
|
"repo": "treefmt-nix",
|
||||||
"rev": "5b4ee75aeefd1e2d5a1cc43cf6ba65eba75e83e4",
|
"rev": "337a4fe074be1042a35086f15481d763b8ddc0e7",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
@@ -1281,11 +1333,11 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1762938485,
|
"lastModified": 1770228511,
|
||||||
"narHash": "sha256-AlEObg0syDl+Spi4LsZIBrjw+snSVU4T8MOeuZJUJjM=",
|
"narHash": "sha256-wQ6NJSuFqAEmIg2VMnLdCnUc0b7vslUohqqGGD+Fyxk=",
|
||||||
"owner": "numtide",
|
"owner": "numtide",
|
||||||
"repo": "treefmt-nix",
|
"repo": "treefmt-nix",
|
||||||
"rev": "5b4ee75aeefd1e2d5a1cc43cf6ba65eba75e83e4",
|
"rev": "337a4fe074be1042a35086f15481d763b8ddc0e7",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
@@ -1314,11 +1366,11 @@
|
|||||||
"xwayland-satellite-unstable": {
|
"xwayland-satellite-unstable": {
|
||||||
"flake": false,
|
"flake": false,
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1765343581,
|
"lastModified": 1771195969,
|
||||||
"narHash": "sha256-HtTPbV6z6AJPg2d0bHaJKFrnNha+SEbHvbJafKAQ614=",
|
"narHash": "sha256-BUE41HjLIGPjq3U8VXPjf8asH8GaMI7FYdgrIHKFMXA=",
|
||||||
"owner": "Supreeeme",
|
"owner": "Supreeeme",
|
||||||
"repo": "xwayland-satellite",
|
"repo": "xwayland-satellite",
|
||||||
"rev": "f0ad674b7009a6afd80cea59d4fbf975dd68ee95",
|
"rev": "536bd32efc935bf876d6de385ec18a1b715c9358",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
@@ -1329,17 +1381,17 @@
|
|||||||
},
|
},
|
||||||
"zen": {
|
"zen": {
|
||||||
"inputs": {
|
"inputs": {
|
||||||
"home-manager": "home-manager_2",
|
"home-manager": "home-manager_3",
|
||||||
"nixpkgs": [
|
"nixpkgs": [
|
||||||
"nixpkgs"
|
"nixpkgs"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1765514052,
|
"lastModified": 1771562861,
|
||||||
"narHash": "sha256-YdwI+u4exAo0nRZsC9arapchD4Urt5Oeo+wZIrvlMa4=",
|
"narHash": "sha256-6oT3rF68W8HERLXvFfEkpz8xpAVLKZsY1ZuR/BbDTO8=",
|
||||||
"owner": "0xc000022070",
|
"owner": "0xc000022070",
|
||||||
"repo": "zen-browser-flake",
|
"repo": "zen-browser-flake",
|
||||||
"rev": "3f55518bd994195cfdd835e86c41e984ac1241e8",
|
"rev": "7783a3adf3d5a9599a82c75a44c7482e70398ac2",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
|||||||
316
flake.nix
316
flake.nix
@@ -6,252 +6,142 @@
|
|||||||
nixpkgs-unstable.url = "github:nixos/nixpkgs/nixos-unstable";
|
nixpkgs-unstable.url = "github:nixos/nixpkgs/nixos-unstable";
|
||||||
nixpkgs-stable.url = "github:nixos/nixpkgs/release-25.11";
|
nixpkgs-stable.url = "github:nixos/nixpkgs/release-25.11";
|
||||||
nixpkgs-master.url = "github:nixos/nixpkgs/master";
|
nixpkgs-master.url = "github:nixos/nixpkgs/master";
|
||||||
nixpkgs-working.url = "github:nixos/nixpkgs/9da7f1cf7f8a6e2a7cb3001b048546c92a8258b4";
|
|
||||||
# nixpkgs.follows = "nixpkgs-stable";
|
# nixpkgs.follows = "nixpkgs-stable";
|
||||||
nixpkgs.follows = "nixpkgs-unstable";
|
nixpkgs.follows = "nixpkgs-unstable";
|
||||||
# nixpkgs.follows = "nixpkgs-master";
|
# nixpkgs.follows = "nixpkgs-master";
|
||||||
|
|
||||||
# TODO: sops-nix: remove pr patch once merged
|
|
||||||
# https://github.com/Mic92/sops-nix/pull/779
|
|
||||||
sops-nix = {
|
|
||||||
url = "github:Mic92/sops-nix/pull/779/merge";
|
|
||||||
inputs.nixpkgs.follows = "nixpkgs";
|
|
||||||
};
|
|
||||||
|
|
||||||
# Home manager
|
# Home manager
|
||||||
home-manager = {
|
home-manager = {
|
||||||
url = "github:nix-community/home-manager/master";
|
url = "github:nix-community/home-manager/master";
|
||||||
inputs.nixpkgs.follows = "nixpkgs";
|
inputs.nixpkgs.follows = "nixpkgs";
|
||||||
};
|
};
|
||||||
|
|
||||||
# Impermanence
|
|
||||||
impermanence.url = "github:nix-community/impermanence";
|
|
||||||
|
|
||||||
# Niri
|
|
||||||
niri.url = "github:sodiboo/niri-flake";
|
|
||||||
|
|
||||||
darkly = {
|
|
||||||
url = "github:Bali10050/Darkly";
|
|
||||||
inputs.nixpkgs.follows = "nixpkgs";
|
|
||||||
};
|
|
||||||
|
|
||||||
stylix = {
|
|
||||||
url = "github:danth/stylix";
|
|
||||||
inputs.nixpkgs.follows = "nixpkgs";
|
|
||||||
};
|
|
||||||
|
|
||||||
# go-musicfox
|
|
||||||
go-musicfox = {
|
|
||||||
url = "github:imxyy1soope1/go-musicfox";
|
|
||||||
inputs.nixpkgs.follows = "nixpkgs";
|
|
||||||
};
|
|
||||||
|
|
||||||
# NixOS-WSL
|
# NixOS-WSL
|
||||||
nixos-wsl = {
|
nixos-wsl = {
|
||||||
url = "github:nix-community/NixOS-WSL";
|
url = "github:nix-community/NixOS-WSL";
|
||||||
inputs.nixpkgs.follows = "nixpkgs";
|
inputs.nixpkgs.follows = "nixpkgs";
|
||||||
};
|
};
|
||||||
|
|
||||||
fenix = {
|
# Flake organization tools
|
||||||
url = "github:nix-community/fenix";
|
# keep-sorted start block=yes
|
||||||
inputs.nixpkgs.follows = "nixpkgs";
|
flake-parts = {
|
||||||
|
url = "github:hercules-ci/flake-parts";
|
||||||
|
inputs.nixpkgs-lib.follows = "nixpkgs";
|
||||||
};
|
};
|
||||||
|
|
||||||
zen.url = "github:0xc000022070/zen-browser-flake";
|
|
||||||
zen.inputs.nixpkgs.follows = "nixpkgs";
|
|
||||||
|
|
||||||
noctalia = {
|
|
||||||
url = "github:noctalia-dev/noctalia-shell/v3.6.2";
|
|
||||||
inputs.nixpkgs.follows = "nixpkgs";
|
|
||||||
};
|
|
||||||
|
|
||||||
angrr = {
|
|
||||||
url = "github:linyinfeng/angrr";
|
|
||||||
inputs.nixpkgs.follows = "nixpkgs";
|
|
||||||
};
|
|
||||||
|
|
||||||
plant = {
|
|
||||||
url = "git+ssh://git@git.imxyy.top:2222/imxyy1soope1/HF-plant.git?rev=08dc0b3889797eb3618c7475c3c367ec0e5fdf40";
|
|
||||||
flake = false;
|
|
||||||
};
|
|
||||||
|
|
||||||
catppuccin = {
|
|
||||||
url = "github:catppuccin/nix";
|
|
||||||
inputs.nixpkgs.follows = "nixpkgs";
|
|
||||||
};
|
|
||||||
|
|
||||||
infuse = {
|
|
||||||
url = "git+https://codeberg.org/amjoseph/infuse.nix";
|
|
||||||
flake = false;
|
|
||||||
};
|
|
||||||
|
|
||||||
haumea = {
|
haumea = {
|
||||||
url = "github:nix-community/haumea/v0.2.2";
|
url = "github:nix-community/haumea/v0.2.2";
|
||||||
inputs.nixpkgs.follows = "nixpkgs";
|
inputs.nixpkgs.follows = "nixpkgs";
|
||||||
};
|
};
|
||||||
|
infuse = {
|
||||||
|
url = "git+https://codeberg.org/amjoseph/infuse.nix";
|
||||||
|
flake = false;
|
||||||
|
};
|
||||||
|
# keep-sorted end
|
||||||
|
|
||||||
treefmt.url = "github:numtide/treefmt-nix";
|
# Useful modules
|
||||||
|
# keep-sorted start block=yes
|
||||||
|
catppuccin = {
|
||||||
|
url = "github:catppuccin/nix";
|
||||||
|
inputs.nixpkgs.follows = "nixpkgs";
|
||||||
|
};
|
||||||
|
impermanence.url = "github:nix-community/impermanence";
|
||||||
|
# TODO: sops-nix: remove pr patch once merged
|
||||||
|
# https://github.com/Mic92/sops-nix/pull/779
|
||||||
|
sops-nix = {
|
||||||
|
url = "github:Mic92/sops-nix/pull/779/merge";
|
||||||
|
inputs.nixpkgs.follows = "nixpkgs";
|
||||||
|
};
|
||||||
|
stylix = {
|
||||||
|
url = "github:danth/stylix";
|
||||||
|
inputs.nixpkgs.follows = "nixpkgs";
|
||||||
|
};
|
||||||
|
system76-scheduler-niri = {
|
||||||
|
url = "github:Kirottu/system76-scheduler-niri";
|
||||||
|
inputs.nixpkgs.follows = "nixpkgs";
|
||||||
|
};
|
||||||
|
# keep-sorted end
|
||||||
|
|
||||||
|
# Useful software
|
||||||
|
# keep-sorted start block=yes
|
||||||
|
angrr = {
|
||||||
|
url = "github:linyinfeng/angrr";
|
||||||
|
inputs.nixpkgs.follows = "nixpkgs";
|
||||||
|
};
|
||||||
|
darkly = {
|
||||||
|
url = "github:Bali10050/Darkly";
|
||||||
|
inputs.nixpkgs.follows = "nixpkgs";
|
||||||
|
};
|
||||||
|
fenix = {
|
||||||
|
url = "github:nix-community/fenix";
|
||||||
|
inputs.nixpkgs.follows = "nixpkgs";
|
||||||
|
};
|
||||||
|
go-musicfox = {
|
||||||
|
url = "github:imxyy1soope1/go-musicfox";
|
||||||
|
inputs.nixpkgs.follows = "nixpkgs";
|
||||||
|
};
|
||||||
|
niri.url = "github:sodiboo/niri-flake";
|
||||||
|
noctalia = {
|
||||||
|
url = "github:noctalia-dev/noctalia-shell/v4.5.0";
|
||||||
|
inputs.nixpkgs.follows = "nixpkgs";
|
||||||
|
};
|
||||||
|
zen.inputs.nixpkgs.follows = "nixpkgs";
|
||||||
|
zen.url = "github:0xc000022070/zen-browser-flake";
|
||||||
|
# keep-sorted end
|
||||||
|
|
||||||
|
# Misc
|
||||||
|
treefmt = {
|
||||||
|
url = "github:numtide/treefmt-nix";
|
||||||
|
inputs.nixpkgs.follows = "nixpkgs";
|
||||||
|
};
|
||||||
|
plant = {
|
||||||
|
url = "git+ssh://git@git.imxyy.top:2222/imxyy1soope1/HF-plant.git?rev=08dc0b3889797eb3618c7475c3c367ec0e5fdf40";
|
||||||
|
flake = false;
|
||||||
|
};
|
||||||
my-templates.url = "git+https://git.imxyy.top/imxyy1soope1/flake-templates";
|
my-templates.url = "git+https://git.imxyy.top/imxyy1soope1/flake-templates";
|
||||||
};
|
};
|
||||||
|
|
||||||
outputs =
|
outputs =
|
||||||
{
|
{
|
||||||
self,
|
flake-parts,
|
||||||
nixpkgs,
|
|
||||||
...
|
...
|
||||||
}@inputs:
|
}@inputs:
|
||||||
let
|
flake-parts.lib.mkFlake
|
||||||
inherit (self) outputs;
|
{
|
||||||
vars = import ./vars.nix;
|
inherit inputs;
|
||||||
forAllSystems = lib.genAttrs lib.systems.flakeExposed;
|
specialArgs.lib = import ./lib {
|
||||||
forAllHosts =
|
inherit (inputs.nixpkgs) lib;
|
||||||
mkSystem:
|
inherit inputs;
|
||||||
lib.mergeAttrsList (
|
};
|
||||||
builtins.map (hostname: {
|
}
|
||||||
${hostname} = mkSystem hostname;
|
{
|
||||||
}) (builtins.attrNames (builtins.readDir ./config/hosts))
|
systems = [ "x86_64-linux" ];
|
||||||
);
|
|
||||||
|
|
||||||
lib = (import ./lib/stdlib-extended.nix nixpkgs.lib).extend (
|
imports = [
|
||||||
final: prev: {
|
./flake/hosts.nix
|
||||||
inherit (inputs.home-manager.lib) hm;
|
./flake/pkgs.nix
|
||||||
inherit infuse;
|
./treefmt.nix
|
||||||
haumea = inputs.haumea.lib;
|
./overlays
|
||||||
}
|
];
|
||||||
);
|
|
||||||
infuse = (import inputs.infuse { inherit (nixpkgs) lib; }).v1.infuse;
|
|
||||||
in
|
|
||||||
{
|
|
||||||
packages = forAllSystems (
|
|
||||||
system:
|
|
||||||
lib.haumea.load {
|
|
||||||
src = ./pkgs;
|
|
||||||
loader = [
|
|
||||||
{
|
|
||||||
matches = str: builtins.match ".*\\.nix" str != null;
|
|
||||||
loader = _: path: nixpkgs.legacyPackages.${system}.callPackage path { };
|
|
||||||
}
|
|
||||||
];
|
|
||||||
transformer = lib.haumea.transformers.liftDefault;
|
|
||||||
}
|
|
||||||
);
|
|
||||||
|
|
||||||
formatter = forAllSystems (
|
nixosHosts = {
|
||||||
system:
|
imxyy-nix = {
|
||||||
let
|
profiles = [ "desktop" ];
|
||||||
pkgs = nixpkgs.legacyPackages.${system};
|
|
||||||
treefmtEval = inputs.treefmt.lib.evalModule pkgs ./treefmt.nix;
|
|
||||||
in
|
|
||||||
treefmtEval.config.build.wrapper
|
|
||||||
);
|
|
||||||
check = forAllSystems (
|
|
||||||
system:
|
|
||||||
let
|
|
||||||
pkgs = nixpkgs.legacyPackages.${system};
|
|
||||||
treefmtEval = inputs.treefmt.lib.evalModule pkgs ./treefmt.nix;
|
|
||||||
in
|
|
||||||
{
|
|
||||||
formatting = treefmtEval.config.build.check self;
|
|
||||||
}
|
|
||||||
);
|
|
||||||
|
|
||||||
overlays = import ./overlays {
|
|
||||||
inherit inputs lib;
|
|
||||||
};
|
|
||||||
|
|
||||||
nixosConfigurations = forAllHosts (
|
|
||||||
hostname:
|
|
||||||
let
|
|
||||||
overlays = builtins.attrValues self.overlays ++ [
|
|
||||||
inputs.go-musicfox.overlays.default
|
|
||||||
inputs.niri.overlays.niri
|
|
||||||
inputs.fenix.overlays.default
|
|
||||||
(final: prev: {
|
|
||||||
darkly-qt5 = inputs.darkly.packages.${final.stdenv.hostPlatform.system}.darkly-qt5;
|
|
||||||
darkly-qt6 = inputs.darkly.packages.${final.stdenv.hostPlatform.system}.darkly-qt6;
|
|
||||||
|
|
||||||
noctalia-shell = inputs.noctalia.packages.${final.stdenv.hostPlatform.system}.default;
|
|
||||||
})
|
|
||||||
(final: prev: {
|
|
||||||
inherit lib;
|
|
||||||
})
|
|
||||||
];
|
|
||||||
home = {
|
|
||||||
home-manager = {
|
|
||||||
sharedModules = [
|
|
||||||
inputs.sops-nix.homeManagerModules.sops
|
|
||||||
inputs.impermanence.nixosModules.home-manager.impermanence
|
|
||||||
inputs.stylix.homeModules.stylix
|
|
||||||
inputs.noctalia.homeModules.default
|
|
||||||
inputs.zen.homeModules.beta
|
|
||||||
# workaround for annoying stylix
|
|
||||||
(
|
|
||||||
{ lib, ... }:
|
|
||||||
{
|
|
||||||
nixpkgs.overlays = lib.mkForce null;
|
|
||||||
}
|
|
||||||
)
|
|
||||||
];
|
|
||||||
useGlobalPkgs = true;
|
|
||||||
};
|
|
||||||
};
|
};
|
||||||
pkgsConf.nixpkgs = {
|
|
||||||
inherit overlays;
|
imxyy-nix-server = {
|
||||||
config.allowUnfree = true;
|
profiles = [ "server" ];
|
||||||
flake.setNixPath = false;
|
|
||||||
};
|
};
|
||||||
in
|
|
||||||
lib.nixosSystem {
|
imxyy-nix-wsl = {
|
||||||
specialArgs = {
|
profiles = [ "wsl" ];
|
||||||
inherit
|
modules = [
|
||||||
inputs
|
inputs.nixos-wsl.nixosModules.default
|
||||||
outputs
|
|
||||||
hostname
|
|
||||||
;
|
|
||||||
assets =
|
|
||||||
with lib.haumea;
|
|
||||||
load {
|
|
||||||
src = ./assets;
|
|
||||||
loader = [
|
|
||||||
(matchers.always loaders.path)
|
|
||||||
];
|
|
||||||
};
|
|
||||||
secrets =
|
|
||||||
with lib.haumea;
|
|
||||||
load {
|
|
||||||
src = ./secrets;
|
|
||||||
loader = [
|
|
||||||
(matchers.always loaders.path)
|
|
||||||
];
|
|
||||||
};
|
|
||||||
}
|
|
||||||
// vars;
|
|
||||||
modules =
|
|
||||||
(lib.umport {
|
|
||||||
paths = [ ./modules ];
|
|
||||||
exclude = [
|
|
||||||
./modules/virt/types
|
|
||||||
];
|
|
||||||
recursive = true;
|
|
||||||
})
|
|
||||||
++ (lib.umport {
|
|
||||||
paths = [ ./config/hosts/${hostname} ];
|
|
||||||
recursive = true;
|
|
||||||
})
|
|
||||||
++ [
|
|
||||||
(lib.mkAliasOptionModule [ "my" "hm" ] [ "home-manager" "users" vars.username ])
|
|
||||||
./config/base.nix
|
|
||||||
inputs.sops-nix.nixosModules.sops
|
|
||||||
inputs.impermanence.nixosModules.impermanence
|
|
||||||
inputs.home-manager.nixosModules.default
|
|
||||||
inputs.niri.nixosModules.niri
|
|
||||||
inputs.catppuccin.nixosModules.catppuccin
|
|
||||||
inputs.angrr.nixosModules.angrr
|
|
||||||
home
|
|
||||||
pkgsConf
|
|
||||||
];
|
];
|
||||||
}
|
};
|
||||||
);
|
|
||||||
};
|
imxyy-nix-x16 = {
|
||||||
|
profiles = [ "desktop" ];
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
144
flake/hosts.nix
Normal file
144
flake/hosts.nix
Normal file
@@ -0,0 +1,144 @@
|
|||||||
|
{
|
||||||
|
self,
|
||||||
|
lib,
|
||||||
|
inputs,
|
||||||
|
withSystem,
|
||||||
|
config,
|
||||||
|
pkgsParams,
|
||||||
|
...
|
||||||
|
}:
|
||||||
|
let
|
||||||
|
vars = import ../vars.nix;
|
||||||
|
pkgsModule = {
|
||||||
|
nixpkgs = pkgsParams;
|
||||||
|
};
|
||||||
|
hmModule = {
|
||||||
|
home-manager = {
|
||||||
|
sharedModules = [
|
||||||
|
# keep-sorted start
|
||||||
|
inputs.noctalia.homeModules.default
|
||||||
|
inputs.sops-nix.homeManagerModules.sops
|
||||||
|
inputs.stylix.homeModules.stylix
|
||||||
|
inputs.system76-scheduler-niri.homeModules.default
|
||||||
|
inputs.zen.homeModules.beta
|
||||||
|
# keep-sorted end
|
||||||
|
{
|
||||||
|
stylix.overlays.enable = lib.mkForce false;
|
||||||
|
}
|
||||||
|
];
|
||||||
|
useGlobalPkgs = true;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
in
|
||||||
|
{
|
||||||
|
options.nixosHosts = lib.mkOption {
|
||||||
|
type = lib.types.attrsOf (
|
||||||
|
lib.types.submodule (
|
||||||
|
{ name, ... }:
|
||||||
|
{
|
||||||
|
options = {
|
||||||
|
system = lib.mkOption {
|
||||||
|
type = lib.types.str;
|
||||||
|
default = "x86_64-linux";
|
||||||
|
description = "System architecture";
|
||||||
|
};
|
||||||
|
|
||||||
|
profiles = lib.mkOption {
|
||||||
|
type = lib.types.listOf lib.types.str;
|
||||||
|
default = [ ];
|
||||||
|
description = "List of profile names (e.g., 'desktop', 'server', 'wsl')";
|
||||||
|
};
|
||||||
|
|
||||||
|
modules = lib.mkOption {
|
||||||
|
type = lib.types.listOf lib.types.deferredModule;
|
||||||
|
default = (
|
||||||
|
lib.umport {
|
||||||
|
paths = [ ../hosts/${name} ];
|
||||||
|
extraExcludePredicate = path: lib.hasInfix "/_" (toString path);
|
||||||
|
recursive = true;
|
||||||
|
}
|
||||||
|
);
|
||||||
|
description = "Additional NixOS modules specific to this host";
|
||||||
|
};
|
||||||
|
|
||||||
|
extraSpecialArgs = lib.mkOption {
|
||||||
|
type = lib.types.attrs;
|
||||||
|
default = { };
|
||||||
|
description = "Extra special arguments to pass to modules";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
|
)
|
||||||
|
);
|
||||||
|
default = { };
|
||||||
|
description = "Declarative host definitions";
|
||||||
|
};
|
||||||
|
|
||||||
|
config = {
|
||||||
|
# Generate nixosConfigurations from declarative host definitions
|
||||||
|
flake.nixosConfigurations = lib.mapAttrs (
|
||||||
|
hostname: hostConfig:
|
||||||
|
withSystem hostConfig.system (
|
||||||
|
{ ... }:
|
||||||
|
lib.nixosSystem {
|
||||||
|
inherit (hostConfig) system;
|
||||||
|
|
||||||
|
specialArgs = {
|
||||||
|
inherit
|
||||||
|
inputs
|
||||||
|
self
|
||||||
|
hostname
|
||||||
|
;
|
||||||
|
assets =
|
||||||
|
with lib.haumea;
|
||||||
|
load {
|
||||||
|
src = ../assets;
|
||||||
|
loader = [ (matchers.always loaders.path) ];
|
||||||
|
};
|
||||||
|
secrets =
|
||||||
|
with lib.haumea;
|
||||||
|
load {
|
||||||
|
src = ../secrets;
|
||||||
|
loader = [ (matchers.always loaders.path) ];
|
||||||
|
};
|
||||||
|
}
|
||||||
|
// vars
|
||||||
|
// hostConfig.extraSpecialArgs;
|
||||||
|
|
||||||
|
modules =
|
||||||
|
# Automatically import all feature modules
|
||||||
|
(lib.umport {
|
||||||
|
paths = [ ../modules ];
|
||||||
|
extraExcludePredicate = path: lib.hasInfix "/_" (toString path);
|
||||||
|
recursive = true;
|
||||||
|
})
|
||||||
|
++ [
|
||||||
|
# Base profile (always included)
|
||||||
|
../profiles/base.nix
|
||||||
|
]
|
||||||
|
# Add requested profiles
|
||||||
|
++ (map (profile: ../profiles/${profile}.nix) hostConfig.profiles)
|
||||||
|
# Add host-specific modules
|
||||||
|
++ hostConfig.modules
|
||||||
|
++ [
|
||||||
|
(lib.mkAliasOptionModule [ "my" "hm" ] [ "home-manager" "users" vars.username ])
|
||||||
|
|
||||||
|
# Upstream modules
|
||||||
|
# keep-sorted start
|
||||||
|
inputs.angrr.nixosModules.angrr
|
||||||
|
inputs.catppuccin.nixosModules.catppuccin
|
||||||
|
inputs.home-manager.nixosModules.default
|
||||||
|
inputs.impermanence.nixosModules.impermanence
|
||||||
|
inputs.niri.nixosModules.niri
|
||||||
|
inputs.sops-nix.nixosModules.sops
|
||||||
|
# keep-sorted end
|
||||||
|
|
||||||
|
# pkgs and home-manager configuration
|
||||||
|
pkgsModule
|
||||||
|
hmModule
|
||||||
|
];
|
||||||
|
}
|
||||||
|
)
|
||||||
|
) config.nixosHosts;
|
||||||
|
};
|
||||||
|
}
|
||||||
55
flake/pkgs.nix
Normal file
55
flake/pkgs.nix
Normal file
@@ -0,0 +1,55 @@
|
|||||||
|
{
|
||||||
|
inputs,
|
||||||
|
lib,
|
||||||
|
config,
|
||||||
|
pkgsParams,
|
||||||
|
...
|
||||||
|
}:
|
||||||
|
{
|
||||||
|
_module.args = {
|
||||||
|
pkgsParams = {
|
||||||
|
overlays = builtins.attrValues config.flake.overlays ++ [
|
||||||
|
inputs.go-musicfox.overlays.default
|
||||||
|
inputs.niri.overlays.niri
|
||||||
|
inputs.fenix.overlays.default
|
||||||
|
inputs.angrr.overlays.default
|
||||||
|
(final: prev: {
|
||||||
|
darkly-qt5 = inputs.darkly.packages.${final.stdenv.hostPlatform.system}.darkly-qt5;
|
||||||
|
darkly-qt6 = inputs.darkly.packages.${final.stdenv.hostPlatform.system}.darkly-qt6;
|
||||||
|
|
||||||
|
noctalia-shell = inputs.noctalia.packages.${final.stdenv.hostPlatform.system}.default;
|
||||||
|
})
|
||||||
|
];
|
||||||
|
config.allowUnfree = true;
|
||||||
|
flake.setNixPath = false;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
perSystem =
|
||||||
|
{
|
||||||
|
system,
|
||||||
|
pkgs,
|
||||||
|
...
|
||||||
|
}:
|
||||||
|
{
|
||||||
|
_module.args.pkgs = import inputs.nixpkgs (pkgsParams // { inherit system; });
|
||||||
|
legacyPackages = pkgs;
|
||||||
|
packages = lib.genAttrs (builtins.attrNames (config.flake.overlays.additions pkgs pkgs)) (
|
||||||
|
pkg: pkgs.${pkg}
|
||||||
|
);
|
||||||
|
};
|
||||||
|
|
||||||
|
flake.overlays.additions =
|
||||||
|
final: prev:
|
||||||
|
with lib.haumea;
|
||||||
|
load {
|
||||||
|
src = ../pkgs;
|
||||||
|
loader = [
|
||||||
|
{
|
||||||
|
matches = str: builtins.match ".*\\.nix" str != null;
|
||||||
|
loader = _: path: final.callPackage path { };
|
||||||
|
}
|
||||||
|
];
|
||||||
|
transformer = transformers.liftDefault;
|
||||||
|
};
|
||||||
|
}
|
||||||
@@ -1,7 +1,9 @@
|
|||||||
{
|
{
|
||||||
|
lib,
|
||||||
config,
|
config,
|
||||||
pkgs,
|
pkgs,
|
||||||
secrets,
|
secrets,
|
||||||
|
hosts,
|
||||||
...
|
...
|
||||||
}:
|
}:
|
||||||
{
|
{
|
||||||
@@ -30,13 +32,7 @@
|
|||||||
isSystemUser = true;
|
isSystemUser = true;
|
||||||
description = "nix remote build user";
|
description = "nix remote build user";
|
||||||
group = "nixremote";
|
group = "nixremote";
|
||||||
openssh.authorizedKeys.keys = [
|
openssh.authorizedKeys.keys = (lib.mapAttrsToList (host: key: "${key} ${host}") hosts) ++ [
|
||||||
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIOEFLUkyeaK8ZPPZdVNEmtx8zvoxi7xqS2Z6oxRBuUPO imxyy@imxyy-nix"
|
|
||||||
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIBWOy0QmAyxENg/O5m3cus8U3c9jCLioivwcWsh5/a82 imxyy-hisense-pad"
|
|
||||||
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIK8pivvE8PMtsOxmccfNhH/4KehDKhBfUfJbQZxo/SZT imxyy-ace5"
|
|
||||||
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIKALTBn/QSGcSPgMg0ViSazFcaA0+nEF05EJpjbsI6dE imxyy_soope_@imxyy-cloudwin"
|
|
||||||
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIMb5G/ieEYBOng66YeyttBQLThyM6W//z2POsNyq4Rw/ imxyy@imxyy-nix-x16"
|
|
||||||
|
|
||||||
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIIENauvvhVMLsUwH9cPYsvnOg7VCL3a4yEiKm8I524TE efl@efl-nix"
|
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIIENauvvhVMLsUwH9cPYsvnOg7VCL3a4yEiKm8I524TE efl@efl-nix"
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
@@ -7,12 +7,13 @@
|
|||||||
};
|
};
|
||||||
virtualisation.oci-containers.containers = {
|
virtualisation.oci-containers.containers = {
|
||||||
tuwunel = {
|
tuwunel = {
|
||||||
image = "jevolk/tuwunel:latest";
|
image = "ghcr.io/matrix-construct/tuwunel:latest";
|
||||||
volumes = [
|
volumes = [
|
||||||
"tuwunel_db:/var/lib/tuwunel"
|
"tuwunel_db:/var/lib/tuwunel"
|
||||||
];
|
];
|
||||||
ports = [ "6167:6167" ];
|
ports = [ "6167:6167" ];
|
||||||
networks = [ "podman" ];
|
networks = [ "podman" ];
|
||||||
|
extraOptions = [ "--pids-limit=-1" ];
|
||||||
environment = {
|
environment = {
|
||||||
TUWUNEL_SERVER_NAME = "mtx.eflx.top";
|
TUWUNEL_SERVER_NAME = "mtx.eflx.top";
|
||||||
TUWUNEL_PORT = "6167";
|
TUWUNEL_PORT = "6167";
|
||||||
@@ -18,15 +18,12 @@ in
|
|||||||
];
|
];
|
||||||
boot.initrd.kernelModules = [ "amdgpu" ];
|
boot.initrd.kernelModules = [ "amdgpu" ];
|
||||||
boot.kernelModules = [ "kvm-amd" ];
|
boot.kernelModules = [ "kvm-amd" ];
|
||||||
boot.kernelPackages = lib.mkForce pkgs.linuxPackages_xanmod_latest;
|
boot.kernelPackages = lib.mkForce pkgs.linuxPackages_xanmod_stable;
|
||||||
services.scx = {
|
|
||||||
enable = true;
|
|
||||||
scheduler = "scx_rusty";
|
|
||||||
};
|
|
||||||
boot.extraModulePackages = [ ];
|
boot.extraModulePackages = [ ];
|
||||||
boot.tmp.useTmpfs = true;
|
boot.tmp.useTmpfs = true;
|
||||||
boot.supportedFilesystems = [ "zfs" ];
|
boot.supportedFilesystems = [ "zfs" ];
|
||||||
boot.zfs = {
|
boot.zfs = {
|
||||||
|
package = pkgs.zfs_unstable;
|
||||||
extraPools = [ "data" ];
|
extraPools = [ "data" ];
|
||||||
forceImportRoot = false;
|
forceImportRoot = false;
|
||||||
};
|
};
|
||||||
511
hosts/imxyy-nix-server/net.nix
Normal file
511
hosts/imxyy-nix-server/net.nix
Normal file
@@ -0,0 +1,511 @@
|
|||||||
|
{
|
||||||
|
config,
|
||||||
|
lib,
|
||||||
|
pkgs,
|
||||||
|
username,
|
||||||
|
hosts,
|
||||||
|
secrets,
|
||||||
|
...
|
||||||
|
}:
|
||||||
|
{
|
||||||
|
boot.kernelParams = [
|
||||||
|
"biosdevname=0"
|
||||||
|
"net.ifnames=0"
|
||||||
|
];
|
||||||
|
networking = {
|
||||||
|
useDHCP = lib.mkForce false;
|
||||||
|
dhcpcd = {
|
||||||
|
wait = "background";
|
||||||
|
IPv6rs = true;
|
||||||
|
extraConfig = ''
|
||||||
|
interface mac0
|
||||||
|
noipv4
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
interfaces = {
|
||||||
|
eth0.wakeOnLan.enable = true;
|
||||||
|
eth1.wakeOnLan.enable = true;
|
||||||
|
mac0 = {
|
||||||
|
useDHCP = true;
|
||||||
|
ipv4.addresses = [
|
||||||
|
{
|
||||||
|
address = "192.168.3.2";
|
||||||
|
prefixLength = 24;
|
||||||
|
}
|
||||||
|
];
|
||||||
|
};
|
||||||
|
};
|
||||||
|
macvlans."mac0" = {
|
||||||
|
interface = "eth0";
|
||||||
|
mode = "bridge";
|
||||||
|
};
|
||||||
|
defaultGateway = {
|
||||||
|
address = "192.168.3.1";
|
||||||
|
interface = "mac0";
|
||||||
|
};
|
||||||
|
nameservers = [
|
||||||
|
"192.168.3.2"
|
||||||
|
];
|
||||||
|
|
||||||
|
firewall.enable = false;
|
||||||
|
nftables = {
|
||||||
|
enable = true;
|
||||||
|
flushRuleset = true;
|
||||||
|
ruleset = ''
|
||||||
|
table inet firewall {
|
||||||
|
set LANv4 {
|
||||||
|
type ipv4_addr
|
||||||
|
flags interval
|
||||||
|
|
||||||
|
elements = { 10.0.0.0/8, 100.64.0.0/10, 172.16.0.0/12, 192.168.0.0/16, 169.254.0.0/16 }
|
||||||
|
}
|
||||||
|
set LANv6 {
|
||||||
|
type ipv6_addr
|
||||||
|
flags interval
|
||||||
|
|
||||||
|
elements = { fd00::/8, fe80::/10 }
|
||||||
|
}
|
||||||
|
set tcp_ports {
|
||||||
|
type inet_service
|
||||||
|
flags interval
|
||||||
|
|
||||||
|
elements = {
|
||||||
|
http,
|
||||||
|
https,
|
||||||
|
2222,
|
||||||
|
25565
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
chain prerouting {
|
||||||
|
type filter hook prerouting priority mangle; policy accept;
|
||||||
|
|
||||||
|
ip daddr @LANv4 accept
|
||||||
|
ip6 daddr @LANv6 accept
|
||||||
|
}
|
||||||
|
|
||||||
|
chain output {
|
||||||
|
type filter hook output priority 100; policy accept;
|
||||||
|
|
||||||
|
ip daddr @LANv4 accept
|
||||||
|
ip6 daddr @LANv6 accept
|
||||||
|
}
|
||||||
|
|
||||||
|
chain input {
|
||||||
|
type filter hook input priority 0; policy drop;
|
||||||
|
iif lo accept
|
||||||
|
ct state invalid drop
|
||||||
|
ct state established,related accept
|
||||||
|
|
||||||
|
ip protocol { icmp, igmp } accept
|
||||||
|
|
||||||
|
ip saddr @LANv4 accept
|
||||||
|
ip6 saddr @LANv6 accept
|
||||||
|
|
||||||
|
tcp dport 2222 ct state new limit rate 15/minute counter accept
|
||||||
|
|
||||||
|
tcp dport @tcp_ports counter accept
|
||||||
|
}
|
||||||
|
|
||||||
|
chain forward {
|
||||||
|
type filter hook forward priority 0; policy accept;
|
||||||
|
}
|
||||||
|
|
||||||
|
chain nat {
|
||||||
|
type nat hook postrouting priority 0; policy accept;
|
||||||
|
ip saddr 192.168.3.0/24 masquerade
|
||||||
|
}
|
||||||
|
}
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
services.openssh = {
|
||||||
|
enable = true;
|
||||||
|
settings = {
|
||||||
|
# PermitRootLogin = "yes";
|
||||||
|
PermitRootLogin = "prohibit-password";
|
||||||
|
PasswordAuthentication = true;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
users.users.root.openssh.authorizedKeys.keys = lib.mapAttrsToList (
|
||||||
|
host: key: "${key} ${host}"
|
||||||
|
) hosts;
|
||||||
|
users.users.${username}.openssh.authorizedKeys.keys = lib.mapAttrsToList (
|
||||||
|
host: key: "${key} ${host}"
|
||||||
|
) hosts;
|
||||||
|
|
||||||
|
sops.secrets.dae-imxyy-nix-server = {
|
||||||
|
sopsFile = secrets.dae-imxyy-nix-server;
|
||||||
|
restartUnits = [ "dae.service" ];
|
||||||
|
format = "binary";
|
||||||
|
};
|
||||||
|
services.dae = {
|
||||||
|
enable = true;
|
||||||
|
configFile = config.sops.secrets.dae-imxyy-nix-server.path;
|
||||||
|
};
|
||||||
|
systemd.services.dae = {
|
||||||
|
after = [ "sops-nix.service" ];
|
||||||
|
serviceConfig.MemoryMax = "1G";
|
||||||
|
};
|
||||||
|
sops.secrets.mihomo = {
|
||||||
|
sopsFile = secrets.mihomo;
|
||||||
|
restartUnits = [ "mihomo.service" ];
|
||||||
|
format = "yaml";
|
||||||
|
key = "";
|
||||||
|
};
|
||||||
|
systemd.services.mihomo.after = [ "sops-nix.service" ];
|
||||||
|
services.mihomo = {
|
||||||
|
enable = true;
|
||||||
|
configFile = config.sops.secrets.mihomo.path;
|
||||||
|
webui = pkgs.metacubexd;
|
||||||
|
};
|
||||||
|
|
||||||
|
sops.secrets.frp-env = {
|
||||||
|
sopsFile = secrets.frp;
|
||||||
|
restartUnits = [ "frp.service" ];
|
||||||
|
format = "dotenv";
|
||||||
|
};
|
||||||
|
systemd.services.frp.serviceConfig.EnvironmentFile = [
|
||||||
|
config.sops.secrets.frp-env.path
|
||||||
|
];
|
||||||
|
services.frp = {
|
||||||
|
instances."" = {
|
||||||
|
enable = true;
|
||||||
|
role = "client";
|
||||||
|
settings = {
|
||||||
|
serverAddr = "{{ .Envs.FRP_SERVER_ADDR }}";
|
||||||
|
serverPort = 7000;
|
||||||
|
auth.token = "{{ .Envs.FRP_AUTH_TOKEN }}";
|
||||||
|
proxies = [
|
||||||
|
{
|
||||||
|
name = "nextcloud-http";
|
||||||
|
type = "http";
|
||||||
|
localIP = "127.0.0.1";
|
||||||
|
localPort = 80;
|
||||||
|
customDomains = [ "nextcloud.imxyy.top" ];
|
||||||
|
}
|
||||||
|
{
|
||||||
|
name = "nextcloud-https";
|
||||||
|
type = "https";
|
||||||
|
localIP = "127.0.0.1";
|
||||||
|
localPort = 443;
|
||||||
|
customDomains = [ "nextcloud.imxyy.top" ];
|
||||||
|
}
|
||||||
|
|
||||||
|
{
|
||||||
|
name = "oidc-http";
|
||||||
|
type = "http";
|
||||||
|
localIP = "127.0.0.1";
|
||||||
|
localPort = 80;
|
||||||
|
customDomains = [ "oidc.imxyy.top" ];
|
||||||
|
}
|
||||||
|
{
|
||||||
|
name = "oidc-https";
|
||||||
|
type = "https";
|
||||||
|
localIP = "127.0.0.1";
|
||||||
|
localPort = 443;
|
||||||
|
customDomains = [ "oidc.imxyy.top" ];
|
||||||
|
}
|
||||||
|
|
||||||
|
{
|
||||||
|
name = "mail-http";
|
||||||
|
type = "http";
|
||||||
|
localIP = "127.0.0.1";
|
||||||
|
localPort = 80;
|
||||||
|
customDomains = [ "mail.imxyy.top" ];
|
||||||
|
}
|
||||||
|
{
|
||||||
|
name = "mail-https";
|
||||||
|
type = "https";
|
||||||
|
localIP = "127.0.0.1";
|
||||||
|
localPort = 443;
|
||||||
|
customDomains = [ "mail.imxyy.top" ];
|
||||||
|
}
|
||||||
|
|
||||||
|
{
|
||||||
|
name = "gitea-ssh";
|
||||||
|
type = "tcp";
|
||||||
|
localIP = "127.0.0.1";
|
||||||
|
localPort = 2222;
|
||||||
|
remotePort = 2222;
|
||||||
|
}
|
||||||
|
{
|
||||||
|
name = "gitea-http";
|
||||||
|
type = "http";
|
||||||
|
localIP = "127.0.0.1";
|
||||||
|
localPort = 80;
|
||||||
|
customDomains = [ "git.imxyy.top" ];
|
||||||
|
}
|
||||||
|
{
|
||||||
|
name = "gitea-https";
|
||||||
|
type = "https";
|
||||||
|
localIP = "127.0.0.1";
|
||||||
|
localPort = 443;
|
||||||
|
customDomains = [ "git.imxyy.top" ];
|
||||||
|
}
|
||||||
|
|
||||||
|
{
|
||||||
|
name = "vault-http";
|
||||||
|
type = "http";
|
||||||
|
localIP = "127.0.0.1";
|
||||||
|
localPort = 80;
|
||||||
|
customDomains = [ "vault.imxyy.top" ];
|
||||||
|
}
|
||||||
|
{
|
||||||
|
name = "vault-https";
|
||||||
|
type = "https";
|
||||||
|
localIP = "127.0.0.1";
|
||||||
|
localPort = 443;
|
||||||
|
customDomains = [ "vault.imxyy.top" ];
|
||||||
|
}
|
||||||
|
|
||||||
|
{
|
||||||
|
name = "home-http";
|
||||||
|
type = "http";
|
||||||
|
localIP = "127.0.0.1";
|
||||||
|
localPort = 80;
|
||||||
|
customDomains = [ "home.imxyy.top" ];
|
||||||
|
}
|
||||||
|
{
|
||||||
|
name = "home-https";
|
||||||
|
type = "https";
|
||||||
|
localIP = "127.0.0.1";
|
||||||
|
localPort = 443;
|
||||||
|
customDomains = [ "home.imxyy.top" ];
|
||||||
|
}
|
||||||
|
|
||||||
|
{
|
||||||
|
name = "coder-http";
|
||||||
|
type = "http";
|
||||||
|
localIP = "127.0.0.1";
|
||||||
|
localPort = 80;
|
||||||
|
customDomains = [ "coder.imxyy.top" ];
|
||||||
|
}
|
||||||
|
{
|
||||||
|
name = "coder-https";
|
||||||
|
type = "https";
|
||||||
|
localIP = "127.0.0.1";
|
||||||
|
localPort = 443;
|
||||||
|
customDomains = [ "coder.imxyy.top" ];
|
||||||
|
}
|
||||||
|
|
||||||
|
{
|
||||||
|
name = "siyuan-http";
|
||||||
|
type = "http";
|
||||||
|
localIP = "127.0.0.1";
|
||||||
|
localPort = 80;
|
||||||
|
customDomains = [ "sy.imxyy.top" ];
|
||||||
|
}
|
||||||
|
{
|
||||||
|
name = "siyuan-https";
|
||||||
|
type = "https";
|
||||||
|
localIP = "127.0.0.1";
|
||||||
|
localPort = 443;
|
||||||
|
customDomains = [ "sy.imxyy.top" ];
|
||||||
|
}
|
||||||
|
|
||||||
|
{
|
||||||
|
name = "matrix-root-http";
|
||||||
|
type = "http";
|
||||||
|
localIP = "127.0.0.1";
|
||||||
|
localPort = 80;
|
||||||
|
customDomains = [ "imxyy.top" ];
|
||||||
|
}
|
||||||
|
{
|
||||||
|
name = "matrix-root-https";
|
||||||
|
type = "https";
|
||||||
|
localIP = "127.0.0.1";
|
||||||
|
localPort = 443;
|
||||||
|
customDomains = [ "imxyy.top" ];
|
||||||
|
}
|
||||||
|
{
|
||||||
|
name = "matrix-http";
|
||||||
|
type = "http";
|
||||||
|
localIP = "127.0.0.1";
|
||||||
|
localPort = 80;
|
||||||
|
customDomains = [ "matrix.imxyy.top" ];
|
||||||
|
}
|
||||||
|
{
|
||||||
|
name = "matrix-https";
|
||||||
|
type = "https";
|
||||||
|
localIP = "127.0.0.1";
|
||||||
|
localPort = 443;
|
||||||
|
customDomains = [ "matrix.imxyy.top" ];
|
||||||
|
}
|
||||||
|
|
||||||
|
{
|
||||||
|
name = "immich-http";
|
||||||
|
type = "http";
|
||||||
|
localIP = "127.0.0.1";
|
||||||
|
localPort = 80;
|
||||||
|
customDomains = [ "immich.imxyy.top" ];
|
||||||
|
}
|
||||||
|
{
|
||||||
|
name = "immich-https";
|
||||||
|
type = "https";
|
||||||
|
localIP = "127.0.0.1";
|
||||||
|
localPort = 443;
|
||||||
|
customDomains = [ "immich.imxyy.top" ];
|
||||||
|
}
|
||||||
|
|
||||||
|
{
|
||||||
|
name = "memo-http";
|
||||||
|
type = "http";
|
||||||
|
localIP = "127.0.0.1";
|
||||||
|
localPort = 80;
|
||||||
|
customDomains = [ "memo.imxyy.top" ];
|
||||||
|
}
|
||||||
|
{
|
||||||
|
name = "memo-https";
|
||||||
|
type = "https";
|
||||||
|
localIP = "127.0.0.1";
|
||||||
|
localPort = 443;
|
||||||
|
customDomains = [ "memo.imxyy.top" ];
|
||||||
|
}
|
||||||
|
|
||||||
|
{
|
||||||
|
name = "efl-matrix-http";
|
||||||
|
type = "http";
|
||||||
|
localIP = "127.0.0.1";
|
||||||
|
localPort = 80;
|
||||||
|
customDomains = [ "mtx.eflx.top" ];
|
||||||
|
}
|
||||||
|
{
|
||||||
|
name = "efl-matrix-https";
|
||||||
|
type = "https";
|
||||||
|
localIP = "127.0.0.1";
|
||||||
|
localPort = 443;
|
||||||
|
customDomains = [ "mtx.eflx.top" ];
|
||||||
|
}
|
||||||
|
{
|
||||||
|
name = "efl-send-http";
|
||||||
|
type = "http";
|
||||||
|
localIP = "127.0.0.1";
|
||||||
|
localPort = 80;
|
||||||
|
customDomains = [ "send.eflx.top" ];
|
||||||
|
}
|
||||||
|
{
|
||||||
|
name = "efl-send-https";
|
||||||
|
type = "https";
|
||||||
|
localIP = "127.0.0.1";
|
||||||
|
localPort = 443;
|
||||||
|
customDomains = [ "send.eflx.top" ];
|
||||||
|
}
|
||||||
|
];
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
sops.secrets.et-imxyy-nix-server = {
|
||||||
|
sopsFile = secrets.et-imxyy-nix-server;
|
||||||
|
restartUnits = [ "easytier.service" ];
|
||||||
|
format = "binary";
|
||||||
|
};
|
||||||
|
environment.systemPackages = [ pkgs.easytier ];
|
||||||
|
systemd.services."easytier" = {
|
||||||
|
enable = true;
|
||||||
|
script = "${pkgs.easytier}/bin/easytier-core -c ${config.sops.secrets.et-imxyy-nix-server.path}";
|
||||||
|
serviceConfig = {
|
||||||
|
Restart = "always";
|
||||||
|
RestartSec = 30;
|
||||||
|
User = "root";
|
||||||
|
};
|
||||||
|
wantedBy = [ "multi-user.target" ];
|
||||||
|
after = [
|
||||||
|
"network.target"
|
||||||
|
"sops-nix.service"
|
||||||
|
];
|
||||||
|
};
|
||||||
|
|
||||||
|
virtualisation.oci-containers.containers.obligator = {
|
||||||
|
image = "anderspitman/obligator:latest";
|
||||||
|
volumes = [
|
||||||
|
"/var/lib/obligator:/data"
|
||||||
|
"/var/lib/obligator:/api"
|
||||||
|
];
|
||||||
|
ports = [ "8081:1616" ];
|
||||||
|
cmd = [
|
||||||
|
"-storage-dir"
|
||||||
|
"/data"
|
||||||
|
"-api-socket-dir"
|
||||||
|
"/api"
|
||||||
|
"-root-uri"
|
||||||
|
"https://oidc.imxyy.top"
|
||||||
|
"-port"
|
||||||
|
"1616"
|
||||||
|
];
|
||||||
|
};
|
||||||
|
services.caddy.virtualHosts."oidc.imxyy.top" = {
|
||||||
|
extraConfig = ''
|
||||||
|
reverse_proxy :8081 {
|
||||||
|
header_up X-Real-IP {remote_host}
|
||||||
|
}
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
|
||||||
|
systemd.services.ddns-go =
|
||||||
|
let
|
||||||
|
version = "6.6.7";
|
||||||
|
ddns-go = pkgs.buildGoModule {
|
||||||
|
inherit version;
|
||||||
|
pname = "ddns-go";
|
||||||
|
src = pkgs.fetchFromGitHub {
|
||||||
|
owner = "jeessy2";
|
||||||
|
repo = "ddns-go";
|
||||||
|
rev = "v${version}";
|
||||||
|
hash = "sha256-Ejoe6e9GFhHxQ9oIBDgDRQW9Xx1XZK+qSAXiRXLdn+c=";
|
||||||
|
};
|
||||||
|
meta.mainProgram = "ddns-go";
|
||||||
|
vendorHash = "sha256-XZii7gV3DmTunYyGYzt5xXhv/VpTPIoYKbW4LnmlAgs=";
|
||||||
|
doCheck = false;
|
||||||
|
};
|
||||||
|
in
|
||||||
|
{
|
||||||
|
description = "Go Dynamic DNS";
|
||||||
|
after = [ "network.target" ];
|
||||||
|
wantedBy = [ "multi-user.target" ];
|
||||||
|
serviceConfig = {
|
||||||
|
ExecStart = "${lib.getExe ddns-go} -l :9876 -f 10 -cacheTimes 180 -c /var/lib/ddns-go/config.yaml";
|
||||||
|
Restart = "always";
|
||||||
|
RestartSec = 120;
|
||||||
|
};
|
||||||
|
path = [
|
||||||
|
pkgs.bash
|
||||||
|
];
|
||||||
|
};
|
||||||
|
|
||||||
|
services.dnsmasq =
|
||||||
|
let
|
||||||
|
subDomains = [
|
||||||
|
"home"
|
||||||
|
"nextcloud"
|
||||||
|
"mail"
|
||||||
|
"git"
|
||||||
|
"vault"
|
||||||
|
"coder"
|
||||||
|
"matrix"
|
||||||
|
"note"
|
||||||
|
"oidc"
|
||||||
|
"mc"
|
||||||
|
"music"
|
||||||
|
"sy"
|
||||||
|
"immich"
|
||||||
|
];
|
||||||
|
in
|
||||||
|
{
|
||||||
|
enable = true;
|
||||||
|
resolveLocalQueries = false;
|
||||||
|
settings = {
|
||||||
|
no-resolv = true;
|
||||||
|
server = [ "192.168.3.1" ];
|
||||||
|
address = map (sub: "/${sub}.imxyy.top/192.168.3.2") subDomains ++ [
|
||||||
|
"/imxyy-nix-server/192.168.3.2"
|
||||||
|
"/imxyy-cloudwin/192.168.3.4"
|
||||||
|
"/printer.home/192.168.3.53"
|
||||||
|
];
|
||||||
|
cache-size = 0;
|
||||||
|
log-queries = "extra";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
@@ -6,24 +6,6 @@
|
|||||||
...
|
...
|
||||||
}:
|
}:
|
||||||
{
|
{
|
||||||
boot.loader = {
|
|
||||||
efi.canTouchEfiVariables = true;
|
|
||||||
systemd-boot = {
|
|
||||||
enable = true;
|
|
||||||
configurationLimit = 10;
|
|
||||||
};
|
|
||||||
grub.enable = false;
|
|
||||||
timeout = 0;
|
|
||||||
};
|
|
||||||
|
|
||||||
systemd.services.nix-daemon = {
|
|
||||||
environment.TMPDIR = "/var/cache/nix";
|
|
||||||
serviceConfig.CacheDirectory = "nix";
|
|
||||||
};
|
|
||||||
environment.variables.NIX_REMOTE = "daemon";
|
|
||||||
|
|
||||||
my.audio.enable = false;
|
|
||||||
|
|
||||||
sops.secrets.imxyy-nix-server-hashed-password = {
|
sops.secrets.imxyy-nix-server-hashed-password = {
|
||||||
sopsFile = secrets.imxyy-nix-server-hashed-password;
|
sopsFile = secrets.imxyy-nix-server-hashed-password;
|
||||||
format = "binary";
|
format = "binary";
|
||||||
@@ -55,7 +55,7 @@ in
|
|||||||
}
|
}
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
services.frp.settings.proxies = [
|
services.frp.instances."".settings.proxies = [
|
||||||
{
|
{
|
||||||
name = "plant-http";
|
name = "plant-http";
|
||||||
type = "http";
|
type = "http";
|
||||||
@@ -36,7 +36,7 @@ in
|
|||||||
reverse_proxy :8100
|
reverse_proxy :8100
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
services.frp.settings.proxies = [
|
services.frp.instances."".settings.proxies = [
|
||||||
{
|
{
|
||||||
name = "rsshub-http";
|
name = "rsshub-http";
|
||||||
type = "http";
|
type = "http";
|
||||||
@@ -9,7 +9,7 @@
|
|||||||
};
|
};
|
||||||
share = {
|
share = {
|
||||||
path = "/mnt/nas/share";
|
path = "/mnt/nas/share";
|
||||||
browseable = "yes";
|
browsable = "yes";
|
||||||
"read only" = "no";
|
"read only" = "no";
|
||||||
"guest ok" = "no";
|
"guest ok" = "no";
|
||||||
"create mask" = "0664";
|
"create mask" = "0664";
|
||||||
@@ -30,7 +30,7 @@
|
|||||||
reverse_proxy :8101
|
reverse_proxy :8101
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
services.frp.settings.proxies = [
|
services.frp.instances."".settings.proxies = [
|
||||||
{
|
{
|
||||||
name = "sshwifty-http";
|
name = "sshwifty-http";
|
||||||
type = "http";
|
type = "http";
|
||||||
19
hosts/imxyy-nix-wsl/home.nix
Normal file
19
hosts/imxyy-nix-wsl/home.nix
Normal file
@@ -0,0 +1,19 @@
|
|||||||
|
{ lib, username, ... }:
|
||||||
|
{
|
||||||
|
my.hm = {
|
||||||
|
programs.zsh.shellAliases = {
|
||||||
|
localproxy_on = "export http_proxy=http://192.168.128.1:7890 https_proxy=http://192.168.128.1:7890 all_proxy=socks://192.168.128.1:7890";
|
||||||
|
};
|
||||||
|
programs.fish.shellAliases = {
|
||||||
|
localproxy_on = "export http_proxy=http://192.168.128.1:7890 https_proxy=http://192.168.128.1:7890 all_proxy=socks://192.168.128.1:7890";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
my = {
|
||||||
|
sops.sshKeyFile = "/home/${username}/.ssh/id_ed25519";
|
||||||
|
coding.all.enable = true;
|
||||||
|
coding.editor.vscode.enable = lib.mkForce false;
|
||||||
|
cli.misc.enable = true;
|
||||||
|
xdg.enable = true;
|
||||||
|
cli.media.all.enable = true;
|
||||||
|
};
|
||||||
|
}
|
||||||
@@ -29,10 +29,6 @@ in
|
|||||||
"fs.file-max" = 9223372036854775807;
|
"fs.file-max" = 9223372036854775807;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
services.scx = {
|
|
||||||
enable = true;
|
|
||||||
scheduler = "scx_rusty";
|
|
||||||
};
|
|
||||||
|
|
||||||
fileSystems."/" = {
|
fileSystems."/" = {
|
||||||
device = btrfs;
|
device = btrfs;
|
||||||
@@ -17,10 +17,10 @@
|
|||||||
anki
|
anki
|
||||||
|
|
||||||
ayugram-desktop
|
ayugram-desktop
|
||||||
signal-desktop
|
signal-desktop-wayland
|
||||||
element-desktop
|
element-desktop
|
||||||
fractal
|
fractal
|
||||||
qq
|
qq-wayland
|
||||||
wechat
|
wechat
|
||||||
|
|
||||||
gnome-clocks
|
gnome-clocks
|
||||||
@@ -30,6 +30,9 @@
|
|||||||
PATH = "/home/${username}/bin:$PATH";
|
PATH = "/home/${username}/bin:$PATH";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
programs.fish.interactiveShellInit = ''
|
||||||
|
set -gp PATH $HOME/bin
|
||||||
|
'';
|
||||||
|
|
||||||
programs.niri.settings = {
|
programs.niri.settings = {
|
||||||
environment.STEAM_FORCE_DESKTOPUI_SCALING = "1.25";
|
environment.STEAM_FORCE_DESKTOPUI_SCALING = "1.25";
|
||||||
@@ -61,8 +64,8 @@
|
|||||||
defaultApplications =
|
defaultApplications =
|
||||||
let
|
let
|
||||||
browser = [ config.my.desktop.browser.default.desktop ];
|
browser = [ config.my.desktop.browser.default.desktop ];
|
||||||
editor = [ "codium.desktop" ];
|
editor = [ "nvim.desktop" ];
|
||||||
imageviewer = [ "org.gnome.Shotwell-Viewer.desktop" ];
|
imageviewer = [ "org.gnome.Loupe.desktop" ];
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
"inode/directory" = [ "org.gnome.Nautilus.desktop" ];
|
"inode/directory" = [ "org.gnome.Nautilus.desktop" ];
|
||||||
@@ -71,7 +74,6 @@
|
|||||||
|
|
||||||
"text/*" = editor;
|
"text/*" = editor;
|
||||||
"application/json" = editor;
|
"application/json" = editor;
|
||||||
"text/html" = editor;
|
|
||||||
"text/xml" = editor;
|
"text/xml" = editor;
|
||||||
"application/xml" = editor;
|
"application/xml" = editor;
|
||||||
"application/xhtml+xml" = editor;
|
"application/xhtml+xml" = editor;
|
||||||
@@ -84,6 +86,7 @@
|
|||||||
"application/x-extension-xht" = editor;
|
"application/x-extension-xht" = editor;
|
||||||
"application/x-extension-xhtml" = editor;
|
"application/x-extension-xhtml" = editor;
|
||||||
|
|
||||||
|
"text/html" = browser;
|
||||||
"x-scheme-handler/about" = browser;
|
"x-scheme-handler/about" = browser;
|
||||||
"x-scheme-handler/ftp" = browser;
|
"x-scheme-handler/ftp" = browser;
|
||||||
"x-scheme-handler/http" = browser;
|
"x-scheme-handler/http" = browser;
|
||||||
@@ -9,6 +9,7 @@
|
|||||||
"biosdevname=0"
|
"biosdevname=0"
|
||||||
"net.ifnames=0"
|
"net.ifnames=0"
|
||||||
];
|
];
|
||||||
|
my.persist.nixosDirs = [ "/etc/NetworkManager/system-connections" ];
|
||||||
networking = {
|
networking = {
|
||||||
networkmanager.enable = true;
|
networkmanager.enable = true;
|
||||||
firewall.enable = false;
|
firewall.enable = false;
|
||||||
@@ -6,40 +6,10 @@
|
|||||||
...
|
...
|
||||||
}:
|
}:
|
||||||
{
|
{
|
||||||
security.pam.loginLimits = [
|
|
||||||
{
|
|
||||||
domain = "*";
|
|
||||||
type = "soft";
|
|
||||||
item = "nofile";
|
|
||||||
value = "524288";
|
|
||||||
}
|
|
||||||
];
|
|
||||||
|
|
||||||
boot.kernelParams = [
|
boot.kernelParams = [
|
||||||
"usbcore.autosuspend=-1" # Avoid usb autosuspend (for usb bluetooth adapter)
|
"usbcore.autosuspend=-1" # Avoid usb autosuspend (for usb bluetooth adapter)
|
||||||
];
|
];
|
||||||
|
|
||||||
boot.loader = {
|
|
||||||
efi.canTouchEfiVariables = true;
|
|
||||||
systemd-boot = {
|
|
||||||
enable = true;
|
|
||||||
configurationLimit = 10;
|
|
||||||
};
|
|
||||||
grub.enable = false;
|
|
||||||
timeout = 0;
|
|
||||||
};
|
|
||||||
|
|
||||||
hardware.graphics.enable = true;
|
|
||||||
hardware.graphics.enable32Bit = true;
|
|
||||||
|
|
||||||
systemd.services.nix-daemon = {
|
|
||||||
environment.TMPDIR = "/var/cache/nix";
|
|
||||||
serviceConfig.CacheDirectory = "nix";
|
|
||||||
};
|
|
||||||
environment.variables.NIX_REMOTE = "daemon";
|
|
||||||
|
|
||||||
services.printing.enable = true;
|
|
||||||
|
|
||||||
services.upower.enable = true;
|
services.upower.enable = true;
|
||||||
services.power-profiles-daemon.enable = true;
|
services.power-profiles-daemon.enable = true;
|
||||||
|
|
||||||
@@ -59,8 +29,6 @@
|
|||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
services.gvfs.enable = true;
|
|
||||||
|
|
||||||
services.openssh = {
|
services.openssh = {
|
||||||
enable = true;
|
enable = true;
|
||||||
settings = {
|
settings = {
|
||||||
@@ -96,6 +64,4 @@
|
|||||||
];
|
];
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
my.persist.nixosDirs = [ "/etc/NetworkManager/system-connections" ];
|
|
||||||
}
|
}
|
||||||
@@ -36,10 +36,6 @@ in
|
|||||||
"resume_offset=6444127"
|
"resume_offset=6444127"
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
services.scx = {
|
|
||||||
enable = true;
|
|
||||||
scheduler = "scx_rusty";
|
|
||||||
};
|
|
||||||
|
|
||||||
fileSystems."/" = {
|
fileSystems."/" = {
|
||||||
device = btrfs;
|
device = btrfs;
|
||||||
@@ -17,10 +17,10 @@
|
|||||||
anki
|
anki
|
||||||
|
|
||||||
ayugram-desktop
|
ayugram-desktop
|
||||||
signal-desktop
|
signal-desktop-wayland
|
||||||
element-desktop
|
element-desktop
|
||||||
fractal
|
fractal
|
||||||
qq
|
qq-wayland
|
||||||
wechat
|
wechat
|
||||||
|
|
||||||
gnome-clocks
|
gnome-clocks
|
||||||
@@ -35,10 +35,16 @@
|
|||||||
no_proxy = "192.168.3.0/24";
|
no_proxy = "192.168.3.0/24";
|
||||||
PATH = "/home/${username}/bin:$PATH";
|
PATH = "/home/${username}/bin:$PATH";
|
||||||
};
|
};
|
||||||
profileExtra = ''
|
};
|
||||||
if [ `tty` = "/dev/tty6" ]; then
|
programs.fish = {
|
||||||
clear
|
shellAliases = {
|
||||||
fi
|
cageterm = "cage -m DP-1 -s -- alacritty -o font.size=20";
|
||||||
|
cagefoot = "cage -m DP-1 -s -- foot --font=monospace:size=20";
|
||||||
|
cagekitty = "cage -m DP-1 -s -- kitty -o font_size=20";
|
||||||
|
};
|
||||||
|
interactiveShellInit = ''
|
||||||
|
set -g no_proxy "192.168.3.0/24"
|
||||||
|
set -gp PATH $HOME/bin
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -90,8 +96,8 @@
|
|||||||
defaultApplications =
|
defaultApplications =
|
||||||
let
|
let
|
||||||
browser = [ config.my.desktop.browser.default.desktop ];
|
browser = [ config.my.desktop.browser.default.desktop ];
|
||||||
editor = [ "codium.desktop" ];
|
editor = [ "nvim.desktop" ];
|
||||||
imageviewer = [ "org.gnome.Shotwell-Viewer.desktop" ];
|
imageviewer = [ "org.gnome.Loupe.desktop" ];
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
"inode/directory" = [ "org.gnome.Nautilus.desktop" ];
|
"inode/directory" = [ "org.gnome.Nautilus.desktop" ];
|
||||||
@@ -100,7 +106,6 @@
|
|||||||
|
|
||||||
"text/*" = editor;
|
"text/*" = editor;
|
||||||
"application/json" = editor;
|
"application/json" = editor;
|
||||||
"text/html" = editor;
|
|
||||||
"text/xml" = editor;
|
"text/xml" = editor;
|
||||||
"application/xml" = editor;
|
"application/xml" = editor;
|
||||||
"application/xhtml+xml" = editor;
|
"application/xhtml+xml" = editor;
|
||||||
@@ -113,6 +118,7 @@
|
|||||||
"application/x-extension-xht" = editor;
|
"application/x-extension-xht" = editor;
|
||||||
"application/x-extension-xhtml" = editor;
|
"application/x-extension-xhtml" = editor;
|
||||||
|
|
||||||
|
"text/html" = browser;
|
||||||
"x-scheme-handler/about" = browser;
|
"x-scheme-handler/about" = browser;
|
||||||
"x-scheme-handler/ftp" = browser;
|
"x-scheme-handler/ftp" = browser;
|
||||||
"x-scheme-handler/http" = browser;
|
"x-scheme-handler/http" = browser;
|
||||||
@@ -160,6 +166,9 @@
|
|||||||
".claude"
|
".claude"
|
||||||
".claude-code-router"
|
".claude-code-router"
|
||||||
];
|
];
|
||||||
|
homeFiles = [
|
||||||
|
".claude.json"
|
||||||
|
];
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
@@ -25,46 +25,17 @@ let
|
|||||||
'';
|
'';
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
security.pam.loginLimits = [
|
|
||||||
{
|
|
||||||
domain = "*";
|
|
||||||
type = "soft";
|
|
||||||
item = "nofile";
|
|
||||||
value = "524288";
|
|
||||||
}
|
|
||||||
];
|
|
||||||
|
|
||||||
systemd.services.btreset = {
|
systemd.services.btreset = {
|
||||||
script = lib.getExe btreset;
|
script = lib.getExe btreset;
|
||||||
wantedBy = [ "multi-user.target" ];
|
wantedBy = [ "multi-user.target" ];
|
||||||
serviceConfig.Type = "oneshot";
|
serviceConfig.Type = "oneshot";
|
||||||
};
|
};
|
||||||
|
|
||||||
boot.kernelParams = [
|
boot.kernelParams = [
|
||||||
"usbcore.autosuspend=-1" # Avoid usb autosuspend (for usb bluetooth adapter)
|
"usbcore.autosuspend=-1" # Avoid usb autosuspend (for usb bluetooth adapter)
|
||||||
"fsck.mode=skip"
|
"fsck.mode=skip"
|
||||||
];
|
];
|
||||||
|
|
||||||
boot.loader = {
|
|
||||||
efi.canTouchEfiVariables = true;
|
|
||||||
systemd-boot = {
|
|
||||||
enable = true;
|
|
||||||
configurationLimit = 10;
|
|
||||||
};
|
|
||||||
grub.enable = false;
|
|
||||||
timeout = 0;
|
|
||||||
};
|
|
||||||
|
|
||||||
hardware.graphics.enable = true;
|
|
||||||
hardware.graphics.enable32Bit = true;
|
|
||||||
|
|
||||||
systemd.services.nix-daemon = {
|
|
||||||
environment.TMPDIR = "/var/cache/nix";
|
|
||||||
serviceConfig.CacheDirectory = "nix";
|
|
||||||
};
|
|
||||||
environment.variables.NIX_REMOTE = "daemon";
|
|
||||||
|
|
||||||
services.printing.enable = true;
|
|
||||||
|
|
||||||
services.keyd = {
|
services.keyd = {
|
||||||
enable = true;
|
enable = true;
|
||||||
keyboards = {
|
keyboards = {
|
||||||
@@ -87,8 +58,6 @@ in
|
|||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
services.gvfs.enable = true;
|
|
||||||
|
|
||||||
programs.wireshark.enable = true;
|
programs.wireshark.enable = true;
|
||||||
programs.wireshark.package = pkgs.wireshark;
|
programs.wireshark.package = pkgs.wireshark;
|
||||||
users.users.${username}.extraGroups = [ "wireshark" ];
|
users.users.${username}.extraGroups = [ "wireshark" ];
|
||||||
111
lib/default.nix
111
lib/default.nix
@@ -1,102 +1,9 @@
|
|||||||
{ lib }:
|
{ lib, inputs }:
|
||||||
|
lib.extend (
|
||||||
{
|
self: super: {
|
||||||
makeSwitch =
|
inherit (inputs.home-manager.lib) hm;
|
||||||
{
|
umport = import ./umport.nix { lib = self; };
|
||||||
default ? false,
|
haumea = inputs.haumea.lib;
|
||||||
config,
|
infuse = (import inputs.infuse { inherit lib; }).v1.infuse;
|
||||||
optionPath,
|
}
|
||||||
optionName,
|
)
|
||||||
config',
|
|
||||||
}:
|
|
||||||
let
|
|
||||||
cfg = lib.getAttrFromPath optionPath config.my;
|
|
||||||
in
|
|
||||||
{
|
|
||||||
options.my = lib.setAttrByPath optionPath {
|
|
||||||
enable = (lib.mkEnableOption optionName) // {
|
|
||||||
inherit default;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
config = lib.mkIf cfg.enable config';
|
|
||||||
};
|
|
||||||
|
|
||||||
makeHomePackageConfig =
|
|
||||||
{
|
|
||||||
config,
|
|
||||||
pkgs,
|
|
||||||
packageName,
|
|
||||||
packagePath,
|
|
||||||
optionPath,
|
|
||||||
extraConfig ? { },
|
|
||||||
}:
|
|
||||||
lib.my.makeSwitch {
|
|
||||||
inherit config optionPath;
|
|
||||||
optionName = packageName;
|
|
||||||
config' = lib.mkMerge [
|
|
||||||
{
|
|
||||||
my.hm.home.packages = [ (lib.getAttrFromPath packagePath pkgs) ];
|
|
||||||
}
|
|
||||||
extraConfig
|
|
||||||
];
|
|
||||||
};
|
|
||||||
|
|
||||||
makeHomeProgramConfig =
|
|
||||||
{
|
|
||||||
config,
|
|
||||||
programName,
|
|
||||||
optionPath,
|
|
||||||
extraConfig ? { },
|
|
||||||
}:
|
|
||||||
lib.my.makeSwitch {
|
|
||||||
inherit config optionPath;
|
|
||||||
optionName = programName;
|
|
||||||
|
|
||||||
config' = lib.mkMerge [
|
|
||||||
{
|
|
||||||
my.hm.programs = lib.setAttrByPath [ programName "enable" ] true;
|
|
||||||
}
|
|
||||||
extraConfig
|
|
||||||
];
|
|
||||||
};
|
|
||||||
|
|
||||||
makeNixosPackageConfig =
|
|
||||||
{
|
|
||||||
config,
|
|
||||||
pkgs,
|
|
||||||
packageName,
|
|
||||||
packagePath,
|
|
||||||
optionPath,
|
|
||||||
extraConfig ? { },
|
|
||||||
}:
|
|
||||||
lib.my.makeSwitch {
|
|
||||||
inherit config optionPath;
|
|
||||||
optionName = packageName;
|
|
||||||
config' = lib.mkMerge [
|
|
||||||
{
|
|
||||||
environment.systemPackages = [ (lib.getAttrFromPath packagePath pkgs) ];
|
|
||||||
}
|
|
||||||
extraConfig
|
|
||||||
];
|
|
||||||
};
|
|
||||||
|
|
||||||
makeNixosProgramConfig =
|
|
||||||
{
|
|
||||||
config,
|
|
||||||
programName,
|
|
||||||
optionPath,
|
|
||||||
extraConfig ? { },
|
|
||||||
}:
|
|
||||||
lib.my.makeSwitch {
|
|
||||||
inherit config optionPath;
|
|
||||||
optionName = programName;
|
|
||||||
|
|
||||||
config' = lib.mkMerge [
|
|
||||||
{
|
|
||||||
programs = lib.setAttrByPath [ programName "enable" ] true;
|
|
||||||
}
|
|
||||||
extraConfig
|
|
||||||
];
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|||||||
@@ -1,14 +0,0 @@
|
|||||||
# Just a convenience function that returns the given Nixpkgs standard
|
|
||||||
# library extended with the imxyy library.
|
|
||||||
|
|
||||||
stdlib:
|
|
||||||
|
|
||||||
let
|
|
||||||
mkMyLib = import ./.;
|
|
||||||
in
|
|
||||||
stdlib.extend (
|
|
||||||
self: super: {
|
|
||||||
my = mkMyLib { lib = self; };
|
|
||||||
umport = import ./umport.nix { lib = self; };
|
|
||||||
}
|
|
||||||
)
|
|
||||||
@@ -13,6 +13,7 @@ let
|
|||||||
paths ? [ ],
|
paths ? [ ],
|
||||||
include ? [ ],
|
include ? [ ],
|
||||||
exclude ? [ ],
|
exclude ? [ ],
|
||||||
|
extraExcludePredicate ? _: true,
|
||||||
recursive ? true,
|
recursive ? true,
|
||||||
}:
|
}:
|
||||||
with lib;
|
with lib;
|
||||||
@@ -22,26 +23,22 @@ let
|
|||||||
excludedDirs = filter (path: pathIsDirectory path) exclude;
|
excludedDirs = filter (path: pathIsDirectory path) exclude;
|
||||||
isExcluded =
|
isExcluded =
|
||||||
path:
|
path:
|
||||||
if elem path excludedFiles then
|
(elem path excludedFiles)
|
||||||
true
|
|| ((filter (excludedDir: lib.path.hasPrefix excludedDir path) excludedDirs) != [ ])
|
||||||
else
|
|| extraExcludePredicate path;
|
||||||
(filter (excludedDir: lib.path.hasPrefix excludedDir path) excludedDirs) != [ ];
|
|
||||||
in
|
in
|
||||||
unique (
|
unique (
|
||||||
(filter
|
(filter (file: pathIsRegularFile file && hasSuffix ".nix" (toString file) && !isExcluded file) (
|
||||||
(file: pathIsRegularFile file && hasSuffix ".nix" (builtins.toString file) && !isExcluded file)
|
concatMap (
|
||||||
(
|
path:
|
||||||
concatMap (
|
if recursive then
|
||||||
_path:
|
toList path
|
||||||
if recursive then
|
else
|
||||||
toList _path
|
mapAttrsToList (
|
||||||
else
|
name: type: path + (if type == "directory" then "/${name}/default.nix" else "/${name}")
|
||||||
mapAttrsToList (
|
) (builtins.readDir path)
|
||||||
name: type: _path + (if type == "directory" then "/${name}/default.nix" else "/${name}")
|
) (unique (if path == null then paths else [ path ] ++ paths))
|
||||||
) (builtins.readDir _path)
|
))
|
||||||
) (unique (if path == null then paths else [ path ] ++ paths))
|
|
||||||
)
|
|
||||||
)
|
|
||||||
++ (if recursive then concatMap (path: toList path) (unique include) else unique include)
|
++ (if recursive then concatMap (path: toList path) (unique include) else unique include)
|
||||||
);
|
);
|
||||||
in
|
in
|
||||||
|
|||||||
@@ -5,12 +5,15 @@
|
|||||||
username,
|
username,
|
||||||
...
|
...
|
||||||
}:
|
}:
|
||||||
lib.my.makeSwitch {
|
let
|
||||||
inherit config;
|
cfg = config.my.audio;
|
||||||
default = true;
|
in
|
||||||
optionName = "default audio settings";
|
{
|
||||||
optionPath = [ "audio" ];
|
options.my.audio = {
|
||||||
config' = {
|
enable = lib.mkEnableOption "default audio settings";
|
||||||
|
};
|
||||||
|
|
||||||
|
config = lib.mkIf cfg.enable {
|
||||||
security.rtkit.enable = true;
|
security.rtkit.enable = true;
|
||||||
services.pipewire = {
|
services.pipewire = {
|
||||||
enable = true;
|
enable = true;
|
||||||
|
|||||||
@@ -1,10 +1,13 @@
|
|||||||
{ config, lib, ... }:
|
{ config, lib, ... }:
|
||||||
lib.my.makeSwitch {
|
let
|
||||||
inherit config;
|
cfg = config.my.bluetooth;
|
||||||
default = true;
|
in
|
||||||
optionName = "default bluetooth settings";
|
{
|
||||||
optionPath = [ "bluetooth" ];
|
options.my.bluetooth = {
|
||||||
config' = {
|
enable = lib.mkEnableOption "default bluetooth settings";
|
||||||
|
};
|
||||||
|
|
||||||
|
config = lib.mkIf cfg.enable {
|
||||||
hardware.bluetooth = {
|
hardware.bluetooth = {
|
||||||
enable = true;
|
enable = true;
|
||||||
powerOnBoot = true;
|
powerOnBoot = true;
|
||||||
|
|||||||
@@ -1,18 +1,22 @@
|
|||||||
{ config, lib, ... }:
|
{ config, lib, ... }:
|
||||||
lib.my.makeSwitch {
|
let
|
||||||
inherit config;
|
cfg = config.my.cli.all;
|
||||||
optionName = "all command line tools";
|
in
|
||||||
optionPath = [
|
{
|
||||||
"cli"
|
options.my.cli.all = {
|
||||||
"all"
|
enable = lib.mkEnableOption "all command line tools";
|
||||||
];
|
};
|
||||||
config' = {
|
|
||||||
|
config = lib.mkIf cfg.enable {
|
||||||
my.cli = {
|
my.cli = {
|
||||||
media.all.enable = true;
|
media.all.enable = true;
|
||||||
misc.enable = true;
|
misc.enable = true;
|
||||||
monitor.all.enable = true;
|
monitor.all.enable = true;
|
||||||
shell.all.enable = true;
|
shell.all.enable = true;
|
||||||
vcs.all.enable = true;
|
vcs.all.enable = true;
|
||||||
|
|
||||||
|
shpool.enable = true;
|
||||||
|
tmux.enable = true;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,13 +1,13 @@
|
|||||||
{ config, lib, ... }:
|
{ config, lib, ... }:
|
||||||
lib.my.makeSwitch {
|
let
|
||||||
inherit config;
|
cfg = config.my.cli.media.all;
|
||||||
optionName = "all command line media tools";
|
in
|
||||||
optionPath = [
|
{
|
||||||
"cli"
|
options.my.cli.media.all = {
|
||||||
"media"
|
enable = lib.mkEnableOption "all command line media tools";
|
||||||
"all"
|
};
|
||||||
];
|
|
||||||
config' = {
|
config = lib.mkIf cfg.enable {
|
||||||
my.cli.media = {
|
my.cli.media = {
|
||||||
go-musicfox.enable = true;
|
go-musicfox.enable = true;
|
||||||
ffmpeg.enable = true;
|
ffmpeg.enable = true;
|
||||||
|
|||||||
@@ -4,13 +4,15 @@
|
|||||||
pkgs,
|
pkgs,
|
||||||
...
|
...
|
||||||
}:
|
}:
|
||||||
lib.my.makeHomePackageConfig {
|
let
|
||||||
inherit config pkgs;
|
cfg = config.my.cli.media.ffmpeg;
|
||||||
packageName = "ffmpeg";
|
in
|
||||||
packagePath = [ "ffmpeg" ];
|
{
|
||||||
optionPath = [
|
options.my.cli.media.ffmpeg = {
|
||||||
"cli"
|
enable = lib.mkEnableOption "ffmpeg";
|
||||||
"media"
|
};
|
||||||
"ffmpeg"
|
|
||||||
];
|
config = lib.mkIf cfg.enable {
|
||||||
|
my.hm.home.packages = [ pkgs.ffmpeg ];
|
||||||
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -5,20 +5,19 @@
|
|||||||
secrets,
|
secrets,
|
||||||
...
|
...
|
||||||
}:
|
}:
|
||||||
lib.my.makeSwitch {
|
let
|
||||||
inherit config;
|
cfg = config.my.cli.media.go-musicfox;
|
||||||
optionName = "go-musicfox";
|
in
|
||||||
optionPath = [
|
{
|
||||||
"cli"
|
options.my.cli.media.go-musicfox = {
|
||||||
"media"
|
enable = lib.mkEnableOption "go-musicfox";
|
||||||
"go-musicfox"
|
};
|
||||||
];
|
|
||||||
config' = {
|
config = lib.mkIf cfg.enable {
|
||||||
my = {
|
my = {
|
||||||
hm = {
|
hm = {
|
||||||
home.packages = with pkgs; [
|
home.packages = [
|
||||||
playerctl
|
pkgs.go-musicfox
|
||||||
go-musicfox
|
|
||||||
];
|
];
|
||||||
sops.secrets.go-musicfox = {
|
sops.secrets.go-musicfox = {
|
||||||
sopsFile = secrets.go-musicfox;
|
sopsFile = secrets.go-musicfox;
|
||||||
|
|||||||
@@ -4,19 +4,22 @@
|
|||||||
pkgs,
|
pkgs,
|
||||||
...
|
...
|
||||||
}:
|
}:
|
||||||
lib.my.makeSwitch {
|
let
|
||||||
inherit config;
|
cfg = config.my.cli.misc;
|
||||||
default = true;
|
in
|
||||||
optionName = "misc command line tools";
|
{
|
||||||
optionPath = [
|
options.my.cli.misc = {
|
||||||
"cli"
|
enable = lib.mkOption {
|
||||||
"misc"
|
type = lib.types.bool;
|
||||||
];
|
default = true;
|
||||||
config' = {
|
description = "Enable misc command line tools";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
config = lib.mkIf cfg.enable {
|
||||||
environment.systemPackages = with pkgs; [
|
environment.systemPackages = with pkgs; [
|
||||||
vim
|
vim
|
||||||
wget
|
wget
|
||||||
git
|
|
||||||
|
|
||||||
file
|
file
|
||||||
gnused
|
gnused
|
||||||
@@ -27,10 +30,14 @@ lib.my.makeSwitch {
|
|||||||
xz
|
xz
|
||||||
p7zip
|
p7zip
|
||||||
unrar-free
|
unrar-free
|
||||||
|
ouch
|
||||||
|
|
||||||
pciutils
|
pciutils
|
||||||
usbutils
|
usbutils
|
||||||
|
|
||||||
|
dust
|
||||||
|
dysk
|
||||||
|
|
||||||
lsof
|
lsof
|
||||||
|
|
||||||
nmap
|
nmap
|
||||||
@@ -39,8 +46,6 @@ lib.my.makeSwitch {
|
|||||||
dnsutils
|
dnsutils
|
||||||
|
|
||||||
killall
|
killall
|
||||||
|
|
||||||
comma
|
|
||||||
];
|
];
|
||||||
|
|
||||||
programs.dconf.enable = true;
|
programs.dconf.enable = true;
|
||||||
@@ -50,35 +55,30 @@ lib.my.makeSwitch {
|
|||||||
".config/television/cable"
|
".config/television/cable"
|
||||||
];
|
];
|
||||||
my.hm = {
|
my.hm = {
|
||||||
home.packages = with pkgs; [
|
programs.fish.shellAliases = {
|
||||||
lsd
|
x = "ouch d";
|
||||||
fd
|
|
||||||
neofetch
|
|
||||||
fastfetch
|
|
||||||
fzf
|
|
||||||
bat
|
|
||||||
ripgrep
|
|
||||||
|
|
||||||
aria2
|
|
||||||
socat
|
|
||||||
];
|
|
||||||
programs.tmux = {
|
|
||||||
enable = true;
|
|
||||||
extraConfig = "set-option -g mouse on";
|
|
||||||
plugins = [
|
|
||||||
(pkgs.tmuxPlugins.mkTmuxPlugin {
|
|
||||||
pluginName = "tokyo-night-tmux";
|
|
||||||
rtpFilePath = "tokyo-night.tmux";
|
|
||||||
version = "legacy";
|
|
||||||
src = pkgs.fetchFromGitHub {
|
|
||||||
owner = "janoamaral";
|
|
||||||
repo = "tokyo-night-tmux";
|
|
||||||
rev = "16469dfad86846138f594ceec780db27039c06cd";
|
|
||||||
hash = "sha256-EKCgYan0WayXnkSb2fDJxookdBLW0XBKi2hf/YISwJE=";
|
|
||||||
};
|
|
||||||
})
|
|
||||||
];
|
|
||||||
};
|
};
|
||||||
|
programs.zsh.shellAliases = {
|
||||||
|
x = "ouch d";
|
||||||
|
};
|
||||||
|
|
||||||
|
home.packages = with pkgs; [
|
||||||
|
# keep-sorted start
|
||||||
|
aria2
|
||||||
|
bat
|
||||||
|
comma
|
||||||
|
fastfetch
|
||||||
|
fd
|
||||||
|
fzf
|
||||||
|
jq
|
||||||
|
keep-sorted
|
||||||
|
lsd
|
||||||
|
neofetch
|
||||||
|
ripgrep
|
||||||
|
socat
|
||||||
|
typos
|
||||||
|
# keep-sorted end
|
||||||
|
];
|
||||||
programs.tealdeer = {
|
programs.tealdeer = {
|
||||||
enable = true;
|
enable = true;
|
||||||
enableAutoUpdates = true;
|
enableAutoUpdates = true;
|
||||||
|
|||||||
@@ -1,13 +1,13 @@
|
|||||||
{ config, lib, ... }:
|
{ config, lib, ... }:
|
||||||
lib.my.makeSwitch {
|
let
|
||||||
inherit config;
|
cfg = config.my.cli.monitor.all;
|
||||||
optionName = "all command line monitor tools";
|
in
|
||||||
optionPath = [
|
{
|
||||||
"cli"
|
options.my.cli.monitor.all = {
|
||||||
"monitor"
|
enable = lib.mkEnableOption "all command line monitor tools";
|
||||||
"all"
|
};
|
||||||
];
|
|
||||||
config' = {
|
config = lib.mkIf cfg.enable {
|
||||||
my.cli.monitor = {
|
my.cli.monitor = {
|
||||||
btop.enable = true;
|
btop.enable = true;
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -18,7 +18,7 @@ theme[main_fg]="#D8DEE9"
|
|||||||
# Title color for boxes
|
# Title color for boxes
|
||||||
theme[title]="#8FBCBB"
|
theme[title]="#8FBCBB"
|
||||||
|
|
||||||
# Higlight color for keyboard shortcuts
|
# Highlight color for keyboard shortcuts
|
||||||
theme[hi_fg]="#5E81AC"
|
theme[hi_fg]="#5E81AC"
|
||||||
|
|
||||||
# Background color of selected item in processes box
|
# Background color of selected item in processes box
|
||||||
|
|||||||
@@ -4,16 +4,16 @@
|
|||||||
pkgs,
|
pkgs,
|
||||||
...
|
...
|
||||||
}:
|
}:
|
||||||
lib.my.makeHomePackageConfig {
|
let
|
||||||
inherit config pkgs;
|
cfg = config.my.cli.monitor.btop;
|
||||||
packageName = "btop";
|
in
|
||||||
packagePath = [ "btop" ];
|
{
|
||||||
optionPath = [
|
options.my.cli.monitor.btop = {
|
||||||
"cli"
|
enable = lib.mkEnableOption "btop";
|
||||||
"monitor"
|
};
|
||||||
"btop"
|
|
||||||
];
|
config = lib.mkIf cfg.enable {
|
||||||
extraConfig = {
|
my.hm.home.packages = [ pkgs.btop ];
|
||||||
my.hm.xdg.configFile."btop" = {
|
my.hm.xdg.configFile."btop" = {
|
||||||
source = ./config;
|
source = ./config;
|
||||||
recursive = true;
|
recursive = true;
|
||||||
|
|||||||
@@ -1,13 +1,13 @@
|
|||||||
{ config, lib, ... }:
|
{ config, lib, ... }:
|
||||||
lib.my.makeSwitch {
|
let
|
||||||
inherit config;
|
cfg = config.my.cli.shell.all;
|
||||||
optionName = "all shells";
|
in
|
||||||
optionPath = [
|
{
|
||||||
"cli"
|
options.my.cli.shell.all = {
|
||||||
"shell"
|
enable = lib.mkEnableOption "all shells";
|
||||||
"all"
|
};
|
||||||
];
|
|
||||||
config' = {
|
config = lib.mkIf cfg.enable {
|
||||||
my.cli.shell = {
|
my.cli.shell = {
|
||||||
zsh.enable = true;
|
zsh.enable = true;
|
||||||
fish.enable = true;
|
fish.enable = true;
|
||||||
|
|||||||
@@ -1,50 +1,44 @@
|
|||||||
{
|
{
|
||||||
config,
|
config,
|
||||||
lib,
|
lib,
|
||||||
pkgs,
|
|
||||||
...
|
...
|
||||||
}:
|
}:
|
||||||
lib.my.makeSwitch {
|
let
|
||||||
inherit config;
|
cfg = config.my.cli.shell.fish;
|
||||||
default = true;
|
in
|
||||||
optionName = "default fish settings";
|
{
|
||||||
optionPath = [
|
options.my.cli.shell.fish = {
|
||||||
"cli"
|
enable = lib.mkOption {
|
||||||
"shell"
|
type = lib.types.bool;
|
||||||
"fish"
|
default = true;
|
||||||
];
|
description = "Enable default fish settings";
|
||||||
config' = {
|
};
|
||||||
my.persist.homeDirs = [
|
};
|
||||||
".local/share/fish"
|
|
||||||
];
|
config = lib.mkIf cfg.enable {
|
||||||
|
my.persist = {
|
||||||
|
homeDirs = [
|
||||||
|
".local/share/fish"
|
||||||
|
];
|
||||||
|
};
|
||||||
my.hm = {
|
my.hm = {
|
||||||
xdg.configFile."fish/themes/tokyonight_storm.theme".source = builtins.fetchurl {
|
xdg.configFile."fish/themes/tokyonight_storm.theme".source = builtins.fetchurl {
|
||||||
url = "https://raw.githubusercontent.com/folke/tokyonight.nvim/refs/tags/v4.14.1/extras/fish_themes/tokyonight_storm.theme";
|
url = "https://raw.githubusercontent.com/folke/tokyonight.nvim/refs/tags/v4.14.1/extras/fish_themes/tokyonight_storm.theme";
|
||||||
sha256 = "02n1w5x65683c8mlwg1rav06iqm3xk90zq45qmygpm7pzyn8dqh1";
|
sha256 = "02n1w5x65683c8mlwg1rav06iqm3xk90zq45qmygpm7pzyn8dqh1";
|
||||||
};
|
};
|
||||||
|
programs.starship.enableFishIntegration = false;
|
||||||
programs.fish = {
|
programs.fish = {
|
||||||
enable = true;
|
enable = true;
|
||||||
plugins = [
|
|
||||||
{
|
|
||||||
name = "extract";
|
|
||||||
src = pkgs.fetchFromGitHub {
|
|
||||||
owner = "hexclover";
|
|
||||||
repo = "fish-extract-ng";
|
|
||||||
tag = "v0.1";
|
|
||||||
hash = "sha256-yef5NX4HdZ3ab/2AzNrvvhi0CbeTvXYKZmyH76gIpyk=";
|
|
||||||
};
|
|
||||||
}
|
|
||||||
];
|
|
||||||
shellAliases = {
|
shellAliases = {
|
||||||
la = "lsd -lah";
|
la = "lsd -lah";
|
||||||
ls = "lsd";
|
ls = "lsd";
|
||||||
svim = "doasedit";
|
svim = "doasedit";
|
||||||
nf = "fastfetch";
|
nf = "fastfetch";
|
||||||
tmux = "tmux -T RGB,focus,overline,mouse,clipboard,usstyle";
|
|
||||||
};
|
};
|
||||||
interactiveShellInit = lib.mkBefore ''
|
interactiveShellInit = lib.mkBefore ''
|
||||||
fish_vi_key_bindings
|
fish_vi_key_bindings
|
||||||
fish_config theme choose tokyonight_storm
|
fish_config theme choose tokyonight_storm
|
||||||
|
${lib.optionalString config.my.cli.shell.starship.enable "source ${./starship.fish}"}
|
||||||
'';
|
'';
|
||||||
functions = {
|
functions = {
|
||||||
fish_greeting = "";
|
fish_greeting = "";
|
||||||
|
|||||||
143
modules/cli/shell/starship.fish
Normal file
143
modules/cli/shell/starship.fish
Normal file
@@ -0,0 +1,143 @@
|
|||||||
|
# This file is modified from:
|
||||||
|
# https://github.com/tyler-stefani/starship/blob/main/conf.d/starship.fish
|
||||||
|
# The MIT License can be found here:
|
||||||
|
# https://github.com/tyler-stefani/starship/blob/main/LICENSE
|
||||||
|
|
||||||
|
status is-interactive
|
||||||
|
or exit 0
|
||||||
|
|
||||||
|
# set temp file and signal for async prompts
|
||||||
|
if test -n "$XDG_RUNTIME_DIR"
|
||||||
|
set -g starship_temp_dir "$XDG_RUNTIME_DIR"/fish-async-prompt
|
||||||
|
else
|
||||||
|
set -g starship_temp_dir /tmp/fish-async-prompt
|
||||||
|
end
|
||||||
|
mkdir -p "$starship_temp_dir"
|
||||||
|
set -g starship_temp_file "$starship_temp_dir"/"$fish_pid"_last_prompt
|
||||||
|
set -g starship_async_signal SIGUSR1
|
||||||
|
|
||||||
|
function fish_prompt
|
||||||
|
if test "$TRANSIENT" = "1"
|
||||||
|
starship_transient_prompt_func
|
||||||
|
else if test -e $starship_temp_file
|
||||||
|
cat $starship_temp_file
|
||||||
|
else
|
||||||
|
starship_transient_prompt_func
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
function starship_transient_prompt_func
|
||||||
|
# Clear from cursor to end of screen as `commandline -f repaint` does not do this
|
||||||
|
# See https://github.com/fish-shell/fish-shell/issues/8418
|
||||||
|
printf \e\[0J
|
||||||
|
starship module character
|
||||||
|
end
|
||||||
|
|
||||||
|
|
||||||
|
function fish_right_prompt
|
||||||
|
switch "$fish_key_bindings"
|
||||||
|
case fish_hybrid_key_bindings fish_vi_key_bindings
|
||||||
|
set STARSHIP_KEYMAP "$fish_bind_mode"
|
||||||
|
case '*'
|
||||||
|
set STARSHIP_KEYMAP insert
|
||||||
|
end
|
||||||
|
set STARSHIP_CMD_PIPESTATUS $pipestatus
|
||||||
|
set STARSHIP_CMD_STATUS $status
|
||||||
|
# Account for changes in variable name between v2.7 and v3.0
|
||||||
|
set STARSHIP_DURATION "$CMD_DURATION$cmd_duration"
|
||||||
|
set STARSHIP_JOBS (count (jobs -p))
|
||||||
|
if test "$TRANSIENT" = "1"
|
||||||
|
if type -q starship_transient_rprompt_func
|
||||||
|
starship_transient_rprompt_func
|
||||||
|
else
|
||||||
|
printf ""
|
||||||
|
end
|
||||||
|
else
|
||||||
|
starship prompt --right --terminal-width="$COLUMNS" --status=$STARSHIP_CMD_STATUS --pipestatus="$STARSHIP_CMD_PIPESTATUS" --keymap=$STARSHIP_KEYMAP --cmd-duration=$STARSHIP_DURATION --jobs=$STARSHIP_JOBS
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
# Disable virtualenv prompt, it breaks starship
|
||||||
|
set -g VIRTUAL_ENV_DISABLE_PROMPT 1
|
||||||
|
|
||||||
|
# Remove default mode prompt
|
||||||
|
builtin functions -e fish_mode_prompt
|
||||||
|
|
||||||
|
set -gx STARSHIP_SHELL fish
|
||||||
|
|
||||||
|
# Transience related functions
|
||||||
|
function reset-transient --on-event fish_postexec
|
||||||
|
set -g TRANSIENT 0
|
||||||
|
end
|
||||||
|
|
||||||
|
function transient_execute
|
||||||
|
if commandline --is-valid
|
||||||
|
set -g TRANSIENT 1
|
||||||
|
commandline -f repaint
|
||||||
|
else
|
||||||
|
set -g TRANSIENT 0
|
||||||
|
end
|
||||||
|
commandline -f execute
|
||||||
|
end
|
||||||
|
|
||||||
|
function transient_cancel
|
||||||
|
if string length -q -- (commandline)
|
||||||
|
set -g TRANSIENT 1
|
||||||
|
commandline -f repaint
|
||||||
|
end
|
||||||
|
commandline -f cancel-commandline
|
||||||
|
end
|
||||||
|
|
||||||
|
# --user is the default, but listed anyway to make it explicit.
|
||||||
|
function enable_transience --description 'enable transient prompt keybindings'
|
||||||
|
bind --user \r transient_execute
|
||||||
|
bind --user -M insert \r transient_execute
|
||||||
|
bind --user \cc transient_cancel
|
||||||
|
end
|
||||||
|
|
||||||
|
# Erase the transient prompt related key bindings.
|
||||||
|
# --user is the default, but listed anyway to make it explicit.
|
||||||
|
# Erasing a user binding will revert to the preset.
|
||||||
|
function disable_transience --description 'remove transient prompt keybindings'
|
||||||
|
bind --user -e \r
|
||||||
|
bind --user -M insert -e \r
|
||||||
|
bind --user -e \cc
|
||||||
|
end
|
||||||
|
|
||||||
|
# Set up the session key that will be used to store logs
|
||||||
|
# We don't use `random [min] [max]` because it is unavailable in older versions of fish shell
|
||||||
|
set -gx STARSHIP_SESSION_KEY (string sub -s1 -l16 (random)(random)(random)(random)(random)0000000000000000)
|
||||||
|
|
||||||
|
# async related functions
|
||||||
|
function write_prompt_to_temp --on-event fish_prompt
|
||||||
|
switch "$fish_key_bindings"
|
||||||
|
case fish_hybrid_key_bindings fish_vi_key_bindings
|
||||||
|
set STARSHIP_KEYMAP "$fish_bind_mode"
|
||||||
|
case '*'
|
||||||
|
set STARSHIP_KEYMAP insert
|
||||||
|
end
|
||||||
|
set STARSHIP_CMD_PIPESTATUS $pipestatus
|
||||||
|
set STARSHIP_CMD_STATUS $status
|
||||||
|
# Account for changes in variable name between v2.7 and v3.0
|
||||||
|
set STARSHIP_DURATION "$CMD_DURATION$cmd_duration"
|
||||||
|
set STARSHIP_JOBS (count (jobs -p))
|
||||||
|
|
||||||
|
# MODIFIED: '"$STARSHIP_CMD_PIPESTATUS"' -> '$STARSHIP_CMD_PIPESTATUS'
|
||||||
|
fish -c 'starship prompt \
|
||||||
|
--terminal-width='"$COLUMNS"' \
|
||||||
|
--status='$STARSHIP_CMD_STATUS' \
|
||||||
|
--pipestatus='$STARSHIP_CMD_PIPESTATUS' \
|
||||||
|
--keymap='$STARSHIP_KEYMAP' \
|
||||||
|
--cmd-duration='$STARSHIP_DURATION' \
|
||||||
|
--jobs='$STARSHIP_JOBS' > '$starship_temp_file' \
|
||||||
|
&& kill -s '"$starship_async_signal"' '"$fish_pid"'' &
|
||||||
|
disown
|
||||||
|
end
|
||||||
|
|
||||||
|
function repaint_prompt_on_signal --on-signal "$starship_async_signal"
|
||||||
|
commandline -f repaint
|
||||||
|
end
|
||||||
|
|
||||||
|
function remove_temp_prompt_on_exit --on-event fish_exit
|
||||||
|
rm -f $starship_temp_file
|
||||||
|
end
|
||||||
@@ -1,21 +1,57 @@
|
|||||||
{ config, lib, ... }:
|
{ config, lib, ... }:
|
||||||
lib.my.makeSwitch {
|
let
|
||||||
inherit config;
|
cfg = config.my.cli.shell.starship;
|
||||||
optionName = "starship prompt";
|
in
|
||||||
optionPath = [
|
{
|
||||||
"cli"
|
options.my.cli.shell.starship = {
|
||||||
"shell"
|
enable = lib.mkEnableOption "starship prompt";
|
||||||
"starship"
|
format = lib.mkOption {
|
||||||
];
|
type = with lib.types; listOf singleLineStr;
|
||||||
config' = {
|
|
||||||
my.hm = {
|
|
||||||
programs.starship = {
|
|
||||||
enable = true;
|
|
||||||
settings = lib.recursiveUpdate (with builtins; fromTOML (readFile ./starship-preset.toml)) {
|
|
||||||
add_newline = false;
|
|
||||||
nix_shell.disabled = true;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
config = lib.mkMerge [
|
||||||
|
(lib.mkIf cfg.enable {
|
||||||
|
my.hm = {
|
||||||
|
programs.starship = {
|
||||||
|
enable = true;
|
||||||
|
settings = lib.recursiveUpdate (with builtins; fromTOML (readFile ./starship-preset.toml)) {
|
||||||
|
add_newline = false;
|
||||||
|
command_timeout = 2000;
|
||||||
|
nix_shell.disabled = true;
|
||||||
|
format =
|
||||||
|
let
|
||||||
|
dedupDollar =
|
||||||
|
list:
|
||||||
|
let
|
||||||
|
result =
|
||||||
|
builtins.foldl'
|
||||||
|
(
|
||||||
|
acc: elem:
|
||||||
|
if lib.hasPrefix "$" elem then
|
||||||
|
if builtins.elem elem acc.seen then
|
||||||
|
acc
|
||||||
|
else
|
||||||
|
acc
|
||||||
|
// {
|
||||||
|
result = acc.result ++ [ elem ];
|
||||||
|
seen = acc.seen ++ [ elem ];
|
||||||
|
}
|
||||||
|
else
|
||||||
|
acc // { result = acc.result ++ [ elem ]; }
|
||||||
|
)
|
||||||
|
{
|
||||||
|
result = [ ];
|
||||||
|
seen = [ ];
|
||||||
|
}
|
||||||
|
(lib.reverseList list);
|
||||||
|
in
|
||||||
|
lib.reverseList result.result;
|
||||||
|
in
|
||||||
|
"$all" + lib.concatStrings (dedupDollar cfg.format);
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
})
|
||||||
|
];
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -4,16 +4,19 @@
|
|||||||
pkgs,
|
pkgs,
|
||||||
...
|
...
|
||||||
}:
|
}:
|
||||||
lib.my.makeSwitch {
|
let
|
||||||
inherit config;
|
cfg = config.my.cli.shell.zsh;
|
||||||
default = true;
|
in
|
||||||
optionName = "default zsh settings";
|
{
|
||||||
optionPath = [
|
options.my.cli.shell.zsh = {
|
||||||
"cli"
|
enable = lib.mkOption {
|
||||||
"shell"
|
type = lib.types.bool;
|
||||||
"zsh"
|
default = true;
|
||||||
];
|
description = "Enable default zsh settings";
|
||||||
config' = {
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
config = lib.mkIf cfg.enable {
|
||||||
my.hm = {
|
my.hm = {
|
||||||
home.packages = with pkgs; [
|
home.packages = with pkgs; [
|
||||||
fzf
|
fzf
|
||||||
@@ -47,11 +50,9 @@ lib.my.makeSwitch {
|
|||||||
];
|
];
|
||||||
};
|
};
|
||||||
shellAliases = {
|
shellAliases = {
|
||||||
x = "extract";
|
|
||||||
ls = "lsd";
|
ls = "lsd";
|
||||||
svim = "doasedit";
|
svim = "doasedit";
|
||||||
nf = "fastfetch";
|
nf = "fastfetch";
|
||||||
tmux = "tmux -T RGB,focus,overline,mouse,clipboard,usstyle";
|
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|||||||
43
modules/cli/shpool.nix
Normal file
43
modules/cli/shpool.nix
Normal file
@@ -0,0 +1,43 @@
|
|||||||
|
{
|
||||||
|
config,
|
||||||
|
lib,
|
||||||
|
...
|
||||||
|
}:
|
||||||
|
let
|
||||||
|
cfg = config.my.cli.shpool;
|
||||||
|
in
|
||||||
|
{
|
||||||
|
options.my.cli.shpool = {
|
||||||
|
enable = lib.mkEnableOption "shpool";
|
||||||
|
};
|
||||||
|
|
||||||
|
config = lib.mkIf cfg.enable {
|
||||||
|
my.hm = {
|
||||||
|
services.shpool = {
|
||||||
|
enable = true;
|
||||||
|
systemd = true;
|
||||||
|
settings = {
|
||||||
|
motd = "never";
|
||||||
|
prompt_prefix = "";
|
||||||
|
forward_env = [ "PATH" ];
|
||||||
|
};
|
||||||
|
};
|
||||||
|
programs.starship = {
|
||||||
|
settings = {
|
||||||
|
custom.shpool = {
|
||||||
|
description = "Display current shpool session name";
|
||||||
|
when = ''test -n "$SHPOOL_SESSION_NAME"'';
|
||||||
|
command = "echo $SHPOOL_SESSION_NAME";
|
||||||
|
symbol = " ";
|
||||||
|
style = "fg:#dea584";
|
||||||
|
format = "[$symbol \\[$output\\] ]($style)";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
my.cli.shell.starship.format = [
|
||||||
|
"\${custom.shpool}"
|
||||||
|
"$character"
|
||||||
|
];
|
||||||
|
};
|
||||||
|
}
|
||||||
55
modules/cli/tmux.nix
Normal file
55
modules/cli/tmux.nix
Normal file
@@ -0,0 +1,55 @@
|
|||||||
|
{
|
||||||
|
config,
|
||||||
|
lib,
|
||||||
|
pkgs,
|
||||||
|
...
|
||||||
|
}:
|
||||||
|
let
|
||||||
|
cfg = config.my.cli.tmux;
|
||||||
|
in
|
||||||
|
{
|
||||||
|
options.my.cli.tmux = {
|
||||||
|
enable = lib.mkEnableOption "tmux";
|
||||||
|
};
|
||||||
|
|
||||||
|
config = lib.mkIf cfg.enable {
|
||||||
|
my.hm = {
|
||||||
|
programs.tmux = {
|
||||||
|
enable = true;
|
||||||
|
extraConfig = ''
|
||||||
|
set-option -g mouse on
|
||||||
|
set-option -a terminal-features ",xterm-256color:RGB,focus,clipboard,usstyle"
|
||||||
|
'';
|
||||||
|
plugins = [
|
||||||
|
(pkgs.tmuxPlugins.mkTmuxPlugin {
|
||||||
|
pluginName = "tokyo-night-tmux";
|
||||||
|
rtpFilePath = "tokyo-night.tmux";
|
||||||
|
version = "legacy";
|
||||||
|
src = pkgs.fetchFromGitHub {
|
||||||
|
owner = "janoamaral";
|
||||||
|
repo = "tokyo-night-tmux";
|
||||||
|
rev = "16469dfad86846138f594ceec780db27039c06cd";
|
||||||
|
hash = "sha256-EKCgYan0WayXnkSb2fDJxookdBLW0XBKi2hf/YISwJE=";
|
||||||
|
};
|
||||||
|
})
|
||||||
|
];
|
||||||
|
};
|
||||||
|
programs.starship = {
|
||||||
|
settings = {
|
||||||
|
custom.tmux = {
|
||||||
|
description = "Display current tmux session name";
|
||||||
|
when = ''test -n "$TMUX"'';
|
||||||
|
command = "tmux display-message -p '#S'";
|
||||||
|
symbol = " ";
|
||||||
|
style = "bold green";
|
||||||
|
format = "[$symbol \\[$output\\] ]($style)";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
my.cli.shell.starship.format = [
|
||||||
|
"\${custom.tmux}"
|
||||||
|
"$character"
|
||||||
|
];
|
||||||
|
};
|
||||||
|
}
|
||||||
@@ -1,13 +1,13 @@
|
|||||||
{ config, lib, ... }:
|
{ config, lib, ... }:
|
||||||
lib.my.makeSwitch {
|
let
|
||||||
inherit config;
|
cfg = config.my.cli.vcs.all;
|
||||||
optionName = "all command line tools";
|
in
|
||||||
optionPath = [
|
{
|
||||||
"cli"
|
options.my.cli.vcs.all = {
|
||||||
"vcs"
|
enable = lib.mkEnableOption "all command line tools";
|
||||||
"all"
|
};
|
||||||
];
|
|
||||||
config' = {
|
config = lib.mkIf cfg.enable {
|
||||||
my.cli.vcs = {
|
my.cli.vcs = {
|
||||||
git.enable = true;
|
git.enable = true;
|
||||||
jj.enable = true;
|
jj.enable = true;
|
||||||
|
|||||||
@@ -4,30 +4,36 @@
|
|||||||
pkgs,
|
pkgs,
|
||||||
username,
|
username,
|
||||||
userfullname,
|
userfullname,
|
||||||
useremail,
|
emails,
|
||||||
|
hosts,
|
||||||
...
|
...
|
||||||
}:
|
}:
|
||||||
lib.my.makeHomeProgramConfig {
|
let
|
||||||
inherit config;
|
cfg = config.my.cli.vcs.git;
|
||||||
programName = "git";
|
in
|
||||||
optionPath = [
|
{
|
||||||
"cli"
|
options.my.cli.vcs.git = {
|
||||||
"vcs"
|
enable = lib.mkEnableOption "git";
|
||||||
"git"
|
};
|
||||||
];
|
|
||||||
extraConfig = {
|
config = lib.mkIf cfg.enable {
|
||||||
my.hm = {
|
my.hm = {
|
||||||
programs.git = {
|
programs.git = {
|
||||||
|
enable = true;
|
||||||
settings = {
|
settings = {
|
||||||
gpg.ssh.allowedSignersFile =
|
gpg.ssh.allowedSignersFile =
|
||||||
(pkgs.writeText "allowed_signers" ''
|
hosts
|
||||||
imxyy1soope1@gmail.com ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIOEFLUkyeaK8ZPPZdVNEmtx8zvoxi7xqS2Z6oxRBuUPO imxyy@imxyy-nix
|
|> lib.mapAttrsToList (
|
||||||
imxyy@imxyy.top ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIOEFLUkyeaK8ZPPZdVNEmtx8zvoxi7xqS2Z6oxRBuUPO imxyy@imxyy-nix
|
host: key: map (email: "${email} ${key} ${host}") (builtins.attrValues emails)
|
||||||
'').outPath;
|
)
|
||||||
|
|> lib.flatten
|
||||||
|
|> lib.concatStringsSep "\n"
|
||||||
|
|> pkgs.writeText "allowed-signers"
|
||||||
|
|> toString;
|
||||||
push.autoSetupRemote = true;
|
push.autoSetupRemote = true;
|
||||||
user = {
|
user = {
|
||||||
name = userfullname;
|
name = userfullname;
|
||||||
email = useremail;
|
email = emails.default;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
signing = {
|
signing = {
|
||||||
|
|||||||
@@ -4,24 +4,36 @@
|
|||||||
pkgs,
|
pkgs,
|
||||||
username,
|
username,
|
||||||
userfullname,
|
userfullname,
|
||||||
useremail,
|
emails,
|
||||||
|
hosts,
|
||||||
...
|
...
|
||||||
}:
|
}:
|
||||||
lib.my.makeHomeProgramConfig {
|
let
|
||||||
inherit config;
|
cfg = config.my.cli.vcs.jj;
|
||||||
programName = "jujutsu";
|
in
|
||||||
optionPath = [
|
{
|
||||||
"cli"
|
options.my.cli.vcs.jj = {
|
||||||
"vcs"
|
enable = lib.mkEnableOption "jujutsu";
|
||||||
"jj"
|
};
|
||||||
];
|
|
||||||
extraConfig = {
|
config = lib.mkIf cfg.enable {
|
||||||
my.hm = {
|
my.hm = {
|
||||||
programs.jujutsu = {
|
programs.jujutsu = {
|
||||||
|
enable = true;
|
||||||
settings = {
|
settings = {
|
||||||
|
# take the closest ancestor bookmark and move them the current change.
|
||||||
|
# https://shaddy.dev/notes/jj-tug
|
||||||
|
aliases.tug = [
|
||||||
|
"bookmark"
|
||||||
|
"move"
|
||||||
|
"--from"
|
||||||
|
"heads(::@- & bookmarks())"
|
||||||
|
"--to"
|
||||||
|
"@-"
|
||||||
|
];
|
||||||
user = {
|
user = {
|
||||||
name = "${userfullname}";
|
name = userfullname;
|
||||||
email = "${useremail}";
|
email = emails.default;
|
||||||
};
|
};
|
||||||
ui = {
|
ui = {
|
||||||
graph.style = "square";
|
graph.style = "square";
|
||||||
@@ -33,17 +45,22 @@ lib.my.makeHomeProgramConfig {
|
|||||||
behavior = "own";
|
behavior = "own";
|
||||||
key = "/home/${username}/.ssh/id_ed25519";
|
key = "/home/${username}/.ssh/id_ed25519";
|
||||||
backends.backends.ssh.allowed-signers =
|
backends.backends.ssh.allowed-signers =
|
||||||
(pkgs.writeText "allowed_signers" ''
|
hosts
|
||||||
imxyy1soope1@gmail.com ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIOEFLUkyeaK8ZPPZdVNEmtx8zvoxi7xqS2Z6oxRBuUPO imxyy@imxyy-nix
|
|> lib.mapAttrsToList (
|
||||||
imxyy@imxyy.top ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIOEFLUkyeaK8ZPPZdVNEmtx8zvoxi7xqS2Z6oxRBuUPO imxyy@imxyy-nix
|
host: key: map (email: "${email} ${key} ${host}") (builtins.attrValues emails)
|
||||||
'').outPath;
|
)
|
||||||
|
|> lib.flatten
|
||||||
|
|> lib.concatStringsSep "\n"
|
||||||
|
|> pkgs.writeText "allowed-signers"
|
||||||
|
|> toString;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
home.packages = [ pkgs.lazyjj ];
|
programs.jjui.enable = true;
|
||||||
programs.starship = {
|
programs.starship = {
|
||||||
settings = {
|
settings = {
|
||||||
custom = {
|
custom = {
|
||||||
|
# Borrowed from https://github.com/jj-vcs/jj/wiki/Starship/b18afc53417848f58333b24d446b8e2522b42bd2#alternative-prompt
|
||||||
jj = {
|
jj = {
|
||||||
ignore_timeout = true;
|
ignore_timeout = true;
|
||||||
description = "The current jj status";
|
description = "The current jj status";
|
||||||
|
|||||||
@@ -1,12 +1,13 @@
|
|||||||
{ config, lib, ... }:
|
{ config, lib, ... }:
|
||||||
lib.my.makeSwitch {
|
let
|
||||||
inherit config;
|
cfg = config.my.coding.all;
|
||||||
optionName = "all coding tools";
|
in
|
||||||
optionPath = [
|
{
|
||||||
"coding"
|
options.my.coding.all = {
|
||||||
"all"
|
enable = lib.mkEnableOption "all coding tools";
|
||||||
];
|
};
|
||||||
config' = {
|
|
||||||
|
config = lib.mkIf cfg.enable {
|
||||||
my.coding = {
|
my.coding = {
|
||||||
editor.all.enable = true;
|
editor.all.enable = true;
|
||||||
langs.all.enable = true;
|
langs.all.enable = true;
|
||||||
|
|||||||
@@ -1,13 +1,13 @@
|
|||||||
{ config, lib, ... }:
|
{ config, lib, ... }:
|
||||||
lib.my.makeSwitch {
|
let
|
||||||
inherit config;
|
cfg = config.my.coding.editor.all;
|
||||||
optionName = "all coding editors";
|
in
|
||||||
optionPath = [
|
{
|
||||||
"coding"
|
options.my.coding.editor.all = {
|
||||||
"editor"
|
enable = lib.mkEnableOption "all coding editors";
|
||||||
"all"
|
};
|
||||||
];
|
|
||||||
config' = {
|
config = lib.mkIf cfg.enable {
|
||||||
my.coding.editor = {
|
my.coding.editor = {
|
||||||
neovim.enable = true;
|
neovim.enable = true;
|
||||||
vscode.enable = true;
|
vscode.enable = true;
|
||||||
|
|||||||
@@ -2,23 +2,20 @@
|
|||||||
config,
|
config,
|
||||||
lib,
|
lib,
|
||||||
pkgs,
|
pkgs,
|
||||||
|
impure,
|
||||||
...
|
...
|
||||||
}:
|
}:
|
||||||
lib.my.makeHomeProgramConfig {
|
let
|
||||||
inherit config;
|
cfg = config.my.coding.editor.neovim;
|
||||||
programName = "neovim";
|
in
|
||||||
optionPath = [
|
{
|
||||||
"coding"
|
options.my.coding.editor.neovim = {
|
||||||
"editor"
|
enable = lib.mkEnableOption "neovim";
|
||||||
"neovim"
|
};
|
||||||
];
|
|
||||||
extraConfig = {
|
config = lib.mkIf cfg.enable {
|
||||||
my.hm = {
|
my.hm = {
|
||||||
xdg.configFile."nvim/init.lua".source = ./nvim/init.lua;
|
xdg.configFile."nvim".source = impure.mkImpureLink ./nvim;
|
||||||
xdg.configFile."nvim/lua" = {
|
|
||||||
source = ./nvim/lua;
|
|
||||||
recursive = true;
|
|
||||||
};
|
|
||||||
programs.neovim = {
|
programs.neovim = {
|
||||||
enable = true;
|
enable = true;
|
||||||
defaultEditor = true;
|
defaultEditor = true;
|
||||||
@@ -29,6 +26,11 @@ lib.my.makeHomeProgramConfig {
|
|||||||
gcc # treesitter
|
gcc # treesitter
|
||||||
|
|
||||||
ripgrep # telescope
|
ripgrep # telescope
|
||||||
|
|
||||||
|
vscode-json-languageserver
|
||||||
|
vscode-langservers-extracted
|
||||||
|
taplo
|
||||||
|
typos-lsp
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|||||||
44
modules/coding/editor/neovim/nvim/lazy-lock.json
Normal file
44
modules/coding/editor/neovim/nvim/lazy-lock.json
Normal file
@@ -0,0 +1,44 @@
|
|||||||
|
{
|
||||||
|
"Comment.nvim": { "branch": "master", "commit": "e30b7f2008e52442154b66f7c519bfd2f1e32acb" },
|
||||||
|
"LuaSnip": { "branch": "master", "commit": "de10d8414235b0a8cabfeba60d07c24304e71f5c" },
|
||||||
|
"blink.cmp": { "branch": "main", "commit": "f9e855c4d96e1264f7c818844f5a0166ad48c212" },
|
||||||
|
"bufferline.nvim": { "branch": "main", "commit": "655133c3b4c3e5e05ec549b9f8cc2894ac6f51b3" },
|
||||||
|
"friendly-snippets": { "branch": "main", "commit": "572f5660cf05f8cd8834e096d7b4c921ba18e175" },
|
||||||
|
"gitsigns.nvim": { "branch": "main", "commit": "c7d37ca22b461f64e26f8f6701b2586128ed0bef" },
|
||||||
|
"glance.nvim": { "branch": "master", "commit": "bf86d8b79dce808e65fdb6e9269d0b4ed6d2eefc" },
|
||||||
|
"guess-indent.nvim": { "branch": "main", "commit": "84a4987ff36798c2fc1169cbaff67960aed9776f" },
|
||||||
|
"indent-blankline.nvim": { "branch": "master", "commit": "005b56001b2cb30bfa61b7986bc50657816ba4ba" },
|
||||||
|
"inlay-hints.nvim": { "branch": "master", "commit": "990e1f96699b8293b6665b9e73b16128c66684e6" },
|
||||||
|
"lazy.nvim": { "branch": "main", "commit": "6c3bda4aca61a13a9c63f1c1d1b16b9d3be90d7a" },
|
||||||
|
"lazydev.nvim": { "branch": "main", "commit": "5231c62aa83c2f8dc8e7ba957aa77098cda1257d" },
|
||||||
|
"leap.nvim": { "branch": "main", "commit": "02bf52e49c72cc5dabb53ec9494d10d304f0b2c9" },
|
||||||
|
"lspkind.nvim": { "branch": "master", "commit": "d79a1c3299ad0ef94e255d045bed9fa26025dab6" },
|
||||||
|
"lualine.nvim": { "branch": "master", "commit": "a94fc68960665e54408fe37dcf573193c4ce82c9" },
|
||||||
|
"mini.nvim": { "branch": "main", "commit": "8c40d95931cbe6138391af9180e59439ed2e69df" },
|
||||||
|
"neo-tree.nvim": { "branch": "main", "commit": "f3df514fff2bdd4318127c40470984137f87b62e" },
|
||||||
|
"noice.nvim": { "branch": "main", "commit": "0427460c2d7f673ad60eb02b35f5e9926cf67c59" },
|
||||||
|
"nui.nvim": { "branch": "main", "commit": "de740991c12411b663994b2860f1a4fd0937c130" },
|
||||||
|
"nvim-autopairs": { "branch": "master", "commit": "23320e75953ac82e559c610bec5a90d9c6dfa743" },
|
||||||
|
"nvim-colorizer.lua": { "branch": "master", "commit": "a065833f35a3a7cc3ef137ac88b5381da2ba302e" },
|
||||||
|
"nvim-lspconfig": { "branch": "master", "commit": "276ce3bc878243dc63c32b75790c4296d11848f6" },
|
||||||
|
"nvim-notify": { "branch": "master", "commit": "397c7c1184745fca649e5104de659e6392ef5a4d" },
|
||||||
|
"nvim-osc52": { "branch": "main", "commit": "04cfaba1865ae5c53b6f887c3ca7304973824fb2" },
|
||||||
|
"nvim-tmux-navigation": { "branch": "main", "commit": "4898c98702954439233fdaf764c39636681e2861" },
|
||||||
|
"nvim-treesitter": { "branch": "master", "commit": "42fc28ba918343ebfd5565147a42a26580579482" },
|
||||||
|
"nvim-treesitter-textobjects": { "branch": "master", "commit": "71385f191ec06ffc60e80e6b0c9a9d5daed4824c" },
|
||||||
|
"nvim-web-devicons": { "branch": "master", "commit": "3362099de3368aa620a8105b19ed04c2053e38c0" },
|
||||||
|
"outline.nvim": { "branch": "main", "commit": "0eb9289ab39c91caf8b3ed0e3a17764809d69558" },
|
||||||
|
"pest.vim": { "branch": "master", "commit": "7cfcb43f824e74d13dfe631359fff2ec23836a77" },
|
||||||
|
"plenary.nvim": { "branch": "master", "commit": "b9fd5226c2f76c951fc8ed5923d85e4de065e509" },
|
||||||
|
"rainbow-delimiters.nvim": { "branch": "master", "commit": "97bf4b8ef9298644a29fcd9dd41a0210cf08cac7" },
|
||||||
|
"render-markdown.nvim": { "branch": "main", "commit": "3da7bb459f6cff03980dd1e106c46f3e62ff4d9f" },
|
||||||
|
"ripgrep": { "branch": "master", "commit": "119a58a400ea948c2d2b0cd4ec58361e74478641" },
|
||||||
|
"telescope.nvim": { "branch": "master", "commit": "b4da76be54691e854d3e0e02c36b0245f945c2c7" },
|
||||||
|
"todo-comments.nvim": { "branch": "main", "commit": "304a8d204ee787d2544d8bc23cd38d2f929e7cc5" },
|
||||||
|
"tokyonight.nvim": { "branch": "main", "commit": "057ef5d260c1931f1dffd0f052c685dcd14100a3" },
|
||||||
|
"tree-sitter-nu": { "branch": "main", "commit": "6544c4383643cf8608d50def2247a7af8314e148" },
|
||||||
|
"trouble.nvim": { "branch": "main", "commit": "85bedb7eb7fa331a2ccbecb9202d8abba64d37b3" },
|
||||||
|
"vim-floaterm": { "branch": "master", "commit": "fd4bdd66eca56c6cc59f2119e4447496d8cde2ea" },
|
||||||
|
"vim-repeat": { "branch": "master", "commit": "65846025c15494983dafe5e3b46c8f88ab2e9635" },
|
||||||
|
"workspace-diagnostics.nvim": { "branch": "main", "commit": "60f9175b2501ae3f8b1aba9719c0df8827610c8e" }
|
||||||
|
}
|
||||||
@@ -63,7 +63,7 @@ function G.buf_kill(kill_command, bufnr, force)
|
|||||||
else
|
else
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
elseif api.nvim_buf_get_option(bufnr, "buftype") == "terminal" then
|
elseif api.nvim_get_option_value("buftype", { buf = bufnr }) == "terminal" then
|
||||||
choice = fn.confirm(fmt([[Close "%s"?]], bufname), "&Yes\n&No\n&Cancel")
|
choice = fn.confirm(fmt([[Close "%s"?]], bufname), "&Yes\n&No\n&Cancel")
|
||||||
if choice == 1 then
|
if choice == 1 then
|
||||||
force = true
|
force = true
|
||||||
|
|||||||
@@ -37,7 +37,7 @@ vim.g.autoread = true
|
|||||||
|
|
||||||
vim.g.loaded_ruby_provider = 0
|
vim.g.loaded_ruby_provider = 0
|
||||||
|
|
||||||
-- Hightlight on yank
|
-- Highlight on yank
|
||||||
local highlight_group = vim.api.nvim_create_augroup("YankHighlight", { clear = true })
|
local highlight_group = vim.api.nvim_create_augroup("YankHighlight", { clear = true })
|
||||||
vim.api.nvim_create_autocmd("TextYankPost", {
|
vim.api.nvim_create_autocmd("TextYankPost", {
|
||||||
callback = function()
|
callback = function()
|
||||||
@@ -55,12 +55,12 @@ vim.cmd([[
|
|||||||
\ endif
|
\ endif
|
||||||
]])
|
]])
|
||||||
|
|
||||||
-- Automaticly switch input method
|
-- Automatically switch input method
|
||||||
Last_input_method = 1
|
Last_input_method = 1
|
||||||
vim.api.nvim_create_augroup("AutoInputMethod", {})
|
vim.api.nvim_create_augroup("AutoInputMethod", {})
|
||||||
vim.api.nvim_create_autocmd("InsertLeave", {
|
vim.api.nvim_create_autocmd("InsertLeave", {
|
||||||
pattern = "*",
|
pattern = "*",
|
||||||
desc = "Automaticly switch input method",
|
desc = "Automatically switch input method",
|
||||||
callback = function()
|
callback = function()
|
||||||
Last_input_method = require("core.globals").switch_input_method(1)
|
Last_input_method = require("core.globals").switch_input_method(1)
|
||||||
end,
|
end,
|
||||||
@@ -68,7 +68,7 @@ vim.api.nvim_create_autocmd("InsertLeave", {
|
|||||||
})
|
})
|
||||||
vim.api.nvim_create_autocmd("CmdlineLeave", {
|
vim.api.nvim_create_autocmd("CmdlineLeave", {
|
||||||
pattern = "*",
|
pattern = "*",
|
||||||
desc = "Automaticly switch input method",
|
desc = "Automatically switch input method",
|
||||||
callback = function()
|
callback = function()
|
||||||
require("core.globals").switch_input_method(1)
|
require("core.globals").switch_input_method(1)
|
||||||
end,
|
end,
|
||||||
@@ -76,7 +76,7 @@ vim.api.nvim_create_autocmd("CmdlineLeave", {
|
|||||||
})
|
})
|
||||||
vim.api.nvim_create_autocmd("InsertEnter", {
|
vim.api.nvim_create_autocmd("InsertEnter", {
|
||||||
pattern = "*",
|
pattern = "*",
|
||||||
desc = "Automaticly switch input method",
|
desc = "Automatically switch input method",
|
||||||
callback = function()
|
callback = function()
|
||||||
require("core.globals").switch_input_method(Last_input_method)
|
require("core.globals").switch_input_method(Last_input_method)
|
||||||
end,
|
end,
|
||||||
|
|||||||
@@ -1,25 +0,0 @@
|
|||||||
M = {
|
|
||||||
check_ts = true,
|
|
||||||
ts_config = {
|
|
||||||
lua = { "string", "source" },
|
|
||||||
javascript = { "string", "template_string" },
|
|
||||||
},
|
|
||||||
fast_wrap = {
|
|
||||||
map = "<M-e>",
|
|
||||||
chars = { "{", "[", "(", '"', "'" },
|
|
||||||
pattern = [=[[%'%"%)%>%]%)%}%,]]=],
|
|
||||||
end_key = "$",
|
|
||||||
keys = "qwertyuiopzxcvbnmasdfghjkl",
|
|
||||||
check_comma = true,
|
|
||||||
highlight = "Search",
|
|
||||||
highlight_grey = "Comment",
|
|
||||||
},
|
|
||||||
}
|
|
||||||
|
|
||||||
local cmp_autopairs = require("nvim-autopairs.completion.cmp")
|
|
||||||
local ok, cmp = pcall(require, "cmp")
|
|
||||||
if ok then
|
|
||||||
cmp.event:on("confirm_done", cmp_autopairs.on_confirm_done({ map_char = { tex = "" } }))
|
|
||||||
end
|
|
||||||
|
|
||||||
return M
|
|
||||||
@@ -1,5 +1,6 @@
|
|||||||
local buf_kill = require("core.globals").buf_kill
|
local buf_kill = require("core.globals").buf_kill
|
||||||
|
|
||||||
|
--- @type bufferline.UserConfig
|
||||||
M = {
|
M = {
|
||||||
highlights = {
|
highlights = {
|
||||||
buffer_selected = {
|
buffer_selected = {
|
||||||
@@ -10,7 +11,7 @@ M = {
|
|||||||
diagnostics = "nvim_lsp",
|
diagnostics = "nvim_lsp",
|
||||||
offsets = {
|
offsets = {
|
||||||
{
|
{
|
||||||
filetype = "NvimTree",
|
filetype = "neo-tree",
|
||||||
text = "File Explorer",
|
text = "File Explorer",
|
||||||
highlight = "Directory",
|
highlight = "Directory",
|
||||||
text_align = "center",
|
text_align = "center",
|
||||||
|
|||||||
@@ -1,64 +1,32 @@
|
|||||||
local cmp = require("cmp")
|
--- @type blink.cmp.Config
|
||||||
|
|
||||||
M = {
|
M = {
|
||||||
window = {
|
keymap = {
|
||||||
completion = {
|
-- <Tab> to accept
|
||||||
border = "rounded",
|
preset = "super-tab",
|
||||||
scrollbar = "║",
|
},
|
||||||
},
|
appearance = {
|
||||||
documentation = {
|
nerd_font_variant = "mono",
|
||||||
border = "rounded",
|
},
|
||||||
scrollbar = "║",
|
completion = {
|
||||||
|
-- By default, you may press `<c-space>` to show the documentation.
|
||||||
|
-- Optionally, set `auto_show = true` to show the documentation after a delay.
|
||||||
|
documentation = { auto_show = true, auto_show_delay_ms = 1000 },
|
||||||
|
},
|
||||||
|
sources = {
|
||||||
|
default = { "lsp", "path", "snippets", "lazydev" },
|
||||||
|
providers = {
|
||||||
|
lazydev = { module = "lazydev.integrations.blink", score_offset = 100 },
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
formatting = {
|
snippets = { preset = "luasnip" },
|
||||||
format = require("lspkind").cmp_format({
|
|
||||||
mode = "symbol",
|
-- See :h blink-cmp-config-fuzzy for more information
|
||||||
maxwidth = 50,
|
fuzzy = {
|
||||||
ellipsis_char = "...",
|
implementation = "lua",
|
||||||
}),
|
|
||||||
},
|
},
|
||||||
snippet = {
|
|
||||||
expand = function(args)
|
-- Shows a signature help window while you type arguments for a function
|
||||||
require("luasnip").lsp_expand(args.body)
|
signature = { enabled = true },
|
||||||
end,
|
|
||||||
},
|
|
||||||
mapping = cmp.mapping.preset.insert({
|
|
||||||
["<C-b>"] = cmp.mapping.scroll_docs(-4),
|
|
||||||
["<C-f>"] = cmp.mapping.scroll_docs(4),
|
|
||||||
["<Escape>"] = cmp.mapping.abort(),
|
|
||||||
["<Tab>"] = cmp.mapping.confirm({ select = true }),
|
|
||||||
["<Up>"] = cmp.mapping(function(fallback)
|
|
||||||
if cmp.visible() then
|
|
||||||
cmp.select_prev_item()
|
|
||||||
else
|
|
||||||
fallback()
|
|
||||||
end
|
|
||||||
end, {
|
|
||||||
"i",
|
|
||||||
"s",
|
|
||||||
}),
|
|
||||||
["<Down>"] = cmp.mapping(function(fallback)
|
|
||||||
if cmp.visible() then
|
|
||||||
cmp.select_next_item()
|
|
||||||
else
|
|
||||||
fallback()
|
|
||||||
end
|
|
||||||
end, {
|
|
||||||
"i",
|
|
||||||
"s",
|
|
||||||
}),
|
|
||||||
}),
|
|
||||||
sources = cmp.config.sources({
|
|
||||||
{ name = "nvim_lsp" },
|
|
||||||
{ name = "luasnip" },
|
|
||||||
{ name = "path" },
|
|
||||||
}, {
|
|
||||||
{ name = "buffer" },
|
|
||||||
}),
|
|
||||||
}
|
}
|
||||||
|
|
||||||
vim.o.wildmenu = true
|
|
||||||
vim.o.pumheight = 10
|
|
||||||
|
|
||||||
return M
|
return M
|
||||||
|
|||||||
@@ -1,3 +1,8 @@
|
|||||||
|
-- rainbow-delimiters integration
|
||||||
|
local hooks = require("ibl.hooks")
|
||||||
|
hooks.register(hooks.type.SCOPE_HIGHLIGHT, hooks.builtin.scope_highlight_from_extmark)
|
||||||
|
|
||||||
|
--- @type ibl.config
|
||||||
M = {
|
M = {
|
||||||
enabled = true,
|
enabled = true,
|
||||||
indent = {
|
indent = {
|
||||||
@@ -6,6 +11,7 @@ M = {
|
|||||||
scope = {
|
scope = {
|
||||||
enabled = true,
|
enabled = true,
|
||||||
show_start = false,
|
show_start = false,
|
||||||
|
highlight = vim.g.rainbow_delimiters.highlight,
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1,3 +0,0 @@
|
|||||||
M = {}
|
|
||||||
|
|
||||||
return M
|
|
||||||
@@ -34,6 +34,9 @@ local servers = {
|
|||||||
},
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
on_attach = function(client, bufnr)
|
||||||
|
require("inlay-hints").on_attach(client, bufnr)
|
||||||
|
end,
|
||||||
},
|
},
|
||||||
nixd = {
|
nixd = {
|
||||||
settings = {
|
settings = {
|
||||||
@@ -42,7 +45,21 @@ local servers = {
|
|||||||
command = { "nixfmt" },
|
command = { "nixfmt" },
|
||||||
},
|
},
|
||||||
nixpkgs = {
|
nixpkgs = {
|
||||||
expr = "import <nixpkgs> { }",
|
-- language=nix
|
||||||
|
expr = [[
|
||||||
|
if builtins.pathExists ./flake.lock then
|
||||||
|
let
|
||||||
|
lock = builtins.fromJSON (builtins.readFile ./flake.lock);
|
||||||
|
node = lock.nodes.root.inputs.nixpkgs;
|
||||||
|
nodeName = if builtins.isList node then builtins.elemAt node 0 else node;
|
||||||
|
in
|
||||||
|
import (fetchTarball {
|
||||||
|
url = lock.nodes.${nodeName}.locked.url or "https://github.com/NixOS/nixpkgs/archive/${lock.nodes.${nodeName}.locked.rev}.tar.gz";
|
||||||
|
sha256 = lock.nodes.${nodeName}.locked.narHash;
|
||||||
|
}) { }
|
||||||
|
else
|
||||||
|
import <nixpkgs> { }
|
||||||
|
]],
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
@@ -54,22 +71,31 @@ local servers = {
|
|||||||
qmlls = {
|
qmlls = {
|
||||||
cmd = { "qmlls", "-E" },
|
cmd = { "qmlls", "-E" },
|
||||||
},
|
},
|
||||||
pyright = {},
|
-- keep-sorted start
|
||||||
gopls = {},
|
biome = {},
|
||||||
clangd = {},
|
clangd = {},
|
||||||
ts_ls = {},
|
|
||||||
jsonls = {},
|
|
||||||
cssls = {},
|
cssls = {},
|
||||||
|
eslint = {},
|
||||||
|
gopls = {},
|
||||||
html = {},
|
html = {},
|
||||||
java_language_server = {},
|
java_language_server = {},
|
||||||
|
jsonls = {},
|
||||||
|
pyright = {},
|
||||||
|
taplo = {},
|
||||||
|
ts_ls = {},
|
||||||
|
typos_lsp = {},
|
||||||
|
-- keep-sorted end
|
||||||
}
|
}
|
||||||
|
|
||||||
local capabilities = require("cmp_nvim_lsp").default_capabilities()
|
local capabilities = {
|
||||||
capabilities = vim.lsp.protocol.make_client_capabilities()
|
textDocument = {
|
||||||
capabilities.textDocument.foldingRange = {
|
foldingRange = {
|
||||||
dynamicRegistration = false,
|
dynamicRegistration = false,
|
||||||
lineFoldingOnly = true,
|
lineFoldingOnly = true,
|
||||||
|
},
|
||||||
|
},
|
||||||
}
|
}
|
||||||
|
capabilities = require("blink.cmp").get_lsp_capabilities(capabilities)
|
||||||
for server, config in pairs(servers) do
|
for server, config in pairs(servers) do
|
||||||
config["capabilities"] = capabilities
|
config["capabilities"] = capabilities
|
||||||
vim.lsp.config(server, config)
|
vim.lsp.config(server, config)
|
||||||
|
|||||||
@@ -25,10 +25,6 @@ vim.diagnostic.config({
|
|||||||
severity_sort = true,
|
severity_sort = true,
|
||||||
})
|
})
|
||||||
|
|
||||||
vim.lsp.handlers["textDocument/hover"] = vim.lsp.with(vim.lsp.handlers.hover, {
|
|
||||||
border = "single",
|
|
||||||
})
|
|
||||||
|
|
||||||
local diag_config1 = {
|
local diag_config1 = {
|
||||||
virtual_text = {
|
virtual_text = {
|
||||||
severity = {
|
severity = {
|
||||||
|
|||||||
@@ -1,19 +0,0 @@
|
|||||||
M = {
|
|
||||||
bind = true, -- This is mandatory, otherwise border config won't get registered.
|
|
||||||
handler_opts = {
|
|
||||||
border = "rounded",
|
|
||||||
},
|
|
||||||
hint_prefix = "^ ",
|
|
||||||
toggle_key = "<C-k>",
|
|
||||||
}
|
|
||||||
|
|
||||||
vim.keymap.set(
|
|
||||||
{ "n" },
|
|
||||||
"<leader>k",
|
|
||||||
require("lsp_signature").toggle_float_win,
|
|
||||||
{ silent = true, noremap = true, desc = "toggle signature" }
|
|
||||||
)
|
|
||||||
|
|
||||||
vim.keymap.set({ "n" }, "K", vim.lsp.buf.signature_help, { silent = true, noremap = true, desc = "toggle signature" })
|
|
||||||
|
|
||||||
return M
|
|
||||||
@@ -1,32 +0,0 @@
|
|||||||
M = {
|
|
||||||
sync_root_with_cwd = true,
|
|
||||||
diagnostics = {
|
|
||||||
enable = false,
|
|
||||||
debounce_delay = 50,
|
|
||||||
show_on_dirs = true,
|
|
||||||
},
|
|
||||||
filters = {
|
|
||||||
git_ignored = false,
|
|
||||||
},
|
|
||||||
}
|
|
||||||
|
|
||||||
vim.g.loaded_netrw = 1
|
|
||||||
vim.g.loaded_netrwPlugin = 1
|
|
||||||
|
|
||||||
local opt = require("core.globals").keymap_opt
|
|
||||||
vim.keymap.set("n", "<leader>e", ":NvimTreeToggle<CR>", opt)
|
|
||||||
vim.keymap.set("n", "<leader>te", ":NvimTreeFocus<CR>", opt)
|
|
||||||
|
|
||||||
vim.api.nvim_create_autocmd("BufEnter", {
|
|
||||||
group = vim.api.nvim_create_augroup("NvimTreeCloseOnLast", { clear = true }),
|
|
||||||
pattern = "NvimTree*",
|
|
||||||
callback = function()
|
|
||||||
if vim.api.nvim_call_function("winlayout", {})[1] == "leaf" and vim.bo.filetype == "NvimTree" then
|
|
||||||
vim.defer_fn(function()
|
|
||||||
vim.cmd("NvimTreeClose")
|
|
||||||
end, 10)
|
|
||||||
end
|
|
||||||
end,
|
|
||||||
})
|
|
||||||
|
|
||||||
return M
|
|
||||||
@@ -14,7 +14,6 @@ package.path = package.path .. ";" .. vim.fn.stdpath("config") .. "/lua/"
|
|||||||
local plugins = {
|
local plugins = {
|
||||||
{
|
{
|
||||||
"folke/tokyonight.nvim",
|
"folke/tokyonight.nvim",
|
||||||
lazy = false,
|
|
||||||
priority = 1000,
|
priority = 1000,
|
||||||
config = function()
|
config = function()
|
||||||
vim.cmd.colorscheme("tokyonight-storm")
|
vim.cmd.colorscheme("tokyonight-storm")
|
||||||
@@ -22,23 +21,66 @@ local plugins = {
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"nvim-lualine/lualine.nvim",
|
"nvim-lualine/lualine.nvim",
|
||||||
lazy = false,
|
|
||||||
dependencies = { { "nvim-tree/nvim-web-devicons", lazy = true } },
|
dependencies = { { "nvim-tree/nvim-web-devicons", lazy = true } },
|
||||||
config = function()
|
config = function()
|
||||||
require("lualine").setup(require("plugins.lualine"))
|
require("lualine").setup(require("plugins.lualine"))
|
||||||
end,
|
end,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"nvim-tree/nvim-tree.lua",
|
"echasnovski/mini.nvim",
|
||||||
dependencies = { { "nvim-tree/nvim-web-devicons", lazy = true } },
|
|
||||||
lazy = false,
|
|
||||||
config = function()
|
config = function()
|
||||||
require("nvim-tree").setup(require("plugins.nvim-tree"))
|
-- Better Around/Inside textobjects
|
||||||
|
--
|
||||||
|
-- Examples:
|
||||||
|
-- - va) - [V]isually select [A]round [)]paren
|
||||||
|
-- - yinq - [Y]ank [I]nside [N]ext [Q]uote
|
||||||
|
-- - ci' - [C]hange [I]nside [']quote
|
||||||
|
require("mini.ai").setup({ n_lines = 500 })
|
||||||
|
|
||||||
|
-- Add/delete/replace surroundings (brackets, quotes, etc.)
|
||||||
|
--
|
||||||
|
-- - saiw) - [S]urround [A]dd [I]nner [W]ord [)]Paren
|
||||||
|
-- - sd' - [S]urround [D]elete [']quotes
|
||||||
|
-- - sr)' - [S]urround [R]eplace [)] [']
|
||||||
|
require("mini.surround").setup()
|
||||||
|
|
||||||
|
-- ... and there is more!
|
||||||
|
-- Check out: https://github.com/echasnovski/mini.nvim
|
||||||
end,
|
end,
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"nvim-neo-tree/neo-tree.nvim",
|
||||||
|
version = "*",
|
||||||
|
dependencies = {
|
||||||
|
"nvim-lua/plenary.nvim",
|
||||||
|
"nvim-tree/nvim-web-devicons",
|
||||||
|
"MunifTanjim/nui.nvim",
|
||||||
|
},
|
||||||
|
cmd = "Neotree",
|
||||||
|
keys = {
|
||||||
|
{ "\\", ":Neotree reveal toggle<CR>", desc = "Toggle NeoTree", silent = true },
|
||||||
|
{ "<leader>e", ":Neotree reveal toggle<CR>", desc = "Toggle NeoTree", silent = true },
|
||||||
|
},
|
||||||
|
--- @type neotree.Config
|
||||||
|
opts = {
|
||||||
|
close_if_last_window = true,
|
||||||
|
filesystem = {
|
||||||
|
filtered_items = {
|
||||||
|
hide_dotfiles = false,
|
||||||
|
},
|
||||||
|
window = {
|
||||||
|
width = 30,
|
||||||
|
mappings = {
|
||||||
|
["\\"] = "close_window",
|
||||||
|
["<leader>e"] = "close_window",
|
||||||
|
["<c-]>"] = "set_root",
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"nvim-treesitter/nvim-treesitter",
|
"nvim-treesitter/nvim-treesitter",
|
||||||
lazy = false,
|
|
||||||
dependencies = {
|
dependencies = {
|
||||||
"nvim-treesitter/nvim-treesitter-textobjects",
|
"nvim-treesitter/nvim-treesitter-textobjects",
|
||||||
"nushell/tree-sitter-nu",
|
"nushell/tree-sitter-nu",
|
||||||
@@ -58,6 +100,7 @@ local plugins = {
|
|||||||
{
|
{
|
||||||
"lukas-reineke/indent-blankline.nvim",
|
"lukas-reineke/indent-blankline.nvim",
|
||||||
event = "VeryLazy",
|
event = "VeryLazy",
|
||||||
|
dependencies = { "https://gitlab.com/HiPhish/rainbow-delimiters.nvim" },
|
||||||
config = function()
|
config = function()
|
||||||
require("ibl").setup(require("plugins.indent-blankline"))
|
require("ibl").setup(require("plugins.indent-blankline"))
|
||||||
end,
|
end,
|
||||||
@@ -69,7 +112,7 @@ local plugins = {
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"neovim/nvim-lspconfig",
|
"neovim/nvim-lspconfig",
|
||||||
dependencies = { "hrsh7th/cmp-nvim-lsp" },
|
dependencies = { "saghen/blink.cmp" },
|
||||||
event = "VeryLazy",
|
event = "VeryLazy",
|
||||||
config = function()
|
config = function()
|
||||||
require("plugins.lsp.lspconfig")
|
require("plugins.lsp.lspconfig")
|
||||||
@@ -117,7 +160,10 @@ local plugins = {
|
|||||||
{
|
{
|
||||||
"MysticalDevil/inlay-hints.nvim",
|
"MysticalDevil/inlay-hints.nvim",
|
||||||
event = "LspAttach",
|
event = "LspAttach",
|
||||||
dependencies = { "neovim/nvim-lspconfig" },
|
dependencies = {
|
||||||
|
"neovim/nvim-lspconfig",
|
||||||
|
"onsails/lspkind.nvim",
|
||||||
|
},
|
||||||
opts = {},
|
opts = {},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@@ -128,27 +174,30 @@ local plugins = {
|
|||||||
end,
|
end,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"L3MON4D3/LuaSnip",
|
"saghen/blink.cmp",
|
||||||
event = "InsertEnter",
|
event = "VeryLazy",
|
||||||
dependencies = { { "rafamadriz/friendly-snippets", lazy = true } },
|
|
||||||
build = "make install_jsregexp",
|
|
||||||
config = function()
|
|
||||||
require("luasnip").setup(require("plugins.cmp.luasnip"))
|
|
||||||
end,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"hrsh7th/nvim-cmp",
|
|
||||||
dependencies = {
|
dependencies = {
|
||||||
"hrsh7th/cmp-nvim-lsp",
|
{
|
||||||
"L3MON4D3/LuaSnip",
|
"L3MON4D3/LuaSnip",
|
||||||
"saadparwaiz1/cmp_luasnip",
|
event = "InsertEnter",
|
||||||
"rafamadriz/friendly-snippets",
|
dependencies = { { "rafamadriz/friendly-snippets", lazy = true } },
|
||||||
"hrsh7th/cmp-path",
|
build = "make install_jsregexp",
|
||||||
"onsails/lspkind.nvim",
|
config = function()
|
||||||
|
require("luasnip").setup(require("plugins.cmp.luasnip"))
|
||||||
|
end,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"folke/lazydev.nvim",
|
||||||
|
ft = "lua",
|
||||||
|
opts = {
|
||||||
|
library = {
|
||||||
|
{ path = "${3rd}/luv/library", words = { "vim%.uv" } },
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
},
|
},
|
||||||
event = "InsertEnter",
|
|
||||||
config = function()
|
config = function()
|
||||||
require("cmp").setup(require("plugins.cmp.cmp"))
|
require("blink.cmp").setup(require("plugins.cmp.cmp"))
|
||||||
end,
|
end,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@@ -159,10 +208,7 @@ local plugins = {
|
|||||||
{
|
{
|
||||||
"windwp/nvim-autopairs",
|
"windwp/nvim-autopairs",
|
||||||
event = "InsertEnter",
|
event = "InsertEnter",
|
||||||
dependencies = { "hrsh7th/nvim-cmp" },
|
opts = {},
|
||||||
config = function()
|
|
||||||
require("nvim-autopairs").setup(require("plugins.autopairs"))
|
|
||||||
end,
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"akinsho/bufferline.nvim",
|
"akinsho/bufferline.nvim",
|
||||||
@@ -207,7 +253,7 @@ local plugins = {
|
|||||||
},
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"ggandor/leap.nvim",
|
"https://codeberg.org/andyg/leap.nvim",
|
||||||
dependencies = { "tpope/vim-repeat" },
|
dependencies = { "tpope/vim-repeat" },
|
||||||
config = function()
|
config = function()
|
||||||
vim.keymap.set({ "n", "x", "o" }, "s", "<Plug>(leap)")
|
vim.keymap.set({ "n", "x", "o" }, "s", "<Plug>(leap)")
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
local rainbow_delimiters = require("rainbow-delimiters")
|
local rainbow_delimiters = require("rainbow-delimiters")
|
||||||
|
--- @type rainbow_delimiters.config
|
||||||
vim.g.rainbow_delimiters = {
|
vim.g.rainbow_delimiters = {
|
||||||
strategy = {
|
strategy = {
|
||||||
[""] = rainbow_delimiters.strategy["global"],
|
[""] = rainbow_delimiters.strategy["global"],
|
||||||
|
|||||||
@@ -1,9 +1,11 @@
|
|||||||
|
--- @type TSConfig
|
||||||
M = {
|
M = {
|
||||||
auto_install = true,
|
auto_install = true,
|
||||||
parser_install_dir = "$HOME/.local/share/nvim/lazy/nvim-treesitter",
|
parser_install_dir = "$HOME/.local/share/nvim/lazy/nvim-treesitter",
|
||||||
sync_install = true,
|
sync_install = true,
|
||||||
modules = {},
|
modules = {},
|
||||||
ignore_install = {},
|
ignore_install = {},
|
||||||
|
ensure_installed = {},
|
||||||
|
|
||||||
highlight = { enable = true },
|
highlight = { enable = true },
|
||||||
indent = { enable = true },
|
indent = { enable = true },
|
||||||
|
|||||||
@@ -4,18 +4,19 @@
|
|||||||
pkgs,
|
pkgs,
|
||||||
...
|
...
|
||||||
}:
|
}:
|
||||||
lib.my.makeHomeProgramConfig {
|
let
|
||||||
inherit config;
|
cfg = config.my.coding.editor.vscode;
|
||||||
programName = "vscode";
|
in
|
||||||
optionPath = [
|
{
|
||||||
"coding"
|
options.my.coding.editor.vscode = {
|
||||||
"editor"
|
enable = lib.mkEnableOption "vscode";
|
||||||
"vscode"
|
};
|
||||||
];
|
|
||||||
extraConfig = {
|
config = lib.mkIf cfg.enable {
|
||||||
my.hm = {
|
my.hm = {
|
||||||
programs.vscode = {
|
programs.vscode = {
|
||||||
package = pkgs.vscodium;
|
enable = true;
|
||||||
|
package = pkgs.vscodium-wayland;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
my.persist.homeDirs = [
|
my.persist.homeDirs = [
|
||||||
|
|||||||
@@ -3,15 +3,16 @@
|
|||||||
lib,
|
lib,
|
||||||
...
|
...
|
||||||
}:
|
}:
|
||||||
lib.my.makeHomeProgramConfig {
|
let
|
||||||
inherit config;
|
cfg = config.my.coding.editor.zed;
|
||||||
programName = "zed-editor";
|
in
|
||||||
optionPath = [
|
{
|
||||||
"coding"
|
options.my.coding.editor.zed = {
|
||||||
"editor"
|
enable = lib.mkEnableOption "zed-editor";
|
||||||
"zed"
|
};
|
||||||
];
|
|
||||||
extraConfig = {
|
config = lib.mkIf cfg.enable {
|
||||||
|
my.hm.programs.zed-editor.enable = true;
|
||||||
my.persist.homeDirs = [
|
my.persist.homeDirs = [
|
||||||
".config/zed"
|
".config/zed"
|
||||||
".local/share/zed"
|
".local/share/zed"
|
||||||
|
|||||||
@@ -1,13 +1,13 @@
|
|||||||
{ config, lib, ... }:
|
{ config, lib, ... }:
|
||||||
lib.my.makeSwitch {
|
let
|
||||||
inherit config;
|
cfg = config.my.coding.langs.all;
|
||||||
optionName = "all coding langs";
|
in
|
||||||
optionPath = [
|
{
|
||||||
"coding"
|
options.my.coding.langs.all = {
|
||||||
"langs"
|
enable = lib.mkEnableOption "all coding langs";
|
||||||
"all"
|
};
|
||||||
];
|
|
||||||
config' = {
|
config = lib.mkIf cfg.enable {
|
||||||
my.coding.langs = {
|
my.coding.langs = {
|
||||||
c.enable = true;
|
c.enable = true;
|
||||||
go.enable = true;
|
go.enable = true;
|
||||||
|
|||||||
@@ -4,15 +4,15 @@
|
|||||||
pkgs,
|
pkgs,
|
||||||
...
|
...
|
||||||
}:
|
}:
|
||||||
lib.my.makeSwitch {
|
let
|
||||||
inherit config;
|
cfg = config.my.coding.langs.c;
|
||||||
optionName = "c";
|
in
|
||||||
optionPath = [
|
{
|
||||||
"coding"
|
options.my.coding.langs.c = {
|
||||||
"langs"
|
enable = lib.mkEnableOption "c";
|
||||||
"c"
|
};
|
||||||
];
|
|
||||||
config' = {
|
config = lib.mkIf cfg.enable {
|
||||||
my.hm.home.packages = with pkgs; [
|
my.hm.home.packages = with pkgs; [
|
||||||
gcc
|
gcc
|
||||||
(lib.hiPrio clang)
|
(lib.hiPrio clang)
|
||||||
|
|||||||
@@ -4,17 +4,17 @@
|
|||||||
pkgs,
|
pkgs,
|
||||||
...
|
...
|
||||||
}:
|
}:
|
||||||
lib.my.makeHomePackageConfig {
|
let
|
||||||
inherit config pkgs;
|
cfg = config.my.coding.langs.go;
|
||||||
packageName = "go";
|
in
|
||||||
packagePath = [ "go" ];
|
{
|
||||||
optionPath = [
|
options.my.coding.langs.go = {
|
||||||
"coding"
|
enable = lib.mkEnableOption "go";
|
||||||
"langs"
|
};
|
||||||
"go"
|
|
||||||
];
|
config = lib.mkIf cfg.enable {
|
||||||
extraConfig = {
|
|
||||||
my.hm.home.packages = with pkgs; [
|
my.hm.home.packages = with pkgs; [
|
||||||
|
go
|
||||||
gotools
|
gotools
|
||||||
gopls
|
gopls
|
||||||
];
|
];
|
||||||
|
|||||||
@@ -4,15 +4,15 @@
|
|||||||
pkgs,
|
pkgs,
|
||||||
...
|
...
|
||||||
}:
|
}:
|
||||||
lib.my.makeSwitch {
|
let
|
||||||
inherit config;
|
cfg = config.my.coding.langs.java;
|
||||||
optionName = "java";
|
in
|
||||||
optionPath = [
|
{
|
||||||
"coding"
|
options.my.coding.langs.java = {
|
||||||
"langs"
|
enable = lib.mkEnableOption "java";
|
||||||
"java"
|
};
|
||||||
];
|
|
||||||
config' = {
|
config = lib.mkIf cfg.enable {
|
||||||
my.hm.home.packages = with pkgs; [
|
my.hm.home.packages = with pkgs; [
|
||||||
openjdk25
|
openjdk25
|
||||||
java-language-server
|
java-language-server
|
||||||
|
|||||||
@@ -4,15 +4,15 @@
|
|||||||
pkgs,
|
pkgs,
|
||||||
...
|
...
|
||||||
}:
|
}:
|
||||||
lib.my.makeSwitch {
|
let
|
||||||
inherit config;
|
cfg = config.my.coding.langs.js;
|
||||||
optionName = "js";
|
in
|
||||||
optionPath = [
|
{
|
||||||
"coding"
|
options.my.coding.langs.js = {
|
||||||
"langs"
|
enable = lib.mkEnableOption "js";
|
||||||
"js"
|
};
|
||||||
];
|
|
||||||
config' = {
|
config = lib.mkIf cfg.enable {
|
||||||
my.hm = {
|
my.hm = {
|
||||||
home.packages = with pkgs; [
|
home.packages = with pkgs; [
|
||||||
nodejs
|
nodejs
|
||||||
@@ -21,13 +21,18 @@ lib.my.makeSwitch {
|
|||||||
|
|
||||||
nodePackages.typescript-language-server
|
nodePackages.typescript-language-server
|
||||||
vue-language-server
|
vue-language-server
|
||||||
|
|
||||||
|
biome
|
||||||
];
|
];
|
||||||
home.file.".npmrc".text = ''
|
home.file.".npmrc".text = ''
|
||||||
prefix = ''${HOME}/.npm-global
|
prefix = ''${HOME}/.npm-global
|
||||||
registry = https://registry.npmmirror.com
|
registry = https://registry.npmmirror.com
|
||||||
'';
|
'';
|
||||||
programs.zsh.initContent = lib.mkAfter ''
|
programs.zsh.initContent = lib.mkAfter ''
|
||||||
export PATH=$PATH:$HOME/.npm-global/bin
|
export PATH=$HOME/.npm-global/bin:$PATH
|
||||||
|
'';
|
||||||
|
programs.fish.interactiveShellInit = ''
|
||||||
|
set -gp PATH $HOME/.npm-global/bin
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
my.persist.homeDirs = [
|
my.persist.homeDirs = [
|
||||||
|
|||||||
@@ -4,15 +4,15 @@
|
|||||||
pkgs,
|
pkgs,
|
||||||
...
|
...
|
||||||
}:
|
}:
|
||||||
lib.my.makeSwitch {
|
let
|
||||||
inherit config;
|
cfg = config.my.coding.langs.lua;
|
||||||
optionName = "lua";
|
in
|
||||||
optionPath = [
|
{
|
||||||
"coding"
|
options.my.coding.langs.lua = {
|
||||||
"langs"
|
enable = lib.mkEnableOption "lua";
|
||||||
"lua"
|
};
|
||||||
];
|
|
||||||
config' = {
|
config = lib.mkIf cfg.enable {
|
||||||
my.hm.home.packages = with pkgs; [
|
my.hm.home.packages = with pkgs; [
|
||||||
luajit
|
luajit
|
||||||
stylua
|
stylua
|
||||||
|
|||||||
@@ -4,17 +4,17 @@
|
|||||||
pkgs,
|
pkgs,
|
||||||
...
|
...
|
||||||
}:
|
}:
|
||||||
lib.my.makeHomePackageConfig {
|
let
|
||||||
inherit config pkgs;
|
cfg = config.my.coding.langs.python;
|
||||||
packageName = "python3";
|
in
|
||||||
packagePath = [ "python3" ];
|
{
|
||||||
optionPath = [
|
options.my.coding.langs.python = {
|
||||||
"coding"
|
enable = lib.mkEnableOption "python3";
|
||||||
"langs"
|
};
|
||||||
"python"
|
|
||||||
];
|
config = lib.mkIf cfg.enable {
|
||||||
extraConfig = {
|
|
||||||
my.hm.home.packages = with pkgs; [
|
my.hm.home.packages = with pkgs; [
|
||||||
|
python3
|
||||||
uv
|
uv
|
||||||
pyright
|
pyright
|
||||||
];
|
];
|
||||||
|
|||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user