-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathconfiguration.nix.old
More file actions
2507 lines (2365 loc) · 70.1 KB
/
Copy pathconfiguration.nix.old
File metadata and controls
2507 lines (2365 loc) · 70.1 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
#last | grep "still logged in"# Edit this configuration file to define what should be installed o
# your system. Help is available in the configuration.nix(5) man page
# and in the NixOS manual (accessible by running ‘nixos-help’).
{ config, pkgs, inputs, lib, ... }:
#nixpkgs.overlays = [
#(import /etc/nixos/waydroid-overlay.nix)
#];
#nixpkgs.overlays = [(final: prev: {
# jellyfin-ffmpeg = final.callPackage ../../pkgs/jellyfin-ffmpeg {};
#})];
#
#hardware.bluetooth.enable = true; # enables support for Bluetooth
#hardware.bluetooth.powerOnBoot = true; # powers up the default Bluetooth controller on boot
#sudo nixos-rebuild switch
#environment.systemPackages = with pkgs; [
# Other packages...
# gparted
#];
#services.bluez = {
# enable = true;
#};
#
#environment.variables = {
#letw
# raspberry_pi_ip = $(tailscale status | awk '$2 == "raspberrypi" {print $1}');
#};
/* let dnskeys = pkgs.writeText "dnskeys.conf"
''
'';
pebbleConfig = pkgs.writeText "pebble.json" (builtins.toJSON {
pebble = {
listenAddress = "0.0.0.0:14000";
managementListenAddress = "0.0.0.0:15000";
certificate = "/etc/letsencrypt/live/demos123.com/fullchain.pem";
privateKey = "/etc/letsencrypt/live/demos123.com/privkey.pem";
# privateKey = "/etc/nixos/certs/key.pem";
# certificate = "/etc/nixos/certs/cert.pem";
# certificate = "${pkgs.pebble.src}/test/certs/localhost/cert.pem";
# privateKey = "${pkgs.pebble.src}/test/certs/localhost/key.pem";
httpPort = 5002;
tlsPort = 5001;
ocspResponderURL = "";
externalAccountBindingRequired = false;
};
});
headscaledemocom = pkgs.writeText "demos123.com"
''
$ORIGIN demos123.com.
$TTL 1d
ns1 IN A 0.0.0.0
@ IN SOA ns1.demos123.com. admin.demos123.com. (
2024011402 ; Serial
1h ; Refresh
15m ; Retry
1w ; Expire
3h ; Negative Cache TTL
)
@ IN NS ns1.demos123.com.
'';
named = pkgs.writeText "named.conf" ''
options {
directory "/etc/powerdns/bind";
};
zone "demos123.com" {
type master;
file "${headscaledemocom}"; # Adjust the path as needed
allow-update { none; };
};
'';
domain = "demos123.com";
PDNS_API_KEY="ce3d5b4c6bc08a0057244149e1d8716c6008916b66a5cc8f4ee875a56bf51a4b";
PDNS_API_URL="http://localhost:8000";
pdnscreds = pkgs.writeText "pdns.creds"
''
PDNS_API_KEY="${PDNS_API_KEY}
PDNS_API_URL=${PDNS_API_URL}
'';
pdnsconf = pkgs.writeText "pdns.conf"
'';
#local-port=54
#launch=gmysql
#gmysql-host=localhost
#gmysql-user=pdns
#gmysql-password=your_password
#gmysql-dbname=pdns
'';
mysqlconf = pkgs.writeText "mysql.conf"
''
[client]
user=pdns
password=teleport
'';
enable_bind = true; */
#domain = "myheadscale.demo.com";
#in
#this = {
#domain = "myheadscale.demo.com";
# home-manager = builtins.fetchTarball "https://github.com/nix-community/home-manager/archive/master.tar.gz";
let
#home-manager = pkgs.fetchFromGitHub {
#owner = "nix-community";
#repo = "home-manager";
#rev = "888eac32bd657bfe0d024c8770130d80d1c02cd3";
#sha256 = "0kj49bdl67d1yf5wvqfcrlhf13jmqgvrl33k2bscw1crinab9na9";
#};
#inputs = inputs
# unstable = import (builtins.fetchTarball {
# url = "https://github.com/NixOS/nixpkgs/archive/nixos-unstable.tar.gz";
# }) {config = config.nixpkgs.config;};
# nix-software-center = import (pkgs.fetchFromGitHub {
# owner = "snowfallorg";
# repo = "nix-software-center";
# rev = "0.1.2";
# sha256 = "xiqF1mP8wFubdsAQ1BmfjzCgOD3YZf7EGWl9i69FTls=";
# }) {pkgs = unstable;};
# raspberry_pi_ip = pkgs.writeText "raspberry_pi_ip.txt" ''
# ${pkgs.tailscale}/bin/tailscale status | awk '$2 == "raspberrypi" {print $1}'
# '';
#shellHookScript = pkgs.writeText "get-raspberry-pi-ip.sh" ''
#!/bin/sh
#set -e
# tailscale status | awk '$2 == "raspberrypi" {print $1}' > /etc/nixos/raspberry_pi_ip.txt
#'';
# raspberry_pi_ip = pkgs.stdenv.mkDerivation {
# name = "raspberry_pi_ip";
# buildCommand = ''
# Run your command here
# $(tailscale status | awk '$2 == "raspberrypi" {print $1}')"
#'';
# };
#
# test = (import <nixpkgs> {}).runCommand "test" {} ''
# mkdir $out
# echo test
# '';
#pre-igpu = (import <nixpkgs> {}).runCommand "igpu" {} "${script}/bin/env-vars.sh > $out";
#igpu = builtins.readFile pre-igpu;
# igpu = (import <nixpkgs> {}).runCommand "igpu" {} ''
# realpath /dev/dri/by-path/pci-0000\:00\:02.0-card
#'';
#card = exec ["realpath /dev/dri/by-path/pci-0000:00:02.0-card"];
#igpu = (import <nixpkgs> {}).runCommand("realpath /dev/dri/by-path/pci-0000\:00\:02.0-card" {} "realpath /dev/dri/by-path/pci-0000\:00\:02.0-card");
# igpu = import (import <nixpkgs> {}).runCommand "realpath /dev/dri/by-path/pci-0000\:00\:02.0-card" {} "realpath /dev/dri/by-path/pci-0000\:00\:02.0-card");
# nixpkgs = import <nixpkgs> {};
# envycontrol = pkgs.nixpkgs.lib.mkFlake {
# src = nixpkgs.lib.cleanSourceWith {
# name = "envycontrol";
# src = builtins.fetchTarball {
# url = "https://github.com/bayasdev/envycontrol/archive/main.tar.gz";
# };
# };
# };
# python = pkgs.vscode-utils.buildVscodeMarketplaceExtension rec {
# mktplcRef = {
# name = "python";
# version = "2024.15.2024091801";
# publisher = "ms-python";
# };
# vsix = builtins.fetchurl {
# #url = "/home/spiderunderurbed/ms-python.python.vsix";
# url = "file:///home/spiderunderurbed/ms-python.python.vsix";
# sha256 = "d425c4a32528ea96059df4e85656f6fa5234c127f1c60ed2e11b6b2d225209c8";
# #unpack = false;
# dontUnpack = true;
# };
#dontUnpack = true;
# };
# Add unzip to build inputs
# buildInputs = [ pkgs.unzip ];
# Custom unpackPhase to handle .vsix files
# unpackPhase = ''
# echo "Unzipping VSIX file..."
# Create a temporary log file for capturing the output
# local logFile="$TMPDIR/unzip.log"
#mv $vsix
# Unzip and append output to the log file
#unzip "$vsix" -d "$sourceRoot"
#2>&1 | tee -a "$logFile"
# Print the contents of the log file
# echo "Unzip output:"
# cat "$logFile"
#'';
# unpackPhase = ''
# mv "$vsix" "${vsix}.zip"
# unzip -o "${vsix}" -d "$sourceRoot"
# Unzip the renamed ZIP file to the specified source root directory
# unzip "${vsix}.zip" -d "$sourceRoot"
# mv $vsix {vsix}.zip
# unzip ${vsix}.zip -d $sourceRoot
#> /home/spiderunderurbed/python.log
# '';
#};
# hyprlandConfig = { inherit (import ./hyprland.nix); };
#hyprlandConfig = ((import ./hyprland.nix).hyprlandConfig) // { enable = false; };
#hyprlandConfig = ((import ./hyprland.nix) {config, lib, pkgs}).hyprlandConfig // {enable = false;};
#hyprlandConfig = ((import ./hyprland.nix) { config = config; lib = lib; pkgs = pkgs; }).hyprlandConfig // { enable = false; };
hyprlandConfig = ((import ./hyprland.nix) { lib = lib; pkgs = pkgs; }) // { enable = false; };
acermodule = config.boot.kernelPackages.callPackage ./acer-module.nix {};
coreutils = pkgs.writeShellApplication {
name = "coreutils";
runtimeInputs = [
pkgs.coreutils
];
text = ''
realpath /dev/dri/by-path/pci-0000:00:02.0-card
'';
};
# nix-gaming = import (builtins.fetchTarball "https://github.com/fufexan/nix-gaming/archive/master.tar.gz");
startup = pkgs.writeShellApplication {
name = "startup";
runtimeInputs = [];
text = ''
# mkdir -p /mnt/btrfs-pool &&
# mount -o subvolid=0 UUID=0095faf2-2359-4515-a1e1-af7ef6f11a0f /mnt/btrfs-pool
'';
};
kdePkgs = import (builtins.fetchTarball {
url = "https://github.com/NixOS/nixpkgs/archive/20afb4559c29bf544eeffb90a2dfd1afd6541902";
});
pinnedKde = final: prev: {
services.xserver.desktopManager.plasma6 = kdePkgs.services.xserver.desktopManager.plasma6;
};
arion = pkgs.writeShellApplication {
name = "arion";
runtimeInputs = [
pkgs.screen
pkgs.docker-compose
pkgs.docker
pkgs.nix
(import (fetchTarball "https://github.com/nixos/nixpkgs/archive/23.11.tar.gz") {}).arion
];
text = ''
# mkdir -p /mnt/btrfs-pool &&
# mount -o subvolid=0 UUID=0095faf2-2359-4515-a1e1-af7ef6f11a0f /mnt/btrfs-pool &&
screen -S arion_session -d -m nix-shell -p arion --run "arion -p /etc/nixos/arion-pkgs.nix -f /etc/nixos/arion-compose.nix up"
'';
};
#waydroid-net = (builtins.readFile ./waydroid-net.sh);
# pkgs-nvidia = import
# (
# builtins.fetchTarball "https://github.com/nixos/nixpkgs/tarball/71e91c409d1e654808b2621f28a327acfdad8dc2"
# )
# { };
aagl = import (builtins.fetchTarball "https://github.com/ezKEa/aagl-gtk-on-nix/archive/main.tar.gz");
# myPipe = pkgs.runCommand "my-pipe" {} ''
# mkfifo $out
# echo $out
# cat $out
# '';
# myPipe = pkgs.runCommand "my-pipe" {} ''
# mkfifo $out
# exec systemctl start env-vars.service > $out 2>&1 &
# wait
# '';
# startup = pkgs.writeShellApplication {
# name = "realpath";
# runtimeInputs = [
#realpath
# ];
# };
# script = pkgs.writeScriptBin "env-vars" ''
# realpath /dev/dri/by-path/pci-0000:00:02.0-card
# '';
# pre-igpu = (import <nixpkgs> {}).runCommand "igpu" {
# useSandbox = false;
## sandboxPaths = [ "/dev" ];
# } ''
# ${script}/bin/env-vars > $out
# '';
# igpu = builtins.readFile pre-igpu;
# startup = pkgs.writeShellApplication {
# name = "startup";
# runtimeInputs = [ pkgs.python311Packages.pip pkgs.python3 pkgs.docker pkgs.nix pkgs.arion ];
# Build the script dynamically
# text = ''
# Create a virtual environment
# python3 -m venv "$out"/venv#
# # Activate the virtual environment and install packages
# source "$out"/venv/bin/activate
# pip install docker-py
# arion build
# arion up
# '';
#};
# script = pkgs.writeScriptBin "env-vars.sh" ''
#!/bin/sh
# realpath /dev/dri/by-path/pci-0000\:00\:02.0-card
# export KWIN_DRM_DEVICES=$(realpath /dev/dri/by-path/pci-0000\:00\:02.0-card)
# '';
# myPipe = pkgs.runCommand "my-pipe" {} ''
# mkfifo $out
# exec systemctl start env-vars.service > $out 2>&1 &
# wait
# '';
# nix-shell -p coreutils
#nvidia-offload = pkgs.writeShellScriptBin "wnvidia-offload" ''
# export __NV_PRIME_RENDER_OFFLOAD=1
# export __NV_PRIME_RENDER_OFFLOAD_PROVIDER=NVIDIA-G0
# export __GLX_VENDOR_LIBRARY_NAME=nvidia
# export __VK_LAYER_NV_optimus=NVIDIA_only
# exec "$@"
#'';
nix-software-center = import (pkgs.fetchFromGitHub {
owner = "snowfallorg";
repo = "nix-software-center";
rev = "0.1.2";
sha256 = "xiqF1mP8wFubdsAQ1BmfjzCgOD3YZf7EGWl9i69FTls=";
}) {};
concatMapStringsSep = { sep, f, list }:
builtins.concatStringsSep sep (map (x: f x + "\n") list);
in
#}
{
nixpkgs.config.allowUnsupportedSystem = true;
nixpkgs.overlays = [
pinnedKde
#(import /etc/nixos/waydroid-overlay.nix { inherit pkgs lib config; })
];
aagl.enableNixpkgsReleaseBranchCheck = false;
# nixpkgs.config.packageOverrides = pkgs: {
# nur = import (builtins.fetchTarball "https://github.com/nix-community/NUR/archive/master.tar.gz") {
# inherit pkgs;
# };
# };
#raspberry_pi_ip = pkgs.stdenv.mkDerivation {
# name = "raspberry_pi_ip";
# buildCommand = "${buildScript}";
#};
# raspberry_pi_ip = pkgs.stdenv.mkDerivation {
# name = "raspberry_pi_ip";
# buildCommand = ''
# # Run your command here
# echo "$(tailscale status | awk '$2 == "raspberrypi" {print $1}')" > $out
# '';
# };
#modules = [ arion.nixosModules.arion ];
# nixpkgs.overlays = [ (self: super: (let
# patched_pkgs = import inputs.nixpkgs_patched {
# inherit (self) system;
# config.allowUnfree = true;
# };
# in {
# linuxPackages = patched_pkgs.linuxPackages;
# })) ];
#hardware.nvidia.package = config.boot.kernelPackages.nvidiaPackages.beta;
#hardware.nvidia.package = config.boot.kernelPackages.nvidiaPackages.stable;
#wboot.kernelPackages = pkgs.linuxPackages;
#imports = [
# ./hardware-configuration.nix
# (import "${this.home-manager}/nixos")
# ];
#programs.home-manager.enable = true;
#home-manager.users.spiderunderurbed = {
# home.stateVersion = "18.09";
#};
# systemd.services."acme-demo.com" = {
# after = ["pdns.service"]; # Ensure PDNS is started before attempting renewal.
# script = ''
# export PDNS_API_URL="http://localhost:8000" # Adjust this to your actual PDNS API URL.
# export PDNS_API_KEY="ce3d5b4c6bc08a0057244149e1d8716c6008916b66a5cc8f4ee875a56bf51a4b" # Adjust this to your actual PDNS API key.
# exec ${pkgs.lego}/bin/lego --accept-tos --path . -d demo.com --email SpiderUnderUrBed@proton.me --key-type ec256 --dns pdns --dns.resolvers localhost:53 --server https://localhost:14000 run
# '';
# ... other service configurations ...
# };
#systemd.services."acme-demo.com".serviceConfig.Environment = [
#"PDNS_API_URL=http://localhost:8000"
#"PDNS_API_KEY=ce3d5b4c6bc08a0057244149e1d8716c6008916b66a5cc8f4ee875a56bf51a4b"
#];
#systemd.services.snort = {
#}
#systemd.enableUnifiedCgroupHierarchy = false;
# myPipe = pkgs.runCommand "my-pipe" {} ''
# mkfifo $out
# cat $out
# '';
#igpuWithPipe = builtins.readFile myPipe;
systemd = {
user.services = {
"xwayland-ensure" = {
description = "Backup xwaylandserver";
# wantedBy = ["default.target"];
enable = true;
# linger = true;
serviceConfig = {
ExecStart = "${pkgs.bash}/bin/bash -c 'if ! ${pkgs.procps}/bin/pgrep X > /dev/null; then ${pkgs.xwayland-satellite}/bin/xwayland-satellite; fi'";
Restart = "always";
};
};
"pasystray-ensure" = {
description = "PulseAudio Tray Application (pasystray)";
# after = [ "graphical.target" ];
# wantedBy = ["default.target"];
enable = true;
# linger = true;
serviceConfig = {
ExecStart = "${pkgs.bash}/bin/bash -c 'if ! ${pkgs.procps}/bin/pgrep pasystray > /dev/null; then ${pkgs.pasystray}/bin/pasystray --display=:0; fi'";
Restart = "always";
};
# wantedBy = [ "default.target" ];
};
};
services = {
#<<<<<<< HEAD
#waydroid-container.wantedBy = lib.mkForce [];
#"app-org.kde.xwaylandvideobridge@autostart.service".wantedBy = lib.mkForce [];
#=======
#waydroid-container.wantedBy = lib.mkForce [];
#>>>>>>> cdcb124 (Initial commit)
#export KWIN_DRM_DEVICES=$(realpath /dev/dri/by-path/pci-0000\:00\:02.0-card)
#env-vars = {
# wantedBy = ["multi-user.target"];
# serviceConfig.ExecStart = ''
# /bin/sh ${script}/bin/env-vars
# export KWIN_DRM_DEVICES=$(realpath /dev/dri/by-path/pci-0000\\:00\\:02.0-card)
# exit $?
# '';
# };
#tailscale-up = {
# after = ["arion-tailscale.service"];
# wantedBy = ["multi-user.target"];
# requires = ["arion-tailscale.service"];
# serviceConfig.Type = "oneshot";
# serviceConfig.ExecStart = ''
# ${pkgs.docker}/bin/docker exec tailscaled tailscale && ${pkgs.docker}/bin/docker exec tailscaled tailscale up --authkey=tskey-auth-keAyTP5CNTRL-7SeWhLQXXK7ioVUh7dJQK7ceZBeS7n5h
#--socket /var/lib/tailscale-fake.sock
# '';
# serviceConfig.ExecStartPre = ''
#${pkgs.coreutils}/bin/sleep 5
# '';`
# };
#};
#cron = {
#enable = true;
#systemCronJobs = [
#"*/5 * * * * root /etc/nixos/persist.sh"
#]
#}
#ssh-inhibit-sleep = {
#description = "Check for running SSH sessions and, if any, inhibit sleep";
# before = "sleep.target";
# serviceConfig = {
# Type = "oneshot";
# ExecStart="/bin/sh -c '! who | grep -qv "\(:0\)"'"
# };
# requiredBy = "sleep.target";
#};
#snort = {
# description = "Snort service";
# after = [ "syslog.target" "network.target" ];
# serviceConfig = {
# Type = "simple";
# EnvironmentFile = pkgs.writeText "snort.conf" ''
# '';
# PIDFile = "/var/run/snort/snort1.pid";
# ExecStartPre = [
# "-/usr/sbin/ethtool -K $INTERFACE rx off tx off gro off lro off"
# "-/usr/sbin/ip link set arp off multicast off promisc on dev $INTERFACE"
# ];
# ExecStart = "/usr/sbin/snort -D -u snort -g snort -c $CONF -i $INTERFACE -R 1 --pid-path=/var/run/snort --no-interface-pidfile --nolock-pidfile";
# KillMode = "process";
# };
# wantedBy = [ "multi-user.target" ];
#};
};
};
/* systemd.services."pdns.service.d".after = ["mysql.service"];
systemd.services.pebble = {
description = "Pebble ACME Test Server";
after = [ "network-online.target" ];
wantedBy = [ "multi-user.target" ];
serviceConfig = {
AmbientCapabilities="CAP_DAC_READ_SEARCH";
Environment = [ "PEBBLE_VA_NOSLEEP=1" "PEBBLE_VA_ALWAYS_VALID=1" ];
ExecStart = "${pkgs.pebble}/bin/pebble -config ${pebbleConfig}";
DynamicUser = true;
};
}; */
#
#systemd.services."acme-demo.com.service" = {
#enable = false;
##after = "pdns.service.d";
#serviceConfig.Environment = [
#"LEGO_CA_CERTIFICATES=/etc/nixos/certs/cert.pem"
#"LEGO_CA_SERVER_NAME=localhost"
#];
#};
#security.pki.certificateFiles = ["/home/spiderunderurbed/crt/headscale.crt"];
security.sudo.enable = true;
#security.rtkit.enable = true;
security.pki.certificates = [ ''
#-----BEGIN CERTIFICATE-----
#MIIDCTCCAfGgAwIBAgIIJOLbes8sTr4wDQYJKoZIhvcNAQELBQAwIDEeMBwGA1UE
#AxMVbWluaWNhIHJvb3QgY2EgMjRlMmRiMCAXDTE3MTIwNjE5NDIxMFoYDzIxMTcx
#MjA2MTk0MjEwWjAgMR4wHAYDVQQDExVtaW5pY2Egcm9vdCBjYSAyNGUyZGIwggEi
#MA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQC5WgZNoVJandj43kkLyU50vzCZ
#alozvdRo3OFiKoDtmqKPNWRNO2hC9AUNxTDJco51Yc42u/WV3fPbbhSznTiOOVtn
#Ajm6iq4I5nZYltGGZetGDOQWr78y2gWY+SG078MuOO2hyDIiKtVc3xiXYA+8Hluu
#9F8KbqSS1h55yxZ9b87eKR+B0zu2ahzBCIHKmKWgc6N13l7aDxxY3D6uq8gtJRU0
#toumyLbdzGcupVvjbjDP11nl07RESDWBLG1/g3ktJvqIa4BWgU2HMh4rND6y8OD3
#Hy3H8MY6CElL+MOCbFJjWqhtOxeFyZZV9q3kYnk9CAuQJKMEGuN4GU6tzhW1AgMB
#AAGjRTBDMA4GA1UdDwEB/wQEAwIChDAdBg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kYYFeGCaJ665OVRkBPqcSR
fD5BRROGnI56qyVLsuDcfGU5e6r2y3N1+bQNpokFUvyhJGcTol+0Bw9HC0nY4z28
ebu11AfvMSFCwm8FnuvFkzsi7rqcc4HZNJK4YX3yYrzXFAVFTzp1YUZ30BOqGcX4
2SJkgzJD/oLToXu4dL9mBcDZTTVp6vpHJb29634eIg6vZPL3m0ArsBRKRW3ubznI
GHredzIW5VGJsFEHIszfemGqaM9McSAzPcJKpm51CtjJ0KRcnUO8vaFYuuxMpGEy
lxxcvWBAjeNJ3fvBMIoagrgxbJastRcaNaNG+HV0UvXueIp3HtZ5zP5nc1Vc8+Rh
P+fPL1Z4EQJi6HqKWNlXBDiKThzuqx9PbwrPvslGz+Eo+nIXmOGyLaj0qvJNKYBs
MfgyO7oEXySSP4smoUn5isKWg3B5z6nQ7ReXzq/XkZoFhXq3gOGiSILOwI/adra7
hCncJu0OBrcLizP9UYJmH+7iVg==
-----END CERTIFICATE-----
'' ];
networking = {
#wireless.iwd.package = [
#<derivation iwd-2.13>
#];
#interfaces."enp44s0".wakeOnLan = {
#enp46s0
interfaces."enp46s0".wakeOnLan = {
#policy = "";
enable = true;
};
nameservers = [
"8.8.8.8"
#"localhost"
"100.100.100.100"];
#};
};
#security.acme = {
# server = "https://localhost:14000/dir";
# preliminarySelfsigned = true;
# acceptTerms = true;
# email = "SpiderUnderUrBed@proton.me";
# certs."example.com" = {
# webroot = "/var/www/example.com";
# group = "nginx";
# };
# certs."demos123.com" = {
# environmentFile = pkgs.writeText "legovar.conf" ''
# PDNS_API_KEY="ce3d5b4c6bc08a0057244149e1d8716c6008916b66a5cc8f4ee875a56bf51a4b"
# PDNS_API_URL="http://localhost:8000"
# '';
# dnsProvider = "pdns";
# dnsResolver = "localhost:53"; # This should be pdns.
# dnsPropagationCheck = true;
# # credentialsFile = pdnscreds;
# webroot = "/var/lib/acme/challenges-de";
# group = "nginx";
# email = "SpiderUnderUrBed@proton.me";
# };
# certs."headscale.demo.com" = {
# dnsProvider = "pdns";
# dnsResolver = "localhost:53"; # This should be pdns.
# dnsPropagationCheck = true;
# credentialsFile = pdnscreds;
# # webroot = "/var/lib/acme/challenges-de";
# group = "nginx";
# email = "SpiderUnderUrBed@proton.me";
#};
#};
/*
security.acme = {
#enable = false;
server = "https://localhost:14000/dir";
preliminarySelfsigned = true;
acceptTerms = true;
email = "SpiderUnderUrBed@proton.me";
certs."demos123.com" = {
environmentFile = pkgs.writeText "legovar.conf" ''
PDNS_API_KEY="ce3d5b4c6bc08a0057244149e1d8716c6008916b66a5cc8f4ee875a56bf51a4b"
PDNS_API_URL="http://localhost:8000"
'';
dnsProvider = "pdns";
dnsResolver = "localhost:53"; # This should be pdns.
dnsPropagationCheck = true;
group = "nginx";
email = "SpiderUnderUrBed@proton.me";
};
certs."headscale.demo.com" = {
dnsProvider = "pdns";
dnsResolver = "localhost:53";
dnsPropagationCheck = true;
credentialsFile = pdnscreds;
email = "SpiderUnderUrBed@proton.me";
group = "nginx";
};
# certs."demos123.com" = {
# Define configuration for demos123.com here if needed
# };
};
*/
#environment.systemPackages = [ pkgs.pcsclite ];
security.polkit.enable = true;
security.polkit.extraConfig = ''
polkit.addRule(function(action, subject) {
if (action.id == "org.debian.pcsc-lite.access_pcsc" &&
subject.isInGroup("wheel")) {
return polkit.Result.YES;
}
});
'';
services.tailscale.enable = true;
# networking.firewall = {
# checkReversePath = "loose";
# trustedInterfaces = [ "tailscale0" ];
# allowedUDPPorts = [ config.services.tailscale.port ];
# };
services = {
#<<<<<<< HEAD
#=======
geoclue2 = {
enable = false;
};
gpsd = {
enable = false;
port = 3330;
};
rsyslogd = {
enable = true;
extraConfig = "auth,authpriv.* /var/log/auth.log";
};
mullvad-vpn = {
enable = false;
};
#>>>>>>> cdcb124 (Initial commit)
#protonmail-bridge = {
# enable = true;
# package =
# # Ensure pass is not in the PATH.
# pkgs.runCommand "protonmail-bridge"
# {
# bridge = pkgs.protonmail-bridge;
# nativeBuildInputs = [ pkgs.makeWrapper ];
# }
# ''
# mkdir -p $out/bin
# makeWrapper $bridge/bin/protonmail-bridge $out/bin/protonmail-bridge \
# --set PATH ${lib.strings.makeBinPath [ pkgs.gnome3.gnome-keyring ]}
# '';
#};
displayManager = {
execCmd = lib.mkDefault "exec ${pkgs.sddm}/bin/sddm";
sessionPackages = [
pkgs.hyprland
];
# sessionPackages = [
# ((pkgs.writeTextDir "share/wayland-sessions/hyprland.desktop" ''
# [Desktop Entry]
# Name=hyprland
# Comment=A wayland window manager
# Exec=hyprland
# Type=Application
# ''))
# ];
};
usbguard = {
#enable = true;
};
beesd.filesystems = {
#root = {
# spec = "LABEL=root";
# hashTableSizeMB = 2048;
# verbosity = "crit";
# extraOptions = [ "--loadavg-target" "5.0" ];
# };
main = {
spec = "LABEL=home";
hashTableSizeMB = 2048;
verbosity = "crit";
extraOptions = [ "--loadavg-target" "5.0" ];
};
};
tlp = {
enable = false;
#enable = true;
};
monero = {
enable = false;
limits.threads=2;
mining = {
enable= false;
address="47XA83EZZvdiBbtJH7oF5UYvzCGFEW94dHFRamPFoaDfjXHJDWHuHHQYP9qDTb2itr3ZijVrTsnn4Vf7gVUdgFEpDicDiZU";
};
};
#monero = {
#enable = true;
#limits.threads=2;
#mining = {
#address="47XA83EZZvdiBbtJH7oF5UYvzCGFEW94dHFRamPFoaDfjXHJDWHuHHQYP9qDTb2itr3ZijVrTsnn4Vf7gVUdgFEpDicDiZU";
#address =
#};
#};
# hostapd = {
# enable = true;
# wifi6 = true;
# radios = {
# wlp3s0 = {
# }
# }
# };
syncthing = {
enable = true;
user = "spiderunderurbed";
configDir = "/home/spiderunderurbed/syncthing/etc";
dataDir = "/home/spiderunderurbed/syncthing/data";
};
packagekit.enable = true;
/*
flatpak = {
update.onActivation = false;
remotes = [
{
name = "gol"; location = "https://gol.launcher.moe/gol.launcher.moe.flatpakrepo";
}
{
name = "flathub-beta"; location = "https://flathub.org/beta-repo/flathub-beta.flatpakrepo";
}
{
name = "flathub"; location = "https://flathub.org/repo/flathub.flatpakrepo";
}
#{
#name = "kdeapps"; location = "https://distribute.kde.org/kdeapps.flatpakrepo";
#}
# {
# name = "kdeapps"; location = "https://cdn.kde.org/flatpak/kde-runtime-nightly/org.kde.Platform.flatpakref";
# }
];
packages = [
#{ appId = "org.kde.discover"; origin = "kdeapps"; }
"moe.launcher.the-honkers-railway-launcher"
"com.github.tchx84.Flatseal"
"com.obsproject.Studio"
"org.gimp.GIMP"
#"org.kde.krita"
#"org.kde.kdenlive"
{ appId = "moe.launcher.an-anime-game-launcher"; origin = "gol"; }
];
};
*/
# pcscd.enable = true;
#udev = {
# packages = [
# pkgs.yubikey-personalization
# ];
# };
# gpg-agent = {
# enable = true;
# enableBashIntegration = true;
# enableSshSupport = true;
# pinentryFlavor = "qt";
# enableScDaemon = true;
# };
expressvpn.enable = true;
# acme-dns = {
# enable = true;
# settings = {
# api = {
# ip = "127.0.0.1";
# disable_registration = true;
# port = 13000;
#
# };
# general = {
# listen = "127.0.0.1:54";
# domain = "acme-dns.example.com";
# nsname = "localhost:5300";
# nsadmin = "SpiderUnderUrBed@proton.me";
# records = [];
# };
# };
# } ;
# fail2ban = {
# enable = true;
# };
/* headscale = {
# serviceConfig.BindReadOnlyPaths = [ "/etc/ssl/certs" ];
enable = true;
address = "0.0.0.0";
port = 8080;
serverUrl = "https://${domain}";
dns = { baseDomain = "demos123.com"; };
settings = { logtail.enabled = false; server_url = "https://${domain}"; };
};
# nginx.enable = true;
nginx = {
enable = false;
virtualHosts.${domain} = {
## enable = true;
forceSSL = true;
# enableACME = true;
useACMEHost = "demos123.com";
locations."/" = {
proxyPass =
"http://localhost:${toString config.services.headscale.port}";
proxyWebsockets = true;
};
};
};
pdns-recursor = {
enable = true;
settings = {
forward-zones = ''
.=8.8.8.8,.=127.0.0.1
'';
};
};
powerdns = {
enable = true;
extraConfig = ''
api=yes
launch=bind,gmysql
webserver-address=0.0.0.0
webserver-allow-from=0.0.0.0/0
api-key=${PDNS_API_KEY}
local-address=127.0.0.1
local-port=5300
bind-config=${named}
bind-check-interval=600
gmysql-host=127.0.0.1
gmysql-user=pdns
gmysql-password=teleport
gmysql-dbname=pdns
gmysql-port=3306
gmysql-dnssec=yes
'';
};
powerdns-admin = {
enable = true;
saltFile = null;
secretKeyFile = null;
config = ''
SQLALCHEMY_DATABASE_URI='mysql://powerdnsadmin:teleport@127.0.0.1:3306/powerdnsadmin'
#local-address=0.0.0.0
#?unix_socket=/run/mysqld/mysqld.sock
BIND_ADDRESS='127.0.0.1'
PORT=8000;
HSTS_ENABLED = False
OFFLINE_MODE = False
SQLALCHEMY_TRACK_MODIFICATIONS = True
'';
};
bind = {
enable = false;
}; */
# bind = {
# allowQuery = [ "127.0.0.1" ]; # Allow queries from localhost
# allowTransfer = [ "127.0.0.1" ]; # Allow zone transfers from localhost
#listenOn = [ "127.0.0.1" ]; # Listen on localhost
# forwarders = [ "8.8.8.8" "127.0.0.1"]; # Use Google's public DNS as a forwarder (optional)
# forward = "first";
# listenOn =
# [
# "127.0.0.1"
# ];
# ipv4Only = true;
# serviceConfig.BindReadOnlyPaths = [ "/etc/ssl/certs" ];
#enable = enable_bind;
# extraConfig = ''
# include dnskeys;
# '';
# zones = [
# {
# name = "headscale.demo.com";
# allowQuery = ["127.0.0.1"];
# file = headscaledemocom;
# master = true;
# extraConfig = "allow-update { key pdns.headscale.demo.com.; };";
# }
# ];
# };
#};
};
#programs.bash = {
#enable = true;
# shellInit = "export NIXPKGS_ALLOW_INSECURE=1";
# bashrcExtra = ''
# . ~/oldbashrc
# '';
#};
#programs.kdeconnect.enable = true;
#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
#};
/* services.mysql = {
enable = true;
initialScript = "/etc/nixos/modules/sql-build.sql";
package = pkgs.mariadb; # or pkgs.mysql for MySQL
configFile = pkgs.writeText "mysql.conf" ''
[client]
port = 3306
socket = /run/mysqld/mysqld.sock
[mysqld]
general_log = 1
general_log_file = /var/log/mysql/mysql.log
max_allowed_packet=256M
#database = pdns
port = 3306
socket = /run/mysqld/mysqld.sock
'';
initialDatabases = [
{name = "pdns"; schema = "/etc/nixos/modules/mysql-schema.sql";}
{name = "powerdnsadmin"; schema = "/etc/nixos/modules/mysql-schema.sql"; }
];
# ALTER USER 'pdns'@'localhost' IDENTIFIED BY 'teleport';
ensureDatabases = ["pdns"];
ensureUsers = [
{
name = "pdns";
ensurePermissions = {
#"pdns" = "ALL PRIVILEGES";
"pdns.domains" = "SELECT, INSERT, UPDATE, DELETE";
"pdns.records" = "SELECT, INSERT, UPDATE, DELETE";
#"" = "CREATE";
};
}
{
name = "powerdnsadmin";
ensurePermissions = {