whatever
This commit is contained in:
parent
be9fb9278e
commit
b8af0e9761
165 changed files with 1815 additions and 1431 deletions
16
profiles/desktop/clipboard.nix
Normal file
16
profiles/desktop/clipboard.nix
Normal file
|
@ -0,0 +1,16 @@
|
|||
{
|
||||
config,
|
||||
lib,
|
||||
pkgs,
|
||||
...
|
||||
}:
|
||||
let
|
||||
cfg = config.profiles.desktop;
|
||||
in
|
||||
{
|
||||
config = lib.mkIf cfg.enable {
|
||||
environment.systemPackages = [
|
||||
pkgs.wl-clipboard
|
||||
];
|
||||
};
|
||||
}
|
33
profiles/desktop/compat.nix
Normal file
33
profiles/desktop/compat.nix
Normal file
|
@ -0,0 +1,33 @@
|
|||
{
|
||||
config,
|
||||
lib,
|
||||
pkgs,
|
||||
...
|
||||
}:
|
||||
let
|
||||
cfg = config.profiles.desktop;
|
||||
in
|
||||
{
|
||||
config = lib.mkIf cfg.enable {
|
||||
programs.appimage = {
|
||||
enable = true;
|
||||
binfmt = true;
|
||||
package = pkgs.appimage-run.override {
|
||||
extraPkgs = pkgs: [
|
||||
pkgs.curl
|
||||
pkgs.zlib
|
||||
pkgs.libmpg123
|
||||
];
|
||||
};
|
||||
};
|
||||
|
||||
boot.binfmt.emulatedSystems = lib.remove pkgs.stdenv.hostPlatform.system [
|
||||
"x86_64-linux"
|
||||
"aarch64-linux"
|
||||
];
|
||||
|
||||
environment.systemPackages = [
|
||||
pkgs.wineWow64Packages.waylandFull
|
||||
];
|
||||
};
|
||||
}
|
29
profiles/desktop/cosmic.nix
Normal file
29
profiles/desktop/cosmic.nix
Normal file
|
@ -0,0 +1,29 @@
|
|||
{
|
||||
config,
|
||||
lib,
|
||||
inputs,
|
||||
...
|
||||
}:
|
||||
let
|
||||
cfg = config.profiles.desktop;
|
||||
in
|
||||
{
|
||||
imports = [
|
||||
inputs.nixos-cosmic.nixosModules.default
|
||||
];
|
||||
|
||||
config = lib.mkIf cfg.enable {
|
||||
|
||||
nix.settings = {
|
||||
substituters = [ "https://cosmic.cachix.org" ];
|
||||
trusted-public-keys = [ "cosmic.cachix.org-1:Dya9IyXD4xdBehWjrkPv6rtxpmMdRel02smYzA85dPE=" ];
|
||||
};
|
||||
|
||||
services = {
|
||||
desktopManager.cosmic.enable = true;
|
||||
displayManager.cosmic-greeter.enable = true;
|
||||
};
|
||||
|
||||
environment.sessionVariables.COSMIC_DATA_CONTROL_ENABLED = 1;
|
||||
};
|
||||
}
|
29
profiles/desktop/default.nix
Normal file
29
profiles/desktop/default.nix
Normal file
|
@ -0,0 +1,29 @@
|
|||
{ config, lib, ... }:
|
||||
let
|
||||
cfg = config.profiles.desktop;
|
||||
in
|
||||
{
|
||||
options.profiles.desktop = {
|
||||
enable = lib.mkEnableOption "desktop";
|
||||
};
|
||||
|
||||
# imports = lib.optionals cfg.enable (lib.findModules {} [./profile]);
|
||||
|
||||
config = lib.mkIf cfg.enable {
|
||||
imports = lib.findModules { } [ ./profile ];
|
||||
|
||||
assertions = [
|
||||
{
|
||||
assertion = config.profiles.server.enable == false;
|
||||
message = "The desktop profile is not compatible with the server profile.";
|
||||
}
|
||||
];
|
||||
};
|
||||
|
||||
# config.assertions = lib.mkIf cfg.enable [
|
||||
# {
|
||||
# assertion = config.profiles.server.enable == false;
|
||||
# message = "The desktop profile is not compatible with the server profile.";
|
||||
# }
|
||||
# ];
|
||||
}
|
25
profiles/desktop/firefox.nix
Normal file
25
profiles/desktop/firefox.nix
Normal file
|
@ -0,0 +1,25 @@
|
|||
{
|
||||
config,
|
||||
lib,
|
||||
pkgs,
|
||||
...
|
||||
}:
|
||||
let
|
||||
cfg = config.profiles.desktop;
|
||||
in
|
||||
{
|
||||
config = lib.mkIf cfg.enable {
|
||||
programs.firefox = {
|
||||
enable = true;
|
||||
package = pkgs.librewolf;
|
||||
preferences = {
|
||||
"webgl.disabled" = false;
|
||||
"privacy.resistFingerprinting" = false;
|
||||
"middlemouse.paste" = false;
|
||||
"general.autoScroll" = true;
|
||||
"privacy.clearOnShutdown.history" = false;
|
||||
"privacy.clearOnShutdown.downloads" = false;
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
48
profiles/desktop/fonts.nix
Normal file
48
profiles/desktop/fonts.nix
Normal file
|
@ -0,0 +1,48 @@
|
|||
{
|
||||
config,
|
||||
lib,
|
||||
pkgs,
|
||||
...
|
||||
}:
|
||||
let
|
||||
cfg = config.profiles.desktop;
|
||||
in
|
||||
{
|
||||
config = lib.mkIf cfg.enable {
|
||||
fonts = {
|
||||
enableDefaultPackages = true;
|
||||
packages = [
|
||||
pkgs.noto-fonts
|
||||
pkgs.noto-fonts-extra
|
||||
pkgs.noto-fonts-cjk-sans
|
||||
pkgs.noto-fonts-cjk-serif
|
||||
pkgs.noto-fonts-monochrome-emoji
|
||||
pkgs.noto-fonts-color-emoji
|
||||
pkgs.nerd-fonts.fira-code
|
||||
];
|
||||
|
||||
fontconfig = {
|
||||
enable = true;
|
||||
|
||||
defaultFonts = {
|
||||
monospace = [
|
||||
"FiraCode Nerd Font"
|
||||
];
|
||||
sansSerif = [
|
||||
"Noto Sans"
|
||||
];
|
||||
serif = [
|
||||
"Noto Serif"
|
||||
];
|
||||
emoji = [
|
||||
"Noto Color Emoji"
|
||||
"Noto Emoji"
|
||||
];
|
||||
};
|
||||
};
|
||||
|
||||
# TODO
|
||||
fontDir.enable = true;
|
||||
};
|
||||
};
|
||||
}
|
22
profiles/desktop/hardware.nix
Normal file
22
profiles/desktop/hardware.nix
Normal file
|
@ -0,0 +1,22 @@
|
|||
{
|
||||
config,
|
||||
lib,
|
||||
...
|
||||
}:
|
||||
let
|
||||
cfg = config.profiles.desktop;
|
||||
in
|
||||
{
|
||||
config = lib.mkIf cfg.enable {
|
||||
hardware = {
|
||||
bluetooth.enable = true;
|
||||
steam-hardware.enable = true;
|
||||
xone.enable = true;
|
||||
xpadneo.enable = true;
|
||||
opentabletdriver.enable = true;
|
||||
gcadapter.enable = true;
|
||||
graphics.enable = true;
|
||||
enableAllFirmware = true;
|
||||
};
|
||||
};
|
||||
}
|
13
profiles/desktop/location.nix
Normal file
13
profiles/desktop/location.nix
Normal file
|
@ -0,0 +1,13 @@
|
|||
{
|
||||
config,
|
||||
lib,
|
||||
...
|
||||
}:
|
||||
let
|
||||
cfg = config.profiles.desktop;
|
||||
in
|
||||
{
|
||||
config = lib.mkIf cfg.enable {
|
||||
location.provider = "geoclue2";
|
||||
};
|
||||
}
|
20
profiles/desktop/networking.nix
Normal file
20
profiles/desktop/networking.nix
Normal file
|
@ -0,0 +1,20 @@
|
|||
{
|
||||
config,
|
||||
lib,
|
||||
...
|
||||
}:
|
||||
let
|
||||
cfg = config.profiles.desktop;
|
||||
in
|
||||
{
|
||||
config = lib.mkIf cfg.enable {
|
||||
services.resolved.enable = true;
|
||||
|
||||
networking.networkmanager = {
|
||||
enable = true;
|
||||
dns = "systemd-resolved";
|
||||
};
|
||||
|
||||
users.groups.networkmanager.members = config.users.normalUsers;
|
||||
};
|
||||
}
|
21
profiles/desktop/pipewire.nix
Normal file
21
profiles/desktop/pipewire.nix
Normal file
|
@ -0,0 +1,21 @@
|
|||
{
|
||||
config,
|
||||
lib,
|
||||
...
|
||||
}:
|
||||
let
|
||||
cfg = config.profiles.desktop;
|
||||
in
|
||||
{
|
||||
config = lib.mkIf cfg.enable {
|
||||
security.rtkit.enable = true;
|
||||
|
||||
services.pipewire = {
|
||||
enable = true;
|
||||
wireplumber.enable = true;
|
||||
alsa.enable = true;
|
||||
pulse.enable = true;
|
||||
jack.enable = true;
|
||||
};
|
||||
};
|
||||
}
|
16
profiles/desktop/printing.nix
Normal file
16
profiles/desktop/printing.nix
Normal file
|
@ -0,0 +1,16 @@
|
|||
{
|
||||
config,
|
||||
lib,
|
||||
...
|
||||
}:
|
||||
let
|
||||
cfg = config.profiles.desktop;
|
||||
in
|
||||
{
|
||||
config = lib.mkIf cfg.enable {
|
||||
services.printing = {
|
||||
enable = true;
|
||||
webInterface = true;
|
||||
};
|
||||
};
|
||||
}
|
16
profiles/desktop/supersonic.nix
Normal file
16
profiles/desktop/supersonic.nix
Normal file
|
@ -0,0 +1,16 @@
|
|||
{
|
||||
config,
|
||||
lib,
|
||||
pkgs,
|
||||
...
|
||||
}:
|
||||
let
|
||||
cfg = config.profiles.desktop;
|
||||
in
|
||||
{
|
||||
config = lib.mkIf cfg.enable {
|
||||
environment.systemPackages = [
|
||||
pkgs.supersonic-wayland
|
||||
];
|
||||
};
|
||||
}
|
17
profiles/desktop/vesktop.nix
Normal file
17
profiles/desktop/vesktop.nix
Normal file
|
@ -0,0 +1,17 @@
|
|||
{
|
||||
config,
|
||||
lib,
|
||||
pkgs,
|
||||
...
|
||||
}:
|
||||
let
|
||||
cfg = config.profiles.desktop;
|
||||
in
|
||||
{
|
||||
# TODO
|
||||
config = lib.mkIf cfg.enable {
|
||||
environment.systemPackages = [
|
||||
pkgs.vesktop
|
||||
];
|
||||
};
|
||||
}
|
16
profiles/desktop/wayland.nix
Normal file
16
profiles/desktop/wayland.nix
Normal file
|
@ -0,0 +1,16 @@
|
|||
{
|
||||
config,
|
||||
lib,
|
||||
...
|
||||
}:
|
||||
let
|
||||
cfg = config.profiles.desktop;
|
||||
in
|
||||
{
|
||||
config = lib.mkIf cfg.enable {
|
||||
environment.sessionVariables = {
|
||||
NIXOS_OZONE_WL = "1";
|
||||
SDL_VIDEODRIVER = "wayland";
|
||||
};
|
||||
};
|
||||
}
|
13
profiles/desktop/xdg.nix
Normal file
13
profiles/desktop/xdg.nix
Normal file
|
@ -0,0 +1,13 @@
|
|||
{
|
||||
config,
|
||||
lib,
|
||||
...
|
||||
}:
|
||||
let
|
||||
cfg = config.profiles.desktop;
|
||||
in
|
||||
{
|
||||
config = lib.mkIf cfg.enable {
|
||||
xdg.portal.xdgOpenUsePortal = true;
|
||||
};
|
||||
}
|
16
profiles/desktop/zk.nix
Normal file
16
profiles/desktop/zk.nix
Normal file
|
@ -0,0 +1,16 @@
|
|||
{
|
||||
config,
|
||||
lib,
|
||||
pkgs,
|
||||
...
|
||||
}:
|
||||
let
|
||||
cfg = config.profiles.desktop;
|
||||
in
|
||||
{
|
||||
config = lib.mkIf cfg.enable {
|
||||
environment.systemPackages = [
|
||||
pkgs.zk
|
||||
];
|
||||
};
|
||||
}
|
16
profiles/emulation/cemu.nix
Normal file
16
profiles/emulation/cemu.nix
Normal file
|
@ -0,0 +1,16 @@
|
|||
{
|
||||
config,
|
||||
lib,
|
||||
pkgs,
|
||||
...
|
||||
}:
|
||||
let
|
||||
cfg = config.profiles.emulation;
|
||||
in
|
||||
{
|
||||
config = lib.mkIf cfg.enable {
|
||||
environment.systemPackages = [
|
||||
pkgs.cemu
|
||||
];
|
||||
};
|
||||
}
|
18
profiles/emulation/default.nix
Normal file
18
profiles/emulation/default.nix
Normal file
|
@ -0,0 +1,18 @@
|
|||
{ config, lib, ... }:
|
||||
let
|
||||
cfg = config.profiles.emulation;
|
||||
in
|
||||
{
|
||||
options.profiles.emulation = {
|
||||
enable = lib.mkEnableOption "emulation";
|
||||
};
|
||||
|
||||
config = lib.mkIf cfg.enable {
|
||||
assertions = [
|
||||
{
|
||||
assertion = config.profiles.desktop.enable;
|
||||
message = "The emulation profile depends on the desktop profile.";
|
||||
}
|
||||
];
|
||||
};
|
||||
}
|
16
profiles/emulation/dolphin.nix
Normal file
16
profiles/emulation/dolphin.nix
Normal file
|
@ -0,0 +1,16 @@
|
|||
{
|
||||
config,
|
||||
lib,
|
||||
pkgs,
|
||||
...
|
||||
}:
|
||||
let
|
||||
cfg = config.profiles.emulation;
|
||||
in
|
||||
{
|
||||
config = lib.mkIf cfg.enable {
|
||||
environment.systemPackages = [
|
||||
pkgs.dolphin-emu
|
||||
];
|
||||
};
|
||||
}
|
16
profiles/emulation/rmg.nix
Normal file
16
profiles/emulation/rmg.nix
Normal file
|
@ -0,0 +1,16 @@
|
|||
{
|
||||
config,
|
||||
lib,
|
||||
pkgs,
|
||||
...
|
||||
}:
|
||||
let
|
||||
cfg = config.profiles.emulation;
|
||||
in
|
||||
{
|
||||
config = lib.mkIf cfg.enable {
|
||||
environment.systemPackages = [
|
||||
pkgs.rmg-wayland
|
||||
];
|
||||
};
|
||||
}
|
18
profiles/gaming/default.nix
Normal file
18
profiles/gaming/default.nix
Normal file
|
@ -0,0 +1,18 @@
|
|||
{ config, lib, ... }:
|
||||
let
|
||||
cfg = config.profiles.gaming;
|
||||
in
|
||||
{
|
||||
options.profiles.gaming = {
|
||||
enable = lib.mkEnableOption "gaming";
|
||||
};
|
||||
|
||||
imports = lib.optionals cfg.enable (lib.findModules { } [ ./profile ]);
|
||||
|
||||
config.assertions = lib.mkIf cfg.enable [
|
||||
{
|
||||
assertion = config.profiles.desktop.enable;
|
||||
message = "The gaming profile depends on the desktop profile.";
|
||||
}
|
||||
];
|
||||
}
|
27
profiles/gaming/gamemode.nix
Normal file
27
profiles/gaming/gamemode.nix
Normal file
|
@ -0,0 +1,27 @@
|
|||
{
|
||||
config,
|
||||
lib,
|
||||
pkgs,
|
||||
...
|
||||
}:
|
||||
let
|
||||
cfg = config.profiles.gaming;
|
||||
in
|
||||
{
|
||||
config = lib.mkIf cfg.enable {
|
||||
programs.gamemode = {
|
||||
enable = true;
|
||||
settings = {
|
||||
general = {
|
||||
renice = 10;
|
||||
};
|
||||
custom = {
|
||||
start = "${lib.getExe pkgs.libnotify} 'GameMode started'";
|
||||
end = "${lib.getExe pkgs.libnotify} 'GameMode stopped'";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
users.groups.gamemode.members = config.users.normalUsers;
|
||||
};
|
||||
}
|
16
profiles/gaming/prismlauncher.nix
Normal file
16
profiles/gaming/prismlauncher.nix
Normal file
|
@ -0,0 +1,16 @@
|
|||
{
|
||||
config,
|
||||
lib,
|
||||
pkgs,
|
||||
...
|
||||
}:
|
||||
let
|
||||
cfg = config.profiles.gaming;
|
||||
in
|
||||
{
|
||||
config = lib.mkIf cfg.enable {
|
||||
environment.systemPackages = [
|
||||
pkgs.prismlauncher
|
||||
];
|
||||
};
|
||||
}
|
20
profiles/gaming/steam.nix
Normal file
20
profiles/gaming/steam.nix
Normal file
|
@ -0,0 +1,20 @@
|
|||
{
|
||||
config,
|
||||
lib,
|
||||
...
|
||||
}:
|
||||
let
|
||||
cfg = config.profiles.gaming;
|
||||
in
|
||||
{
|
||||
config = lib.mkIf cfg.enable {
|
||||
programs.steam = {
|
||||
enable = true;
|
||||
extest.enable = true;
|
||||
protontricks.enable = true;
|
||||
dedicatedServer.openFirewall = true;
|
||||
remotePlay.openFirewall = true;
|
||||
localNetworkGameTransfers.openFirewall = true;
|
||||
};
|
||||
};
|
||||
}
|
18
profiles/piracy/default.nix
Normal file
18
profiles/piracy/default.nix
Normal file
|
@ -0,0 +1,18 @@
|
|||
{ config, lib, ... }:
|
||||
let
|
||||
cfg = config.profiles.piracy;
|
||||
in
|
||||
{
|
||||
options.profiles.piracy = {
|
||||
enable = lib.mkEnableOption "piracy";
|
||||
};
|
||||
|
||||
config = lib.mkIf cfg.enable {
|
||||
assertions = [
|
||||
{
|
||||
assertion = config.profiles.desktop.enable;
|
||||
message = "The piracy profile depends on the desktop profile.";
|
||||
}
|
||||
];
|
||||
};
|
||||
}
|
17
profiles/piracy/mullvad.nix
Normal file
17
profiles/piracy/mullvad.nix
Normal file
|
@ -0,0 +1,17 @@
|
|||
{
|
||||
config,
|
||||
lib,
|
||||
pkgs,
|
||||
...
|
||||
}:
|
||||
let
|
||||
cfg = config.profiles.gaming;
|
||||
in
|
||||
{
|
||||
config = lib.mkIf cfg.enable {
|
||||
services.mullvad-vpn = {
|
||||
enable = true;
|
||||
package = pkgs.mullvad-vpn;
|
||||
};
|
||||
};
|
||||
}
|
16
profiles/piracy/qbittorrent.nix
Normal file
16
profiles/piracy/qbittorrent.nix
Normal file
|
@ -0,0 +1,16 @@
|
|||
{
|
||||
config,
|
||||
lib,
|
||||
pkgs,
|
||||
...
|
||||
}:
|
||||
let
|
||||
cfg = config.profiles.gaming;
|
||||
in
|
||||
{
|
||||
config = lib.mkIf cfg.enable {
|
||||
environment.systemPackages = [
|
||||
pkgs.qbittorrent
|
||||
];
|
||||
};
|
||||
}
|
18
profiles/productivity/default.nix
Normal file
18
profiles/productivity/default.nix
Normal file
|
@ -0,0 +1,18 @@
|
|||
{ config, lib, ... }:
|
||||
let
|
||||
cfg = config.profiles.productivity;
|
||||
in
|
||||
{
|
||||
options.profiles.productivity = {
|
||||
enable = lib.mkEnableOption "productivity";
|
||||
};
|
||||
|
||||
config = lib.mkIf cfg.enable {
|
||||
assertions = [
|
||||
{
|
||||
assertion = config.profiles.desktop.enable;
|
||||
message = "The productivity profile depends on the desktop profile.";
|
||||
}
|
||||
];
|
||||
};
|
||||
}
|
16
profiles/productivity/gimp.nix
Normal file
16
profiles/productivity/gimp.nix
Normal file
|
@ -0,0 +1,16 @@
|
|||
{
|
||||
config,
|
||||
lib,
|
||||
pkgs,
|
||||
...
|
||||
}:
|
||||
let
|
||||
cfg = config.profiles.productivity;
|
||||
in
|
||||
{
|
||||
config = lib.mkIf cfg.enable {
|
||||
environment.systemPackages = [
|
||||
pkgs.gimp3-with-plugins
|
||||
];
|
||||
};
|
||||
}
|
16
profiles/productivity/inkscape.nix
Normal file
16
profiles/productivity/inkscape.nix
Normal file
|
@ -0,0 +1,16 @@
|
|||
{
|
||||
config,
|
||||
lib,
|
||||
pkgs,
|
||||
...
|
||||
}:
|
||||
let
|
||||
cfg = config.profiles.productivity;
|
||||
in
|
||||
{
|
||||
config = lib.mkIf cfg.enable {
|
||||
environment.systemPackages = [
|
||||
pkgs.inkscape-with-extensions
|
||||
];
|
||||
};
|
||||
}
|
16
profiles/productivity/libreoffice.nix
Normal file
16
profiles/productivity/libreoffice.nix
Normal file
|
@ -0,0 +1,16 @@
|
|||
{
|
||||
config,
|
||||
lib,
|
||||
pkgs,
|
||||
...
|
||||
}:
|
||||
let
|
||||
cfg = config.profiles.productivity;
|
||||
in
|
||||
{
|
||||
config = lib.mkIf cfg.enable {
|
||||
environment.systemPackages = [
|
||||
pkgs.libreoffice-fresh
|
||||
];
|
||||
};
|
||||
}
|
3
profiles/server/default.nix
Normal file
3
profiles/server/default.nix
Normal file
|
@ -0,0 +1,3 @@
|
|||
{
|
||||
|
||||
}
|
48
profiles/server/grafana.nix
Normal file
48
profiles/server/grafana.nix
Normal file
|
@ -0,0 +1,48 @@
|
|||
# {config, ...}: let
|
||||
# virtualHostName = "grafana.helveticanonstandard.net";
|
||||
# in {
|
||||
# services.grafana = {
|
||||
# enable = true;
|
||||
#
|
||||
# settings = {
|
||||
# server = {
|
||||
# domain = virtualHostName;
|
||||
# http_port = 9010;
|
||||
# http_addr = "127.0.0.1";
|
||||
# root_url = "http://192.168.1.10:8010"; # TODO
|
||||
# protocol = "http";
|
||||
# };
|
||||
#
|
||||
# analytics.reporting_enabled = false;
|
||||
# };
|
||||
#
|
||||
# provision = {
|
||||
# enable = true;
|
||||
# datasources.settings.datasources = [
|
||||
# {
|
||||
# name = "Prometheus";
|
||||
# type = "prometheus";
|
||||
# access = "proxy";
|
||||
# url = "http://127.0.0.1:${builtins.toString config.services.prometheus.port}";
|
||||
# }
|
||||
# {
|
||||
# name = "Loki";
|
||||
# type = "loki";
|
||||
# access = "proxy";
|
||||
# url = "http://127.0.0.1:${builtins.toString config.services.loki.configuration.server.http_listen_port}";
|
||||
# }
|
||||
# ];
|
||||
# };
|
||||
# };
|
||||
#
|
||||
# # services.nginx.virtualHosts.${virtualHostName} = {
|
||||
# # locations."/" = {
|
||||
# # proxyPass = let
|
||||
# # host = config.services.grafana.settings.server.http_addr;
|
||||
# # port = builtins.toString config.services.grafana.settings.server.http_port;
|
||||
# # in "http://${host}:${port}";
|
||||
# # proxyWebsockets = true;
|
||||
# # };
|
||||
# # };
|
||||
# }
|
||||
{ }
|
79
profiles/server/loki.nix
Normal file
79
profiles/server/loki.nix
Normal file
|
@ -0,0 +1,79 @@
|
|||
# {config, ...}: {
|
||||
# services.loki = {
|
||||
# enable = true;
|
||||
# configuration = {
|
||||
# server.http_listen_port = 3030;
|
||||
# auth_enabled = false;
|
||||
#
|
||||
# ingester = {
|
||||
# lifecycler = {
|
||||
# address = "127.0.0.1";
|
||||
# ring = {
|
||||
# kvstore = {
|
||||
# store = "inmemory";
|
||||
# };
|
||||
# replication_factor = 1;
|
||||
# };
|
||||
# };
|
||||
# chunk_idle_period = "1h";
|
||||
# max_chunk_age = "1h";
|
||||
# chunk_target_size = 999999;
|
||||
# chunk_retain_period = "30s";
|
||||
# max_transfer_retries = 0;
|
||||
# };
|
||||
#
|
||||
# schema_config = {
|
||||
# configs = [
|
||||
# {
|
||||
# from = "2022-06-06"; #TODO
|
||||
# store = "tsdb";
|
||||
# object_store = "filesystem";
|
||||
# schema = "v13";
|
||||
# index = {
|
||||
# prefix = "index_";
|
||||
# period = "24h";
|
||||
# };
|
||||
# }
|
||||
# ];
|
||||
# };
|
||||
#
|
||||
# storage_config = {
|
||||
# tsdb_shipper = {
|
||||
# active_index_directory = "${config.services.loki.dataDir}/tsdb-shipper-active";
|
||||
# cache_location = "${config.services.loki.dataDir}/tsdb-shipper-cache";
|
||||
# cache_ttl = "24h";
|
||||
# shared_store = "filesystem";
|
||||
# };
|
||||
#
|
||||
# filesystem = {
|
||||
# directory = "/var/lib/loki/chunks";
|
||||
# };
|
||||
# };
|
||||
#
|
||||
# limits_config = {
|
||||
# reject_old_samples = true;
|
||||
# reject_old_samples_max_age = "168h";
|
||||
# };
|
||||
#
|
||||
# chunk_store_config = {
|
||||
# max_look_back_period = "0s";
|
||||
# };
|
||||
#
|
||||
# table_manager = {
|
||||
# retention_deletes_enabled = false;
|
||||
# retention_period = "0s";
|
||||
# };
|
||||
#
|
||||
# compactor = {
|
||||
# working_directory = config.services.loki.dataDir;
|
||||
# shared_store = "filesystem";
|
||||
# compactor_ring = {
|
||||
# kvstore = {
|
||||
# store = "inmemory";
|
||||
# };
|
||||
# };
|
||||
# };
|
||||
# };
|
||||
# };
|
||||
# }
|
||||
{ }
|
13
profiles/server/networking.nix
Normal file
13
profiles/server/networking.nix
Normal file
|
@ -0,0 +1,13 @@
|
|||
{
|
||||
config,
|
||||
lib,
|
||||
...
|
||||
}:
|
||||
let
|
||||
cfg = config.profiles.server;
|
||||
in
|
||||
{
|
||||
config = lib.mkIf cfg.enable {
|
||||
networking.useNetworkd = true;
|
||||
};
|
||||
}
|
30
profiles/server/prometheus.nix
Normal file
30
profiles/server/prometheus.nix
Normal file
|
@ -0,0 +1,30 @@
|
|||
# {config, ...}: {
|
||||
# services.prometheus = {
|
||||
# enable = true;
|
||||
# port = 3020;
|
||||
#
|
||||
# exporters = {
|
||||
# node = {
|
||||
# enable = true;
|
||||
# listenAddress = "127.0.0.1";
|
||||
# port = 3021;
|
||||
# enabledCollectors = ["systemd"];
|
||||
# };
|
||||
# };
|
||||
#
|
||||
# scrapeConfigs = [
|
||||
# {
|
||||
# job_name = "nodes";
|
||||
# static_configs = [
|
||||
# {
|
||||
# targets = let
|
||||
# host = config.services.prometheus.exporters.node.listenAddress;
|
||||
# port = builtins.toString config.services.prometheus.exporters.node.port;
|
||||
# in ["${host}:${port}"];
|
||||
# }
|
||||
# ];
|
||||
# }
|
||||
# ];
|
||||
# };
|
||||
# }
|
||||
{ }
|
42
profiles/server/promtail.nix
Normal file
42
profiles/server/promtail.nix
Normal file
|
@ -0,0 +1,42 @@
|
|||
# {config, ...}: {
|
||||
# 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 = "pihole";
|
||||
# };
|
||||
# };
|
||||
# relabel_configs = [
|
||||
# {
|
||||
# source_labels = ["__journal__systemd_unit"];
|
||||
# target_label = "unit";
|
||||
# }
|
||||
# ];
|
||||
# }
|
||||
# ];
|
||||
# };
|
||||
# };
|
||||
# }
|
||||
{ }
|
13
profiles/server/time.nix
Normal file
13
profiles/server/time.nix
Normal file
|
@ -0,0 +1,13 @@
|
|||
{
|
||||
config,
|
||||
lib,
|
||||
...
|
||||
}:
|
||||
let
|
||||
cfg = config.profiles.server;
|
||||
in
|
||||
{
|
||||
config = lib.mkIf cfg.enable {
|
||||
time.timeZone = "UTC";
|
||||
};
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue