nixos-config/machines/cherry/configuration.nix

161 lines
3.9 KiB
Nix
Raw Normal View History

2024-08-29 03:26:04 +02:00
{
config,
pkgs,
lib,
...
}:
2023-12-17 13:06:57 +01:00
{
imports = [
2024-03-03 14:56:49 +01:00
./hardware-configuration
2023-12-17 13:06:57 +01:00
./syncthing.nix
2024-06-07 09:34:23 +02:00
./network-tinc.nix
2024-06-11 13:44:14 +02:00
./network-tinc_retiolum.nix
2024-08-07 08:14:09 +02:00
./network-wireguard-wg0.nix
2024-08-17 19:00:59 +02:00
./network-wireguard-wg1.nix
2023-12-17 13:06:57 +01:00
2023-12-28 16:40:53 +01:00
./37c3.nix
2024-08-30 12:34:57 +02:00
./topology.nix
2023-12-28 16:40:53 +01:00
2023-12-17 13:06:57 +01:00
];
2024-09-22 01:20:03 +02:00
#time.timeZone = lib.mkForce "Asia/Bangkok";
time.timeZone = lib.mkForce "Asia/Tokyo";
2023-12-17 16:17:28 +01:00
2024-06-19 13:19:55 +02:00
#clan.core.facts.services =
2024-05-31 21:02:22 +02:00
# let
# promptKey = key:
# {
# ${key} = {
# secret."${key}" = { };
# generator = {
# prompt = key;
# path = with pkgs; [ gnused ];
# script = ''
# echo "$prompt_value" | sed -n '1 p' > $secrets/${key}
# '';
# };
# };
# };
# in
# (promptKey "pushover.user_key") //
# (promptKey "pushover.api_key");
2024-08-11 14:46:03 +02:00
components.virtualisation.enable = true;
2023-12-17 13:06:57 +01:00
components.gui.enable = true;
components.mainUser.enable = true;
components.media.enable = true;
components.media.tts-client.enable = false;
components.network.enable = true;
components.network.wifi.enable = true;
components.terminal.enable = true;
components.monitor.enable = true;
components.monitor.opentelemetry.exporter.endpoint = "10.100.0.1:4317"; # orbi
2024-05-17 22:21:14 +02:00
#components.monitor.opentelemetry.exporter.debug = "logs";
2024-05-24 10:54:21 +02:00
home-manager.users.mainUser.home.sessionPath = [ "$HOME/.timewarrior/scripts" ];
# todo: move to homemanager
2024-05-24 10:54:21 +02:00
home-manager.users.mainUser.bugwarrior.config = {
2023-12-17 13:06:57 +01:00
general = {
2024-08-29 03:26:04 +02:00
targets = [
"terranix"
"my_github"
"logseq"
2024-09-28 12:25:53 +02:00
#"trello" # todo make it work
2024-08-29 03:26:04 +02:00
];
2023-12-17 13:06:57 +01:00
log_level = "INFO";
static_fields = [ "priority" ];
merge_annotations = false;
};
2024-09-28 12:25:53 +02:00
trello = {
service = "trello";
token = "@oracle:eval:${pkgs.pass}/bin/pass show bugwarrior/trello/token";
add_tags = "bugwarrior_pull,trello";
};
logseq = {
service = "logseq";
add_tags = "bugwarrior_pull,logseq";
description_template = "{{logseqtitle}}";
2023-12-17 13:06:57 +01:00
};
terranix = {
service = "github";
login = "mrVanDalo";
token = "@oracle:eval:${pkgs.pass}/bin/pass show development/github/mrVanDalo/bugwarriorAccessToken";
2023-12-17 13:06:57 +01:00
username = "mrVanDalo";
default_priority = "";
description_template = "{{githubtitle}} {{githuburl}}";
add_tags = "bugwarrior_pull,github";
2023-12-17 13:06:57 +01:00
project_template = "terranix";
involved_issues = true;
query = "org:terranix is:open";
include_user_issues = false;
include_user_repos = false;
};
2024-09-27 08:15:03 +02:00
# todo: add gmail
# todo: add trello
2023-12-17 13:06:57 +01:00
my_github = {
service = "github";
login = "mrVanDalo";
token = "@oracle:eval:${pkgs.pass}/bin/pass development/github/mrVanDalo/bugwarriorAccessToken";
username = "mrVanDalo";
description_template = "{{githubtitle}} {{githuburl}}";
add_tags = "bugwarrior_pull,github";
2023-12-17 13:06:57 +01:00
include_user_issues = true;
include_user_repos = true;
2024-08-29 03:26:04 +02:00
exclude_repos = [
"azubi"
"csv-to-qif"
"stepp0r"
"nix-shell-mix"
2024-08-29 03:26:04 +02:00
];
2023-12-17 13:06:57 +01:00
};
};
users.users.mainUser.extraGroups = [ "pipewire" ];
services.nginx.enable = true;
networking.hostName = "cherry";
# make sure battery is charged in a way to live for a long time
services.power-profiles-daemon.enable = false;
services.tlp = {
enable = true;
settings = {
CPU_BOOST_ON_BAT = 0;
CPU_SCALING_GOVERNOR_ON_BATTERY = "powersave";
START_CHARGE_THRESH_BAT0 = 30;
STOP_CHARGE_THRESH_BAT0 = 85;
RUNTIME_PM_ON_BAT = "auto";
};
};
security.wrappers = {
pmount = {
source = "${pkgs.pmount}/bin/pmount";
setuid = true;
owner = "root";
group = "root";
};
pumount = {
source = "${pkgs.pmount}/bin/pumount";
setuid = true;
owner = "root";
group = "root";
};
};
services.printing.enable = true;
# for congress and streaming
2024-06-26 03:00:17 +02:00
hardware.graphics.enable = true;
2023-12-17 13:06:57 +01:00
system.stateVersion = "23.11";
}