meta: Build fixes

This commit is contained in:
Mr Hedgehog 2022-06-09 17:15:13 -04:00
parent cd6c59354d
commit 6ef09611a2
No known key found for this signature in database
6 changed files with 28 additions and 80 deletions

View file

@ -12,8 +12,6 @@
nixpkgs.url = "github:nixos/nixpkgs/nixpkgs-unstable"; nixpkgs.url = "github:nixos/nixpkgs/nixpkgs-unstable";
nixos-unstable.url = "github:nixos/nixpkgs/nixos-unstable"; nixos-unstable.url = "github:nixos/nixpkgs/nixos-unstable";
nixos-hardware.url = "github:nixos/nixos-hardware"; nixos-hardware.url = "github:nixos/nixos-hardware";
# my-nixpkgs.url = "github:ModdedGamers/nixpkgs/python-gasp-init";
# my-nixpkgs.url = "path:/home/mrhedgehog/software/nixpkgs/coq_nvim-patches/";
agenix.url = "github:ryantm/agenix"; agenix.url = "github:ryantm/agenix";
agenix.inputs.nixpkgs.follows = "nixpkgs"; agenix.inputs.nixpkgs.follows = "nixpkgs";
alejandra.url = "github:kamadorueda/alejandra"; alejandra.url = "github:kamadorueda/alejandra";
@ -48,7 +46,6 @@
nixpkgs, nixpkgs,
nixos-unstable, nixos-unstable,
nixos-hardware, nixos-hardware,
# my-nixpkgs,
agenix, agenix,
alejandra, alejandra,
doom-emacs, doom-emacs,
@ -67,7 +64,6 @@
wayland, wayland,
}: let }: let
alejandra-overlay = final: prev: {alejandra = alejandra.defaultPackage.${prev.system};}; alejandra-overlay = final: prev: {alejandra = alejandra.defaultPackage.${prev.system};};
# my-nixpkgs-overlay = final: prev: {my-nixpkgs = import my-nixpkgs {inherit system;};};
nixpkgs-update-overlay = final: prev: {nixpkgs-update = nixpkgs-update.defaultPackage.${prev.system};}; nixpkgs-update-overlay = final: prev: {nixpkgs-update = nixpkgs-update.defaultPackage.${prev.system};};
my-pkgs = final: prev: {my-pkgs = self.packages."${prev.system}";}; my-pkgs = final: prev: {my-pkgs = self.packages."${prev.system}";};
@ -83,7 +79,6 @@
overlays = [ overlays = [
# (import ./pkgs/default.nix {inherit inputs;}) # (import ./pkgs/default.nix {inherit inputs;})
(import ./overlays/sumneko.nix) (import ./overlays/sumneko.nix)
# my-nixpkgs-overlay
my-pkgs my-pkgs
alejandra-overlay alejandra-overlay
emacs.overlay emacs.overlay
@ -98,20 +93,6 @@
}; };
lib = nixpkgs.lib; lib = nixpkgs.lib;
nixos-gen-config = {
pkgs = pkgs;
modules = [
./modules/caddy.nix
./hosts/prefect/configuration.nix
{inherit inputs pkgs;}
];
};
defaultSystem = {
modules = [
./modules/caddy.nix
];
};
in { in {
packages.${system} = { packages.${system} = {
"caddy" = pkgs.callPackage ./pkgs/caddy.nix {}; "caddy" = pkgs.callPackage ./pkgs/caddy.nix {};
@ -120,24 +101,6 @@
"taskwarrior-tui" = pkgs.callPackage ./pkgs/taskwarrior-tui.nix {}; "taskwarrior-tui" = pkgs.callPackage ./pkgs/taskwarrior-tui.nix {};
"tokyo-night-gtk" = pkgs.callPackage ./pkgs/tokyo-night-gtk.nix {}; "tokyo-night-gtk" = pkgs.callPackage ./pkgs/tokyo-night-gtk.nix {};
"pywalfox" = pkgs.callPackage ./pkgs/pywalfox.nix {}; "pywalfox" = pkgs.callPackage ./pkgs/pywalfox.nix {};
# NixOS image builders
iso = nixos-generators.nixosGenerate {
inherit (nixos-gen-config) pkgs modules;
format = "iso";
};
kexec = nixos-generators.nixosGenerate {
inherit (nixos-gen-config) pkgs modules;
format = "kexec-bundle";
};
vm = nixos-generators.nixosGenerate {
inherit (nixos-gen-config) pkgs modules;
format = "vm";
};
qemu-img = nixos-generators.nixosGenerate {
inherit (nixos-gen-config) pkgs modules;
format = "qcow";
};
}; };
nixosConfigurations.marvin = lib.nixosSystem { nixosConfigurations.marvin = lib.nixosSystem {
@ -147,7 +110,7 @@
./hosts/marvin/bootloader.nix ./hosts/marvin/bootloader.nix
./modules/caddy.nix ./modules/caddy.nix
]; ];
specialArgs = {inherit self inputs;}; specialArgs = {inherit self inputs pkgs;};
}; };
nixosConfigurations.prefect = lib.nixosSystem { nixosConfigurations.prefect = lib.nixosSystem {
system = "x86_64-linux"; system = "x86_64-linux";

View file

@ -14,11 +14,11 @@
}; };
kernelPackages = pkgs.linuxPackages_latest; kernelPackages = pkgs.linuxPackages_latest;
supportedFilesystems = lib.mkForce ["btrfs" "vfat" "f2fs"]; supportedFilesystems = lib.mkForce ["btrfs" "vfat" "f2fs"];
};
initrd = { initrd = {
availableKernelModules = [ "xhci_pci" "ahci" "nvme" "usbhid" "usb_storage" "sd_mod" ]; availableKernelModules = [ "xhci_pci" "ahci" "nvme" "usbhid" "usb_storage" "sd_mod" ];
kernelModules = [ ]; kernelModules = [ ];
}; };
kernelModules = [ "kvm-amd" ]; kernelModules = [ "kvm-amd" ];
extraModulePackages = [ ]; extraModulePackages = [ ];
};
} }

