Compare commits
1 Commits
5a671c3ece
...
quickshell
| Author | SHA1 | Date | |
|---|---|---|---|
|
237a62ea8a
|
@@ -1,13 +0,0 @@
|
||||
root = true
|
||||
|
||||
[*]
|
||||
indent_style = space
|
||||
end_of_line = lf
|
||||
charset = utf-8
|
||||
insert_final_newline = false
|
||||
|
||||
[*.{nix,lua,yaml,css}]
|
||||
indent_size = 2
|
||||
|
||||
[Makefile]
|
||||
indent_size = 4
|
||||
21
.lazy.lua
21
.lazy.lua
@@ -1,21 +0,0 @@
|
||||
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,
|
||||
},
|
||||
}
|
||||
10
.sops.yaml
10
.sops.yaml
@@ -1,11 +1,13 @@
|
||||
keys:
|
||||
- &imxyy-nix ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIOEFLUkyeaK8ZPPZdVNEmtx8zvoxi7xqS2Z6oxRBuUPO
|
||||
- &imxyy-nix-server ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIB28jpN+h5euh3NtdN+A+EtqgIatC22e4i1TPTioKire
|
||||
- &imxyy-nix-x16 ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIMb5G/ieEYBOng66YeyttBQLThyM6W//z2POsNyq4Rw/
|
||||
- &imxyy-nix age1jf5pg2x6ta8amj40xdy0stvcvrdlkwc2nrwtmkpymu0qclk0eg5qmm9kns
|
||||
- &imxyy-nix-server age1hpgg6psejh4y6jcdd34wxuml75fnweqpe0kh8376yqsctsfn9qxs037kk6
|
||||
- &imxyy-nix-x16 age1r0fv0tagxupfacv0aaxk5ss7sqvswv6kq8tk3x46ndqrj6f5afvqegahxq
|
||||
- &imxyy-cloudwin age1tp7th3rrv3x0l6jl76n0hjqjp223w2y586pkgr0hcjwdm254jd5shkj6a8
|
||||
creation_rules:
|
||||
- path_regex: secrets/.*\..*
|
||||
- path_regex: secrets/.*\.(yaml|toml|json|env|dae|txt|conf)$
|
||||
key_groups:
|
||||
- age:
|
||||
- *imxyy-nix
|
||||
- *imxyy-nix-server
|
||||
- *imxyy-nix-x16
|
||||
- *imxyy-cloudwin
|
||||
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 77 KiB |
|
Before Width: | Height: | Size: 25 KiB After Width: | Height: | Size: 25 KiB |
@@ -1,8 +1,4 @@
|
||||
{
|
||||
config,
|
||||
hostname,
|
||||
...
|
||||
}:
|
||||
{ config, hostname, ... }:
|
||||
{
|
||||
# I prefer this to the default issue text
|
||||
# ported from ArchLinux IIRC
|
||||
@@ -15,7 +11,7 @@
|
||||
systemd.services."systemd-machine-id-commit".enable = !config.my.persist.enable;
|
||||
|
||||
my = {
|
||||
hm = {
|
||||
home = {
|
||||
# nicely reload system units when changing configs
|
||||
systemd.user.startServices = "sd-switch";
|
||||
home.stateVersion = "24.11";
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
enable = true;
|
||||
host = "127.0.0.1";
|
||||
port = 8089;
|
||||
package = pkgs.open-webui;
|
||||
package = pkgs.stable.open-webui;
|
||||
};
|
||||
services.caddy.virtualHosts."ai.imxyy.top" = {
|
||||
extraConfig = ''
|
||||
|
||||
@@ -1,12 +1,13 @@
|
||||
{
|
||||
config,
|
||||
lib,
|
||||
pkgs,
|
||||
secrets,
|
||||
sopsRoot,
|
||||
...
|
||||
}:
|
||||
{
|
||||
sops.secrets.et-imxyy-nix-server-nixremote = {
|
||||
sopsFile = secrets.et-imxyy-nix-server-nixremote;
|
||||
sopsFile = sopsRoot + /et-imxyy-nix-server-nixremote.toml;
|
||||
format = "binary";
|
||||
};
|
||||
environment.systemPackages = [ pkgs.easytier ];
|
||||
@@ -14,8 +15,10 @@
|
||||
enable = true;
|
||||
script = "${pkgs.easytier}/bin/easytier-core -c ${config.sops.secrets.et-imxyy-nix-server-nixremote.path}";
|
||||
serviceConfig = {
|
||||
Restart = "always";
|
||||
RestartSec = 30;
|
||||
Restart = lib.mkOverride 500 "always";
|
||||
RestartMaxDelaySec = lib.mkOverride 500 "1m";
|
||||
RestartSec = lib.mkOverride 500 "100ms";
|
||||
RestartSteps = lib.mkOverride 500 9;
|
||||
User = "root";
|
||||
};
|
||||
wantedBy = [ "multi-user.target" ];
|
||||
@@ -34,7 +37,6 @@
|
||||
"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"
|
||||
];
|
||||
|
||||
@@ -7,22 +7,26 @@
|
||||
}
|
||||
];
|
||||
services.postgresql.ensureDatabases = [ "coder" ];
|
||||
virtualisation.oci-containers.containers.coder = {
|
||||
image = "ghcr.io/coder/coder:latest";
|
||||
environment = {
|
||||
CODER_ACCESS_URL = "https://coder.imxyy.top";
|
||||
CODER_HTTP_ADDRESS = "0.0.0.0:8086";
|
||||
CODER_PG_CONNECTION_URL = "postgresql://coder:coderdatabase@127.0.0.1/coder?sslmode=disable";
|
||||
virtualisation.oci-containers = {
|
||||
containers = {
|
||||
coder = {
|
||||
image = "ghcr.io/coder/coder:latest";
|
||||
environment = {
|
||||
CODER_ACCESS_URL = "https://coder.imxyy.top";
|
||||
CODER_HTTP_ADDRESS = "0.0.0.0:8086";
|
||||
CODER_PG_CONNECTION_URL = "postgresql://coder:coderdatabase@127.0.0.1/coder?sslmode=disable";
|
||||
};
|
||||
extraOptions = [
|
||||
"--network=host"
|
||||
"--group-add=${toString config.users.groups.podman.gid}"
|
||||
];
|
||||
volumes = [
|
||||
"/var/lib/coder:/home/coder/.config"
|
||||
"/var/run/docker.sock:/var/run/docker.sock"
|
||||
];
|
||||
ports = [ "8086:8086" ];
|
||||
};
|
||||
};
|
||||
extraOptions = [
|
||||
"--network=host"
|
||||
"--group-add=${toString config.users.groups.podman.gid}"
|
||||
];
|
||||
volumes = [
|
||||
"/var/lib/coder:/home/coder/.config"
|
||||
"/var/run/docker.sock:/var/run/docker.sock"
|
||||
];
|
||||
ports = [ "8086:8086" ];
|
||||
};
|
||||
services.caddy.virtualHosts."coder.imxyy.top" = {
|
||||
extraConfig = ''
|
||||
|
||||
@@ -15,6 +15,7 @@
|
||||
./vault.nix
|
||||
./homepage.nix
|
||||
./code.nix
|
||||
./yesplaymusic.nix
|
||||
./ai.nix
|
||||
./grafana.nix
|
||||
./note.nix
|
||||
@@ -22,8 +23,5 @@
|
||||
./minio.nix
|
||||
./build.nix
|
||||
./immich.nix
|
||||
|
||||
./efl.nix
|
||||
./plant.nix
|
||||
];
|
||||
}
|
||||
|
||||
@@ -5,10 +5,5 @@
|
||||
enable = true;
|
||||
dockerCompat = true;
|
||||
dockerSocket.enable = true;
|
||||
defaultNetwork.settings.dns_enabled = true;
|
||||
};
|
||||
# avoid collision with dnsmasq
|
||||
virtualisation.containers = {
|
||||
containersConf.settings.network.dns_bind_port = 5353;
|
||||
};
|
||||
}
|
||||
|
||||
@@ -1,54 +0,0 @@
|
||||
{ config, secrets, ... }:
|
||||
{
|
||||
sops.secrets.efl-tuwunel-env = {
|
||||
sopsFile = secrets.efl-tuwunel;
|
||||
format = "dotenv";
|
||||
};
|
||||
virtualisation.oci-containers.containers = {
|
||||
tuwunel = {
|
||||
image = "jevolk/tuwunel:latest";
|
||||
volumes = [
|
||||
"tuwunel_db:/var/lib/tuwunel"
|
||||
];
|
||||
ports = [ "6167:6167" ];
|
||||
networks = [ "podman" ];
|
||||
environment = {
|
||||
TUWUNEL_SERVER_NAME = "mtx.eflx.top";
|
||||
TUWUNEL_PORT = "6167";
|
||||
TUWUNEL_ADDRESS = "0.0.0.0";
|
||||
TUWUNEL_WELL_KNOWN__SERVER = "mtx.eflx.top:443";
|
||||
TUWUNEL_WELL_KNOWN__CLIENT = "https://mtx.eflx.top";
|
||||
};
|
||||
environmentFiles = [
|
||||
config.sops.secrets.efl-tuwunel-env.path
|
||||
];
|
||||
};
|
||||
mautrix-telegram = {
|
||||
image = "dock.mau.dev/mautrix/telegram:latest";
|
||||
ports = [ "8099:8099" ];
|
||||
networks = [ "podman" ];
|
||||
extraOptions = [ "--ip=10.88.0.254" ];
|
||||
volumes = [ "/var/lib/efl-mautrix-telegram:/data" ];
|
||||
};
|
||||
|
||||
send = {
|
||||
image = "lanol/filecodebox:latest";
|
||||
ports = [ "12345:12345" ];
|
||||
volumes = [ "/var/lib/send:/app/data:rw" ];
|
||||
};
|
||||
};
|
||||
services.caddy.virtualHosts."mtx.eflx.top" = {
|
||||
extraConfig = ''
|
||||
reverse_proxy :6167 {
|
||||
header_up X-Real-IP {remote_host}
|
||||
}
|
||||
'';
|
||||
};
|
||||
services.caddy.virtualHosts."send.eflx.top" = {
|
||||
extraConfig = ''
|
||||
reverse_proxy :12345 {
|
||||
header_up X-Real-IP {remote_host}
|
||||
}
|
||||
'';
|
||||
};
|
||||
}
|
||||
@@ -1,10 +1,14 @@
|
||||
{
|
||||
virtualisation.oci-containers.containers.sun-panel = {
|
||||
image = "hslr/sun-panel:latest";
|
||||
volumes = [
|
||||
"/var/lib/sun-panel:/app/conf"
|
||||
];
|
||||
ports = [ "8085:3002" ];
|
||||
virtualisation.oci-containers = {
|
||||
containers = {
|
||||
sun-panel = {
|
||||
image = "hslr/sun-panel:latest";
|
||||
volumes = [
|
||||
"/var/lib/sun-panel:/app/conf"
|
||||
];
|
||||
ports = [ "8085:3002" ];
|
||||
};
|
||||
};
|
||||
};
|
||||
services.caddy.virtualHosts."home.imxyy.top" = {
|
||||
extraConfig = ''
|
||||
|
||||
@@ -1,9 +1,5 @@
|
||||
{ ... }:
|
||||
{
|
||||
users.users.immich = {
|
||||
home = "/mnt/nas/immich";
|
||||
createHome = true;
|
||||
};
|
||||
services.immich = {
|
||||
enable = true;
|
||||
host = "127.0.0.1";
|
||||
|
||||
@@ -1,104 +1,46 @@
|
||||
{
|
||||
config,
|
||||
secrets,
|
||||
...
|
||||
}:
|
||||
{
|
||||
nixpkgs.config.permittedInsecurePackages = [
|
||||
"olm-3.2.16"
|
||||
];
|
||||
sops.secrets.tuwunel-reg-token = {
|
||||
sopsFile = secrets.tuwunel-reg-token;
|
||||
format = "binary";
|
||||
owner = config.services.matrix-tuwunel.user;
|
||||
group = config.services.matrix-tuwunel.group;
|
||||
};
|
||||
sops.secrets.tuwunel-turn-secret = {
|
||||
sopsFile = secrets.tuwunel-turn-secret;
|
||||
format = "binary";
|
||||
owner = config.services.matrix-tuwunel.user;
|
||||
group = config.services.matrix-tuwunel.group;
|
||||
};
|
||||
services.matrix-tuwunel = {
|
||||
services.matrix-synapse = {
|
||||
enable = true;
|
||||
settings.global = {
|
||||
address = [ "127.0.0.1" ];
|
||||
port = [ 8094 ];
|
||||
server_name = "imxyy.top";
|
||||
well_known = {
|
||||
server = "matrix.imxyy.top:443";
|
||||
client = "https://matrix.imxyy.top";
|
||||
};
|
||||
|
||||
allow_registration = true;
|
||||
registration_token_file = config.sops.secrets.tuwunel-reg-token.path;
|
||||
|
||||
suppress_push_when_active = true;
|
||||
|
||||
turn_uris = [
|
||||
"turn:hk.vkvm.imxyy.top?transport=udp"
|
||||
"turn:hk.vkvm.imxyy.top?transport=tcp"
|
||||
settings = {
|
||||
server_name = "matrix.imxyy.top";
|
||||
public_baseurl = "https://matrix.imxyy.top";
|
||||
listeners = [
|
||||
{
|
||||
port = 8094;
|
||||
bind_addresses = [ "127.0.0.1" ];
|
||||
type = "http";
|
||||
tls = false;
|
||||
x_forwarded = true;
|
||||
resources = [
|
||||
{
|
||||
names = [
|
||||
"client"
|
||||
"federation"
|
||||
];
|
||||
compress = true;
|
||||
}
|
||||
];
|
||||
}
|
||||
];
|
||||
turn_secret_file = config.sops.secrets.tuwunel-turn-secret.path;
|
||||
|
||||
new_user_displayname_suffix = "";
|
||||
turn_uris = [ "turns:vkvm.imxyy.top:5349" ];
|
||||
turn_shared_secret = "ac779a48c03bb451839569d295a29aa6ab8c264277bec2df9c9c7f5e22936288";
|
||||
turn_user_lifetime = "1h";
|
||||
database_type = "psycopg2";
|
||||
database_args.database = "matrix-synapse";
|
||||
};
|
||||
};
|
||||
services.caddy.virtualHosts."imxyy.top" = {
|
||||
extraConfig = ''
|
||||
handle /.well-known/matrix/server {
|
||||
header Content-Type application/json
|
||||
header "Access-Control-Allow-Origin" "*"
|
||||
|
||||
respond `{"m.server": "matrix.imxyy.top:443"}` 200
|
||||
}
|
||||
handle /.well-known/matrix/client {
|
||||
header Content-Type application/json
|
||||
header "Access-Control-Allow-Origin" "*"
|
||||
|
||||
respond `{"m.homeserver": {"base_url": "https://matrix.imxyy.top/"}}` 200
|
||||
}
|
||||
'';
|
||||
extraConfigFiles = [
|
||||
"/var/lib/matrix-synapse/secret"
|
||||
];
|
||||
};
|
||||
services.caddy.virtualHosts."matrix.imxyy.top" = {
|
||||
extraConfig = ''
|
||||
reverse_proxy :8094
|
||||
handle_path /_matrix {
|
||||
reverse_proxy :8094
|
||||
}
|
||||
handle_path /_synapse/client {
|
||||
reverse_proxy :8094
|
||||
}
|
||||
'';
|
||||
};
|
||||
|
||||
sops.secrets.mautrix-telegram = {
|
||||
sopsFile = secrets.mautrix-telegram;
|
||||
format = "dotenv";
|
||||
owner = "mautrix-telegram";
|
||||
group = "mautrix-telegram";
|
||||
};
|
||||
services.mautrix-telegram = {
|
||||
enable = true;
|
||||
environmentFile = config.sops.secrets.mautrix-telegram.path;
|
||||
settings = {
|
||||
homeserver = {
|
||||
address = "http://127.0.0.1:8094";
|
||||
domain = "imxyy.top";
|
||||
};
|
||||
appservice = {
|
||||
address = "http://127.0.0.1:8098";
|
||||
hostname = "127.0.0.1";
|
||||
port = "8098";
|
||||
bot_username = "telegrambot";
|
||||
};
|
||||
bridge = {
|
||||
username_template = "telegram_{userid}";
|
||||
alias_template = "telegram_{groupname}";
|
||||
displayname_template = "{displayname} (Telegram)";
|
||||
permissions = {
|
||||
"@imxyy_soope_:imxyy.top" = "admin";
|
||||
};
|
||||
};
|
||||
telegram = {
|
||||
# borrowed from https://github.com/telegramdesktop/tdesktop/blob/9bdc19e2fd4d497c8f403891848383a88faadc25/snap/snapcraft.yaml#L134-L135
|
||||
api_id = "611335";
|
||||
api_hash = "d524b414d21f4d37f08684c1df41ac9c";
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
|
||||
@@ -8,10 +8,9 @@
|
||||
WorkingDirectory = "/opt/minecraft/fabric1.20.6";
|
||||
ExecStart = "${lib.getExe' pkgs.openjdk21 "java"} -Xms1G -Xmx5G -jar fabric-server-mc.1.20.6-loader.0.15.11-launcher.1.0.1.jar";
|
||||
Restart = "always";
|
||||
RestartSec = 120;
|
||||
RestartSec = "10s";
|
||||
};
|
||||
};
|
||||
|
||||
my.persist = {
|
||||
nixosDirs = [
|
||||
"/opt/minecraft"
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
{ config, secrets, ... }:
|
||||
{ config, sopsRoot, ... }:
|
||||
{
|
||||
sops.secrets.minio-env = {
|
||||
sopsFile = secrets.minio;
|
||||
sopsFile = sopsRoot + /minio.env;
|
||||
format = "dotenv";
|
||||
};
|
||||
services.minio = {
|
||||
@@ -16,4 +16,11 @@
|
||||
];
|
||||
rootCredentialsFile = config.sops.secrets.minio-env.path;
|
||||
};
|
||||
services.caddy.virtualHosts."minio.imxyy.top" = {
|
||||
extraConfig = ''
|
||||
handle_path /* {
|
||||
reverse_proxy :9000
|
||||
}
|
||||
'';
|
||||
};
|
||||
}
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
lib,
|
||||
pkgs,
|
||||
username,
|
||||
secrets,
|
||||
sopsRoot,
|
||||
...
|
||||
}:
|
||||
{
|
||||
@@ -131,29 +131,26 @@
|
||||
"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"
|
||||
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIKALTBn/QSGcSPgMg0ViSazFcaA0+nEF05EJpjbsI6dE imxyy_soope_@imxyy-cloudwin"
|
||||
];
|
||||
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"
|
||||
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIKALTBn/QSGcSPgMg0ViSazFcaA0+nEF05EJpjbsI6dE imxyy_soope_@imxyy-cloudwin"
|
||||
];
|
||||
|
||||
sops.secrets.dae-imxyy-nix-server = {
|
||||
sopsFile = secrets.dae-imxyy-nix-server;
|
||||
sopsFile = sopsRoot + /dae-imxyy-nix-server.dae;
|
||||
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";
|
||||
};
|
||||
systemd.services.dae.after = [ "sops-nix.service" ];
|
||||
sops.secrets.mihomo = {
|
||||
sopsFile = secrets.mihomo;
|
||||
sopsFile = sopsRoot + /mihomo.yaml;
|
||||
format = "yaml";
|
||||
key = "";
|
||||
};
|
||||
@@ -165,7 +162,7 @@
|
||||
};
|
||||
|
||||
sops.secrets.frp-env = {
|
||||
sopsFile = secrets.frp;
|
||||
sopsFile = sopsRoot + /frp.env;
|
||||
format = "dotenv";
|
||||
};
|
||||
systemd.services.frp.serviceConfig.EnvironmentFile = [
|
||||
@@ -208,6 +205,20 @@
|
||||
localPort = 443;
|
||||
customDomains = [ "oidc.imxyy.top" ];
|
||||
}
|
||||
{
|
||||
name = "headscale-http";
|
||||
type = "http";
|
||||
localIP = "127.0.0.1";
|
||||
localPort = 80;
|
||||
customDomains = [ "headscale.imxyy.top" ];
|
||||
}
|
||||
{
|
||||
name = "headscale-https";
|
||||
type = "https";
|
||||
localIP = "127.0.0.1";
|
||||
localPort = 443;
|
||||
customDomains = [ "headscale.imxyy.top" ];
|
||||
}
|
||||
|
||||
{
|
||||
name = "mail-http";
|
||||
@@ -291,6 +302,21 @@
|
||||
customDomains = [ "coder.imxyy.top" ];
|
||||
}
|
||||
|
||||
{
|
||||
name = "music-http";
|
||||
type = "http";
|
||||
localIP = "127.0.0.1";
|
||||
localPort = 80;
|
||||
customDomains = [ "music.imxyy.top" ];
|
||||
}
|
||||
{
|
||||
name = "music-https";
|
||||
type = "https";
|
||||
localIP = "127.0.0.1";
|
||||
localPort = 443;
|
||||
customDomains = [ "music.imxyy.top" ];
|
||||
}
|
||||
|
||||
{
|
||||
name = "ai-http";
|
||||
type = "http";
|
||||
@@ -321,6 +347,21 @@
|
||||
customDomains = [ "grafana.imxyy.top" ];
|
||||
}
|
||||
|
||||
{
|
||||
name = "note-http";
|
||||
type = "http";
|
||||
localIP = "127.0.0.1";
|
||||
localPort = 80;
|
||||
customDomains = [ "note.imxyy.top" ];
|
||||
}
|
||||
{
|
||||
name = "note-https";
|
||||
type = "https";
|
||||
localIP = "127.0.0.1";
|
||||
localPort = 443;
|
||||
customDomains = [ "note.imxyy.top" ];
|
||||
}
|
||||
|
||||
{
|
||||
name = "siyuan-http";
|
||||
type = "http";
|
||||
@@ -336,20 +377,6 @@
|
||||
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";
|
||||
@@ -381,54 +408,63 @@
|
||||
}
|
||||
|
||||
{
|
||||
name = "memo-http";
|
||||
type = "http";
|
||||
name = "minecraft";
|
||||
type = "tcp";
|
||||
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" ];
|
||||
localPort = 25565;
|
||||
remotePort = 25565;
|
||||
}
|
||||
];
|
||||
};
|
||||
};
|
||||
|
||||
services.tailscale = {
|
||||
enable = true;
|
||||
useRoutingFeatures = "both";
|
||||
extraSetFlags = [ "--accept-dns=false" ];
|
||||
};
|
||||
services.headscale = {
|
||||
enable = true;
|
||||
address = "0.0.0.0";
|
||||
port = 8080;
|
||||
settings = {
|
||||
logtail.enabled = false;
|
||||
server_url = "https://headscale.imxyy.top";
|
||||
dns.magic_dns = false;
|
||||
dns.override_local_dns = false;
|
||||
ip_prefixes = "100.64.0.0/10";
|
||||
|
||||
oidc = {
|
||||
only_start_if_oidc_is_available = true;
|
||||
issuer = "https://oidc.imxyy.top";
|
||||
client_id = "https://headscale.imxyy.top";
|
||||
allowed_domains = [
|
||||
"imxyy.top"
|
||||
"*.imxyy.top"
|
||||
];
|
||||
client_secret = "";
|
||||
expiry = 0;
|
||||
extra_params.domain_hint = "imxyy.top";
|
||||
};
|
||||
};
|
||||
};
|
||||
systemd.services."headscale" = {
|
||||
serviceConfig = {
|
||||
Restart = lib.mkOverride 500 "always";
|
||||
RestartMaxDelaySec = lib.mkOverride 500 "1m";
|
||||
RestartSec = lib.mkOverride 500 "100ms";
|
||||
RestartSteps = lib.mkOverride 500 9;
|
||||
};
|
||||
after = [
|
||||
"podman-obligator.service"
|
||||
];
|
||||
requires = [
|
||||
"podman-obligator.service"
|
||||
];
|
||||
};
|
||||
|
||||
sops.secrets.et-imxyy-nix-server = {
|
||||
sopsFile = secrets.et-imxyy-nix-server;
|
||||
sopsFile = sopsRoot + /et-imxyy-nix-server.toml;
|
||||
format = "binary";
|
||||
};
|
||||
environment.systemPackages = [ pkgs.easytier ];
|
||||
@@ -436,8 +472,10 @@
|
||||
enable = true;
|
||||
script = "${pkgs.easytier}/bin/easytier-core -c ${config.sops.secrets.et-imxyy-nix-server.path}";
|
||||
serviceConfig = {
|
||||
Restart = "always";
|
||||
RestartSec = 30;
|
||||
Restart = lib.mkOverride 500 "always";
|
||||
RestartMaxDelaySec = lib.mkOverride 500 "1m";
|
||||
RestartSec = lib.mkOverride 500 "100ms";
|
||||
RestartSteps = lib.mkOverride 500 9;
|
||||
User = "root";
|
||||
};
|
||||
wantedBy = [ "multi-user.target" ];
|
||||
@@ -447,23 +485,34 @@
|
||||
];
|
||||
};
|
||||
|
||||
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"
|
||||
];
|
||||
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."headscale.imxyy.top" = {
|
||||
extraConfig = ''
|
||||
reverse_proxy :8080 {
|
||||
header_up X-Real-IP {remote_host}
|
||||
}
|
||||
'';
|
||||
};
|
||||
services.caddy.virtualHosts."oidc.imxyy.top" = {
|
||||
extraConfig = ''
|
||||
@@ -475,10 +524,9 @@
|
||||
|
||||
systemd.services.ddns-go =
|
||||
let
|
||||
version = "6.6.7";
|
||||
ddns-go = pkgs.buildGoModule {
|
||||
inherit version;
|
||||
ddns-go = pkgs.buildGoModule rec {
|
||||
pname = "ddns-go";
|
||||
version = "6.6.7";
|
||||
src = pkgs.fetchFromGitHub {
|
||||
owner = "jeessy2";
|
||||
repo = "ddns-go";
|
||||
@@ -513,6 +561,7 @@
|
||||
"git"
|
||||
"vault"
|
||||
"coder"
|
||||
"headscale"
|
||||
"grafana"
|
||||
"matrix"
|
||||
"note"
|
||||
@@ -521,22 +570,23 @@
|
||||
"music"
|
||||
"ai"
|
||||
"sy"
|
||||
"immich"
|
||||
"minio"
|
||||
];
|
||||
in
|
||||
{
|
||||
enable = true;
|
||||
resolveLocalQueries = false;
|
||||
settings = {
|
||||
no-resolv = true;
|
||||
server = [ "192.168.3.1" ];
|
||||
server = [
|
||||
"120.53.53.53"
|
||||
"223.5.5.5"
|
||||
];
|
||||
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";
|
||||
};
|
||||
};
|
||||
}
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
lib,
|
||||
config,
|
||||
username,
|
||||
secrets,
|
||||
sopsRoot,
|
||||
...
|
||||
}:
|
||||
{
|
||||
@@ -13,16 +13,17 @@
|
||||
timeout = 0;
|
||||
};
|
||||
|
||||
hardware.bluetooth.enable = true;
|
||||
hardware.bluetooth.powerOnBoot = true;
|
||||
|
||||
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 = {
|
||||
sopsFile = secrets.imxyy-nix-server-hashed-password;
|
||||
sopsFile = sopsRoot + /imxyy-nix-server-hashed-password.txt;
|
||||
format = "binary";
|
||||
neededForUsers = true;
|
||||
};
|
||||
|
||||
@@ -1,52 +1,61 @@
|
||||
{
|
||||
config,
|
||||
secrets,
|
||||
sopsRoot,
|
||||
...
|
||||
}:
|
||||
{
|
||||
sops.secrets = {
|
||||
flatnote-env = {
|
||||
sopsFile = sopsRoot + /flatnote.env;
|
||||
format = "dotenv";
|
||||
};
|
||||
siyuan-env = {
|
||||
sopsFile = secrets.siyuan;
|
||||
sopsFile = sopsRoot + /siyuan.env;
|
||||
format = "dotenv";
|
||||
};
|
||||
};
|
||||
virtualisation.oci-containers.containers = {
|
||||
siyuan = {
|
||||
image = "apkdv/siyuan-unlock:v3.1.30";
|
||||
volumes = [
|
||||
"/mnt/nas/siyuan/workspace:/workspace"
|
||||
"/mnt/nas/siyuan:/home/siyuan"
|
||||
];
|
||||
cmd = [
|
||||
"--workspace=/workspace"
|
||||
];
|
||||
environment = {
|
||||
PUID = "0";
|
||||
PGID = "0";
|
||||
virtualisation.oci-containers = {
|
||||
containers = {
|
||||
flatnotes = {
|
||||
image = "dullage/flatnotes:latest";
|
||||
volumes = [
|
||||
"/mnt/nas/flatnotes/data:/data"
|
||||
];
|
||||
environmentFiles = [
|
||||
"${config.sops.secrets.flatnote-env.path}"
|
||||
];
|
||||
ports = [ "8093:8080" ];
|
||||
};
|
||||
siyuan = {
|
||||
image = "apkdv/siyuan-unlock:v3.1.30";
|
||||
volumes = [
|
||||
"/mnt/nas/siyuan/workspace:/workspace"
|
||||
"/mnt/nas/siyuan:/home/siyuan"
|
||||
];
|
||||
cmd = [
|
||||
"--workspace=/workspace"
|
||||
];
|
||||
environment = {
|
||||
PUID = "0";
|
||||
PGID = "0";
|
||||
};
|
||||
environmentFiles = [
|
||||
"${config.sops.secrets.siyuan-env.path}"
|
||||
];
|
||||
ports = [ "8095:6806" ];
|
||||
};
|
||||
environmentFiles = [
|
||||
"${config.sops.secrets.siyuan-env.path}"
|
||||
];
|
||||
ports = [ "8095:6806" ];
|
||||
};
|
||||
memos = {
|
||||
image = "neosmemo/memos:stable";
|
||||
volumes = [
|
||||
"/mnt/nas/memos:/var/opt/memos"
|
||||
];
|
||||
ports = [ "8097:5230" ];
|
||||
};
|
||||
};
|
||||
services.caddy.virtualHosts = {
|
||||
"note.imxyy.top" = {
|
||||
extraConfig = ''
|
||||
reverse_proxy :8093
|
||||
'';
|
||||
};
|
||||
"sy.imxyy.top" = {
|
||||
extraConfig = ''
|
||||
reverse_proxy :8095
|
||||
'';
|
||||
};
|
||||
"memo.imxyy.top" = {
|
||||
extraConfig = ''
|
||||
reverse_proxy :8097
|
||||
'';
|
||||
};
|
||||
};
|
||||
}
|
||||
|
||||
@@ -1,74 +0,0 @@
|
||||
{
|
||||
inputs,
|
||||
pkgs,
|
||||
lib,
|
||||
...
|
||||
}:
|
||||
let
|
||||
app = pkgs.buildNpmPackage (finalAttrs: {
|
||||
pname = "HF-plant";
|
||||
version = "unstable-2025-09-21";
|
||||
|
||||
src = inputs.plant;
|
||||
|
||||
buildPhase = ''
|
||||
runHook preBuild
|
||||
|
||||
npm run build
|
||||
npm run build:proxy
|
||||
|
||||
runHook postBuild
|
||||
'';
|
||||
installPhase = ''
|
||||
runHook preInstall
|
||||
|
||||
mkdir $out
|
||||
mv dist $out
|
||||
cp .env proxy-server-bundled.js $out
|
||||
|
||||
runHook postInstall
|
||||
'';
|
||||
|
||||
npmDepsHash = "sha256-ret4BtjrEt8L1nlvJmFiejAKmbz89Z7NSiKs+qlB51w=";
|
||||
});
|
||||
in
|
||||
{
|
||||
systemd.services.HF-plant-proxy = {
|
||||
after = [ "network.target" ];
|
||||
wantedBy = [ "multi-user.target" ];
|
||||
serviceConfig = {
|
||||
ExecStart = "${lib.getExe pkgs.bash} -c 'source ${app}/.env; export FEISHU_APP_ID FEISHU_APP_SECRET AMAP_JSCODE; ${lib.getExe pkgs.nodejs} ${app}/proxy-server-bundled.js'";
|
||||
Restart = "always";
|
||||
RestartSec = 120;
|
||||
};
|
||||
};
|
||||
services.caddy.virtualHosts."plant.imxyy.top" = {
|
||||
extraConfig = ''
|
||||
handle /api/* {
|
||||
reverse_proxy localhost:3001
|
||||
}
|
||||
|
||||
handle /* {
|
||||
root * ${app}/dist
|
||||
try_files {path} /index.html
|
||||
file_server
|
||||
}
|
||||
'';
|
||||
};
|
||||
services.frp.settings.proxies = [
|
||||
{
|
||||
name = "plant-http";
|
||||
type = "http";
|
||||
localIP = "127.0.0.1";
|
||||
localPort = 80;
|
||||
customDomains = [ "plant.imxyy.top" ];
|
||||
}
|
||||
{
|
||||
name = "plant-https";
|
||||
type = "https";
|
||||
localIP = "127.0.0.1";
|
||||
localPort = 443;
|
||||
customDomains = [ "plant.imxyy.top" ];
|
||||
}
|
||||
];
|
||||
}
|
||||
@@ -1,7 +1,7 @@
|
||||
{ config, secrets, ... }:
|
||||
{ config, sopsRoot, ... }:
|
||||
{
|
||||
sops.secrets.vaultwarden-env = {
|
||||
sopsFile = secrets.vaultwarden;
|
||||
sopsFile = sopsRoot + /vaultwarden.env;
|
||||
format = "dotenv";
|
||||
};
|
||||
services.postgresql.ensureUsers = [
|
||||
|
||||
@@ -13,7 +13,7 @@ let
|
||||
in
|
||||
{
|
||||
boot = {
|
||||
initrd.kernelModules = lib.mkBefore [
|
||||
initrd.kernelModules = [
|
||||
"vfio_pci"
|
||||
"vfio"
|
||||
"vfio_iommu_type1"
|
||||
|
||||
23
config/hosts/imxyy-nix-server/yesplaymusic.nix
Normal file
23
config/hosts/imxyy-nix-server/yesplaymusic.nix
Normal file
@@ -0,0 +1,23 @@
|
||||
{
|
||||
virtualisation.oci-containers.containers."YesPlayMusic" = {
|
||||
image = "git.imxyy.top/imxyy1soope1/yesplaymusic:latest";
|
||||
environment = {
|
||||
"NODE_TLS_REJECT_UNAUTHORIZED" = "0";
|
||||
};
|
||||
volumes = [
|
||||
"/etc/localtime:/etc/localtime:ro"
|
||||
];
|
||||
ports = [
|
||||
"8088:80/tcp"
|
||||
];
|
||||
log-driver = "journald";
|
||||
};
|
||||
|
||||
services.caddy.virtualHosts."music.imxyy.top" = {
|
||||
extraConfig = ''
|
||||
reverse_proxy :8088 {
|
||||
header_up X-Real-IP {remote_host}
|
||||
}
|
||||
'';
|
||||
};
|
||||
}
|
||||
@@ -1,10 +1,10 @@
|
||||
{ lib, username, ... }:
|
||||
{
|
||||
my.hm.programs.zsh.shellAliases = {
|
||||
my.home.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";
|
||||
sops.sshKeyPath = "/home/${username}/.ssh/id_ed25519";
|
||||
coding.all.enable = true;
|
||||
coding.editor.vscode.enable = lib.mkForce false;
|
||||
cli.misc.enable = true;
|
||||
|
||||
@@ -1,49 +1,43 @@
|
||||
{
|
||||
config,
|
||||
lib,
|
||||
pkgs,
|
||||
username,
|
||||
...
|
||||
}:
|
||||
{
|
||||
my.hm = {
|
||||
my.home = {
|
||||
home.packages = with pkgs; [
|
||||
localsend
|
||||
|
||||
rclone
|
||||
|
||||
wpsoffice-cn
|
||||
wps-office-fonts
|
||||
ttf-wps-fonts
|
||||
papers
|
||||
evince
|
||||
|
||||
anki
|
||||
|
||||
ayugram-desktop
|
||||
telegram-desktop
|
||||
signal-desktop
|
||||
element-desktop
|
||||
fractal
|
||||
discord
|
||||
qq
|
||||
wechat
|
||||
|
||||
gnome-clocks
|
||||
|
||||
wineWowPackages.waylandFull
|
||||
|
||||
pavucontrol
|
||||
pamixer
|
||||
];
|
||||
programs.zsh = {
|
||||
sessionVariables = {
|
||||
PATH = "/home/${username}/bin:$PATH";
|
||||
};
|
||||
};
|
||||
|
||||
programs.niri.settings = {
|
||||
environment.STEAM_FORCE_DESKTOPUI_SCALING = "1.25";
|
||||
outputs = {
|
||||
eDP-1 = {
|
||||
enable = true;
|
||||
mode = {
|
||||
width = 1920;
|
||||
height = 1200;
|
||||
refresh = 60.002;
|
||||
};
|
||||
scale = 1.25;
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
my = {
|
||||
@@ -51,7 +45,8 @@
|
||||
cli.all.enable = true;
|
||||
coding.all.enable = true;
|
||||
desktop.all.enable = true;
|
||||
virt.moonlight.enable = true;
|
||||
|
||||
desktop.browser.librewolf.enable = lib.mkForce false;
|
||||
|
||||
i18n.fcitx5.enable = true;
|
||||
|
||||
@@ -64,9 +59,9 @@
|
||||
imageviewer = [ "org.gnome.Shotwell-Viewer.desktop" ];
|
||||
in
|
||||
{
|
||||
"inode/directory" = [ "org.gnome.Nautilus.desktop" ];
|
||||
"inode/directory" = [ "nemo.desktop" ];
|
||||
|
||||
"application/pdf" = [ "org.gnome.Papers.desktop" ];
|
||||
"application/pdf" = [ "org.gnome.Evince.desktop" ];
|
||||
|
||||
"text/*" = editor;
|
||||
"application/json" = editor;
|
||||
@@ -97,6 +92,15 @@
|
||||
"image/png" = imageviewer;
|
||||
"image/webp" = imageviewer;
|
||||
};
|
||||
extraBookmarks =
|
||||
let
|
||||
homedir = config.my.home.home.homeDirectory;
|
||||
in
|
||||
[
|
||||
"file://${homedir}/NAS NAS"
|
||||
"file://${homedir}/NAS/imxyy_soope_ NAS imxyy_soope_"
|
||||
"file://${homedir}/NAS/imxyy_soope_/OS NAS OS"
|
||||
];
|
||||
};
|
||||
persist = {
|
||||
enable = true;
|
||||
@@ -114,26 +118,23 @@
|
||||
".local/state"
|
||||
".local/share/Anki2"
|
||||
".local/share/shotwell"
|
||||
".local/share/cheat.sh"
|
||||
".local/share/Kingsoft"
|
||||
|
||||
".local/share/AyuGramDesktop"
|
||||
".local/share/fractal"
|
||||
".local/share/TelegramDesktop"
|
||||
".config/Signal"
|
||||
".config/Element"
|
||||
".config/discord"
|
||||
".config/QQ"
|
||||
".xwechat"
|
||||
|
||||
".config/Kingsoft"
|
||||
".config/dconf"
|
||||
".config/gh"
|
||||
".config/pulse"
|
||||
".config/pip"
|
||||
".config/libreoffice"
|
||||
".config/sunshine"
|
||||
|
||||
".gemini"
|
||||
".claude"
|
||||
".claude-code-router"
|
||||
];
|
||||
homeFiles = [
|
||||
".claude.json"
|
||||
];
|
||||
};
|
||||
};
|
||||
|
||||
@@ -1,7 +1,8 @@
|
||||
{
|
||||
config,
|
||||
lib,
|
||||
pkgs,
|
||||
secrets,
|
||||
sopsRoot,
|
||||
...
|
||||
}:
|
||||
{
|
||||
@@ -9,51 +10,10 @@
|
||||
"biosdevname=0"
|
||||
"net.ifnames=0"
|
||||
];
|
||||
networking = {
|
||||
networkmanager.enable = true;
|
||||
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 }
|
||||
}
|
||||
|
||||
chain output {
|
||||
type filter hook output priority 100; policy accept;
|
||||
}
|
||||
|
||||
chain input {
|
||||
type filter hook input priority 0; policy drop;
|
||||
iif lo accept
|
||||
ct state invalid drop
|
||||
ct state established,related accept
|
||||
|
||||
ip saddr @LANv4 accept
|
||||
ip6 saddr @LANv6 accept
|
||||
}
|
||||
|
||||
chain forward {
|
||||
type filter hook forward priority 0; policy drop;
|
||||
}
|
||||
}
|
||||
'';
|
||||
};
|
||||
};
|
||||
networking.networkmanager.enable = true;
|
||||
|
||||
sops.secrets.dae-imxyy-nix-x16 = {
|
||||
sopsFile = secrets.dae-imxyy-nix-x16;
|
||||
sopsFile = sopsRoot + /dae-imxyy-nix-x16.dae;
|
||||
format = "binary";
|
||||
};
|
||||
services.dae = {
|
||||
@@ -62,7 +22,7 @@
|
||||
};
|
||||
systemd.services.dae.after = [ "sops-nix.service" ];
|
||||
sops.secrets.mihomo = {
|
||||
sopsFile = secrets.mihomo;
|
||||
sopsFile = sopsRoot + /mihomo.yaml;
|
||||
format = "yaml";
|
||||
key = "";
|
||||
};
|
||||
@@ -74,7 +34,7 @@
|
||||
};
|
||||
|
||||
sops.secrets.et-imxyy-nix-x16 = {
|
||||
sopsFile = secrets.et-imxyy-nix-x16;
|
||||
sopsFile = sopsRoot + /et-imxyy-nix-x16.toml;
|
||||
format = "binary";
|
||||
};
|
||||
environment.systemPackages = with pkgs; [
|
||||
@@ -84,8 +44,10 @@
|
||||
enable = true;
|
||||
script = "${pkgs.easytier}/bin/easytier-core -c ${config.sops.secrets.et-imxyy-nix-x16.path}";
|
||||
serviceConfig = {
|
||||
Restart = "always";
|
||||
RestartSec = 30;
|
||||
Restart = lib.mkOverride 500 "always";
|
||||
RestartMaxDelaySec = lib.mkOverride 500 "1m";
|
||||
RestartSec = lib.mkOverride 500 "100ms";
|
||||
RestartSteps = lib.mkOverride 500 9;
|
||||
User = "root";
|
||||
};
|
||||
wantedBy = [ "multi-user.target" ];
|
||||
|
||||
@@ -1,8 +1,9 @@
|
||||
{
|
||||
lib,
|
||||
pkgs,
|
||||
config,
|
||||
username,
|
||||
secrets,
|
||||
sopsRoot,
|
||||
...
|
||||
}:
|
||||
{
|
||||
@@ -35,6 +36,36 @@
|
||||
};
|
||||
environment.variables.NIX_REMOTE = "daemon";
|
||||
|
||||
security.rtkit.enable = true;
|
||||
services.pipewire = {
|
||||
enable = true;
|
||||
alsa.enable = false;
|
||||
alsa.support32Bit = false;
|
||||
pulse.enable = false;
|
||||
audio.enable = false;
|
||||
};
|
||||
services.pulseaudio = {
|
||||
enable = true;
|
||||
support32Bit = true;
|
||||
package = pkgs.pulseaudioFull;
|
||||
extraConfig = ''
|
||||
load-module module-switch-on-connect
|
||||
unload-module module-suspend-on-idle
|
||||
'';
|
||||
};
|
||||
hardware.bluetooth = {
|
||||
enable = true;
|
||||
powerOnBoot = true;
|
||||
settings = {
|
||||
General = {
|
||||
Enable = "Source,Sink,Media,Socket";
|
||||
Disable = "HeadSet";
|
||||
MultiProfile = "multiple";
|
||||
};
|
||||
};
|
||||
};
|
||||
users.extraUsers.${username}.extraGroups = [ "audio" ];
|
||||
|
||||
fonts = {
|
||||
enableDefaultPackages = false;
|
||||
fontDir.enable = true;
|
||||
@@ -71,9 +102,6 @@
|
||||
|
||||
services.printing.enable = true;
|
||||
|
||||
services.upower.enable = true;
|
||||
services.power-profiles-daemon.enable = true;
|
||||
|
||||
services.keyd = {
|
||||
enable = true;
|
||||
keyboards.default.settings = {
|
||||
@@ -106,7 +134,7 @@
|
||||
];
|
||||
|
||||
sops.secrets.imxyy-nix-rclone = {
|
||||
sopsFile = secrets.imxyy-nix-rclone;
|
||||
sopsFile = sopsRoot + /imxyy-nix-rclone.conf;
|
||||
format = "binary";
|
||||
};
|
||||
fileSystems = {
|
||||
@@ -126,6 +154,21 @@
|
||||
"vfs-cache-mode=full"
|
||||
];
|
||||
};
|
||||
"/home/${username}/NAS" = {
|
||||
device = "//10.0.0.1/share";
|
||||
fsType = "cifs";
|
||||
options = [
|
||||
"username=nas"
|
||||
"password=nasshare"
|
||||
"x-systemd.automount,noauto,x-systemd.idle-timeout=60,x-systemd.device-timeout=5s,x-systemd.mount-timeout=5s"
|
||||
"nodev"
|
||||
"nofail"
|
||||
"uid=1000"
|
||||
"gid=100"
|
||||
"vers=3"
|
||||
"rw"
|
||||
];
|
||||
};
|
||||
};
|
||||
|
||||
my.persist.nixosDirs = [ "/etc/NetworkManager/system-connections" ];
|
||||
|
||||
@@ -1,28 +1,37 @@
|
||||
{
|
||||
config,
|
||||
lib,
|
||||
pkgs,
|
||||
username,
|
||||
...
|
||||
}:
|
||||
{
|
||||
my.hm = {
|
||||
my.home = {
|
||||
home.packages = with pkgs; [
|
||||
localsend
|
||||
|
||||
rclone
|
||||
|
||||
wpsoffice-cn
|
||||
wps-office-fonts
|
||||
ttf-wps-fonts
|
||||
papers
|
||||
evince
|
||||
|
||||
anki
|
||||
|
||||
ayugram-desktop
|
||||
telegram-desktop
|
||||
signal-desktop
|
||||
element-desktop
|
||||
fractal
|
||||
discord
|
||||
qq
|
||||
wechat
|
||||
|
||||
gnome-clocks
|
||||
|
||||
wineWowPackages.waylandFull
|
||||
|
||||
pavucontrol
|
||||
pamixer
|
||||
];
|
||||
programs.zsh = {
|
||||
shellAliases = {
|
||||
@@ -82,6 +91,8 @@
|
||||
coding.all.enable = true;
|
||||
desktop.all.enable = true;
|
||||
|
||||
desktop.browser.librewolf.enable = lib.mkForce false;
|
||||
|
||||
i18n.fcitx5.enable = true;
|
||||
|
||||
xdg = {
|
||||
@@ -93,9 +104,9 @@
|
||||
imageviewer = [ "org.gnome.Shotwell-Viewer.desktop" ];
|
||||
in
|
||||
{
|
||||
"inode/directory" = [ "org.gnome.Nautilus.desktop" ];
|
||||
"inode/directory" = [ "nemo.desktop" ];
|
||||
|
||||
"application/pdf" = [ "org.gnome.Papers.desktop" ];
|
||||
"application/pdf" = [ "org.gnome.Evince.desktop" ];
|
||||
|
||||
"text/*" = editor;
|
||||
"application/json" = editor;
|
||||
@@ -126,6 +137,16 @@
|
||||
"image/png" = imageviewer;
|
||||
"image/webp" = imageviewer;
|
||||
};
|
||||
extraBookmarks =
|
||||
let
|
||||
homedir = config.my.home.home.homeDirectory;
|
||||
in
|
||||
[
|
||||
"file://${homedir}/Documents/%E7%8F%AD%E7%BA%A7%E4%BA%8B%E5%8A%A1 班级事务"
|
||||
"file://${homedir}/NAS NAS"
|
||||
"file://${homedir}/NAS/imxyy_soope_ NAS imxyy_soope_"
|
||||
"file://${homedir}/NAS/imxyy_soope_/OS NAS OS"
|
||||
];
|
||||
};
|
||||
persist = {
|
||||
enable = true;
|
||||
@@ -141,23 +162,23 @@
|
||||
".local/state"
|
||||
".local/share/Anki2"
|
||||
".local/share/shotwell"
|
||||
".local/share/cheat.sh"
|
||||
".local/share/Kingsoft"
|
||||
|
||||
".local/share/AyuGramDesktop"
|
||||
".local/share/fractal"
|
||||
".local/share/TelegramDesktop"
|
||||
".config/Signal"
|
||||
".config/Element"
|
||||
".config/discord"
|
||||
".config/QQ"
|
||||
".xwechat"
|
||||
|
||||
".config/Kingsoft"
|
||||
".config/dconf"
|
||||
".config/gh"
|
||||
".config/pulse"
|
||||
".config/pip"
|
||||
".config/libreoffice"
|
||||
".config/sunshine"
|
||||
|
||||
".gemini"
|
||||
".claude"
|
||||
".claude-code-router"
|
||||
];
|
||||
};
|
||||
};
|
||||
|
||||
@@ -2,7 +2,8 @@
|
||||
config,
|
||||
lib,
|
||||
pkgs,
|
||||
secrets,
|
||||
sopsRoot,
|
||||
username,
|
||||
...
|
||||
}:
|
||||
{
|
||||
@@ -69,7 +70,6 @@
|
||||
chain input {
|
||||
type filter hook input priority 0; policy drop;
|
||||
iif lo accept
|
||||
iifname waydroid0 accept
|
||||
ct state invalid drop
|
||||
ct state established,related accept
|
||||
|
||||
@@ -79,9 +79,6 @@
|
||||
|
||||
chain forward {
|
||||
type filter hook forward priority 0; policy drop;
|
||||
|
||||
iifname waydroid0 accept
|
||||
oifname waydroid0 accept
|
||||
}
|
||||
}
|
||||
'';
|
||||
@@ -89,7 +86,7 @@
|
||||
};
|
||||
|
||||
sops.secrets.dae-imxyy-nix = {
|
||||
sopsFile = secrets.dae-imxyy-nix;
|
||||
sopsFile = sopsRoot + /dae-imxyy-nix.dae;
|
||||
format = "binary";
|
||||
};
|
||||
services.dae = {
|
||||
@@ -98,7 +95,7 @@
|
||||
};
|
||||
systemd.services.dae.after = [ "sops-nix.service" ];
|
||||
sops.secrets.mihomo = {
|
||||
sopsFile = secrets.mihomo;
|
||||
sopsFile = sopsRoot + /mihomo.yaml;
|
||||
format = "yaml";
|
||||
key = "";
|
||||
};
|
||||
@@ -110,7 +107,7 @@
|
||||
};
|
||||
|
||||
sops.secrets.et-imxyy-nix = {
|
||||
sopsFile = secrets.et-imxyy-nix;
|
||||
sopsFile = sopsRoot + /et-imxyy-nix.toml;
|
||||
format = "binary";
|
||||
};
|
||||
environment.systemPackages = [ pkgs.easytier ];
|
||||
@@ -118,8 +115,10 @@
|
||||
enable = true;
|
||||
script = "${pkgs.easytier}/bin/easytier-core -c ${config.sops.secrets.et-imxyy-nix.path}";
|
||||
serviceConfig = {
|
||||
Restart = "always";
|
||||
RestartSec = 30;
|
||||
Restart = lib.mkOverride 500 "always";
|
||||
RestartMaxDelaySec = lib.mkOverride 500 "1m";
|
||||
RestartSec = lib.mkOverride 500 "100ms";
|
||||
RestartSteps = lib.mkOverride 500 9;
|
||||
User = "root";
|
||||
};
|
||||
wantedBy = [ "multi-user.target" ];
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
pkgs,
|
||||
config,
|
||||
username,
|
||||
secrets,
|
||||
sopsRoot,
|
||||
...
|
||||
}:
|
||||
let
|
||||
@@ -22,7 +22,7 @@ let
|
||||
temp = line.split(" ")
|
||||
bus = temp[1]
|
||||
device = temp[3][:-1]
|
||||
subprocess.run(["${lib.getExe' pkgs.usbutils "usbreset"}", f"{bus}/{device}"])
|
||||
subprocess.run(["${lib.getExe usbreset}", f"/dev/bus/usb/{bus}/{device}"])
|
||||
return True
|
||||
|
||||
if __name__ == "__main__":
|
||||
@@ -36,6 +36,44 @@ let
|
||||
with open("/tmp/.btreseted", "w"):
|
||||
...
|
||||
'';
|
||||
usbreset = pkgs.writeCBin "usbreset" ''
|
||||
#include <stdio.h>
|
||||
#include <unistd.h>
|
||||
#include <fcntl.h>
|
||||
#include <sys/ioctl.h>
|
||||
|
||||
#include <linux/usbdevice_fs.h>
|
||||
|
||||
int main(int argc, char **argv)
|
||||
{
|
||||
const char *filename;
|
||||
int fd;
|
||||
int rc;
|
||||
|
||||
if (argc != 2) {
|
||||
fprintf(stderr, "Usage: usbreset device-filename\n");
|
||||
return 1;
|
||||
}
|
||||
filename = argv[1];
|
||||
|
||||
fd = open(filename, O_WRONLY);
|
||||
if (fd < 0) {
|
||||
perror("Error opening output file");
|
||||
return 1;
|
||||
}
|
||||
|
||||
printf("Resetting USB device %s\n", filename);
|
||||
rc = ioctl(fd, USBDEVFS_RESET, 0);
|
||||
if (rc < 0) {
|
||||
perror("Error in ioctl");
|
||||
return 1;
|
||||
}
|
||||
printf("Reset successful\n");
|
||||
|
||||
close(fd);
|
||||
return 0;
|
||||
}
|
||||
'';
|
||||
in
|
||||
{
|
||||
security.pam.loginLimits = [
|
||||
@@ -73,6 +111,36 @@ in
|
||||
};
|
||||
environment.variables.NIX_REMOTE = "daemon";
|
||||
|
||||
security.rtkit.enable = true;
|
||||
services.pipewire = {
|
||||
enable = true;
|
||||
alsa.enable = false;
|
||||
alsa.support32Bit = false;
|
||||
pulse.enable = false;
|
||||
audio.enable = false;
|
||||
};
|
||||
services.pulseaudio = {
|
||||
enable = true;
|
||||
support32Bit = true;
|
||||
package = pkgs.pulseaudioFull;
|
||||
extraConfig = ''
|
||||
load-module module-switch-on-connect
|
||||
unload-module module-suspend-on-idle
|
||||
'';
|
||||
};
|
||||
hardware.bluetooth = {
|
||||
enable = true;
|
||||
powerOnBoot = true;
|
||||
settings = {
|
||||
General = {
|
||||
Enable = "Source,Sink,Media,Socket";
|
||||
Disable = "HeadSet";
|
||||
MultiProfile = "multiple";
|
||||
};
|
||||
};
|
||||
};
|
||||
users.extraUsers.${username}.extraGroups = [ "audio" ];
|
||||
|
||||
fonts = {
|
||||
enableDefaultPackages = false;
|
||||
fontDir.enable = true;
|
||||
@@ -111,22 +179,16 @@ in
|
||||
|
||||
services.keyd = {
|
||||
enable = true;
|
||||
keyboards = {
|
||||
default.settings = {
|
||||
main = {
|
||||
capslock = "overload(control, esc)";
|
||||
home = "end";
|
||||
};
|
||||
shift = {
|
||||
home = "home";
|
||||
};
|
||||
control = {
|
||||
delete = "print";
|
||||
};
|
||||
keyboards.default.settings = {
|
||||
main = {
|
||||
capslock = "overload(control, esc)";
|
||||
home = "end";
|
||||
};
|
||||
kone-pro-owl-eye = {
|
||||
ids = [ "1e7d:2dcd" ];
|
||||
settings.main.mouse2 = "rightmouse";
|
||||
shift = {
|
||||
home = "home";
|
||||
};
|
||||
control = {
|
||||
delete = "print";
|
||||
};
|
||||
};
|
||||
};
|
||||
@@ -137,9 +199,6 @@ in
|
||||
programs.wireshark.package = pkgs.wireshark;
|
||||
users.users.${username}.extraGroups = [ "wireshark" ];
|
||||
|
||||
virtualisation.waydroid.enable = true;
|
||||
my.persist.homeDirs = [ ".local/share/waydroid" ];
|
||||
|
||||
services.sunshine = {
|
||||
enable = true;
|
||||
autoStart = true;
|
||||
@@ -166,7 +225,7 @@ in
|
||||
];
|
||||
|
||||
sops.secrets.imxyy-nix-rclone = {
|
||||
sopsFile = secrets.imxyy-nix-rclone;
|
||||
sopsFile = sopsRoot + /imxyy-nix-rclone.conf;
|
||||
format = "binary";
|
||||
};
|
||||
fileSystems = {
|
||||
|
||||
364
flake.lock
generated
364
flake.lock
generated
@@ -5,11 +5,11 @@
|
||||
"fromYaml": "fromYaml"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1755819240,
|
||||
"narHash": "sha256-qcMhnL7aGAuFuutH4rq9fvAhCpJWVHLcHVZLtPctPlo=",
|
||||
"lastModified": 1746562888,
|
||||
"narHash": "sha256-YgNJQyB5dQiwavdDFBMNKk1wyS77AtdgDk/VtU6wEaI=",
|
||||
"owner": "SenchoPens",
|
||||
"repo": "base16.nix",
|
||||
"rev": "75ed5e5e3fce37df22e49125181fa37899c3ccd6",
|
||||
"rev": "806a1777a5db2a1ef9d5d6f493ef2381047f2b89",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
@@ -21,28 +21,27 @@
|
||||
"base16-fish": {
|
||||
"flake": false,
|
||||
"locked": {
|
||||
"lastModified": 1754405784,
|
||||
"narHash": "sha256-l9xHIy+85FN+bEo6yquq2IjD1rSg9fjfjpyGP1W8YXo=",
|
||||
"lastModified": 1622559957,
|
||||
"narHash": "sha256-PebymhVYbL8trDVVXxCvZgc0S5VxI7I1Hv4RMSquTpA=",
|
||||
"owner": "tomyun",
|
||||
"repo": "base16-fish",
|
||||
"rev": "23ae20a0093dca0d7b39d76ba2401af0ccf9c561",
|
||||
"rev": "2f6dd973a9075dabccd26f1cded09508180bf5fe",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "tomyun",
|
||||
"repo": "base16-fish",
|
||||
"rev": "23ae20a0093dca0d7b39d76ba2401af0ccf9c561",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"base16-helix": {
|
||||
"flake": false,
|
||||
"locked": {
|
||||
"lastModified": 1752979451,
|
||||
"narHash": "sha256-0CQM+FkYy0fOO/sMGhOoNL80ftsAzYCg9VhIrodqusM=",
|
||||
"lastModified": 1748408240,
|
||||
"narHash": "sha256-9M2b1rMyMzJK0eusea0x3lyh3mu5nMeEDSc4RZkGm+g=",
|
||||
"owner": "tinted-theming",
|
||||
"repo": "base16-helix",
|
||||
"rev": "27cf1e66e50abc622fb76a3019012dc07c678fac",
|
||||
"rev": "6c711ab1a9db6f51e2f6887cc3345530b33e152e",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
@@ -99,26 +98,6 @@
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"catppuccin": {
|
||||
"inputs": {
|
||||
"nixpkgs": [
|
||||
"nixpkgs"
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1760692571,
|
||||
"narHash": "sha256-SgqC+B7F7hHDKug+zRUL83vhibCSknzhRl0+OxUYjn4=",
|
||||
"owner": "catppuccin",
|
||||
"repo": "nix",
|
||||
"rev": "8a084b86b6a4b2a1575e8cc67e07c4a687fce276",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "catppuccin",
|
||||
"repo": "nix",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"chaotic": {
|
||||
"inputs": {
|
||||
"flake-schemas": "flake-schemas",
|
||||
@@ -128,11 +107,11 @@
|
||||
"rust-overlay": "rust-overlay"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1760658963,
|
||||
"narHash": "sha256-+WZ5XSxe71G8bVxPsJGgEO/IA5une2lNPCKyS/ww0BM=",
|
||||
"lastModified": 1752141190,
|
||||
"narHash": "sha256-RHNq77Z84BtLTwyRtrBffm5V9006Dqw4vh3vrvULlxM=",
|
||||
"owner": "chaotic-cx",
|
||||
"repo": "nyx",
|
||||
"rev": "1d768e4d3372f5b832a2d332997fe1e0e38edb67",
|
||||
"rev": "ef0794b8e94eea166407141f7e92da75f6df925a",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
@@ -149,11 +128,11 @@
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1757962227,
|
||||
"narHash": "sha256-BENROvRjnKLjCc1qwGgScfk6WIdHGwz4vZhsmfa///Q=",
|
||||
"lastModified": 1750940343,
|
||||
"narHash": "sha256-qmc/jreM09MOwQ8dOa/+yyh99rU7TowSqo8L33VHfto=",
|
||||
"owner": "Bali10050",
|
||||
"repo": "Darkly",
|
||||
"rev": "c1446a049c4e2f78afbd90d8b642dc73a3027f1a",
|
||||
"rev": "77770c8d3c35f7ad39da2c57122c360096df0aac",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
@@ -192,11 +171,11 @@
|
||||
"rust-analyzer-src": "rust-analyzer-src"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1760683279,
|
||||
"narHash": "sha256-4XZVvUQEG5E+DdrOKXeZPD2uFQSYSK3YHBryHdZjpuU=",
|
||||
"lastModified": 1752129689,
|
||||
"narHash": "sha256-0Xq5tZbvgZvxbbxv6kRHFuZE4Tq2za016NXh32nX0+Q=",
|
||||
"owner": "nix-community",
|
||||
"repo": "fenix",
|
||||
"rev": "4cb5a965947d39ce5b8cc10dbd581f07ee8cbd8a",
|
||||
"rev": "70bb04a7de606a75ba0a2ee9d47b99802780b35d",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
@@ -208,11 +187,11 @@
|
||||
"firefox-gnome-theme": {
|
||||
"flake": false,
|
||||
"locked": {
|
||||
"lastModified": 1758112371,
|
||||
"narHash": "sha256-lizRM2pj6PHrR25yimjyFn04OS4wcdbc38DCdBVa2rk=",
|
||||
"lastModified": 1748383148,
|
||||
"narHash": "sha256-pGvD/RGuuPf/4oogsfeRaeMm6ipUIznI2QSILKjKzeA=",
|
||||
"owner": "rafaelmardojai",
|
||||
"repo": "firefox-gnome-theme",
|
||||
"rev": "0909cfe4a2af8d358ad13b20246a350e14c2473d",
|
||||
"rev": "4eb2714fbed2b80e234312611a947d6cb7d70caf",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
@@ -294,6 +273,27 @@
|
||||
}
|
||||
},
|
||||
"flake-parts_3": {
|
||||
"inputs": {
|
||||
"nixpkgs-lib": [
|
||||
"nur",
|
||||
"nixpkgs"
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1733312601,
|
||||
"narHash": "sha256-4pDvzqnegAfRkPwO3wmwBhVi/Sye1mzps0zHWYnP88c=",
|
||||
"owner": "hercules-ci",
|
||||
"repo": "flake-parts",
|
||||
"rev": "205b12d8b7cd4802fbcb8e8ef6a0f1408781a4f9",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "hercules-ci",
|
||||
"repo": "flake-parts",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"flake-parts_4": {
|
||||
"inputs": {
|
||||
"nixpkgs-lib": [
|
||||
"stylix",
|
||||
@@ -301,11 +301,11 @@
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1756770412,
|
||||
"narHash": "sha256-+uWLQZccFHwqpGqr2Yt5VsW/PbeJVTn9Dk6SHWhNRPw=",
|
||||
"lastModified": 1751413152,
|
||||
"narHash": "sha256-Tyw1RjYEsp5scoigs1384gIg6e0GoBVjms4aXFfRssQ=",
|
||||
"owner": "hercules-ci",
|
||||
"repo": "flake-parts",
|
||||
"rev": "4524271976b625a4a605beefd893f270620fd751",
|
||||
"rev": "77826244401ea9de6e3bac47c2db46005e1f30b5",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
@@ -457,11 +457,11 @@
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1755219990,
|
||||
"narHash": "sha256-/znXwik9nC9TY6dwq0SR60MAi9IEZi2InRSRjfhKu1s=",
|
||||
"lastModified": 1748528448,
|
||||
"narHash": "sha256-Tyn+PgBm78Ibq28/WbEz8+pYJZMdbJKsyXMCpT6TjrM=",
|
||||
"owner": "imxyy1soope1",
|
||||
"repo": "go-musicfox",
|
||||
"rev": "938c4d6bb2a318bc6251f3b11fa8cf54d29b4419",
|
||||
"rev": "1870fd3501631577ad4daef1489b03885abcb037",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
@@ -500,11 +500,11 @@
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1760500983,
|
||||
"narHash": "sha256-zfY4F4CpeUjTGgecIJZ+M7vFpwLc0Gm9epM/iMQd4w8=",
|
||||
"lastModified": 1751824240,
|
||||
"narHash": "sha256-aDDC0CHTlL7QDKWWhdbEgVPK6KwWt+ca0QkmHYZxMzI=",
|
||||
"owner": "nix-community",
|
||||
"repo": "home-manager",
|
||||
"rev": "c53e65ec92f38d30e3c14f8d628ab55d462947aa",
|
||||
"rev": "fd9e55f5fac45a26f6169310afca64d56b681935",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
@@ -520,11 +520,11 @@
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1760662441,
|
||||
"narHash": "sha256-mlDqR1Ntgs9uYYEAUR1IhamKBO0lxoNS4zGLzEZaY0A=",
|
||||
"lastModified": 1752202894,
|
||||
"narHash": "sha256-knafgng4gCjZIUMyAEWjxxdols6n/swkYnbWr+oF+1w=",
|
||||
"owner": "nix-community",
|
||||
"repo": "home-manager",
|
||||
"rev": "722792af097dff5790f1a66d271a47759f477755",
|
||||
"rev": "fab659b346c0d4252208434c3c4b3983a4b38fec",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
@@ -542,11 +542,11 @@
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1752603129,
|
||||
"narHash": "sha256-S+wmHhwNQ5Ru689L2Gu8n1OD6s9eU9n9mD827JNR+kw=",
|
||||
"lastModified": 1743604125,
|
||||
"narHash": "sha256-ZD61DNbsBt1mQbinAaaEqKaJk2RFo9R/j+eYWeGMx7A=",
|
||||
"owner": "nix-community",
|
||||
"repo": "home-manager",
|
||||
"rev": "e8c19a3cec2814c754f031ab3ae7316b64da085b",
|
||||
"rev": "180fd43eea296e62ae68e079fcf56aba268b9a1a",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
@@ -595,11 +595,11 @@
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1760534924,
|
||||
"narHash": "sha256-OIOCC86DxTxp1VG7xAiM+YABtVqp6vTkYIoAiGQMqso=",
|
||||
"lastModified": 1751529406,
|
||||
"narHash": "sha256-jwKDHyUycp678zDYa5Hyfq3msO73YMXdZPxp96dU7po=",
|
||||
"owner": "Jovian-Experiments",
|
||||
"repo": "Jovian-NixOS",
|
||||
"rev": "100b4e000032b865563a9754e5bca189bc544764",
|
||||
"rev": "b2e5ce654e4f5bf8905c2e07a96dcf4966e6277d",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
@@ -658,17 +658,21 @@
|
||||
"inputs": {
|
||||
"niri-stable": "niri-stable",
|
||||
"niri-unstable": "niri-unstable",
|
||||
"nixpkgs": "nixpkgs_5",
|
||||
"nixpkgs-stable": "nixpkgs-stable",
|
||||
"nixpkgs": [
|
||||
"nixpkgs"
|
||||
],
|
||||
"nixpkgs-stable": [
|
||||
"nixpkgs-stable"
|
||||
],
|
||||
"xwayland-satellite-stable": "xwayland-satellite-stable",
|
||||
"xwayland-satellite-unstable": "xwayland-satellite-unstable"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1760700290,
|
||||
"narHash": "sha256-thtIzWn8YB/zXfXR0Cv7pQ0ID8YTc05d9eedk1lu+zI=",
|
||||
"lastModified": 1752078530,
|
||||
"narHash": "sha256-TrRmlYdhWcadWvBpDjB9Xlry4uT4ZUIO46d+o5tjtCQ=",
|
||||
"owner": "sodiboo",
|
||||
"repo": "niri-flake",
|
||||
"rev": "b80575644cb2bf9eb0050974dcd988e781ffd340",
|
||||
"rev": "d231d92313192d4d0c78d6ef04167fed9dee87cf",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
@@ -680,16 +684,16 @@
|
||||
"niri-stable": {
|
||||
"flake": false,
|
||||
"locked": {
|
||||
"lastModified": 1756556321,
|
||||
"narHash": "sha256-RLD89dfjN0RVO86C/Mot0T7aduCygPGaYbog566F0Qo=",
|
||||
"lastModified": 1748151941,
|
||||
"narHash": "sha256-z4viQZLgC2bIJ3VrzQnR+q2F3gAOEQpU1H5xHtX/2fs=",
|
||||
"owner": "YaLTeR",
|
||||
"repo": "niri",
|
||||
"rev": "01be0e65f4eb91a9cd624ac0b76aaeab765c7294",
|
||||
"rev": "8ba57fcf25d2fc9565131684a839d58703f1dae7",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "YaLTeR",
|
||||
"ref": "v25.08",
|
||||
"ref": "v25.05.1",
|
||||
"repo": "niri",
|
||||
"type": "github"
|
||||
}
|
||||
@@ -697,11 +701,11 @@
|
||||
"niri-unstable": {
|
||||
"flake": false,
|
||||
"locked": {
|
||||
"lastModified": 1760524031,
|
||||
"narHash": "sha256-hcyRViwdsrNUjHTcY0VGygcAawcyU4zYEq7ZZObFwkw=",
|
||||
"lastModified": 1750791124,
|
||||
"narHash": "sha256-F5iVU/hjoSHSSe0gllxm0PcAaseEtGNanYK5Ha3k2Tg=",
|
||||
"owner": "YaLTeR",
|
||||
"repo": "niri",
|
||||
"rev": "2776005c5fc4fbb85636672213b8b84a319dfb01",
|
||||
"rev": "37458d94b288945f6cfbd3c5c233f634d59f246c",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
@@ -800,11 +804,11 @@
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1760536587,
|
||||
"narHash": "sha256-wfWqt+igns/VazjPLkyb4Z/wpn4v+XIjUeI3xY/1ENg=",
|
||||
"lastModified": 1752199438,
|
||||
"narHash": "sha256-xSBMmGtq8K4Qv80TMqREmESCAsRLJRHAbFH2T/2Bf1Y=",
|
||||
"owner": "nix-community",
|
||||
"repo": "NixOS-WSL",
|
||||
"rev": "f98ee1de1fa36eca63c67b600f5d617e184e82ea",
|
||||
"rev": "d34d9412556d3a896e294534ccd25f53b6822e80",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
@@ -815,11 +819,11 @@
|
||||
},
|
||||
"nixpkgs": {
|
||||
"locked": {
|
||||
"lastModified": 1760524057,
|
||||
"narHash": "sha256-EVAqOteLBFmd7pKkb0+FIUyzTF61VKi7YmvP1tw4nEw=",
|
||||
"lastModified": 1751984180,
|
||||
"narHash": "sha256-LwWRsENAZJKUdD3SpLluwDmdXY9F45ZEgCb0X+xgOL0=",
|
||||
"owner": "NixOS",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "544961dfcce86422ba200ed9a0b00dd4b1486ec5",
|
||||
"rev": "9807714d6944a957c2e036f84b0ff8caf9930bc0",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
@@ -843,11 +847,11 @@
|
||||
},
|
||||
"nixpkgs-master": {
|
||||
"locked": {
|
||||
"lastModified": 1760700601,
|
||||
"narHash": "sha256-lKoBZZQX7oFds0GhnJmbQ8TzjyTN9gW9X6hW4HHgXnI=",
|
||||
"lastModified": 1752206449,
|
||||
"narHash": "sha256-NVAbC/s4CupABWGXF8M9mDiVw/n0YCftxwc1KatVjDk=",
|
||||
"owner": "nixos",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "3d6695b9e8b58ee7d3330a39e89124449d609b1c",
|
||||
"rev": "1bd4d0d4a678d48b63eb18f457d74df2fcee6c69",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
@@ -859,27 +863,11 @@
|
||||
},
|
||||
"nixpkgs-stable": {
|
||||
"locked": {
|
||||
"lastModified": 1760580664,
|
||||
"narHash": "sha256-/YdfibIrnqXAL8p5kqCU345mzpHoOtuVIkMiI2pF4Dc=",
|
||||
"owner": "NixOS",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "98ff3f9af2684f6136c24beef08f5e2033fc5389",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "NixOS",
|
||||
"ref": "nixos-25.05",
|
||||
"repo": "nixpkgs",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"nixpkgs-stable_2": {
|
||||
"locked": {
|
||||
"lastModified": 1760692344,
|
||||
"narHash": "sha256-kWyFvx8B1+cbmeGTt7kGAoOgPQfaf3xQnbNfNCGLvMw=",
|
||||
"lastModified": 1752203688,
|
||||
"narHash": "sha256-uJ054F5PVGPu5SvLPMevhdY/EfK0X5DUyRtXhQYNUyo=",
|
||||
"owner": "nixos",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "31ec1e52d5702b73565a11f1c655c1256fc27967",
|
||||
"rev": "a70a12c75e13aa546c20ce0fe515de634d52c39e",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
@@ -891,16 +879,16 @@
|
||||
},
|
||||
"nixpkgs-unstable": {
|
||||
"locked": {
|
||||
"lastModified": 1760524057,
|
||||
"narHash": "sha256-EVAqOteLBFmd7pKkb0+FIUyzTF61VKi7YmvP1tw4nEw=",
|
||||
"lastModified": 1752124863,
|
||||
"narHash": "sha256-5rWuf6RAlMDp/CAEuyYEz7ryxzgjxOCgUDhWEef864c=",
|
||||
"owner": "nixos",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "544961dfcce86422ba200ed9a0b00dd4b1486ec5",
|
||||
"rev": "40de82b434526744da778ed53c742c1282d9e75e",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "nixos",
|
||||
"ref": "nixos-unstable",
|
||||
"ref": "nixos-unstable-small",
|
||||
"repo": "nixpkgs",
|
||||
"type": "github"
|
||||
}
|
||||
@@ -955,45 +943,40 @@
|
||||
},
|
||||
"nixpkgs_5": {
|
||||
"locked": {
|
||||
"lastModified": 1760524057,
|
||||
"narHash": "sha256-EVAqOteLBFmd7pKkb0+FIUyzTF61VKi7YmvP1tw4nEw=",
|
||||
"owner": "NixOS",
|
||||
"lastModified": 1751984180,
|
||||
"narHash": "sha256-LwWRsENAZJKUdD3SpLluwDmdXY9F45ZEgCb0X+xgOL0=",
|
||||
"owner": "nixos",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "544961dfcce86422ba200ed9a0b00dd4b1486ec5",
|
||||
"rev": "9807714d6944a957c2e036f84b0ff8caf9930bc0",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "NixOS",
|
||||
"owner": "nixos",
|
||||
"ref": "nixos-unstable",
|
||||
"repo": "nixpkgs",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"noctalia": {
|
||||
"nur": {
|
||||
"inputs": {
|
||||
"nixpkgs": [
|
||||
"nixpkgs"
|
||||
],
|
||||
"quickshell": [
|
||||
"quickshell"
|
||||
],
|
||||
"systems": "systems_2"
|
||||
"flake-parts": "flake-parts_3",
|
||||
"nixpkgs": "nixpkgs_5"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1760714359,
|
||||
"narHash": "sha256-SveT35nrv8qLnxKHp8MLXaY0rVd9BFhVOAn3WR79S84=",
|
||||
"owner": "noctalia-dev",
|
||||
"repo": "noctalia-shell",
|
||||
"rev": "bda54677e1724054c3676da8f049c61378790b3a",
|
||||
"lastModified": 1752207112,
|
||||
"narHash": "sha256-dnVoQSGQqEGJQzS6iHAG95c0oFrezzBinwu1bDLj9J4=",
|
||||
"owner": "nix-community",
|
||||
"repo": "NUR",
|
||||
"rev": "f166dc14862dfec043f9545e8291cc4402f8b866",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "noctalia-dev",
|
||||
"repo": "noctalia-shell",
|
||||
"owner": "nix-community",
|
||||
"repo": "NUR",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"nur": {
|
||||
"nur_2": {
|
||||
"inputs": {
|
||||
"flake-parts": [
|
||||
"stylix",
|
||||
@@ -1005,11 +988,11 @@
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1758998580,
|
||||
"narHash": "sha256-VLx0z396gDCGSiowLMFz5XRO/XuNV+4EnDYjdJhHvUk=",
|
||||
"lastModified": 1751906969,
|
||||
"narHash": "sha256-BSQAOdPnzdpOuCdAGSJmefSDlqmStFNScEnrWzSqKPw=",
|
||||
"owner": "nix-community",
|
||||
"repo": "NUR",
|
||||
"rev": "ba8d9c98f5f4630bcb0e815ab456afd90c930728",
|
||||
"rev": "ddb679f4131e819efe3bbc6457ba19d7ad116f25",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
@@ -1018,23 +1001,6 @@
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"plant": {
|
||||
"flake": false,
|
||||
"locked": {
|
||||
"lastModified": 1758423341,
|
||||
"narHash": "sha256-dHcKh7T8I70bKPwgqO5MxZ9bWHINwzRPhFp5waQy2r8=",
|
||||
"ref": "refs/heads/master",
|
||||
"rev": "08dc0b3889797eb3618c7475c3c367ec0e5fdf40",
|
||||
"revCount": 6,
|
||||
"type": "git",
|
||||
"url": "ssh://git@git.imxyy.top:2222/imxyy1soope1/HF-plant.git"
|
||||
},
|
||||
"original": {
|
||||
"rev": "08dc0b3889797eb3618c7475c3c367ec0e5fdf40",
|
||||
"type": "git",
|
||||
"url": "ssh://git@git.imxyy.top:2222/imxyy1soope1/HF-plant.git"
|
||||
}
|
||||
},
|
||||
"quickshell": {
|
||||
"inputs": {
|
||||
"nixpkgs": [
|
||||
@@ -1042,22 +1008,21 @@
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1760315601,
|
||||
"narHash": "sha256-cvguRikKX0yXZ7jaK4Gt3qB1I33T5TzYZQf0Ampx8ko=",
|
||||
"owner": "outfoxxed",
|
||||
"repo": "quickshell",
|
||||
"rev": "00858812f25b748d08b075a0d284093685fa3ffd",
|
||||
"type": "github"
|
||||
"lastModified": 1752146885,
|
||||
"narHash": "sha256-ZJK989GL+bTCQSxbG8v8/7tHMCEl/FPovkeDBNyClQE=",
|
||||
"ref": "refs/heads/master",
|
||||
"rev": "d7079b75241c6e2b67f2429996fa7679ffc052e2",
|
||||
"revCount": 616,
|
||||
"type": "git",
|
||||
"url": "https://git.outfoxxed.me/outfoxxed/quickshell"
|
||||
},
|
||||
"original": {
|
||||
"owner": "outfoxxed",
|
||||
"repo": "quickshell",
|
||||
"type": "github"
|
||||
"type": "git",
|
||||
"url": "https://git.outfoxxed.me/outfoxxed/quickshell"
|
||||
}
|
||||
},
|
||||
"root": {
|
||||
"inputs": {
|
||||
"catppuccin": "catppuccin",
|
||||
"chaotic": "chaotic",
|
||||
"darkly": "darkly",
|
||||
"fenix": "fenix",
|
||||
@@ -1072,10 +1037,9 @@
|
||||
"nixpkgs-unstable"
|
||||
],
|
||||
"nixpkgs-master": "nixpkgs-master",
|
||||
"nixpkgs-stable": "nixpkgs-stable_2",
|
||||
"nixpkgs-stable": "nixpkgs-stable",
|
||||
"nixpkgs-unstable": "nixpkgs-unstable",
|
||||
"noctalia": "noctalia",
|
||||
"plant": "plant",
|
||||
"nur": "nur",
|
||||
"quickshell": "quickshell",
|
||||
"sops-nix": "sops-nix",
|
||||
"stylix": "stylix",
|
||||
@@ -1085,11 +1049,11 @@
|
||||
"rust-analyzer-src": {
|
||||
"flake": false,
|
||||
"locked": {
|
||||
"lastModified": 1760600226,
|
||||
"narHash": "sha256-784DaL8oPeUWFIKzNJpwmBRdlO4ragb6BYqBBuL2+M0=",
|
||||
"lastModified": 1752086493,
|
||||
"narHash": "sha256-USpVUdiWXDfPoh+agbvoBQaBhg3ZdKZgHXo/HikMfVo=",
|
||||
"owner": "rust-lang",
|
||||
"repo": "rust-analyzer",
|
||||
"rev": "0138b8241ccfefbf37f253b15786819620ef75ec",
|
||||
"rev": "6e3abe164b9036048dce1a3aa65a7e7e5200c0d3",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
@@ -1107,11 +1071,11 @@
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1760495781,
|
||||
"narHash": "sha256-3OGPAQNJswy6L4VJyX3U9/z7fwgPFvK6zQtB2NHBV0Y=",
|
||||
"lastModified": 1751856221,
|
||||
"narHash": "sha256-/QE1eV0ckFvgRMcKjZqgdJDoXFNwSMepwRoBjaw2MCk=",
|
||||
"owner": "oxalica",
|
||||
"repo": "rust-overlay",
|
||||
"rev": "11e0852a2aa3a65955db5824262d76933750e299",
|
||||
"rev": "34cae4b56929c5b340e1c5b10d9a98a425b2a51e",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
@@ -1127,16 +1091,15 @@
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1760448654,
|
||||
"narHash": "sha256-cut3Y7R1rychkbC9O6y4jR9mas6ptmB6k9ozsV9wNLY=",
|
||||
"lastModified": 1751606940,
|
||||
"narHash": "sha256-KrDPXobG7DFKTOteqdSVeL1bMVitDcy7otpVZWDE6MA=",
|
||||
"owner": "Mic92",
|
||||
"repo": "sops-nix",
|
||||
"rev": "0bdcabcd1534d6a12147e29fbb126e344c75e7c6",
|
||||
"rev": "3633fc4acf03f43b260244d94c71e9e14a2f6e0d",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "Mic92",
|
||||
"ref": "pull/779/merge",
|
||||
"repo": "sops-nix",
|
||||
"type": "github"
|
||||
}
|
||||
@@ -1148,13 +1111,13 @@
|
||||
"base16-helix": "base16-helix",
|
||||
"base16-vim": "base16-vim",
|
||||
"firefox-gnome-theme": "firefox-gnome-theme",
|
||||
"flake-parts": "flake-parts_3",
|
||||
"flake-parts": "flake-parts_4",
|
||||
"gnome-shell": "gnome-shell",
|
||||
"nixpkgs": [
|
||||
"nixpkgs"
|
||||
],
|
||||
"nur": "nur",
|
||||
"systems": "systems_3",
|
||||
"nur": "nur_2",
|
||||
"systems": "systems_2",
|
||||
"tinted-foot": "tinted-foot",
|
||||
"tinted-kitty": "tinted-kitty",
|
||||
"tinted-schemes": "tinted-schemes",
|
||||
@@ -1162,11 +1125,11 @@
|
||||
"tinted-zed": "tinted-zed"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1760472212,
|
||||
"narHash": "sha256-4C3I/ssFsq8EgaUmZP0xv5V7RV0oCHgL/Rx+MUkuE+E=",
|
||||
"lastModified": 1752201883,
|
||||
"narHash": "sha256-SZVbQ4YThvYU50cJ4W4GNMy7/rVOJI8qmXqbEcRNsug=",
|
||||
"owner": "danth",
|
||||
"repo": "stylix",
|
||||
"rev": "8d008296a1b3be9b57ad570f7acea00dd2fc92db",
|
||||
"rev": "d395780b9c5c36f191b990b2021c71af180a1982",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
@@ -1205,21 +1168,6 @@
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"systems_3": {
|
||||
"locked": {
|
||||
"lastModified": 1681028828,
|
||||
"narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=",
|
||||
"owner": "nix-systems",
|
||||
"repo": "default",
|
||||
"rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "nix-systems",
|
||||
"repo": "default",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"tinted-foot": {
|
||||
"flake": false,
|
||||
"locked": {
|
||||
@@ -1256,11 +1204,11 @@
|
||||
"tinted-schemes": {
|
||||
"flake": false,
|
||||
"locked": {
|
||||
"lastModified": 1757716333,
|
||||
"narHash": "sha256-d4km8W7w2zCUEmPAPUoLk1NlYrGODuVa3P7St+UrqkM=",
|
||||
"lastModified": 1750770351,
|
||||
"narHash": "sha256-LI+BnRoFNRa2ffbe3dcuIRYAUcGklBx0+EcFxlHj0SY=",
|
||||
"owner": "tinted-theming",
|
||||
"repo": "schemes",
|
||||
"rev": "317a5e10c35825a6c905d912e480dfe8e71c7559",
|
||||
"rev": "5a775c6ffd6e6125947b393872cde95867d85a2a",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
@@ -1272,11 +1220,11 @@
|
||||
"tinted-tmux": {
|
||||
"flake": false,
|
||||
"locked": {
|
||||
"lastModified": 1757811970,
|
||||
"narHash": "sha256-n5ZJgmzGZXOD9pZdAl1OnBu3PIqD+X3vEBUGbTi4JiI=",
|
||||
"lastModified": 1751159871,
|
||||
"narHash": "sha256-UOHBN1fgHIEzvPmdNMHaDvdRMgLmEJh2hNmDrp3d3LE=",
|
||||
"owner": "tinted-theming",
|
||||
"repo": "tinted-tmux",
|
||||
"rev": "d217ba31c846006e9e0ae70775b0ee0f00aa6b1e",
|
||||
"rev": "bded5e24407cec9d01bd47a317d15b9223a1546c",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
@@ -1288,11 +1236,11 @@
|
||||
"tinted-zed": {
|
||||
"flake": false,
|
||||
"locked": {
|
||||
"lastModified": 1757811247,
|
||||
"narHash": "sha256-4EFOUyLj85NRL3OacHoLGEo0wjiRJzfsXtR4CZWAn6w=",
|
||||
"lastModified": 1751158968,
|
||||
"narHash": "sha256-ksOyv7D3SRRtebpXxgpG4TK8gZSKFc4TIZpR+C98jX8=",
|
||||
"owner": "tinted-theming",
|
||||
"repo": "base16-zed",
|
||||
"rev": "824fe0aacf82b3c26690d14e8d2cedd56e18404e",
|
||||
"rev": "86a470d94204f7652b906ab0d378e4231a5b3384",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
@@ -1304,16 +1252,16 @@
|
||||
"xwayland-satellite-stable": {
|
||||
"flake": false,
|
||||
"locked": {
|
||||
"lastModified": 1755491097,
|
||||
"narHash": "sha256-m+9tUfsmBeF2Gn4HWa6vSITZ4Gz1eA1F5Kh62B0N4oE=",
|
||||
"lastModified": 1748488455,
|
||||
"narHash": "sha256-IiLr1alzKFIy5tGGpDlabQbe6LV1c9ABvkH6T5WmyRI=",
|
||||
"owner": "Supreeeme",
|
||||
"repo": "xwayland-satellite",
|
||||
"rev": "388d291e82ffbc73be18169d39470f340707edaa",
|
||||
"rev": "3ba30b149f9eb2bbf42cf4758d2158ca8cceef73",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "Supreeeme",
|
||||
"ref": "v0.7",
|
||||
"ref": "v0.6",
|
||||
"repo": "xwayland-satellite",
|
||||
"type": "github"
|
||||
}
|
||||
@@ -1321,11 +1269,11 @@
|
||||
"xwayland-satellite-unstable": {
|
||||
"flake": false,
|
||||
"locked": {
|
||||
"lastModified": 1759707084,
|
||||
"narHash": "sha256-0pkftKs6/LReNvxw7DVTN2AJEheZVgyeK0Aarbagi70=",
|
||||
"lastModified": 1751228685,
|
||||
"narHash": "sha256-MENtauGBhJ+kDeFaawvWGXaFG3Il6qQzjaP0RmtfM0k=",
|
||||
"owner": "Supreeeme",
|
||||
"repo": "xwayland-satellite",
|
||||
"rev": "a9188e70bd748118b4d56a529871b9de5adb9988",
|
||||
"rev": "557ebeb616e03d5e4a8049862bbbd1f02c6f020b",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
@@ -1342,11 +1290,11 @@
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1760675007,
|
||||
"narHash": "sha256-uzFK9GgP/6TiPyXmSXeNQld3pG1zeWsPfi+ut/vrkrI=",
|
||||
"lastModified": 1752164817,
|
||||
"narHash": "sha256-LJFIx27IOUowLsJn5wci9mHZ4CesJsiAivQWDjnZPCc=",
|
||||
"owner": "0xc000022070",
|
||||
"repo": "zen-browser-flake",
|
||||
"rev": "11308e8294b68cda466145d5982996c489c126bc",
|
||||
"rev": "9193992c4c2c4349b4280ec2b49648cae208fe63",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
||||
129
flake.nix
129
flake.nix
@@ -3,7 +3,7 @@
|
||||
|
||||
inputs = {
|
||||
# Nixpkgs
|
||||
nixpkgs-unstable.url = "github:nixos/nixpkgs/nixos-unstable";
|
||||
nixpkgs-unstable.url = "github:nixos/nixpkgs/nixos-unstable-small";
|
||||
nixpkgs-stable.url = "github:nixos/nixpkgs/release-25.05";
|
||||
nixpkgs-master.url = "github:nixos/nixpkgs/master";
|
||||
# nixpkgs.follows = "nixpkgs-stable";
|
||||
@@ -13,84 +13,53 @@
|
||||
# Nyxpkgs
|
||||
chaotic.url = "github:chaotic-cx/nyx/nyxpkgs-unstable";
|
||||
|
||||
# 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";
|
||||
};
|
||||
# SOPS
|
||||
sops-nix.url = "github:Mic92/sops-nix";
|
||||
sops-nix.inputs.nixpkgs.follows = "nixpkgs";
|
||||
|
||||
# Home manager
|
||||
home-manager = {
|
||||
url = "github:nix-community/home-manager/master";
|
||||
inputs.nixpkgs.follows = "nixpkgs";
|
||||
};
|
||||
home-manager.url = "github:nix-community/home-manager/master";
|
||||
home-manager.inputs.nixpkgs.follows = "nixpkgs";
|
||||
|
||||
# Impermanence
|
||||
impermanence.url = "github:nix-community/impermanence";
|
||||
|
||||
# NUR
|
||||
nur.url = "github:nix-community/NUR";
|
||||
|
||||
# Niri
|
||||
niri.url = "github:sodiboo/niri-flake";
|
||||
niri.inputs.nixpkgs.follows = "nixpkgs";
|
||||
niri.inputs.nixpkgs-stable.follows = "nixpkgs-stable";
|
||||
|
||||
darkly = {
|
||||
url = "github:Bali10050/Darkly";
|
||||
inputs.nixpkgs.follows = "nixpkgs";
|
||||
};
|
||||
quickshell.url = "git+https://git.outfoxxed.me/outfoxxed/quickshell";
|
||||
quickshell.inputs.nixpkgs.follows = "nixpkgs";
|
||||
|
||||
stylix = {
|
||||
url = "github:danth/stylix";
|
||||
inputs.nixpkgs.follows = "nixpkgs";
|
||||
};
|
||||
darkly.url = "github:Bali10050/Darkly";
|
||||
darkly.inputs.nixpkgs.follows = "nixpkgs";
|
||||
|
||||
stylix.url = "github:danth/stylix";
|
||||
stylix.inputs.nixpkgs.follows = "nixpkgs";
|
||||
|
||||
# go-musicfox
|
||||
go-musicfox = {
|
||||
url = "github:imxyy1soope1/go-musicfox/master";
|
||||
inputs.nixpkgs.follows = "nixpkgs";
|
||||
};
|
||||
go-musicfox.url = "github:imxyy1soope1/go-musicfox/master";
|
||||
go-musicfox.inputs.nixpkgs.follows = "nixpkgs";
|
||||
|
||||
# NixOS-WSL
|
||||
nixos-wsl = {
|
||||
url = "github:nix-community/NixOS-WSL";
|
||||
inputs.nixpkgs.follows = "nixpkgs";
|
||||
};
|
||||
nixos-wsl.url = "github:nix-community/NixOS-WSL";
|
||||
nixos-wsl.inputs.nixpkgs.follows = "nixpkgs";
|
||||
|
||||
fenix = {
|
||||
url = "github:nix-community/fenix";
|
||||
inputs.nixpkgs.follows = "nixpkgs";
|
||||
};
|
||||
fenix.url = "github:nix-community/fenix";
|
||||
fenix.inputs.nixpkgs.follows = "nixpkgs";
|
||||
|
||||
zen.url = "github:0xc000022070/zen-browser-flake";
|
||||
zen.inputs.nixpkgs.follows = "nixpkgs";
|
||||
|
||||
quickshell = {
|
||||
url = "github:outfoxxed/quickshell";
|
||||
inputs.nixpkgs.follows = "nixpkgs";
|
||||
};
|
||||
noctalia = {
|
||||
url = "github:noctalia-dev/noctalia-shell";
|
||||
inputs.nixpkgs.follows = "nixpkgs";
|
||||
inputs.quickshell.follows = "quickshell"; # Use same quickshell version
|
||||
};
|
||||
infuse.url = "git+https://codeberg.org/amjoseph/infuse.nix";
|
||||
infuse.flake = false;
|
||||
|
||||
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 = {
|
||||
url = "github:nix-community/haumea/v0.2.2";
|
||||
inputs.nixpkgs.follows = "nixpkgs";
|
||||
};
|
||||
haumea.url = "github:nix-community/haumea/v0.2.2";
|
||||
haumea.inputs.nixpkgs.follows = "nixpkgs";
|
||||
};
|
||||
|
||||
outputs =
|
||||
@@ -102,10 +71,10 @@
|
||||
let
|
||||
inherit (self) outputs;
|
||||
vars = import ./vars.nix;
|
||||
forAllSystems = lib.genAttrs lib.systems.flakeExposed;
|
||||
forAllSystems = nixpkgs.lib.genAttrs nixpkgs.lib.systems.flakeExposed;
|
||||
forAllHosts =
|
||||
mkSystem:
|
||||
lib.mergeAttrsList (
|
||||
nixpkgs.lib.attrsets.mergeAttrsList (
|
||||
builtins.map (hostname: {
|
||||
${hostname} = mkSystem hostname;
|
||||
}) (builtins.attrNames (builtins.readDir ./config/hosts))
|
||||
@@ -169,8 +138,17 @@
|
||||
(final: prev: {
|
||||
darkly-qt5 = inputs.darkly.packages.${final.system}.darkly-qt5;
|
||||
darkly-qt6 = inputs.darkly.packages.${final.system}.darkly-qt6;
|
||||
|
||||
noctalia-shell = inputs.noctalia.packages.${final.system}.default;
|
||||
})
|
||||
(final: prev: {
|
||||
quickshell = inputs.quickshell.packages.${final.system}.default.override {
|
||||
withJemalloc = true;
|
||||
withQtSvg = true;
|
||||
withWayland = true;
|
||||
withPipewire = true;
|
||||
withPam = false;
|
||||
withX11 = false;
|
||||
withHyprland = false;
|
||||
};
|
||||
})
|
||||
(final: prev: {
|
||||
inherit lib;
|
||||
@@ -182,7 +160,6 @@
|
||||
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
|
||||
(
|
||||
@@ -208,24 +185,9 @@
|
||||
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;
|
||||
sopsRoot = ./secrets;
|
||||
flake = ./.;
|
||||
} // vars;
|
||||
modules =
|
||||
(lib.umport {
|
||||
paths = [ ./modules ];
|
||||
@@ -236,7 +198,7 @@
|
||||
recursive = true;
|
||||
})
|
||||
++ [
|
||||
(lib.mkAliasOptionModule [ "my" "hm" ] [ "home-manager" "users" vars.username ])
|
||||
(lib.mkAliasOptionModule [ "my" "home" ] [ "home-manager" "users" vars.username ])
|
||||
./config/base.nix
|
||||
./config/hosts/${hostname}
|
||||
inputs.chaotic.nixosModules.default
|
||||
@@ -244,7 +206,6 @@
|
||||
inputs.impermanence.nixosModules.impermanence
|
||||
inputs.home-manager.nixosModules.default
|
||||
inputs.niri.nixosModules.niri
|
||||
inputs.catppuccin.nixosModules.catppuccin
|
||||
home
|
||||
pkgsConf
|
||||
];
|
||||
|
||||
@@ -36,7 +36,7 @@
|
||||
optionName = packageName;
|
||||
config' = lib.mkMerge [
|
||||
{
|
||||
my.hm.home.packages = [ (lib.getAttrFromPath packagePath pkgs) ];
|
||||
my.home.home.packages = [ (lib.getAttrFromPath packagePath pkgs) ];
|
||||
}
|
||||
extraConfig
|
||||
];
|
||||
@@ -55,7 +55,7 @@
|
||||
|
||||
config' = lib.mkMerge [
|
||||
{
|
||||
my.hm.programs = lib.setAttrByPath [ programName "enable" ] true;
|
||||
my.home.programs = lib.setAttrByPath [ programName "enable" ] true;
|
||||
}
|
||||
extraConfig
|
||||
];
|
||||
|
||||
@@ -1,26 +0,0 @@
|
||||
{
|
||||
config,
|
||||
lib,
|
||||
pkgs,
|
||||
username,
|
||||
...
|
||||
}:
|
||||
lib.my.makeSwitch {
|
||||
inherit config;
|
||||
default = true;
|
||||
optionName = "default audio settings";
|
||||
optionPath = [ "audio" ];
|
||||
config' = {
|
||||
security.rtkit.enable = true;
|
||||
services.pipewire = {
|
||||
enable = true;
|
||||
alsa.enable = true;
|
||||
alsa.support32Bit = true;
|
||||
pulse.enable = true;
|
||||
audio.enable = true;
|
||||
};
|
||||
users.extraUsers.${username}.extraGroups = [ "audio" ];
|
||||
my.persist.homeDirs = [ ".local/state/wireplumber" ];
|
||||
my.hm.home.packages = [ pkgs.pwvucontrol ];
|
||||
};
|
||||
}
|
||||
@@ -1,20 +0,0 @@
|
||||
{ config, lib, ... }:
|
||||
lib.my.makeSwitch {
|
||||
inherit config;
|
||||
default = true;
|
||||
optionName = "default bluetooth settings";
|
||||
optionPath = [ "bluetooth" ];
|
||||
config' = {
|
||||
hardware.bluetooth = {
|
||||
enable = true;
|
||||
powerOnBoot = true;
|
||||
settings = {
|
||||
General = {
|
||||
Enable = "Source,Sink,Media,Socket";
|
||||
Disable = "HeadSet";
|
||||
MultiProfile = "multiple";
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
@@ -9,6 +9,7 @@ lib.my.makeSwitch {
|
||||
];
|
||||
config' = {
|
||||
my.cli.media = {
|
||||
cava.enable = true;
|
||||
go-musicfox.enable = true;
|
||||
mpd.enable = true;
|
||||
ffmpeg.enable = true;
|
||||
|
||||
167
modules/cli/media/cava/config/config
Normal file
167
modules/cli/media/cava/config/config
Normal file
@@ -0,0 +1,167 @@
|
||||
## Configuration file for CAVA. Default values are commented out. Use either ';' or '#' for commenting.
|
||||
|
||||
|
||||
[general]
|
||||
|
||||
# Smoothing mode. Can be 'normal', 'scientific' or 'waves'.
|
||||
mode = normal
|
||||
|
||||
# Accepts only non-negative values.
|
||||
framerate = 60
|
||||
|
||||
# 'autosens' will attempt to decrease sensitivity if the bars peak. 1 = on, 0 = off
|
||||
# 'overshoot' allows bars to overshoot (in % of terminal height) without initiating autosens.
|
||||
; autosens = 1
|
||||
; overshoot = 20
|
||||
|
||||
# Manual sensitivity in %. Autosens must be turned off for this to take effect.
|
||||
# 200 means double height. Accepts only non-negative values.
|
||||
; sensitivity = 100
|
||||
|
||||
# The number of bars (0-200). 0 sets it to auto (fill up console).
|
||||
# Bars' width and space between bars in number of characters.
|
||||
bars = 0
|
||||
bar_width = 5
|
||||
bar_spacing = 1
|
||||
|
||||
# Lower and higher cutoff frequencies for lowest and highest bars
|
||||
# the bandwidth of the visualizer.
|
||||
# Note: there is a minimum total bandwidth of 43Mhz x number of bars.
|
||||
# Cava will automatically increase the higher cutoff if a too low band is specified.
|
||||
; lower_cutoff_freq = 50
|
||||
; higher_cutoff_freq = 10000
|
||||
|
||||
|
||||
|
||||
[input]
|
||||
|
||||
# Audio capturing method. Possible methods are: 'pulse', 'alsa' or 'fifo'.
|
||||
# Defaults to 'pulse', 'alsa' or 'fifo', in that order, dependent on what support cava was built with.
|
||||
#
|
||||
# All input methods uses the same config variable 'source'
|
||||
# to define where it should get the audio.
|
||||
#
|
||||
# For pulseaudio 'source' will be the source. Default: 'auto', which uses the monitor source of the default sink
|
||||
# (all pulseaudio sinks(outputs) have 'monitor' sources(inputs) associated with them).
|
||||
#
|
||||
# For alsa 'source' will be the capture device.
|
||||
# For fifo 'source' will be the path to fifo-file.
|
||||
method = pulse
|
||||
source = auto
|
||||
|
||||
; method = alsa
|
||||
; source = hw:Loopback,1
|
||||
|
||||
; method = fifo
|
||||
; source = /tmp/mpd.fifo
|
||||
|
||||
|
||||
|
||||
[output]
|
||||
|
||||
# Ouput method. Can be 'ncurses', 'noncurses' or 'raw'.
|
||||
# 'noncurses' is for systems that does not suport ncurses.
|
||||
# 'raw' is a 16 bit data stream of the bar heights that can be used to send to other applications.
|
||||
# 'raw' defaults to 200 bars, which can be adjusted in the 'bars' option above.
|
||||
method = ncurses
|
||||
|
||||
# Visual styles. Can be 'stereo' or 'mono'.
|
||||
# 'stereo' mirrors both channels with low frequencies in center.
|
||||
# 'mono' averages both channels and outputs left to right lowest to highest frequencies.
|
||||
style = mono
|
||||
|
||||
# Raw output target. A fifo will be created if target does not exist.
|
||||
; raw_target = /dev/stdout
|
||||
|
||||
# Raw data format. Can be 'binary' or 'ascii'.
|
||||
; data_format = binary
|
||||
|
||||
# Binary bit format, can be '8bit' (0-255) or '16bit' (0-65530).
|
||||
; bit_format = 16bit
|
||||
|
||||
# Ascii max value. In 'ascii' mode range will run from 0 to value specified here
|
||||
; ascii_max_range = 1000
|
||||
|
||||
# Ascii delimiters. In ascii format each bar and frame is separated by a delimiters.
|
||||
# Use decimal value in ascii table (i.e. 59 = ';' and 10 = '\n' (line feed)).
|
||||
; bar_delimiter = 59
|
||||
; frame_delimiter = 10
|
||||
|
||||
|
||||
|
||||
# [color]
|
||||
|
||||
# # Colors can be one of seven predefined: black, blue, cyan, green, magenta, red, white, yellow.
|
||||
# # Or defined by hex code '#xxxxxx' (hex code must be within ''). User defined colors requires a
|
||||
# # terminal that can change color definitions such as Gnome-terminal or rxvt.
|
||||
# ; background = black
|
||||
# ; foreground = cyan
|
||||
|
||||
# # Gradient mode, only hex defined colors are supported, background must also be defined in hex
|
||||
# # or remain commented out. 1 = on, 0 = off. Warning: for certain terminal emulators cava will
|
||||
# # not able to restore color definitions on exit, simply restart your terminal to restore colors.
|
||||
# gradient = 1
|
||||
# gradient_color_1 = '#0099ff'
|
||||
# gradient_color_2 = '#ff3399'
|
||||
|
||||
|
||||
|
||||
[smoothing]
|
||||
|
||||
# Multiplier for the integral smoothing calculations. Takes values from 0-0.99.
|
||||
# Higher values means smoother, but less precise. Set to 0 to disable.
|
||||
; integral = 0.7
|
||||
|
||||
# Disables or enables the so-called "Monstercat smoothing". Set to 0 to disable.
|
||||
; monstercat = 1
|
||||
; waves = 1
|
||||
|
||||
# Set gravity multiplier for "drop off". Higher values means bars will drop faster.
|
||||
# Accepts only non-negative values. 0.5 means half gravity, 2 means double. Set to 0 to disable "drop off".
|
||||
; gravity = 2
|
||||
|
||||
|
||||
# In bar height, bars that would have been lower that this will not be drawn.
|
||||
; ignore = 0
|
||||
|
||||
|
||||
[eq]
|
||||
|
||||
# This one is tricky. You can have as much keys as you want.
|
||||
# Remember to uncomment more then one key! More keys = more precision.
|
||||
# Look at readme.md on github for further explanations and examples.
|
||||
#; 1 = 1 # bass
|
||||
#; 2 = 1
|
||||
#; 3 = 1 # midtone
|
||||
#; 4 = 1
|
||||
#; 5 = 1 # treble
|
||||
1=1
|
||||
2=1
|
||||
3=2
|
||||
4=1
|
||||
5=1
|
||||
|
||||
[color]
|
||||
|
||||
#background = '#191724'
|
||||
gradient = 1
|
||||
gradient_count = 6
|
||||
gradient_color_1 = '#31748f'
|
||||
gradient_color_2 = '#9ccfd8'
|
||||
gradient_color_3 = '#c4a7e7'
|
||||
gradient_color_4 = '#ebbcba'
|
||||
gradient_color_5 = '#f6c177'
|
||||
gradient_color_6 = '#eb6f92'
|
||||
|
||||
[color]
|
||||
|
||||
gradient = 1
|
||||
|
||||
gradient_color_1 = '#94e2d5'
|
||||
gradient_color_2 = '#89dceb'
|
||||
gradient_color_3 = '#74c7ec'
|
||||
gradient_color_4 = '#89b4fa'
|
||||
gradient_color_5 = '#cba6f7'
|
||||
gradient_color_6 = '#f5c2e7'
|
||||
gradient_color_7 = '#eba0ac'
|
||||
gradient_color_8 = '#f38ba8'
|
||||
167
modules/cli/media/cava/config/config-applet
Normal file
167
modules/cli/media/cava/config/config-applet
Normal file
@@ -0,0 +1,167 @@
|
||||
## Configuration file for CAVA. Default values are commented out. Use either ';' or '#' for commenting.
|
||||
|
||||
|
||||
[general]
|
||||
|
||||
# Smoothing mode. Can be 'normal', 'scientific' or 'waves'.
|
||||
mode = normal
|
||||
|
||||
# Accepts only non-negative values.
|
||||
framerate = 60
|
||||
|
||||
# 'autosens' will attempt to decrease sensitivity if the bars peak. 1 = on, 0 = off
|
||||
# 'overshoot' allows bars to overshoot (in % of terminal height) without initiating autosens.
|
||||
; autosens = 1
|
||||
; overshoot = 20
|
||||
|
||||
# Manual sensitivity in %. Autosens must be turned off for this to take effect.
|
||||
# 200 means double height. Accepts only non-negative values.
|
||||
; sensitivity = 100
|
||||
|
||||
# The number of bars (0-200). 0 sets it to auto (fill up console).
|
||||
# Bars' width and space between bars in number of characters.
|
||||
bars = 0
|
||||
bar_width = 2
|
||||
bar_spacing = 1
|
||||
|
||||
# Lower and higher cutoff frequencies for lowest and highest bars
|
||||
# the bandwidth of the visualizer.
|
||||
# Note: there is a minimum total bandwidth of 43Mhz x number of bars.
|
||||
# Cava will automatically increase the higher cutoff if a too low band is specified.
|
||||
; lower_cutoff_freq = 50
|
||||
; higher_cutoff_freq = 10000
|
||||
|
||||
|
||||
|
||||
[input]
|
||||
|
||||
# Audio capturing method. Possible methods are: 'pulse', 'alsa' or 'fifo'.
|
||||
# Defaults to 'pulse', 'alsa' or 'fifo', in that order, dependent on what support cava was built with.
|
||||
#
|
||||
# All input methods uses the same config variable 'source'
|
||||
# to define where it should get the audio.
|
||||
#
|
||||
# For pulseaudio 'source' will be the source. Default: 'auto', which uses the monitor source of the default sink
|
||||
# (all pulseaudio sinks(outputs) have 'monitor' sources(inputs) associated with them).
|
||||
#
|
||||
# For alsa 'source' will be the capture device.
|
||||
# For fifo 'source' will be the path to fifo-file.
|
||||
method = pulse
|
||||
source = auto
|
||||
|
||||
; method = alsa
|
||||
; source = hw:Loopback,1
|
||||
|
||||
; method = fifo
|
||||
; source = /tmp/mpd.fifo
|
||||
|
||||
|
||||
|
||||
[output]
|
||||
|
||||
# Ouput method. Can be 'ncurses', 'noncurses' or 'raw'.
|
||||
# 'noncurses' is for systems that does not suport ncurses.
|
||||
# 'raw' is a 16 bit data stream of the bar heights that can be used to send to other applications.
|
||||
# 'raw' defaults to 200 bars, which can be adjusted in the 'bars' option above.
|
||||
method = ncurses
|
||||
|
||||
# Visual styles. Can be 'stereo' or 'mono'.
|
||||
# 'stereo' mirrors both channels with low frequencies in center.
|
||||
# 'mono' averages both channels and outputs left to right lowest to highest frequencies.
|
||||
style = mono
|
||||
|
||||
# Raw output target. A fifo will be created if target does not exist.
|
||||
; raw_target = /dev/stdout
|
||||
|
||||
# Raw data format. Can be 'binary' or 'ascii'.
|
||||
; data_format = binary
|
||||
|
||||
# Binary bit format, can be '8bit' (0-255) or '16bit' (0-65530).
|
||||
; bit_format = 16bit
|
||||
|
||||
# Ascii max value. In 'ascii' mode range will run from 0 to value specified here
|
||||
; ascii_max_range = 1000
|
||||
|
||||
# Ascii delimiters. In ascii format each bar and frame is separated by a delimiters.
|
||||
# Use decimal value in ascii table (i.e. 59 = ';' and 10 = '\n' (line feed)).
|
||||
; bar_delimiter = 59
|
||||
; frame_delimiter = 10
|
||||
|
||||
|
||||
|
||||
# [color]
|
||||
|
||||
# # Colors can be one of seven predefined: black, blue, cyan, green, magenta, red, white, yellow.
|
||||
# # Or defined by hex code '#xxxxxx' (hex code must be within ''). User defined colors requires a
|
||||
# # terminal that can change color definitions such as Gnome-terminal or rxvt.
|
||||
# ; background = black
|
||||
# ; foreground = cyan
|
||||
|
||||
# # Gradient mode, only hex defined colors are supported, background must also be defined in hex
|
||||
# # or remain commented out. 1 = on, 0 = off. Warning: for certain terminal emulators cava will
|
||||
# # not able to restore color definitions on exit, simply restart your terminal to restore colors.
|
||||
# gradient = 1
|
||||
# gradient_color_1 = '#0099ff'
|
||||
# gradient_color_2 = '#ff3399'
|
||||
|
||||
|
||||
|
||||
[smoothing]
|
||||
|
||||
# Multiplier for the integral smoothing calculations. Takes values from 0-0.99.
|
||||
# Higher values means smoother, but less precise. Set to 0 to disable.
|
||||
; integral = 0.7
|
||||
|
||||
# Disables or enables the so-called "Monstercat smoothing". Set to 0 to disable.
|
||||
; monstercat = 1
|
||||
; waves = 1
|
||||
|
||||
# Set gravity multiplier for "drop off". Higher values means bars will drop faster.
|
||||
# Accepts only non-negative values. 0.5 means half gravity, 2 means double. Set to 0 to disable "drop off".
|
||||
; gravity = 1
|
||||
|
||||
|
||||
# In bar height, bars that would have been lower that this will not be drawn.
|
||||
; ignore = 0
|
||||
|
||||
|
||||
[eq]
|
||||
|
||||
# This one is tricky. You can have as much keys as you want.
|
||||
# Remember to uncomment more then one key! More keys = more precision.
|
||||
# Look at readme.md on github for further explanations and examples.
|
||||
#; 1 = 1 # bass
|
||||
#; 2 = 1
|
||||
#; 3 = 1 # midtone
|
||||
#; 4 = 1
|
||||
#; 5 = 1 # treble
|
||||
1=1
|
||||
2=1
|
||||
3=2
|
||||
4=1
|
||||
5=1
|
||||
|
||||
[color]
|
||||
|
||||
#background = '#191724'
|
||||
gradient = 1
|
||||
gradient_count = 6
|
||||
gradient_color_1 = '#31748f'
|
||||
gradient_color_2 = '#9ccfd8'
|
||||
gradient_color_3 = '#c4a7e7'
|
||||
gradient_color_4 = '#ebbcba'
|
||||
gradient_color_5 = '#f6c177'
|
||||
gradient_color_6 = '#eb6f92'
|
||||
|
||||
[color]
|
||||
|
||||
gradient = 1
|
||||
|
||||
gradient_color_1 = '#94e2d5'
|
||||
gradient_color_2 = '#89dceb'
|
||||
gradient_color_3 = '#74c7ec'
|
||||
gradient_color_4 = '#89b4fa'
|
||||
gradient_color_5 = '#cba6f7'
|
||||
gradient_color_6 = '#f5c2e7'
|
||||
gradient_color_7 = '#eba0ac'
|
||||
gradient_color_8 = '#f38ba8'
|
||||
79
modules/cli/media/cava/config/shaders/bar_spectrum.frag
Normal file
79
modules/cli/media/cava/config/shaders/bar_spectrum.frag
Normal file
@@ -0,0 +1,79 @@
|
||||
#version 330
|
||||
|
||||
in vec2 fragCoord;
|
||||
out vec4 fragColor;
|
||||
|
||||
// bar values. defaults to left channels first (low to high), then right (high to low).
|
||||
uniform float bars[512];
|
||||
|
||||
uniform int bars_count; // number of bars (left + right) (configurable)
|
||||
uniform int bar_width; // bar width (configurable), not used here
|
||||
uniform int bar_spacing; // space bewteen bars (configurable)
|
||||
|
||||
uniform vec3 u_resolution; // window resolution
|
||||
|
||||
//colors, configurable in cava config file (r,g,b) (0.0 - 1.0)
|
||||
uniform vec3 bg_color; // background color
|
||||
uniform vec3 fg_color; // foreground color
|
||||
|
||||
uniform int gradient_count;
|
||||
uniform vec3 gradient_colors[8]; // gradient colors
|
||||
|
||||
vec3 normalize_C(float y,vec3 col_1, vec3 col_2, float y_min, float y_max)
|
||||
{
|
||||
//create color based on fraction of this color and next color
|
||||
float yr = (y - y_min) / (y_max - y_min);
|
||||
return col_1 * (1.0 - yr) + col_2 * yr;
|
||||
}
|
||||
|
||||
void main()
|
||||
{
|
||||
// find which bar to use based on where we are on the x axis
|
||||
float x = u_resolution.x * fragCoord.x;
|
||||
int bar = int(bars_count * fragCoord.x);
|
||||
|
||||
//calculate a bar size
|
||||
float bar_size = u_resolution.x / bars_count;
|
||||
|
||||
//the y coordinate and bar values are the same
|
||||
float y = bars[bar];
|
||||
|
||||
// make sure there is a thin line at bottom
|
||||
if (y * u_resolution.y < 1.0)
|
||||
{
|
||||
y = 1.0 / u_resolution.y;
|
||||
}
|
||||
|
||||
//draw the bar up to current height
|
||||
if (y > fragCoord.y)
|
||||
{
|
||||
//make some space between bars basen on settings
|
||||
if (x > (bar + 1) * (bar_size) - bar_spacing)
|
||||
{
|
||||
fragColor = vec4(bg_color,1.0);
|
||||
}
|
||||
else
|
||||
{
|
||||
if (gradient_count == 0)
|
||||
{
|
||||
fragColor = vec4(fg_color,1.0);
|
||||
}
|
||||
else
|
||||
{
|
||||
//find which color in the configured gradient we are at
|
||||
int color = int((gradient_count - 1) * fragCoord.y);
|
||||
|
||||
//find where on y this and next color is supposed to be
|
||||
float y_min = color / (gradient_count - 1.0);
|
||||
float y_max = (color + 1.0) / (gradient_count - 1.0);
|
||||
|
||||
//make color
|
||||
fragColor = vec4(normalize_C(fragCoord.y, gradient_colors[color], gradient_colors[color + 1], y_min, y_max), 1.0);
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
fragColor = vec4(bg_color,1.0);
|
||||
}
|
||||
}
|
||||
38
modules/cli/media/cava/config/shaders/normalized_bars.frag
Normal file
38
modules/cli/media/cava/config/shaders/normalized_bars.frag
Normal file
@@ -0,0 +1,38 @@
|
||||
#version 330
|
||||
|
||||
in vec2 fragCoord;
|
||||
out vec4 fragColor;
|
||||
|
||||
// bar values. defaults to left channels first (low to high), then right (high to low).
|
||||
uniform float bars[512];
|
||||
|
||||
uniform int bars_count; // number of bars (left + right) (configurable)
|
||||
|
||||
uniform vec3 u_resolution; // window resolution, not used here
|
||||
|
||||
//colors, configurable in cava config file
|
||||
uniform vec3 bg_color; // background color(r,g,b) (0.0 - 1.0), not used here
|
||||
uniform vec3 fg_color; // foreground color, not used here
|
||||
|
||||
float normalize_C(float x, float x_min, float x_max, float r_min, float r_max )
|
||||
{
|
||||
float xr;
|
||||
xr = (r_max-r_min) * (x - x_min) / (x_max - x_min) + r_min;
|
||||
return xr;
|
||||
}
|
||||
|
||||
void main()
|
||||
{
|
||||
// find which bar to use based on where we are on the x axis
|
||||
int bar = int(bars_count * fragCoord.x);
|
||||
|
||||
// create a normal along the y axis based on the bar height
|
||||
float x = normalize_C(fragCoord.y, 1.0, 0.0, 0.0, bars[bar]);
|
||||
|
||||
// set color
|
||||
fragColor.r=fg_color.x*x;
|
||||
fragColor.g=fg_color.y*x;
|
||||
fragColor.b=fg_color.z*x;
|
||||
fragColor.a=1.0;
|
||||
|
||||
}
|
||||
34
modules/cli/media/cava/config/shaders/northern_lights.frag
Normal file
34
modules/cli/media/cava/config/shaders/northern_lights.frag
Normal file
@@ -0,0 +1,34 @@
|
||||
#version 330
|
||||
|
||||
in vec2 fragCoord;
|
||||
out vec4 fragColor;
|
||||
|
||||
// bar values. defaults to left channels first (low to high), then right (high to low).
|
||||
uniform float bars[512];
|
||||
|
||||
uniform int bars_count; // number of bars (left + right) (configurable)
|
||||
|
||||
uniform vec3 u_resolution; // window resolution, not used here
|
||||
|
||||
//colors, configurable in cava config file
|
||||
uniform vec3 bg_color; // background color(r,g,b) (0.0 - 1.0), not used here
|
||||
uniform vec3 fg_color; // foreground color, not used here
|
||||
|
||||
void main()
|
||||
{
|
||||
// find which bar to use based on where we are on the x axis
|
||||
int bar = int(bars_count * fragCoord.x);
|
||||
|
||||
float bar_y = 1.0 - abs((fragCoord.y - 0.5)) * 2.0;
|
||||
float y = (bars[bar]) * bar_y;
|
||||
|
||||
float bar_x = (fragCoord.x - float(bar) / float(bars_count)) * bars_count;
|
||||
float bar_r = 1.0 - abs((bar_x - 0.5)) * 2;
|
||||
|
||||
bar_r = bar_r * bar_r * 2;
|
||||
|
||||
// set color
|
||||
fragColor.r = fg_color.x * y * bar_r;
|
||||
fragColor.g = fg_color.y * y * bar_r;
|
||||
fragColor.b = fg_color.z * y * bar_r;
|
||||
}
|
||||
14
modules/cli/media/cava/config/shaders/pass_through.vert
Normal file
14
modules/cli/media/cava/config/shaders/pass_through.vert
Normal file
@@ -0,0 +1,14 @@
|
||||
#version 330
|
||||
|
||||
|
||||
// Input vertex data, different for all executions of this shader.
|
||||
layout(location = 0) in vec3 vertexPosition_modelspace;
|
||||
|
||||
// Output data ; will be interpolated for each fragment.
|
||||
out vec2 fragCoord;
|
||||
|
||||
void main()
|
||||
{
|
||||
gl_Position = vec4(vertexPosition_modelspace,1);
|
||||
fragCoord = (vertexPosition_modelspace.xy+vec2(1,1))/2.0;
|
||||
}
|
||||
22
modules/cli/media/cava/default.nix
Normal file
22
modules/cli/media/cava/default.nix
Normal file
@@ -0,0 +1,22 @@
|
||||
{
|
||||
config,
|
||||
lib,
|
||||
pkgs,
|
||||
...
|
||||
}:
|
||||
lib.my.makeHomePackageConfig {
|
||||
inherit config pkgs;
|
||||
packageName = "cava";
|
||||
packagePath = [ "cava" ];
|
||||
optionPath = [
|
||||
"cli"
|
||||
"media"
|
||||
"cava"
|
||||
];
|
||||
extraConfig = {
|
||||
my.home.xdg.configFile."cava" = {
|
||||
source = ./config;
|
||||
recursive = true;
|
||||
};
|
||||
};
|
||||
}
|
||||
@@ -2,7 +2,6 @@
|
||||
config,
|
||||
lib,
|
||||
pkgs,
|
||||
secrets,
|
||||
...
|
||||
}:
|
||||
lib.my.makeSwitch {
|
||||
@@ -15,16 +14,12 @@ lib.my.makeSwitch {
|
||||
];
|
||||
config' = {
|
||||
my = {
|
||||
hm = {
|
||||
home = {
|
||||
home.packages = with pkgs; [
|
||||
playerctl
|
||||
go-musicfox
|
||||
];
|
||||
sops.secrets.go-musicfox = {
|
||||
sopsFile = secrets."go-musicfox.ini";
|
||||
format = "binary";
|
||||
path = "${config.my.hm.xdg.configHome}/go-musicfox/go-musicfox.ini";
|
||||
};
|
||||
xdg.configFile."go-musicfox/go-musicfox.ini".source = ./go-musicfox.ini;
|
||||
};
|
||||
|
||||
cli.media.mpd.enable = true;
|
||||
97
modules/cli/media/go-musicfox/go-musicfox.ini
Normal file
97
modules/cli/media/go-musicfox/go-musicfox.ini
Normal file
@@ -0,0 +1,97 @@
|
||||
# 启动页配置
|
||||
[startup]
|
||||
# 是否显示启动页
|
||||
show=false
|
||||
# 启动页进度条是否有回弹效果
|
||||
progressOutBounce=true
|
||||
# 启动页时长
|
||||
loadingSeconds=2
|
||||
# 启动页欢迎语
|
||||
welcome=musicfox
|
||||
# 启动时自动签到
|
||||
signin=false
|
||||
|
||||
# 进度条配置
|
||||
[progress]
|
||||
# 进度条已加载字符
|
||||
fullChar=#
|
||||
# 进度条未加载字符
|
||||
emptyChar=
|
||||
|
||||
# 主页面配置
|
||||
[main]
|
||||
# 是否显示标题
|
||||
showTitle=true
|
||||
# 加载中提示
|
||||
loadingText=[加载中...]
|
||||
# 歌曲音质,可选项:standard, exhigh, lossless, hires, jyeffect(高清环绕声), sky(沉浸环绕声), jymaster(超清母带) 进行音质判断
|
||||
songLevel=hires
|
||||
# 主题颜色
|
||||
# 随机
|
||||
# primaryColor=random
|
||||
# 经典网易云音乐红
|
||||
#primaryColor="#ea403f"
|
||||
primaryColor="#6186D9"
|
||||
# 是否显示歌词
|
||||
showLyric=true
|
||||
# 歌词偏移 ms
|
||||
lyricOffset=0
|
||||
# 显示歌词翻译
|
||||
showLyricTrans=true
|
||||
# 是否显示通知信息
|
||||
showNotify=false
|
||||
# 开启pprof, --pprof时会开启
|
||||
pprofPort=9876
|
||||
# altScreen显示模式
|
||||
altScreen=true
|
||||
# 双列显示,开启务必使用等宽字体
|
||||
doubleColumn=true
|
||||
# 下载目录,默认为$HOME/.go-musicfox/download
|
||||
downloadDir=/home/imxyy/Music/go-musicfox
|
||||
# 缓存目录,默认为${MUSICFOX_ROOT}/cache
|
||||
cacheDir=/home/imxyy/Music/go-musicfox/.cache
|
||||
# 缓存大小(以MB为单位),0为不使用缓存,-1为不限制,默认为0
|
||||
cacheLimit=-1
|
||||
# 是否显示歌单下所有歌曲,默认不开启,仅获取歌单前1000首,开启后可能会占用更多内存(大量歌曲数据)和带宽(会同时发送多个请求获取歌单下歌曲数据)
|
||||
showAllSongsOfPlaylist=false
|
||||
# 动态显示menu行数
|
||||
dynamicMenuRows=true
|
||||
enableMouseEvent = false
|
||||
|
||||
[autoplay]
|
||||
# 是否开启自动播放,默认不开启
|
||||
autoPlay=true
|
||||
# 自动播放歌单,dailyReco,like,no(保持上次退出时的设置,无视offset),name:歌单名,默认dailyReco
|
||||
autoPlayList="no"
|
||||
# 播放偏移,0为第一首,-1为最后一首,默认为0
|
||||
offset=0
|
||||
# 播放模式,listLoop, order, singleLoop, random, intelligent(心动), last(上次退出时的模式),default,默认为last
|
||||
playMode=singleLoop
|
||||
|
||||
[player]
|
||||
# 播放引擎 beep / mpd(需要安装配置mpd) / osx(Mac才可用)
|
||||
# 不填Mac默认使用osx,其他系统默认使用beep(推荐的配置)
|
||||
engine=mpd
|
||||
# beep使用的mp3解码器,可选:go-mp3, minimp3 (minimp3更少的CPU占用,但是稳定性不如go-mp3)
|
||||
#beepMp3Decoder=go-mp3
|
||||
|
||||
# mpd配置
|
||||
mpdBin=mpd
|
||||
# !!!注意!!! 一定要在配置文件中设置pid_file,否则在退出时不会kill掉mpd进程
|
||||
mpdConfigFile=/home/imxyy/.config/mpd/mpd.conf
|
||||
mpdNetwork=tcp
|
||||
mpdAddr=127.0.0.1:6600
|
||||
|
||||
[unm]
|
||||
# UNM开关
|
||||
switch=true
|
||||
# UNM源: kuwo,kugou,migu,qq
|
||||
sources=kuwo,kugou
|
||||
# UNM搜索其他平台限制 0-3
|
||||
searchLimit=0
|
||||
# 解除会员限制
|
||||
enableLocalVip=true
|
||||
# 解除音质限制
|
||||
unlockSoundEffects=true
|
||||
# QQ音乐cookie文件
|
||||
qqCookieFile=
|
||||
@@ -13,7 +13,7 @@ lib.my.makeSwitch {
|
||||
"mpd"
|
||||
];
|
||||
config' = {
|
||||
my.hm = {
|
||||
my.home = {
|
||||
home.packages = with pkgs.stable; [
|
||||
mpd
|
||||
mpc-cli
|
||||
|
||||
@@ -23,3 +23,8 @@ audio_output {
|
||||
type "pipewire"
|
||||
name "pipewire"
|
||||
}
|
||||
|
||||
audio_output {
|
||||
type "pulse"
|
||||
name "pulseaudio"
|
||||
}
|
||||
|
||||
@@ -42,18 +42,15 @@ lib.my.makeSwitch {
|
||||
dnsutils
|
||||
|
||||
killall
|
||||
|
||||
comma
|
||||
];
|
||||
|
||||
programs.dconf.enable = true;
|
||||
|
||||
my.hm = {
|
||||
my.home = {
|
||||
home.packages = with pkgs; [
|
||||
lsd
|
||||
fd
|
||||
neofetch
|
||||
fastfetch
|
||||
fzf
|
||||
bat
|
||||
ripgrep
|
||||
@@ -83,119 +80,6 @@ lib.my.makeSwitch {
|
||||
enableAutoUpdates = true;
|
||||
settings.updates.auto_update = true;
|
||||
};
|
||||
programs.television = {
|
||||
enable = true;
|
||||
enableZshIntegration = true;
|
||||
};
|
||||
xdg.configFile."fastfetch/config.jsonc".text = ''
|
||||
{
|
||||
"$schema": "https://github.com/fastfetch-cli/fastfetch/raw/dev/doc/json_schema.json",
|
||||
"display": {
|
||||
"separator": " "
|
||||
},
|
||||
"modules": [
|
||||
// Title
|
||||
{
|
||||
"type": "title",
|
||||
"format": "{user-name-colored}{#}@{host-name-colored}"
|
||||
},
|
||||
{
|
||||
"type": "custom",
|
||||
"format": "---------------"
|
||||
},
|
||||
// System Information
|
||||
{
|
||||
"type": "custom",
|
||||
"format": "{#}System Information"
|
||||
},
|
||||
{
|
||||
"type": "os",
|
||||
"key": "{#keys} OS"
|
||||
},
|
||||
{
|
||||
"type": "kernel",
|
||||
"key": "{#keys} Kernel"
|
||||
},
|
||||
{
|
||||
"type": "uptime",
|
||||
"key": "{#keys} Uptime"
|
||||
},
|
||||
{
|
||||
"type": "packages",
|
||||
"key": "{#keys} Packages",
|
||||
"format": "{all}"
|
||||
},
|
||||
{
|
||||
"type": "custom",
|
||||
"format": ""
|
||||
},
|
||||
// Desktop Environment
|
||||
{
|
||||
"type": "custom",
|
||||
"format": "{#}Desktop Environment"
|
||||
},
|
||||
{
|
||||
"type": "de",
|
||||
"key": "{#keys} DE"
|
||||
},
|
||||
{
|
||||
"type": "wm",
|
||||
"key": "{#keys} WM"
|
||||
},
|
||||
{
|
||||
"type": "wmtheme",
|
||||
"key": "{#keys} Theme"
|
||||
},
|
||||
{
|
||||
"type": "display",
|
||||
"key": "{#keys} Resolution"
|
||||
},
|
||||
{
|
||||
"type": "shell",
|
||||
"key": "{#keys} Shell"
|
||||
},
|
||||
{
|
||||
"type": "terminalfont",
|
||||
"key": "{#keys} Font"
|
||||
},
|
||||
{
|
||||
"type": "custom",
|
||||
"format": ""
|
||||
},
|
||||
// Hardware Information
|
||||
{
|
||||
"type": "custom",
|
||||
"format": "{#}Hardware Information"
|
||||
},
|
||||
{
|
||||
"type": "cpu",
|
||||
"key": "{#keys} CPU"
|
||||
},
|
||||
{
|
||||
"type": "gpu",
|
||||
"key": "{#keys} GPU"
|
||||
},
|
||||
{
|
||||
"type": "memory",
|
||||
"key": "{#keys} Memory"
|
||||
},
|
||||
{
|
||||
"type": "disk",
|
||||
"key": "{#keys} Disk (/)",
|
||||
"folders": "/"
|
||||
},
|
||||
{
|
||||
"type": "custom",
|
||||
"format": ""
|
||||
},
|
||||
// Colors
|
||||
{
|
||||
"type": "colors",
|
||||
"symbol": "circle"
|
||||
},
|
||||
]
|
||||
}
|
||||
'';
|
||||
};
|
||||
};
|
||||
}
|
||||
|
||||
@@ -14,7 +14,7 @@ lib.my.makeHomePackageConfig {
|
||||
"btop"
|
||||
];
|
||||
extraConfig = {
|
||||
my.hm.xdg.configFile."btop" = {
|
||||
my.home.xdg.configFile."btop" = {
|
||||
source = ./config;
|
||||
recursive = true;
|
||||
};
|
||||
|
||||
@@ -15,9 +15,9 @@ lib.my.makeSwitch {
|
||||
];
|
||||
config' = {
|
||||
my.persist.homeDirs = [ ".local/share/zoxide" ];
|
||||
my.hm =
|
||||
my.home =
|
||||
let
|
||||
stateHome = config.my.hm.xdg.stateHome;
|
||||
stateHome = config.my.home.xdg.stateHome;
|
||||
zsh-syntax-highlighting = pkgs.fetchFromGitHub {
|
||||
owner = "zsh-users";
|
||||
repo = "zsh-syntax-highlighting";
|
||||
@@ -44,11 +44,11 @@ lib.my.makeSwitch {
|
||||
jj = {
|
||||
ignore_timeout = true;
|
||||
description = "The current jj status";
|
||||
when = true;
|
||||
when = "jj root";
|
||||
symbol = " ";
|
||||
command = ''
|
||||
jj log --revisions @ --no-graph --ignore-working-copy --color always --limit 1 --template '
|
||||
separate(" ",
|
||||
" ",
|
||||
change_id.shortest(4),
|
||||
bookmarks,
|
||||
"|",
|
||||
@@ -64,9 +64,19 @@ lib.my.makeSwitch {
|
||||
"(no description set)",
|
||||
) ++ raw_escape_sequence("\x1b[0m"),
|
||||
)
|
||||
' || (starship module git_branch && starship module git_status)
|
||||
'
|
||||
'';
|
||||
};
|
||||
git_branch = {
|
||||
when = true;
|
||||
command = "jj root >/dev/null 2>&1 || starship module git_branch";
|
||||
description = "Only show git_branch if we're not in a jj repo";
|
||||
};
|
||||
git_status = {
|
||||
when = true;
|
||||
command = "jj root >/dev/null 2>&1 || starship module git_status";
|
||||
description = "Only show git_status if we're not in a jj repo";
|
||||
};
|
||||
};
|
||||
git_state.disabled = true;
|
||||
git_commit.disabled = true;
|
||||
@@ -78,7 +88,7 @@ lib.my.makeSwitch {
|
||||
};
|
||||
programs.zsh = {
|
||||
enable = true;
|
||||
dotDir = "${config.my.hm.xdg.configHome}/zsh";
|
||||
dotDir = ".config/zsh";
|
||||
history = {
|
||||
path = "${stateHome}/zsh_history";
|
||||
ignorePatterns = [
|
||||
@@ -107,7 +117,7 @@ lib.my.makeSwitch {
|
||||
x = "extract";
|
||||
ls = "lsd";
|
||||
svim = "sudoedit";
|
||||
nf = "fastfetch";
|
||||
nf = "neofetch";
|
||||
tmux = "tmux -T RGB,focus,overline,mouse,clipboard,usstyle";
|
||||
pastart = "pasuspender true";
|
||||
};
|
||||
|
||||
@@ -16,7 +16,7 @@ lib.my.makeHomeProgramConfig {
|
||||
"git"
|
||||
];
|
||||
extraConfig = {
|
||||
my.hm = {
|
||||
my.home = {
|
||||
programs.git = {
|
||||
userName = "${userfullname}";
|
||||
userEmail = "${useremail}";
|
||||
|
||||
@@ -16,7 +16,7 @@ lib.my.makeHomeProgramConfig {
|
||||
"jj"
|
||||
];
|
||||
extraConfig = {
|
||||
my.hm = {
|
||||
my.home = {
|
||||
programs.jujutsu = {
|
||||
settings = {
|
||||
user = {
|
||||
@@ -26,7 +26,6 @@ lib.my.makeHomeProgramConfig {
|
||||
ui = {
|
||||
graph.style = "square";
|
||||
default-command = "status";
|
||||
conflict-marker-style = "snapshot";
|
||||
};
|
||||
signing = {
|
||||
backend = "ssh";
|
||||
|
||||
@@ -13,7 +13,7 @@ lib.my.makeHomeProgramConfig {
|
||||
"neovim"
|
||||
];
|
||||
extraConfig = {
|
||||
my.hm = {
|
||||
my.home = {
|
||||
xdg.configFile."nvim/init.lua".source = ./nvim/init.lua;
|
||||
xdg.configFile."nvim/lua" = {
|
||||
source = ./nvim/lua;
|
||||
@@ -26,9 +26,31 @@ lib.my.makeHomeProgramConfig {
|
||||
vimAlias = true;
|
||||
vimdiffAlias = true;
|
||||
extraPackages = with pkgs; [
|
||||
gcc # treesitter
|
||||
gcc
|
||||
gnumake
|
||||
|
||||
ripgrep # telescope
|
||||
pyright
|
||||
|
||||
clang-tools
|
||||
|
||||
rust-analyzer
|
||||
pest-ide-tools
|
||||
|
||||
nixd
|
||||
|
||||
gotools
|
||||
gopls
|
||||
|
||||
stylua
|
||||
lua-language-server
|
||||
|
||||
nodePackages.vscode-langservers-extracted
|
||||
nodePackages.typescript-language-server
|
||||
vue-language-server
|
||||
typescript
|
||||
nodejs
|
||||
|
||||
ripgrep
|
||||
];
|
||||
};
|
||||
};
|
||||
|
||||
@@ -4,3 +4,5 @@ require("core.keymaps")
|
||||
require("langs.langs-setup")
|
||||
|
||||
require("plugins.plugins-setup")
|
||||
|
||||
require("core.autostart")
|
||||
|
||||
7
modules/coding/editor/neovim/nvim/lua/core/autostart.lua
Normal file
7
modules/coding/editor/neovim/nvim/lua/core/autostart.lua
Normal file
@@ -0,0 +1,7 @@
|
||||
-- Open tree when in config dir
|
||||
local configdir = vim.fn.system("echo $HOME/.config")
|
||||
configdir = string.sub(configdir, 1, string.len(configdir) - 1)
|
||||
if string.find(vim.fn.system("pwd"), configdir) ~= nil then
|
||||
vim.cmd("NvimTreeOpen")
|
||||
vim.cmd("NvimTmuxNavigateRight")
|
||||
end
|
||||
@@ -7,21 +7,33 @@ local buf_kill = globals.buf_kill
|
||||
|
||||
keymap.set("v", "<S-pageup>", ":m '<-2<CR>gv=gv", opt)
|
||||
keymap.set("v", "<S-pagedown>", ":m '>+1<CR>gv=gv", opt)
|
||||
keymap.set({ "i", "n", "v" }, "<S-up>", "<up>", opt)
|
||||
keymap.set({ "i", "n", "v" }, "<S-down>", "<down>", opt)
|
||||
|
||||
keymap.set("n", "<leader>nh", ":nohl<CR>", opt)
|
||||
|
||||
keymap.set("n", "<leader>sv", "<C-w>v", opt)
|
||||
keymap.set("n", "<leader>sh", "<C-w>s", opt)
|
||||
|
||||
keymap.set("i", "<S-up>", "<ESC>v<up>", opt)
|
||||
keymap.set("i", "<S-down>", "<ESC>v<down>", opt)
|
||||
keymap.set("n", "<S-up>", "v<up>", opt)
|
||||
keymap.set("n", "<S-down>", "v<down>", opt)
|
||||
keymap.set("v", "<S-up>", "<up>", opt)
|
||||
keymap.set("v", "<S-down>", "<down>", opt)
|
||||
|
||||
keymap.set("i", "<S-left>", "<ESC>v<left>", opt)
|
||||
keymap.set("i", "<S-right>", "<ESC>v<right>", opt)
|
||||
keymap.set("n", "<S-left>", "v<left>", opt)
|
||||
keymap.set("n", "<S-right>", "v<right>", opt)
|
||||
keymap.set("v", "<S-left>", "<left>", opt)
|
||||
keymap.set("v", "<S-right>", "<right>", opt)
|
||||
|
||||
keymap.set("v", ".", ">gv", opt)
|
||||
keymap.set("v", ",", "<gv", opt)
|
||||
|
||||
keymap.set({ "n", "v" }, "<pageup>", "9k", opt)
|
||||
keymap.set({ "n", "v" }, "<pagedown>", "9j", opt)
|
||||
keymap.set("i", "<pageup>", string.rep("<up>", 9), opt)
|
||||
keymap.set("i", "<pagedown>", string.rep("<down>", 9), opt)
|
||||
keymap.set("i", "<pageup>", "<up><up><up><up><up><up><up><up><up>", opt)
|
||||
keymap.set("i", "<pagedown>", "<down><down><down><down><down><down><down><down><down>", opt)
|
||||
|
||||
keymap.set("n", "<leader>ww", ":w<CR>", opt)
|
||||
keymap.set("n", "<leader>so", ":so<CR>", opt)
|
||||
@@ -42,6 +54,15 @@ keymap.set("n", "L", ":BufferLineCycleNext<CR>", opt)
|
||||
keymap.set("n", "<A-h>", ":BufferLineMovePrev<CR>", opt)
|
||||
keymap.set("n", "<A-l>", ":BufferLineMoveNext<CR>", opt)
|
||||
|
||||
-- reload config
|
||||
keymap.set("n", "<leader>rc", ":so ~/.config/nvim/init.lua<CR>", opt)
|
||||
keymap.set("n", "<leader>rp", ":so ~/.config/nvim/lua/plugins/plugins-setup.lua<CR>", opt)
|
||||
|
||||
-- Workspaces
|
||||
keymap.set("n", "<leader>wo", ":Telescope workspaces<CR>", opt)
|
||||
keymap.set("n", "<leader>wa", ":WorkspacesAdd<CR>", opt)
|
||||
keymap.set("n", "<leader>wr", ":WorkspacesRemove<CR>", opt)
|
||||
|
||||
-- Neovide config
|
||||
if vim.g.neovide then
|
||||
keymap.set("v", "<C-C>", '"+y', opt)
|
||||
|
||||
@@ -30,8 +30,6 @@ opt.timeoutlen = 500
|
||||
|
||||
opt.completeopt = ""
|
||||
|
||||
opt.exrc = true
|
||||
|
||||
opt.autoread = true
|
||||
vim.g.autoread = true
|
||||
|
||||
|
||||
@@ -9,7 +9,6 @@ local servers = {
|
||||
"cssls",
|
||||
"nixd",
|
||||
"html",
|
||||
"java_language_server",
|
||||
}
|
||||
|
||||
local extra_config = {
|
||||
@@ -36,7 +35,7 @@ local extra_config = {
|
||||
},
|
||||
rust_analyzer = {
|
||||
settings = {
|
||||
["rust-analyzer"] = {
|
||||
rust_analyzer = {
|
||||
check = {
|
||||
command = "clippy",
|
||||
},
|
||||
@@ -64,8 +63,8 @@ local extra_config = {
|
||||
},
|
||||
},
|
||||
qmlls = {
|
||||
cmd = { "qmlls", "-E" },
|
||||
},
|
||||
cmd = {"qmlls", "-E"}
|
||||
}
|
||||
}
|
||||
|
||||
local capabilities = require("cmp_nvim_lsp").default_capabilities()
|
||||
@@ -74,6 +73,7 @@ capabilities.textDocument.foldingRange = {
|
||||
dynamicRegistration = false,
|
||||
lineFoldingOnly = true,
|
||||
}
|
||||
local lspconfig = require("lspconfig")
|
||||
for _, server in ipairs(servers) do
|
||||
local extra = extra_config[server] or {}
|
||||
local config = {
|
||||
@@ -82,6 +82,5 @@ for _, server in ipairs(servers) do
|
||||
for k, v in pairs(extra) do
|
||||
config[k] = v
|
||||
end
|
||||
vim.lsp.config(server, config)
|
||||
vim.lsp.enable(server)
|
||||
lspconfig[server].setup(config)
|
||||
end
|
||||
|
||||
@@ -0,0 +1,6 @@
|
||||
M = {
|
||||
-- ensure_installed = require("plugins.lsp.servers")
|
||||
ensure_installed = {},
|
||||
}
|
||||
|
||||
return M
|
||||
11
modules/coding/editor/neovim/nvim/lua/plugins/lsp/mason.lua
Normal file
11
modules/coding/editor/neovim/nvim/lua/plugins/lsp/mason.lua
Normal file
@@ -0,0 +1,11 @@
|
||||
M = {
|
||||
ui = {
|
||||
icons = {
|
||||
package_installed = "✓",
|
||||
package_pending = "➜",
|
||||
package_uninstalled = "✗",
|
||||
},
|
||||
},
|
||||
}
|
||||
|
||||
return M
|
||||
@@ -0,0 +1,14 @@
|
||||
M = {
|
||||
"lua_ls",
|
||||
"pyright",
|
||||
"gopls",
|
||||
"clangd",
|
||||
"rust_analyzer",
|
||||
"ts_ls",
|
||||
"jsonls",
|
||||
"cssls",
|
||||
"nil_ls",
|
||||
"html",
|
||||
}
|
||||
|
||||
return M
|
||||
@@ -17,16 +17,4 @@ 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
|
||||
@@ -62,11 +62,6 @@ local plugins = {
|
||||
require("ibl").setup(require("plugins.indent-blankline"))
|
||||
end,
|
||||
},
|
||||
{
|
||||
"norcalli/nvim-colorizer.lua",
|
||||
event = "VeryLazy",
|
||||
opt = {},
|
||||
},
|
||||
{
|
||||
"neovim/nvim-lspconfig",
|
||||
dependencies = { "hrsh7th/cmp-nvim-lsp" },
|
||||
@@ -118,7 +113,7 @@ local plugins = {
|
||||
"MysticalDevil/inlay-hints.nvim",
|
||||
event = "LspAttach",
|
||||
dependencies = { "neovim/nvim-lspconfig" },
|
||||
opts = {},
|
||||
opts = {}
|
||||
},
|
||||
{
|
||||
"hedyhli/outline.nvim",
|
||||
@@ -154,7 +149,7 @@ local plugins = {
|
||||
{
|
||||
"numToStr/Comment.nvim",
|
||||
event = "VeryLazy",
|
||||
opts = {},
|
||||
opts = {}
|
||||
},
|
||||
{
|
||||
"windwp/nvim-autopairs",
|
||||
@@ -184,42 +179,22 @@ local plugins = {
|
||||
require("telescope").setup(require("plugins.telescope"))
|
||||
end,
|
||||
},
|
||||
{
|
||||
"dnlhc/glance.nvim",
|
||||
cmd = "Glance",
|
||||
keys = {
|
||||
{
|
||||
"<leader>lr",
|
||||
"<cmd>Glance references<cr>",
|
||||
},
|
||||
{
|
||||
"<leader>ld",
|
||||
"<cmd>Glance definitions<cr>",
|
||||
},
|
||||
{
|
||||
"<leader>lD",
|
||||
"<cmd>Glance type_definitions<cr>",
|
||||
},
|
||||
{
|
||||
"<leader>li",
|
||||
"<cmd>Glance implementations<cr>",
|
||||
},
|
||||
},
|
||||
},
|
||||
{
|
||||
"ggandor/leap.nvim",
|
||||
dependencies = { "tpope/vim-repeat" },
|
||||
config = function()
|
||||
vim.keymap.set({ "n", "x", "o" }, "s", "<Plug>(leap)")
|
||||
vim.keymap.set("n", "S", "<Plug>(leap-from-window)")
|
||||
require("leap").set_default_mappings()
|
||||
-- Exclude whitespace and the middle of alphabetic words from preview:
|
||||
-- foobar[baaz] = quux
|
||||
-- ^----^^^--^^-^-^--^
|
||||
require("leap").opts.preview_filter = function(ch0, ch1, ch2)
|
||||
return not (ch1:match("%s") or ch0:match("%a") and ch1:match("%a") and ch2:match("%a"))
|
||||
require('leap').opts.preview_filter = function(ch0, ch1, ch2)
|
||||
return not (
|
||||
ch1:match('%s') or
|
||||
ch0:match('%a') and ch1:match('%a') and ch2:match('%a')
|
||||
)
|
||||
end
|
||||
require("leap.user").set_repeat_keys("<enter>", "<backspace>")
|
||||
end,
|
||||
require('leap.user').set_repeat_keys('<enter>', '<backspace>')
|
||||
end
|
||||
},
|
||||
{
|
||||
"alexghergh/nvim-tmux-navigation",
|
||||
|
||||
@@ -35,6 +35,9 @@ keymap.set("n", "<leader>gf", builtin.git_files, opt)
|
||||
keymap.set("n", "<leader>fg", builtin.live_grep, opt)
|
||||
keymap.set("n", "<leader>fb", builtin.buffers, opt)
|
||||
keymap.set("n", "<leader>fh", builtin.help_tags, opt)
|
||||
-- keymap.set('n', '<leader>lD', builtin.diagnostics, opt)
|
||||
keymap.set("n", "<leader>ld", builtin.lsp_definitions, opt)
|
||||
keymap.set("n", "<leader>lr", builtin.lsp_references, opt)
|
||||
keymap.set("n", "<leader>ls", builtin.lsp_document_symbols, opt)
|
||||
keymap.set("n", "<leader>/", builtin.current_buffer_fuzzy_find, opt)
|
||||
|
||||
|
||||
@@ -13,7 +13,7 @@ lib.my.makeHomeProgramConfig {
|
||||
"vscode"
|
||||
];
|
||||
extraConfig = {
|
||||
my.hm = {
|
||||
my.home = {
|
||||
programs.vscode = {
|
||||
package = pkgs.vscodium;
|
||||
};
|
||||
|
||||
@@ -15,7 +15,6 @@ lib.my.makeSwitch {
|
||||
python.enable = true;
|
||||
rust.enable = true;
|
||||
lua.enable = true;
|
||||
java.enable = true;
|
||||
qml.enable = true;
|
||||
};
|
||||
};
|
||||
|
||||
@@ -13,7 +13,7 @@ lib.my.makeSwitch {
|
||||
"c"
|
||||
];
|
||||
config' = {
|
||||
my.hm.home.packages = with pkgs; [
|
||||
my.home.home.packages = with pkgs; [
|
||||
gcc
|
||||
clang-tools
|
||||
cmake
|
||||
|
||||
@@ -14,10 +14,6 @@ lib.my.makeHomePackageConfig {
|
||||
"go"
|
||||
];
|
||||
extraConfig = {
|
||||
my.hm.home.packages = with pkgs; [
|
||||
gotools
|
||||
gopls
|
||||
];
|
||||
my.persist.homeDirs = [
|
||||
"go"
|
||||
];
|
||||
|
||||
@@ -1,21 +0,0 @@
|
||||
{
|
||||
config,
|
||||
lib,
|
||||
pkgs,
|
||||
...
|
||||
}:
|
||||
lib.my.makeSwitch {
|
||||
inherit config;
|
||||
optionName = "java";
|
||||
optionPath = [
|
||||
"coding"
|
||||
"langs"
|
||||
"java"
|
||||
];
|
||||
config' = {
|
||||
my.hm.home.packages = with pkgs; [
|
||||
openjdk25
|
||||
java-language-server
|
||||
];
|
||||
};
|
||||
}
|
||||
@@ -13,14 +13,12 @@ lib.my.makeSwitch {
|
||||
"js"
|
||||
];
|
||||
config' = {
|
||||
my.hm = {
|
||||
my.home = {
|
||||
home.packages = with pkgs; [
|
||||
nodejs
|
||||
pnpm
|
||||
typescript
|
||||
nodePackages.npm
|
||||
|
||||
nodePackages.typescript-language-server
|
||||
vue-language-server
|
||||
typescript
|
||||
];
|
||||
home.file.".npmrc".text = ''
|
||||
prefix = ''${HOME}/.npm-global
|
||||
@@ -33,7 +31,6 @@ lib.my.makeSwitch {
|
||||
my.persist.homeDirs = [
|
||||
".npm"
|
||||
".npm-global"
|
||||
".local/share/pnpm"
|
||||
];
|
||||
};
|
||||
}
|
||||
|
||||
@@ -13,10 +13,8 @@ lib.my.makeSwitch {
|
||||
"lua"
|
||||
];
|
||||
config' = {
|
||||
my.hm.home.packages = with pkgs; [
|
||||
my.home.home.packages = with pkgs; [
|
||||
luajit
|
||||
stylua
|
||||
lua-language-server
|
||||
];
|
||||
};
|
||||
}
|
||||
|
||||
@@ -14,9 +14,8 @@ lib.my.makeHomePackageConfig {
|
||||
"python"
|
||||
];
|
||||
extraConfig = {
|
||||
my.hm.home.packages = with pkgs; [
|
||||
my.home.home.packages = with pkgs; [
|
||||
uv
|
||||
pyright
|
||||
];
|
||||
};
|
||||
}
|
||||
|
||||
@@ -13,7 +13,7 @@ lib.my.makeSwitch {
|
||||
"qml"
|
||||
];
|
||||
config' = {
|
||||
my.hm.home.packages = with pkgs; [
|
||||
my.home.home.packages = with pkgs; [
|
||||
kdePackages.qtdeclarative
|
||||
];
|
||||
};
|
||||
|
||||
@@ -13,7 +13,7 @@ lib.my.makeSwitch {
|
||||
"rust"
|
||||
];
|
||||
config' = {
|
||||
my.hm = {
|
||||
my.home = {
|
||||
home.packages = with pkgs; [
|
||||
(fenix.stable.withComponents [
|
||||
"cargo"
|
||||
@@ -21,11 +21,8 @@ lib.my.makeSwitch {
|
||||
"rust-src"
|
||||
"rustc"
|
||||
"rustfmt"
|
||||
"rust-analyzer"
|
||||
])
|
||||
evcxr # rust repl
|
||||
|
||||
pest-ide-tools
|
||||
];
|
||||
home.file.".cargo/config.toml".text = ''
|
||||
[source.crates-io]
|
||||
@@ -37,9 +34,6 @@ lib.my.makeSwitch {
|
||||
[net]
|
||||
git-fetch-with-cli = true
|
||||
'';
|
||||
programs.zsh.initContent = lib.mkAfter ''
|
||||
export PATH=$PATH:$HOME/.cargo/bin
|
||||
'';
|
||||
};
|
||||
my.persist.homeDirs = [
|
||||
".cargo"
|
||||
|
||||
@@ -12,7 +12,7 @@ lib.my.makeSwitch {
|
||||
"misc"
|
||||
];
|
||||
config' = {
|
||||
my.hm = {
|
||||
my.home = {
|
||||
home.packages = with pkgs; [
|
||||
gnumake
|
||||
github-cli # gh
|
||||
|
||||
@@ -16,6 +16,7 @@ lib.my.makeSwitch {
|
||||
terminal.all.enable = true;
|
||||
wm.all.enable = true;
|
||||
style.enable = true;
|
||||
quickshell.enable = true;
|
||||
wine.enable = true;
|
||||
};
|
||||
};
|
||||
|
||||
@@ -10,6 +10,7 @@ lib.my.makeSwitch {
|
||||
config' = {
|
||||
my.desktop.browser = {
|
||||
firefox.enable = true;
|
||||
librewolf.enable = true;
|
||||
chromium.enable = true;
|
||||
zen.enable = true;
|
||||
};
|
||||
|
||||
@@ -13,7 +13,7 @@ lib.my.makeHomeProgramConfig {
|
||||
"chromium"
|
||||
];
|
||||
extraConfig = {
|
||||
my.hm.programs.chromium = {
|
||||
my.home.programs.chromium = {
|
||||
package = pkgs.ungoogled-chromium;
|
||||
extensions = [
|
||||
{
|
||||
|
||||
15
modules/desktop/browser/librewolf.nix
Normal file
15
modules/desktop/browser/librewolf.nix
Normal file
@@ -0,0 +1,15 @@
|
||||
{ config, lib, ... }:
|
||||
lib.my.makeHomeProgramConfig {
|
||||
inherit config;
|
||||
programName = "librewolf";
|
||||
optionPath = [
|
||||
"desktop"
|
||||
"browser"
|
||||
"librewolf"
|
||||
];
|
||||
extraConfig = {
|
||||
my.persist.homeDirs = [
|
||||
".librewolf"
|
||||
];
|
||||
};
|
||||
}
|
||||
@@ -13,7 +13,7 @@ lib.my.makeHomeProgramConfig {
|
||||
"zen"
|
||||
];
|
||||
extraConfig = {
|
||||
my.hm.programs.zen-browser = {
|
||||
my.home.programs.zen-browser = {
|
||||
enable = true;
|
||||
nativeMessagingHosts = [ pkgs.firefoxpwa ];
|
||||
policies = {
|
||||
|
||||
@@ -13,17 +13,18 @@ lib.my.makeSwitch {
|
||||
"minecraft"
|
||||
];
|
||||
config' = {
|
||||
my.hm.home.packages = [
|
||||
(pkgs.hmcl.overrideAttrs {
|
||||
postFixup = ''
|
||||
substituteInPlace $out/share/applications/HMCL.desktop --replace-fail 'Exec=hmcl' 'Exec=sh -c "cd ~/.local/share/hmcl; hmcl"'
|
||||
'';
|
||||
})
|
||||
my.home.home.packages = with pkgs; [
|
||||
hmcl
|
||||
|
||||
openjdk21
|
||||
];
|
||||
|
||||
my.persist.homeDirs = [
|
||||
".minecraft"
|
||||
".local/share/hmcl"
|
||||
];
|
||||
my.persist.homeFiles = [
|
||||
".hmcl.json"
|
||||
];
|
||||
};
|
||||
}
|
||||
|
||||
@@ -14,6 +14,6 @@ lib.my.makeHomePackageConfig {
|
||||
"dunst"
|
||||
];
|
||||
extraConfig = {
|
||||
my.hm.xdg.configFile."dunst/dunstrc".source = ./dunstrc;
|
||||
my.home.xdg.configFile."dunst/dunstrc".source = ./dunstrc;
|
||||
};
|
||||
}
|
||||
|
||||
@@ -14,7 +14,7 @@ lib.my.makeHomePackageConfig {
|
||||
"swaync"
|
||||
];
|
||||
extraConfig = {
|
||||
my.hm = {
|
||||
my.home = {
|
||||
programs.niri.settings.binds."Mod+End".action.spawn = [
|
||||
"swaync-client"
|
||||
"-t"
|
||||
|
||||
43
modules/desktop/quickshell/default.nix
Normal file
43
modules/desktop/quickshell/default.nix
Normal file
@@ -0,0 +1,43 @@
|
||||
{
|
||||
config,
|
||||
lib,
|
||||
pkgs,
|
||||
...
|
||||
}:
|
||||
let
|
||||
# FIXME: symlink
|
||||
homeDir = config.my.home.home.homeDirectory;
|
||||
quickshellDir = "${homeDir}/workspace/nixos-dotfiles/modules/desktop/quickshell/qml";
|
||||
quickshellTarget = "${homeDir}/.config/quickshell";
|
||||
in
|
||||
lib.my.makeSwitch {
|
||||
inherit config;
|
||||
default = false;
|
||||
optionName = "quickshell";
|
||||
optionPath = [
|
||||
"desktop"
|
||||
"quickshell"
|
||||
];
|
||||
config' = {
|
||||
my.home.home = {
|
||||
packages = with pkgs; [
|
||||
quickshell
|
||||
qt6Packages.qt5compat
|
||||
libsForQt5.qt5.qtgraphicaleffects
|
||||
kdePackages.qtbase
|
||||
kdePackages.qtdeclarative
|
||||
|
||||
material-symbols
|
||||
material-icons
|
||||
];
|
||||
sessionVariables.QML2_IMPORT_PATH = lib.concatStringsSep ":" [
|
||||
"${pkgs.quickshell}/lib/qt-6/qml"
|
||||
"${pkgs.kdePackages.qtdeclarative}/lib/qt-6/qml"
|
||||
"${pkgs.kdePackages.kirigami.unwrapped}/lib/qt-6/qml"
|
||||
];
|
||||
activation.symlinkQuickshellAndFaceIcon = lib.hm.dag.entryAfter [ "writeBoundary" ] ''
|
||||
ln -sfn "${quickshellDir}" "${quickshellTarget}"
|
||||
'';
|
||||
};
|
||||
};
|
||||
}
|
||||
2
modules/desktop/quickshell/qml/.gitignore
vendored
Normal file
2
modules/desktop/quickshell/qml/.gitignore
vendored
Normal file
@@ -0,0 +1,2 @@
|
||||
/debug.log
|
||||
/quickshell.log
|
||||
BIN
modules/desktop/quickshell/qml/Assets/UserProfile.gif
Normal file
BIN
modules/desktop/quickshell/qml/Assets/UserProfile.gif
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 37 KiB |
84
modules/desktop/quickshell/qml/Core/Corners.qml
Normal file
84
modules/desktop/quickshell/qml/Core/Corners.qml
Normal file
@@ -0,0 +1,84 @@
|
||||
import QtQuick
|
||||
import QtQuick.Shapes
|
||||
import "root:/Data" as Settings
|
||||
|
||||
// Concave corner shape component for rounded panel edges
|
||||
Shape {
|
||||
id: root
|
||||
|
||||
property string position: "topleft" // Corner position: topleft/topright/bottomleft/bottomright
|
||||
property real size: 1.0 // Scale multiplier for entire corner
|
||||
property int concaveWidth: 100 * size
|
||||
property int concaveHeight: 60 * size
|
||||
property int offsetX: -20
|
||||
property int offsetY: -20
|
||||
property color fillColor: Settings.Colors.bgColor
|
||||
property int arcRadius: 20 * size
|
||||
|
||||
// Position flags derived from position string
|
||||
property bool _isTop: position.includes("top")
|
||||
property bool _isLeft: position.includes("left")
|
||||
property bool _isRight: position.includes("right")
|
||||
property bool _isBottom: position.includes("bottom")
|
||||
|
||||
// Base coordinates for left corner shape
|
||||
property real _baseStartX: 30 * size
|
||||
property real _baseStartY: _isTop ? 20 * size : 0
|
||||
property real _baseLineX: 30 * size
|
||||
property real _baseLineY: _isTop ? 0 : 20 * size
|
||||
property real _baseArcX: 50 * size
|
||||
property real _baseArcY: _isTop ? 20 * size : 0
|
||||
|
||||
// Mirror coordinates for right corners
|
||||
property real _startX: _isRight ? (concaveWidth - _baseStartX) : _baseStartX
|
||||
property real _startY: _baseStartY
|
||||
property real _lineX: _isRight ? (concaveWidth - _baseLineX) : _baseLineX
|
||||
property real _lineY: _baseLineY
|
||||
property real _arcX: _isRight ? (concaveWidth - _baseArcX) : _baseArcX
|
||||
property real _arcY: _baseArcY
|
||||
|
||||
// Arc direction varies by corner to maintain proper concave shape
|
||||
property int _arcDirection: {
|
||||
if (_isTop && _isLeft)
|
||||
return PathArc.Counterclockwise;
|
||||
if (_isTop && _isRight)
|
||||
return PathArc.Clockwise;
|
||||
if (_isBottom && _isLeft)
|
||||
return PathArc.Clockwise;
|
||||
if (_isBottom && _isRight)
|
||||
return PathArc.Counterclockwise;
|
||||
return PathArc.Counterclockwise;
|
||||
}
|
||||
|
||||
width: concaveWidth
|
||||
height: concaveHeight
|
||||
// Position relative to parent based on corner type
|
||||
x: _isLeft ? offsetX : (parent ? parent.width - width + offsetX : 0)
|
||||
y: _isTop ? offsetY : (parent ? parent.height - height + offsetY : 0)
|
||||
preferredRendererType: Shape.CurveRenderer
|
||||
layer.enabled: true
|
||||
layer.samples: 4
|
||||
|
||||
ShapePath {
|
||||
strokeWidth: 0
|
||||
fillColor: root.fillColor
|
||||
strokeColor: root.fillColor // Use same color as fill to eliminate artifacts
|
||||
|
||||
startX: root._startX
|
||||
startY: root._startY
|
||||
|
||||
PathLine {
|
||||
x: root._lineX
|
||||
y: root._lineY
|
||||
}
|
||||
|
||||
PathArc {
|
||||
x: root._arcX
|
||||
y: root._arcY
|
||||
radiusX: root.arcRadius
|
||||
radiusY: root.arcRadius
|
||||
useLargeArc: false
|
||||
direction: root._arcDirection
|
||||
}
|
||||
}
|
||||
}
|
||||
48
modules/desktop/quickshell/qml/Core/LoaderManager.qml
Normal file
48
modules/desktop/quickshell/qml/Core/LoaderManager.qml
Normal file
@@ -0,0 +1,48 @@
|
||||
import QtQuick
|
||||
|
||||
QtObject {
|
||||
id: root
|
||||
|
||||
// Keep track of loaded components
|
||||
property var activeLoaders: ({})
|
||||
|
||||
// Dynamically load a QML component
|
||||
function load(componentUrl, parent, properties) {
|
||||
if (!activeLoaders[componentUrl]) {
|
||||
var loader = Qt.createQmlObject(`
|
||||
import QtQuick
|
||||
Loader {
|
||||
active: false
|
||||
asynchronous: true
|
||||
visible: false
|
||||
}
|
||||
`, parent);
|
||||
|
||||
loader.source = componentUrl;
|
||||
loader.active = true;
|
||||
|
||||
if (properties) {
|
||||
for (var prop in properties) {
|
||||
loader[prop] = properties[prop];
|
||||
}
|
||||
}
|
||||
|
||||
activeLoaders[componentUrl] = loader;
|
||||
}
|
||||
return activeLoaders[componentUrl];
|
||||
}
|
||||
|
||||
// Destroy and remove a loaded component
|
||||
function unload(componentUrl) {
|
||||
if (activeLoaders[componentUrl]) {
|
||||
activeLoaders[componentUrl].active = false;
|
||||
activeLoaders[componentUrl].destroy();
|
||||
delete activeLoaders[componentUrl];
|
||||
}
|
||||
}
|
||||
|
||||
// Check if a component is loaded
|
||||
function isLoaded(componentUrl) {
|
||||
return !!activeLoaders[componentUrl];
|
||||
}
|
||||
}
|
||||
189
modules/desktop/quickshell/qml/Core/ProcessManager.qml
Normal file
189
modules/desktop/quickshell/qml/Core/ProcessManager.qml
Normal file
@@ -0,0 +1,189 @@
|
||||
pragma Singleton
|
||||
import QtQuick
|
||||
import Quickshell.Io
|
||||
|
||||
// System process and resource monitoring
|
||||
QtObject {
|
||||
id: root
|
||||
|
||||
// System resource metrics
|
||||
property real cpuUsage: 0
|
||||
property real ramUsage: 0
|
||||
property real totalRam: 0
|
||||
property real usedRam: 0
|
||||
|
||||
// System control processes
|
||||
property Process shutdownProcess: Process {
|
||||
command: ["shutdown", "-h", "now"]
|
||||
}
|
||||
|
||||
property Process rebootProcess: Process {
|
||||
command: ["reboot"]
|
||||
}
|
||||
|
||||
property Process lockProcess: Process {
|
||||
command: ["hyprlock"]
|
||||
}
|
||||
|
||||
property Process logoutProcess: Process {
|
||||
command: ["loginctl", "terminate-user", "$USER"]
|
||||
}
|
||||
|
||||
property Process pavucontrolProcess: Process {
|
||||
command: ["pavucontrol"]
|
||||
}
|
||||
|
||||
// Resource monitoring processes
|
||||
property Process cpuProcess: Process {
|
||||
command: ["sh", "-c", "grep '^cpu ' /proc/stat | awk '{usage=($2+$3+$4)*100/($2+$3+$4+$5)} END {print usage}'"]
|
||||
stdout: SplitParser {
|
||||
onRead: data => {
|
||||
root.cpuUsage = parseFloat(data);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
property Process ramProcess: Process {
|
||||
command: ["sh", "-c", "free -b | awk '/Mem:/ {print $2\" \"$3\" \"$3/$2*100}'"]
|
||||
stdout: SplitParser {
|
||||
onRead: data => {
|
||||
var parts = data.trim().split(/\s+/);
|
||||
if (parts.length >= 3) {
|
||||
root.totalRam = parseFloat(parts[0]) / (1024 * 1024 * 1024);
|
||||
root.usedRam = parseFloat(parts[1]) / (1024 * 1024 * 1024);
|
||||
root.ramUsage = parseFloat(parts[2]);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Monitoring timers (start manually when needed)
|
||||
property Timer cpuTimer: Timer {
|
||||
interval: 30000
|
||||
running: false
|
||||
repeat: true
|
||||
onTriggered: {
|
||||
cpuProcess.running = false;
|
||||
cpuProcess.running = true;
|
||||
}
|
||||
}
|
||||
|
||||
property Timer ramTimer: Timer {
|
||||
interval: 30000
|
||||
running: false
|
||||
repeat: true
|
||||
onTriggered: {
|
||||
ramProcess.running = false;
|
||||
ramProcess.running = true;
|
||||
}
|
||||
}
|
||||
|
||||
// System control functions
|
||||
function shutdown() {
|
||||
console.log("Executing shutdown command");
|
||||
shutdownProcess.running = true;
|
||||
}
|
||||
|
||||
function reboot() {
|
||||
console.log("Executing reboot command");
|
||||
rebootProcess.running = true;
|
||||
}
|
||||
|
||||
function lock() {
|
||||
console.log("Executing lock command");
|
||||
lockProcess.running = true;
|
||||
}
|
||||
|
||||
function logout() {
|
||||
console.log("Executing logout command");
|
||||
logoutProcess.running = true;
|
||||
}
|
||||
|
||||
function openPavuControl() {
|
||||
console.log("Opening PavuControl");
|
||||
pavucontrolProcess.running = true;
|
||||
}
|
||||
|
||||
// Performance monitoring control
|
||||
function startMonitoring() {
|
||||
console.log("Starting system monitoring");
|
||||
cpuTimer.running = true;
|
||||
ramTimer.running = true;
|
||||
}
|
||||
|
||||
function stopMonitoring() {
|
||||
console.log("Stopping system monitoring");
|
||||
cpuTimer.running = false;
|
||||
ramTimer.running = false;
|
||||
}
|
||||
|
||||
function setMonitoringInterval(intervalMs) {
|
||||
console.log("Setting monitoring interval to", intervalMs, "ms");
|
||||
cpuTimer.interval = intervalMs;
|
||||
ramTimer.interval = intervalMs;
|
||||
}
|
||||
|
||||
function refreshSystemStats() {
|
||||
console.log("Manually refreshing system stats");
|
||||
cpuProcess.running = false;
|
||||
cpuProcess.running = true;
|
||||
ramProcess.running = false;
|
||||
ramProcess.running = true;
|
||||
}
|
||||
|
||||
// Process state queries
|
||||
function isShutdownRunning() {
|
||||
return shutdownProcess.running;
|
||||
}
|
||||
function isRebootRunning() {
|
||||
return rebootProcess.running;
|
||||
}
|
||||
function isLogoutRunning() {
|
||||
return logoutProcess.running;
|
||||
}
|
||||
function isPavuControlRunning() {
|
||||
return pavucontrolProcess.running;
|
||||
}
|
||||
function isMonitoringActive() {
|
||||
return cpuTimer.running && ramTimer.running;
|
||||
}
|
||||
|
||||
function stopPavuControl() {
|
||||
pavucontrolProcess.running = false;
|
||||
}
|
||||
|
||||
// Formatted output helpers
|
||||
function getCpuUsageFormatted() {
|
||||
return Math.round(cpuUsage) + "%";
|
||||
}
|
||||
|
||||
function getRamUsageFormatted() {
|
||||
return Math.round(ramUsage) + "% (" + usedRam.toFixed(1) + "GB/" + totalRam.toFixed(1) + "GB)";
|
||||
}
|
||||
|
||||
function getRamUsageSimple() {
|
||||
return Math.round(ramUsage) + "%";
|
||||
}
|
||||
|
||||
Component.onDestruction: {
|
||||
// Stop all timers
|
||||
cpuTimer.running = false;
|
||||
ramTimer.running = false;
|
||||
|
||||
// Stop monitoring processes
|
||||
cpuProcess.running = false;
|
||||
ramProcess.running = false;
|
||||
|
||||
// Stop control processes if running
|
||||
if (shutdownProcess.running)
|
||||
shutdownProcess.running = false;
|
||||
if (rebootProcess.running)
|
||||
rebootProcess.running = false;
|
||||
if (lockProcess.running)
|
||||
lockProcess.running = false;
|
||||
if (logoutProcess.running)
|
||||
logoutProcess.running = false;
|
||||
if (pavucontrolProcess.running)
|
||||
pavucontrolProcess.running = false;
|
||||
}
|
||||
}
|
||||
38
modules/desktop/quickshell/qml/Data/MatugenManager.qml
Normal file
38
modules/desktop/quickshell/qml/Data/MatugenManager.qml
Normal file
@@ -0,0 +1,38 @@
|
||||
pragma Singleton
|
||||
import QtQuick
|
||||
|
||||
QtObject {
|
||||
property var service: null
|
||||
|
||||
// Expose current colors from the service
|
||||
readonly property color primary: service?.colors?.raw?.primary || "#7ed7b8"
|
||||
readonly property color on_primary: service?.colors?.raw?.on_primary || "#00382a"
|
||||
readonly property color primary_container: service?.colors?.raw?.primary_container || "#454b03"
|
||||
readonly property color on_primary_container: service?.colors?.raw?.on_primary_container || "#e2e993"
|
||||
readonly property color secondary: service?.colors?.raw?.secondary || "#c8c9a6"
|
||||
readonly property color surface_bright: service?.colors?.raw?.surface_bright || "#373b30"
|
||||
readonly property bool hasColors: service?.isLoaded || false
|
||||
|
||||
// Expose all raw Material 3 colors for complete access
|
||||
readonly property var rawColors: service?.colors?.raw || ({})
|
||||
|
||||
function setService(matugenService) {
|
||||
service = matugenService;
|
||||
console.log("MatugenManager: Service registered");
|
||||
}
|
||||
|
||||
function reloadColors() {
|
||||
if (service && service.reloadColors) {
|
||||
console.log("MatugenManager: Triggering color reload");
|
||||
service.reloadColors();
|
||||
return true;
|
||||
} else {
|
||||
console.warn("MatugenManager: No service available for reload");
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
function isAvailable() {
|
||||
return service !== null;
|
||||
}
|
||||
}
|
||||
315
modules/desktop/quickshell/qml/Data/Settings.qml
Normal file
315
modules/desktop/quickshell/qml/Data/Settings.qml
Normal file
@@ -0,0 +1,315 @@
|
||||
pragma Singleton
|
||||
import Quickshell
|
||||
import QtQuick
|
||||
import Quickshell.Io
|
||||
|
||||
Singleton {
|
||||
id: settings
|
||||
|
||||
// Prevent auto-saving during initial load
|
||||
property bool isLoading: true
|
||||
|
||||
// Settings persistence with atomic writes
|
||||
FileView {
|
||||
id: settingsFile
|
||||
path: "settings.json"
|
||||
blockWrites: true
|
||||
atomicWrites: true
|
||||
watchChanges: false
|
||||
|
||||
onLoaded: {
|
||||
settings.isLoading = true; // Disable auto-save during loading
|
||||
try {
|
||||
var content = JSON.parse(text());
|
||||
if (content) {
|
||||
// Load with fallback defaults
|
||||
settings.isDarkTheme = content.isDarkTheme ?? true;
|
||||
settings.currentTheme = content.currentTheme ?? (content.isDarkTheme !== false ? "oxocarbon_dark" : "oxocarbon_light");
|
||||
settings.useCustomAccent = content.useCustomAccent ?? false;
|
||||
settings.avatarSource = content.avatarSource ?? "/home/imxyy/Pictures/icon.jpg";
|
||||
settings.weatherLocation = content.weatherLocation ?? "Dinslaken";
|
||||
settings.useFahrenheit = content.useFahrenheit ?? false;
|
||||
settings.displayTime = content.displayTime ?? 6000;
|
||||
settings.videoPath = content.videoPath ?? "~/Videos/";
|
||||
settings.customDarkAccent = content.customDarkAccent ?? "#be95ff";
|
||||
settings.customLightAccent = content.customLightAccent ?? "#8a3ffc";
|
||||
settings.autoSwitchPlayer = content.autoSwitchPlayer ?? true;
|
||||
settings.alwaysShowPlayerDropdown = content.alwaysShowPlayerDropdown ?? true;
|
||||
settings.historyLimit = content.historyLimit ?? 25;
|
||||
settings.nightLightEnabled = content.nightLightEnabled ?? false;
|
||||
settings.nightLightWarmth = content.nightLightWarmth ?? 0.4;
|
||||
settings.nightLightAuto = content.nightLightAuto ?? false;
|
||||
settings.nightLightStartHour = content.nightLightStartHour ?? 20;
|
||||
settings.nightLightEndHour = content.nightLightEndHour ?? 6;
|
||||
settings.nightLightManualOverride = content.nightLightManualOverride ?? false;
|
||||
settings.nightLightManuallyEnabled = content.nightLightManuallyEnabled ?? false;
|
||||
settings.ignoredApps = content.ignoredApps ?? [];
|
||||
settings.workspaceBurstEnabled = content.workspaceBurstEnabled ?? true;
|
||||
settings.workspaceGlowEnabled = content.workspaceGlowEnabled ?? true;
|
||||
}
|
||||
} catch (e) {
|
||||
console.log("Error parsing user settings:", e);
|
||||
}
|
||||
// Re-enable auto-save after loading is complete
|
||||
settings.isLoading = false;
|
||||
}
|
||||
}
|
||||
|
||||
// User-configurable settings
|
||||
property string avatarSource: "/home/imxyy/Pictures/icon.jpg"
|
||||
property bool isDarkTheme: true // Keep for backwards compatibility
|
||||
property string currentTheme: "oxocarbon_dark" // New theme system
|
||||
property bool useCustomAccent: false // Whether to use custom accent colors
|
||||
property string weatherLocation: "Dinslaken"
|
||||
property bool useFahrenheit: false // Temperature unit setting
|
||||
property int displayTime: 6000 // Notification display time in ms
|
||||
property var ignoredApps: [] // Apps to ignore notifications from (case-insensitive)
|
||||
property int historyLimit: 25 // Notification history limit
|
||||
property string videoPath: "~/Videos/"
|
||||
property string customDarkAccent: "#be95ff"
|
||||
property string customLightAccent: "#8a3ffc"
|
||||
|
||||
// Music Player settings
|
||||
property bool autoSwitchPlayer: true
|
||||
property bool alwaysShowPlayerDropdown: true
|
||||
|
||||
// Night Light settings
|
||||
property bool nightLightEnabled: false
|
||||
property real nightLightWarmth: 0.4
|
||||
property bool nightLightAuto: false
|
||||
property int nightLightStartHour: 20 // 8 PM
|
||||
property int nightLightEndHour: 6 // 6 AM
|
||||
property bool nightLightManualOverride: false // Track manual user actions
|
||||
property bool nightLightManuallyEnabled: false // Track if user manually enabled it
|
||||
|
||||
// Animation settings
|
||||
property bool workspaceBurstEnabled: true
|
||||
property bool workspaceGlowEnabled: true
|
||||
|
||||
// UI constants
|
||||
readonly property real borderWidth: 9
|
||||
readonly property real cornerRadius: 20
|
||||
|
||||
signal settingsChanged
|
||||
|
||||
// Helper functions for managing ignored apps
|
||||
function addIgnoredApp(appName) {
|
||||
if (appName && appName.trim() !== "") {
|
||||
var trimmedName = appName.trim();
|
||||
// Case-insensitive check for existing apps
|
||||
var exists = false;
|
||||
for (var i = 0; i < ignoredApps.length; i++) {
|
||||
if (ignoredApps[i].toLowerCase() === trimmedName.toLowerCase()) {
|
||||
exists = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (!exists) {
|
||||
var newApps = ignoredApps.slice(); // Create a copy
|
||||
newApps.push(trimmedName);
|
||||
ignoredApps = newApps;
|
||||
console.log("Added ignored app:", trimmedName, "Current list:", ignoredApps);
|
||||
// Force save immediately (only if not loading)
|
||||
if (!isLoading) {
|
||||
saveSettings();
|
||||
}
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
function removeIgnoredApp(appName) {
|
||||
var index = ignoredApps.indexOf(appName);
|
||||
if (index > -1) {
|
||||
var newApps = ignoredApps.slice(); // Create a copy
|
||||
newApps.splice(index, 1);
|
||||
ignoredApps = newApps;
|
||||
console.log("Removed ignored app:", appName, "Current list:", ignoredApps);
|
||||
// Force save immediately (only if not loading)
|
||||
if (!isLoading) {
|
||||
saveSettings();
|
||||
}
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
function saveSettings() {
|
||||
try {
|
||||
var content = {
|
||||
isDarkTheme: settings.isDarkTheme,
|
||||
currentTheme: settings.currentTheme,
|
||||
useCustomAccent: settings.useCustomAccent,
|
||||
avatarSource: settings.avatarSource,
|
||||
weatherLocation: settings.weatherLocation,
|
||||
useFahrenheit: settings.useFahrenheit,
|
||||
displayTime: settings.displayTime,
|
||||
videoPath: settings.videoPath,
|
||||
customDarkAccent: settings.customDarkAccent,
|
||||
customLightAccent: settings.customLightAccent,
|
||||
autoSwitchPlayer: settings.autoSwitchPlayer,
|
||||
alwaysShowPlayerDropdown: settings.alwaysShowPlayerDropdown,
|
||||
historyLimit: settings.historyLimit,
|
||||
nightLightEnabled: settings.nightLightEnabled,
|
||||
nightLightWarmth: settings.nightLightWarmth,
|
||||
nightLightAuto: settings.nightLightAuto,
|
||||
nightLightStartHour: settings.nightLightStartHour,
|
||||
nightLightEndHour: settings.nightLightEndHour,
|
||||
nightLightManualOverride: settings.nightLightManualOverride,
|
||||
nightLightManuallyEnabled: settings.nightLightManuallyEnabled,
|
||||
ignoredApps: settings.ignoredApps,
|
||||
workspaceBurstEnabled: settings.workspaceBurstEnabled,
|
||||
workspaceGlowEnabled: settings.workspaceGlowEnabled
|
||||
};
|
||||
var jsonContent = JSON.stringify(content, null, 4);
|
||||
settingsFile.setText(jsonContent);
|
||||
} catch (e) {
|
||||
console.log("Error saving user settings:", e);
|
||||
}
|
||||
}
|
||||
|
||||
// Auto-save watchers (only save when not loading)
|
||||
onIsDarkThemeChanged: {
|
||||
if (!isLoading) {
|
||||
settingsChanged();
|
||||
saveSettings();
|
||||
}
|
||||
}
|
||||
onCurrentThemeChanged: {
|
||||
if (!isLoading) {
|
||||
settingsChanged();
|
||||
saveSettings();
|
||||
}
|
||||
}
|
||||
onUseCustomAccentChanged: {
|
||||
if (!isLoading) {
|
||||
settingsChanged();
|
||||
saveSettings();
|
||||
}
|
||||
}
|
||||
onAvatarSourceChanged: {
|
||||
if (!isLoading) {
|
||||
settingsChanged();
|
||||
saveSettings();
|
||||
}
|
||||
}
|
||||
onWeatherLocationChanged: {
|
||||
if (!isLoading) {
|
||||
settingsChanged();
|
||||
saveSettings();
|
||||
}
|
||||
}
|
||||
onUseFahrenheitChanged: {
|
||||
if (!isLoading) {
|
||||
settingsChanged();
|
||||
saveSettings();
|
||||
}
|
||||
}
|
||||
onDisplayTimeChanged: {
|
||||
if (!isLoading) {
|
||||
settingsChanged();
|
||||
saveSettings();
|
||||
}
|
||||
}
|
||||
onHistoryLimitChanged: {
|
||||
if (!isLoading) {
|
||||
settingsChanged();
|
||||
saveSettings();
|
||||
}
|
||||
}
|
||||
onVideoPathChanged: {
|
||||
if (!isLoading) {
|
||||
settingsChanged();
|
||||
saveSettings();
|
||||
}
|
||||
}
|
||||
onCustomDarkAccentChanged: {
|
||||
if (!isLoading) {
|
||||
settingsChanged();
|
||||
saveSettings();
|
||||
}
|
||||
}
|
||||
onCustomLightAccentChanged: {
|
||||
if (!isLoading) {
|
||||
settingsChanged();
|
||||
saveSettings();
|
||||
}
|
||||
}
|
||||
onAutoSwitchPlayerChanged: {
|
||||
if (!isLoading) {
|
||||
settingsChanged();
|
||||
saveSettings();
|
||||
}
|
||||
}
|
||||
onAlwaysShowPlayerDropdownChanged: {
|
||||
if (!isLoading) {
|
||||
settingsChanged();
|
||||
saveSettings();
|
||||
}
|
||||
}
|
||||
onNightLightEnabledChanged: {
|
||||
if (!isLoading) {
|
||||
settingsChanged();
|
||||
saveSettings();
|
||||
}
|
||||
}
|
||||
onNightLightWarmthChanged: {
|
||||
if (!isLoading) {
|
||||
settingsChanged();
|
||||
saveSettings();
|
||||
}
|
||||
}
|
||||
onNightLightAutoChanged: {
|
||||
if (!isLoading) {
|
||||
settingsChanged();
|
||||
saveSettings();
|
||||
}
|
||||
}
|
||||
onNightLightStartHourChanged: {
|
||||
if (!isLoading) {
|
||||
settingsChanged();
|
||||
saveSettings();
|
||||
}
|
||||
}
|
||||
onNightLightEndHourChanged: {
|
||||
if (!isLoading) {
|
||||
settingsChanged();
|
||||
saveSettings();
|
||||
}
|
||||
}
|
||||
onNightLightManualOverrideChanged: {
|
||||
if (!isLoading) {
|
||||
settingsChanged();
|
||||
saveSettings();
|
||||
}
|
||||
}
|
||||
onNightLightManuallyEnabledChanged: {
|
||||
if (!isLoading) {
|
||||
settingsChanged();
|
||||
saveSettings();
|
||||
}
|
||||
}
|
||||
onIgnoredAppsChanged: {
|
||||
if (!isLoading) {
|
||||
settingsChanged();
|
||||
saveSettings();
|
||||
}
|
||||
}
|
||||
onWorkspaceBurstEnabledChanged: {
|
||||
if (!isLoading) {
|
||||
settingsChanged();
|
||||
saveSettings();
|
||||
}
|
||||
}
|
||||
onWorkspaceGlowEnabledChanged: {
|
||||
if (!isLoading) {
|
||||
settingsChanged();
|
||||
saveSettings();
|
||||
}
|
||||
}
|
||||
|
||||
Component.onCompleted: {
|
||||
settingsFile.reload();
|
||||
}
|
||||
}
|
||||
240
modules/desktop/quickshell/qml/Data/ThemeManager.qml
Normal file
240
modules/desktop/quickshell/qml/Data/ThemeManager.qml
Normal file
@@ -0,0 +1,240 @@
|
||||
pragma Singleton
|
||||
import QtQuick
|
||||
import Quickshell
|
||||
import Quickshell.Io
|
||||
import "Themes" as Themes
|
||||
|
||||
Singleton {
|
||||
id: themeManager
|
||||
|
||||
// Import all theme definitions
|
||||
property var oxocarbon: Themes.Oxocarbon
|
||||
property var dracula: Themes.Dracula
|
||||
property var gruvbox: Themes.Gruvbox
|
||||
property var catppuccin: Themes.Catppuccin
|
||||
property var matugen: Themes.Matugen
|
||||
|
||||
// Available theme definitions
|
||||
readonly property var themes: ({
|
||||
"oxocarbon_dark": oxocarbon.dark,
|
||||
"oxocarbon_light": oxocarbon.light,
|
||||
"dracula_dark": dracula.dark,
|
||||
"dracula_light": dracula.light,
|
||||
"gruvbox_dark": gruvbox.dark,
|
||||
"gruvbox_light": gruvbox.light,
|
||||
"catppuccin_dark": catppuccin.dark,
|
||||
"catppuccin_light": catppuccin.light,
|
||||
"matugen_dark": matugen.dark,
|
||||
"matugen_light": matugen.light
|
||||
})
|
||||
|
||||
// Current theme selection - defaults to oxocarbon_dark if not set
|
||||
readonly property string currentThemeId: Settings.currentTheme || "oxocarbon_dark"
|
||||
readonly property var currentTheme: themes[currentThemeId] || themes["oxocarbon_dark"]
|
||||
|
||||
// Auto-update accents when Matugen colors change
|
||||
Connections {
|
||||
target: MatugenManager
|
||||
function onPrimaryChanged() {
|
||||
if (currentThemeId.startsWith("matugen_")) {
|
||||
updateMatugenAccents();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Connect to MatugenService signals for automatic accent updates
|
||||
Connections {
|
||||
target: MatugenManager.service
|
||||
function onMatugenColorsUpdated() {
|
||||
if (currentThemeId.startsWith("matugen_")) {
|
||||
console.log("ThemeManager: Received matugen colors update signal");
|
||||
updateMatugenAccents();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Initialize currentTheme in settings if not present
|
||||
Component.onCompleted: {
|
||||
if (!Settings.currentTheme) {
|
||||
console.log("Initializing currentTheme in settings");
|
||||
Settings.currentTheme = "oxocarbon_dark";
|
||||
Settings.saveSettings();
|
||||
}
|
||||
|
||||
// Matugen theme is now self-contained with service-based colors
|
||||
console.log("Matugen theme initialized with service-based colors");
|
||||
|
||||
// Update accents if already using matugen theme
|
||||
if (currentThemeId.startsWith("matugen_")) {
|
||||
updateMatugenAccents();
|
||||
}
|
||||
}
|
||||
|
||||
// Custom accent colors (can be changed by user)
|
||||
property string customDarkAccent: Settings.customDarkAccent || "#be95ff"
|
||||
property string customLightAccent: Settings.customLightAccent || "#8a3ffc"
|
||||
|
||||
// Dynamic color properties based on current theme
|
||||
readonly property color base00: currentTheme.base00
|
||||
readonly property color base01: currentTheme.base01
|
||||
readonly property color base02: currentTheme.base02
|
||||
readonly property color base03: currentTheme.base03
|
||||
readonly property color base04: currentTheme.base04
|
||||
readonly property color base05: currentTheme.base05
|
||||
readonly property color base06: currentTheme.base06
|
||||
readonly property color base07: currentTheme.base07
|
||||
readonly property color base08: currentTheme.base08
|
||||
readonly property color base09: currentTheme.base09
|
||||
readonly property color base0A: currentTheme.base0A
|
||||
readonly property color base0B: currentTheme.base0B
|
||||
readonly property color base0C: currentTheme.base0C
|
||||
readonly property color base0D: currentTheme.base0D
|
||||
readonly property color base0E: Settings.useCustomAccent ? (currentTheme.type === "dark" ? customDarkAccent : customLightAccent) : currentTheme.base0E
|
||||
readonly property color base0F: currentTheme.base0F
|
||||
|
||||
// Common UI color mappings
|
||||
readonly property color bgColor: base00
|
||||
readonly property color bgLight: base01
|
||||
readonly property color bgLighter: base02
|
||||
readonly property color fgColor: base04
|
||||
readonly property color fgColorBright: base05
|
||||
readonly property color accentColor: base0E
|
||||
readonly property color accentColorBright: base0D
|
||||
readonly property color highlightBg: Qt.rgba(base0E.r, base0E.g, base0E.b, 0.15)
|
||||
readonly property color errorColor: base08
|
||||
readonly property color greenColor: base0B
|
||||
readonly property color redColor: base08
|
||||
|
||||
// Alternative semantic aliases for convenience
|
||||
readonly property color background: base00
|
||||
readonly property color panelBackground: base01
|
||||
readonly property color selection: base02
|
||||
readonly property color border: base03
|
||||
readonly property color secondaryText: base04
|
||||
readonly property color primaryText: base05
|
||||
readonly property color brightText: base06
|
||||
readonly property color brightestText: base07
|
||||
readonly property color error: base08
|
||||
readonly property color warning: base09
|
||||
readonly property color highlight: base0A
|
||||
readonly property color success: base0B
|
||||
readonly property color info: base0C
|
||||
readonly property color primary: base0D
|
||||
readonly property color accent: base0E
|
||||
readonly property color special: base0F
|
||||
|
||||
// UI styling constants
|
||||
readonly property real borderWidth: 9
|
||||
readonly property real cornerRadius: 20
|
||||
|
||||
// Color utility functions
|
||||
function withOpacity(color, opacity) {
|
||||
return Qt.rgba(color.r, color.g, color.b, opacity);
|
||||
}
|
||||
|
||||
function withHighlight(color) {
|
||||
return Qt.rgba(color.r, color.g, color.b, 0.15);
|
||||
}
|
||||
|
||||
// Theme management functions
|
||||
function setTheme(themeId) {
|
||||
if (themes[themeId]) {
|
||||
const previousThemeId = Settings.currentTheme;
|
||||
Settings.currentTheme = themeId;
|
||||
|
||||
// Check if switching between matugen light/dark modes
|
||||
if (themeId.startsWith("matugen_") && previousThemeId && previousThemeId.startsWith("matugen_")) {
|
||||
const newMode = themeId.includes("_light") ? "light" : "dark";
|
||||
const oldMode = previousThemeId.includes("_light") ? "light" : "dark";
|
||||
|
||||
if (newMode !== oldMode) {
|
||||
console.log(`🎨 Switching matugen from ${oldMode} to ${newMode} mode`);
|
||||
}
|
||||
}
|
||||
|
||||
// Auto-update accents for Matugen themes
|
||||
if (themeId.startsWith("matugen_")) {
|
||||
updateMatugenAccents();
|
||||
}
|
||||
|
||||
Settings.saveSettings();
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
// Auto-update accent colors when using Matugen theme
|
||||
function updateMatugenAccents() {
|
||||
if (MatugenManager.isAvailable() && MatugenManager.hasColors) {
|
||||
// Get colors from the raw matugen palette
|
||||
const rawColors = MatugenManager.rawColors;
|
||||
|
||||
// Use primary for both dark and light themes - it's generated appropriately by matugen
|
||||
const accent = rawColors.primary;
|
||||
|
||||
// Debug log the colors we're using
|
||||
console.log("Raw colors available:", Object.keys(rawColors));
|
||||
console.log("Selected accent for both themes:", accent);
|
||||
|
||||
// Update custom accents - use the same accent for both
|
||||
setCustomAccent(accent, accent);
|
||||
|
||||
// Enable custom accents for Matugen theme
|
||||
Settings.useCustomAccent = true;
|
||||
Settings.saveSettings();
|
||||
|
||||
console.log("Auto-updated Matugen accents from service:", accent);
|
||||
} else {
|
||||
console.log("MatugenManager service not available or no colors loaded yet");
|
||||
}
|
||||
}
|
||||
|
||||
function getThemeList() {
|
||||
return Object.keys(themes).map(function (key) {
|
||||
return {
|
||||
id: key,
|
||||
name: themes[key].name,
|
||||
type: themes[key].type
|
||||
};
|
||||
});
|
||||
}
|
||||
|
||||
function getDarkThemes() {
|
||||
return getThemeList().filter(function (theme) {
|
||||
return theme.type === "dark";
|
||||
});
|
||||
}
|
||||
|
||||
function getLightThemes() {
|
||||
return getThemeList().filter(function (theme) {
|
||||
return theme.type === "light";
|
||||
});
|
||||
}
|
||||
|
||||
function setCustomAccent(darkColor, lightColor) {
|
||||
customDarkAccent = darkColor;
|
||||
customLightAccent = lightColor;
|
||||
Settings.customDarkAccent = darkColor;
|
||||
Settings.customLightAccent = lightColor;
|
||||
Settings.saveSettings();
|
||||
}
|
||||
|
||||
function toggleCustomAccent() {
|
||||
Settings.useCustomAccent = !Settings.useCustomAccent;
|
||||
Settings.saveSettings();
|
||||
}
|
||||
|
||||
// Legacy function for backwards compatibility
|
||||
function toggleTheme() {
|
||||
// Switch between dark and light variants of current theme family
|
||||
var currentFamily = currentThemeId.replace(/_dark|_light/, "");
|
||||
var newThemeId = currentTheme.type === "dark" ? currentFamily + "_light" : currentFamily + "_dark";
|
||||
|
||||
// If the opposite variant doesn't exist, switch to oxocarbon
|
||||
if (!themes[newThemeId]) {
|
||||
newThemeId = currentTheme.type === "dark" ? "oxocarbon_light" : "oxocarbon_dark";
|
||||
}
|
||||
|
||||
setTheme(newThemeId);
|
||||
}
|
||||
}
|
||||
76
modules/desktop/quickshell/qml/Data/Themes/Catppuccin.qml
Normal file
76
modules/desktop/quickshell/qml/Data/Themes/Catppuccin.qml
Normal file
@@ -0,0 +1,76 @@
|
||||
pragma Singleton
|
||||
import QtQuick
|
||||
|
||||
QtObject {
|
||||
readonly property var dark: ({
|
||||
name: "Catppuccin Mocha",
|
||||
type: "dark",
|
||||
base00: "#1e1e2e" // Base
|
||||
,
|
||||
base01: "#181825" // Mantle
|
||||
,
|
||||
base02: "#313244" // Surface0
|
||||
,
|
||||
base03: "#45475a" // Surface1
|
||||
,
|
||||
base04: "#585b70" // Surface2
|
||||
,
|
||||
base05: "#cdd6f4" // Text
|
||||
,
|
||||
base06: "#f5e0dc" // Rosewater
|
||||
,
|
||||
base07: "#b4befe" // Lavender
|
||||
,
|
||||
base08: "#f38ba8" // Red
|
||||
,
|
||||
base09: "#fab387" // Peach
|
||||
,
|
||||
base0A: "#f9e2af" // Yellow
|
||||
,
|
||||
base0B: "#a6e3a1" // Green
|
||||
,
|
||||
base0C: "#94e2d5" // Teal
|
||||
,
|
||||
base0D: "#89b4fa" // Blue
|
||||
,
|
||||
base0E: "#cba6f7" // Mauve
|
||||
,
|
||||
base0F: "#f2cdcd" // Flamingo
|
||||
})
|
||||
|
||||
readonly property var light: ({
|
||||
name: "Catppuccin Latte",
|
||||
type: "light",
|
||||
base00: "#eff1f5" // Base
|
||||
,
|
||||
base01: "#e6e9ef" // Mantle
|
||||
,
|
||||
base02: "#ccd0da" // Surface0
|
||||
,
|
||||
base03: "#bcc0cc" // Surface1
|
||||
,
|
||||
base04: "#acb0be" // Surface2
|
||||
,
|
||||
base05: "#4c4f69" // Text
|
||||
,
|
||||
base06: "#dc8a78" // Rosewater
|
||||
,
|
||||
base07: "#7287fd" // Lavender
|
||||
,
|
||||
base08: "#d20f39" // Red
|
||||
,
|
||||
base09: "#fe640b" // Peach
|
||||
,
|
||||
base0A: "#df8e1d" // Yellow
|
||||
,
|
||||
base0B: "#40a02b" // Green
|
||||
,
|
||||
base0C: "#179299" // Teal
|
||||
,
|
||||
base0D: "#1e66f5" // Blue
|
||||
,
|
||||
base0E: "#8839ef" // Mauve
|
||||
,
|
||||
base0F: "#dd7878" // Flamingo
|
||||
})
|
||||
}
|
||||
76
modules/desktop/quickshell/qml/Data/Themes/Dracula.qml
Normal file
76
modules/desktop/quickshell/qml/Data/Themes/Dracula.qml
Normal file
@@ -0,0 +1,76 @@
|
||||
pragma Singleton
|
||||
import QtQuick
|
||||
|
||||
QtObject {
|
||||
readonly property var dark: ({
|
||||
name: "Dracula",
|
||||
type: "dark",
|
||||
base00: "#282a36" // Background
|
||||
,
|
||||
base01: "#44475a" // Current line
|
||||
,
|
||||
base02: "#565761" // Selection
|
||||
,
|
||||
base03: "#6272a4" // Comment
|
||||
,
|
||||
base04: "#6272a4" // Dark foreground
|
||||
,
|
||||
base05: "#f8f8f2" // Foreground
|
||||
,
|
||||
base06: "#f8f8f2" // Light foreground
|
||||
,
|
||||
base07: "#ffffff" // Light background
|
||||
,
|
||||
base08: "#ff5555" // Red
|
||||
,
|
||||
base09: "#ffb86c" // Orange
|
||||
,
|
||||
base0A: "#f1fa8c" // Yellow
|
||||
,
|
||||
base0B: "#50fa7b" // Green
|
||||
,
|
||||
base0C: "#8be9fd" // Cyan
|
||||
,
|
||||
base0D: "#bd93f9" // Blue
|
||||
,
|
||||
base0E: "#ff79c6" // Magenta
|
||||
,
|
||||
base0F: "#ffb86c" // Orange
|
||||
})
|
||||
|
||||
readonly property var light: ({
|
||||
name: "Dracula Light",
|
||||
type: "light",
|
||||
base00: "#f8f8f2" // Light background
|
||||
,
|
||||
base01: "#ffffff" // Lighter background
|
||||
,
|
||||
base02: "#e5e5e5" // Selection
|
||||
,
|
||||
base03: "#bfbfbf" // Comment
|
||||
,
|
||||
base04: "#6272a4" // Dark foreground
|
||||
,
|
||||
base05: "#282a36" // Dark text
|
||||
,
|
||||
base06: "#21222c" // Darker text
|
||||
,
|
||||
base07: "#191a21" // Darkest
|
||||
,
|
||||
base08: "#e74c3c" // Red (adjusted for light)
|
||||
,
|
||||
base09: "#f39c12" // Orange
|
||||
,
|
||||
base0A: "#f1c40f" // Yellow
|
||||
,
|
||||
base0B: "#27ae60" // Green
|
||||
,
|
||||
base0C: "#17a2b8" // Cyan
|
||||
,
|
||||
base0D: "#6c7ce0" // Blue
|
||||
,
|
||||
base0E: "#e91e63" // Magenta
|
||||
,
|
||||
base0F: "#f39c12" // Orange
|
||||
})
|
||||
}
|
||||
76
modules/desktop/quickshell/qml/Data/Themes/Gruvbox.qml
Normal file
76
modules/desktop/quickshell/qml/Data/Themes/Gruvbox.qml
Normal file
@@ -0,0 +1,76 @@
|
||||
pragma Singleton
|
||||
import QtQuick
|
||||
|
||||
QtObject {
|
||||
readonly property var dark: ({
|
||||
name: "Gruvbox Dark",
|
||||
type: "dark",
|
||||
base00: "#282828" // Dark background
|
||||
,
|
||||
base01: "#3c3836" // Dark1
|
||||
,
|
||||
base02: "#504945" // Dark2
|
||||
,
|
||||
base03: "#665c54" // Dark3
|
||||
,
|
||||
base04: "#bdae93" // Light4
|
||||
,
|
||||
base05: "#d5c4a1" // Light3
|
||||
,
|
||||
base06: "#ebdbb2" // Light2
|
||||
,
|
||||
base07: "#fbf1c7" // Light1
|
||||
,
|
||||
base08: "#fb4934" // Red
|
||||
,
|
||||
base09: "#fe8019" // Orange
|
||||
,
|
||||
base0A: "#fabd2f" // Yellow
|
||||
,
|
||||
base0B: "#b8bb26" // Green
|
||||
,
|
||||
base0C: "#8ec07c" // Cyan
|
||||
,
|
||||
base0D: "#83a598" // Blue
|
||||
,
|
||||
base0E: "#d3869b" // Purple
|
||||
,
|
||||
base0F: "#d65d0e" // Brown
|
||||
})
|
||||
|
||||
readonly property var light: ({
|
||||
name: "Gruvbox Light",
|
||||
type: "light",
|
||||
base00: "#fbf1c7" // Light background
|
||||
,
|
||||
base01: "#ebdbb2" // Light1
|
||||
,
|
||||
base02: "#d5c4a1" // Light2
|
||||
,
|
||||
base03: "#bdae93" // Light3
|
||||
,
|
||||
base04: "#665c54" // Dark3
|
||||
,
|
||||
base05: "#504945" // Dark2
|
||||
,
|
||||
base06: "#3c3836" // Dark1
|
||||
,
|
||||
base07: "#282828" // Dark background
|
||||
,
|
||||
base08: "#cc241d" // Red
|
||||
,
|
||||
base09: "#d65d0e" // Orange
|
||||
,
|
||||
base0A: "#d79921" // Yellow
|
||||
,
|
||||
base0B: "#98971a" // Green
|
||||
,
|
||||
base0C: "#689d6a" // Cyan
|
||||
,
|
||||
base0D: "#458588" // Blue
|
||||
,
|
||||
base0E: "#b16286" // Purple
|
||||
,
|
||||
base0F: "#d65d0e" // Brown
|
||||
})
|
||||
}
|
||||
141
modules/desktop/quickshell/qml/Data/Themes/Matugen.qml
Normal file
141
modules/desktop/quickshell/qml/Data/Themes/Matugen.qml
Normal file
@@ -0,0 +1,141 @@
|
||||
pragma Singleton
|
||||
import QtQuick
|
||||
|
||||
QtObject {
|
||||
// Reference to the MatugenService
|
||||
property var matugenService: null
|
||||
|
||||
// Debug helper to check service status
|
||||
function debugServiceStatus() {
|
||||
console.log("🔍 Debug: matugenService =", matugenService);
|
||||
console.log("🔍 Debug: matugenService.isLoaded =", matugenService ? matugenService.isLoaded : "N/A");
|
||||
console.log("🔍 Debug: matugenService.colorVersion =", matugenService ? matugenService.colorVersion : "N/A");
|
||||
console.log("🔍 Debug: condition result =", (matugenService && matugenService.isLoaded && matugenService.colorVersion >= 0));
|
||||
if (matugenService && matugenService.colors) {
|
||||
console.log("🔍 Debug: service.colors.dark =", JSON.stringify(matugenService.colors.dark));
|
||||
}
|
||||
}
|
||||
|
||||
// Map matugen colors to base16 scheme - using the service when available
|
||||
// The colorVersion dependency forces re-evaluation when colors update
|
||||
readonly property var dark: {
|
||||
debugServiceStatus();
|
||||
if (matugenService && matugenService.isLoaded && matugenService.colorVersion >= 0) {
|
||||
// Use service colors if available, or generate fallback if we have light colors
|
||||
return matugenService.colors.dark || {
|
||||
name: "Matugen Dark (Generated from Light)",
|
||||
type: "dark",
|
||||
// If we only have light colors, create dark fallback
|
||||
base00: "#141311",
|
||||
base01: "#1c1c19",
|
||||
base02: "#20201d",
|
||||
base03: "#2a2a27",
|
||||
base04: "#c9c7ba",
|
||||
base05: "#e5e2de",
|
||||
base06: "#31302e",
|
||||
base07: "#e5e2de",
|
||||
base08: "#ffb4ab",
|
||||
base09: "#b5ccb9",
|
||||
base0A: "#e4e5c1",
|
||||
base0B: "#c8c7b7",
|
||||
base0C: "#c8c9a6",
|
||||
base0D: "#c8c9a6",
|
||||
base0E: "#47483b",
|
||||
base0F: "#000000"
|
||||
};
|
||||
} else {
|
||||
return {
|
||||
name: "Matugen Dark",
|
||||
type: "dark",
|
||||
// Updated fallback colors to match current quickshell-colors.qml
|
||||
base00: "#141311",
|
||||
base01: "#1c1c19",
|
||||
base02: "#20201d",
|
||||
base03: "#2a2a27",
|
||||
base04: "#c9c7ba",
|
||||
base05: "#e5e2de",
|
||||
base06: "#31302e",
|
||||
base07: "#e5e2de",
|
||||
base08: "#ffb4ab",
|
||||
base09: "#b5ccb9",
|
||||
base0A: "#e4e5c1",
|
||||
base0B: "#c8c7b7",
|
||||
base0C: "#c8c9a6",
|
||||
base0D: "#c8c9a6",
|
||||
base0E: "#47483b",
|
||||
base0F: "#000000"
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
readonly property var light: {
|
||||
if (matugenService && matugenService.isLoaded && matugenService.colorVersion >= 0) {
|
||||
// Use service colors if available, or generate fallback if we have dark colors
|
||||
return matugenService.colors.light || {
|
||||
name: "Matugen Light (Generated from Dark)",
|
||||
type: "light",
|
||||
// If we only have dark colors, create light fallback
|
||||
base00: "#ffffff",
|
||||
base01: "#f5f5f5",
|
||||
base02: "#e8e8e8",
|
||||
base03: "#d0d0d0",
|
||||
base04: "#666666",
|
||||
base05: "#1a1a1a",
|
||||
base06: "#000000",
|
||||
base07: "#ffffff",
|
||||
base08: "#d32f2f",
|
||||
base09: "#7b1fa2",
|
||||
base0A: "#f57c00",
|
||||
base0B: "#388e3c",
|
||||
base0C: "#0097a7",
|
||||
base0D: "#1976d2",
|
||||
base0E: "#5e35b1",
|
||||
base0F: "#000000"
|
||||
};
|
||||
} else {
|
||||
return {
|
||||
name: "Matugen Light",
|
||||
type: "light",
|
||||
// Updated fallback colors based on current colors
|
||||
base00: "#ffffff",
|
||||
base01: "#f5f5f5",
|
||||
base02: "#e8e8e8",
|
||||
base03: "#d0d0d0",
|
||||
base04: "#666666",
|
||||
base05: "#1a1a1a",
|
||||
base06: "#000000",
|
||||
base07: "#ffffff",
|
||||
base08: "#d32f2f",
|
||||
base09: "#7b1fa2",
|
||||
base0A: "#f57c00",
|
||||
base0B: "#388e3c",
|
||||
base0C: "#0097a7",
|
||||
base0D: "#1976d2",
|
||||
base0E: "#5e35b1",
|
||||
base0F: "#000000"
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
// Direct access to primary colors for accent updates
|
||||
readonly property color primary: (matugenService && matugenService.getColor && matugenService.colorVersion >= 0) ? matugenService.getColor("primary") || "#c8c9a6" : "#c8c9a6"
|
||||
readonly property color on_primary: (matugenService && matugenService.getColor && matugenService.colorVersion >= 0) ? matugenService.getColor("on_primary") || "#303219" : "#303219"
|
||||
|
||||
// Function to set the service reference
|
||||
function setMatugenService(service) {
|
||||
matugenService = service;
|
||||
console.log("🔌 MatugenService connected to theme:", service);
|
||||
|
||||
// Connect to service signals for automatic updates
|
||||
if (service) {
|
||||
service.matugenColorsUpdated.connect(function () {
|
||||
console.log("🎨 Matugen colors updated in theme (version " + service.colorVersion + ")");
|
||||
debugServiceStatus();
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
Component.onCompleted: {
|
||||
console.log("Matugen theme loaded, waiting for MatugenService connection");
|
||||
}
|
||||
}
|
||||
76
modules/desktop/quickshell/qml/Data/Themes/Oxocarbon.qml
Normal file
76
modules/desktop/quickshell/qml/Data/Themes/Oxocarbon.qml
Normal file
@@ -0,0 +1,76 @@
|
||||
pragma Singleton
|
||||
import QtQuick
|
||||
|
||||
QtObject {
|
||||
readonly property var dark: ({
|
||||
name: "Oxocarbon Dark",
|
||||
type: "dark",
|
||||
base00: "#161616" // OLED-friendly background
|
||||
,
|
||||
base01: "#262626" // Surface 1
|
||||
,
|
||||
base02: "#393939" // Surface 2
|
||||
,
|
||||
base03: "#525252" // Surface 3
|
||||
,
|
||||
base04: "#6f6f6f" // Text secondary
|
||||
,
|
||||
base05: "#c6c6c6" // Text primary
|
||||
,
|
||||
base06: "#e0e0e0" // Text on color
|
||||
,
|
||||
base07: "#f4f4f4" // Text inverse
|
||||
,
|
||||
base08: "#ff7eb6" // Red (pink)
|
||||
,
|
||||
base09: "#ee5396" // Magenta
|
||||
,
|
||||
base0A: "#42be65" // Green
|
||||
,
|
||||
base0B: "#be95ff" // Purple
|
||||
,
|
||||
base0C: "#3ddbd9" // Cyan
|
||||
,
|
||||
base0D: "#78a9ff" // Blue
|
||||
,
|
||||
base0E: "#be95ff" // Purple (accent)
|
||||
,
|
||||
base0F: "#08bdba" // Teal
|
||||
})
|
||||
|
||||
readonly property var light: ({
|
||||
name: "Oxocarbon Light",
|
||||
type: "light",
|
||||
base00: "#f4f4f4" // Light background
|
||||
,
|
||||
base01: "#ffffff" // Surface 1
|
||||
,
|
||||
base02: "#e0e0e0" // Surface 2
|
||||
,
|
||||
base03: "#c6c6c6" // Surface 3
|
||||
,
|
||||
base04: "#525252" // Text secondary
|
||||
,
|
||||
base05: "#262626" // Text primary
|
||||
,
|
||||
base06: "#161616" // Text on color
|
||||
,
|
||||
base07: "#000000" // Text inverse
|
||||
,
|
||||
base08: "#da1e28" // Red
|
||||
,
|
||||
base09: "#d12771" // Magenta
|
||||
,
|
||||
base0A: "#198038" // Green
|
||||
,
|
||||
base0B: "#8a3ffc" // Purple
|
||||
,
|
||||
base0C: "#007d79" // Cyan
|
||||
,
|
||||
base0D: "#0f62fe" // Blue
|
||||
,
|
||||
base0E: "#8a3ffc" // Purple (accent)
|
||||
,
|
||||
base0F: "#005d5d" // Teal
|
||||
})
|
||||
}
|
||||
60
modules/desktop/quickshell/qml/Data/quickshell-colors.qml
Normal file
60
modules/desktop/quickshell/qml/Data/quickshell-colors.qml
Normal file
@@ -0,0 +1,60 @@
|
||||
pragma Singleton
|
||||
import Quickshell
|
||||
import QtQuick
|
||||
|
||||
Singleton {
|
||||
readonly property color background: "#13140c"
|
||||
readonly property color error: "#ffb4ab"
|
||||
readonly property color error_container: "#93000a"
|
||||
readonly property color inverse_on_surface: "#313128"
|
||||
readonly property color inverse_primary: "#5d631c"
|
||||
readonly property color inverse_surface: "#e5e3d6"
|
||||
readonly property color on_background: "#e5e3d6"
|
||||
readonly property color on_error: "#690005"
|
||||
readonly property color on_error_container: "#ffdad6"
|
||||
readonly property color on_primary: "#2f3300"
|
||||
readonly property color on_primary_container: "#e2e993"
|
||||
readonly property color on_primary_fixed: "#1b1d00"
|
||||
readonly property color on_primary_fixed_variant: "#454b03"
|
||||
readonly property color on_secondary: "#30321a"
|
||||
readonly property color on_secondary_container: "#e4e5c1"
|
||||
readonly property color on_secondary_fixed: "#1b1d07"
|
||||
readonly property color on_secondary_fixed_variant: "#47492e"
|
||||
readonly property color on_surface: "#e5e3d6"
|
||||
readonly property color on_surface_variant: "#c8c7b7"
|
||||
readonly property color on_tertiary: "#07372c"
|
||||
readonly property color on_tertiary_container: "#beecdc"
|
||||
readonly property color on_tertiary_fixed: "#002019"
|
||||
readonly property color on_tertiary_fixed_variant: "#234e42"
|
||||
readonly property color outline: "#929182"
|
||||
readonly property color outline_variant: "#47483b"
|
||||
readonly property color primary: "#c5cc7a"
|
||||
readonly property color primary_container: "#454b03"
|
||||
readonly property color primary_fixed: "#e2e993"
|
||||
readonly property color primary_fixed_dim: "#c5cc7a"
|
||||
readonly property color scrim: "#000000"
|
||||
readonly property color secondary: "#c8c9a6"
|
||||
readonly property color secondary_container: "#47492e"
|
||||
readonly property color secondary_fixed: "#e4e5c1"
|
||||
readonly property color secondary_fixed_dim: "#c8c9a6"
|
||||
readonly property color shadow: "#000000"
|
||||
readonly property color surface: "#13140c"
|
||||
readonly property color surface_bright: "#3a3a31"
|
||||
readonly property color surface_container: "#202018"
|
||||
readonly property color surface_container_high: "#2a2a22"
|
||||
readonly property color surface_container_highest: "#35352c"
|
||||
readonly property color surface_container_low: "#1c1c14"
|
||||
readonly property color surface_container_lowest: "#0e0f08"
|
||||
readonly property color surface_dim: "#13140c"
|
||||
readonly property color surface_tint: "#c5cc7a"
|
||||
|
||||
readonly property color surface_variant: "#47483b"
|
||||
readonly property color tertiary: "#a3d0c0"
|
||||
readonly property color tertiary_container: "#234e42"
|
||||
readonly property color tertiary_fixed: "#beecdc"
|
||||
readonly property color tertiary_fixed_dim: "#a3d0c0"
|
||||
|
||||
function withAlpha(color: color, alpha: real): color {
|
||||
return Qt.rgba(color.r, color.g, color.b, alpha);
|
||||
}
|
||||
}
|
||||
7
modules/desktop/quickshell/qml/Data/settings.json
Normal file
7
modules/desktop/quickshell/qml/Data/settings.json
Normal file
@@ -0,0 +1,7 @@
|
||||
{
|
||||
"isDarkTheme": true,
|
||||
"avatarSource": "/home/imxyy/Pictures/icon.jpg",
|
||||
"weatherLocation": "Dinslaken",
|
||||
"displayTime": 6000,
|
||||
"videoPath": "~/Videos/"
|
||||
}
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user