Nixfiles! :3
0

Configure Feed

Select the types of activity you want to include in your feed.

Doing something crazy I may regret.

MLC Bloeiman (Jul 11, 2026, 9:31 PM +0200) 3834ae0d 9a95c4ae

+96 -5
+1 -4
home/cli.nix
··· 25 25 26 26 nix.extraOptions = "experimental-features = nix-command flakes"; 27 27 28 - programs.yazi = { 29 - enable = true; 30 - shellWrapperName = "y"; 31 - }; 28 + services.podman.enable = true; 32 29 33 30 # Direnv stuff 34 31 programs.direnv = {
+95 -1
home/host-specific/Cubchoo.nix
··· 1 - { } 1 + { pkgs, config, ... }: { 2 + services.podman = { 3 + networks = { 4 + "server-net" = { 5 + autoStart = true; 6 + }; 7 + }; 8 + containers = { 9 + "main-database" = { 10 + autoStart = true; 11 + networkAlias = [ 12 + "main-database" 13 + "db" 14 + ]; 15 + network = "server-net"; 16 + image = "postgres:18-alpine"; 17 + environment = { 18 + "POSTGRES_HOST_AUTH_METHOD" = "trust"; 19 + }; 20 + volumes = [ 21 + "${config.home.homeDirectory}/database:/var/lib/postgresql:Z" 22 + "${config.home.homeDirectory}/.config/services/main-database/postgresql.conf:/etc/postgresql/postgresql.conf:ro" 23 + ]; 24 + exec = "postgres -c 'config_file=/etc/postgresql/postgresql.conf'"; 25 + }; 26 + }; 27 + 28 + }; 29 + xdg.configFile."services/main-database/postgresql.conf".text = '' 30 + # Connectivity 31 + max_connections = 200 32 + superuser_reserved_connections = 3 33 + listen_addresses='*' 34 + 35 + # Memory Settings 36 + shared_buffers = '4096 MB' 37 + work_mem = '32 MB' 38 + maintenance_work_mem = '420 MB' 39 + huge_pages = off 40 + effective_cache_size = '11 GB' 41 + effective_io_concurrency = 1 # concurrent IO only really activated if OS supports posix_fadvise function 42 + random_page_cost = 4 # speed of random disk access relative to sequential access (1.0) 43 + 44 + # Monitoring 45 + shared_preload_libraries = 'pg_stat_statements' # per statement resource usage stats 46 + track_io_timing=on # measure exact block IO times 47 + track_functions=pl # track execution times of pl-language procedures if any 48 + 49 + # Replication 50 + wal_level = replica # consider using at least 'replica' 51 + max_wal_senders = 10 52 + synchronous_commit = on 53 + 54 + # Checkpointing: 55 + checkpoint_timeout = '15 min' 56 + checkpoint_completion_target = 0.9 57 + max_wal_size = '1024 MB' 58 + min_wal_size = '512 MB' 59 + 60 + # WAL archiving 61 + archive_mode = on # having it on enables activating P.I.T.R. at a later time without restart› 62 + archive_command = '/bin/true' # not doing anything yet with WAL-s 63 + 64 + 65 + # WAL writing 66 + wal_compression = on 67 + wal_buffers = -1 # auto-tuned by Postgres till maximum of segment size (16MB by default) 68 + wal_writer_delay = 200ms 69 + wal_writer_flush_after = 1MB 70 + wal_keep_size = '3650 MB' 71 + 72 + 73 + # Background writer 74 + bgwriter_delay = 200ms 75 + bgwriter_lru_maxpages = 100 76 + bgwriter_lru_multiplier = 2.0 77 + bgwriter_flush_after = 0 78 + 79 + # Parallel queries: 80 + max_worker_processes = 8 81 + max_parallel_workers_per_gather = 4 82 + max_parallel_maintenance_workers = 4 83 + max_parallel_workers = 8 84 + parallel_leader_participation = on 85 + 86 + # Advanced features 87 + enable_partitionwise_join = on 88 + enable_partitionwise_aggregate = on 89 + jit = on 90 + max_slot_wal_keep_size = '1000 MB' 91 + track_wal_io_timing = on 92 + maintenance_io_concurrency = 1 93 + wal_recycle = on 94 + ''; 95 + }