From effb6e63971d7c5f867bf8853769804add84c64a Mon Sep 17 00:00:00 2001 From: DashieTM Date: Sat, 24 Aug 2024 18:05:37 +0200 Subject: [PATCH] extract hardware config --- .gitignore | 12 - flake.lock | 6 +- flake.nix | 20 +- hardware/marmo/configuration.nix | 33 -- hardware/overheating/configuration.nix | 50 --- hardware/overheating/dsdt.nix | 19 - hardware/overheating/firmware.nix | 16 - hardware/overheating/firmware/TAS2XXX38BB.bin | Bin 64504 -> 0 bytes .../overheating/firmware/TIAS2781RCA4.bin | Bin 2740 -> 0 bytes .../firmware/TIAS2781RCA4.bin.orig | Bin 2740 -> 0 bytes hardware/overheating/overheating.nix | 5 - hardware/overheating/ssdt6.aml | Bin 5404 -> 0 bytes hardware/server/configuration.nix | 342 ------------------ hardware/server/hardware-configuration.nix | 56 --- hardware/server/mautrix-discord.nix | 247 ------------- hardware/server/mautrix-whatsapp.nix | 247 ------------- hardware/spaceship/configuration.nix | 106 ------ lib/default.nix | 16 +- modules/conf.nix | 10 + modules/programs/home_packages.nix | 1 + programs/default.nix | 1 + programs/individual_configs/fish.nix | 2 +- 22 files changed, 31 insertions(+), 1158 deletions(-) delete mode 100644 .gitignore delete mode 100644 hardware/marmo/configuration.nix delete mode 100644 hardware/overheating/configuration.nix delete mode 100644 hardware/overheating/dsdt.nix delete mode 100644 hardware/overheating/firmware.nix delete mode 100644 hardware/overheating/firmware/TAS2XXX38BB.bin delete mode 100644 hardware/overheating/firmware/TIAS2781RCA4.bin delete mode 100644 hardware/overheating/firmware/TIAS2781RCA4.bin.orig delete mode 100644 hardware/overheating/overheating.nix delete mode 100644 hardware/overheating/ssdt6.aml delete mode 100644 hardware/server/configuration.nix delete mode 100644 hardware/server/hardware-configuration.nix delete mode 100644 hardware/server/mautrix-discord.nix delete mode 100644 hardware/server/mautrix-whatsapp.nix delete mode 100644 hardware/spaceship/configuration.nix diff --git a/.gitignore b/.gitignore deleted file mode 100644 index e173d3f..0000000 --- a/.gitignore +++ /dev/null @@ -1,12 +0,0 @@ -/nvim/plugged/* -gtk-3.0/bookmarks -gtk-3.0/servers -gtk-4.0/servers -/fish/fish_variables -fish/fish_variables -fish/*.tmp.* -copyq/copyq.lock -copyq/copyq_geometry.* -copyq/copyq_tab* -nvim/lazy-lock.json -ncspot/*.cbor diff --git a/flake.lock b/flake.lock index 2481d6a..3633057 100644 --- a/flake.lock +++ b/flake.lock @@ -218,11 +218,11 @@ "nixvim": "nixvim" }, "locked": { - "lastModified": 1724498597, - "narHash": "sha256-rq3CS7CpkC5lLn/eDqmftyA2C7McUm+sYGUMpH2oJU4=", + "lastModified": 1724509876, + "narHash": "sha256-SvtppTW041MCVGmhKu8lsEbzVXwerLEIDcizdY0ZqEI=", "owner": "DashieTM", "repo": "DashVim", - "rev": "02e646467e4454633a7d248dfda7a7a7ecb4bf6b", + "rev": "309544615a01e9aa242ca71bff58f503273345ea", "type": "github" }, "original": { diff --git a/flake.nix b/flake.nix index d9b1f91..4bab6f6 100644 --- a/flake.nix +++ b/flake.nix @@ -61,22 +61,12 @@ allowUnfree = true; }; }; - dashielib = import ./lib { inherit inputs pkgs; }; in { - nixosConfigurations = - (dashielib.build_systems [ "marmo" "overheating" "spaceship" ]) // { - server = inputs.stable.lib.nixosSystem { - specialArgs = { - inherit inputs; - pkgs = stable; - }; - modules = [ - inputs.sops-nix.nixosModules.sops - inputs.dashvim.nixosModules.dashvim - ./hardware/server/configuration.nix - ]; - }; - }; + dashNixLib = import ./lib { inherit inputs pkgs; }; + dashNixInputs = inputs; + stablePkgs = stable; + unstablePkgs = pkgs; + modules = ./modules; }; nixConfig = { diff --git a/hardware/marmo/configuration.nix b/hardware/marmo/configuration.nix deleted file mode 100644 index e0ed8ef..0000000 --- a/hardware/marmo/configuration.nix +++ /dev/null @@ -1,33 +0,0 @@ -{ config, ... }: { - imports = [ ../../modules ]; - # variables for system - conf = { - monitor = "DP-1"; - hostname = "marmo"; - cpu = "intel"; - }; - mods = { - gaming = { - enable = true; - gpu_device = 1; - }; - stylix.colorscheme = "catppuccin-mocha"; - hyprland.monitor = [ - # default - "DP-1,1920x1080@144,0x0,1" - # all others - ",highrr,auto,1" - ]; - amdgpu.enable = true; - kde_connect.enable = true; - xone.enable = true; - greetd = { resolution = "3440x1440@180"; }; - nextcloud = { - synclist = [{ - name = "pw_sync"; - remote = "/PWs"; - local = "/home/${config.conf.username}/Music"; - }]; - }; - }; -} diff --git a/hardware/overheating/configuration.nix b/hardware/overheating/configuration.nix deleted file mode 100644 index 5ced1e6..0000000 --- a/hardware/overheating/configuration.nix +++ /dev/null @@ -1,50 +0,0 @@ -{ config, ... }: { - imports = [ ../../modules ]; - conf = { - monitor = "eDP-1"; - scale = "2.0"; - hostname = "overheating"; - boot_params = [ "rtc_cmos.use_acpi_alarm=1" ]; - ironbar.modules = [{ - type = "upower"; - class = "memory-usage"; - }]; - }; - mods = { - stylix.colorscheme = "catppuccin-mocha"; - hyprland = { - monitor = [ - # default - "eDP-1,2944x1840@90,0x0,2" - - # all others - ",highres,auto,1" - ]; - extra_autostart = [ "hyprdock --server" ]; - }; - amdgpu.enable = true; - kde_connect.enable = true; - bluetooth.enable = true; - acpid.enable = true; - greetd = { resolution = "3440x1440@180"; }; - nextcloud = { - synclist = [ - { - name = "document_sync"; - remote = "/Documents"; - local = "/home/${config.conf.username}/Documents"; - } - { - name = "picture_sync"; - remote = "/Pictures"; - local = "/home/${config.conf.username}/Pictures"; - } - { - name = "pw_sync"; - remote = "PWs"; - local = "/home/${config.conf.username}/Music"; - } - ]; - }; - }; -} diff --git a/hardware/overheating/dsdt.nix b/hardware/overheating/dsdt.nix deleted file mode 100644 index 8395d7c..0000000 --- a/hardware/overheating/dsdt.nix +++ /dev/null @@ -1,19 +0,0 @@ -{ pkgs, ... }: -let - # credit to benley: https://github.com/benley/dotfiles/commit/325748c3a8553d55c9fab08654a77b252aa0fde7 - patched_ssdt = pkgs.stdenv.mkDerivation { - name = "patched_ssdt"; - src = ./.; - buildInputs = [ pkgs.libarchive ]; - installPhase = '' - mkdir -p kernel/firmware/acpi - cp ${./ssdt6.aml} kernel/firmware/acpi/ssdt6.aml - mkdir -p $out - echo kernel/firmware/acpi/ssdt6.aml | bsdcpio -v -o -H newc -R 0:0 > $out/lenotrolli-ssdt.img - ''; - }; - -in { - boot.kernelParams = [ "mem_sleep_default=deep" ]; - boot.initrd.prepend = [ "${patched_ssdt}/lenotrolli-ssdt.img" ]; -} diff --git a/hardware/overheating/firmware.nix b/hardware/overheating/firmware.nix deleted file mode 100644 index 8d9beed..0000000 --- a/hardware/overheating/firmware.nix +++ /dev/null @@ -1,16 +0,0 @@ -{ pkgs, ... }: { - hardware.firmware = [ - ( - # lenovo is such a good manufacturer!!1!11! - # credit for the binary files: https://github.com/darinpp/yoga-slim-7 - pkgs.stdenv.mkDerivation { - name = "firmware-lenotrolli"; - src = ./firmware; - installPhase = '' - mkdir -p $out/lib/firmware - cp ${./firmware/TAS2XXX38BB.bin} $out/lib/firmware/TAS2XXX38BB.bin - cp ${./firmware/TIAS2781RCA4.bin} $out/lib/firmware/TIAS2781RCA4.bin - ''; - }) - ]; -} diff --git a/hardware/overheating/firmware/TAS2XXX38BB.bin b/hardware/overheating/firmware/TAS2XXX38BB.bin deleted file mode 100644 index d729b9771f31a9652f9e0096394109fc869c4405..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 64504 zcmXptH8o;j`28ct@IW;KqZ|Q3!{Lfk9^p1B1>H z2zTU>A*FeldFcwi`6;Pnd7hDhpC77`6%@{ln;C@|7~~un7#Q3bm>48_7&#ai{yC^H z{9#}~-~b4liNTghT0kAzx3>7`h91JZUENoys9xM$lUM$Q^8Vn1W zE-+*<9biykI>Er)a*2hZOIj|mFt;3HVPtaPp2QTu?$Dye!oUEspM`^g z;lK77uo(v!7<&FQtYuRWM1-%JLk>u;?=SbHHdclWEo_S1Z6_Hvwq0ac-{#1$uH}>> zPs=4m&K4&{j<&-L+Zg`q$b-}~9pGSSbz*4b_@f}e!63lEUB2(K1MdqG=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e$SjkbyD(GY4AW#z1PD7P5W2|9dV32{VL#F*2WtfvdG`Rc*F_19HVxaj*9BY)3j0Mk^f%pxb z?*!_LnyxqU?0s8bCinq_n@!^QY7XuC+ZOiDu;%o_Paq6Z3&VKb1hStC-1mbihuZ}g zfZh9wEPy1&0$yOlz<_N{H?kIN?f|#*xFPd_$ZA1sZ0boBBNSd>`*}DRKw$>LAbVk$ zRJ&mMKr}wRpzz91`@eU>Oa^DL{k$9uAbws@q|bbg%}YRRkQ|7HiB*c86K(EYI~8PZ zO;J#G+pE$0GKSuL86#wka@g+OpfrxYUIH}k48kP0vp=f`upnV#+u5MJ0>hv-HV8AS z?)3nlO<_1YmjQ%980 zj6wbel|#rFv<_o*jq>nWqs;iaRh~KfP|oPt6hmY^254n5gB>VK(qpZ%83O|s-nKE? zx(tffDuX-*!`R9nlEpw}^Jv?c$79>nj+n7pgl|k*%5#2T(U8_vm7&HymDudg`O4UB2ZQ~)= zHm1j#<Kv+$8;`D8CarBugEh{*Wv-+BP0-8;`E30B5QH!@X@hQr0e0xoyni-Es^WQ`9!5(tRHzzHL0Z ec6o5LjT;X<7;PI5xwbJ)*D!-CQwE0rga7~n^)Oig diff --git a/hardware/overheating/firmware/TIAS2781RCA4.bin b/hardware/overheating/firmware/TIAS2781RCA4.bin deleted file mode 100644 index 481d133059a6a44a225e085ffe7b37ff6a35bde5..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 2740 zcmZQz;M%f`rJ|RCfsvJgfsrxQDRes{0|N^qBO@aN1h6nLFfD;##uNqyrY8{LkwYd` z78ENKrRL_Br79%mCFbO(E2Jl8=8+Nr9E>cC9~c-IDi|0TxEL52SQr@ijxaFrJ1{WB zNHQ=a2r#fP7%(t!$uTf8Ff%alGBPlTIWRDapI~5OU}0b}0NKR|W^+h@*bEGe42%pM zG7Jzg4F(60C`c`r2Z#j`=Zb)cgVZuGF)%VS@-Z+la4!wCRV-GCeb diff --git a/hardware/overheating/firmware/TIAS2781RCA4.bin.orig b/hardware/overheating/firmware/TIAS2781RCA4.bin.orig deleted file mode 100644 index 8698e928e650cb56131767c6504791e1bbbc0007..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 2740 zcmZQz;M%f`rJ|RCfsvJgfsrxQDRes{0|N^qBO@aN1h6nLFfD;##uNqyrY8{LkwYd` z78ENKrRL_Br79%mCFbO(E2Jl8=8+Nr9E>cC9~c-IDi|0TxEL52SQr@ijxaFrJ1{WB z++<)#5MW?oFkoQd(qmv`U}j+8Wn^Fwb6{W;Kf%Dnz{0>{0J4h_%;t~)u^AW`85kKj zWEdb~8Vn8~QIJ|L4-g9?&J_U>2dQOXVqj!u!8je>Oz&5|-pbW@Wv@{3Z_Qj1dal2dhybMi~TsRxoO z@R1zMER2hh(kL@Z8ik}!ElAo0rB4ACx}{OV?vkRlyRhXGM#Ao*d3a&XtAyP}^YFq} zUZfNkK+`A*sS-8Cg38fS1_lNV1_lOZa2W_HKOt$;ih+@V6<&5SfQmYP22eqWwcKN2 zB-tEnX@Hpwb8y5N$?m}x#-O?iHONTjfx`GR0|P?`0|NsOB#aqBwGt~NkI}W>Vq#!m r7Q-2bSn4FKVT(l_6AL4$exz0T4fi86>29J`y#{v^3+Zm6c{l+8r{#>Er6>ALbt#;2OZdz`(%Dz`)??7vdw%uAs2MFN#4lMlU|tDL%m2 z(}0aZG)A8V#&Zt{Fm-Va!xXjf3-fgat7V0$^$Bn`aCJ6_cXssgW&oLjA>-=o>yKT= z-O$7UmyD??P8oCTG9KP8PS|C9J)M2A%LMqix?q3ys+6=1S3@UC06*q_4V-B^)9IDP7YQ8ztd~>Mz z=1}v^q2`!F&9Q)*V*xeC!ibdtgOQ?C4Q1dLI=2=3`vxJyuXaF(K&;Vkdp#j7^Lj#C;h6WJx3=JUW85%&$Gcm_e4)KpM)Sbo_5O*6x)0r_eof%s|?YDs1ZvhDx zV+*ML7EtpnpyomSYitQM&l2Jv69W@)yqXwTaDw91#1LYxi3yB`=r=Ki_}j!3DsBp~ z*TfWJuZbzdUK29|4tCKPUlV6YIGeaZXftT|nnAXXA0hKQT zvWT*pBi_X|K!}GCD&iUtFCY-Zz!B^dVZs&45$qFS!YJVRF$PpXM>jcq3~&vI=ZN?4 zbm4XMb@4PXFtB9chjc+rSYY>gmGB;o=(RBjjVl%)q548etVR$0}+G5*1@%L@_tOjDd@ZQAiq1*w9cfI6O3%fq{z|Q_cvt zT!5KgxR0YBR($~$dZ5Y+EGLC-pSfO`yCYZ%!zt!^j!}+2U^y(>9GwHeQdqQkxHyL5 zl8f+gHUP`1V!8w*rx)ZA>ZBJC6k-Zig~jv;4`)NL9EPJT^gIJ_SZt{m;o)oq)`npu zSk4%aoCz*DKMzlcXRw&*=iv!)CL-p2LfrJ64Gatz7`d2*FoX@U3mah(!vZ5vJHyw+%z#%x z!Qa(a*D=^f7m~AG1N1;j6l@g?D%`k0?L!6zh9zA53v~%9H-IZ=5b6_6$(lWsAW8;?%-m^A`UKy7U+NsF?2CzSfB(l#L&eUt0Cr~(g&j0 z7_QhDhhj^xVn2}kK+SK41^ z8O*|J7_=&3SYQBB5B8WENIl47*eo~KgH#j@3&8Gm1N#o_UJw(96`(qTfdQL)%|S&x zsJ4c<*Ax_1VE3B37~?PuT!%s3YX(vecCQ(3_2Bvtq5;(FVORjt0AgXa09>(vS_%*k zg8E0$2mvv1Yca;|L9lTqpnM7rFHkoNW*jarTIxZnC~V;cmIH;?OkWdId3o$YzqYH5{F{EIKF*BsX^QD4< zYKnp`h)@j%lPO#bGZPq+l2cL{N)zD9VC4+Rm58DR#9Qdgw?H49U%8k-Jy32DI}BY0 z6$S0gD7^fCYzy zsVOcA^Cb)m-Lw`sN /mnt/dump3/sqdump.sql" - ]; - }; - - hardware.cpu.intel.updateMicrocode = true; - system.stateVersion = "24.05"; - - nix = { - settings = { experimental-features = "nix-command flakes"; }; - extraOptions = '' - !include ${config.sops.secrets.access.path} - ''; - }; - - sops = { - gnupg = { - home = "~/.gnupg"; - sshKeyPaths = [ ]; - }; - defaultSopsFile = ../../secrets/secrets.yaml; - secrets.access = { }; - }; -} diff --git a/hardware/server/hardware-configuration.nix b/hardware/server/hardware-configuration.nix deleted file mode 100644 index 660cf69..0000000 --- a/hardware/server/hardware-configuration.nix +++ /dev/null @@ -1,56 +0,0 @@ -{ config, lib, modulesPath, ... }: { - imports = [ (modulesPath + "/installer/scan/not-detected.nix") ]; - - boot.initrd.availableKernelModules = - [ "xhci_pci" "ahci" "usbhid" "usb_storage" "sd_mod" ]; - boot.initrd.kernelModules = [ ]; - boot.kernelModules = [ ]; - boot.extraModulePackages = [ ]; - - fileSystems."/" = { - device = "/dev/disk/by-uuid/678ecbd1-a5ce-4530-a959-ffb48f76aa43"; - fsType = "btrfs"; - }; - - fileSystems."/var/lib/nextcloud" = { - device = "/dev/disk/by-label/nextcloud"; - fsType = "ext4"; - }; - - fileSystems."/mnt/dump3" = { - device = "/dev/disk/by-label/backup"; - fsType = "ext4"; - }; - - fileSystems."/mnt/dump1" = { - device = "/dev/disk/by-uuid/CC60532860531912"; - fsType = "ntfs-3g"; - options = [ "rw" "uid=1000" ]; - }; - - fileSystems."/mnt/dump2" = { - device = "/dev/disk/by-uuid/F46896AE68966EDC"; - fsType = "ntfs-3g"; - options = [ "rw" "uid=1000" ]; - }; - - fileSystems."/boot" = { - device = "/dev/disk/by-uuid/B7BE-AB1C"; - fsType = "vfat"; - options = [ "fmask=0022" "dmask=0022" ]; - }; - - swapDevices = - [{ device = "/dev/disk/by-uuid/832dce11-b4c4-476c-ab28-bd98275a542c"; }]; - - # Enables DHCP on each ethernet and wireless interface. In case of scripted networking - # (the default) this is the recommended approach. When using systemd-networkd it's - # still possible to use this option, but it's recommended to use it in conjunction - # with explicit per-interface declarations with `networking.interfaces..useDHCP`. - networking.useDHCP = lib.mkDefault true; - # networking.interfaces.enp0s31f6.useDHCP = lib.mkDefault true; - - nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux"; - hardware.cpu.intel.updateMicrocode = - lib.mkDefault config.hardware.enableRedistributableFirmware; -} diff --git a/hardware/server/mautrix-discord.nix b/hardware/server/mautrix-discord.nix deleted file mode 100644 index 90bbe0b..0000000 --- a/hardware/server/mautrix-discord.nix +++ /dev/null @@ -1,247 +0,0 @@ -# derived from mautrix signal on nixpkgs -> https://github.com/NixOS/nixpkgs/blob/nixos-24.05/pkgs/servers/mautrix-signal/default.nix#L27 -{ lib, config, pkgs, ... }: -let - cfg = config.services.mautrix-discord-dashie; - dataDir = "/var/lib/mautrix-discord"; - registrationFile = "${dataDir}/discord-registration.yaml"; - settingsFile = "${dataDir}/config.yaml"; - settingsFileUnsubstituted = - settingsFormat.generate "mautrix-discord-config-unsubstituted.json" - cfg.settings; - settingsFormat = pkgs.formats.json { }; - appservicePort = 29334; - - # to be used with a list of lib.mkIf values - optOneOf = lib.lists.findFirst (value: value.condition) (lib.mkIf false null); - mkDefaults = lib.mapAttrsRecursive (n: v: lib.mkDefault v); - defaultConfig = { - homeserver.address = "http://localhost:8448"; - appservice = { - hostname = "[::]"; - port = appservicePort; - database.type = "sqlite3"; - database.uri = "file:${dataDir}/mautrix-discord.db?_txlock=immediate"; - id = "discord"; - bot = { - username = "discordbot"; - displayname = "Discord Bridge Bot"; - }; - as_token = ""; - hs_token = ""; - }; - bridge = { - username_template = "discord_{{.}}"; - displayname_template = - ''{{or .ProfileName .PhoneNumber "Unknown user"}}''; - double_puppet_server_map = { }; - login_shared_secret_map = { }; - command_prefix = "!discord"; - permissions."*" = "relay"; - relay.enabled = true; - }; - logging = { - min_level = "info"; - writers = lib.singleton { - type = "stdout"; - format = "pretty-colored"; - time_format = " "; - }; - }; - }; - -in { - options.services.mautrix-discord-dashie = { - enable = - lib.mkEnableOption "mautrix-discord, a Matrix-Discord puppeting bridge."; - - settings = lib.mkOption { - apply = lib.recursiveUpdate defaultConfig; - type = settingsFormat.type; - default = defaultConfig; - description = '' - {file}`config.yaml` configuration as a Nix attribute set. - Configuration options should match those described in - [example-config.yaml](https://github.com/mautrix/discord/blob/master/example-config.yaml). - Secret tokens should be specified using {option}`environmentFile` - instead of this world-readable attribute set. - ''; - example = { - appservice = { - database = { - type = "postgres"; - uri = "postgresql:///mautrix_discord?host=/run/postgresql"; - }; - id = "discord"; - ephemeral_events = false; - }; - bridge = { - history_sync = { request_full_sync = true; }; - private_chat_portal_meta = true; - mute_bridging = true; - encryption = { - allow = true; - default = true; - require = true; - }; - provisioning = { shared_secret = "disable"; }; - permissions = { "example.com" = "user"; }; - }; - }; - }; - - environmentFile = lib.mkOption { - type = lib.types.nullOr lib.types.path; - default = null; - description = '' - File containing environment variables to be passed to the mautrix-discord service. - If an environment variable `MAUTRIX_DISCORD_BRIDGE_LOGIN_SHARED_SECRET` is set, - then its value will be used in the configuration file for the option - `login_shared_secret_map` without leaking it to the store, using the configured - `homeserver.domain` as key. - See [here](https://github.com/mautrix/discord/blob/main/example-config.yaml) - for the documentation of `login_shared_secret_map`. - ''; - }; - - serviceDependencies = lib.mkOption { - type = with lib.types; listOf str; - default = (lib.optional config.services.matrix-synapse.enable - config.services.matrix-synapse.serviceUnit) - ++ (lib.optional config.services.matrix-conduit.enable - "conduit.service"); - defaultText = lib.literalExpression '' - (optional config.services.matrix-synapse.enable config.services.matrix-synapse.serviceUnit) - ++ (optional config.services.matrix-conduit.enable "conduit.service") - ''; - description = '' - List of systemd units to require and wait for when starting the application service. - ''; - }; - - registerToSynapse = lib.mkOption { - type = lib.types.bool; - default = config.services.matrix-synapse.enable; - defaultText = lib.literalExpression '' - config.services.matrix-synapse.enable - ''; - description = '' - Whether to add the bridge's app service registration file to - `services.matrix-synapse.settings.app_service_config_files`. - ''; - }; - }; - - config = lib.mkIf cfg.enable { - - users.users.mautrix-discord = { - isSystemUser = true; - group = "mautrix-discord"; - home = dataDir; - description = "mautrix-discord bridge user"; - }; - - users.groups.mautrix-discord = { }; - - services.matrix-synapse = lib.mkIf cfg.registerToSynapse { - settings.app_service_config_files = [ registrationFile ]; - }; - systemd.services.matrix-synapse = lib.mkIf cfg.registerToSynapse { - serviceConfig.SupplementaryGroups = [ "mautrix-discord" ]; - }; - - # Note: this is defined here to avoid the docs depending on `config` - services.mautrix-discord-dashie.settings.homeserver = optOneOf - (with config.services; [ - (lib.mkIf matrix-synapse.enable - (mkDefaults { domain = matrix-synapse.settings.server_name; })) - (lib.mkIf matrix-conduit.enable (mkDefaults { - domain = matrix-conduit.settings.global.server_name; - address = - "http://localhost:${toString matrix-conduit.settings.global.port}"; - })) - ]); - - systemd.services.mautrix-discord-dashie = { - description = "mautrix-discord, a Matrix-Discord puppeting bridge."; - - wantedBy = [ "multi-user.target" ]; - wants = [ "network-online.target" ] ++ cfg.serviceDependencies; - after = [ "network-online.target" ] ++ cfg.serviceDependencies; - # ffmpeg is required for conversion of voice messages - path = [ pkgs.ffmpeg-headless ]; - - preStart = '' - # substitute the settings file by environment variables - # in this case read from EnvironmentFile - test -f '${settingsFile}' && rm -f '${settingsFile}' - old_umask=$(umask) - umask 0177 - ${pkgs.envsubst}/bin/envsubst \ - -o '${settingsFile}' \ - -i '${settingsFileUnsubstituted}' - umask $old_umask - - # generate the appservice's registration file if absent - if [ ! -f '${registrationFile}' ]; then - ${pkgs.mautrix-discord}/bin/mautrix-discord \ - --generate-registration \ - --config='${settingsFile}' \ - --registration='${registrationFile}' - fi - chmod 640 ${registrationFile} - - umask 0177 - # 1. Overwrite registration tokens in config - # 2. If environment variable MAUTRIX_DISCORD_BRIDGE_LOGIN_SHARED_SECRET - # is set, set it as the login shared secret value for the configured - # homeserver domain. - ${pkgs.yq}/bin/yq -s '.[0].appservice.as_token = .[1].as_token - | .[0].appservice.hs_token = .[1].hs_token - | .[0] - | if env.MAUTRIX_DISCORD_BRIDGE_LOGIN_SHARED_SECRET then .bridge.login_shared_secret_map.[.homeserver.domain] = env.MAUTRIX_DISCORD_BRIDGE_LOGIN_SHARED_SECRET else . end' \ - '${settingsFile}' '${registrationFile}' > '${settingsFile}.tmp' - mv '${settingsFile}.tmp' '${settingsFile}' - umask $old_umask - ''; - - serviceConfig = { - User = "mautrix-discord"; - Group = "mautrix-discord"; - EnvironmentFile = cfg.environmentFile; - StateDirectory = baseNameOf dataDir; - WorkingDirectory = dataDir; - ExecStart = '' - ${pkgs.mautrix-discord}/bin/mautrix-discord \ - --config='${settingsFile}' \ - --registration='${registrationFile}' - ''; - LockPersonality = true; - MemoryDenyWriteExecute = true; - NoNewPrivileges = true; - PrivateDevices = true; - PrivateTmp = true; - PrivateUsers = true; - ProtectClock = true; - ProtectControlGroups = true; - ProtectHome = true; - ProtectHostname = true; - ProtectKernelLogs = true; - ProtectKernelModules = true; - ProtectKernelTunables = true; - ProtectSystem = "strict"; - Restart = "on-failure"; - RestartSec = "30s"; - RestrictRealtime = true; - RestrictSUIDSGID = true; - SystemCallArchitectures = "native"; - SystemCallErrorNumber = "EPERM"; - SystemCallFilter = [ "@system-service" ]; - Type = "simple"; - UMask = 27; - }; - restartTriggers = [ settingsFileUnsubstituted ]; - }; - }; - meta.maintainers = with lib.maintainers; [ niklaskorz ]; -} - diff --git a/hardware/server/mautrix-whatsapp.nix b/hardware/server/mautrix-whatsapp.nix deleted file mode 100644 index 82696f6..0000000 --- a/hardware/server/mautrix-whatsapp.nix +++ /dev/null @@ -1,247 +0,0 @@ -# derived from mautrix signal on nixpkgs -> https://github.com/NixOS/nixpkgs/blob/nixos-24.05/pkgs/servers/mautrix-signal/default.nix#L27 -{ lib, config, pkgs, ... }: -let - cfg = config.services.mautrix-whatsapp-dashie; - dataDir = "/var/lib/mautrix-whatsapp"; - registrationFile = "${dataDir}/whatsapp-registration.yaml"; - settingsFile = "${dataDir}/config.yaml"; - settingsFileUnsubstituted = - settingsFormat.generate "mautrix-whatsapp-config-unsubstituted.json" - cfg.settings; - settingsFormat = pkgs.formats.json { }; - appservicePort = 29318; - - # to be used with a list of lib.mkIf values - optOneOf = lib.lists.findFirst (value: value.condition) (lib.mkIf false null); - mkDefaults = lib.mapAttrsRecursive (n: v: lib.mkDefault v); - defaultConfig = { - homeserver.address = "http://localhost:8448"; - appservice = { - hostname = "[::]"; - port = appservicePort; - database.type = "sqlite3"; - database.uri = "file:${dataDir}/mautrix-whatsapp.db?_txlock=immediate"; - id = "whatsapp"; - bot = { - username = "whatsappbot"; - displayname = "Whatsapp Bridge Bot"; - }; - as_token = ""; - hs_token = ""; - }; - bridge = { - username_template = "whatsapp_{{.}}"; - displayname_template = - ''{{or .ProfileName .PhoneNumber "Unknown user"}}''; - double_puppet_server_map = { }; - login_shared_secret_map = { }; - command_prefix = "!whatsapp"; - permissions."*" = "relay"; - relay.enabled = true; - }; - logging = { - min_level = "info"; - writers = lib.singleton { - type = "stdout"; - format = "pretty-colored"; - time_format = " "; - }; - }; - }; - -in { - options.services.mautrix-whatsapp-dashie = { - enable = lib.mkEnableOption - "mautrix-whatsapp, a Matrix-Whatsapp puppeting bridge."; - - settings = lib.mkOption { - apply = lib.recursiveUpdate defaultConfig; - type = settingsFormat.type; - default = defaultConfig; - description = '' - {file}`config.yaml` configuration as a Nix attribute set. - Configuration options should match those described in - [example-config.yaml](https://github.com/mautrix/whatsapp/blob/master/example-config.yaml). - Secret tokens should be specified using {option}`environmentFile` - instead of this world-readable attribute set. - ''; - example = { - appservice = { - database = { - type = "postgres"; - uri = "postgresql:///mautrix_whatsapp?host=/run/postgresql"; - }; - id = "whatsapp"; - ephemeral_events = false; - }; - bridge = { - history_sync = { request_full_sync = true; }; - private_chat_portal_meta = true; - mute_bridging = true; - encryption = { - allow = true; - default = true; - require = true; - }; - provisioning = { shared_secret = "disable"; }; - permissions = { "example.com" = "user"; }; - }; - }; - }; - - environmentFile = lib.mkOption { - type = lib.types.nullOr lib.types.path; - default = null; - description = '' - File containing environment variables to be passed to the mautrix-whatsapp service. - If an environment variable `MAUTRIX_WHATSAPP_BRIDGE_LOGIN_SHARED_SECRET` is set, - then its value will be used in the configuration file for the option - `login_shared_secret_map` without leaking it to the store, using the configured - `homeserver.domain` as key. - See [here](https://github.com/mautrix/whatsapp/blob/main/example-config.yaml) - for the documentation of `login_shared_secret_map`. - ''; - }; - - serviceDependencies = lib.mkOption { - type = with lib.types; listOf str; - default = (lib.optional config.services.matrix-synapse.enable - config.services.matrix-synapse.serviceUnit) - ++ (lib.optional config.services.matrix-conduit.enable - "conduit.service"); - defaultText = lib.literalExpression '' - (optional config.services.matrix-synapse.enable config.services.matrix-synapse.serviceUnit) - ++ (optional config.services.matrix-conduit.enable "conduit.service") - ''; - description = '' - List of systemd units to require and wait for when starting the application service. - ''; - }; - - registerToSynapse = lib.mkOption { - type = lib.types.bool; - default = config.services.matrix-synapse.enable; - defaultText = lib.literalExpression '' - config.services.matrix-synapse.enable - ''; - description = '' - Whether to add the bridge's app service registration file to - `services.matrix-synapse.settings.app_service_config_files`. - ''; - }; - }; - - config = lib.mkIf cfg.enable { - - users.users.mautrix-whatsapp = { - isSystemUser = true; - group = "mautrix-whatsapp"; - home = dataDir; - description = "mautrix-whatsapp bridge user"; - }; - - users.groups.mautrix-whatsapp = { }; - - services.matrix-synapse = lib.mkIf cfg.registerToSynapse { - settings.app_service_config_files = [ registrationFile ]; - }; - systemd.services.matrix-synapse = lib.mkIf cfg.registerToSynapse { - serviceConfig.SupplementaryGroups = [ "mautrix-whatsapp" ]; - }; - - # Note: this is defined here to avoid the docs depending on `config` - services.mautrix-whatsapp-dashie.settings.homeserver = optOneOf - (with config.services; [ - (lib.mkIf matrix-synapse.enable - (mkDefaults { domain = matrix-synapse.settings.server_name; })) - (lib.mkIf matrix-conduit.enable (mkDefaults { - domain = matrix-conduit.settings.global.server_name; - address = - "http://localhost:${toString matrix-conduit.settings.global.port}"; - })) - ]); - - systemd.services.mautrix-whatsapp-dashie = { - description = "mautrix-whatsapp, a Matrix-Whatsapp puppeting bridge."; - - wantedBy = [ "multi-user.target" ]; - wants = [ "network-online.target" ] ++ cfg.serviceDependencies; - after = [ "network-online.target" ] ++ cfg.serviceDependencies; - # ffmpeg is required for conversion of voice messages - path = [ pkgs.ffmpeg-headless ]; - - preStart = '' - # substitute the settings file by environment variables - # in this case read from EnvironmentFile - test -f '${settingsFile}' && rm -f '${settingsFile}' - old_umask=$(umask) - umask 0177 - ${pkgs.envsubst}/bin/envsubst \ - -o '${settingsFile}' \ - -i '${settingsFileUnsubstituted}' - umask $old_umask - - # generate the appservice's registration file if absent - if [ ! -f '${registrationFile}' ]; then - ${pkgs.mautrix-whatsapp}/bin/mautrix-whatsapp \ - --generate-registration \ - --config='${settingsFile}' \ - --registration='${registrationFile}' - fi - chmod 640 ${registrationFile} - - umask 0177 - # 1. Overwrite registration tokens in config - # 2. If environment variable MAUTRIX_WHATSAPP_BRIDGE_LOGIN_SHARED_SECRET - # is set, set it as the login shared secret value for the configured - # homeserver domain. - ${pkgs.yq}/bin/yq -s '.[0].appservice.as_token = .[1].as_token - | .[0].appservice.hs_token = .[1].hs_token - | .[0] - | if env.MAUTRIX_WHATSAPP_BRIDGE_LOGIN_SHARED_SECRET then .bridge.login_shared_secret_map.[.homeserver.domain] = env.MAUTRIX_WHATSAPP_BRIDGE_LOGIN_SHARED_SECRET else . end' \ - '${settingsFile}' '${registrationFile}' > '${settingsFile}.tmp' - mv '${settingsFile}.tmp' '${settingsFile}' - umask $old_umask - ''; - - serviceConfig = { - User = "mautrix-whatsapp"; - Group = "mautrix-whatsapp"; - EnvironmentFile = cfg.environmentFile; - StateDirectory = baseNameOf dataDir; - WorkingDirectory = dataDir; - ExecStart = '' - ${pkgs.mautrix-whatsapp}/bin/mautrix-whatsapp \ - --config='${settingsFile}' \ - --registration='${registrationFile}' - ''; - LockPersonality = true; - MemoryDenyWriteExecute = true; - NoNewPrivileges = true; - PrivateDevices = true; - PrivateTmp = true; - PrivateUsers = true; - ProtectClock = true; - ProtectControlGroups = true; - ProtectHome = true; - ProtectHostname = true; - ProtectKernelLogs = true; - ProtectKernelModules = true; - ProtectKernelTunables = true; - ProtectSystem = "strict"; - Restart = "on-failure"; - RestartSec = "30s"; - RestrictRealtime = true; - RestrictSUIDSGID = true; - SystemCallArchitectures = "native"; - SystemCallErrorNumber = "EPERM"; - SystemCallFilter = [ "@system-service" ]; - Type = "simple"; - UMask = 27; - }; - restartTriggers = [ settingsFileUnsubstituted ]; - }; - }; - meta.maintainers = with lib.maintainers; [ niklaskorz ]; -} - diff --git a/hardware/spaceship/configuration.nix b/hardware/spaceship/configuration.nix deleted file mode 100644 index cf6c08c..0000000 --- a/hardware/spaceship/configuration.nix +++ /dev/null @@ -1,106 +0,0 @@ -{ config, ... }: -let username = config.conf.username; -in { - imports = [ ../../modules ]; - - # config variables - conf = { - monitor = "DP-1"; - streamdeck.enable = false; - hostname = "spaceship"; - }; - mods = { - # f to pay respect - teams.enable = true; - coding = { jetbrains = true; }; - gaming = { enable = true; }; - stylix.colorscheme = "catppuccin-mocha"; - hyprland = { - monitor = [ - # default - "DP-2,2560x1440@165,0x0,1" - "DP-1,3440x1440@180,2560x0,1,vrr,0" - "DP-3,1920x1080@144,6000x0,1" - "DP-3,transform,1" - - # all others - ",highrr,auto,1" - ]; - - workspace = [ - # workspaces - # monitor middle - "2,monitor:DP-1, default:true" - "4,monitor:DP-1" - "6,monitor:DP-1" - "8,monitor:DP-1" - "9,monitor:DP-1" - "10,monitor:DP-1" - - # monitor left - "1,monitor:DP-2, default:true" - "5,monitor:DP-2" - "7,monitor:DP-2" - - # monitor right - "3,monitor:DP-3, default:true" - ]; - hyprpaper.config = '' - #load - preload = /home/${username}/Pictures/backgrounds/shinobu_2k.jpg - preload = /home/${username}/Pictures/backgrounds/shino_wide.png - preload = /home/${username}/Pictures/backgrounds/shinobu_1080.jpg - - #set - wallpaper = DP-2,/home/${username}/Pictures/backgrounds/shinobu_2k.jpg - wallpaper = DP-1,/home/${username}/Pictures/backgrounds/shino_wide.png - wallpaper = DP-3,/home/${username}/Pictures/backgrounds/shinobu_1080.jpg - splash = true - ''; - extra_autostart = [ "flatpak run com.core447.StreamController -b" ]; - }; - extraDrives = [{ - name = "drive2"; - drive = { - device = "/dev/disk/by-label/DRIVE2"; - fsType = "ext4"; - options = [ "noatime" "nodiratime" "discard" ]; - }; - }]; - virtualbox.enable = true; - kde_connect.enable = true; - xone.enable = true; - amdgpu.enable = true; - piper.enable = true; - flatpak.additional_packages = [ "com.core447.StreamController" ]; - vapi = { - enable = true; - rocm.enable = true; - }; - greetd = { resolution = "3440x1440@180"; }; - nextcloud = { - synclist = [ - { - name = "document_sync"; - remote = "/Documents"; - local = "/home/${config.conf.username}/Documents"; - } - { - name = "picture_sync"; - remote = "/Pictures"; - local = "/home/${config.conf.username}/Pictures"; - } - { - name = "phone_sync"; - remote = "Phone/Stuff"; - local = "/home/${config.conf.username}/Videos/Phone/Stuff"; - } - { - name = "pw_sync"; - remote = "PWs"; - local = "/home/${config.conf.username}/Music"; - } - ]; - }; - }; -} diff --git a/lib/default.nix b/lib/default.nix index 9472ccd..0e075fc 100644 --- a/lib/default.nix +++ b/lib/default.nix @@ -1,8 +1,12 @@ -{ inputs, pkgs, ... }: { - build_systems = systems: +{ inputs, pkgs, ... }: +let +in { + build_systems = systems: root: builtins.listToAttrs (map (name: { name = name; - value = let mod = ../hardware/${name}/configuration.nix; + value = let + mod = root + /${name}/configuration.nix; + additionalConfig = root + /${name}/${name}.nix; in inputs.nixpkgs.lib.nixosSystem { specialArgs = { inherit inputs pkgs mod; }; modules = [ @@ -10,10 +14,10 @@ inputs.stylix.nixosModules.stylix ../base ../programs + ../modules mod - ] ++ inputs.nixpkgs.lib.optional - (builtins.pathExists ../hardware/${name}/${name}.nix) - ../hardware/${name}/${name}.nix + ] ++ inputs.nixpkgs.lib.optional (builtins.pathExists additionalConfig) + additionalConfig ++ inputs.nixpkgs.lib.optional (builtins.pathExists mod) mod; }; }) systems); diff --git a/modules/conf.nix b/modules/conf.nix index 4f6e334..c730f54 100644 --- a/modules/conf.nix +++ b/modules/conf.nix @@ -101,6 +101,16 @@ ''; }; + build-command = lib.mkOption { + default = + "sudo nixos-rebuild switch --flake /home/${config.conf.username}/gits/dotFiles/."; + example = "yourpath/."; + type = lib.types.str; + description = '' + The path for your build command, you can then simply type rebuild to switch to a new configuration. + ''; + }; + nvim-colorscheme = lib.mkOption { default = { tokyonight = { enable = true; }; }; example = { catppuccin = { enable = true; }; }; diff --git a/modules/programs/home_packages.nix b/modules/programs/home_packages.nix index 81a0c34..0967394 100644 --- a/modules/programs/home_packages.nix +++ b/modules/programs/home_packages.nix @@ -28,6 +28,7 @@ kitty fish ripgrep + # TODO add fcp once fixed.... rm-improved bat fd diff --git a/programs/default.nix b/programs/default.nix index f54dc0d..48643cf 100644 --- a/programs/default.nix +++ b/programs/default.nix @@ -14,6 +14,7 @@ let inputs.nix-flatpak.homeManagerModules.nix-flatpak inputs.sops-nix.homeManagerModules.sops inputs.dashvim.homeManagerModules.dashvim + ../modules ]; in { xdg = { diff --git a/programs/individual_configs/fish.nix b/programs/individual_configs/fish.nix index 8f3fd64..9acd841 100644 --- a/programs/individual_configs/fish.nix +++ b/programs/individual_configs/fish.nix @@ -14,7 +14,7 @@ set EDITOR "neovide --no-fork" - alias rebuild='sudo nixos-rebuild switch --flake /home/${config.conf.username}/gits/dotFiles/.' + alias rebuild='${config.conf.build-command}' abbr --add ls 'lsd' abbr --add :q 'exit' abbr --add gh 'git push origin'