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