A complete reformatting to match nixpkgs-fmt
This commit is contained in:
@@ -1,2 +1,3 @@
|
||||
host
|
||||
result
|
||||
.pre-commit-config.yaml
|
||||
|
||||
+4
-2
@@ -4,10 +4,12 @@
|
||||
initialMonitors = [{
|
||||
hostname = "myself.thehellings.lan";
|
||||
ipAddress = "10.42.1.6";
|
||||
} {
|
||||
}
|
||||
{
|
||||
hostname = "jeremiah.thehellings.lan";
|
||||
ipAddress = "10.42.1.8";
|
||||
} {
|
||||
}
|
||||
{
|
||||
hostname = "hosea.thehellings.lan";
|
||||
ipAddress = "10.42.1.7";
|
||||
}];
|
||||
|
||||
@@ -4,6 +4,7 @@
|
||||
pre-commit-check = hooks.lib.${system}.run {
|
||||
src = ./.;
|
||||
hooks = {
|
||||
nixpkgs-fmt.enable = true;
|
||||
};
|
||||
};
|
||||
}
|
||||
|
||||
+2
-1
@@ -6,7 +6,8 @@
|
||||
|
||||
{
|
||||
imports =
|
||||
[ # Include the results of the hardware scan.
|
||||
[
|
||||
# Include the results of the hardware scan.
|
||||
./hardware-configuration.nix
|
||||
./modules/
|
||||
];
|
||||
|
||||
+10
-8
@@ -1,17 +1,18 @@
|
||||
{ inputs, overlays, ... }:
|
||||
let
|
||||
mac = {
|
||||
system ? "aarch64-darwin",
|
||||
name,
|
||||
channel ? inputs.nixunstable,
|
||||
hm ? inputs.hmunstable,
|
||||
extraMods ? []
|
||||
mac =
|
||||
{ system ? "aarch64-darwin"
|
||||
, name
|
||||
, channel ? inputs.nixunstable
|
||||
, hm ? inputs.hmunstable
|
||||
, extraMods ? [ ]
|
||||
}:
|
||||
let
|
||||
nixpkgs = import channel {
|
||||
inherit system overlays;
|
||||
};
|
||||
in inputs.darwin.lib.darwinSystem {
|
||||
in
|
||||
inputs.darwin.lib.darwinSystem {
|
||||
inherit system;
|
||||
specialArgs = { inherit nixpkgs; };
|
||||
modules = [
|
||||
@@ -27,7 +28,8 @@ let
|
||||
./${name}
|
||||
] ++ extraMods;
|
||||
};
|
||||
in rec {
|
||||
in
|
||||
rec {
|
||||
la23002 = mac { name = "ivr"; };
|
||||
LA23002 = la23002;
|
||||
}
|
||||
|
||||
@@ -40,7 +40,8 @@
|
||||
zed.url = "github:zed-industries/zed/v0.154.x";
|
||||
};
|
||||
|
||||
outputs = { self, ...}@inputs: let
|
||||
outputs = { self, ... }@inputs:
|
||||
let
|
||||
local_overlay = import ./overlays;
|
||||
overlays = [
|
||||
inputs.agenix.overlays.default
|
||||
@@ -50,7 +51,8 @@
|
||||
(_: _: { zed-editor = inputs.zed.packages.x86_64-linux.default; })
|
||||
];
|
||||
|
||||
in inputs.flake-parts.lib.mkFlake { inherit inputs; } {
|
||||
in
|
||||
inputs.flake-parts.lib.mkFlake { inherit inputs; } {
|
||||
systems = [ "x86_64-linux" "x86_64-darwin" "aarch64-linux" "aarch64-darwin" ];
|
||||
#checks = {
|
||||
# x86_64-linux = {
|
||||
@@ -76,7 +78,7 @@
|
||||
modules = import ./modules;
|
||||
};
|
||||
|
||||
perSystem = { pkgs, system, ... }: {
|
||||
perSystem = { pkgs, self', system, ... }: {
|
||||
_module.args.pkgs = import inputs.nixstable {
|
||||
inherit system overlays;
|
||||
};
|
||||
@@ -85,6 +87,7 @@
|
||||
|
||||
devShells = {
|
||||
default = pkgs.mkShell {
|
||||
inherit (self'.checks.pre-commit-check) shellHook;
|
||||
buildInputs = with pkgs; [
|
||||
bashInteractive
|
||||
curl
|
||||
|
||||
@@ -5,7 +5,8 @@
|
||||
|
||||
{
|
||||
imports =
|
||||
[ (modulesPath + "/installer/scan/not-detected.nix")
|
||||
[
|
||||
(modulesPath + "/installer/scan/not-detected.nix")
|
||||
];
|
||||
|
||||
boot.initrd.availableKernelModules = [ "xhci_pci" "thunderbolt" "nvme" "uas" "sd_mod" ];
|
||||
@@ -14,13 +15,15 @@
|
||||
boot.extraModulePackages = [ ];
|
||||
|
||||
fileSystems."/" =
|
||||
{ device = "/dev/disk/by-uuid/607b933f-2967-4652-b478-4d8e9aa38a0d";
|
||||
{
|
||||
device = "/dev/disk/by-uuid/607b933f-2967-4652-b478-4d8e9aa38a0d";
|
||||
fsType = "btrfs";
|
||||
options = [ "subvol=@" ];
|
||||
};
|
||||
|
||||
fileSystems."/boot" =
|
||||
{ device = "/dev/disk/by-uuid/B31C-C1F4";
|
||||
{
|
||||
device = "/dev/disk/by-uuid/B31C-C1F4";
|
||||
fsType = "vfat";
|
||||
};
|
||||
|
||||
|
||||
+5
-5
@@ -1,7 +1,6 @@
|
||||
{
|
||||
inputs,
|
||||
overlays,
|
||||
...
|
||||
{ inputs
|
||||
, overlays
|
||||
, ...
|
||||
}:
|
||||
|
||||
rec {
|
||||
@@ -9,7 +8,8 @@ rec {
|
||||
let
|
||||
system = "x86_64-linux";
|
||||
pkgs = (import inputs.nixunstable { inherit system overlays; });
|
||||
in inputs.hmunstable.lib.homeManagerConfiguration {
|
||||
in
|
||||
inputs.hmunstable.lib.homeManagerConfiguration {
|
||||
inherit pkgs;
|
||||
modules = [ ./home.nix ];
|
||||
extraSpecialArgs = {
|
||||
|
||||
+6
-4
@@ -1,7 +1,9 @@
|
||||
{ pkgs, lib,
|
||||
host ? "most",
|
||||
nixvim,
|
||||
...}:
|
||||
{ pkgs
|
||||
, lib
|
||||
, host ? "most"
|
||||
, nixvim
|
||||
, ...
|
||||
}:
|
||||
|
||||
{
|
||||
nixpkgs.config.allowUnfreePredicate = (_: true);
|
||||
|
||||
@@ -1,5 +1,3 @@
|
||||
{ ... }:
|
||||
|
||||
{
|
||||
|
||||
}
|
||||
{ }
|
||||
|
||||
@@ -22,7 +22,8 @@ let
|
||||
pkgs.pipenv-ivr
|
||||
]);
|
||||
};
|
||||
in {
|
||||
in
|
||||
{
|
||||
greg = {
|
||||
development = true;
|
||||
gui = true;
|
||||
|
||||
@@ -13,7 +13,9 @@
|
||||
amend = "commit --amend";
|
||||
};
|
||||
ignores = [
|
||||
".*.swp" ".*.swo" ".*.swn" # vim
|
||||
".*.swp"
|
||||
".*.swo"
|
||||
".*.swn" # vim
|
||||
".idea" # IntelliJ
|
||||
".DS_Store" # Macs
|
||||
"Thumbs.db" # Windows
|
||||
|
||||
@@ -17,7 +17,8 @@
|
||||
let
|
||||
nas = { user = "admin"; };
|
||||
owned = { user = "greg"; };
|
||||
in {
|
||||
in
|
||||
{
|
||||
inherit nas;
|
||||
|
||||
"*" = {
|
||||
|
||||
@@ -49,18 +49,22 @@ in
|
||||
wrap = false;
|
||||
writebackup = false;
|
||||
};
|
||||
keymaps = let
|
||||
keymaps =
|
||||
let
|
||||
winMove = key: { mode = "n"; key = "<C-${key}>"; action = "<C-w>${key}<C-w><CR>"; };
|
||||
in [ {
|
||||
in
|
||||
[{
|
||||
mode = "n";
|
||||
key = "<C-e>";
|
||||
action = "<Esc>:BufExplorer<CR>";
|
||||
} {
|
||||
}
|
||||
{
|
||||
mode = "n";
|
||||
key = "<C-t>";
|
||||
#action = "<Esc>:NERDTreeToggle<CR>";
|
||||
action = "<Esc>:Neotree toggle<CR>";
|
||||
} {
|
||||
}
|
||||
{
|
||||
mode = "n";
|
||||
key = "<C-g>";
|
||||
action = "<Esc>:Neotree float git_status toggle<CR>";
|
||||
@@ -68,8 +72,7 @@ in
|
||||
(winMove "h")
|
||||
(winMove "j")
|
||||
(winMove "k")
|
||||
(winMove "l")
|
||||
];
|
||||
(winMove "l")];
|
||||
plugins = {
|
||||
airline.enable = true;
|
||||
cmp = {
|
||||
|
||||
@@ -15,7 +15,8 @@ let
|
||||
process-compose
|
||||
zed-editor
|
||||
];
|
||||
in with lib; {
|
||||
in
|
||||
with lib; {
|
||||
options.greg.development = mkEnableOption "Setup necessary development packages";
|
||||
|
||||
config = mkIf config.greg.development {
|
||||
|
||||
@@ -4,7 +4,8 @@ let
|
||||
gv = lib.hm.gvariant;
|
||||
cfg = config.greg.gnome;
|
||||
|
||||
in {
|
||||
in
|
||||
{
|
||||
options.greg.gnome = lib.mkEnableOption "Enable Gnome support and settings";
|
||||
|
||||
config = (lib.mkIf cfg {
|
||||
|
||||
@@ -13,7 +13,8 @@ let
|
||||
vars = {
|
||||
XDG_CURRENT_DESKTOP = "GNOME";
|
||||
};
|
||||
in {
|
||||
in
|
||||
{
|
||||
options.greg.gui = lib.mkEnableOption "Enable GUI programs";
|
||||
|
||||
config = (lib.mkIf cfg {
|
||||
|
||||
@@ -7,129 +7,159 @@
|
||||
name = "Collection Index";
|
||||
url = "https://docs.ansible.com/ansible/latest/collections/index.html";
|
||||
}];
|
||||
} {
|
||||
}
|
||||
{
|
||||
name = "Church";
|
||||
bookmarks = [{
|
||||
name = "DC4K";
|
||||
url = "https://www.dc4k.org/leaderzone/articles";
|
||||
}];
|
||||
} {
|
||||
}
|
||||
{
|
||||
name = "IVR";
|
||||
bookmarks = [{
|
||||
name = "Dev";
|
||||
bookmarks = [{
|
||||
name = "Core Survey";
|
||||
url = "https://webdev5.ivrtechnology.com/coreservices/survey/admin/";
|
||||
} {
|
||||
}
|
||||
{
|
||||
name = "Audio";
|
||||
url = "https://apidev1.ivrtechnology.com/coreservices/audio/admin/";
|
||||
}];
|
||||
} {
|
||||
}
|
||||
{
|
||||
name = "HC";
|
||||
bookmarks = [{
|
||||
name = "Audio";
|
||||
url = "https://hcweb3.ivrtechnology.com/coreservices/audio/admin/";
|
||||
} {
|
||||
}
|
||||
{
|
||||
name = "Survey";
|
||||
url = "https://hcweb2.ivrtechnology.com/coreservices/survey/admin/";
|
||||
}];
|
||||
} {
|
||||
}
|
||||
{
|
||||
name = "PCI";
|
||||
bookmarks = [{
|
||||
name = "Audio";
|
||||
url = "https://pciweb3.ivrtechnology.com/coreservices/audio/admin/";
|
||||
}];
|
||||
} {
|
||||
}
|
||||
{
|
||||
name = "Processes";
|
||||
bookmarks = [{
|
||||
name = "Change Management";
|
||||
url = "https://ivrtg.atlassian.net/wiki/spaces/ITS/pages/13094842/Executing+Change+Management";
|
||||
} {
|
||||
}
|
||||
{
|
||||
name = "Okta";
|
||||
url = "https://engagesmart.okta.com/";
|
||||
} {
|
||||
}
|
||||
{
|
||||
name = "DB Request";
|
||||
url = "https://ivrtg.aha.io/develop/features/INFR-1073";
|
||||
}];
|
||||
}];
|
||||
} {
|
||||
}
|
||||
{
|
||||
name = "Katie";
|
||||
bookmarks = [{
|
||||
name = "Sports Forms";
|
||||
url = "https://midlothianisd.rankone.com/New/NewStudentList.aspx";
|
||||
} {
|
||||
}
|
||||
{
|
||||
name = "Skyward";
|
||||
url = "https://skyward.iscorp.com/MidlothianISDTXStuSTS/Session/Signin?area=Home&controller=Home&action=Index&logoutreason=TimedOut";
|
||||
}];
|
||||
} {
|
||||
}
|
||||
{
|
||||
name = "Nix";
|
||||
bookmarks = [{
|
||||
name = "Package Versions";
|
||||
url = "https://lazamar.co.uk/nix-versions/?channel=nixpkgs-unstable&package=python3";
|
||||
} {
|
||||
}
|
||||
{
|
||||
name = "Channel status";
|
||||
url = "https://status.nixos.org/";
|
||||
} {
|
||||
}
|
||||
{
|
||||
name = "Home Manager options";
|
||||
url = "https://nix-community.github.io/home-manager/options.xhtml";
|
||||
} {
|
||||
}
|
||||
{
|
||||
name = "Flake Parts";
|
||||
url = "https://community.flake.parts/";
|
||||
} {
|
||||
}
|
||||
{
|
||||
name = "Language ref";
|
||||
url = "https://nix.dev/manual/nix/latest/language/index.html";
|
||||
} {
|
||||
}
|
||||
{
|
||||
name = "Builtin functions";
|
||||
url = "https://nix.dev/manual/nix/latest/language/builtins.html";
|
||||
} {
|
||||
}
|
||||
{
|
||||
name = "Nixpkgs functions";
|
||||
url = "https://ryantm.github.io/nixpkgs/functions/library/strings/#sec-functions-library-strings";
|
||||
} {
|
||||
}
|
||||
{
|
||||
name = "NUR search";
|
||||
url = "https://nur.nix-community.org/";
|
||||
}];
|
||||
} {
|
||||
}
|
||||
{
|
||||
name = "Rust";
|
||||
bookmarks = [{
|
||||
name = "Learn Rust";
|
||||
url = "https://www.rust-lang.org/learn";
|
||||
} {
|
||||
}
|
||||
{
|
||||
name = "Rust by Example";
|
||||
url = "https://doc.rust-lang.org/rust-by-example/hello.html";
|
||||
} {
|
||||
}
|
||||
{
|
||||
name = "Iced";
|
||||
url = "https://docs.rs/iced/latest/iced/";
|
||||
}];
|
||||
} {
|
||||
}
|
||||
{
|
||||
name = "Shopping";
|
||||
bookmarks = [{
|
||||
name = "Cables";
|
||||
url = "https://www.pchcables.com";
|
||||
}];
|
||||
} {
|
||||
}
|
||||
{
|
||||
name = "SubTo";
|
||||
bookmarks = [{
|
||||
name = "Kajabi";
|
||||
url = "https://www.subtocourse.com/login";
|
||||
} {
|
||||
}
|
||||
{
|
||||
name = "SubTo Fund";
|
||||
url = "https://frontend.koreconx.com/auth/login";
|
||||
} {
|
||||
}
|
||||
{
|
||||
name = "Creive Title";
|
||||
url = "https://getcreativetitle.com/";
|
||||
} {
|
||||
}
|
||||
{
|
||||
name = "REI Scripts";
|
||||
url = "https://reiconveyorbelt.com/no-excuses/";
|
||||
}];
|
||||
} {
|
||||
}
|
||||
{
|
||||
name = "Tools";
|
||||
bookmarks = [{
|
||||
name = "Password Hash";
|
||||
url = "https://unix4lyfe.org/crypt/";
|
||||
} {
|
||||
}
|
||||
{
|
||||
name = "Keymap editor";
|
||||
url = "https://nickcoutsos.github.io/keymap-editor/";
|
||||
} {
|
||||
}
|
||||
{
|
||||
name = "Bitcoin dashboard";
|
||||
url = "http://hosea.home:60845";
|
||||
}];
|
||||
|
||||
@@ -23,15 +23,18 @@ let
|
||||
"${sleep} 5"
|
||||
"${msg} \"workspace 2 ; exec ${term} ; layout tabbed\""
|
||||
]);
|
||||
in {
|
||||
in
|
||||
{
|
||||
options.greg.sway = lib.mkEnableOption "Enable Sway support and settings";
|
||||
|
||||
config = (lib.mkIf cfg {
|
||||
programs.swaylock.enable = true;
|
||||
|
||||
wayland.windowManager.sway = let
|
||||
wayland.windowManager.sway =
|
||||
let
|
||||
mod = config.wayland.windowManager.sway.config.modifier;
|
||||
in {
|
||||
in
|
||||
{
|
||||
enable = true;
|
||||
config = rec {
|
||||
#fonts.size = 10.0;
|
||||
|
||||
@@ -2,7 +2,8 @@
|
||||
|
||||
let
|
||||
cfg = config.greg.vscodium;
|
||||
in {
|
||||
in
|
||||
{
|
||||
options.greg.vscodium = lib.mkEnableOption "Enable installation of VSCodium on the host";
|
||||
|
||||
config = lib.mkIf cfg {
|
||||
|
||||
+12
-6
@@ -3,7 +3,8 @@
|
||||
let
|
||||
cfg = config.programs.xonsh;
|
||||
|
||||
in with lib; {
|
||||
in
|
||||
with lib; {
|
||||
options = {
|
||||
programs.xonsh = {
|
||||
enable = mkEnableOption "Enable the xonsh program";
|
||||
@@ -62,13 +63,16 @@ in with lib; {
|
||||
mapAttrsToList (k: v: "aliases['${k}']=r'${v}'") cfg.aliases
|
||||
);
|
||||
|
||||
listToPythonList = let
|
||||
listToPythonList =
|
||||
let
|
||||
listInternals = args:
|
||||
concatStringsSep "\n" (map (v: "'${v}'") args);
|
||||
in list: "[${listInternals list}]";
|
||||
in
|
||||
list: "[${listInternals list}]";
|
||||
|
||||
sessionVars = concatStringsSep "\n" (
|
||||
mapAttrsToList (k: v:
|
||||
mapAttrsToList
|
||||
(k: v:
|
||||
if builtins.typeOf v == "string" then
|
||||
"\$${k} = '${v}'"
|
||||
else if builtins.typeOf v == "list" then
|
||||
@@ -76,10 +80,12 @@ in with lib; {
|
||||
else if builtins.typeOf v == "int" then
|
||||
"\$${k} = ${toString v}"
|
||||
else ""
|
||||
) cfg.sessionVariables
|
||||
)
|
||||
cfg.sessionVariables
|
||||
);
|
||||
|
||||
in mkIf cfg.enable {
|
||||
in
|
||||
mkIf cfg.enable {
|
||||
|
||||
home.file.".xonshrc".text = ''
|
||||
${cfg.configHeader}
|
||||
|
||||
+12
-9
@@ -6,13 +6,14 @@ let
|
||||
hm = inputs.hmunstable;
|
||||
nixvim = inputs.nixvimunstable;
|
||||
}));
|
||||
machine = {
|
||||
channel ? inputs.nixstable,
|
||||
extraMods ? [],
|
||||
name,
|
||||
system ? "x86_64-linux",
|
||||
hm ? inputs.hm,
|
||||
nixvim ? inputs.nixvimstable,
|
||||
machine =
|
||||
{ channel ? inputs.nixstable
|
||||
, extraMods ? [ ]
|
||||
, name
|
||||
, system ? "x86_64-linux"
|
||||
, hm ? inputs.hm
|
||||
, nixvim ? inputs.nixvimstable
|
||||
,
|
||||
}:
|
||||
let
|
||||
nixpkgs = import channel {
|
||||
@@ -22,7 +23,8 @@ let
|
||||
nurNoPkg = import inputs.nurpkgs {
|
||||
nurpkgs = nixpkgs;
|
||||
};
|
||||
in channel.lib.nixosSystem {
|
||||
in
|
||||
channel.lib.nixosSystem {
|
||||
inherit system;
|
||||
specialArgs = { inherit nixpkgs inputs overlays; };
|
||||
modules = [
|
||||
@@ -47,7 +49,8 @@ let
|
||||
./${name}
|
||||
] ++ extraMods;
|
||||
};
|
||||
in {
|
||||
in
|
||||
{
|
||||
genesis = machine { name = "genesis"; };
|
||||
exodus = unstable { name = "exodus"; };
|
||||
jude = unstable { name = "jude"; };
|
||||
|
||||
@@ -5,7 +5,8 @@
|
||||
|
||||
{
|
||||
imports =
|
||||
[ (modulesPath + "/installer/scan/not-detected.nix")
|
||||
[
|
||||
(modulesPath + "/installer/scan/not-detected.nix")
|
||||
];
|
||||
|
||||
boot.initrd.availableKernelModules = [ "xhci_pci" "thunderbolt" "nvme" "uas" "sd_mod" ];
|
||||
@@ -14,13 +15,15 @@
|
||||
boot.extraModulePackages = [ ];
|
||||
|
||||
fileSystems."/" =
|
||||
{ device = "/dev/disk/by-uuid/607b933f-2967-4652-b478-4d8e9aa38a0d";
|
||||
{
|
||||
device = "/dev/disk/by-uuid/607b933f-2967-4652-b478-4d8e9aa38a0d";
|
||||
fsType = "btrfs";
|
||||
options = [ "subvol=@" ];
|
||||
};
|
||||
|
||||
fileSystems."/boot" =
|
||||
{ device = "/dev/disk/by-uuid/B31C-C1F4";
|
||||
{
|
||||
device = "/dev/disk/by-uuid/B31C-C1F4";
|
||||
fsType = "vfat";
|
||||
};
|
||||
|
||||
|
||||
@@ -4,7 +4,8 @@ let
|
||||
address = (builtins.elemAt config.networking.interfaces.ens18.ipv4.addresses 0).address;
|
||||
root_ca = pkgs.writeText "root_ca.crt" (builtins.readFile ../../ca/root_ca.crt);
|
||||
intermediate_ca = pkgs.writeText "intermediate_ca.crt" (builtins.readFile ../../ca/intermediate_ca.crt);
|
||||
in {
|
||||
in
|
||||
{
|
||||
age.secrets.acme_password = {
|
||||
file = ../../secrets/acme_password.age;
|
||||
};
|
||||
|
||||
@@ -5,7 +5,8 @@
|
||||
|
||||
{
|
||||
imports =
|
||||
[ (modulesPath + "/profiles/qemu-guest.nix")
|
||||
[
|
||||
(modulesPath + "/profiles/qemu-guest.nix")
|
||||
];
|
||||
|
||||
boot.initrd.availableKernelModules = [ "ata_piix" "uhci_hcd" "virtio_pci" "sr_mod" "virtio_blk" ];
|
||||
@@ -14,13 +15,13 @@
|
||||
boot.extraModulePackages = [ ];
|
||||
|
||||
fileSystems."/" =
|
||||
{ device = "/dev/disk/by-uuid/a13f941e-4985-47ab-a8c6-374a627c5ce1";
|
||||
{
|
||||
device = "/dev/disk/by-uuid/a13f941e-4985-47ab-a8c6-374a627c5ce1";
|
||||
fsType = "ext4";
|
||||
};
|
||||
|
||||
swapDevices =
|
||||
[ { device = "/dev/disk/by-uuid/ac4557de-1ad5-4d3c-b9f4-5ec50dbf76f1"; }
|
||||
];
|
||||
[{ device = "/dev/disk/by-uuid/ac4557de-1ad5-4d3c-b9f4-5ec50dbf76f1"; }];
|
||||
|
||||
# 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
|
||||
|
||||
@@ -81,7 +81,8 @@ in
|
||||
ports = [ "8091:8091" "3000:3000" ];
|
||||
volumes = [ "/var/lib/zwave:/usr/src/app/store" ];
|
||||
extraOptions = [
|
||||
"--device" "/dev/serial/by-id/usb-0658_0200-if00:/dev/zwave"
|
||||
"--device"
|
||||
"/dev/serial/by-id/usb-0658_0200-if00:/dev/zwave"
|
||||
"--pull=newer"
|
||||
];
|
||||
environment = {
|
||||
|
||||
@@ -17,7 +17,8 @@ let
|
||||
"1.0.0.1" # Cloudflare
|
||||
"149.112.112.112" # Quad 9
|
||||
];
|
||||
in {
|
||||
in
|
||||
{
|
||||
greg.tailscale.enable = true;
|
||||
|
||||
# Really, why do I still have to force-disable this crap?
|
||||
|
||||
@@ -2,7 +2,8 @@
|
||||
|
||||
let
|
||||
ip = "100.68.203.1";
|
||||
in {
|
||||
in
|
||||
{
|
||||
nix-bitcoin = {
|
||||
generateSecrets = true;
|
||||
operator = {
|
||||
|
||||
@@ -11,7 +11,8 @@ in
|
||||
|
||||
{
|
||||
imports =
|
||||
[ # Include the results of the hardware scan.
|
||||
[
|
||||
# Include the results of the hardware scan.
|
||||
./hardware-configuration.nix
|
||||
inputs.btc.nixosModules.default
|
||||
./bitcoin.nix
|
||||
|
||||
@@ -5,7 +5,8 @@
|
||||
|
||||
{
|
||||
imports =
|
||||
[ (modulesPath + "/installer/scan/not-detected.nix")
|
||||
[
|
||||
(modulesPath + "/installer/scan/not-detected.nix")
|
||||
];
|
||||
|
||||
boot.initrd.availableKernelModules = [ "xhci_pci" "ahci" "nvme" "usbhid" "uas" "sd_mod" ];
|
||||
@@ -14,13 +15,15 @@
|
||||
boot.extraModulePackages = [ ];
|
||||
|
||||
fileSystems."/" =
|
||||
{ device = "/dev/disk/by-uuid/d4ac74f7-62bb-421a-aad8-566277c9d8ba";
|
||||
{
|
||||
device = "/dev/disk/by-uuid/d4ac74f7-62bb-421a-aad8-566277c9d8ba";
|
||||
fsType = "btrfs";
|
||||
options = [ "subvol=@" ];
|
||||
};
|
||||
|
||||
fileSystems."/boot" =
|
||||
{ device = "/dev/disk/by-uuid/1F51-B638";
|
||||
{
|
||||
device = "/dev/disk/by-uuid/1F51-B638";
|
||||
fsType = "vfat";
|
||||
};
|
||||
|
||||
|
||||
@@ -5,7 +5,8 @@
|
||||
{ config, pkgs, agenix, ... }:
|
||||
|
||||
{
|
||||
imports = [ # Include the results of the hardware scan.
|
||||
imports = [
|
||||
# Include the results of the hardware scan.
|
||||
./hardware-configuration.nix
|
||||
./boot.nix
|
||||
./filesystem.nix
|
||||
|
||||
@@ -5,7 +5,8 @@
|
||||
|
||||
{
|
||||
imports =
|
||||
[ (modulesPath + "/installer/scan/not-detected.nix")
|
||||
[
|
||||
(modulesPath + "/installer/scan/not-detected.nix")
|
||||
];
|
||||
|
||||
boot.initrd.availableKernelModules = [ "xhci_pci" "ehci_pci" "ahci" "usbhid" "usb_storage" "sd_mod" ];
|
||||
@@ -14,24 +15,26 @@
|
||||
boot.extraModulePackages = [ ];
|
||||
|
||||
fileSystems."/" =
|
||||
{ device = "/dev/disk/by-uuid/dab0d455-e25e-4445-8fa4-5320047d7e7b";
|
||||
{
|
||||
device = "/dev/disk/by-uuid/dab0d455-e25e-4445-8fa4-5320047d7e7b";
|
||||
fsType = "btrfs";
|
||||
options = [ "subvol=@" ];
|
||||
};
|
||||
|
||||
fileSystems."/boot" =
|
||||
{ device = "/dev/disk/by-uuid/5aedbb07-5761-423b-909d-2560405eae32";
|
||||
{
|
||||
device = "/dev/disk/by-uuid/5aedbb07-5761-423b-909d-2560405eae32";
|
||||
fsType = "ext4";
|
||||
};
|
||||
|
||||
fileSystems."/var" =
|
||||
{ device = "/dev/disk/by-uuid/57968536-c29d-417d-997e-85223d1d1f65";
|
||||
{
|
||||
device = "/dev/disk/by-uuid/57968536-c29d-417d-997e-85223d1d1f65";
|
||||
fsType = "btrfs";
|
||||
};
|
||||
|
||||
swapDevices =
|
||||
[ { device = "/dev/disk/by-uuid/09691dce-375a-43c6-8d40-4498d20a6d9a"; }
|
||||
];
|
||||
[{ device = "/dev/disk/by-uuid/09691dce-375a-43c6-8d40-4498d20a6d9a"; }];
|
||||
|
||||
# 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
|
||||
|
||||
@@ -18,7 +18,8 @@ in
|
||||
eno1.ipv4.addresses = [{
|
||||
address = "10.42.101.1";
|
||||
prefixLength = 16;
|
||||
} {
|
||||
}
|
||||
{
|
||||
address = "10.77.1.2";
|
||||
prefixLength = 16;
|
||||
}];
|
||||
|
||||
@@ -6,7 +6,8 @@ let
|
||||
vip = (builtins.elemAt config.networking.interfaces.enp68s0.ipv4.addresses 1).address;
|
||||
hostname = config.networking.hostName;
|
||||
baseConfig = import ../../ceph/home.nix;
|
||||
in {
|
||||
in
|
||||
{
|
||||
services.ceph-benaco = baseConfig // {
|
||||
enable = false;
|
||||
monitor = {
|
||||
|
||||
@@ -6,7 +6,8 @@
|
||||
|
||||
{
|
||||
imports =
|
||||
[ # Include the results of the hardware scan.
|
||||
[
|
||||
# Include the results of the hardware scan.
|
||||
./ceph.nix
|
||||
./hardware-configuration.nix
|
||||
./minio.nix
|
||||
@@ -34,7 +35,8 @@
|
||||
ipv4.addresses = [{
|
||||
address = "10.42.1.8";
|
||||
prefixLength = 16;
|
||||
} {
|
||||
}
|
||||
{
|
||||
address = "10.42.100.1";
|
||||
prefixLength = 16;
|
||||
}];
|
||||
|
||||
@@ -5,7 +5,8 @@
|
||||
|
||||
{
|
||||
imports =
|
||||
[ (modulesPath + "/installer/scan/not-detected.nix")
|
||||
[
|
||||
(modulesPath + "/installer/scan/not-detected.nix")
|
||||
];
|
||||
|
||||
boot.initrd.availableKernelModules = [ "nvme" "xhci_pci" "ahci" "uas" "usbhid" "sd_mod" ];
|
||||
@@ -14,12 +15,14 @@
|
||||
boot.extraModulePackages = [ ];
|
||||
|
||||
fileSystems."/" =
|
||||
{ device = "/dev/disk/by-uuid/ffc167f5-d9e4-4b11-a5f1-f7da0550ad24";
|
||||
{
|
||||
device = "/dev/disk/by-uuid/ffc167f5-d9e4-4b11-a5f1-f7da0550ad24";
|
||||
fsType = "ext4";
|
||||
};
|
||||
|
||||
fileSystems."/boot" =
|
||||
{ device = "/dev/disk/by-uuid/3047-870E";
|
||||
{
|
||||
device = "/dev/disk/by-uuid/3047-870E";
|
||||
fsType = "vfat";
|
||||
};
|
||||
|
||||
|
||||
@@ -3,7 +3,8 @@
|
||||
let
|
||||
minioPort = 9000;
|
||||
minioConsolePort = 9001;
|
||||
in {
|
||||
in
|
||||
{
|
||||
environment.systemPackages = with pkgs; [
|
||||
minio-client
|
||||
xfsprogs
|
||||
|
||||
@@ -39,7 +39,8 @@
|
||||
boot.extraModulePackages = [ config.boot.kernelPackages.v4l2loopback ];
|
||||
|
||||
environment.systemPackages = with pkgs; lib.mkMerge [
|
||||
[ # for Immersed
|
||||
[
|
||||
# for Immersed
|
||||
cudatoolkit
|
||||
immersed-vr
|
||||
libva
|
||||
|
||||
@@ -5,7 +5,8 @@
|
||||
|
||||
{
|
||||
imports =
|
||||
[ (modulesPath + "/installer/scan/not-detected.nix")
|
||||
[
|
||||
(modulesPath + "/installer/scan/not-detected.nix")
|
||||
];
|
||||
|
||||
boot.initrd.availableKernelModules = [ "nvme" "xhci_pci" "ahci" "usbhid" "usb_storage" "sd_mod" ];
|
||||
@@ -14,7 +15,8 @@
|
||||
boot.extraModulePackages = [ ];
|
||||
|
||||
fileSystems."/" =
|
||||
{ #device = "/dev/disk/by-uuid/27ae91ed-32e9-411e-8227-0d99e360fbbf";
|
||||
{
|
||||
#device = "/dev/disk/by-uuid/27ae91ed-32e9-411e-8227-0d99e360fbbf";
|
||||
device = "/dev/nvme0n1p4";
|
||||
fsType = "btrfs";
|
||||
};
|
||||
|
||||
@@ -63,7 +63,8 @@
|
||||
commands = [{
|
||||
command = "/run/current-system/sw/bin/systemctl";
|
||||
options = [ "NOPASSWD" ];
|
||||
} {
|
||||
}
|
||||
{
|
||||
command = "/run/current-system/sw/bin/podman";
|
||||
options = [ "NOPASSWD" ];
|
||||
}];
|
||||
|
||||
@@ -3,7 +3,8 @@
|
||||
let
|
||||
srcDomain = "src.thehellings.com";
|
||||
sshPort = 2222;
|
||||
in {
|
||||
in
|
||||
{
|
||||
greg.proxies."${srcDomain}" = {
|
||||
target = "http://git.thehellings.lan";
|
||||
ssl = true;
|
||||
|
||||
@@ -21,7 +21,8 @@ in
|
||||
locations."= /.well-known/matrix/server".extraConfig =
|
||||
let
|
||||
server = { "m.server" = "${fqdn}:443"; };
|
||||
in ''
|
||||
in
|
||||
''
|
||||
add_header Content-Type application/json;
|
||||
return 200 '${builtins.toJSON server}';
|
||||
'';
|
||||
@@ -32,7 +33,8 @@ return 200 '${builtins.toJSON server}';
|
||||
"m.homeserver" = { "base_url" = "https://${fqdn}"; };
|
||||
"m.identity_server" = { "base_url" = "https://vector.im"; };
|
||||
};
|
||||
in ''
|
||||
in
|
||||
''
|
||||
add_header Content-Type application/json;
|
||||
add_header Access-Control-Allow-Origin *;
|
||||
return 200 '${builtins.toJSON client}';
|
||||
|
||||
@@ -6,7 +6,8 @@ let
|
||||
vip = (builtins.elemAt config.networking.interfaces.enp38s0.ipv4.addresses 1).address;
|
||||
hostname = config.networking.hostName;
|
||||
baseConfig = import ../../ceph/home.nix;
|
||||
in {
|
||||
in
|
||||
{
|
||||
services.ceph-benaco = baseConfig // {
|
||||
enable = false;
|
||||
monitor = {
|
||||
|
||||
@@ -1,12 +1,16 @@
|
||||
{ config, pkgs, lib, ... }: let
|
||||
{ config, pkgs, lib, ... }:
|
||||
let
|
||||
registryPort = 5000;
|
||||
vpnIp = "100.78.226.76";
|
||||
containerIp = "192.168.200.2";
|
||||
in {
|
||||
in
|
||||
{
|
||||
age.secretsMountPoint = "/run/derp";
|
||||
age.secrets = let
|
||||
age.secrets =
|
||||
let
|
||||
cfg = n: { file = ../../secrets/gitlab/${n}.age; owner = "gitlab"; group = "gitlab"; mode = "0444"; };
|
||||
in {
|
||||
in
|
||||
{
|
||||
gitlab-secret = cfg "secret";
|
||||
gitlab-otp = cfg "otp";
|
||||
gitlab-db = cfg "db";
|
||||
@@ -30,7 +34,8 @@ in {
|
||||
|
||||
networking.firewall.allowedTCPPorts = [ 80 registryPort ];
|
||||
|
||||
greg.proxies = let
|
||||
greg.proxies =
|
||||
let
|
||||
t = {
|
||||
target = "http://unix:/run/gitlab/gitlab-workhorse.socket";
|
||||
extraConfig = ''
|
||||
@@ -38,7 +43,8 @@ in {
|
||||
proxy_set_header X-Forwarded-Ssl on;
|
||||
'';
|
||||
};
|
||||
in {
|
||||
in
|
||||
{
|
||||
"${containerIp}" = t;
|
||||
"${vpnIp}" = t;
|
||||
"git.thehellings.lan" = t;
|
||||
|
||||
@@ -2,7 +2,8 @@
|
||||
|
||||
({ config, pkgs, lib, ... }:
|
||||
(
|
||||
lib.attrsets.recursiveUpdate {
|
||||
lib.attrsets.recursiveUpdate
|
||||
{
|
||||
|
||||
imports = [
|
||||
inputs.agenix.nixosModules.default
|
||||
|
||||
@@ -31,7 +31,8 @@
|
||||
ipv4.addresses = [{
|
||||
address = "10.42.1.6";
|
||||
prefixLength = 16;
|
||||
} {
|
||||
}
|
||||
{
|
||||
address = "10.42.100.1";
|
||||
prefixLength = 16;
|
||||
}];
|
||||
|
||||
@@ -4,12 +4,15 @@ let
|
||||
|
||||
gitlabStateDir = "/var/lib/gitlab";
|
||||
|
||||
container = input: (lib.attrsets.recursiveUpdate {
|
||||
container = input: (lib.attrsets.recursiveUpdate
|
||||
{
|
||||
bindMounts."/etc/ssh".hostPath = "/etc/ssh"; # For agenix secrets
|
||||
enableTun = true;
|
||||
privateNetwork = true;
|
||||
} input);
|
||||
in {
|
||||
}
|
||||
input);
|
||||
in
|
||||
{
|
||||
networking = {
|
||||
firewall = {
|
||||
enable = true;
|
||||
|
||||
@@ -5,7 +5,8 @@
|
||||
|
||||
{
|
||||
imports =
|
||||
[ (modulesPath + "/installer/scan/not-detected.nix")
|
||||
[
|
||||
(modulesPath + "/installer/scan/not-detected.nix")
|
||||
];
|
||||
|
||||
boot.initrd.availableKernelModules = [ "nvme" "xhci_pci" "ahci" "usb_storage" "usbhid" "sd_mod" "sr_mod" ];
|
||||
@@ -14,24 +15,28 @@
|
||||
boot.extraModulePackages = [ ];
|
||||
|
||||
fileSystems."/" =
|
||||
{ device = "/dev/disk/by-uuid/714744ca-dd9d-4713-b571-c6ccfbf56d79";
|
||||
{
|
||||
device = "/dev/disk/by-uuid/714744ca-dd9d-4713-b571-c6ccfbf56d79";
|
||||
fsType = "btrfs";
|
||||
options = [ "subvol=nixos" ];
|
||||
};
|
||||
|
||||
fileSystems."/home" =
|
||||
{ device = "/dev/disk/by-uuid/714744ca-dd9d-4713-b571-c6ccfbf56d79";
|
||||
{
|
||||
device = "/dev/disk/by-uuid/714744ca-dd9d-4713-b571-c6ccfbf56d79";
|
||||
fsType = "btrfs";
|
||||
options = [ "subvol=home" ];
|
||||
};
|
||||
|
||||
fileSystems."/boot" =
|
||||
{ device = "/dev/disk/by-uuid/29E7-E20C";
|
||||
{
|
||||
device = "/dev/disk/by-uuid/29E7-E20C";
|
||||
fsType = "vfat";
|
||||
};
|
||||
|
||||
fileSystems."/myvol" =
|
||||
{ device = "/dev/nvme0n1p1";
|
||||
{
|
||||
device = "/dev/nvme0n1p1";
|
||||
fsType = "btrfs";
|
||||
};
|
||||
|
||||
|
||||
@@ -78,7 +78,8 @@ in
|
||||
registration_enabled = false;
|
||||
registration_shared_secret = "\${REGISTRATION_SHARED_SECRET}";
|
||||
};
|
||||
});
|
||||
}
|
||||
);
|
||||
};
|
||||
|
||||
systemd.services.dendrite = {
|
||||
|
||||
@@ -3,7 +3,8 @@
|
||||
let
|
||||
minioPort = 9000;
|
||||
minioConsolePort = 9001;
|
||||
in {
|
||||
in
|
||||
{
|
||||
environment.systemPackages = with pkgs; [
|
||||
minio-client
|
||||
xfsprogs
|
||||
|
||||
+2
-1
@@ -1,7 +1,8 @@
|
||||
let
|
||||
nixos = (import ./nixos);
|
||||
darwin = (import ./darwin);
|
||||
in {
|
||||
in
|
||||
{
|
||||
nixosModule = nixos;
|
||||
darwinModule = darwin;
|
||||
}
|
||||
@@ -14,9 +14,11 @@ let
|
||||
type = "sendonly";
|
||||
};
|
||||
|
||||
makeRestic = name: job: let
|
||||
makeRestic = name: job:
|
||||
let
|
||||
who = "${config.services.syncthing.user}:${config.services.syncthing.group}";
|
||||
in rec {
|
||||
in
|
||||
rec {
|
||||
initialize = true;
|
||||
passwordFile = config.age.secrets.restic-pw.path;
|
||||
paths = [ job.src ];
|
||||
@@ -24,7 +26,8 @@ let
|
||||
backupCleanupCommand = ''${pkgs.coreutils}/bin/chown -R ${who} "${repository}"'';
|
||||
};
|
||||
|
||||
in with lib; {
|
||||
in
|
||||
with lib; {
|
||||
options = {
|
||||
greg.backup = {
|
||||
jobs = mkOption {
|
||||
|
||||
+24
-12
@@ -8,9 +8,11 @@ let
|
||||
cfg = config.services.ceph-benaco;
|
||||
commaSep = builtins.concatStringsSep ",";
|
||||
|
||||
ensureUnitExists = c': name: let
|
||||
ensureUnitExists = c': name:
|
||||
let
|
||||
unitName = (builtins.elemAt (builtins.split "\\." name) 0);
|
||||
in if c'.systemd.services ? unitName
|
||||
in
|
||||
if c'.systemd.services ? unitName
|
||||
then name
|
||||
else name; # "Unable to locate ${name} at ${commaSep (builtins.attrNames c')}";
|
||||
in
|
||||
@@ -325,7 +327,8 @@ in
|
||||
|
||||
###### implementation
|
||||
|
||||
config = let
|
||||
config =
|
||||
let
|
||||
monDir = "/var/lib/ceph/mon/${cfg.clusterName}-${cfg.monitor.nodeName}";
|
||||
mgrDir = "/var/lib/ceph/mgr/${cfg.clusterName}-${cfg.manager.nodeName}";
|
||||
mdsDir = "/var/lib/ceph/mds/${cfg.clusterName}-${cfg.mds.nodeName}";
|
||||
@@ -361,7 +364,8 @@ in
|
||||
cephMonitoringSudoersCommandsAndPackages = [
|
||||
{
|
||||
package = pkgs.smartmontools;
|
||||
sudoersExtraRule = { # entry for `security.sudo.extraRules`
|
||||
sudoersExtraRule = {
|
||||
# entry for `security.sudo.extraRules`
|
||||
users = [ config.users.users.ceph.name ];
|
||||
commands = [{
|
||||
command = "${lib.getBin pkgs.smartmontools}/bin/smartctl -x --json=o /dev/*";
|
||||
@@ -371,7 +375,8 @@ in
|
||||
}
|
||||
{
|
||||
package = pkgs.nvme-cli;
|
||||
sudoersExtraRule = { # entry for `security.sudo.extraRules`
|
||||
sudoersExtraRule = {
|
||||
# entry for `security.sudo.extraRules`
|
||||
users = [ config.users.users.ceph.name ];
|
||||
commands = [{
|
||||
command = "${lib.getBin pkgs.nvme-cli}/bin/nvme * smart-log-add --json /dev/*";
|
||||
@@ -509,9 +514,11 @@ in
|
||||
${lib.getLib cfg.package}/libexec/ceph/ceph-osd-prestart.sh --cluster ${cfg.clusterName} --id ${toString osdConfig.id}
|
||||
'';
|
||||
|
||||
serviceConfig = let
|
||||
serviceConfig =
|
||||
let
|
||||
clusterIpArg = lib.optionalString (osdConfig.clusterAddress != null) "--cluster_addr=${osdConfig.clusterAddress}";
|
||||
in {
|
||||
in
|
||||
{
|
||||
LimitNOFILE = "1048576";
|
||||
LimitNPROC = "1048576";
|
||||
|
||||
@@ -531,7 +538,8 @@ in
|
||||
# startLimitIntervalSec = 30 * 60;
|
||||
};
|
||||
|
||||
in mkIf cfg.enable {
|
||||
in
|
||||
mkIf cfg.enable {
|
||||
environment.systemPackages = [ cfg.package ];
|
||||
|
||||
networking.firewall = {
|
||||
@@ -645,7 +653,8 @@ in
|
||||
# The udevadm trigger/settle in `makeCephOsdSetupSystemdService` waits for these rules rule to be applied.
|
||||
services.udev.extraRules =
|
||||
lib.concatStringsSep "\n" (
|
||||
lib.mapAttrsToList (_localOsdServiceName: osdConfig:
|
||||
lib.mapAttrsToList
|
||||
(_localOsdServiceName: osdConfig:
|
||||
''
|
||||
SUBSYSTEM=="block", ${osdConfig.blockDeviceUdevRuleMatcher}, OWNER="${config.users.users.ceph.name}", GROUP="${config.users.groups.ceph.name}", MODE="0660"
|
||||
''
|
||||
@@ -654,7 +663,8 @@ in
|
||||
SUBSYSTEM=="block", ${osdConfig.dbBlockDeviceUdevRuleMatcher}, OWNER="${config.users.users.ceph.name}", GROUP="${config.users.groups.ceph.name}", MODE="0660"
|
||||
''
|
||||
)
|
||||
) cfg.osds
|
||||
)
|
||||
cfg.osds
|
||||
);
|
||||
|
||||
systemd.services = {
|
||||
@@ -664,12 +674,14 @@ in
|
||||
|
||||
preStart = ensureCephDirs;
|
||||
|
||||
script = let
|
||||
script =
|
||||
let
|
||||
# `--addv` seems currently required to get msgr-v2 working, see:
|
||||
# https://tracker.ceph.com/issues/53751#note-11
|
||||
monmapNodes = builtins.concatStringsSep " " (lib.concatMap (mon: [ "--addv" mon.hostname "[v2:${mon.ipAddress}:3300,v1:${mon.ipAddress}:6789]" ]) cfg.initialMonitors);
|
||||
# Monitors cannot simply be changed in config, one has to update the monmap, see note [replacing-ceph-monmap-ips-for-existing-cluster]
|
||||
in ''
|
||||
in
|
||||
''
|
||||
set -euo pipefail
|
||||
rm -rf "${monDir}" # Start from scratch.
|
||||
echo "Initializing monitor."
|
||||
|
||||
@@ -5,9 +5,11 @@ let
|
||||
|
||||
# Create a container with all our default settings
|
||||
|
||||
makeContainer = name: container: let
|
||||
makeContainer = name: container:
|
||||
let
|
||||
agekey = "/etc/ssh/agenix_key";
|
||||
in {
|
||||
in
|
||||
{
|
||||
autoStart = true;
|
||||
hostAddress = "192.168.${container.subnet}.1";
|
||||
localAddress = "192.168.${container.subnet}.2";
|
||||
@@ -35,7 +37,8 @@ let
|
||||
greg.tailscale.enable = container.tailscale;
|
||||
};
|
||||
};
|
||||
in {
|
||||
in
|
||||
{
|
||||
options.greg.containers = lib.mkOption {
|
||||
default = { };
|
||||
|
||||
|
||||
@@ -3,7 +3,8 @@
|
||||
let
|
||||
cfg = config.greg.databases;
|
||||
dbs = (lib.attrNames cfg);
|
||||
in {
|
||||
in
|
||||
{
|
||||
options.greg.databases = lib.mkOption {
|
||||
default = { };
|
||||
type = with lib.types; attrsOf (submodule (
|
||||
|
||||
@@ -1,10 +1,12 @@
|
||||
{ config, pkgs, inputs, lib, ... }:
|
||||
|
||||
let
|
||||
x = if builtins.hasAttr "xonsh-unwrapped" pkgs then
|
||||
x =
|
||||
if builtins.hasAttr "xonsh-unwrapped" pkgs then
|
||||
pkgs.xonsh else
|
||||
pkgs.xonsh.passthru.wrapper;
|
||||
in {
|
||||
in
|
||||
{
|
||||
imports = [
|
||||
../baseline.nix
|
||||
./backup.nix
|
||||
|
||||
@@ -3,7 +3,8 @@
|
||||
let
|
||||
cfg = config.greg.gnome;
|
||||
|
||||
in with lib; {
|
||||
in
|
||||
with lib; {
|
||||
options = {
|
||||
greg.gnome.enable = mkEnableOption "Enable my default Gnome3 setup";
|
||||
};
|
||||
|
||||
@@ -3,7 +3,8 @@
|
||||
let
|
||||
cfg = config.greg.home;
|
||||
|
||||
in with lib;
|
||||
in
|
||||
with lib;
|
||||
{
|
||||
options.greg.home = mkOption {
|
||||
type = types.bool;
|
||||
|
||||
@@ -3,7 +3,8 @@
|
||||
let
|
||||
cfg = config.greg.kde;
|
||||
|
||||
in with lib; {
|
||||
in
|
||||
with lib; {
|
||||
options = {
|
||||
greg.kde.enable = mkEnableOption "Enable my default KDE setup";
|
||||
};
|
||||
|
||||
@@ -2,7 +2,8 @@
|
||||
|
||||
let
|
||||
cfg = config.services.kiwix-serve;
|
||||
in with lib; {
|
||||
in
|
||||
with lib; {
|
||||
options.services.kiwix-serve = {
|
||||
enable = mkEnableOption "Enable the Kiwix web server";
|
||||
|
||||
|
||||
@@ -3,7 +3,8 @@
|
||||
let
|
||||
cfg = config.greg.linode;
|
||||
|
||||
in with lib;
|
||||
in
|
||||
with lib;
|
||||
{
|
||||
options.greg.linode = {
|
||||
enable = mkEnableOption "Set sensible defaults for a Linode host";
|
||||
|
||||
@@ -3,7 +3,8 @@
|
||||
let
|
||||
cfg = config.greg.print;
|
||||
|
||||
in with lib;
|
||||
in
|
||||
with lib;
|
||||
{
|
||||
options.greg.print.enable = mkOption {
|
||||
type = types.bool;
|
||||
|
||||
@@ -19,7 +19,8 @@ proxy_set_header Connection $connection_upgrade;
|
||||
serverAliases = lib.mkIf dest.genAliases [ "${alias name}" ];
|
||||
};
|
||||
|
||||
in with lib; {
|
||||
in
|
||||
with lib; {
|
||||
options = {
|
||||
greg.proxies = mkOption {
|
||||
default = { };
|
||||
@@ -70,7 +71,8 @@ in with lib; {
|
||||
default = "";
|
||||
};
|
||||
};
|
||||
}));
|
||||
}
|
||||
));
|
||||
};
|
||||
};
|
||||
|
||||
|
||||
@@ -3,19 +3,22 @@
|
||||
let
|
||||
names = mylist: (lib.strings.concatMapStringsSep "," (x: ''"${x}"'') mylist);
|
||||
# Pass the names of the wan/lan ports
|
||||
nftConfig = {
|
||||
wan,
|
||||
lan,
|
||||
limitedLan ? [],
|
||||
openPorts ? [ "ssh" "67" "53" ], # ssh, dhcpd, dns
|
||||
nftConfig =
|
||||
{ wan
|
||||
, lan
|
||||
, limitedLan ? [ ]
|
||||
, openPorts ? [ "ssh" "67" "53" ]
|
||||
, # ssh, dhcpd, dns
|
||||
openUDPPorts ? [ "67" "53" ] # dhcpd, dns
|
||||
}: let
|
||||
}:
|
||||
let
|
||||
lanList = names lan;
|
||||
allLan = names (lan ++ limitedLan);
|
||||
wanName = names wan;
|
||||
portsString = lib.strings.concatMapStringsSep "\n" (x: "iifname { ${lanList}, \"tailscale0\" } tcp dport ${toString x} accept") openPorts;
|
||||
udpPortsString = lib.strings.concatMapStringsSep "\n" (x: "iifname { ${lanList}, \"tailscale0\" } udp dport ${toString x} accept") openUDPPorts;
|
||||
in lib.strings.concatStringsSep "\n" [
|
||||
in
|
||||
lib.strings.concatStringsSep "\n" [
|
||||
"table ip filter {"
|
||||
" chain output {"
|
||||
" type filter hook output priority 100; policy accept;"
|
||||
@@ -57,7 +60,8 @@ let
|
||||
];
|
||||
cfg = config.greg.router;
|
||||
|
||||
in with lib; {
|
||||
in
|
||||
with lib; {
|
||||
options.greg.router = {
|
||||
enable = mkEnableOption "Enable NFTables and routing";
|
||||
wan = mkOption {
|
||||
|
||||
@@ -3,7 +3,8 @@
|
||||
let
|
||||
cfg = config.greg.rpi4;
|
||||
|
||||
in with lib; {
|
||||
in
|
||||
with lib; {
|
||||
options = {
|
||||
greg.rpi4 = {
|
||||
enable = mkEnableOption "Enable support for Raspberry Pi 4s";
|
||||
|
||||
@@ -3,7 +3,8 @@
|
||||
let
|
||||
cfg = config.greg.sway;
|
||||
|
||||
in with lib; {
|
||||
in
|
||||
with lib; {
|
||||
options = {
|
||||
greg.sway.enable = mkEnableOption "Enable my default Gnome3 setup";
|
||||
};
|
||||
|
||||
@@ -2,7 +2,8 @@
|
||||
|
||||
let
|
||||
cfg = config.greg.syncthing;
|
||||
in with lib; {
|
||||
in
|
||||
with lib; {
|
||||
options.greg.syncthing = {
|
||||
enable = mkEnableOption "Setup my personal minimal configuration for Syncthing";
|
||||
};
|
||||
|
||||
@@ -2,7 +2,8 @@
|
||||
|
||||
let
|
||||
cfg = config.greg.tailscale;
|
||||
in {
|
||||
in
|
||||
{
|
||||
options = {
|
||||
greg.tailscale.enable = lib.mkEnableOption "Enable Tailscale";
|
||||
};
|
||||
|
||||
@@ -2,7 +2,8 @@
|
||||
|
||||
let
|
||||
cfg = config.greg.vmdev;
|
||||
in with lib;
|
||||
in
|
||||
with lib;
|
||||
{
|
||||
options = {
|
||||
greg.vmdev = {
|
||||
|
||||
@@ -25,12 +25,14 @@ let
|
||||
|
||||
is2405 = prev.lib.versionAtLeast prev.lib.version "24";
|
||||
|
||||
in rec {
|
||||
in
|
||||
rec {
|
||||
gregpy = myPython;
|
||||
|
||||
## Testing adding python packages in the correct manner
|
||||
pythonPackagesExtensions = (prev.pythonPackagesExtensions or [ ]) ++ [
|
||||
(python-final: python-prev: let cp = python-final.callPackage; in {
|
||||
(python-final: python-prev:
|
||||
let cp = python-final.callPackage; in {
|
||||
django-rapyd-modernauth = cp ./django-rapyd-modernauth.nix { };
|
||||
graypy = cp ./graypy.nix { };
|
||||
itg-django-utils = cp ./itg-django-utils.nix { };
|
||||
@@ -54,7 +56,9 @@ in rec {
|
||||
|
||||
# Overrides of packages
|
||||
brew = prev.callPackage ./homebrew.nix { };
|
||||
copier = (if is2405 then prev.copier.overridePythonAttrs (old: {
|
||||
copier = (if is2405 then
|
||||
prev.copier.overridePythonAttrs
|
||||
(old: {
|
||||
version = "9.1.0";
|
||||
src = final.fetchFromGitHub {
|
||||
owner = "copier-org";
|
||||
|
||||
@@ -1,15 +1,13 @@
|
||||
{
|
||||
lib,
|
||||
buildPythonPackage,
|
||||
fetchPypi,
|
||||
|
||||
click,
|
||||
django,
|
||||
python-dotenv,
|
||||
pytz,
|
||||
setuptools,
|
||||
sqlparse,
|
||||
zipp
|
||||
{ lib
|
||||
, buildPythonPackage
|
||||
, fetchPypi
|
||||
, click
|
||||
, django
|
||||
, python-dotenv
|
||||
, pytz
|
||||
, setuptools
|
||||
, sqlparse
|
||||
, zipp
|
||||
}:
|
||||
|
||||
let
|
||||
@@ -22,7 +20,8 @@ let
|
||||
sqlparse
|
||||
zipp
|
||||
];
|
||||
in buildPythonPackage rec {
|
||||
in
|
||||
buildPythonPackage rec {
|
||||
pname = "django-rapyd-modernauth";
|
||||
version = "0.0.4";
|
||||
|
||||
|
||||
@@ -4,7 +4,8 @@ let
|
||||
version = "2022.07.20";
|
||||
date = builtins.replaceStrings [ "." ] [ "" ] version;
|
||||
|
||||
in pkgs.writeShellScriptBin "wiki-data" ''
|
||||
in
|
||||
pkgs.writeShellScriptBin "wiki-data" ''
|
||||
set -eo pipefail
|
||||
|
||||
function process_file {
|
||||
|
||||
+8
-9
@@ -1,12 +1,11 @@
|
||||
{
|
||||
lib,
|
||||
buildPythonPackage,
|
||||
fetchFromGitHub,
|
||||
|
||||
amqplib,
|
||||
mock,
|
||||
pytestCheckHook,
|
||||
requests,
|
||||
{ lib
|
||||
, buildPythonPackage
|
||||
, fetchFromGitHub
|
||||
, amqplib
|
||||
, mock
|
||||
, pytestCheckHook
|
||||
, requests
|
||||
,
|
||||
}:
|
||||
|
||||
buildPythonPackage rec {
|
||||
|
||||
+9
-10
@@ -1,13 +1,12 @@
|
||||
{
|
||||
lib,
|
||||
pkgs,
|
||||
stdenv,
|
||||
|
||||
bash,
|
||||
curl,
|
||||
git,
|
||||
ruby,
|
||||
...}:
|
||||
{ lib
|
||||
, pkgs
|
||||
, stdenv
|
||||
, bash
|
||||
, curl
|
||||
, git
|
||||
, ruby
|
||||
, ...
|
||||
}:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "homebrew-installer";
|
||||
|
||||
@@ -1,10 +1,9 @@
|
||||
{
|
||||
pkgs,
|
||||
coreutils,
|
||||
curl,
|
||||
gnutar,
|
||||
nix,
|
||||
...
|
||||
{ pkgs
|
||||
, coreutils
|
||||
, curl
|
||||
, gnutar
|
||||
, nix
|
||||
, ...
|
||||
}:
|
||||
pkgs.writeShellScriptBin "inject-darwin" ''
|
||||
set -ex
|
||||
|
||||
+3
-4
@@ -1,7 +1,6 @@
|
||||
{
|
||||
pkgs,
|
||||
git,
|
||||
...
|
||||
{ pkgs
|
||||
, git
|
||||
, ...
|
||||
}:
|
||||
|
||||
pkgs.writeShellScriptBin "inject-nixos-config" ''
|
||||
|
||||
@@ -1,12 +1,11 @@
|
||||
{
|
||||
lib,
|
||||
buildPythonPackage,
|
||||
fetchurl,
|
||||
|
||||
django,
|
||||
djangorestframework,
|
||||
graypy,
|
||||
setuptools,
|
||||
{ lib
|
||||
, buildPythonPackage
|
||||
, fetchurl
|
||||
, django
|
||||
, djangorestframework
|
||||
, graypy
|
||||
, setuptools
|
||||
,
|
||||
}:
|
||||
|
||||
buildPythonPackage rec {
|
||||
|
||||
@@ -7,7 +7,8 @@ flake-utils.lib.eachDefaultSystemMap (system:
|
||||
callPackage = pkgs.lib.callPackageWith pkgs;
|
||||
python = pkgs.packages.python3;
|
||||
cp = pkgs.packages.python3.pkgs.callPackage;
|
||||
in {
|
||||
in
|
||||
{
|
||||
hms = pkgs.callPackage ./hms.nix {
|
||||
inherit pkgs;
|
||||
};
|
||||
|
||||
+2
-1
@@ -22,7 +22,8 @@ let
|
||||
|
||||
pythonEnv = python3.withPackages runtimeDeps;
|
||||
|
||||
in buildPythonApplication rec {
|
||||
in
|
||||
buildPythonApplication rec {
|
||||
pname = "pipenv";
|
||||
version = "2023.11.15";
|
||||
format = "pyproject";
|
||||
|
||||
@@ -3,7 +3,8 @@
|
||||
let
|
||||
newPostgres = postgresql_16;
|
||||
oldPostgres = postgresql_15;
|
||||
in writeScriptBin "upgrade-pg-cluster" ''
|
||||
in
|
||||
writeScriptBin "upgrade-pg-cluster" ''
|
||||
set -eux
|
||||
systemctl stop postgresql
|
||||
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
{
|
||||
lib,
|
||||
buildPythonPackage,
|
||||
fetchFromGitHub,
|
||||
toPythonModule,
|
||||
pipenv,
|
||||
{ lib
|
||||
, buildPythonPackage
|
||||
, fetchFromGitHub
|
||||
, toPythonModule
|
||||
, pipenv
|
||||
,
|
||||
}:
|
||||
|
||||
buildPythonPackage rec {
|
||||
|
||||
Reference in New Issue
Block a user