diff --git a/clan.nix b/clan.nix index b4429a9..26f7e97 100644 --- a/clan.nix +++ b/clan.nix @@ -65,7 +65,7 @@ }; inventory.instances = { - user-chris = { + users-chris = { module.name = "users"; module.input = "clan-core"; @@ -82,12 +82,4 @@ }; }; }; - - # machines = { - # mandos = {}; - # manwe = {}; - # orome = {}; - # tulkas = {}; - # ulmo = {}; - # }; } diff --git a/machines/manwe/configuration.nix b/machines/manwe/configuration.nix index ec052be..98bc5ed 100644 --- a/machines/manwe/configuration.nix +++ b/machines/manwe/configuration.nix @@ -1,16 +1,51 @@ -{ pkgs, ...}: { +{ + self, + lib, + pkgs, + ... +}: { + _module.args = { + pkgs = lib.mkForce (import self.inputs.nixpkgs { + system = "x86_64-linux"; + + overlays = with self.inputs; [ + fenix.overlays.default + nix-minecraft.overlay + flux.overlays.default + ]; + + config = { + allowUnfree = true; + + permittedInsecurePackages = [ + # I think this is because of zen + "qtwebengine-5.15.19" + + # For mautrix-signal, the matrix to signal bridge + "olm-3.2.16" + ]; + }; + }); + }; + imports = [ ./disks.nix ./hardware.nix + self.inputs.home-manager.nixosModules.home-manager + self.inputs.himmelblau.nixosModules.himmelblau + self.inputs.jovian.nixosModules.default + self.inputs.mydia.nixosModules.default + self.inputs.nix-minecraft.nixosModules.minecraft-servers + self.inputs.nvf.nixosModules.default + self.inputs.sops-nix.nixosModules.sops + (self.inputs.import-tree ../../modules/nixos) ]; - nixpkgs.hostPlatform = "x86_64-linux"; - system.activationScripts.remove-gtkrc.text = "rm -f /home/chris/.gtkrc-2.0"; services.logrotate.checkConfig = false; - environment.systemPackages = with pkgs; [ beyond-all-reason openrct2 ]; + environment.systemPackages = with pkgs; [beyond-all-reason openrct2]; sneeuwvlok = { hardware.has = { @@ -41,4 +76,4 @@ }; system.stateVersion = "23.11"; -} \ No newline at end of file +} diff --git a/machines/manwe/hardware.nix b/machines/manwe/hardware.nix index 3686637..8c48c1c 100644 --- a/machines/manwe/hardware.nix +++ b/machines/manwe/hardware.nix @@ -1,18 +1,18 @@ -{ config, lib, pkgs, modulesPath, ... }: -let - inherit (lib.modules) mkDefault; -in { - imports = [ (modulesPath + "/installer/scan/not-detected.nix") ]; - + config, + lib, + ... +}: let + inherit (lib.modules) mkDefault; +in { boot = { - initrd.availableKernelModules = [ "xhci_pci" "ahci" "usb_storage" "usbhid" "sd_mod" ]; - initrd.kernelModules = [ ]; - kernelModules = [ "kvm-amd" ]; + initrd.availableKernelModules = ["xhci_pci" "ahci" "usb_storage" "usbhid" "sd_mod"]; + initrd.kernelModules = []; + kernelModules = ["kvm-amd"]; kernelParams = []; - extraModulePackages = [ ]; + extraModulePackages = []; }; - nixpkgs.hostPlatform = mkDefault pkgs.stdenv.hostPlatform.system; + nixpkgs.hostPlatform = "x86_64-linux"; hardware.cpu.amd.updateMicrocode = mkDefault config.hardware.enableRedistributableFirmware; } diff --git a/modules/nixos/services/networking/wireguard/default.nix b/modules/nixos/services/networking/wireguard/default.nix index 01534c0..364395b 100644 --- a/modules/nixos/services/networking/wireguard/default.nix +++ b/modules/nixos/services/networking/wireguard/default.nix @@ -11,7 +11,7 @@ hasPeers = (cfg.peer |> attrNames |> length) > 0; in { options.sneeuwvlok.services.networking.wireguard = { - # enable = mkEnableOption "enable wireguard" // {default = true;}; + enable = mkEnableOption "enable wireguard" // {default = true;}; peer = mkOption { type = types.attrsOf (types.submodule { @@ -32,7 +32,7 @@ in { }; }; - config = mkIf hasPeers { + config = mkIf (cfg.enable && hasPeers) { # networking.firewall.allowedUDPPorts = cfg.peer |> lib.attrValues |> lib.map (p: p.port); # networking.wq-quick = { # # enable = cfg.enable;