push
This commit is contained in:
@@ -27,7 +27,7 @@
|
|||||||
copyparty.url = "github:9001/copyparty";
|
copyparty.url = "github:9001/copyparty";
|
||||||
};
|
};
|
||||||
|
|
||||||
outputs = inputs@{ self, nixpkgs, stylix, home-manager, flatpaks, hytale-launcher, vscode-server, copyparty, ... }:
|
outputs = inputs@{ self, nixpkgs, stylix, home-manager, flatpaks, hytale-launcher, vscode-server, copyparty, nix-citizen, ... }:
|
||||||
let
|
let
|
||||||
deviceType = import ./device.nix;
|
deviceType = import ./device.nix;
|
||||||
system = "x86_64-linux";
|
system = "x86_64-linux";
|
||||||
@@ -47,6 +47,8 @@
|
|||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
nix-citizen.nixosModules.default
|
||||||
|
|
||||||
flatpaks.nixosModules.nix-flatpak
|
flatpaks.nixosModules.nix-flatpak
|
||||||
|
|
||||||
./main.nix
|
./main.nix
|
||||||
|
|||||||
1
home.nix
1
home.nix
@@ -7,6 +7,7 @@
|
|||||||
|
|
||||||
] else [
|
] else [
|
||||||
./modules/stylix.nix
|
./modules/stylix.nix
|
||||||
|
./modules/firefox.nix
|
||||||
]);
|
]);
|
||||||
|
|
||||||
home = {
|
home = {
|
||||||
|
|||||||
6
main.nix
6
main.nix
@@ -83,6 +83,12 @@
|
|||||||
#pi = "ssh pi.bug.tools";
|
#pi = "ssh pi.bug.tools";
|
||||||
box = "ssh box.bug.tools";
|
box = "ssh box.bug.tools";
|
||||||
|
|
||||||
|
unbox = "sh -c 'ssh -N -L \"$1\":0.0.0.0:\"$1\" box.bug.tools &' --";
|
||||||
|
|
||||||
|
rebox = "sh -c 'fuser -k \"$1\"/tcp' --";
|
||||||
|
|
||||||
|
dock = "sh -c 'ssh -N -D \"$1\" box.bug.tools &' --";
|
||||||
|
|
||||||
pico = "ssh pico.sh";
|
pico = "ssh pico.sh";
|
||||||
|
|
||||||
# tuns name port
|
# tuns name port
|
||||||
|
|||||||
0
modules/adblock.nix
Normal file
0
modules/adblock.nix
Normal file
0
modules/cloudflare.nix
Normal file
0
modules/cloudflare.nix
Normal file
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
79
modules/firefox.nix
Normal file
79
modules/firefox.nix
Normal file
@@ -0,0 +1,79 @@
|
|||||||
|
{ config, pkgs, device, ... }:
|
||||||
|
|
||||||
|
{
|
||||||
|
programs.firefox = {
|
||||||
|
enable = true;
|
||||||
|
package = pkgs.librewolf;
|
||||||
|
|
||||||
|
policies = {
|
||||||
|
DisableTelemetry = true;
|
||||||
|
DisableFirefoxStudies = true;
|
||||||
|
|
||||||
|
Preferences = {
|
||||||
|
"cookiebanners.service.mode" = 2;
|
||||||
|
"cookiebanners.service.mode.privateBrowsing" = 2;
|
||||||
|
"network.cookie.lifetimePolicy" = 0;
|
||||||
|
"privacy.clearonShutdown.cookies" = false;
|
||||||
|
"privacy.claerOnShutdown.history" = false;
|
||||||
|
"privacy.donottrackheader.enabled" = true;
|
||||||
|
"privacy.fingerprintingProtection.enabled" = true;
|
||||||
|
"privacy.resistFingerprinting" = false;
|
||||||
|
"privacy.trackingprotection.enabled" = true;
|
||||||
|
"privacy.trackingprotection.socialtracking.enabled" = true;
|
||||||
|
"privacy.trackingprotection.fingerprinting.enabled" = true;
|
||||||
|
"privacy.trackingprotection.emailtracking.enabled" = true;
|
||||||
|
"webgl.disabled" = false;
|
||||||
|
};
|
||||||
|
|
||||||
|
ExtensionSettings = {
|
||||||
|
# catppuccin no borders https://addons.mozilla.org/en-US/firefox/addon/catppuccin-mocha-no-borders/
|
||||||
|
"catppuccin-mocha-no-borders@skyrpex" = {
|
||||||
|
installation_mode = "force_installed";
|
||||||
|
install_url = "https://addons.mozilla.org/firefox/downloads/latest/catppuccin-mocha-no-borders/latest.xpi";
|
||||||
|
};
|
||||||
|
|
||||||
|
# DeArrow
|
||||||
|
"dearrow@jetpack" = {
|
||||||
|
installation_mode = "force_installed";
|
||||||
|
install_url = "https://addons.mozilla.org/firefox/downloads/latest/dearrow-jetpack/latest.xpi";
|
||||||
|
};
|
||||||
|
|
||||||
|
# Return Youtube Dislike
|
||||||
|
"return-youtube-dislike@0.4.11" = {
|
||||||
|
installation_mode = "force_installed";
|
||||||
|
install_url = "https://addons.mozilla.org/firefox/downloads/latest/return-youtube-dislike/latest.xpi";
|
||||||
|
};
|
||||||
|
|
||||||
|
# SponsorBlock for YouTube
|
||||||
|
"sponsorblock@sponsorblock.com" = {
|
||||||
|
installation_mode = "force_installed";
|
||||||
|
install_url = "https://addons.mozilla.org/firefox/downloads/latest/sponsorblock-for-youtube/latest.xpi";
|
||||||
|
};
|
||||||
|
|
||||||
|
# Stylus
|
||||||
|
"stylus@stylus" = {
|
||||||
|
installation_mode = "force_installed";
|
||||||
|
install_url = "https://addons.mozilla.org/firefox/downloads/latest/stylus/latest.xpi";
|
||||||
|
};
|
||||||
|
|
||||||
|
# Tampermonkey
|
||||||
|
"tampermonkey.net" = {
|
||||||
|
installation_mode = "force_installed";
|
||||||
|
install_url = "https://addons.mozilla.org/firefox/downloads/latest/tampermonkey/latest.xpi";
|
||||||
|
};
|
||||||
|
|
||||||
|
# uBlock Origin
|
||||||
|
"ublockorigin@raymondhill.net" = {
|
||||||
|
installation_mode = "force_installed";
|
||||||
|
install_url = "https://addons.mozilla.org/firefox/downloads/latest/ublock-origin/latest.xpi";
|
||||||
|
};
|
||||||
|
|
||||||
|
# BTRoblox
|
||||||
|
"btroblox@btroblox" = {
|
||||||
|
installation_mode = "force_installed";
|
||||||
|
install_url = "https://addons.mozilla.org/firefox/downloads/latest/btroblox/latest.xpi";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
@@ -1,4 +0,0 @@
|
|||||||
{ config, pkgs, device, ... }:
|
|
||||||
|
|
||||||
{
|
|
||||||
}
|
|
||||||
@@ -1,188 +0,0 @@
|
|||||||
{ config, pkgs, device, ... }:
|
|
||||||
|
|
||||||
{
|
|
||||||
services.cadvisor = {
|
|
||||||
enable = true;
|
|
||||||
port = 3022;
|
|
||||||
extraOptions = ["--docker_only=false"];
|
|
||||||
};
|
|
||||||
|
|
||||||
services.prometheus = {
|
|
||||||
enable = true;
|
|
||||||
listenAddress = "127.0.0.1";
|
|
||||||
port = 3020;
|
|
||||||
webExternalUrl = "/prometheus/";
|
|
||||||
checkConfig = true;
|
|
||||||
|
|
||||||
exporters = {
|
|
||||||
node = {
|
|
||||||
enable = true;
|
|
||||||
port = 3021;
|
|
||||||
enabledCollectors = ["systemd"];
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
scrapeConfigs = [
|
|
||||||
{
|
|
||||||
job_name = "node_exporter";
|
|
||||||
static_configs = [
|
|
||||||
{
|
|
||||||
targets = [
|
|
||||||
"127.0.0.1:${toString config.services.prometheus.exporters.node.port}"
|
|
||||||
];
|
|
||||||
}
|
|
||||||
];
|
|
||||||
}
|
|
||||||
{
|
|
||||||
job_name = "cadvisor";
|
|
||||||
static_configs = [
|
|
||||||
{
|
|
||||||
targets = [
|
|
||||||
"127.0.0.1:${toString config.services.cadvisor.port}"
|
|
||||||
];
|
|
||||||
}
|
|
||||||
];
|
|
||||||
}
|
|
||||||
];
|
|
||||||
};
|
|
||||||
|
|
||||||
services.loki = {
|
|
||||||
enable = true;
|
|
||||||
configuration = {
|
|
||||||
server.http_listen_port = 3030;
|
|
||||||
auth_enabled = false;
|
|
||||||
|
|
||||||
common = {
|
|
||||||
replication_factor = 1;
|
|
||||||
path_prefix = "/tmp/loki";
|
|
||||||
ring = {
|
|
||||||
kvstore.store = "inmemory";
|
|
||||||
instance_addr = "127.0.0.1";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
schema_config = {
|
|
||||||
configs = [{
|
|
||||||
from = "2020-05-15";
|
|
||||||
store = "tsdb";
|
|
||||||
object_store = "filesystem";
|
|
||||||
schema = "v13";
|
|
||||||
index = {
|
|
||||||
prefix = "index_";
|
|
||||||
period = "24h";
|
|
||||||
};
|
|
||||||
}];
|
|
||||||
};
|
|
||||||
|
|
||||||
storage_config.filesystem.directory = "/tmp/loki/chunks";
|
|
||||||
|
|
||||||
analytics.reporting_enabled = false;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
users.groups.promtail = {};
|
|
||||||
users.groups.nginx = {};
|
|
||||||
users.users.promtail = {
|
|
||||||
isSystemUser = true;
|
|
||||||
group = "promtail";
|
|
||||||
extraGroups = ["nginx"];
|
|
||||||
};
|
|
||||||
|
|
||||||
services.promtail = {
|
|
||||||
enable = true;
|
|
||||||
configuration = {
|
|
||||||
server = {
|
|
||||||
http_listen_port = 3031;
|
|
||||||
grpc_listen_port = 0;
|
|
||||||
};
|
|
||||||
positions = {
|
|
||||||
filename = "/tmp/positions.yaml";
|
|
||||||
};
|
|
||||||
clients = [
|
|
||||||
{
|
|
||||||
url = "http://127.0.0.1:${toString config.services.loki.configuration.server.http_listen_port}/loki/api/v1/push";
|
|
||||||
}
|
|
||||||
];
|
|
||||||
scrape_configs = [
|
|
||||||
{
|
|
||||||
job_name = "journal";
|
|
||||||
journal = {
|
|
||||||
max_age = "12h";
|
|
||||||
labels = {
|
|
||||||
job = "systemd-journal";
|
|
||||||
host = "box";
|
|
||||||
instance = "127.0.0.1";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
relabel_configs = [
|
|
||||||
{
|
|
||||||
source_labels = ["__journal__systemd_unit"];
|
|
||||||
target_label = "unit";
|
|
||||||
}
|
|
||||||
];
|
|
||||||
}
|
|
||||||
|
|
||||||
{
|
|
||||||
job_name = "nginx";
|
|
||||||
static_configs = [
|
|
||||||
{
|
|
||||||
targets = ["127.0.0.1"];
|
|
||||||
labels = {
|
|
||||||
job = "nginx";
|
|
||||||
__path__ = "/var/log/nginx/*.log";
|
|
||||||
host = "box";
|
|
||||||
instance = "127.0.0.1";
|
|
||||||
};
|
|
||||||
}
|
|
||||||
];
|
|
||||||
}
|
|
||||||
];
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
environment.etc."grafana/dashboards" = {
|
|
||||||
source = ./dashboards;
|
|
||||||
user = "grafana";
|
|
||||||
group = "grafana";
|
|
||||||
};
|
|
||||||
|
|
||||||
services.grafana = {
|
|
||||||
enable = true;
|
|
||||||
|
|
||||||
settings = {
|
|
||||||
server = {
|
|
||||||
http_addr = "127.0.0.1";
|
|
||||||
http_port = 3010;
|
|
||||||
};
|
|
||||||
|
|
||||||
analytics = {
|
|
||||||
reporting_enabled = false;
|
|
||||||
feedback_links_enabled = false;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
|
|
||||||
provision = {
|
|
||||||
enable = true;
|
|
||||||
dashboards.settings.providers = [
|
|
||||||
{
|
|
||||||
options.path = "/etc/grafana/dashboards";
|
|
||||||
}
|
|
||||||
];
|
|
||||||
datasources.settings.datasources = [
|
|
||||||
{
|
|
||||||
name = "Prometheus";
|
|
||||||
type = "prometheus";
|
|
||||||
access = "proxy";
|
|
||||||
url = "http://127.0.0.1:${toString config.services.prometheus.port}/prometheus";
|
|
||||||
}
|
|
||||||
{
|
|
||||||
name = "Loki";
|
|
||||||
type = "loki";
|
|
||||||
access = "proxy";
|
|
||||||
url = "http://127.0.0.1:${toString config.services.loki.configuration.server.http_listen_port}";
|
|
||||||
}
|
|
||||||
];
|
|
||||||
};
|
|
||||||
};
|
|
||||||
}
|
|
||||||
@@ -113,7 +113,7 @@ in
|
|||||||
|
|
||||||
environment.systemPackages = with pkgs; [
|
environment.systemPackages = with pkgs; [
|
||||||
home-manager
|
home-manager
|
||||||
comma
|
comma # run nixpkgs without installing
|
||||||
nix-index
|
nix-index
|
||||||
|
|
||||||
git
|
git
|
||||||
@@ -127,15 +127,15 @@ in
|
|||||||
|
|
||||||
nix-prefetch
|
nix-prefetch
|
||||||
nix-output-monitor
|
nix-output-monitor
|
||||||
nvd
|
nvd # nix pkg diff
|
||||||
|
|
||||||
nixfmt
|
nixfmt # nix formatter
|
||||||
nixd
|
nixd # nix language server
|
||||||
nil
|
nil # nix language server
|
||||||
|
|
||||||
nh
|
nh # nix helper
|
||||||
|
|
||||||
gnome-boxes
|
gnome-boxes # gnome vm manager
|
||||||
|
|
||||||
openjdk
|
openjdk
|
||||||
zlib
|
zlib
|
||||||
@@ -192,6 +192,8 @@ in
|
|||||||
inputs.hytale-launcher.packages.${pkgs.system}.default
|
inputs.hytale-launcher.packages.${pkgs.system}.default
|
||||||
|
|
||||||
baobab
|
baobab
|
||||||
|
|
||||||
|
psmisc
|
||||||
] ++ (if (device == "desktop") then [
|
] ++ (if (device == "desktop") then [
|
||||||
#(nix-gaming.packages.${pkgs.stdenv.hostPlatform.system}.star-citizen.override {
|
#(nix-gaming.packages.${pkgs.stdenv.hostPlatform.system}.star-citizen.override {
|
||||||
# tricks = [ "arial" "vcrun2019" "win10" "sound=alsa" ];
|
# tricks = [ "arial" "vcrun2019" "win10" "sound=alsa" ];
|
||||||
@@ -284,6 +286,14 @@ in
|
|||||||
};
|
};
|
||||||
|
|
||||||
programs = {
|
programs = {
|
||||||
|
rsi-launcher = {
|
||||||
|
enable = (device == "desktop");
|
||||||
|
|
||||||
|
preCommands = ''
|
||||||
|
export DISPLAY=;
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
|
||||||
appimage = {
|
appimage = {
|
||||||
enable = true;
|
enable = true;
|
||||||
binfmt = true;
|
binfmt = true;
|
||||||
|
|||||||
0
modules/searxng.nix
Normal file
0
modules/searxng.nix
Normal file
Reference in New Issue
Block a user