View file

@ -1,4 +1,4 @@
{ { lib, ...}: {
networking = { networking = {
hostName = "marvin"; hostName = "marvin";
enableIPv6 = true; enableIPv6 = true;
@ -11,23 +11,23 @@
enable = true; enable = true;
}; };
wireless.enable = false; wireless.enable = false;
wireguard = { # wireguard = {
enable = true; # enable = true;
interfaces = { # interfaces = {
wg42 = { # wg42 = {
allowedIPsAsRoutes = true; # allowedIPsAsRoutes = true;
ips = [ "172.20.43.110/32" ]; # ips = [ "172.20.43.110/32" ];
peers = [ # peers = [
{ # {
allowedIPs = [ "172.20.0.0/14" ]; # allowedIPs = [ "172.20.0.0/14" ];
dynamicEndpointRefreshSeconds = 10; # dynamicEndpointRefreshSeconds = 10;
endpoint = "65.108.0.219:488"; # endpoint = "65.108.0.219:488";
persistentKeepalive = 25; # persistentKeepalive = 25;
publicKey = "e6kp9sca4XIzncKa9GEQwyOnMjje299Xg9ZdgXWMwHg="; # publicKey = "e6kp9sca4XIzncKa9GEQwyOnMjje299Xg9ZdgXWMwHg=";
} # }
]; # ];
}; # };
}; # };
}; # };
}; };
} }

View file

@ -1,6 +1,7 @@
{ {
lib, lib,
pkgs, pkgs,
config,
... ...
}: { }: {
services.caddy = { services.caddy = {
@ -29,6 +30,5 @@
reverse_proxy http://localhost:4000 reverse_proxy http://localhost:4000
} }
''; '';
envFile = config.age.secrets.marvinCfToken.path;
}; };
} }

View file

@ -262,21 +262,6 @@ in {
certificates. certificates.
''; '';
}; };
token = mkOption {
default = "";
type = types.str;
description = ''
Cloudflare auth token. Suggested to not store this in plain text.
'';
};
envFile = mkOption {
default = /var/caddy/env;
type = types.path;
description = ''
A file that caddy reads environment variables from.
'';
};
}; };
# implementation # implementation

View file

@ -23,7 +23,7 @@ ${imports}
in buildGoModule rec { in buildGoModule rec {
pname = "caddy"; pname = "caddy";
version = "2.5.1"; version = "2.5.1";
runVend = true; proxyVendor = true;
subPackages = [ "cmd/caddy" ]; subPackages = [ "cmd/caddy" ];
src = fetchFromGitHub { src = fetchFromGitHub {