diff options
| author | Kyren223 <contact@kyren.codes> | 2026-06-09 00:33:51 +0300 |
|---|---|---|
| committer | Kyren223 <contact@kyren.codes> | 2026-06-09 00:33:51 +0300 |
| commit | 85f7f33f2f0c8946ff9d76e51e8684468ecb6801 (patch) | |
| tree | a63a5480fe13672340c746f62f23a4a1db8dbe43 /modules | |
| parent | 0a4ee62cb14c215bba0dec11e16dac496b9e286e (diff) | |
removed most of the nix related files
Diffstat (limited to 'modules')
| -rw-r--r-- | modules/apps.nix | 59 | ||||
| -rw-r--r-- | modules/desktop.nix | 28 | ||||
| -rw-r--r-- | modules/development.nix | 152 | ||||
| -rw-r--r-- | modules/eko-config.alloy | 64 | ||||
| -rw-r--r-- | modules/eko-prometheus.yml | 6 | ||||
| -rw-r--r-- | modules/gaming.nix | 43 | ||||
| -rw-r--r-- | modules/laptop.nix | 21 | ||||
| -rw-r--r-- | modules/secrets.nix | 8 | ||||
| -rw-r--r-- | modules/secrets.yaml | 17 |
9 files changed, 6 insertions, 392 deletions
diff --git a/modules/apps.nix b/modules/apps.nix index b1c932e..2462112 100644 --- a/modules/apps.nix +++ b/modules/apps.nix @@ -2,7 +2,6 @@ pkgs, lib, config, - inputs, ... }: { @@ -17,69 +16,23 @@ programs.kdeconnect.enable = true; # Opens TCP/UDP ports (does not when it's a pkg) environment.systemPackages = with pkgs; [ - # System - glib-networking - openssl - glibcLocales - libnotify - wl-clipboard - jdk nerd-fonts.jetbrains-mono - libratbag # Mouse software (GHUB replacement) - piper # ^ GUI frontend + pipeline # Youtube desktop app # Utility protonvpn-gui - (python312.withPackages (pypkgs: [ - pypkgs.matplotlib - pypkgs.pandas - pypkgs.pygithub - pypkgs.pipx - ])) + cloudflare-warp + kdePackages.korganizer kdePackages.kaddressbook + syncthingtray - cloudflare-warp - gnome-clocks - pipeline # Youtube desktop app - kopia-ui - rclone-ui - binsider - spotify - inotify-tools - _010editor - warpd - wl-kbptr - nnd # Terminal debugger for linux - cppcheck - smartmontools # For ZFS monitoring apparently - # Communication - wasistlos # Whatsapp - inputs.eko.packages."${system}".eko + gnome-clocks - # CLI - wakatime-cli - watchexec - rar - dig - minisign - libisoburn - mprocs - imagemagick - ghostscript # for imagemagick to support pdf files - xxd - duf - tldr - bottom - tectonic - mermaid-cli - kondo # Cleans build caches - kopia - rclone - usbutils + spotify ]; # VPN for Vault Hunters to avoid connection issues diff --git a/modules/desktop.nix b/modules/desktop.nix deleted file mode 100644 index 899d5db..0000000 --- a/modules/desktop.nix +++ /dev/null @@ -1,28 +0,0 @@ -{ pkgs, ... }: -{ - - environment.systemPackages = with pkgs; [ - openrgb-with-all-plugins - phoronix-test-suite - ]; - - # Automaticaly mount C drive - fileSystems."/mnt/c" = { - device = "/dev/nvme1n1p4"; - fsType = "ntfs-3g"; - options = [ - "rw" - "noatime" - "uid=1000" - "nofail" - ]; - }; - - # Automatically mount E drive - # fileSystems."/mnt/e" = { - # device = "/dev/sda2"; - # fsType = "ntfs-3g"; - # options = [ "rw" "noatime" "uid=1000" "nofail" ]; - # }; - -} diff --git a/modules/development.nix b/modules/development.nix deleted file mode 100644 index 8520fc1..0000000 --- a/modules/development.nix +++ /dev/null @@ -1,152 +0,0 @@ -{ pkgs, lib, config, ... }: { - - options.development.enable = lib.mkOption { - type = lib.types.bool; - default = false; - description = "enables development"; - }; - - config = lib.mkIf config.development.enable { - - environment.systemPackages = with pkgs; [ - - # Tools - golangci-lint - shellcheck - beautysh # shell formatter - rustup - goose - sqlc - maven - gradle - kotlin - gomodifytags - go-tools # staticcheck - gosec - devtoolbox - busybox # A bunch of utils like lsof and fuser - libllvm - universal-ctags - valgrind - - prometheus - grafana-loki - grafana-alloy - pyroscope - ]; - - # Grafana for eko - services.grafana.enable = true; - services.grafana.settings.server.http_port = 3030; - services.grafana.settings.smtp.enabled = true; - services.grafana.settings.smtp = { - host = "smtp.example.com:587"; - user = "your@user.com"; - password = "super-secret"; # Consider using a file for secret - skip_verify = true; - from_address = "your@user.com"; - from_name = "Grafana"; - startTLS_policy = "OpportunisticStartTLS"; - }; - - systemd.services.grafana = { - serviceConfig = { - ProtectHome = lib.mkForce false; - ProtectSystem = lib.mkForce false; - PrivateTmp = lib.mkForce false; - ReadWritePaths = [ "/home/kyren/projects/eko" ]; - }; - }; - - # # Allow grafana to access DB - # fileSystems."/var/lib/grafana/eko" = { - # device = "/home/kyren/projects/eko"; - # options = [ "bind" "ro" ]; - # }; - - # Prometheus for eko - services.prometheus.enable = true; - services.prometheus.configText = builtins.readFile ./eko-prometheus.yml; - - # Alloy service for eko - systemd.services.alloy = { - description = "Alloy"; - - wants = [ "network-online.target" ]; - after = [ "network-online.target" ]; - wantedBy = [ "multi-user.target" ]; - - reloadTriggers = lib.mapAttrsToList (_: v: v.source or null) ( - lib.filterAttrs (n: _: lib.hasPrefix "alloy/" n && lib.hasSuffix ".alloy" n) config.environment.etc - ); - - serviceConfig = { - Restart = "always"; - RestartSec = "2s"; - - User = "root"; # TODO: make these not root? - Group = "root"; - - SupplementaryGroups = [ - # allow to read the systemd journal for loki log forwarding - "systemd-journal" - ]; - - ConfigurationDirectory = "alloy"; - StateDirectory = "alloy"; - WorkingDirectory = "%S/alloy"; - Type = "simple"; - - ExecStart = "${lib.getExe pkgs.grafana-alloy} run /etc/alloy/"; - ExecReload = "${pkgs.coreutils}/bin/kill -SIGHUP $MAINPID"; - }; - }; - - environment.etc = { - "alloy/eko-config.alloy".text = builtins.readFile ./eko-config.alloy; - }; - - # Loki service for eko - services.loki.enable = true; - services.loki.configuration = { - auth_enabled = false; - - server = { - http_listen_port = 3100; - }; - - common = { - ring = { - instance_addr = "127.0.0.1"; - kvstore = { - store = "inmemory"; - }; - }; - replication_factor = 1; - path_prefix = "/var/lib/loki"; - }; - - schema_config = { - configs = [ - { - from = "2020-05-15"; - store = "tsdb"; - object_store = "filesystem"; - schema = "v13"; - index = { - prefix = "index_"; - period = "24h"; - }; - } - ]; - }; - - storage_config = { - filesystem = { - directory = "/var/lib/loki/chunks"; - }; - }; - }; - - }; -} diff --git a/modules/eko-config.alloy b/modules/eko-config.alloy deleted file mode 100644 index d9c2e23..0000000 --- a/modules/eko-config.alloy +++ /dev/null @@ -1,64 +0,0 @@ -local.file_match "eko_logs" { - path_targets = [ - { __path__ = "/home/kyren/projects/eko/logs/*.log" }, - ] - sync_period = "1s" -} - -loki.source.file "eko_tail" { - targets = local.file_match.eko_logs.targets - forward_to = [loki.write.eko.receiver] - tail_from_end = true -} - -loki.write "eko" { - endpoint { - url = "http://localhost:3100/loki/api/v1/push" - } - external_labels = { app = "eko-server" } -} - -pyroscope.write "write_job_name" { - endpoint { - url = "http://localhost:4040" - } -} - -pyroscope.scrape "scrape_job_name" { - targets = [{"__address__" = "localhost:4040", "service_name" = "eko"}] - forward_to = [pyroscope.write.write_job_name.receiver] - - profiling_config { - profile.process_cpu { - enabled = true - } - - profile.godeltaprof_memory { - enabled = true - } - - profile.memory { // disable memory, use godeltaprof_memory instead - enabled = false - } - - profile.godeltaprof_mutex { - enabled = true - } - - profile.mutex { // disable mutex, use godeltaprof_mutex instead - enabled = false - } - - profile.godeltaprof_block { - enabled = true - } - - profile.block { // disable block, use godeltaprof_block instead - enabled = false - } - - profile.goroutine { - enabled = true - } - } -} diff --git a/modules/eko-prometheus.yml b/modules/eko-prometheus.yml deleted file mode 100644 index ff2b036..0000000 --- a/modules/eko-prometheus.yml +++ /dev/null @@ -1,6 +0,0 @@ -scrape_configs: - - job_name: eko - scrape_interval: 3s - static_configs: - - targets: - - localhost:2112 diff --git a/modules/gaming.nix b/modules/gaming.nix deleted file mode 100644 index 15cdc76..0000000 --- a/modules/gaming.nix +++ /dev/null @@ -1,43 +0,0 @@ -{ pkgs, pkgs-mesa-pin, lib, config, ... }: { - - options.gaming.enable = lib.mkOption { - type = lib.types.bool; - default = false; - description = "enables gaming"; - }; - - config = lib.mkIf config.gaming.enable { - - programs.steam = { - enable = true; - remotePlay.openFirewall = true; # Open ports in the firewall for Steam Remote Play - dedicatedServer.openFirewall = true; # Open ports in the firewall for Source Dedicated Server - localNetworkGameTransfers.openFirewall = true; # Open ports in the firewall for Steam Local Network Game Transfers - }; - - environment.systemPackages = with pkgs; [ - r2modman # For modded valheim - prismlauncher # mc - drawio # For VH - - (minecraft.overrideAttrs (finalAttrs: previousAttrs: { - meta.lib.broken = false; - })) - - kdePackages.kmines # Minesweeper for fun lol - kdePackages.kpat # Solitaire - # btw missing the card/brick thing with weird symbols, not sure what that game was called - - legendary-gl # Epic games launcher CLI - heroic # GUI for legendary (and some other stores) - wineWow64Packages.stagingFull # For non-steam games support, for GE-wine - - osu-lazer-bin - - lutris - ] ++ [ - pkgs-mesa-pin.mesa - ]; - - }; -} diff --git a/modules/laptop.nix b/modules/laptop.nix deleted file mode 100644 index c5e0409..0000000 --- a/modules/laptop.nix +++ /dev/null @@ -1,21 +0,0 @@ -{ ... }: { - - # battery levels notifier - systemd.timers."battery-notifier" = { - wantedBy = [ "timers.target" ]; - timerConfig = { - OnBootSec = "3m"; - OnUnitActiveSec = "3m"; - Unit = "battery-notifier.service"; - }; - }; - - systemd.services."battery-notifier" = { - script = "$HOME/scripts/battery_notifier.sh"; - serviceConfig = { - Type = "oneshot"; - User = "kyren"; - }; - }; - -} diff --git a/modules/secrets.nix b/modules/secrets.nix deleted file mode 100644 index 7cb1e22..0000000 --- a/modules/secrets.nix +++ /dev/null @@ -1,8 +0,0 @@ -{ ... }: { - - sops = { - defaultSopsFile = ./secrets.yaml; - age.sshKeyPaths = [ "/home/kyren/.ssh/sops_id_ed25519" ]; - }; - -} diff --git a/modules/secrets.yaml b/modules/secrets.yaml deleted file mode 100644 index b3d2e72..0000000 --- a/modules/secrets.yaml +++ /dev/null @@ -1,17 +0,0 @@ -gitea-sync-token: ENC[AES256_GCM,data:mG2lOIqSBy+3O/P2AGACQOc/QdORHwsnJmGcdKZo6i5Vsqf6lLVdMA==,iv:2FgXjSIuL+UPkWgGx2PXJ/kl2FFCm+1HfgDJVXeT/jU=,tag:sjRK8x1ktkEgls8jk9EeRQ==,type:str] -github-mirror-token: ENC[AES256_GCM,data:VmTpqOCR71napTGTs2aZDDi8BkT/EhPo7jjijCO9/7PozQDnTzvcY95lZsHSUV9d8jERxqYgkNLxcrxJh+auiNnlFnoZUfGWli6IU9GE/CsVC0JlqAIGv5zMa0gz,iv:7RvW3HOsHkVC1oW4RrTNqzGf8IPEjhwH/8VPZTEIICQ=,tag:gcDsLhrn9OKdCwZCHqTZrQ==,type:str] -sops: - age: - - recipient: age1zn3jpeqducllfxlm2l57pq2kqzkg23q8jgu23lyzvfapgnkf8gmqmtchfx - enc: | - -----BEGIN AGE ENCRYPTED FILE----- - YWdlLWVuY3J5cHRpb24ub3JnL3YxCi0+IFgyNTUxOSBIQUkrREw0blJkeExpWVkr - ZndwbG1xSDllODM3OHNMYUFrKy92VzliTWlRCjRIQ1lpejFKM2p0QUU1OGY3T3hu - NkdkTU9tTHJNaUY3OWtCalFYQTFLN2cKLS0tIEZhU0dIenpHTiszUVZGWkIzTkFO - NEZVQ0JJMTMydUZkY3RKekQwbUEyb1EKcOQ15upVDjgGb4CzzGKIjATxCCxJJKzQ - DkkVZBZycAhVl3ChdsmulkserdvnLgwhSfGs82bsXS8lD0hsdqctCA== - -----END AGE ENCRYPTED FILE----- - lastmodified: "2025-06-05T09:53:12Z" - mac: ENC[AES256_GCM,data:nL72VUNUF7sBWbW64EegrY/Zp+LB2FPYDmWSANv8ShIJMmMY3xypFTtQr082/U2zBivAA+0HoRmUHdlaLv5OF7kVN4xuGq78EzOw55TNAa6yNqlNCbmozQfcOSfkkHsDWCVSBnzzHCmujDzDSseq3hDl4B9PB10WCPhe5+2HQc8=,iv:2zoPZjpLqxBkS4nsg/atFPXQERjk+LHr9MjE3UvcrBo=,tag:kE+9iG5ugefA7VVMbKFhJA==,type:str] - unencrypted_suffix: _unencrypted - version: 3.10.2 |
