nix machine / user configurations

fix add stuff

+386 -3
flake.lock
···
"type": "github"
}
},
+
"crane_4": {
+
"flake": false,
+
"locked": {
+
"lastModified": 1670900067,
+
"narHash": "sha256-VXVa+KBfukhmWizaiGiHRVX/fuk66P8dgSFfkVN4/MY=",
+
"owner": "ipetkov",
+
"repo": "crane",
+
"rev": "59b31b41a589c0a65e4a1f86b0e5eac68081468b",
+
"type": "github"
+
},
+
"original": {
+
"owner": "ipetkov",
+
"repo": "crane",
+
"type": "github"
+
}
+
},
"darwin": {
"inputs": {
"nixpkgs": [
···
"type": "github"
}
},
+
"dream2nix_3": {
+
"inputs": {
+
"all-cabal-json": [
+
"musikquad",
+
"nci"
+
],
+
"crane": "crane_4",
+
"devshell": [
+
"musikquad",
+
"nci"
+
],
+
"drv-parts": "drv-parts_2",
+
"flake-compat": "flake-compat_3",
+
"flake-parts": [
+
"musikquad",
+
"nci",
+
"parts"
+
],
+
"flake-utils-pre-commit": [
+
"musikquad",
+
"nci"
+
],
+
"ghc-utils": [
+
"musikquad",
+
"nci"
+
],
+
"gomod2nix": [
+
"musikquad",
+
"nci"
+
],
+
"mach-nix": [
+
"musikquad",
+
"nci"
+
],
+
"nix-pypi-fetcher": [
+
"musikquad",
+
"nci"
+
],
+
"nixpkgs": [
+
"musikquad",
+
"nci",
+
"nixpkgs"
+
],
+
"nixpkgsV1": "nixpkgsV1_2",
+
"poetry2nix": [
+
"musikquad",
+
"nci"
+
],
+
"pre-commit-hooks": [
+
"musikquad",
+
"nci"
+
],
+
"pruned-racket-catalog": [
+
"musikquad",
+
"nci"
+
]
+
},
+
"locked": {
+
"lastModified": 1680605243,
+
"narHash": "sha256-dUrxj653kcLvjNKRI7NoTJoj+Q7G+vOYsl4iuwtnIWo=",
+
"owner": "nix-community",
+
"repo": "dream2nix",
+
"rev": "34a80ab215f1f24068ea9c76f3a7e5bc19478653",
+
"type": "github"
+
},
+
"original": {
+
"owner": "nix-community",
+
"repo": "dream2nix",
+
"type": "github"
+
}
+
},
"drv-parts": {
"inputs": {
"flake-compat": [
···
"type": "github"
}
},
+
"drv-parts_2": {
+
"inputs": {
+
"flake-compat": [
+
"musikquad",
+
"nci",
+
"dream2nix",
+
"flake-compat"
+
],
+
"flake-parts": [
+
"musikquad",
+
"nci",
+
"dream2nix",
+
"flake-parts"
+
],
+
"nixpkgs": [
+
"musikquad",
+
"nci",
+
"dream2nix",
+
"nixpkgs"
+
]
+
},
+
"locked": {
+
"lastModified": 1680172861,
+
"narHash": "sha256-QMyI338xRxaHFDlCXdLCtgelGQX2PdlagZALky4ZXJ8=",
+
"owner": "davhau",
+
"repo": "drv-parts",
+
"rev": "ced8a52f62b0a94244713df2225c05c85b416110",
+
"type": "github"
+
},
+
"original": {
+
"owner": "davhau",
+
"repo": "drv-parts",
+
"type": "github"
+
}
+
},
"fenix": {
"inputs": {
"nixpkgs": [
···
}
},
"flake-compat_4": {
+
"flake": false,
+
"locked": {
+
"lastModified": 1673956053,
+
"narHash": "sha256-4gtG9iQuiKITOjNQQeQIpoIB6b16fm+504Ch3sNKLd8=",
+
"owner": "edolstra",
+
"repo": "flake-compat",
+
"rev": "35bb57c0c8d8b62bbfd284272c928ceb64ddbde9",
+
"type": "github"
+
},
+
"original": {
+
"owner": "edolstra",
+
"repo": "flake-compat",
+
"type": "github"
+
}
+
},
+
"flake-compat_5": {
"flake": false,
"locked": {
"lastModified": 1673956053,
···
"type": "github"
}
},
+
"mk-naked-shell_2": {
+
"flake": false,
+
"locked": {
+
"lastModified": 1681286841,
+
"narHash": "sha256-3XlJrwlR0nBiREnuogoa5i1b4+w/XPe0z8bbrJASw0g=",
+
"owner": "yusdacra",
+
"repo": "mk-naked-shell",
+
"rev": "7612f828dd6f22b7fb332cc69440e839d7ffe6bd",
+
"type": "github"
+
},
+
"original": {
+
"owner": "yusdacra",
+
"repo": "mk-naked-shell",
+
"type": "github"
+
}
+
},
+
"musikquad": {
+
"inputs": {
+
"nci": "nci_3",
+
"nixpkgs": [
+
"nixpkgs"
+
],
+
"parts": "parts_5"
+
},
+
"locked": {
+
"lastModified": 1683296163,
+
"narHash": "sha256-pOdVitwRl8gUNMxInXwJJtXffSYYsAc0EWkFSFGvrRk=",
+
"owner": "yusdacra",
+
"repo": "musikquadrupled",
+
"rev": "e259740d501d00fb3548b0be145817ef8fdc35ae",
+
"type": "github"
+
},
+
"original": {
+
"owner": "yusdacra",
+
"repo": "musikquadrupled",
+
"type": "github"
+
}
+
},
+
"musikspider": {
+
"inputs": {
+
"naked-shell": "naked-shell",
+
"nixpkgs": [
+
"nixpkgs"
+
],
+
"parts": "parts_6",
+
"systems": "systems"
+
},
+
"locked": {
+
"lastModified": 1683276540,
+
"narHash": "sha256-JiuT8wmMH+vNVyBS18i/RNLDBUDEUCNdeqkwPQYsMDM=",
+
"owner": "yusdacra",
+
"repo": "musikspider",
+
"rev": "913b0df0b0a5ed78aa761584d9c6f87eff0e781d",
+
"type": "github"
+
},
+
"original": {
+
"owner": "yusdacra",
+
"repo": "musikspider",
+
"type": "github"
+
}
+
},
+
"naked-shell": {
+
"locked": {
+
"lastModified": 1681286841,
+
"narHash": "sha256-3XlJrwlR0nBiREnuogoa5i1b4+w/XPe0z8bbrJASw0g=",
+
"owner": "yusdacra",
+
"repo": "mk-naked-shell",
+
"rev": "7612f828dd6f22b7fb332cc69440e839d7ffe6bd",
+
"type": "github"
+
},
+
"original": {
+
"owner": "yusdacra",
+
"repo": "mk-naked-shell",
+
"type": "github"
+
}
+
},
"nci": {
"inputs": {
"devshell": "devshell",
···
"type": "github"
}
},
+
"nci_3": {
+
"inputs": {
+
"dream2nix": "dream2nix_3",
+
"mk-naked-shell": "mk-naked-shell_2",
+
"nixpkgs": [
+
"musikquad",
+
"nixpkgs"
+
],
+
"parts": "parts_4",
+
"rust-overlay": "rust-overlay_4"
+
},
+
"locked": {
+
"lastModified": 1681711895,
+
"narHash": "sha256-/EeP+RRIw68/0C7CaOAElYQ2pXZAQCWnnU/qjO8OKKM=",
+
"owner": "yusdacra",
+
"repo": "nix-cargo-integration",
+
"rev": "cee5dba8ca34ccb0829ae3812d23afbea1fd9d5d",
+
"type": "github"
+
},
+
"original": {
+
"owner": "yusdacra",
+
"repo": "nix-cargo-integration",
+
"type": "github"
+
}
+
},
"nil": {
"inputs": {
"flake-utils": "flake-utils_3",
"nixpkgs": [
"nixpkgs"
],
-
"rust-overlay": "rust-overlay_4"
+
"rust-overlay": "rust-overlay_5"
},
"locked": {
"lastModified": 1680544266,
···
"type": "github"
}
},
+
"nixpkgs-lib_3": {
+
"locked": {
+
"dir": "lib",
+
"lastModified": 1680213900,
+
"narHash": "sha256-cIDr5WZIj3EkKyCgj/6j3HBH4Jj1W296z7HTcWj1aMA=",
+
"owner": "NixOS",
+
"repo": "nixpkgs",
+
"rev": "e3652e0735fbec227f342712f180f4f21f0594f2",
+
"type": "github"
+
},
+
"original": {
+
"dir": "lib",
+
"owner": "NixOS",
+
"ref": "nixos-unstable",
+
"repo": "nixpkgs",
+
"type": "github"
+
}
+
},
+
"nixpkgs-master": {
+
"locked": {
+
"lastModified": 1683296009,
+
"narHash": "sha256-qc9IVP773bE1mEygZx70OGQQ23loAOwgiED86mRVfMk=",
+
"owner": "nixos",
+
"repo": "nixpkgs",
+
"rev": "00c0a2333ff02d1f4a7dbf2080648c9d969e0236",
+
"type": "github"
+
},
+
"original": {
+
"owner": "nixos",
+
"ref": "master",
+
"repo": "nixpkgs",
+
"type": "github"
+
}
+
},
"nixpkgs-wayland": {
"flake": false,
"locked": {
···
}
},
"nixpkgsV1": {
+
"locked": {
+
"lastModified": 1678500271,
+
"narHash": "sha256-tRBLElf6f02HJGG0ZR7znMNFv/Uf7b2fFInpTHiHaSE=",
+
"owner": "NixOS",
+
"repo": "nixpkgs",
+
"rev": "5eb98948b66de29f899c7fe27ae112a47964baf8",
+
"type": "github"
+
},
+
"original": {
+
"id": "nixpkgs",
+
"ref": "nixos-22.11",
+
"type": "indirect"
+
}
+
},
+
"nixpkgsV1_2": {
"locked": {
"lastModified": 1678500271,
"narHash": "sha256-tRBLElf6f02HJGG0ZR7znMNFv/Uf7b2fFInpTHiHaSE=",
···
"type": "github"
}
},
+
"parts_4": {
+
"inputs": {
+
"nixpkgs-lib": [
+
"musikquad",
+
"nci",
+
"nixpkgs"
+
]
+
},
+
"locked": {
+
"lastModified": 1680392223,
+
"narHash": "sha256-n3g7QFr85lDODKt250rkZj2IFS3i4/8HBU2yKHO3tqw=",
+
"owner": "hercules-ci",
+
"repo": "flake-parts",
+
"rev": "dcc36e45d054d7bb554c9cdab69093debd91a0b5",
+
"type": "github"
+
},
+
"original": {
+
"owner": "hercules-ci",
+
"repo": "flake-parts",
+
"type": "github"
+
}
+
},
+
"parts_5": {
+
"inputs": {
+
"nixpkgs-lib": [
+
"musikquad",
+
"nixpkgs"
+
]
+
},
+
"locked": {
+
"lastModified": 1680392223,
+
"narHash": "sha256-n3g7QFr85lDODKt250rkZj2IFS3i4/8HBU2yKHO3tqw=",
+
"owner": "hercules-ci",
+
"repo": "flake-parts",
+
"rev": "dcc36e45d054d7bb554c9cdab69093debd91a0b5",
+
"type": "github"
+
},
+
"original": {
+
"owner": "hercules-ci",
+
"repo": "flake-parts",
+
"type": "github"
+
}
+
},
+
"parts_6": {
+
"inputs": {
+
"nixpkgs-lib": "nixpkgs-lib_3"
+
},
+
"locked": {
+
"lastModified": 1680392223,
+
"narHash": "sha256-n3g7QFr85lDODKt250rkZj2IFS3i4/8HBU2yKHO3tqw=",
+
"owner": "hercules-ci",
+
"repo": "flake-parts",
+
"rev": "dcc36e45d054d7bb554c9cdab69093debd91a0b5",
+
"type": "github"
+
},
+
"original": {
+
"owner": "hercules-ci",
+
"repo": "flake-parts",
+
"type": "github"
+
}
+
},
"root": {
"inputs": {
"agenix": "agenix",
···
"conduit": "conduit",
"helix": "helix",
"home": "home",
+
"musikquad": "musikquad",
+
"musikspider": "musikspider",
"nil": "nil",
"nixinate": "nixinate",
"nixos-hardware": "nixos-hardware",
"nixos-persistence": "nixos-persistence",
"nixpkgs": "nixpkgs_3",
+
"nixpkgs-master": "nixpkgs-master",
"nixpkgs-wayland": "nixpkgs-wayland",
"nur": "nur",
"stylix": "stylix",
···
},
"rust-overlay_4": {
+
"flake": false,
+
"locked": {
+
"lastModified": 1681697975,
+
"narHash": "sha256-47DFtN5PX05eD8ObImkSu2W0hyyZ5cK1Tl9EvmW2NnU=",
+
"owner": "oxalica",
+
"repo": "rust-overlay",
+
"rev": "ffe47b90076067ad5dc25fe739d95a463bdf3c59",
+
"type": "github"
+
},
+
"original": {
+
"owner": "oxalica",
+
"repo": "rust-overlay",
+
"type": "github"
+
}
+
},
+
"rust-overlay_5": {
"inputs": {
"flake-utils": [
"nil",
···
"stylix": {
"inputs": {
"base16": "base16",
-
"flake-compat": "flake-compat_3",
+
"flake-compat": "flake-compat_4",
"home-manager": [
"home"
],
···
"type": "github"
},
+
"systems": {
+
"locked": {
+
"lastModified": 1680978846,
+
"narHash": "sha256-Gtqg8b/v49BFDpDetjclCYXm8mAnTrUzR0JnE2nv5aw=",
+
"owner": "nix-systems",
+
"repo": "x86_64-linux",
+
"rev": "2ecfcac5e15790ba6ce360ceccddb15ad16d08a8",
+
"type": "github"
+
},
+
"original": {
+
"owner": "nix-systems",
+
"repo": "x86_64-linux",
+
"type": "github"
+
}
+
},
"utils": {
"locked": {
"lastModified": 1678901627,
···
},
"vscode-extensions": {
"inputs": {
-
"flake-compat": "flake-compat_4",
+
"flake-compat": "flake-compat_5",
"flake-utils": "flake-utils_4",
"nixpkgs": [
"nixpkgs"
+7
flake.nix
···
description = "config!!!";
inputs = {
+
nixpkgs-master.url = "github:nixos/nixpkgs/master";
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
nur.url = "github:nix-community/NUR";
···
agenix.url = "github:ryantm/agenix";
agenix.inputs.nixpkgs.follows = "nixpkgs";
+
+
musikquad.url = "github:yusdacra/musikquadrupled";
+
musikquad.inputs.nixpkgs.follows = "nixpkgs";
+
+
musikspider.url = "github:yusdacra/musikspider";
+
musikspider.inputs.nixpkgs.follows = "nixpkgs";
# needed for hyprland setup
# hyprland.url = "github:hyprwm/Hyprland";
+1
hosts/tkaronto/default.nix
···
};
networking.firewall.allowedUDPPorts = [49152];
+
networking.firewall.allowedTCPPorts = [7905 7906];
# for tailscale
networking.firewall.checkReversePath = "loose";
+7 -2
hosts/tkaronto/modules/secrets.nix
···
{
-
age.identityPaths = ["/etc/nixos/keys/ssh_key"];
+
age.identityPaths = ["/persist/keys/ssh_key"];
age.secrets.nixGithubAccessToken.file = ../../../secrets/nixGithubAccessToken.age;
-
age.secrets.wgTkarontoKey.file = ../../../secrets/wgTkarontoKey.age;
+
age.secrets.wgTkarontoKey = {
+
file = ../../../secrets/wgTkarontoKey.age;
+
mode = "600";
+
owner = "systemd-network";
+
group = "systemd-network";
+
};
}
+34 -9
hosts/tkaronto/modules/wireguard.nix
···
{config, ...}: {
-
networking.wireguard.enable = true;
-
networking.wireguard.interfaces."wg0" = {
-
privateKeyFile = config.age.secrets.wgTkarontoKey.path;
-
peers = [{
-
publicKey = builtins.readFile ./wgWolumondeKey.pub;
-
allowedIPs = ["10.99.0.1/32"];
-
endpoint = "${builtins.readFile ./wgWolumondeIp}:51820";
-
}];
+
systemd.network.enable = true;
+
systemd.network.netdevs."wg0" = {
+
enable = true;
+
netdevConfig = {
+
Name = "wg0";
+
Kind = "wireguard";
+
};
+
wireguardConfig = {
+
PrivateKeyFile = config.age.secrets.wgTkarontoKey.path;
+
};
+
wireguardPeers = [
+
{
+
wireguardPeerConfig = {
+
PublicKey = builtins.readFile ./wgWolumondeKey.pub;
+
AllowedIPs = ["10.99.0.1/32"];
+
Endpoint = "${builtins.readFile ./wgWolumondeIp}:51820";
+
PersistentKeepalive = 25;
+
};
+
}
+
];
+
};
+
systemd.network.networks."wg0" = {
+
matchConfig.Name = "wg0";
+
networkConfig.Address = "10.99.0.2/24";
+
# routes = [
+
# {
+
# routeConfig = {
+
# Gateway = "10.99.0.1";
+
# Destination = "10.99.0.0/24";
+
# GatewayOnLink = true;
+
# };
+
# }
+
# ];
};
-
}
+
}
+7 -5
hosts/wolumonde/default.nix
···
inputs,
tlib,
...
-
}: {
-
imports = [
-
inputs.agenix.nixosModules.default
-
] ++ (tlib.importFolder (toString ./modules));
+
}: {
+
imports =
+
[
+
inputs.agenix.nixosModules.default
+
]
+
++ (tlib.importFolder (toString ./modules));
boot.cleanTmpDir = true;
zramSwap.enable = true;
···
# firewall stuffs
networking.firewall = {
enable = true;
-
allowedTCPPorts = [22 80 443];
+
allowedTCPPorts = [22 80 443 5005];
allowedUDPPortRanges = [];
};
+2 -1
hosts/wolumonde/modules/bernbot.nix
···
{
+
config,
inputs,
pkgs,
lib,
···
Restart = "on-failure";
RestartSec = 5;
WorkingDirectory = "/var/lib/bernbot";
-
EnvironmentFile = "${inputs.self}/secrets/bernbot_token";
+
EnvironmentFile = config.age.secrets.bernbotToken.path;
}
];
};
+1 -1
hosts/wolumonde/modules/blog.nix
···
...
}: {
services.nginx.virtualHosts."gaze.systems" = {
-
enableACME = true;
+
useACMEHost = "gaze.systems";
forceSSL = true;
root = "${inputs.blog.packages.${pkgs.system}.site}";
locations."/".extraConfig = ''
+1 -1
hosts/wolumonde/modules/conduit.nix
···
};
services.nginx.virtualHosts."matrix.gaze.systems" = {
-
enableACME = true;
+
useACMEHost = "gaze.systems";
forceSSL = true;
locations."/".proxyPass = "http://localhost:${toString config.services.matrix-conduit.settings.global.port}";
};
+1 -1
hosts/wolumonde/modules/gitea.nix
···
};
services.nginx.virtualHosts."git.gaze.systems" = {
-
enableACME = true;
+
useACMEHost = "gaze.systems";
forceSSL = true;
locations."/".proxyPass = "http://localhost:3001";
};
+37
hosts/wolumonde/modules/musikquadrupled.nix
···
+
{
+
config,
+
inputs,
+
pkgs,
+
...
+
}: let
+
pkg = inputs.musikquad.packages.${pkgs.system}.default;
+
in {
+
users.users.musikquad = {
+
isSystemUser = true;
+
group = "musikquad";
+
};
+
users.groups.musikquad = {};
+
+
systemd.services.musikquadrupled = {
+
description = "musikquadrupled";
+
wantedBy = ["multi-user.target"];
+
after = ["network.target"];
+
serviceConfig = {
+
User = "musikquad";
+
ExecStart = "${pkg}/bin/musikquadrupled";
+
Restart = "on-failure";
+
RestartSec = 5;
+
WorkingDirectory = "/var/lib/musikquad";
+
EnvironmentFile = config.age.secrets.musikquadConfig.path;
+
};
+
};
+
+
services.nginx.virtualHosts."mq.gaze.systems" = {
+
useACMEHost = "gaze.systems";
+
forceSSL = true;
+
locations."/" = {
+
proxyPass = "http://localhost:5005";
+
proxyWebsockets = true;
+
};
+
};
+
}
+11
hosts/wolumonde/modules/musikspider.nix
···
+
{
+
pkgs,
+
inputs,
+
...
+
}: {
+
services.nginx.virtualHosts."ms.gaze.systems" = {
+
useACMEHost = "gaze.systems";
+
forceSSL = true;
+
root = "${inputs.musikspider.packages.${pkgs.system}.musikspider}";
+
};
+
}
+12
hosts/wolumonde/modules/nginx.nix
···
recommendedGzipSettings = true;
recommendedProxySettings = true;
};
+
+
users.users.nginx.extraGroups = ["acme"];
+
security.acme = {
acceptTerms = true;
defaults.email = (import "${inputs.self}/personal.nix").emails.primary;
+
certs."gaze.systems" = {
+
webroot = "/var/lib/acme/acme-challenge";
+
extraDomainNames = [
+
"git.gaze.systems"
+
"matrix.gaze.systems"
+
"ms.gaze.systems"
+
"mq.gaze.systems"
+
];
+
};
};
}
+7 -1
hosts/wolumonde/modules/secrets.nix
···
{
age.secrets.bernbotToken.file = ../../../secrets/bernbotToken.age;
-
age.secrets.wgWolumondeKey.file = ../../../secrets/wgWolumondeKey.age;
+
age.secrets.wgWolumondeKey = {
+
file = ../../../secrets/wgWolumondeKey.age;
+
mode = "600";
+
owner = "systemd-network";
+
group = "systemd-network";
+
};
+
age.secrets.musikquadConfig.file = ../../../secrets/musikquadConfig.age;
}
+45 -10
hosts/wolumonde/modules/wireguard.nix
···
-
{config, ...}: {
-
networking.wireguard.enable = true;
-
networking.wireguard.interfaces."wg0" = {
-
listenPort = 51820;
-
privateKeyFile = config.age.secrets.wgWolumondeKey.path;
-
peers = [{
-
publicKey = builtins.readFile ./wgTkarontoKey.pub;
-
allowedIPs = ["10.99.0.2/32"];
-
}];
+
{
+
config,
+
pkgs,
+
...
+
}: {
+
environment.systemPackages = [pkgs.wireguard-tools];
+
+
systemd.network.enable = true;
+
systemd.network.netdevs."wg0" = {
+
enable = true;
+
netdevConfig = {
+
Name = "wg0";
+
Kind = "wireguard";
+
};
+
wireguardConfig = {
+
ListenPort = 51820;
+
PrivateKeyFile = config.age.secrets.wgWolumondeKey.path;
+
};
+
wireguardPeers = [
+
{
+
wireguardPeerConfig = {
+
PublicKey = builtins.readFile ./wgTkarontoKey.pub;
+
AllowedIPs = ["10.99.0.2/32"];
+
};
+
}
+
];
+
};
+
systemd.network.networks."wg0" = {
+
matchConfig.Name = "wg0";
+
networkConfig.Address = "10.99.0.1/24";
+
# routes = [
+
# {
+
# routeConfig = {
+
# Gateway = "10.99.0.1";
+
# Destination = "10.99.0.0/24";
+
# };
+
# }
+
# ];
+
};
+
+
boot.kernel.sysctl = {
+
"net.ipv4.ip_forward" = 1;
};
-
}
+
+
networking.firewall.allowedUDPPorts = [51820];
+
}
+2 -2
modules/network/dns/cloudflare.nix
···
-
{
+
{lib, ...}: {
networking.resolvconf.useLocalResolver = true;
-
networking.networkmanager.dns = "none";
+
networking.networkmanager.dns = lib.mkForce "none";
services.dnscrypt-proxy2 = {
enable = true;
settings = {
+3
pkgs-set/overlays/musikcube.nix
···
+
{inputs}: final: prev: {
+
musikcube = inputs.nixpkgs-master.legacyPackages.${final.system}.musikcube;
+
}
secrets/musikquadConfig.age

This is a binary file and will not be displayed.

+2 -2
secrets/secrets.nix
···
let
yusdacra = builtins.readFile ./yusdacra.key.pub;
wolumonde = builtins.readFile ./wolumonde.key.pub;
-
in
-
{
+
in {
"wgWolumondeKey.age".publicKeys = [yusdacra wolumonde];
"wgTkarontoKey.age".publicKeys = [yusdacra];
"bernbotToken.age".publicKeys = [yusdacra wolumonde];
+
"musikquadConfig.age".publicKeys = [yusdacra wolumonde];
"nixGithubAccessToken.age".publicKeys = [yusdacra];
}
+45
users/modules/musikcube/default-config.json
···
+
{
+
"AppQuitKey": "^D",
+
"AsyncTrackListQueries": true,
+
"AutoHideCommandBar": false,
+
"AutoUpdateCheck": true,
+
"CategoryTrackListSortOrder": 0,
+
"ColorTheme": "",
+
"DisableAlbumArtistFallback": false,
+
"DisableCustomColors": false,
+
"DisableRatingColumn": false,
+
"DisableWindowTitleUpdates": true,
+
"FirstRunSettingsDisplayed": true,
+
"IndexerLogEnabled": false,
+
"IndexerThreadCount": 4,
+
"IndexerTransactionInterval": 300,
+
"InheritBackgroundColor": false,
+
"LastAcknowledgedUpdateVersion": "3.0.0",
+
"LastFmSessionId": "",
+
"LastFmToken": "",
+
"LastFmUsername": "",
+
"LibraryType": 1,
+
"Locale": "en_US",
+
"MinimizeToTray": false,
+
"PiggyEnabled": false,
+
"PlaybackTrackQueryTimeoutMs": 5000,
+
"RatingNegativeChar": "·",
+
"RatingPositiveChar": "★",
+
"RemoteLibraryHostname": "127.0.0.1",
+
"RemoteLibraryHttpPort": 7906,
+
"RemoteLibraryHttpTls": false,
+
"RemoteLibraryIgnoreVersionMismatch": 0,
+
"RemoteLibraryLatencyTimeoutMs": 5000,
+
"RemoteLibraryPassword": "",
+
"RemoteLibraryTranscoderBitrate": 192,
+
"RemoteLibraryTranscoderEnabled": false,
+
"RemoteLibraryTranscoderFormat": "ogg",
+
"RemoteLibraryWssPort": 7905,
+
"RemoteLibraryWssTls": false,
+
"RemoveMissingFiles": true,
+
"SaveSessionOnExit": true,
+
"StartMinimized": false,
+
"SyncOnStartup": true,
+
"TrackSearchSortOrder": 0,
+
"UsePaletteColors": true
+
}
+22
users/modules/musikcube/default.nix
···
+
{config, pkgs, lib, ...}: let
+
cfg = config.programs.musikcube;
+
in {
+
options = {
+
programs.musikcube = {
+
enable = lib.mkEnableOption "whether to enable musikcube";
+
package = lib.mkOption {
+
type = lib.types.package;
+
default = pkgs.musikcube;
+
};
+
settings = lib.mkOption {
+
type = (pkgs.formats.json {}).type;
+
default = builtins.fromJSON (builtins.readFile ./default-config.json);
+
};
+
};
+
};
+
+
config = lib.mkIf cfg.enable {
+
home.packages = [cfg.package];
+
xdg.configFile."musikcube/settings.json".text = builtins.toJSON cfg.settings;
+
};
+
}
+13
users/modules/musikcubed/default-config.json
···
+
{
+
"debug": false,
+
"http_server_enabled": true,
+
"http_server_port": 7906,
+
"password": "",
+
"transcoder_cache_count": 50,
+
"transcoder_max_active_count": 4,
+
"transcoder_synchronous": false,
+
"transcoder_synchronous_fallback": false,
+
"use_ipv6": false,
+
"websocket_server_enabled": true,
+
"websocket_server_port": 7905
+
}
+34
users/modules/musikcubed/default.nix
···
+
{config, lib, pkgs, ...}: let
+
cfg = config.services.musikcubed;
+
in {
+
options = {
+
services.musikcubed = {
+
enable = lib.mkEnableOption "whether to enable musikcubed";
+
package = lib.mkOption {
+
type = lib.types.package;
+
default = pkgs.musikcube;
+
};
+
settings = lib.mkOption {
+
type = (pkgs.formats.json {}).type;
+
default = builtins.fromJSON (builtins.readFile ./default-config.json);
+
};
+
};
+
};
+
config = lib.mkIf cfg.enable {
+
systemd.user.services.musikcubed = {
+
Install = {
+
WantedBy = ["multi-user.target"];
+
};
+
Unit = {
+
Description = "musikcubed";
+
After = "network.target";
+
};
+
Service = {
+
ExecStart = "${cfg.package}/bin/musikcubed --foreground";
+
Restart = "on-failure";
+
RestartSec = 5;
+
};
+
};
+
xdg.configFile."musikcube/plugin_musikcubeserver(wss,http).json".text = builtins.toJSON cfg.settings;
+
};
+
}
+7 -1
users/patriot/default.nix
···
["zoxide" "zsh" "fzf" "starship" "direnv"]
# dev stuff
["helix" "code" "git" "ssh"]
-
["lollypop"]
+
["musikcube" "musikcubed"]
];
in
l.flatten [
···
++ mkPaths ".config" [
# "lutris"
"dconf"
+
"musikcube"
];
files = l.flatten [
".config/gnome-initial-setup-done"
···
];
};
programs = {
+
musikcube.enable = true;
command-not-found.enable =
nixosConfig.programs.command-not-found.enable;
git = {
···
};
};
services = {
+
musikcubed = {
+
enable = true;
+
settings.password = "somethingidk";
+
};
gpg-agent = let
defaultCacheTtl = 3600 * 6;
maxCacheTtl = 3600 * 24;