diff --git a/README.md b/README.md
index 61e4436..fde2c5a 100644
--- a/README.md
+++ b/README.md
@@ -1,36 +1,42 @@
# NixOS system configurations
-## 🐬 Totsugeki
+## Installation (WIP)
+
+## Hosts
+
+### 🐬 Totsugeki
Configuration files for my desktop
-### Programs
+#### Programs
-Name | Type
-:-: | :-:
-Hyprland | Wayland compositor
-Hyprlock | Screen locker
-Waybar | Statusbar
-dunst | Notification daemon
-rofi | Launcher
-swww | Wallpaper daemon
-Neovim | Text editor
-Firefox | Web browser
-Dolphin | File browser
-qBittorrent | Torrent client
+| Name | Type |
+| :----------: | :-----------------: |
+| KDE Plasma 6 | Desktop environment |
+| Krohnkite | Auto-tiling plugin |
+| Neovim | Text editor |
+| Firefox | Web browser |
+| Dolphin | File browser |
+| qBittorrent | Torrent client |
+#### Games
-## 🐳 Great Yamada
+- Steam
+- Minecraft (Prism Launcher)
+- osu! (Lazer client)
+- r2modman (Mod manager)
+- ProtonUp-Qt
+
+### 🐳 Great Yamada
Configuration for my home server
-### Services
+#### Services
**Still a WIP**
-Name | Type | Public-facing
-:-: | :-: | :-:
-Nginx | Web server and reverse proxy | x
-PostgreSQL | Database engine
-Forgejo | Git repository | x
-
+| Name | Type | Public-facing |
+| :--------: | :--------------------------: | :-----------: |
+| Nginx | Web server and reverse proxy | x |
+| PostgreSQL | Database engine |
+| Forgejo | Git repository | x |
diff --git a/common/home.nix b/common/home.nix
index 494841f..b2de5c3 100644
--- a/common/home.nix
+++ b/common/home.nix
@@ -6,7 +6,7 @@
packages = with pkgs; [ python3 rclone xdg-utils ];
sessionVariables = {
EDITOR = "nvim";
- DOTNET_ROOT = "${pkgs.dotnet-sdk_7}";
+ DOTNET_ROOT = "${pkgs.dotnet-sdk_8}";
};
sessionPath = [ "$HOME/.dotnet/tools" ];
};
diff --git a/flake.lock b/flake.lock
index 7216918..4589dbb 100644
--- a/flake.lock
+++ b/flake.lock
@@ -9,11 +9,11 @@
]
},
"locked": {
- "lastModified": 1711099426,
- "narHash": "sha256-HzpgM/wc3aqpnHJJ2oDqPBkNsqWbW0WfWUO8lKu8nGk=",
+ "lastModified": 1717408969,
+ "narHash": "sha256-Q0OEFqe35fZbbRPPRdrjTUUChKVhhWXz3T9ZSKmaoVY=",
"owner": "numtide",
"repo": "devshell",
- "rev": "2d45b54ca4a183f2fdcf4b19c895b64fbf620ee8",
+ "rev": "1ebbe68d57457c8cae98145410b164b5477761f4",
"type": "github"
},
"original": {
@@ -60,11 +60,11 @@
]
},
"locked": {
- "lastModified": 1712014858,
- "narHash": "sha256-sB4SWl2lX95bExY2gMFG5HIzvva5AVMJd4Igm+GpZNw=",
+ "lastModified": 1717285511,
+ "narHash": "sha256-iKzJcpdXih14qYVcZ9QC9XuZYnPc6T8YImb6dX166kw=",
"owner": "hercules-ci",
"repo": "flake-parts",
- "rev": "9126214d0a59633752a136528f5f3b9aa8565b7d",
+ "rev": "2a55567fcf15b1b1c7ed712a2c6fadaec7412ea8",
"type": "github"
},
"original": {
@@ -91,21 +91,30 @@
"type": "github"
}
},
- "flake-utils_2": {
+ "git-hooks": {
"inputs": {
- "systems": "systems_2"
+ "flake-compat": "flake-compat_2",
+ "gitignore": "gitignore",
+ "nixpkgs": [
+ "nixvim",
+ "nixpkgs"
+ ],
+ "nixpkgs-stable": [
+ "nixvim",
+ "nixpkgs"
+ ]
},
"locked": {
- "lastModified": 1710146030,
- "narHash": "sha256-SZ5L6eA7HJ/nmkzGG7/ISclqe6oZdOZTNoesiInkXPQ=",
- "owner": "numtide",
- "repo": "flake-utils",
- "rev": "b1d9ab70662946ef0850d488da1c9019f3a9752a",
+ "lastModified": 1717664902,
+ "narHash": "sha256-7XfBuLULizXjXfBYy/VV+SpYMHreNRHk9nKMsm1bgb4=",
+ "owner": "cachix",
+ "repo": "git-hooks.nix",
+ "rev": "cc4d466cb1254af050ff7bdf47f6d404a7c646d1",
"type": "github"
},
"original": {
- "owner": "numtide",
- "repo": "flake-utils",
+ "owner": "cachix",
+ "repo": "git-hooks.nix",
"type": "github"
}
},
@@ -113,7 +122,7 @@
"inputs": {
"nixpkgs": [
"nixvim",
- "pre-commit-hooks",
+ "git-hooks",
"nixpkgs"
]
},
@@ -138,11 +147,11 @@
]
},
"locked": {
- "lastModified": 1713527814,
- "narHash": "sha256-0NJLgMKvv+HluzeHei/m8vDhX3xovNLkMw/idwIJ218=",
+ "lastModified": 1718526747,
+ "narHash": "sha256-sKrD/utGvmtQALvuDj4j0CT3AJXP1idOAq2p+27TpeE=",
"owner": "nix-community",
"repo": "home-manager",
- "rev": "0184c8180f5cbb8e3a54a239b874fe849d3073cb",
+ "rev": "0a7ffb28e5df5844d0e8039c9833d7075cdee792",
"type": "github"
},
"original": {
@@ -159,11 +168,32 @@
]
},
"locked": {
- "lastModified": 1712989663,
- "narHash": "sha256-r2X/DIAyKOLiHoncjcxUk1TENWDTTaigRBaY53Cts/w=",
+ "lastModified": 1718141734,
+ "narHash": "sha256-cA+6l8ZCZ7MXGijVuY/1f55+wF/RT4PlTR9+g4bx86w=",
"owner": "nix-community",
"repo": "home-manager",
- "rev": "40ab43ae98cb3e6f07eaeaa3f3ed56d589da21b0",
+ "rev": "892f76bd0aa09a0f7f73eb41834b8a904b6d0fad",
+ "type": "github"
+ },
+ "original": {
+ "owner": "nix-community",
+ "repo": "home-manager",
+ "type": "github"
+ }
+ },
+ "home-manager_3": {
+ "inputs": {
+ "nixpkgs": [
+ "plasma-manager",
+ "nixpkgs"
+ ]
+ },
+ "locked": {
+ "lastModified": 1714377222,
+ "narHash": "sha256-UsDsjWCKlWn8vbXi8Zza9Hkq3xyk8fpvFNo2VM5S74E=",
+ "owner": "nix-community",
+ "repo": "home-manager",
+ "rev": "2af7c78b7bb9cf18406a193eba13ef9f99388f49",
"type": "github"
},
"original": {
@@ -180,11 +210,11 @@
]
},
"locked": {
- "lastModified": 1711763326,
- "narHash": "sha256-sXcesZWKXFlEQ8oyGHnfk4xc9f2Ip0X/+YZOq3sKviI=",
+ "lastModified": 1717976995,
+ "narHash": "sha256-u3HBinyIyUvL1+N816bODpJmSQdgn0Mbb8BprFw7kqo=",
"owner": "lnl7",
"repo": "nix-darwin",
- "rev": "36524adc31566655f2f4d55ad6b875fb5c1a4083",
+ "rev": "315aa649ba307704db0b16c92f097a08a65ec955",
"type": "github"
},
"original": {
@@ -195,27 +225,27 @@
},
"nixpkgs": {
"locked": {
- "lastModified": 1713297878,
- "narHash": "sha256-hOkzkhLT59wR8VaMbh1ESjtZLbGi+XNaBN6h49SPqEc=",
+ "lastModified": 1718276662,
+ "narHash": "sha256-p0KXZc6ekKXwYcMeyS5Hs9uTQKoSDkJW1QDf0gkilLk=",
"owner": "nixos",
"repo": "nixpkgs",
- "rev": "66adc1e47f8784803f2deb6cacd5e07264ec2d5c",
+ "rev": "b17538d34de26bf52626a9caff104a267abd991a",
"type": "github"
},
"original": {
"owner": "nixos",
- "ref": "nixos-unstable",
"repo": "nixpkgs",
+ "rev": "b17538d34de26bf52626a9caff104a267abd991a",
"type": "github"
}
},
"nixpkgs-stable": {
"locked": {
- "lastModified": 1713434076,
- "narHash": "sha256-+/p5edwlkqKZc6GDAQl+92Hoe1f3NNbUF9uj+X9H3pU=",
+ "lastModified": 1718478900,
+ "narHash": "sha256-v43N1gZLcGkhg3PdcrKUNIZ1L0FBzB2JqhIYEyKAHEs=",
"owner": "NixOS",
"repo": "nixpkgs",
- "rev": "8494ae076b7878d61a7d2d25e89a847fe8f8364c",
+ "rev": "c884223af91820615a6146af1ae1fea25c107005",
"type": "github"
},
"original": {
@@ -230,19 +260,20 @@
"devshell": "devshell",
"flake-compat": "flake-compat",
"flake-parts": "flake-parts",
+ "git-hooks": "git-hooks",
"home-manager": "home-manager_2",
"nix-darwin": "nix-darwin",
"nixpkgs": [
"nixpkgs"
],
- "pre-commit-hooks": "pre-commit-hooks"
+ "treefmt-nix": "treefmt-nix"
},
"locked": {
- "lastModified": 1713530381,
- "narHash": "sha256-54sXzrwhKkI9uzeHRPNtpB4pCQqIkzzr1FFUiG4znQU=",
+ "lastModified": 1718578900,
+ "narHash": "sha256-BX0aRxoE3zOrX9vsm6zTcby0cpfc6z3olWkvbmKXi+Q=",
"owner": "nix-community",
"repo": "nixvim",
- "rev": "83a7ce9846b1b01a34b3e6b25077c1a5044ad7b3",
+ "rev": "36b4a39b2bd3bafc0cfd28bf94e1b21f142b6884",
"type": "github"
},
"original": {
@@ -251,31 +282,24 @@
"type": "github"
}
},
- "pre-commit-hooks": {
+ "plasma-manager": {
"inputs": {
- "flake-compat": "flake-compat_2",
- "flake-utils": "flake-utils_2",
- "gitignore": "gitignore",
+ "home-manager": "home-manager_3",
"nixpkgs": [
- "nixvim",
- "nixpkgs"
- ],
- "nixpkgs-stable": [
- "nixvim",
"nixpkgs"
]
},
"locked": {
- "lastModified": 1712897695,
- "narHash": "sha256-nMirxrGteNAl9sWiOhoN5tIHyjBbVi5e2tgZUgZlK3Y=",
- "owner": "cachix",
- "repo": "pre-commit-hooks.nix",
- "rev": "40e6053ecb65fcbf12863338a6dcefb3f55f1bf8",
+ "lastModified": 1718567165,
+ "narHash": "sha256-nhg4r4Kn3deooPiNao8oH/K7CcvRotDzBtg00MXiZkU=",
+ "owner": "pjones",
+ "repo": "plasma-manager",
+ "rev": "b906c67581fa12ad2821f295b37b5733fcc76926",
"type": "github"
},
"original": {
- "owner": "cachix",
- "repo": "pre-commit-hooks.nix",
+ "owner": "pjones",
+ "repo": "plasma-manager",
"type": "github"
}
},
@@ -284,6 +308,7 @@
"home-manager": "home-manager",
"nixpkgs": "nixpkgs",
"nixvim": "nixvim",
+ "plasma-manager": "plasma-manager",
"sops-nix": "sops-nix"
}
},
@@ -295,11 +320,11 @@
"nixpkgs-stable": "nixpkgs-stable"
},
"locked": {
- "lastModified": 1713532771,
- "narHash": "sha256-vfKxhYVMzG2tg48/1rewBoSLCrKIjQsG1j7Nm/Y2gf4=",
+ "lastModified": 1718506969,
+ "narHash": "sha256-Pm9I/BMQHbsucdWf6y9G3xBZh3TMlThGo4KBbeoeczg=",
"owner": "Mic92",
"repo": "sops-nix",
- "rev": "a929a011a09db735abc45a8a45d1ff7fdee62755",
+ "rev": "797ce4c1f45a85df6dd3d9abdc53f2691bea9251",
"type": "github"
},
"original": {
@@ -323,18 +348,24 @@
"type": "github"
}
},
- "systems_2": {
+ "treefmt-nix": {
+ "inputs": {
+ "nixpkgs": [
+ "nixvim",
+ "nixpkgs"
+ ]
+ },
"locked": {
- "lastModified": 1681028828,
- "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=",
- "owner": "nix-systems",
- "repo": "default",
- "rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e",
+ "lastModified": 1718139168,
+ "narHash": "sha256-1TZQcdETNdJMcfwwoshVeCjwWfrPtkSQ8y8wFX3it7k=",
+ "owner": "numtide",
+ "repo": "treefmt-nix",
+ "rev": "1cb529bffa880746a1d0ec4e0f5076876af931f1",
"type": "github"
},
"original": {
- "owner": "nix-systems",
- "repo": "default",
+ "owner": "numtide",
+ "repo": "treefmt-nix",
"type": "github"
}
}
diff --git a/flake.nix b/flake.nix
index 4e27af9..95412d0 100644
--- a/flake.nix
+++ b/flake.nix
@@ -2,7 +2,9 @@
description = "System configurations";
inputs = {
- nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
+ # nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
+ nixpkgs.url =
+ "github:nixos/nixpkgs/b17538d34de26bf52626a9caff104a267abd991a";
home-manager = {
url = "github:nix-community/home-manager";
inputs.nixpkgs.follows = "nixpkgs";
@@ -15,40 +17,50 @@
url = "github:Mic92/sops-nix";
inputs.nixpkgs.follows = "nixpkgs";
};
- };
-
- outputs = { self, nixpkgs, home-manager, nixvim, sops-nix }@inputs: {
- nixosConfigurations = {
- totsugeki = nixpkgs.lib.nixosSystem {
- system = "x86_64-linux";
- modules = [
- ./common/nixos.nix
- ./hosts/totsugeki/nixos.nix
- home-manager.nixosModules.home-manager
- sops-nix.nixosModules.sops
- {
- home-manager.useUserPackages = true;
- home-manager.users.avery = {
- imports = [
- nixvim.homeManagerModules.nixvim
- ./common/home.nix
- ./common/zsh
- ./hosts/totsugeki/desktop
- ./hosts/totsugeki/development
- ];
- };
- }
- ];
- };
- greatyamada = nixpkgs.lib.nixosSystem {
- system = "x86_64-linux";
- modules = [
- ./common/nixos.nix
- ./hosts/greatyamada/nixos.nix
- ./hosts/greatyamada/services
- sops-nix.nixosModules.sops
- ];
- };
+ plasma-manager = {
+ url = "github:pjones/plasma-manager";
+ inputs.nixpkgs.follows = "nixpkgs";
};
};
+
+ outputs =
+ { self, nixpkgs, home-manager, nixvim, sops-nix, plasma-manager }@inputs: {
+ nixosConfigurations = {
+ totsugeki = nixpkgs.lib.nixosSystem {
+ system = "x86_64-linux";
+ modules = [
+ ./common/nixos.nix
+ ./hosts/totsugeki/nixos
+ ./hosts/greatyamada/services/minecraft
+ sops-nix.nixosModules.sops
+ home-manager.nixosModules.home-manager
+ {
+ home-manager = {
+ backupFileExtension = "bak";
+ useUserPackages = true;
+ users.avery = {
+ imports = [
+ nixvim.homeManagerModules.nixvim
+ plasma-manager.homeManagerModules.plasma-manager
+ ./common/home.nix
+ ./common/zsh
+ ./hosts/totsugeki/home-manager
+ ];
+ };
+ };
+ }
+ ];
+ specialArgs = { inherit inputs; };
+ };
+ greatyamada = nixpkgs.lib.nixosSystem {
+ system = "x86_64-linux";
+ modules = [
+ ./common/nixos.nix
+ ./hosts/greatyamada/nixos.nix
+ ./hosts/greatyamada/services
+ sops-nix.nixosModules.sops
+ ];
+ };
+ };
+ };
}
diff --git a/hosts/greatyamada/nixos.nix b/hosts/greatyamada/nixos.nix
index 690e36c..1bf16da 100644
--- a/hosts/greatyamada/nixos.nix
+++ b/hosts/greatyamada/nixos.nix
@@ -13,28 +13,31 @@
device = "/dev/disk/by-uuid/61050e8d-41c6-4c37-98a9-d8b0cdce6903";
fsType = "btrfs";
options = [ "compress=zstd:15" "subvol=/home" ];
- }
+ };
"/mnt/Datos" = {
- device = "/dev/disk/by-uuid/6a5274fc-8ee8-41ae-b7a0-867e5bbc25f4";
- fsType = "btrfs";
- options = [ "compress=zstd:15" ];
- }
+ device = "/dev/disk/by-uuid/6a5274fc-8ee8-41ae-b7a0-867e5bbc25f4";
+ fsType = "btrfs";
+ options = [ "compress=zstd:15" ];
+ };
+ "/mnt/Datos/minecraft" = {
+ device = "/dev/disk/by-uuid/6a5274fc-8ee8-41ae-b7a0-867e5bbc25f4";
+ fsType = "btrfs";
+ options = [ "compress=zstd:4" "subvol=/minecraft" ];
+ };
"/mnt/Datos/music" = {
- device = "/dev/disk/by-uuid/6a5274fc-8ee8-41ae-b7a0-867e5bbc25f4";
- fsType = "btrfs";
- options = [ "compress=zstd:15" "subvol=/music" ];
- }
+ device = "/dev/disk/by-uuid/6a5274fc-8ee8-41ae-b7a0-867e5bbc25f4";
+ fsType = "btrfs";
+ options = [ "subvol=/music" ];
+ };
"/var/www" = {
- device = "/dev/disk/by-uuid/6a5274fc-8ee8-41ae-b7a0-867e5bbc25f4";
- fsType = "btrfs";
- options = [ "compress=zstd:15" "subvol=/html" ];
- }
+ device = "/dev/disk/by-uuid/6a5274fc-8ee8-41ae-b7a0-867e5bbc25f4";
+ fsType = "btrfs";
+ options = [ "compress=zstd:15" "subvol=/html" ];
+ };
};
networking = {
- firewall = {
- enable = true;
- };
+ firewall.enable = true;
hostName = "greatyamada";
networkmanager.enable = true;
useDHCP = lib.mkDefault false;
diff --git a/hosts/greatyamada/services/adguardhome.nix b/hosts/greatyamada/services/adguardhome.nix
new file mode 100644
index 0000000..e69de29
diff --git a/hosts/greatyamada/services/default.nix b/hosts/greatyamada/services/default.nix
index 9aaf87a..c06dfbb 100644
--- a/hosts/greatyamada/services/default.nix
+++ b/hosts/greatyamada/services/default.nix
@@ -1 +1,12 @@
-{ ... }: { imports = [ ./nginx.nix ./forgejo.nix ]; }
+{ ... }: {
+ imports = [
+ ./nginx.nix
+ ./forgejo.nix
+ ./invidious.nix
+ ./jellyfin.nix
+ ./postgresql.nix
+ ./radicale.nix
+ ];
+ # TODO: adguardhome matrix matrix-second minecraft terraria factorio coturn mautrix-whatsapp wireguard
+ # paperlessngx
+}
diff --git a/hosts/greatyamada/services/forgejo.nix b/hosts/greatyamada/services/forgejo.nix
index 79ef926..acfc272 100644
--- a/hosts/greatyamada/services/forgejo.nix
+++ b/hosts/greatyamada/services/forgejo.nix
@@ -40,12 +40,10 @@ in {
};
};
};
- nginx = {
- virtualHosts."git.rcia.dev" = {
- locations."/" = {
- proxyPass = "http://127.0.0.1:3000";
- clientMaxBodySize = "200M";
- };
+ nginx.virtualHosts."git.rcia.dev" = {
+ locations."/" = {
+ proxyPass = "http://127.0.0.1:3000";
+ clientMaxBodySize = "200M";
};
};
};
diff --git a/hosts/greatyamada/services/invidious.nix b/hosts/greatyamada/services/invidious.nix
new file mode 100644
index 0000000..918dd33
--- /dev/null
+++ b/hosts/greatyamada/services/invidious.nix
@@ -0,0 +1,40 @@
+{ ... }:
+let nginxLocalServiceConfig = import ./nginx-local-config.nix;
+in {
+ services = {
+ invidious = {
+ enable = true;
+ settings = {
+ check_tables = true;
+ db.user = "invidious";
+ default_user_preferences = {
+ locale = "es";
+ dark_mode = "dark";
+ autoplay = true;
+ video_loop = true;
+ quality = "dash";
+ volume = 20;
+ };
+ };
+ database = {
+ createLocally = false;
+ passwordFile = "/var/lib/invidious/db_password";
+ };
+ hmacKeyFile = "/var/lib/invidious/hmac_key";
+ };
+ nginx.virtualHosts."iv.rcia.dev" = {
+ locations."/" = { proxyPass = "http://127.0.0.1:3000"; };
+ extraConfig = nginxLocalServiceConfig;
+ };
+ };
+ sops.secrets = {
+ "invidious/db_password" = {
+ path = "/var/lib/invidious/db_password";
+ owner = "invidious";
+ };
+ "invidious/hmac" = {
+ path = "/var/lib/invidious/hmac_key";
+ owner = "invidious";
+ };
+ };
+}
diff --git a/hosts/greatyamada/services/jellyfin.nix b/hosts/greatyamada/services/jellyfin.nix
new file mode 100644
index 0000000..77e1667
--- /dev/null
+++ b/hosts/greatyamada/services/jellyfin.nix
@@ -0,0 +1,20 @@
+{ pkgs, ... }:
+let
+ jellyfinPath = "/mnt/Datos/jellyfin/";
+ nginxLocalServiceConfig = import ./nginx-local-config.nix;
+in {
+ services = {
+ jellyfin = {
+ enable = true;
+ configDir = jellyfinPath + "config/";
+ dataDir = jellyfinPath + "data/";
+ };
+ nginx.virtualHosts."jellyfin.rcia.dev" = {
+ locations."/" = {
+ proxyPass = "http://127.0.0.1:8096";
+ clientMaxBodySize = "10M";
+ };
+ extraConfig = nginxLocalServiceConfig;
+ };
+ };
+}
diff --git a/hosts/greatyamada/services/matrix-internal.nix b/hosts/greatyamada/services/matrix-internal.nix
new file mode 100644
index 0000000..e4f359d
--- /dev/null
+++ b/hosts/greatyamada/services/matrix-internal.nix
@@ -0,0 +1,14 @@
+{ }: {
+ containers.matrix-bridges = {
+ autoStart = true;
+ config = { config, pkgs }: {
+ services.matrix-synapse = {
+ enable = true;
+ settings = {
+ server_name = "matrix-int.rcia.dev";
+ listeners = [ { } ];
+ };
+ };
+ };
+ };
+}
diff --git a/hosts/greatyamada/services/matrix.nix b/hosts/greatyamada/services/matrix.nix
new file mode 100644
index 0000000..839afc5
--- /dev/null
+++ b/hosts/greatyamada/services/matrix.nix
@@ -0,0 +1,34 @@
+{ pkgs, ... }:
+let dataDir = "/mnt/Datos/synapse";
+in {
+ services.matrix-synapse = {
+ enable = true;
+ settings = {
+ server_name = "rcia.dev";
+ listeners = [{
+ port = 8008;
+ bind_addresses = [ "synapse" ];
+ tls = false;
+ type = http;
+ x_forwarded = true;
+ resources = [{
+ names = [ "client" "federation" ];
+ compress = false;
+ }];
+ }];
+ media_store_path = dataDir + "/media_store";
+ max_upload_size = "100M";
+ enable_registration = false;
+ report_stats = true;
+ signing_key_path = "/var/lib/matrix-synapse/matrix.rcia.dev.signing.key";
+ turn_user_lifetime = "1h";
+ turn_uris = [ "turn:rcia.dev:3478" "turn:rcia.dev:3479" ];
+ };
+ };
+ sops.secrets = {
+ "matrix/secrets" = {
+ path = "/var/lib/matrix-synapse/secrets";
+ owner = "matrix-synapse";
+ }
+ }
+}
diff --git a/hosts/greatyamada/services/minecraft/bukkit.yml b/hosts/greatyamada/services/minecraft/bukkit.yml
new file mode 100644
index 0000000..c3528dc
--- /dev/null
+++ b/hosts/greatyamada/services/minecraft/bukkit.yml
@@ -0,0 +1,33 @@
+# Managed by NixOS configuration
+settings:
+ use-map-color-cache: true
+ allow-end: true
+ warn-on-overload: true
+ permissions-file: permissions.yml
+ update-folder: update
+ plugin-profiling: false
+ connection-throttle: 4000
+ query-plugins: true
+ deprecated-verbose: default
+ shutdown-message: Servidor cerrado
+ minimum-api: none
+spawn-limits:
+ axolotls: 5
+ water-underground-creature: 5
+ monsters: 120
+ animals: 20
+ water-animals: 5
+ water-ambient: 20
+ ambient: 15
+chunk-gc:
+ period-in-ticks: 600
+ticks-per:
+ axolotl-spawns: 1
+ water-underground-creature-spawns: 1
+ animal-spawns: 400
+ monster-spawns: 1
+ water-spawns: 1
+ water-ambient-spawns: 1
+ ambient-spawns: 1
+ autosave: 6000
+aliases: now-in-commands.yml
diff --git a/hosts/greatyamada/services/minecraft/data-directory.nix b/hosts/greatyamada/services/minecraft/data-directory.nix
new file mode 100644
index 0000000..d6265e0
--- /dev/null
+++ b/hosts/greatyamada/services/minecraft/data-directory.nix
@@ -0,0 +1 @@
+"/minecraft"
diff --git a/hosts/greatyamada/services/minecraft/default.nix b/hosts/greatyamada/services/minecraft/default.nix
new file mode 100644
index 0000000..942c3d5
--- /dev/null
+++ b/hosts/greatyamada/services/minecraft/default.nix
@@ -0,0 +1,82 @@
+{ config, lib, pkgs, ... }:
+let
+ cfg = config.services.minecraft-server;
+
+ bukkitConfigFile = ./bukkit.yml;
+
+ spigotConfigFile = ./spigot.yml;
+
+ cfgToString = v: if builtins.isBool v then lib.boolToString v else toString v;
+
+ eulaFile = builtins.toFile "eula.txt" ''
+ # eula.txt managed by NixOS configuration
+ eula=true
+ '';
+
+ opsFile = builtins.toFile "ops.json" (builtins.toJSON [{
+ name = "aveeeeryy";
+ uuid = "b65a1bc3-c6a0-4e8c-99b8-3538cfec0cfc";
+ level = 4;
+ bypassesPlayerLimit = true;
+ }]);
+
+ serverPropertiesFile = pkgs.writeText "server.properties" (''
+ # server.properties managed by NixOS configuration
+ '' + lib.concatStringsSep "\n"
+ (lib.mapAttrsToList (n: v: "${n}=${cfgToString v}") cfg.serverProperties));
+
+ serverIcon = ./server-icon.png;
+
+in {
+ imports = [ ./plugins ];
+ services.minecraft-server = {
+ enable = true;
+ package = pkgs.papermc.override {
+ mcVersion = "1.20.6";
+ buildNum = "147";
+ };
+ declarative = true;
+ eula = true;
+ openFirewall = true;
+ jvmOpts =
+ "-Xms4G -Xmx4G -XX:+UseG1GC -XX:+ParallelRefProcEnabled -XX:MaxGCPauseMillis=200 -XX:+UnlockExperimentalVMOptions -XX:+DisableExplicitGC -XX:+AlwaysPreTouch -XX:G1NewSizePercent=30 -XX:G1MaxNewSizePercent=40 -XX:G1HeapRegionSize=8M -XX:G1ReservePercent=20 -XX:G1HeapWastePercent=5 -XX:G1MixedGCCountTarget=4 -XX:InitiatingHeapOccupancyPercent=15 -XX:G1MixedGCLiveThresholdPercent=90 -XX:G1RSetUpdatingPauseTimePercent=5 -XX:SurvivorRatio=32 -XX:+PerfDisableSharedMem -XX:MaxTenuringThreshold=1 -Dusing.aikars.flags=https://mcflags.emc.gs -Daikars.new.flags=true";
+ serverProperties = {
+ difficulty = "hard";
+ enable-rcon = false;
+ enforce-secure-profile = false;
+ enforce-whitelist = true;
+ hide-online-players = true;
+ motd = "NixOS server";
+ online-mode = true;
+ pvp = false;
+ server-port = 13914;
+ spawn-protection = 0;
+ white-list = true;
+ };
+ dataDir = import ./data-directory.nix;
+ };
+ # Overriden to have a non-declarative whitelist
+ systemd.services.minecraft-server.preStart = lib.mkForce ''
+ ln -sf ${eulaFile} eula.txt
+ cp -f ${bukkitConfigFile} bukkit.yml
+ chmod +w bukkit.yml
+ cp -f ${spigotConfigFile} spigot.yml
+ chmod +w spigot.yml
+ cp -f ${opsFile} ops.json
+ chmod +w ops.json
+ ln -sf ${serverIcon} server-icon.png
+ if [ -e .declarative ]; then
+ # Was declarative before, no need to back up anything
+ cp -f ${serverPropertiesFile} server.properties
+ else
+ # Declarative for the first time, backup stateful files
+ cp -b --suffix=.stateful ${serverPropertiesFile} server.properties
+
+ # server.properties must have write permissions, because every time
+ # the server starts it first parses the file and then regenerates it..
+ chmod +w server.properties
+ echo "Autogenerated file that signifies that this server configuration is managed declaratively by NixOS" \
+ > .declarative
+ fi
+ '';
+}
diff --git a/hosts/greatyamada/services/minecraft/plugins/default.nix b/hosts/greatyamada/services/minecraft/plugins/default.nix
new file mode 100644
index 0000000..6fdc0d1
--- /dev/null
+++ b/hosts/greatyamada/services/minecraft/plugins/default.nix
@@ -0,0 +1,4 @@
+{ pkgs, ... }: {
+ environment.systemPackages = with pkgs;
+ [ (callPackage ./packages/essentialsx.nix { }) ];
+}
diff --git a/hosts/greatyamada/services/minecraft/plugins/packages/essentialsx.nix b/hosts/greatyamada/services/minecraft/plugins/packages/essentialsx.nix
new file mode 100644
index 0000000..1e6be0e
--- /dev/null
+++ b/hosts/greatyamada/services/minecraft/plugins/packages/essentialsx.nix
@@ -0,0 +1,24 @@
+{ config, lib, stdenv, fetchurl }:
+
+stdenv.mkDerivation rec {
+ pname = "EssentialsX";
+ version = "2.20.1";
+
+ src = fetchurl {
+ url =
+ "https://github.com/EssentialsX/Essentials/releases/download/${version}/EssentialsX-${version}.jar";
+ hash = "sha256-gC6jC9pGDKRZfoGJJYFpM8EjsI2BJqgU+sKNA6Yb9UI=";
+ };
+
+ unpackPhase = ":";
+
+ installPhase = ''
+ ln -sf EssentialsX-${version}.jar $out
+ '';
+
+ meta = {
+ description = "The modern Essentials suite for Spigot and Paper.";
+ homepage = "https://essentialsx.net/";
+ license = lib.licenses.gpl3Plus;
+ };
+}
diff --git a/hosts/greatyamada/services/minecraft/server-icon.png b/hosts/greatyamada/services/minecraft/server-icon.png
new file mode 100644
index 0000000..253c653
Binary files /dev/null and b/hosts/greatyamada/services/minecraft/server-icon.png differ
diff --git a/hosts/greatyamada/services/minecraft/spigot.yml b/hosts/greatyamada/services/minecraft/spigot.yml
new file mode 100644
index 0000000..c2cf297
--- /dev/null
+++ b/hosts/greatyamada/services/minecraft/spigot.yml
@@ -0,0 +1,169 @@
+# Managed by NixOS configuration
+config-version: 12
+settings:
+ debug: false
+ bungeecord: false
+ sample-count: 12
+ player-shuffle: 0
+ user-cache-size: 1000
+ save-user-cache-on-stop-only: false
+ moved-wrongly-threshold: 0.0625
+ moved-too-quickly-multiplier: 10.0
+ timeout-time: 60
+ restart-on-crash: false
+ restart-script: ./start.sh
+ netty-threads: 4
+ log-villager-deaths: true
+ log-named-deaths: true
+ attribute:
+ maxHealth:
+ max: 2048.0
+ movementSpeed:
+ max: 2048.0
+ attackDamage:
+ max: 2048.0
+messages:
+ whitelist: No estas en la whitelist
+ unknown-command:
+ Comando desconocido. Escribe "/help" para ver una lista con todos
+ los comandos.
+ server-full: El servidor esta lleno
+ outdated-client: Tu cliente de Minecraft está desactualizado, actualiza a la version {0}
+ outdated-server: El servidor está desactualizado, utiliza la version {0}
+ restart: El servidor se esta reiniciando
+advancements:
+ disable-saving: false
+ disabled:
+ - minecraft:story/disabled
+commands:
+ replace-commands:
+ - setblock
+ - summon
+ - testforblock
+ - tellraw
+ log: true
+ tab-complete: 0
+ send-namespaced: true
+ spam-exclusions:
+ - /skill
+ silent-commandblock-console: false
+players:
+ disable-saving: false
+stats:
+ disable-saving: false
+ forced-stats: {}
+world-settings:
+ default:
+ seed-ancientcity: 20083232
+ seed-buriedtreasure: 10387320
+ seed-mineshaft: default
+ below-zero-generation-in-existing-chunks: true
+ simulation-distance: default
+ hopper-can-load-chunks: false
+ seed-nether: 30084232
+ seed-stronghold: default
+ thunder-chance: 100000
+ verbose: false
+ hopper-amount: 1
+ dragon-death-sound-radius: 0
+ seed-village: 10387312
+ seed-desert: 14357617
+ seed-igloo: 14357618
+ seed-jungle: 14357619
+ seed-swamp: 14357620
+ seed-monument: 10387313
+ seed-shipwreck: 165745295
+ seed-ocean: 14357621
+ seed-outpost: 165745296
+ seed-endcity: 10387313
+ seed-slime: 987234911
+ seed-bastion: 30084232
+ seed-fortress: 30084232
+ seed-mansion: 10387319
+ seed-fossil: 14357921
+ seed-portal: 34222645
+ max-tnt-per-tick: 100
+ hanging-tick-frequency: 100
+ zombie-aggressive-towards-villager: true
+ enable-zombie-pigmen-portal-spawns: true
+ item-despawn-rate: 6000
+ view-distance: default
+ arrow-despawn-rate: 1200
+ trident-despawn-rate: 1200
+ wither-spawn-sound-radius: 0
+ mob-spawn-range: 8
+ end-portal-sound-radius: 0
+ nerf-spawner-mobs: false
+ max-entity-collisions: 8
+ growth:
+ twistingvines-modifier: 100
+ weepingvines-modifier: 100
+ cavevines-modifier: 100
+ glowberry-modifier: 100
+ cactus-modifier: 100
+ cane-modifier: 100
+ melon-modifier: 100
+ mushroom-modifier: 100
+ pumpkin-modifier: 100
+ sapling-modifier: 100
+ beetroot-modifier: 100
+ carrot-modifier: 100
+ potato-modifier: 100
+ wheat-modifier: 100
+ netherwart-modifier: 100
+ vine-modifier: 100
+ cocoa-modifier: 100
+ bamboo-modifier: 100
+ sweetberry-modifier: 100
+ kelp-modifier: 100
+ entity-activation-range:
+ ignore-spectators: false
+ animals: 32
+ monsters: 32
+ raiders: 48
+ misc: 16
+ water: 16
+ villagers: 32
+ flying-monsters: 32
+ villagers-work-immunity-after: 100
+ villagers-work-immunity-for: 20
+ villagers-active-for-panic: true
+ tick-inactive-villagers: true
+ wake-up-inactive:
+ animals-max-per-tick: 4
+ animals-every: 1200
+ animals-for: 100
+ monsters-max-per-tick: 8
+ monsters-every: 400
+ monsters-for: 100
+ villagers-max-per-tick: 4
+ villagers-every: 600
+ villagers-for: 100
+ flying-monsters-max-per-tick: 8
+ flying-monsters-every: 200
+ flying-monsters-for: 100
+ ticks-per:
+ hopper-transfer: 8
+ hopper-check: 1
+ hunger:
+ jump-walk-exhaustion: 0.05
+ jump-sprint-exhaustion: 0.2
+ combat-exhaustion: 0.1
+ regen-exhaustion: 6.0
+ swim-multiplier: 0.01
+ sprint-multiplier: 0.1
+ other-multiplier: 0.0
+ max-tick-time:
+ tile: 50
+ entity: 50
+ squid-spawn-range:
+ min: 45.0
+ merge-radius:
+ exp: 3.0
+ item: 2.5
+ entity-tracking-range:
+ players: 48
+ animals: 48
+ monsters: 48
+ misc: 32
+ other: 64
diff --git a/hosts/greatyamada/services/nginx-local-config.nix b/hosts/greatyamada/services/nginx-local-config.nix
new file mode 100644
index 0000000..133fc1f
--- /dev/null
+++ b/hosts/greatyamada/services/nginx-local-config.nix
@@ -0,0 +1,7 @@
+# Configuration for local-only services
+''
+ error_page 403 https://rcia.dev;
+ allow 10.0.0.0/24;
+ allow 10.10.0.0/24;
+ deny all;
+''
diff --git a/hosts/greatyamada/services/nginx.nix b/hosts/greatyamada/services/nginx.nix
new file mode 100644
index 0000000..bf714e3
--- /dev/null
+++ b/hosts/greatyamada/services/nginx.nix
@@ -0,0 +1,19 @@
+{ pkgs, ... }: {
+ services.nginx = {
+ enable = true;
+ virtualHosts = {
+ "rcia.dev" = {
+ forceSSL = true;
+ locations = {
+ "/" = { root = /var/www/public; };
+ "/profile_picture" = { };
+ };
+ };
+ "ichi-prod.rcia.dev" = {
+ locations."/" = {
+ proxyPass = "http://127.0.0.1:3000";
+ }
+ };
+ };
+ };
+}
diff --git a/hosts/greatyamada/services/postgresql.nix b/hosts/greatyamada/services/postgresql.nix
new file mode 100644
index 0000000..330be3b
--- /dev/null
+++ b/hosts/greatyamada/services/postgresql.nix
@@ -0,0 +1 @@
+{ lib, pkgs, ... }: { services.postgresql = { enable = true; }; }
diff --git a/hosts/greatyamada/services/radicale.nix b/hosts/greatyamada/services/radicale.nix
new file mode 100644
index 0000000..dd9ef4c
--- /dev/null
+++ b/hosts/greatyamada/services/radicale.nix
@@ -0,0 +1,28 @@
+{ ... }:
+let
+ radicalePath = "/mnt/Datos/radicale";
+ nginxLocalServiceConfig = import ./nginx-local-config.nix;
+in {
+ services = {
+ radicale = {
+ enable = true;
+ settings = {
+ server.hosts = [ "127.0.0.1:5232" ];
+ auth = {
+ type = "htpasswd";
+ htpasswd_filename = "/etc/radicale/users";
+ htpasswd_encryption = "bcrypt";
+ };
+ storage.filesystem_folder = radicalePath;
+ };
+ };
+ nginx.virtualHosts."radicale.rcia.dev" = {
+ locations."/" = { proxyPass = "http://127.0.0.1:5232"; };
+ extraConfig = nginxLocalServiceConfig;
+ };
+ };
+ sops.secrets."radicale/users" = {
+ path = "/etc/radicale/users";
+ owner = "radicale";
+ };
+}
diff --git a/hosts/totsugeki/desktop/default.nix b/hosts/totsugeki/desktop/default.nix
deleted file mode 100644
index 2d84298..0000000
--- a/hosts/totsugeki/desktop/default.nix
+++ /dev/null
@@ -1,59 +0,0 @@
-{ config, pkgs, ... }: {
- imports = [
- ./dunst.nix
- ./firefox.nix
- ./gtk.nix
- ./hyprland.nix
- ./kitty.nix
- ./qt.nix
- ./rofi.nix
- ./waybar.nix
- ];
- home = {
- packages = with pkgs; [
- gimp
- fastfetch
- inkscape
- libreoffice-qt
- libsForQt5.qt5ct
- obs-studio
- picard
- protonup-qt
- libsForQt5.ark
- libsForQt5.dolphin
- libsForQt5.dolphin-plugins
- libsForQt5.kio
- libsForQt5.kio-extras
- libsForQt5.kimageformats
- libsForQt5.qt5.qtimageformats
- mpv
- noto-fonts-cjk-sans
- nsxiv
- pamixer
- playerctl
- qbittorrent
- r2modman
- swww
- wl-clipboard
- element-desktop
- vesktop
- (import ./scripts/colorpicker.nix { inherit pkgs; })
- (import ./scripts/currently-playing.nix { inherit pkgs; })
- (import ./scripts/change-wallpaper.nix { inherit pkgs; })
- (import ./scripts/screenshot.nix { inherit pkgs; })
- (pkgs.buildEnv {
- name = "desktop-scripts";
- paths = [ ./scripts_legacy ];
- })
- ];
- pointerCursor = {
- gtk.enable = true;
- package = pkgs.phinger-cursors;
- name = "phinger-cursors-dark";
- size = 24;
- };
- };
- nixpkgs.config.allowUnfree = true;
- services.easyeffects.enable = true;
- xdg.enable = true;
-}
diff --git a/hosts/totsugeki/desktop/dunst.nix b/hosts/totsugeki/desktop/dunst.nix
deleted file mode 100644
index 3d5270e..0000000
--- a/hosts/totsugeki/desktop/dunst.nix
+++ /dev/null
@@ -1,31 +0,0 @@
-{ ... }: {
- services.dunst = {
- enable = true;
- settings = {
- global = {
- timeout = 3;
- corner_radius = 12;
- frame_width = 2;
- font = "Iosevka Nerd Font 10";
- format = "%s\n%b";
- icon_position = "left";
- max_icon_size = 48;
- icon_corner_radius = 4;
- origin = "bottom-right";
- offset = "8x8";
- width = "(100, 400)";
- background = "#11111b";
- foreground = "#cdd6f4";
- frame_color = "#cba6f7";
- highlight = "#cba6f7";
- separator_color = "frame";
- progress_bar = true;
- progress_bar_corner_radius = 4;
- };
- volumectl = {
- appname = "volumectl";
- alignment = "center";
- };
- };
- };
-}
diff --git a/hosts/totsugeki/desktop/hyprland.nix b/hosts/totsugeki/desktop/hyprland.nix
deleted file mode 100644
index 85c7cf6..0000000
--- a/hosts/totsugeki/desktop/hyprland.nix
+++ /dev/null
@@ -1,184 +0,0 @@
-{ config, pkgs, ... }: {
- home.packages = with pkgs; [ hyprpicker hyprlock ];
- wayland.windowManager.hyprland = {
- enable = true;
- settings = {
- monitor = "DP-1, 2560x1440@165, 0x0, 1";
-
- env = [ "XCURSOR_SIZE, 24" "QT_QPA_PLATFORMTHEME, qt5ct" ];
-
- exec-once = [
- "hyprlock"
- "hyprctl setcursor phinger-cursors-dark 24"
- "waybar"
- "swww init; swww img ~/.local/share/wallpapers/.current_image"
- "[workspace 1 silent] firefox"
- "[workspace 10 silent] qbittorrent"
- ];
-
- general = {
- border_size = 0;
- gaps_in = 2;
- gaps_out = 2;
- };
-
- decoration = {
- rounding = 0;
- dim_inactive = true;
- dim_strength = 0.5;
- drop_shadow = false;
- blur = {
- enabled = true;
- size = 3;
- passes = 2;
- noise = 5.0e-2;
- vibrancy = 0.25;
- vibrancy_darkness = 0.3;
- };
- };
-
- dwindle = {
- pseudotile = true;
- force_split = 2;
- use_active_for_splits = true;
- preserve_split = true;
- };
-
- bind = [
- "SUPER SHIFT CTRL ALT, Q, exit,"
-
- "SUPER, W, killactive"
- "SUPER, F, togglefloating, "
- "SUPER, C, centerwindow"
- "SUPER, F11, fullscreen, 0"
-
- "CTRL ALT, T, exec, kitty"
- "SUPER, Space, exec, rofi -show drun"
- "SUPER, E, exec, zsh -c dolphin"
-
- "SUPER, k, movefocus, u"
- "SUPER, j, movefocus, d"
- "SUPER, h, movefocus, l"
- "SUPER, l, movefocus, r"
-
- "SUPER, 1, workspace, 1"
- "SUPER, 2, workspace, 2"
- "SUPER, 3, workspace, 3"
- "SUPER, 4, workspace, 4"
- "SUPER, 5, workspace, 5"
- "SUPER, 6, workspace, 6"
- "SUPER, 7, workspace, 7"
- "SUPER, 8, workspace, 8"
- "SUPER, 9, workspace, 9"
- "SUPER, 0, workspace, 10"
-
- "SUPER SHIFT, 1, movetoworkspace, 1"
- "SUPER SHIFT, 2, movetoworkspace, 2"
- "SUPER SHIFT, 3, movetoworkspace, 3"
- "SUPER SHIFT, 4, movetoworkspace, 4"
- "SUPER SHIFT, 5, movetoworkspace, 5"
- "SUPER SHIFT, 6, movetoworkspace, 6"
- "SUPER SHIFT, 7, movetoworkspace, 7"
- "SUPER SHIFT, 8, movetoworkspace, 8"
- "SUPER SHIFT, 9, movetoworkspace, 9"
- "SUPER SHIFT, 0, movetoworkspace, 10"
-
- "SUPER, S, exec, screenshot full"
- "SUPER + SHIFT, S, exec, screenshot section"
-
- "MOD3, C, exec, colorpicker"
-
- "MOD3, S, exec, hyprlock"
- "MOD3, 1, exec, play_to_soundboard.sh $HOME/soundboard/fireball.webm"
- "MOD3, 2, exec, play_to_soundboard.sh $HOME/soundboard/turret.webm"
- "MOD3, 3, exec, play_to_soundboard.sh $HOME/soundboard/elhormiguero.webm --volume=70"
- "MOD3, 4, exec, play_to_soundboard.sh $HOME/soundboard/america.webm --volume=70"
- "MOD3, 5, exec, play_to_soundboard.sh $HOME/soundboard/bazinga.webm"
- "MOD3, 6, exec, play_to_soundboard.sh $HOME/soundboard/zasentodalaboca.m4a"
- "MOD3 SHIFT, P, exec, pkill mpv"
- ];
-
- bindl = [
- "MOD3, m, submap, Música"
- "MOD3, w, submap, Fondo de pantalla"
- ", XF86AudioMute, exec, volumectl.sh output toggle-mute"
- "SHIFT, XF86AudioMute, exec, volumectl.sh input toggle-mute"
- ];
-
- bindle = [
- ", XF86AudioRaiseVolume, exec, volumectl.sh output +5"
- ", XF86AudioLowerVolume, exec, volumectl.sh output -5"
- "SHIFT, XF86AudioRaiseVolume, exec, volumectl.sh input +5"
- "SHIFT, XF86AudioLowerVolume, exec, volumectl.sh input -5"
- ];
-
- bindm =
- [ "SUPER, mouse:272, movewindow" "SUPER, mouse:273, resizewindow" ];
-
- animations = {
- enabled = true;
- animation = [
- "windows, 1, 6, wind, slide"
- "windowsIn, 1, 6, winIn, slide"
- "windowsOut, 1, 5, winOut, slide"
- "windowsMove, 1, 5, wind, slide"
- "border, 1, 1, liner"
- "borderangle, 1, 50, liner, loop"
- "fade, 1, 8, default"
- "workspaces, 1, 5, wind"
- ];
- bezier = [
- "wind, 0.05, 0.92, 0.1, 1"
- "winIn, 0.1, 1.1, 0.1, 1"
- "winOut, 0.3, -0.3, 0, 1"
- "liner, 1, 1, 1, 1"
- ];
- };
-
- windowrulev2 = [
- "tile, class:^(ichi Client)$"
- "opacity 0.999 0.999, class: ^(org.kde.dolphin)$"
- "nofocus, title:^()$,class:^(steam)$"
- "minsize 1 1, title:^()$,class:^(steam)$"
- ];
-
- layerrule =
- [ "blur, waybar" "blur, rofi" "ignorezero, rofi" "noanim, rofi" ];
-
- input = {
- kb_layout = "es";
- kb_variant = "dvorak";
- kb_options = "lv5:caps_switch";
- follow_mouse = 1;
- sensitivity = -1;
- };
-
- misc = {
- animate_manual_resizes = true;
- animate_mouse_windowdragging = true;
- key_press_enables_dpms = true;
- };
- };
- extraConfig = ''
- submap = Fondo de pantalla
-
- bind = , H, exec, change-wallpaper previous
- bind = , L, exec, change-wallpaper next
- bind = , M, exec, change-wallpaper open-menu
- bindl = , escape, submap, reset
- bindl = MOD3, w, submap, reset
-
- submap = reset
-
- submap = Música
-
- bindl = , h, exec, playerctl previous
- bindl = , l, exec, playerctl next
- bindl = , p, exec, playerctl play-pause
- bindl = , escape, submap, reset
- bindl = MOD3, m, submap, reset
-
- submap = reset
- '';
- };
-}
diff --git a/hosts/totsugeki/desktop/qt.nix b/hosts/totsugeki/desktop/qt.nix
deleted file mode 100644
index b2b3f18..0000000
--- a/hosts/totsugeki/desktop/qt.nix
+++ /dev/null
@@ -1,7 +0,0 @@
-{ pkgs, ... }: {
- home.packages = with pkgs; [ catppuccin-kde lightly-qt ];
- qt = {
- enable = true;
- platformTheme.name = "qtct";
- };
-}
diff --git a/hosts/totsugeki/desktop/rofi.nix b/hosts/totsugeki/desktop/rofi.nix
deleted file mode 100644
index 1eb887f..0000000
--- a/hosts/totsugeki/desktop/rofi.nix
+++ /dev/null
@@ -1,176 +0,0 @@
-{ config, pkgs, ... }:
-let inherit (config.lib.formats.rasi) mkLiteral;
-in {
- programs.rofi = {
- enable = true;
- extraConfig = {
- drun-display-format = "{name}";
- display-drun = " ";
- show-icons = true;
- icon-theme = "kora";
- steal-focus = true;
- };
- package = pkgs.rofi-wayland;
- font = "Iosevka Nerd Font 11";
- terminal = "kitty";
- theme = {
- "*" = {
- background = mkLiteral "#1e1d2f";
- background-alt = mkLiteral "#282839";
- foreground = mkLiteral "#d9e0ee";
- selected = mkLiteral "#7aa2f7";
- active = mkLiteral "#abe9b3";
- urgent = mkLiteral "#f28fad";
- };
- window = {
- transparency = "real";
- location = mkLiteral "center";
- anchor = mkLiteral "center";
- fullscreen = false;
- width = mkLiteral "500px";
- x-offset = mkLiteral "0px";
- y-offset = mkLiteral "0px";
-
- enabled = true;
- margin = mkLiteral "0px";
- padding = mkLiteral "0px";
- border = mkLiteral "0px solid";
- border-radius = mkLiteral "12px";
- border-color = mkLiteral "@selected";
- background-color = mkLiteral "#1e1e2e99";
- cursor = "default";
- };
-
- mainbox = {
- enabled = true;
- spacing = mkLiteral "20px";
- margin = mkLiteral "0px";
- padding = mkLiteral "12px";
- border = mkLiteral "0px solid";
- border-radius = mkLiteral "0px 0px 0px 0px";
- border-color = mkLiteral "@selected";
- background-color = mkLiteral "transparent";
- children = map mkLiteral [ "inputbar" "listview" ];
- };
-
- inputbar = {
- enabled = true;
- spacing = mkLiteral "8px";
- margin = mkLiteral "0px";
- padding = mkLiteral "4px 8px";
- border = mkLiteral "0px solid";
- border-radius = mkLiteral "12px";
- border-color = mkLiteral "@selected";
- background-color = mkLiteral "transparent";
- text-color = mkLiteral "@foreground";
- children = map mkLiteral [ "prompt" "entry" ];
- };
-
- prompt = {
- enabled = true;
- background-color = mkLiteral "transparent";
- text-color = mkLiteral "inherit";
- };
- textbox-prompt-colon = {
- enabled = true;
- expand = false;
- str = "::";
- background-color = mkLiteral "transparent";
- text-color = mkLiteral "inherit";
- };
- entry = {
- enabled = true;
- background-color = mkLiteral "transparent";
- text-color = mkLiteral "inherit";
- cursor = mkLiteral "text";
- placeholder = "";
- placeholder-color = mkLiteral "inherit";
- };
-
- listview = {
- enabled = true;
- columns = 1;
- lines = 18;
- cycle = true;
- dynamic = true;
- scrollbar = false;
- layout = "vertical";
- reverse = false;
- fixed-height = false;
- fixed-columns = true;
-
- spacing = mkLiteral "0px";
- margin = mkLiteral "0px";
- padding = mkLiteral "0px";
- border = mkLiteral "0px solid";
- border-radius = mkLiteral "0px";
- border-color = mkLiteral "@selected";
- background-color = mkLiteral "transparent";
- text-color = mkLiteral "@foreground";
- cursor = mkLiteral "default";
- };
- scrollbar = {
- handle-width = mkLiteral "5px";
- handle-color = mkLiteral "@selected";
- border-radius = mkLiteral "0px";
- background-color = mkLiteral "@background-alt";
- };
-
- element = {
- enabled = true;
- spacing = mkLiteral "4px";
- margin = mkLiteral "0px";
- padding = mkLiteral "4px 8px";
- border = mkLiteral "0px solid";
- border-radius = mkLiteral "12px";
- border-color = mkLiteral "@selected";
- background-color = mkLiteral "transparent";
- text-color = mkLiteral "@foreground";
- orientation = mkLiteral "horizontal";
- cursor = mkLiteral "pointer";
- };
-
- "element normal.normal" = {
- background-color = mkLiteral "transparent";
- text-color = mkLiteral "@foreground";
- };
-
- "element selected.normal" = {
- background-color = mkLiteral "#cdd6f422";
- text-color = mkLiteral "@foreground";
- };
-
- element-icon = {
- background-color = mkLiteral "transparent";
- text-color = mkLiteral "inherit";
- size = mkLiteral "24px";
- cursor = mkLiteral "inherit";
- };
-
- element-text = {
- background-color = mkLiteral "transparent";
- text-color = mkLiteral "inherit";
- highlight = mkLiteral "inherit";
- cursor = mkLiteral "inherit";
- vertical-align = mkLiteral "0.5";
- horizontal-align = 0;
- };
-
- error-message = {
- padding = mkLiteral "15px";
- border = mkLiteral "2px solid";
- border-radius = mkLiteral "10px";
- border-color = mkLiteral "@selected";
- background-color = mkLiteral "black / 10%";
- text-color = mkLiteral "@foreground";
- };
- textbox = {
- background-color = mkLiteral "transparent";
- text-color = mkLiteral "@foreground";
- vertical-align = mkLiteral "0.5";
- horizontal-align = 0;
- highlight = mkLiteral "none";
- };
- };
- };
-}
diff --git a/hosts/totsugeki/desktop/scripts/change-wallpaper.nix b/hosts/totsugeki/desktop/scripts/change-wallpaper.nix
deleted file mode 100644
index 2d3828d..0000000
--- a/hosts/totsugeki/desktop/scripts/change-wallpaper.nix
+++ /dev/null
@@ -1,81 +0,0 @@
-{ pkgs }:
-
-pkgs.writeShellApplication {
- name = "change-wallpaper";
- runtimeInputs = with pkgs; [ dunst rofi swww ];
- text = ''
- shopt -s nullglob
-
- WALLPAPER_PATH="$HOME/.local/share/wallpapers"
- WALLPAPERS=("$WALLPAPER_PATH"/*)
-
- if [ ! -f "$WALLPAPER_PATH/.current_path" ]; then
- # Current wallpaper file does not exist, create it
- echo "''${WALLPAPERS[0]}" > "$WALLPAPER_PATH/.current_path"
- fi
-
- CURRENT_WALLPAPER=$(cat "$WALLPAPER_PATH/.current_path")
- CURRENT_WP_INDEX=-1
- # Get the current wallpaper's index
- for index in "''${!WALLPAPERS[@]}"; do
- if [ "''${WALLPAPERS[$index]}" = "$CURRENT_WALLPAPER" ]; then
- CURRENT_WP_INDEX=$index
- fi
- done
-
- if [ "$CURRENT_WP_INDEX" -eq -1 ]; then
- CURRENT_WP_INDEX=0
- fi
-
- if [ "$1" = "previous" ]; then
- WALLPAPER="''${WALLPAPERS[$CURRENT_WP_INDEX - 1]}"
- TRANSITION_ANGLE=300
- elif [ "$1" = "next" ]; then
- NEXT_INDEX=$((CURRENT_WP_INDEX + 1))
- if [ "$NEXT_INDEX" = "''${#WALLPAPERS[@]}" ]; then
- NEXT_INDEX=0
- fi
- WALLPAPER=''${WALLPAPERS[$NEXT_INDEX]}
- TRANSITION_ANGLE=120
- elif [ "$1" = "open-menu" ]; then
- INPUT=""
- for index in "''${!WALLPAPERS[@]}"; do
- if [ "$index" = "$CURRENT_WP_INDEX" ]; then
- continue
- fi
- _WALLPAPER=''${WALLPAPERS[$index]}
- _WALLPAPER_NAME=$(basename "$_WALLPAPER")
- INPUT+="$_WALLPAPER_NAME\0icon\x1f$_WALLPAPER"
- if [ ! $((index + 1)) -eq ''${#WALLPAPERS[@]} ]; then
- INPUT+=$'\n'
- fi
- done
- if ! WALLPAPER=$(echo -en "$INPUT" | rofi -dmenu -mesg "Cambiar fondo de pantalla" -p "" -i -theme ~/.config/rofi/wallpaper_selector.rasi); then
- exit 1
- fi
- WALLPAPER="$WALLPAPER_PATH/$WALLPAPER"
- TRANSITION_ANGLE=270
- else
- echo "Unknown first argument: $1"
- exit 1
- fi
-
- if [ -z "$WALLPAPER" ]; then
- exit 1
- fi
-
- WALLPAPER_NAME=$(basename "$WALLPAPER")
- echo "Setting wallpaper to $WALLPAPER"
- echo "$WALLPAPER" > "$WALLPAPER_PATH/.current_path"
- ln -sf "$WALLPAPER" "$WALLPAPER_PATH/.current_image"
- dunstify -i "$WALLPAPER" -t 2800 "Cambiando fondo de pantalla" "Cambiando a $WALLPAPER_NAME"
- swww img\
- --transition-type wipe\
- --transition-angle $TRANSITION_ANGLE\
- --transition-step 90\
- --transition-duration 1\
- --transition-fps 165\
- "$WALLPAPER"
-
- '';
-}
diff --git a/hosts/totsugeki/desktop/scripts/colorpicker.nix b/hosts/totsugeki/desktop/scripts/colorpicker.nix
deleted file mode 100644
index 8423346..0000000
--- a/hosts/totsugeki/desktop/scripts/colorpicker.nix
+++ /dev/null
@@ -1,12 +0,0 @@
-{ pkgs }:
-
-pkgs.writeShellApplication {
- name = "colorpicker";
- runtimeInputs = with pkgs; [ dunst hyprpicker imagemagick wl-clipboard ];
- text = ''
- COLOR=$(hyprpicker --no-fancy --autocopy)
- convert -size 1x1 xc:"$COLOR" "$HOME/.cache/.tmp_colorpicker.jpg"
- dunstify -i "$HOME/.cache/.tmp_colorpicker.jpg" "Color copiado" "$COLOR"
- rm "$HOME/.cache/.tmp_colorpicker.jpg"
- '';
-}
diff --git a/hosts/totsugeki/desktop/scripts/currently-playing.nix b/hosts/totsugeki/desktop/scripts/currently-playing.nix
deleted file mode 100644
index d3224bc..0000000
--- a/hosts/totsugeki/desktop/scripts/currently-playing.nix
+++ /dev/null
@@ -1,29 +0,0 @@
-{ pkgs }:
-
-pkgs.writeShellApplication {
- name = "get_fancy_currently_playing";
- runtimeInputs = [ pkgs.playerctl ];
- text = ''
- STRING=""
- case $(playerctl status 2> /dev/stdout) in
- "Playing")
- STRING+="⏵ "
- ;;
- "Paused")
- STRING+="⏸ "
- ;;
- "No players found")
- exit 1
- ;;
- esac
- ARTIST=$(playerctl metadata xesam:artist)
- if [[ -n $ARTIST ]]; then
- STRING+="$ARTIST // "
- fi
- TITLE=$(playerctl metadata xesam:title)
- if [[ -n $TITLE ]]; then
- STRING+="$TITLE"
- fi
- echo -e "$STRING"
- '';
-}
diff --git a/hosts/totsugeki/desktop/scripts/screenshot.nix b/hosts/totsugeki/desktop/scripts/screenshot.nix
deleted file mode 100644
index 75ade5a..0000000
--- a/hosts/totsugeki/desktop/scripts/screenshot.nix
+++ /dev/null
@@ -1,36 +0,0 @@
-{ pkgs }:
-
-pkgs.writeShellApplication {
- name = "screenshot";
- runtimeInputs = with pkgs; [
- dunst
- grim
- libjxl
- slurp
- wl-clipboard
- xdg-user-dirs
- ];
- text = ''
- usage() {
- echo "Usage: screenshot { full | section }"
- exit 1
- }
-
- test -n 1 || usage
-
- FILE_NAME=$(date +'Screenshot_%Y%m%d_%H%M%S')
- TEMPORARY_PATH="/tmp/$FILE_NAME.png"
- SCREENSHOT_PATH="$(xdg-user-dir PICTURES)/$FILE_NAME.jxl"
- if [ "$1" == "full" ]; then
- grim "$TEMPORARY_PATH"
- elif [ "$1" == "section" ]; then
- grim -g "$(slurp -b '#000000aa' -w 0)" "$TEMPORARY_PATH"
- else
- usage
- fi
- wl-copy < "$TEMPORARY_PATH"
- cjxl "$TEMPORARY_PATH" "$SCREENSHOT_PATH"
- dunstify --raw_icon="$TEMPORARY_PATH" "Captura de pantalla realizada" "Guardada como $FILE_NAME.jxl"
- rm "$TEMPORARY_PATH"
- '';
-}
diff --git a/hosts/totsugeki/desktop/scripts_legacy/bin/now-playing.sh b/hosts/totsugeki/desktop/scripts_legacy/bin/now-playing.sh
deleted file mode 100755
index 7ae75b1..0000000
--- a/hosts/totsugeki/desktop/scripts_legacy/bin/now-playing.sh
+++ /dev/null
@@ -1,18 +0,0 @@
-#!/bin/bash
-
-RPC_HOST=http://localhost:6680/mopidy/rpc
-TRACK=$(curl -s -X POST -H Content-Type:application/json -d '{ "method": "core.playback.get_current_track", "jsonrpc": "2.0", "params": {}, "id": 1 }' $RPC_HOST)
-TRACK_URI=$(echo $TRACK | jq -r '.result.uri')
-IMAGES=$(curl -s -X POST -H Content-Type:application/json -d '{ "method": "core.library.get_images", "jsonrpc": "2.0", "params": { "uris": ["'"$TRACK_URI"'"] }, "id": 1}' $RPC_HOST)
-IMAGE_URI=$(echo $IMAGES | jq -r 'first(.result[] | sort_by(.width) | reverse | .[].uri)')
-if [[ -n "$IMAGE_URI" ]]; then
- if [[ "$IMAGE_URI" == *"local/"* ]]; then
- # Image is local
- IMAGE="$HOME/.local/share/mopidy/local/images${IMAGE_URI/local\//}"
- else
- curl -o /tmp/cover.png $IMAGE_URI &> /dev/null
- IMAGE="/tmp/cover.png"
- fi
-fi
-
-dunstify -r 99902 -I $IMAGE "Reproduciendo" "$(mpc --format '%artist% - %album%\n%title%' current 2> /dev/null)"
diff --git a/hosts/totsugeki/desktop/scripts_legacy/bin/persistent-waybar.sh b/hosts/totsugeki/desktop/scripts_legacy/bin/persistent-waybar.sh
deleted file mode 100755
index 6444703..0000000
--- a/hosts/totsugeki/desktop/scripts_legacy/bin/persistent-waybar.sh
+++ /dev/null
@@ -1,5 +0,0 @@
-#!/usr/bin/env sh
-
-while true; do
- waybar
-done
diff --git a/hosts/totsugeki/desktop/scripts_legacy/bin/play_to_soundboard.sh b/hosts/totsugeki/desktop/scripts_legacy/bin/play_to_soundboard.sh
deleted file mode 100755
index 282cc8c..0000000
--- a/hosts/totsugeki/desktop/scripts_legacy/bin/play_to_soundboard.sh
+++ /dev/null
@@ -1,3 +0,0 @@
-#!/bin/sh
-
-mpv --no-video --audio-device=pipewire/Soundboard --audio-client-name="Soundboard" $@
diff --git a/hosts/totsugeki/desktop/scripts_legacy/bin/setup_soundboard.sh b/hosts/totsugeki/desktop/scripts_legacy/bin/setup_soundboard.sh
deleted file mode 100755
index 07d5b83..0000000
--- a/hosts/totsugeki/desktop/scripts_legacy/bin/setup_soundboard.sh
+++ /dev/null
@@ -1,7 +0,0 @@
-#!/bin/sh
-
-pw-cli create-node adapter '{ factory.name=support.null-audio-sink node.name="Soundboard" node.description="Soundboard" media.class=Audio/Sink object.linger=true audio.position=[FL FR] }'
-pw-link Soundboard:monitor_FL easyeffects_source:input_FL
-pw-link Soundboard:monitor_FR easyeffects_source:input_FR
-pw-link Soundboard:monitor_FL easyeffects_sink:playback_FL
-pw-link Soundboard:monitor_FR easyeffects_sink:playback_FR
diff --git a/hosts/totsugeki/desktop/scripts_legacy/bin/volumectl.sh b/hosts/totsugeki/desktop/scripts_legacy/bin/volumectl.sh
deleted file mode 100755
index 3dc3f95..0000000
--- a/hosts/totsugeki/desktop/scripts_legacy/bin/volumectl.sh
+++ /dev/null
@@ -1,72 +0,0 @@
-#!/bin/sh
-
-VOLUME_REGEX="^(-*|\+*)[0-9]+$"
-
-if [ "$1" == "output" ]; then
- if [[ $2 =~ $VOLUME_REGEX ]]; then
- if [ $(pamixer --get-mute) == "true" ]; then
- pamixer --unmute > /dev/null
- fi
- if [ "${2:0:1}" == "-" ]; then
- pamixer --allow-boost -d "${2:1}" > /dev/null
- elif [ "${2:0:1}" == "+" ]; then
- pamixer --allow-boost -i "${2:1}" > /dev/null
- fi
- volume="$(pamixer --get-volume-human)"
- message=" $volume"
- elif [ $2 == "toggle-mute" ]; then
- if [ $(pamixer --get-mute) == "true" ]; then
- pamixer --unmute > /dev/null
- volume="$(pamixer --get-volume-human)"
- message=" $volume"
- else
- pamixer --mute > /dev/null
- message=" Silenciado"
- fi
- else
- message="volumectl error: Unknown second argument"
- fi
-elif [ "$1" == "input" ]; then
- if [[ $2 =~ $VOLUME_REGEX ]]; then
- if [ $(pamixer --default-source --get-mute) == "true" ]; then
- pamixer --default-source --unmute > /dev/null
- fi
- if [ "${2:0:1}" == "-" ];then
- pamixer --default-source --allow-boost -d "${2:1}" > /dev/null
- elif [ "${2:0:1}" == "+" ]; then
- pamixer --default-source --allow-boost -i "${2:1}" > /dev/null
- fi
- volume="$(pamixer --default-source --get-volume-human)"
- message=" $volume"
- elif [ $2 == "toggle-mute" ]; then
- if [ $(pamixer --default-source --get-mute) == "true" ]; then
- pamixer --default-source --unmute > /dev/null
- volume="$(pamixer --default-source --get-volume-human)"
- message=" $volume"
- else
- pamixer --default-source --mute > /dev/null
- message=" Silenciado"
- fi
- else
- message="volumectl error: Unknown second argument"
- fi
-elif [ "$1" == "mpd" ]; then
- if [[ $2 =~ $VOLUME_REGEX ]]; then
- mpc volume $2 > /dev/null
- icon=""
- volume="$(perl -e "print ('$(mpc 2>/dev/null)' =~ /volume:[ ]*([0-9]*%)/);")"
- if [ "$volume" == "0%" ]; then
- icon=""
- volume="Silenciado"
- fi
- message="$icon $volume"
- else
- message="volumectl error: Unknown second argument"
- fi
-else
- message="volumectl error: Unknown first argument"
-fi
-
-volume=$(echo $volume | tr -d "%")
-
-dunstify --appname "volumectl" --replace 9001 --urgency low --timeout 1250 --hints int:value:$volume "$message"
diff --git a/hosts/totsugeki/desktop/waybar.nix b/hosts/totsugeki/desktop/waybar.nix
deleted file mode 100644
index 32f3e64..0000000
--- a/hosts/totsugeki/desktop/waybar.nix
+++ /dev/null
@@ -1,197 +0,0 @@
-{ pkgs, ... }: {
- programs.waybar = {
- enable = true;
- settings = {
- primary = {
- layer = "top";
- spacing = 0;
- position = "bottom";
- mode = "dock";
- modules-left = [
- "clock"
- "pulseaudio"
- "cpu"
- "temperature"
- "custom/gpu"
- "temperature#gpu"
- "memory"
- ];
- modules-center = [ "hyprland/workspaces" "hyprland/submap" ];
- modules-right = [ "mpris" ];
- "hyprland/workspaces" = {
- format = "{icon}";
- format-icons = {
- "1" = " ";
- "2" = " ";
- "3" = " ";
- "8" = " ";
- "9" = " ";
- "10" = " ";
- default = " ";
- };
- persistent-workspaces = { "*" = 10; };
- sort-by-number = true;
- };
- "hyprland/submap" = { format = " {}"; };
- temperature = {
- hwmon-path-abs = "/sys/devices/pci0000:00/0000:00:18.3/hwmon";
- input-filename = "temp1_input";
- };
- "temperature#gpu" = {
- hwmon-path-abs =
- "/sys/devices/pci0000:00/0000:00:03.1/0000:05:00.0/0000:06:00.0/0000:07:00.0/hwmon";
- input-filename = "temp1_input";
- };
- "custom/gpu" = {
- exec = "cat /sys/class/drm/card*/device/gpu_busy_percent";
- format = "GPU {}%";
- restart-interval = 2;
- };
- mpris = {
- format = "{player_icon}{status_icon} {artist} // {title}";
- interval = 0.2;
- player-icons = {
- default = "";
- firefox = " ";
- };
- status-icons = {
- paused = "";
- playing = "";
- };
- };
- clock = {
- tooltip-format = "{calendar}";
- format = " {:%Y-%m-%d %H:%M:%S}";
- interval = 1;
- calendar = {
- mode = "year";
- mode-mon-col = 2;
- weeks-pos = "right";
- on-scroll = 1;
- on-click-right = "mode";
- format = {
- days = "{}";
- today = "{}";
- weeks = "";
- weekdays = "{}";
- months = "{}";
- };
- };
- };
- cpu = {
- format = "CPU {usage}%";
- tooltip = false;
- interval = 2;
- on-click = "kitty htop";
- };
- memory = {
- format = "MEM {used}GB";
- interval = 1;
- tooltip-format = "{percentage}%";
- };
- pulseaudio = {
- scroll-step = 5;
- format = "{icon} {volume}% {format_source}";
- format-muted = " {format_source}";
- format-source = " {volume}%";
- format-source-muted = "";
- format-icons = { default = [ "" "" ]; };
- ignored-sinks = [ "Easy Effects Sink" ];
- };
- };
- };
- style = ''
- * {
- border: none;
- background-color: transparent;
- font-family: Iosevka Nerd Font;
- font-weight: bold;
- font-size: 14px;
- }
-
- window#waybar {
- background: rgba(30, 30, 46, 0.9);
- color: #cdd6f4;
- margin: 4px;
- }
-
- tooltip {
- background: #1e1e2e;
- border: 2px solid #313244;
- }
-
- #mpris {
- color: #f5c2e7;
- padding-right: 20px;
- }
-
- #workspaces button {
- padding: 1px;
- color: #cdd6f4;
- margin-right: 6px;
- }
-
- #workspaces button.persistent {
- color: #cdd6f4;
- }
-
- #workspaces button.focused {
- border: 0;
- }
-
- #workspaces button.urgent {
- color: #f38ba8;
- }
-
- #workspaces button.empty {
- color: #313244;
- }
-
- #workspaces button.active {
- color: #cba6f7;
- }
-
- #submap {
- color: #cba6f7;
- margin-left: 4px;
- padding: 0 8px;
- }
-
- #cpu {
- color: #f9e2af;
- padding-right: 6px;
- }
-
- #temperature {
- color: #f9e2af;
- padding-right: 12px;
- }
-
- #custom-gpu {
- color: #94e2d5;
- padding-right: 6px;
- }
-
- #temperature.gpu {
- color: #94e2d5;
- padding-right: 12px;
- }
-
- #memory {
- color: #a6e3a1;
- padding-right: 12px;
- }
-
- #pulseaudio {
- color: #fab387;
- padding-right: 12px;
- }
-
- #clock {
- color: #f38ba8;
- padding-left: 20px;
- padding-right: 12px;
- }
- '';
- };
-}
diff --git a/hosts/totsugeki/home-manager/default.nix b/hosts/totsugeki/home-manager/default.nix
new file mode 100644
index 0000000..af8a305
--- /dev/null
+++ b/hosts/totsugeki/home-manager/default.nix
@@ -0,0 +1 @@
+{ ... }: { imports = [ ./desktop ./development ./scripts ]; }
diff --git a/hosts/totsugeki/home-manager/desktop/default.nix b/hosts/totsugeki/home-manager/desktop/default.nix
new file mode 100644
index 0000000..a1344cd
--- /dev/null
+++ b/hosts/totsugeki/home-manager/desktop/default.nix
@@ -0,0 +1,36 @@
+{ config, pkgs, ... }: {
+ imports = [ ./plasma ./firefox.nix ./gtk.nix ./kitty.nix ];
+ home = {
+ packages = with pkgs; [
+ gimp
+ fastfetch
+ inkscape
+ libreoffice-qt
+ obs-studio
+ picard
+ protonup-qt
+ kdePackages.ark
+ kdePackages.dolphin
+ kdePackages.dolphin-plugins
+ kdePackages.kio
+ kdePackages.kio-extras
+ kdePackages.kimageformats
+ kdePackages.qtimageformats
+ kdePackages.sddm-kcm
+ mpv
+ noto-fonts-cjk-sans
+ nsxiv
+ osu-lazer-bin
+ playerctl
+ prismlauncher
+ qbittorrent
+ r2modman
+ wl-clipboard
+ element-desktop
+ vesktop
+ ];
+ };
+ nixpkgs.config.allowUnfree = true;
+ services.easyeffects.enable = true;
+ xdg.enable = true;
+}
diff --git a/hosts/totsugeki/desktop/firefox.nix b/hosts/totsugeki/home-manager/desktop/firefox.nix
similarity index 100%
rename from hosts/totsugeki/desktop/firefox.nix
rename to hosts/totsugeki/home-manager/desktop/firefox.nix
diff --git a/hosts/totsugeki/desktop/gtk.nix b/hosts/totsugeki/home-manager/desktop/gtk.nix
similarity index 100%
rename from hosts/totsugeki/desktop/gtk.nix
rename to hosts/totsugeki/home-manager/desktop/gtk.nix
diff --git a/hosts/totsugeki/desktop/kitty.nix b/hosts/totsugeki/home-manager/desktop/kitty.nix
similarity index 98%
rename from hosts/totsugeki/desktop/kitty.nix
rename to hosts/totsugeki/home-manager/desktop/kitty.nix
index 0a6beb9..8116ee4 100644
--- a/hosts/totsugeki/desktop/kitty.nix
+++ b/hosts/totsugeki/home-manager/desktop/kitty.nix
@@ -3,7 +3,7 @@
enable = true;
font = {
name = "Iosevka Nerd Font";
- size = 14;
+ size = 12;
};
keybindings = {
"ctrl+alt+1" = "goto_tab 1";
diff --git a/hosts/totsugeki/home-manager/desktop/plasma/default.nix b/hosts/totsugeki/home-manager/desktop/plasma/default.nix
new file mode 100644
index 0000000..0e94e2a
--- /dev/null
+++ b/hosts/totsugeki/home-manager/desktop/plasma/default.nix
@@ -0,0 +1,16 @@
+{ ... }: {
+ imports = [ ./input.nix ./hotkeys.nix ./krohnkite.nix ./theme.nix ];
+ programs.plasma = {
+ enable = true;
+ overrideConfig = true;
+ workspace.clickItemTo = "open";
+ kwin = {
+ virtualDesktops = {
+ rows = 1;
+ number = 10;
+ };
+ effects.desktopSwitching.animation = "slide";
+ };
+ configFile = { "kded5rc" = { Module-gtkconfig.autoload = false; }; };
+ };
+}
diff --git a/hosts/totsugeki/home-manager/desktop/plasma/hotkeys.nix b/hosts/totsugeki/home-manager/desktop/plasma/hotkeys.nix
new file mode 100644
index 0000000..ab82e4d
--- /dev/null
+++ b/hosts/totsugeki/home-manager/desktop/plasma/hotkeys.nix
@@ -0,0 +1,27 @@
+{ ... }: {
+ programs.plasma.shortcuts = {
+ kwin = {
+ "Switch to Desktop 1" = "Meta+1";
+ "Window to Desktop 1" = "Meta+!";
+ "Switch to Desktop 2" = "Meta+2";
+ "Window to Desktop 2" = ''Meta+"'';
+ "Switch to Desktop 3" = "Meta+3";
+ "Window to Desktop 3" = "Meta+·";
+ "Switch to Desktop 4" = "Meta+4";
+ "Window to Desktop 4" = "Meta+$";
+ "Switch to Desktop 5" = "Meta+5";
+ "Window to Desktop 5" = "Meta+%";
+ "Switch to Desktop 6" = "Meta+6";
+ "Window to Desktop 6" = "Meta+&";
+ "Switch to Desktop 7" = "Meta+7";
+ "Window to Desktop 7" = "Meta+/";
+ "Switch to Desktop 8" = "Meta+8";
+ "Window to Desktop 8" = "Meta+(";
+ "Switch to Desktop 9" = "Meta+9";
+ "Window to Desktop 9" = "Meta+)";
+ "Switch to Desktop 10" = "Meta+0";
+ "Window to Desktop 10" = "Meta+=";
+ };
+ "services/kitty.desktop"."_launch" = "Ctrl+Alt+T";
+ };
+}
diff --git a/hosts/totsugeki/home-manager/desktop/plasma/input.nix b/hosts/totsugeki/home-manager/desktop/plasma/input.nix
new file mode 100644
index 0000000..5debf3c
--- /dev/null
+++ b/hosts/totsugeki/home-manager/desktop/plasma/input.nix
@@ -0,0 +1,15 @@
+{ ... }: {
+ programs.plasma.configFile = {
+ kcminputrc."Libinput/9610/54/Glorious Model O" = {
+ PointerAcceleration = -0.4;
+ PointerAccelerationProfile = 1;
+ };
+ kxkbrc.Layout = {
+ LayoutList = "es";
+ Use = true;
+ VariantList = "dvorak";
+ Options = "caps:menu";
+ ResetOldOptions = true;
+ };
+ };
+}
diff --git a/hosts/totsugeki/home-manager/desktop/plasma/krohnkite.nix b/hosts/totsugeki/home-manager/desktop/plasma/krohnkite.nix
new file mode 100644
index 0000000..b6930be
--- /dev/null
+++ b/hosts/totsugeki/home-manager/desktop/plasma/krohnkite.nix
@@ -0,0 +1,23 @@
+# TODO: find a way to automatically install krohnkite
+{ ... }: {
+ programs.plasma.configFile.kwinrc = {
+ Plugins.krohnkiteEnabled = true;
+ Script-krohnkite = {
+ enableMonocleLayout = false;
+ enableSpreadLayout = false;
+ enableStairLayout = false;
+ enableThreeColumnLayout = false;
+ enableTileLayout = false;
+ ignoreClass = "krunner,yakuake,spectacle,kded5,plasmashell";
+ layoutPerActivity = false;
+ layoutPerDesktop = false;
+ limitTileWidthRatio = 0.6;
+ noTileBorder = true;
+ screenGapBottom = 20;
+ screenGapLeft = 8;
+ screenGapRight = 8;
+ screenGapTop = 8;
+ tileLayoutGap = 2;
+ };
+ };
+}
diff --git a/hosts/totsugeki/home-manager/desktop/plasma/theme.nix b/hosts/totsugeki/home-manager/desktop/plasma/theme.nix
new file mode 100644
index 0000000..8262acd
--- /dev/null
+++ b/hosts/totsugeki/home-manager/desktop/plasma/theme.nix
@@ -0,0 +1,59 @@
+{ pkgs, ... }:
+let cursorThemeName = "catppuccin-mocha-mauve-cursors";
+in {
+ home = {
+ packages = with pkgs; [
+ (catppuccin-kde.override {
+ flavour = [ "mocha" ];
+ accents = [ "mauve" ];
+ })
+ catppuccin-cursors.mochaMauve
+ ];
+ pointerCursor = {
+ gtk.enable = true;
+ package = pkgs.catppuccin-cursors.mochaMauve;
+ name = cursorThemeName;
+ size = 32;
+ };
+ };
+ programs.plasma = {
+ fonts = {
+ general = {
+ family = "Inter Display";
+ pointSize = 11;
+ weight = "medium";
+ };
+ fixedWidth = {
+ family = "Iosevka Nerd Font";
+ pointSize = 12;
+ };
+ small = {
+ family = "Inter Display";
+ pointSize = 8;
+ };
+ toolbar = {
+ family = "Inter Display";
+ pointSize = 11;
+ weight = "medium";
+ };
+ menu = {
+ family = "Inter Display";
+ pointSize = 11;
+ weight = "medium";
+ };
+ windowTitle = {
+ family = "Inter Display";
+ pointSize = 11;
+ weight = "medium";
+ };
+ };
+ workspace = {
+ colorScheme = "CatppuccinMochaMauve";
+ lookAndFeel = "Catppuccin-Mocha-Mauve";
+ cursor = {
+ theme = cursorThemeName;
+ size = 32;
+ };
+ };
+ };
+}
diff --git a/hosts/totsugeki/development/default.nix b/hosts/totsugeki/home-manager/development/default.nix
similarity index 96%
rename from hosts/totsugeki/development/default.nix
rename to hosts/totsugeki/home-manager/development/default.nix
index 09c92e4..42a8ba4 100644
--- a/hosts/totsugeki/development/default.nix
+++ b/hosts/totsugeki/home-manager/development/default.nix
@@ -5,7 +5,8 @@
git-credential-manager
gnupg
pass
- dotnet-sdk_7
+ # dotnet-sdk_7
+ dotnet-sdk_8 # tModLoader
unityhub
];
};
diff --git a/hosts/totsugeki/development/nixvim/completion.nix b/hosts/totsugeki/home-manager/development/nixvim/completion.nix
similarity index 100%
rename from hosts/totsugeki/development/nixvim/completion.nix
rename to hosts/totsugeki/home-manager/development/nixvim/completion.nix
diff --git a/hosts/totsugeki/development/nixvim/default.nix b/hosts/totsugeki/home-manager/development/nixvim/default.nix
similarity index 100%
rename from hosts/totsugeki/development/nixvim/default.nix
rename to hosts/totsugeki/home-manager/development/nixvim/default.nix
diff --git a/hosts/totsugeki/development/nixvim/lsp.nix b/hosts/totsugeki/home-manager/development/nixvim/lsp.nix
similarity index 100%
rename from hosts/totsugeki/development/nixvim/lsp.nix
rename to hosts/totsugeki/home-manager/development/nixvim/lsp.nix
diff --git a/hosts/totsugeki/development/nixvim/lualine.nix b/hosts/totsugeki/home-manager/development/nixvim/lualine.nix
similarity index 100%
rename from hosts/totsugeki/development/nixvim/lualine.nix
rename to hosts/totsugeki/home-manager/development/nixvim/lualine.nix
diff --git a/hosts/totsugeki/development/nixvim/neo-tree.nix b/hosts/totsugeki/home-manager/development/nixvim/neo-tree.nix
similarity index 100%
rename from hosts/totsugeki/development/nixvim/neo-tree.nix
rename to hosts/totsugeki/home-manager/development/nixvim/neo-tree.nix
diff --git a/hosts/totsugeki/development/nixvim/none-ls.nix b/hosts/totsugeki/home-manager/development/nixvim/none-ls.nix
similarity index 100%
rename from hosts/totsugeki/development/nixvim/none-ls.nix
rename to hosts/totsugeki/home-manager/development/nixvim/none-ls.nix
diff --git a/hosts/totsugeki/development/nixvim/treesitter.nix b/hosts/totsugeki/home-manager/development/nixvim/treesitter.nix
similarity index 100%
rename from hosts/totsugeki/development/nixvim/treesitter.nix
rename to hosts/totsugeki/home-manager/development/nixvim/treesitter.nix
diff --git a/hosts/totsugeki/home-manager/scripts/default.nix b/hosts/totsugeki/home-manager/scripts/default.nix
new file mode 100644
index 0000000..82e8246
--- /dev/null
+++ b/hosts/totsugeki/home-manager/scripts/default.nix
@@ -0,0 +1,6 @@
+{ pkgs, ... }: {
+ home.packages = with pkgs; [
+ (import ./play-on-soundboard.nix { inherit pkgs; })
+ (import ./setup-soundboard.nix { inherit pkgs; })
+ ];
+}
diff --git a/hosts/totsugeki/home-manager/scripts/play-on-soundboard.nix b/hosts/totsugeki/home-manager/scripts/play-on-soundboard.nix
new file mode 100644
index 0000000..c4ed3ba
--- /dev/null
+++ b/hosts/totsugeki/home-manager/scripts/play-on-soundboard.nix
@@ -0,0 +1,16 @@
+{ pkgs }:
+
+pkgs.writeShellApplication {
+ name = "play-on-soundboard";
+ runtimeInputs = with pkgs; [ mpv ];
+ text = ''
+ if [ ! -f "/run/user/$UID/soundboard.init" ]; then
+ setup-soundboard
+ fi
+ mpv \
+ --no-video\
+ --audio-device=pipewire/Soundboard\
+ --audio-client-name="Soundboard"\
+ "$@"
+ '';
+}
diff --git a/hosts/totsugeki/home-manager/scripts/setup-soundboard.nix b/hosts/totsugeki/home-manager/scripts/setup-soundboard.nix
new file mode 100644
index 0000000..90dccc0
--- /dev/null
+++ b/hosts/totsugeki/home-manager/scripts/setup-soundboard.nix
@@ -0,0 +1,13 @@
+{ pkgs }:
+
+pkgs.writeShellApplication {
+ name = "setup-soundboard";
+ text = ''
+ touch "/run/user/$UID/soundboard.init"
+ pw-cli create-node adapter '{ factory.name=support.null-audio-sink node.name="Soundboard" node.description="Soundboard" media.class=Audio/Sink object.linger=true audio.position=[FL FR] }'
+ pw-link Soundboard:monitor_FL easyeffects_source:input_FL
+ pw-link Soundboard:monitor_FR easyeffects_source:input_FR
+ pw-link Soundboard:monitor_FL easyeffects_sink:playback_FL
+ pw-link Soundboard:monitor_FR easyeffects_sink:playback_FR
+ '';
+}
diff --git a/hosts/totsugeki/nixos.nix b/hosts/totsugeki/nixos/default.nix
similarity index 62%
rename from hosts/totsugeki/nixos.nix
rename to hosts/totsugeki/nixos/default.nix
index 5d75913..a916f91 100644
--- a/hosts/totsugeki/nixos.nix
+++ b/hosts/totsugeki/nixos/default.nix
@@ -1,4 +1,7 @@
{ config, lib, pkgs, ... }: {
+
+ imports = [ ./filesystems.nix ./plasma.nix ./steam.nix ];
+
boot = {
kernelModules = [ "kvm-amd" ];
kernelPackages = pkgs.linuxKernel.packages.linux_zen;
@@ -18,35 +21,10 @@
};
};
- fileSystems = {
- "/" = {
- device = "/dev/disk/by-uuid/144857c7-877b-46c7-94d9-30a6d6d27cf0";
- fsType = "btrfs";
- options = [ "compress=zstd:15" ];
- };
-
- "/boot" = {
- device = "/dev/disk/by-uuid/8084-F762";
- fsType = "vfat";
- };
-
- "/home" = {
- device = "/dev/disk/by-uuid/4bbd6139-7caa-4617-a94f-b185c5f6ca45";
- fsType = "btrfs";
- options = [ "compress=zstd:15" ];
- };
-
- "/mnt/Datos" = {
- device = "/dev/disk/by-uuid/994ef2bd-a9fb-4414-9a0a-19b150ffa452";
- fsType = "btrfs";
- options = [ "compress=zstd:15" "user" "x-systemd.automount" "exec" ];
- };
- };
-
networking = {
firewall = {
enable = true;
- allowedTCPPorts = [ 1111 42595 ];
+ allowedTCPPorts = [ 8000 42595 ];
allowedUDPPorts = [ 24642 ];
};
hostName = "totsugeki";
@@ -79,25 +57,19 @@
};
programs = {
- hyprland.enable = true;
- steam.enable = true;
+ corectrl = {
+ enable = true;
+ gpuOverclock.enable = true;
+ };
+ nix-ld.enable = true;
};
- xdg.portal = {
- enable = true;
- extraPortals = with pkgs; [ xdg-desktop-portal-gtk ];
- };
+ xdg.portal.enable = true;
services = {
- greetd = {
+ jellyfin = {
enable = true;
- settings = rec {
- initial_session = {
- command = "${pkgs.hyprland}/bin/Hyprland";
- user = "avery";
- };
- default_session = initial_session;
- };
+ openFirewall = true;
};
pipewire = {
enable = true;
@@ -108,6 +80,16 @@
pulse.enable = true;
};
udisks2.enable = true;
+ udev.extraRules = ''
+ SUBSYSTEM=="usb", ATTRS{idVendor}=="057e", ATTRS{idProduct}=="3000", MODE="0666"
+ '';
+ displayManager = {
+ defaultSession = "plasma";
+ sddm = {
+ enable = true;
+ wayland.enable = true;
+ };
+ };
};
systemd = { services = { NetworkManager-wait-online.enable = false; }; };
@@ -117,4 +99,6 @@
};
system.stateVersion = "24.05";
+
+ users.users.avery.extraGroups = [ "corectrl" ];
}
diff --git a/hosts/totsugeki/nixos/filesystems.nix b/hosts/totsugeki/nixos/filesystems.nix
new file mode 100644
index 0000000..1d54be4
--- /dev/null
+++ b/hosts/totsugeki/nixos/filesystems.nix
@@ -0,0 +1,26 @@
+{ ... }: {
+ fileSystems = {
+ "/" = {
+ device = "/dev/disk/by-uuid/144857c7-877b-46c7-94d9-30a6d6d27cf0";
+ fsType = "btrfs";
+ options = [ "compress=zstd:15" ];
+ };
+
+ "/boot" = {
+ device = "/dev/disk/by-uuid/8084-F762";
+ fsType = "vfat";
+ };
+
+ "/home" = {
+ device = "/dev/disk/by-uuid/4bbd6139-7caa-4617-a94f-b185c5f6ca45";
+ fsType = "btrfs";
+ options = [ "compress=zstd:15" ];
+ };
+
+ "/mnt/Datos" = {
+ device = "/dev/disk/by-uuid/994ef2bd-a9fb-4414-9a0a-19b150ffa452";
+ fsType = "btrfs";
+ options = [ "compress=zstd:15" "user" "x-systemd.automount" "exec" ];
+ };
+ };
+}
diff --git a/hosts/totsugeki/nixos/plasma.nix b/hosts/totsugeki/nixos/plasma.nix
new file mode 100644
index 0000000..d4026df
--- /dev/null
+++ b/hosts/totsugeki/nixos/plasma.nix
@@ -0,0 +1,10 @@
+{ pkgs, ... }: {
+ services.desktopManager.plasma6.enable = true;
+ environment.plasma6.excludePackages = with pkgs.kdePackages; [
+ konsole
+ oxygen
+ elisa
+ kate
+ okular
+ ];
+}
diff --git a/hosts/totsugeki/nixos/steam.nix b/hosts/totsugeki/nixos/steam.nix
new file mode 100644
index 0000000..bc13418
--- /dev/null
+++ b/hosts/totsugeki/nixos/steam.nix
@@ -0,0 +1,7 @@
+{ pkgs, ... }: {
+ programs.steam = {
+ enable = true;
+ remotePlay.openFirewall = true;
+ gamescopeSession.enable = true;
+ };
+}