A complete reformatting to match nixpkgs-fmt
This commit is contained in:
@@ -1,2 +1,3 @@
|
||||
host
|
||||
result
|
||||
.pre-commit-config.yaml
|
||||
|
||||
+8
-6
@@ -1,20 +1,22 @@
|
||||
{
|
||||
fsid = "749bf0ea-acf5-4a5e-b33e-9a057455c06b";
|
||||
clusterName = "home";
|
||||
initialMonitors = [ {
|
||||
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";
|
||||
} ];
|
||||
mdsNodes = [ {
|
||||
}];
|
||||
mdsNodes = [{
|
||||
hostname = "jeremiah.thehellings.lan";
|
||||
ipAddress = "10.42.1.8";
|
||||
} ];
|
||||
}];
|
||||
publicNetworks = [ "10.42.0.0/16" ];
|
||||
clusterNetworks = [ "10.201.0.0/16" ];
|
||||
adminKeyring = ../secrets/home.client.admin.keyring;
|
||||
|
||||
@@ -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,17 +40,19 @@
|
||||
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
|
||||
local_overlay
|
||||
inputs.nurpkgs.overlay
|
||||
inputs.vsext.overlays.default
|
||||
(_: _: { 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" ];
|
||||
#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 @@
|
||||
{ ... }:
|
||||
|
||||
{
|
||||
|
||||
}
|
||||
{ }
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
{ pkgs, lib, inputs, ...}:
|
||||
{ pkgs, lib, inputs, ... }:
|
||||
let
|
||||
nix23 = import inputs.nix23_05 {
|
||||
inherit (pkgs.stdenv) system;
|
||||
overlays = [ inputs.self.overlays.default ];
|
||||
};
|
||||
py = nix23.python311.withPackages ( p: with p; [
|
||||
py = nix23.python311.withPackages (p: with p; [
|
||||
django
|
||||
djangorestframework
|
||||
django-rapyd-modernauth
|
||||
@@ -22,7 +22,8 @@ let
|
||||
pkgs.pipenv-ivr
|
||||
]);
|
||||
};
|
||||
in {
|
||||
in
|
||||
{
|
||||
greg = {
|
||||
development = true;
|
||||
gui = true;
|
||||
|
||||
@@ -2,27 +2,27 @@
|
||||
|
||||
{
|
||||
home.file.".ansible.cfg".text = ''
|
||||
[defaults]
|
||||
forks=10
|
||||
host_key_checking=False
|
||||
# Also available: profile_roles
|
||||
callback_enabled=timer,profile_tasks
|
||||
stdout_callback=yaml
|
||||
nocows=1
|
||||
cow_selection=tux
|
||||
collections_path=~/src
|
||||
[defaults]
|
||||
forks=10
|
||||
host_key_checking=False
|
||||
# Also available: profile_roles
|
||||
callback_enabled=timer,profile_tasks
|
||||
stdout_callback=yaml
|
||||
nocows=1
|
||||
cow_selection=tux
|
||||
collections_path=~/src
|
||||
|
||||
[ssh_connection]
|
||||
pipelining=True
|
||||
ssh_args = -o ControlMaster=auto -o ControlPersist=600s -o IdentitiesOnly=yes -o GSSAPIAuthentication=no -o StrictHostKeyChecking=no
|
||||
control_path=%(directory)s/%%h-%%r
|
||||
control_path_dir=/tmp
|
||||
[ssh_connection]
|
||||
pipelining=True
|
||||
ssh_args = -o ControlMaster=auto -o ControlPersist=600s -o IdentitiesOnly=yes -o GSSAPIAuthentication=no -o StrictHostKeyChecking=no
|
||||
control_path=%(directory)s/%%h-%%r
|
||||
control_path_dir=/tmp
|
||||
|
||||
[callback_profile_tasks]
|
||||
sort_order=descending
|
||||
[callback_profile_tasks]
|
||||
sort_order=descending
|
||||
|
||||
[galaxy]
|
||||
role_skeleton_ignore = ^.git$,^.*/.git_keep$,\..*.swp
|
||||
role_skeleton = ~/src/ansible_collections/meta_ansible_templates/role
|
||||
'';
|
||||
[galaxy]
|
||||
role_skeleton_ignore = ^.git$,^.*/.git_keep$,\..*.swp
|
||||
role_skeleton = ~/src/ansible_collections/meta_ansible_templates/role
|
||||
'';
|
||||
}
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
yaml2js = "python -c 'import sys, yaml, json; json.dump(yaml.load(sys.stdin), sys.stdout, indent=4)";
|
||||
};
|
||||
sessionVariables = {
|
||||
ANSIBLE_COLLECTIONS_PATH="\${HOME}/src/";
|
||||
ANSIBLE_COLLECTIONS_PATH = "\${HOME}/src/";
|
||||
CLICOLOR = "1";
|
||||
EDITOR = "${pkgs.vim}/bin/vim";
|
||||
GIT_SSL_NO_VERIFY = "True";
|
||||
@@ -34,41 +34,41 @@
|
||||
TIMEFORMAT = "%3Uu %3Ss %3lR %P%%";
|
||||
};
|
||||
profileExtra = ''
|
||||
if [ -e /etc/profile ]; then
|
||||
if [ -e /etc/profile ]; then
|
||||
. /etc/profile
|
||||
fi
|
||||
'';
|
||||
fi
|
||||
'';
|
||||
bashrcExtra = ''
|
||||
function swordtag {
|
||||
function swordtag {
|
||||
if [ x"$1" == "x" ]; then
|
||||
echo "Please provide tag version"
|
||||
return
|
||||
fi
|
||||
svn cp http://crosswire.org/svn/sword/branches/sword-1-8-x/ http://crosswire.org/svn/sword/tags/sword-$1/
|
||||
}
|
||||
}
|
||||
|
||||
function newdock {
|
||||
function newdock {
|
||||
if [ x"$1" == "x" -o x"$2" == "x" ]; then
|
||||
echo "expected arguments [name] [source]"
|
||||
return
|
||||
fi
|
||||
podman run -P --privileged=true -e DISPLAY=$DISPLAY -v /tmp/.X11-unix:/tmp/.X11-unix -v "$(pwd):/dmnt" -t -i --name="$1" "$2" /bin/bash
|
||||
}
|
||||
}
|
||||
|
||||
function rundock {
|
||||
function rundock {
|
||||
podman start -a -i "$1"
|
||||
}
|
||||
}
|
||||
|
||||
function ac {
|
||||
function ac {
|
||||
source ~/venv/''${1}/bin/activate
|
||||
}
|
||||
}
|
||||
|
||||
function py2env {
|
||||
function py2env {
|
||||
/usr/bin/virtualenv -p /usr/bin/python2 "''${HOME}/venv/''${1}"
|
||||
"''${HOME}/venv/''${1}/bin/pip" install -U pip
|
||||
}
|
||||
}
|
||||
|
||||
function py3env {
|
||||
function py3env {
|
||||
VENV_NAME="''${1}"
|
||||
#PYVERSION="$(python3 -c "import sys;print(sys.version[:sys.version.find('.',2)])")"
|
||||
#SITE_PACKAGES_PATH="/usr/lib64/python''${PYVERSION}/site-packages/"
|
||||
@@ -83,11 +83,11 @@ function py3env {
|
||||
#else
|
||||
# echo "ERROR: LibSELinux not found for Python ''${PYVERSION}. Install system package to enable."
|
||||
#fi
|
||||
}
|
||||
}
|
||||
|
||||
function unknown_host {
|
||||
function unknown_host {
|
||||
sed -i -e ''${1}d ~/.ssh/known_hosts
|
||||
}
|
||||
'';
|
||||
}
|
||||
'';
|
||||
};
|
||||
}
|
||||
|
||||
@@ -13,7 +13,9 @@
|
||||
amend = "commit --amend";
|
||||
};
|
||||
ignores = [
|
||||
".*.swp" ".*.swo" ".*.swn" # vim
|
||||
".*.swp"
|
||||
".*.swo"
|
||||
".*.swn" # vim
|
||||
".idea" # IntelliJ
|
||||
".DS_Store" # Macs
|
||||
"Thumbs.db" # Windows
|
||||
|
||||
@@ -11,26 +11,27 @@
|
||||
enable = true;
|
||||
serverAliveInterval = 60;
|
||||
|
||||
includes = ["config.local"];
|
||||
includes = [ "config.local" ];
|
||||
|
||||
matchBlocks =
|
||||
let
|
||||
nas = { user = "admin"; };
|
||||
owned = { user = "greg"; };
|
||||
in {
|
||||
in
|
||||
{
|
||||
inherit nas;
|
||||
|
||||
"*" = {
|
||||
dynamicForwards = [ {
|
||||
dynamicForwards = [{
|
||||
port = 10240;
|
||||
} ];
|
||||
}];
|
||||
};
|
||||
|
||||
"10.42.1.4" = lib.hm.dag.entryBefore ["10.42.*"] nas;
|
||||
"10.42.1.4" = lib.hm.dag.entryBefore [ "10.42.*" ] nas;
|
||||
"nas.thehellings.lan" = nas;
|
||||
"nas.greg-hellings.gmail.com.beta.tailscale.net" = nas;
|
||||
chronicles = nas;
|
||||
"chronicles.thehellings.lan" = lib.hm.dag.entryBefore [ "*.thehellings.lan"] nas;
|
||||
"chronicles.thehellings.lan" = lib.hm.dag.entryBefore [ "*.thehellings.lan" ] nas;
|
||||
|
||||
gh = { user = "git"; hostname = "github.com"; };
|
||||
"src" = {
|
||||
|
||||
@@ -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 = {
|
||||
@@ -126,7 +129,7 @@ in
|
||||
neo-tree.enable = true;
|
||||
notify.enable = true;
|
||||
web-devicons.enable = true;
|
||||
} // (lib.mkIf (lib.versionAtLeast config.system.nixos.release "24.11") {});
|
||||
} // (lib.mkIf (lib.versionAtLeast config.system.nixos.release "24.11") { });
|
||||
extraConfigLua = builtins.replaceStrings [ "@git@" ] [ "${pkgs.git}/bin/git" ] (builtins.readFile ./vim/extra.lua);
|
||||
extraConfigVim = builtins.readFile ./vim/extra.vimrc;
|
||||
extraPlugins = with pkgs.vimPlugins; [
|
||||
|
||||
@@ -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,11 +4,12 @@ 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 {
|
||||
programs.gnome-terminal = lib.mkIf ( pkgs.system != "x86_64-darwin") {
|
||||
programs.gnome-terminal = lib.mkIf (pkgs.system != "x86_64-darwin") {
|
||||
enable = true;
|
||||
showMenubar = true;
|
||||
themeVariant = "dark";
|
||||
@@ -37,13 +38,13 @@ in {
|
||||
lock-enabled = false;
|
||||
};
|
||||
"org/gnome/desktop/wm/keybindings" = {
|
||||
switch-applications = [];
|
||||
switch-applications-backward = [];
|
||||
switch-windows = ["<Alt>Tab"];
|
||||
switch-applications = [ ];
|
||||
switch-applications-backward = [ ];
|
||||
switch-windows = [ "<Alt>Tab" ];
|
||||
switch-windows-backward = [ "<Shift><Alt>Tab" ];
|
||||
};
|
||||
"org/gnome/desktop/wm/preferences" = {
|
||||
button-layout="icon:minimize,maximize,close";
|
||||
button-layout = "icon:minimize,maximize,close";
|
||||
};
|
||||
"org/gnome/file-roller/listing" = {
|
||||
list-mode = "as-folder";
|
||||
|
||||
@@ -4,7 +4,7 @@ let
|
||||
cfg = config.greg.gui;
|
||||
|
||||
excludes = systems: opts: (
|
||||
if ( builtins.all (x: pkgs.system != x) systems ) then opts else []
|
||||
if (builtins.all (x: pkgs.system != x) systems) then opts else [ ]
|
||||
);
|
||||
|
||||
# For now, we ignore this and don't install it
|
||||
@@ -13,12 +13,13 @@ let
|
||||
vars = {
|
||||
XDG_CURRENT_DESKTOP = "GNOME";
|
||||
};
|
||||
in {
|
||||
in
|
||||
{
|
||||
options.greg.gui = lib.mkEnableOption "Enable GUI programs";
|
||||
|
||||
config = (lib.mkIf cfg {
|
||||
# These packages are Linux only
|
||||
home.packages = with pkgs; ( excludes ["x86_64-darwin" "aarch64-darwin"]
|
||||
home.packages = with pkgs; (excludes [ "x86_64-darwin" "aarch64-darwin" ]
|
||||
[
|
||||
cdrtools
|
||||
element-desktop
|
||||
@@ -29,7 +30,7 @@ in {
|
||||
]) ++
|
||||
|
||||
# x86_64-linux only
|
||||
( excludes ["x86_64-darwin" "aarch64-darwin" "aarch64-linux"]
|
||||
(excludes [ "x86_64-darwin" "aarch64-darwin" "aarch64-linux" ]
|
||||
[
|
||||
bitwarden
|
||||
discord
|
||||
@@ -42,7 +43,7 @@ in {
|
||||
]) ++
|
||||
|
||||
# Items that are not supported on ARM/Linux
|
||||
( excludes ["aarch64-linux"]
|
||||
(excludes [ "aarch64-linux" ]
|
||||
[
|
||||
onlyoffice-bin
|
||||
synology-drive-client
|
||||
|
||||
@@ -1,137 +1,167 @@
|
||||
[ {
|
||||
[{
|
||||
name = "Toolbar";
|
||||
toolbar = true;
|
||||
bookmarks = [ {
|
||||
bookmarks = [{
|
||||
name = "Ansible";
|
||||
bookmarks = [ {
|
||||
bookmarks = [{
|
||||
name = "Collection Index";
|
||||
url = "https://docs.ansible.com/ansible/latest/collections/index.html";
|
||||
} ];
|
||||
} {
|
||||
}];
|
||||
}
|
||||
{
|
||||
name = "Church";
|
||||
bookmarks = [ {
|
||||
bookmarks = [{
|
||||
name = "DC4K";
|
||||
url = "https://www.dc4k.org/leaderzone/articles";
|
||||
} ];
|
||||
} {
|
||||
}];
|
||||
}
|
||||
{
|
||||
name = "IVR";
|
||||
bookmarks = [ {
|
||||
bookmarks = [{
|
||||
name = "Dev";
|
||||
bookmarks = [ {
|
||||
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 = [ {
|
||||
bookmarks = [{
|
||||
name = "Audio";
|
||||
url = "https://hcweb3.ivrtechnology.com/coreservices/audio/admin/";
|
||||
} {
|
||||
}
|
||||
{
|
||||
name = "Survey";
|
||||
url = "https://hcweb2.ivrtechnology.com/coreservices/survey/admin/";
|
||||
} ];
|
||||
} {
|
||||
}];
|
||||
}
|
||||
{
|
||||
name = "PCI";
|
||||
bookmarks = [ {
|
||||
bookmarks = [{
|
||||
name = "Audio";
|
||||
url = "https://pciweb3.ivrtechnology.com/coreservices/audio/admin/";
|
||||
} ];
|
||||
} {
|
||||
}];
|
||||
}
|
||||
{
|
||||
name = "Processes";
|
||||
bookmarks = [ {
|
||||
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 = [ {
|
||||
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 = [ {
|
||||
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 = [ {
|
||||
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 = [ {
|
||||
bookmarks = [{
|
||||
name = "Cables";
|
||||
url = "https://www.pchcables.com";
|
||||
} ];
|
||||
} {
|
||||
}];
|
||||
}
|
||||
{
|
||||
name = "SubTo";
|
||||
bookmarks = [ {
|
||||
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 = [ {
|
||||
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 {
|
||||
|
||||
+19
-13
@@ -3,14 +3,15 @@
|
||||
let
|
||||
cfg = config.programs.xonsh;
|
||||
|
||||
in with lib; {
|
||||
in
|
||||
with lib; {
|
||||
options = {
|
||||
programs.xonsh = {
|
||||
enable = mkEnableOption "Enable the xonsh program";
|
||||
|
||||
sessionVariables = mkOption {
|
||||
type = types.attrs;
|
||||
default = {};
|
||||
default = { };
|
||||
example = { XONSH_TRACE_SUBPROC = true; };
|
||||
description = ''
|
||||
Environment variables that will be set for the Xonsh session.
|
||||
@@ -19,7 +20,7 @@ in with lib; {
|
||||
|
||||
aliases = mkOption {
|
||||
type = types.attrsOf types.str;
|
||||
default = {};
|
||||
default = { };
|
||||
example = literalExpression ''
|
||||
{
|
||||
ll = "ls -l";
|
||||
@@ -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,19 +80,21 @@ 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}
|
||||
${cfg.configHeader}
|
||||
|
||||
${sessionVars}
|
||||
${sessionVars}
|
||||
|
||||
${shortAliases}
|
||||
${shortAliases}
|
||||
|
||||
${cfg.configFooter}
|
||||
'';
|
||||
${cfg.configFooter}
|
||||
'';
|
||||
};
|
||||
}
|
||||
|
||||
+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;
|
||||
};
|
||||
@@ -12,7 +13,7 @@ in {
|
||||
file = ../../secrets/ca/intermediate_key.age;
|
||||
};
|
||||
age.secrets.root_ca_key.file = ../../secrets/ca/root_key.age;
|
||||
systemd.services.step-ca.serviceConfig.Environment = lib.mkForce ["STEPDEBUG=1" "HOME=%S/step-ca"];
|
||||
systemd.services.step-ca.serviceConfig.Environment = lib.mkForce [ "STEPDEBUG=1" "HOME=%S/step-ca" ];
|
||||
services.step-ca = {
|
||||
inherit address;
|
||||
enable = false;
|
||||
@@ -34,7 +35,7 @@ in {
|
||||
dataSource = "/var/lib/step-ca/db";
|
||||
badgerFileLoadingMode = "";
|
||||
};
|
||||
authority.provisioners = [ {
|
||||
authority.provisioners = [{
|
||||
type = "JWK";
|
||||
name = "greg@thehellings.com";
|
||||
key = {
|
||||
@@ -47,7 +48,7 @@ in {
|
||||
y = "MEpqnJp60VV-SpFtb6m8U-VAYut7R_PKFm07xl7MjBk";
|
||||
};
|
||||
encryptedKey = "eyJhbGciOiJQQkVTMi1IUzI1NitBMTI4S1ciLCJjdHkiOiJqd2sranNvbiIsImVuYyI6IkEyNTZHQ00iLCJwMmMiOjYwMDAwMCwicDJzIjoieWdfb0lfbWgwbHhPRXdjUTBsd0FnUSJ9.ivdQUFEhs2U8PUBYr8AhQl3hHdb4spF4jvXgqY_hiVgpjB-z3Nn9Uw.u7vrNht_3WD1G97q.mbydlpAQxjtKLkOmmDOUczqscRDPqrUyoPJ1uqXcJDH3vs4KiYlrKRcFLjPy9sWzEL1iIrqjwf3U-3AAx1KNAg7frs2D__MGfOO-U5SdQDVJVAND7KpWOJGJVSb0xioCA6-8ldlP_REqu4ENmkkdw0_6Is2b0p7ZFKqke_fqOOs7osqFAfbMb_WzEWrACLn5A5-Teh2rpEgR-z9zipN6MSEqE6VIQ2BXuv70aHWhslNe1MK1OgTYm9CqA47EMYvQ7HQLPDZAbP56WK84yJLktoXMmnkaKeTtvER0dh4ufyjJHBhecnEranbR5rHc_jV8_qvyWhlqbCrOU_8bWrk.a9SH_q3GKIUsOUSRWkDxQg";
|
||||
} ];
|
||||
}];
|
||||
tls = {
|
||||
cipherSuites = [
|
||||
"TLS_ECDHE_ECDSA_WITH_CHACHA20_POLY1305_SHA256"
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -34,8 +34,8 @@ in
|
||||
];
|
||||
|
||||
config = {
|
||||
default_config = {};
|
||||
tts = [ { platform = "google_translate"; } ];
|
||||
default_config = { };
|
||||
tts = [{ platform = "google_translate"; }];
|
||||
http = {
|
||||
use_x_forwarded_for = true;
|
||||
trusted_proxies = [ "127.0.0.1" "::1" ];
|
||||
@@ -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?
|
||||
@@ -36,18 +37,18 @@ in {
|
||||
# This is our LAN port
|
||||
"${lan}" = {
|
||||
useDHCP = false;
|
||||
ipv4.addresses = [ {
|
||||
ipv4.addresses = [{
|
||||
address = "${lanIP}";
|
||||
prefixLength = 16;
|
||||
} ];
|
||||
}];
|
||||
};
|
||||
|
||||
"${iot}" = {
|
||||
useDHCP = false;
|
||||
ipv4.addresses = [ {
|
||||
ipv4.addresses = [{
|
||||
address = "${iotIP}";
|
||||
prefixLength = 24;
|
||||
} ];
|
||||
}];
|
||||
};
|
||||
};
|
||||
firewall = {
|
||||
@@ -89,15 +90,15 @@ in {
|
||||
########
|
||||
_3proxy = {
|
||||
enable = true;
|
||||
services = [ {
|
||||
services = [{
|
||||
type = "socks";
|
||||
auth = [ "strong" ];
|
||||
bindPort = proxyPort;
|
||||
acl = [ {
|
||||
acl = [{
|
||||
rule = "allow";
|
||||
users = [ "greg" ];
|
||||
} ];
|
||||
} ];
|
||||
}];
|
||||
}];
|
||||
#usersFile = "/run/agenix/3proxy";
|
||||
denyPrivate = false;
|
||||
};
|
||||
|
||||
@@ -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";
|
||||
};
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
{ pkgs, config, ...}:
|
||||
{ pkgs, config, ... }:
|
||||
|
||||
{
|
||||
# Bootloader.
|
||||
|
||||
@@ -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
|
||||
@@ -19,6 +20,6 @@
|
||||
isNormalUser = true;
|
||||
description = "Gregory Hellings";
|
||||
extraGroups = [ "networkmanager" "wheel" ];
|
||||
packages = with pkgs; [];
|
||||
packages = with pkgs; [ ];
|
||||
};
|
||||
}
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
{...}:
|
||||
{ ... }:
|
||||
|
||||
{
|
||||
# Set your time zone.
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
{...}:
|
||||
{ ... }:
|
||||
let
|
||||
dnsHosts = builtins.concatStringsSep "\n" [
|
||||
"wiki.icdm.lan 10.42.101.1"
|
||||
@@ -15,13 +15,14 @@ in
|
||||
enableIPv6 = false;
|
||||
|
||||
interfaces = {
|
||||
eno1.ipv4.addresses = [ {
|
||||
eno1.ipv4.addresses = [{
|
||||
address = "10.42.101.1";
|
||||
prefixLength = 16;
|
||||
} {
|
||||
}
|
||||
{
|
||||
address = "10.77.1.2";
|
||||
prefixLength = 16;
|
||||
} ];
|
||||
}];
|
||||
};
|
||||
# Allow traffic through
|
||||
firewall = {
|
||||
|
||||
@@ -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
|
||||
@@ -31,19 +32,20 @@
|
||||
};
|
||||
interfaces = {
|
||||
enp68s0 = {
|
||||
ipv4.addresses = [ {
|
||||
ipv4.addresses = [{
|
||||
address = "10.42.1.8";
|
||||
prefixLength = 16;
|
||||
} {
|
||||
}
|
||||
{
|
||||
address = "10.42.100.1";
|
||||
prefixLength = 16;
|
||||
} ];
|
||||
}];
|
||||
};
|
||||
san = {
|
||||
ipv4.addresses = [ {
|
||||
ipv4.addresses = [{
|
||||
address = "10.201.1.2";
|
||||
prefixLength = 24;
|
||||
} ];
|
||||
}];
|
||||
};
|
||||
};
|
||||
nameservers = [
|
||||
|
||||
@@ -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";
|
||||
};
|
||||
|
||||
+1
-1
@@ -16,7 +16,7 @@
|
||||
"${pkgs.kmod}/bin/modprobe vboxnetadp"
|
||||
];
|
||||
postStop = "${pkgs.kmod}/bin/rmmod vboxnetflt vboxnetadp vboxdrv";
|
||||
wantedBy = pkgs.lib.mkForce [];
|
||||
wantedBy = pkgs.lib.mkForce [ ];
|
||||
serviceConfig.User = "root";
|
||||
};
|
||||
};
|
||||
|
||||
@@ -51,7 +51,7 @@
|
||||
isSystemUser = true;
|
||||
group = "gitlab-runner";
|
||||
};
|
||||
users.groups.gitlab-runner = {};
|
||||
users.groups.gitlab-runner = { };
|
||||
|
||||
systemd.services."gitlab-runner".serviceConfig = {
|
||||
DynamicUser = lib.mkForce false;
|
||||
@@ -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;
|
||||
|
||||
+11
-9
@@ -21,10 +21,11 @@ in
|
||||
locations."= /.well-known/matrix/server".extraConfig =
|
||||
let
|
||||
server = { "m.server" = "${fqdn}:443"; };
|
||||
in ''
|
||||
add_header Content-Type application/json;
|
||||
return 200 '${builtins.toJSON server}';
|
||||
'';
|
||||
in
|
||||
''
|
||||
add_header Content-Type application/json;
|
||||
return 200 '${builtins.toJSON server}';
|
||||
'';
|
||||
|
||||
locations."= /.well-known/matrix/client".extraConfig =
|
||||
let
|
||||
@@ -32,11 +33,12 @@ return 200 '${builtins.toJSON server}';
|
||||
"m.homeserver" = { "base_url" = "https://${fqdn}"; };
|
||||
"m.identity_server" = { "base_url" = "https://vector.im"; };
|
||||
};
|
||||
in ''
|
||||
add_header Content-Type application/json;
|
||||
add_header Access-Control-Allow-Origin *;
|
||||
return 200 '${builtins.toJSON client}';
|
||||
'';
|
||||
in
|
||||
''
|
||||
add_header Content-Type application/json;
|
||||
add_header Access-Control-Allow-Origin *;
|
||||
return 200 '${builtins.toJSON client}';
|
||||
'';
|
||||
};
|
||||
|
||||
# Reverse proxy in front of the actual Matrix server
|
||||
|
||||
@@ -17,10 +17,10 @@
|
||||
# CREATE DATABASE "synapse" WITH OWNER "matrix-synapse" TEMPLATE template0 LC_COLLATE = "C" LC_CTYPE = "C";
|
||||
# GRANT ALL PRIVILEGES ON DATABASE "synapse" TO "matrix-synapse";
|
||||
#''; # These are done manually in order to set the LC_COLLATE values properly
|
||||
ensureUsers = [ {
|
||||
ensureUsers = [{
|
||||
name = "nextcloud";
|
||||
ensureDBOwnership = true;
|
||||
} ];
|
||||
}];
|
||||
settings = {
|
||||
log_connections = true;
|
||||
log_statement = "all";
|
||||
@@ -28,8 +28,8 @@
|
||||
log_filename = "postgresql.log";
|
||||
};
|
||||
identMap = ''
|
||||
root root postgres
|
||||
'';
|
||||
root root postgres
|
||||
'';
|
||||
};
|
||||
|
||||
services.postgresqlBackup = {
|
||||
|
||||
@@ -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;
|
||||
@@ -115,7 +121,7 @@ in {
|
||||
aws_signature_version = 2;
|
||||
};
|
||||
#storage_options = ...;
|
||||
objects = builtins.listToAttrs ( builtins.map (x: lib.attrsets.nameValuePair x { bucket = "gitlab-${builtins.replaceStrings [ "_" ] [ "-" ] x}"; }) [
|
||||
objects = builtins.listToAttrs (builtins.map (x: lib.attrsets.nameValuePair x { bucket = "gitlab-${builtins.replaceStrings [ "_" ] [ "-" ] x}"; }) [
|
||||
"artifacts"
|
||||
"ci_secure_files"
|
||||
"dependency_proxy"
|
||||
@@ -131,11 +137,11 @@ in {
|
||||
};
|
||||
|
||||
nginx.virtualHosts."gitlab.shire-zebra.ts.net" = {
|
||||
listen = [ {
|
||||
listen = [{
|
||||
addr = vpnIp;
|
||||
port = registryPort;
|
||||
ssl = true;
|
||||
} ];
|
||||
}];
|
||||
locations."/" = {
|
||||
proxyPass = "http://127.0.0.1:5000/";
|
||||
recommendedProxySettings = true;
|
||||
@@ -157,10 +163,10 @@ in {
|
||||
enable = true;
|
||||
checkConfig = true;
|
||||
ensureDatabases = [ "gitlab" ];
|
||||
ensureUsers = [ {
|
||||
ensureUsers = [{
|
||||
name = "gitlab";
|
||||
ensureDBOwnership = true;
|
||||
} ];
|
||||
}];
|
||||
settings = {
|
||||
log_connections = true;
|
||||
log_statement = "all";
|
||||
|
||||
@@ -1,8 +1,9 @@
|
||||
{ inputs, name, extra ? {}, packages ? [], overlays }:
|
||||
{ inputs, name, extra ? { }, packages ? [ ], overlays }:
|
||||
|
||||
({ config, pkgs, lib, ... }:
|
||||
(
|
||||
lib.attrsets.recursiveUpdate {
|
||||
lib.attrsets.recursiveUpdate
|
||||
{
|
||||
|
||||
imports = [
|
||||
inputs.agenix.nixosModules.default
|
||||
@@ -84,8 +85,8 @@ lib.attrsets.recursiveUpdate {
|
||||
};
|
||||
|
||||
system.stateVersion = lib.mkForce "24.05";
|
||||
}
|
||||
}
|
||||
|
||||
extra
|
||||
extra
|
||||
) # End of attrsets.recursiveUpdate
|
||||
) # End of outter function wrapper
|
||||
|
||||
@@ -28,19 +28,20 @@
|
||||
};
|
||||
interfaces = {
|
||||
enp38s0 = {
|
||||
ipv4.addresses = [ {
|
||||
ipv4.addresses = [{
|
||||
address = "10.42.1.6";
|
||||
prefixLength = 16;
|
||||
} {
|
||||
}
|
||||
{
|
||||
address = "10.42.100.1";
|
||||
prefixLength = 16;
|
||||
} ];
|
||||
}];
|
||||
};
|
||||
san = {
|
||||
ipv4.addresses = [ {
|
||||
ipv4.addresses = [{
|
||||
address = "10.201.1.1";
|
||||
prefixLength = 24;
|
||||
} ];
|
||||
}];
|
||||
};
|
||||
};
|
||||
nameservers = [
|
||||
|
||||
@@ -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";
|
||||
};
|
||||
|
||||
|
||||
@@ -29,13 +29,13 @@ in
|
||||
isSystemUser = true;
|
||||
group = "dendrite";
|
||||
};
|
||||
users.groups.dendrite = {};
|
||||
users.groups.dendrite = { };
|
||||
|
||||
systemd.services.dendrite.serviceConfig = {
|
||||
User = "dendrite";
|
||||
};
|
||||
|
||||
greg.databases.dendrite = {};
|
||||
greg.databases.dendrite = { };
|
||||
|
||||
services.dendrite = {
|
||||
enable = true;
|
||||
@@ -54,7 +54,7 @@ in
|
||||
"room_server"
|
||||
"sync_api"
|
||||
])
|
||||
) ) //
|
||||
)) //
|
||||
{
|
||||
user_api.account_database.connection_string = conn;
|
||||
user_api.device_database.connection_string = conn;
|
||||
@@ -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
|
||||
|
||||
@@ -16,8 +16,8 @@ in
|
||||
experimental-features = "nix-command flakes";
|
||||
keep-outputs = true;
|
||||
keep-derivations = true;
|
||||
min-free = (toString (1024 * 1024 * 1024) );
|
||||
max-free = (toString (5 * 1024 * 1024 * 1024) );
|
||||
min-free = (toString (1024 * 1024 * 1024));
|
||||
max-free = (toString (5 * 1024 * 1024 * 1024));
|
||||
substituters = [
|
||||
"https://cache.garnix.io"
|
||||
"https://ai.cachix.org"
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
{...}:
|
||||
{ ... }:
|
||||
{
|
||||
imports = [
|
||||
../baseline.nix
|
||||
|
||||
+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,11 +26,12 @@ let
|
||||
backupCleanupCommand = ''${pkgs.coreutils}/bin/chown -R ${who} "${repository}"'';
|
||||
};
|
||||
|
||||
in with lib; {
|
||||
in
|
||||
with lib; {
|
||||
options = {
|
||||
greg.backup = {
|
||||
jobs = mkOption {
|
||||
default = {};
|
||||
default = { };
|
||||
|
||||
type = with types; attrsOf (submodule (
|
||||
{ name, config, options, ... }:
|
||||
@@ -54,7 +57,7 @@ in with lib; {
|
||||
};
|
||||
};
|
||||
|
||||
config = mkIf ( ( attrValues cfg.jobs ) != [] )
|
||||
config = mkIf ((attrValues cfg.jobs) != [ ])
|
||||
{
|
||||
age.secrets = {
|
||||
restic-pw.file = ../../secrets/restic-pw.age;
|
||||
|
||||
+58
-46
@@ -8,11 +8,13 @@ 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')}";
|
||||
else name; # "Unable to locate ${name} at ${commaSep (builtins.attrNames c')}";
|
||||
in
|
||||
|
||||
{
|
||||
@@ -143,7 +145,7 @@ in
|
||||
};
|
||||
|
||||
osds = mkOption {
|
||||
default = {};
|
||||
default = { };
|
||||
example = {
|
||||
osd1 = {
|
||||
enable = true;
|
||||
@@ -200,7 +202,7 @@ in
|
||||
|
||||
systemdExtraRequiresAfter = mkOption {
|
||||
type = types.listOf types.str;
|
||||
default = [];
|
||||
default = [ ];
|
||||
description = ''
|
||||
Add the specified systemd units to the "requires" and "after"
|
||||
lists of the systemd service of this OSD.
|
||||
@@ -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,29 +514,32 @@ 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 {
|
||||
LimitNOFILE="1048576";
|
||||
LimitNPROC="1048576";
|
||||
in
|
||||
{
|
||||
LimitNOFILE = "1048576";
|
||||
LimitNPROC = "1048576";
|
||||
|
||||
ExecStart=''
|
||||
ExecStart = ''
|
||||
${cfg.package}/bin/ceph-osd -f --cluster ${cfg.clusterName} --id ${toString osdConfig.id} --setuser ${config.users.users.ceph.name} --setgroup ${config.users.groups.ceph.name} "--public_bind_addr=${cfg.osdBindAddr}" "--public_addr=${cfg.osdAdvertisedPublicAddr}" "${clusterIpArg}"
|
||||
'';
|
||||
ExecReload=''
|
||||
ExecReload = ''
|
||||
${pkgs.coreutils}/bin/kill -HUP $MAINPID
|
||||
'';
|
||||
Restart="on-failure";
|
||||
ProtectHome="true";
|
||||
ProtectSystem="full";
|
||||
PrivateTmp="true";
|
||||
TasksMax="infinity";
|
||||
Restart = "on-failure";
|
||||
ProtectHome = "true";
|
||||
ProtectSystem = "full";
|
||||
PrivateTmp = "true";
|
||||
TasksMax = "infinity";
|
||||
# StartLimitBurst="3";
|
||||
};
|
||||
# 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."
|
||||
@@ -707,22 +719,22 @@ in
|
||||
preStart = ensureTransientCephDirs;
|
||||
|
||||
serviceConfig = {
|
||||
LimitNOFILE="1048576";
|
||||
LimitNPROC="1048576";
|
||||
ExecStart=''
|
||||
LimitNOFILE = "1048576";
|
||||
LimitNPROC = "1048576";
|
||||
ExecStart = ''
|
||||
${cfg.package}/bin/ceph-mon -f --cluster ${cfg.clusterName} --id ${cfg.monitor.nodeName} --setuser ${config.users.users.ceph.name} --setgroup ${config.users.groups.ceph.name} "--public_bind_addr=${cfg.monitor.bindAddr}" "--public_addr=${cfg.monitor.advertisedPublicAddr}"
|
||||
'';
|
||||
ExecReload=''
|
||||
ExecReload = ''
|
||||
${pkgs.coreutils}/bin/kill -HUP $MAINPID
|
||||
'';
|
||||
PrivateDevices="yes";
|
||||
ProtectHome="true";
|
||||
ProtectSystem="full";
|
||||
PrivateTmp="true";
|
||||
TasksMax="infinity";
|
||||
Restart="on-failure";
|
||||
PrivateDevices = "yes";
|
||||
ProtectHome = "true";
|
||||
ProtectSystem = "full";
|
||||
PrivateTmp = "true";
|
||||
TasksMax = "infinity";
|
||||
Restart = "on-failure";
|
||||
# StartLimitBurst="5";
|
||||
RestartSec="10";
|
||||
RestartSec = "10";
|
||||
};
|
||||
# startLimitIntervalSec = 30 * 60;
|
||||
};
|
||||
@@ -768,17 +780,17 @@ in
|
||||
preStart = ensureTransientCephDirs;
|
||||
|
||||
serviceConfig = {
|
||||
LimitNOFILE="1048576";
|
||||
LimitNPROC="1048576";
|
||||
LimitNOFILE = "1048576";
|
||||
LimitNPROC = "1048576";
|
||||
|
||||
ExecStart=''
|
||||
ExecStart = ''
|
||||
${cfg.package}/bin/ceph-mgr -f --cluster ${cfg.clusterName} --id ${cfg.manager.nodeName} --setuser ${config.users.users.ceph.name} --setgroup ${config.users.groups.ceph.name}
|
||||
'';
|
||||
ExecReload=''
|
||||
ExecReload = ''
|
||||
${pkgs.coreutils}/bin/kill -HUP $MAINPID
|
||||
'';
|
||||
Restart="on-failure";
|
||||
RestartSec=10;
|
||||
Restart = "on-failure";
|
||||
RestartSec = 10;
|
||||
# StartLimitBurst="3";
|
||||
};
|
||||
# startLimitIntervalSec = 30 * 60;
|
||||
@@ -825,16 +837,16 @@ in
|
||||
preStart = ensureTransientCephDirs;
|
||||
|
||||
serviceConfig = {
|
||||
LimitNOFILE="1048576";
|
||||
LimitNPROC="1048576";
|
||||
LimitNOFILE = "1048576";
|
||||
LimitNPROC = "1048576";
|
||||
|
||||
ExecStart=''
|
||||
ExecStart = ''
|
||||
${cfg.package}/bin/ceph-mds -f --cluster ${cfg.clusterName} --id ${cfg.mds.nodeName} --setuser ${config.users.users.ceph.name} --setgroup ${config.users.groups.ceph.name} "--public_addr=${cfg.mds.listenAddr}"
|
||||
'';
|
||||
ExecReload=''
|
||||
ExecReload = ''
|
||||
${pkgs.coreutils}/bin/kill -HUP $MAINPID
|
||||
'';
|
||||
Restart="on-failure";
|
||||
Restart = "on-failure";
|
||||
# StartLimitBurst="3";
|
||||
};
|
||||
# startLimitIntervalSec = 30 * 60;
|
||||
|
||||
@@ -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,11 +37,12 @@ let
|
||||
greg.tailscale.enable = container.tailscale;
|
||||
};
|
||||
};
|
||||
in {
|
||||
in
|
||||
{
|
||||
options.greg.containers = lib.mkOption {
|
||||
default = {};
|
||||
default = { };
|
||||
|
||||
type = with lib.types; attrsOf ( submodule (
|
||||
type = with lib.types; attrsOf (submodule (
|
||||
{
|
||||
options = {
|
||||
tailscale = lib.mkOption {
|
||||
@@ -52,7 +55,7 @@ in {
|
||||
default = "200";
|
||||
};
|
||||
builder = lib.mkOption {
|
||||
default = { ... }: {};
|
||||
default = { ... }: { };
|
||||
description = ''
|
||||
This needs to be a function, like the one for
|
||||
a container's config. It will setup the core system above the
|
||||
|
||||
@@ -3,18 +3,19 @@
|
||||
let
|
||||
cfg = config.greg.databases;
|
||||
dbs = (lib.attrNames cfg);
|
||||
in {
|
||||
in
|
||||
{
|
||||
options.greg.databases = lib.mkOption {
|
||||
default = {};
|
||||
type = with lib.types; attrsOf ( submodule (
|
||||
default = { };
|
||||
type = with lib.types; attrsOf (submodule (
|
||||
{ name, config, options, ... }: {
|
||||
# Options reserved for future expansion
|
||||
options = {};
|
||||
options = { };
|
||||
}
|
||||
));
|
||||
};
|
||||
|
||||
config = lib.mkIf ( dbs != [] ) {
|
||||
config = lib.mkIf (dbs != [ ]) {
|
||||
services = {
|
||||
postgresql = {
|
||||
enable = true;
|
||||
|
||||
@@ -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";
|
||||
@@ -21,10 +22,10 @@ in with lib;
|
||||
boot.loader.grub = {
|
||||
device = "nodev";
|
||||
extraConfig = ''
|
||||
serial --speed=19200 --unit=0 --word=8 --parity=no --stop=1;
|
||||
terminal_input serial;
|
||||
terminal_output serial;
|
||||
'';
|
||||
serial --speed=19200 --unit=0 --word=8 --parity=no --stop=1;
|
||||
terminal_input serial;
|
||||
terminal_output serial;
|
||||
'';
|
||||
};
|
||||
|
||||
# Tells grub to ignore partion-free device warnings, since we are on Linode
|
||||
|
||||
@@ -3,7 +3,8 @@
|
||||
let
|
||||
cfg = config.greg.print;
|
||||
|
||||
in with lib;
|
||||
in
|
||||
with lib;
|
||||
{
|
||||
options.greg.print.enable = mkOption {
|
||||
type = types.bool;
|
||||
@@ -20,7 +21,7 @@ in with lib;
|
||||
] ++ (lib.optional pkgs.stdenv.isx86_64 gutenprintBin);
|
||||
};
|
||||
|
||||
hardware.printers.ensurePrinters = [ {
|
||||
hardware.printers.ensurePrinters = [{
|
||||
name = "HomeLexmarkColorPrinter";
|
||||
location = "Home office";
|
||||
deviceUri = "ipp://printer.thehellings.lan:631/";
|
||||
@@ -28,6 +29,6 @@ in with lib;
|
||||
ppdOptions = {
|
||||
PageSize = "Letter";
|
||||
};
|
||||
} ];
|
||||
}];
|
||||
};
|
||||
}
|
||||
|
||||
+10
-8
@@ -11,18 +11,19 @@ let
|
||||
locations."${dest.path}" = {
|
||||
proxyPass = dest.target;
|
||||
extraConfig = ''
|
||||
proxy_http_version 1.1;
|
||||
proxy_set_header Upgrade $http_upgrade;
|
||||
proxy_set_header Connection $connection_upgrade;
|
||||
'' + dest.extraConfig;
|
||||
proxy_http_version 1.1;
|
||||
proxy_set_header Upgrade $http_upgrade;
|
||||
proxy_set_header Connection $connection_upgrade;
|
||||
'' + dest.extraConfig;
|
||||
};
|
||||
serverAliases = lib.mkIf dest.genAliases [ "${alias name}" ];
|
||||
};
|
||||
|
||||
in with lib; {
|
||||
in
|
||||
with lib; {
|
||||
options = {
|
||||
greg.proxies = mkOption {
|
||||
default = {};
|
||||
default = { };
|
||||
example = literalExpression ''
|
||||
{ host-name = {
|
||||
target = proxyLocation;
|
||||
@@ -70,11 +71,12 @@ in with lib; {
|
||||
default = "";
|
||||
};
|
||||
};
|
||||
}));
|
||||
}
|
||||
));
|
||||
};
|
||||
};
|
||||
|
||||
config.services.nginx = mkIf ( ( attrValues cfg ) != [] ) {
|
||||
config.services.nginx = mkIf ((attrValues cfg) != [ ]) {
|
||||
enable = true;
|
||||
|
||||
recommendedGzipSettings = true;
|
||||
|
||||
@@ -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 {
|
||||
@@ -71,7 +75,7 @@ in with lib; {
|
||||
limited = mkOption {
|
||||
type = (types.listOf types.str);
|
||||
description = "A list of limited access LAN connections - such as IOT connections and similar.";
|
||||
default = [];
|
||||
default = [ ];
|
||||
};
|
||||
};
|
||||
|
||||
|
||||
@@ -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";
|
||||
};
|
||||
@@ -37,6 +38,6 @@ in with lib; {
|
||||
enable = true; # Will be enabled through home-manager
|
||||
wrapperFeatures.gtk = true;
|
||||
};
|
||||
security.pam.services.swaylock = {};
|
||||
security.pam.services.swaylock = { };
|
||||
};
|
||||
}
|
||||
|
||||
@@ -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 = {
|
||||
|
||||
+7
-7
@@ -1,10 +1,10 @@
|
||||
{ pkgs, ... }:
|
||||
|
||||
pkgs.writeShellScriptBin "aacs" ''
|
||||
set -ex
|
||||
[ ! -d "''${HOME}/.config/aacs" ] && mkdir -p "''${HOME}/.config/aacs"
|
||||
cd "''${HOME}/.config/aacs"
|
||||
[ -f KEYDB.cfg.zip ] && rm -f KEYDB.cfg.zip
|
||||
curl -L -o KEYDB.cfg.zip "http://fvonline-db.bplaced.net/fv_download.php?lang=eng"
|
||||
${pkgs.unzip}/bin/unzip KEYDB.cfg.zip
|
||||
mv keydb.cfg KEYDB.cfg''
|
||||
set -ex
|
||||
[ ! -d "''${HOME}/.config/aacs" ] && mkdir -p "''${HOME}/.config/aacs"
|
||||
cd "''${HOME}/.config/aacs"
|
||||
[ -f KEYDB.cfg.zip ] && rm -f KEYDB.cfg.zip
|
||||
curl -L -o KEYDB.cfg.zip "http://fvonline-db.bplaced.net/fv_download.php?lang=eng"
|
||||
${pkgs.unzip}/bin/unzip KEYDB.cfg.zip
|
||||
mv keydb.cfg KEYDB.cfg''
|
||||
|
||||
+16
-16
@@ -1,28 +1,28 @@
|
||||
{ writeShellScriptBin, openssl, ...}:
|
||||
{ writeShellScriptBin, openssl, ... }:
|
||||
|
||||
writeShellScriptBin "create_ssl" ''
|
||||
set -e -o pipefail
|
||||
name="''${1}"
|
||||
root_key="''${2}"
|
||||
set -e -o pipefail
|
||||
name="''${1}"
|
||||
root_key="''${2}"
|
||||
|
||||
function usage {
|
||||
function usage {
|
||||
echo "USAGE: create_ssl <cert name> <root path>"
|
||||
}
|
||||
}
|
||||
|
||||
if [ -z "''${name}" ]; then
|
||||
if [ -z "''${name}" ]; then
|
||||
usage
|
||||
exit 1
|
||||
fi
|
||||
fi
|
||||
|
||||
if [ -z "''${root_key}" ]; then
|
||||
if [ -z "''${root_key}" ]; then
|
||||
usage
|
||||
exit 1
|
||||
fi
|
||||
fi
|
||||
|
||||
# Create the certificate key
|
||||
${openssl}/bin/openssl ecparam -out "''${name}.key" -name prime256v1 -genkey
|
||||
# Create the CSR
|
||||
${openssl}/bin/openssl req -name -sha256 -key "''${name}.key" -out "''${name}.csr"
|
||||
# Sign it
|
||||
${openssl}/bin/openssl x509 -req -in "''${name}.csr" -CA "''${root_key}.crt" -CAkey "''${root_key}.key" -CAcreateserial -out "''${name}.crt" -days 3650 -sha256
|
||||
# Create the certificate key
|
||||
${openssl}/bin/openssl ecparam -out "''${name}.key" -name prime256v1 -genkey
|
||||
# Create the CSR
|
||||
${openssl}/bin/openssl req -name -sha256 -key "''${name}.key" -out "''${name}.csr"
|
||||
# Sign it
|
||||
${openssl}/bin/openssl x509 -req -in "''${name}.csr" -CA "''${root_key}.crt" -CAkey "''${root_key}.key" -CAcreateserial -out "''${name}.crt" -days 3650 -sha256
|
||||
''
|
||||
|
||||
+18
-14
@@ -18,30 +18,32 @@ let
|
||||
myPython = prev.python312.withPackages myPackages;
|
||||
macOver = file: og:
|
||||
if prev.stdenv.isDarwin then
|
||||
(prev.callPackage file {}) else
|
||||
(prev.callPackage file { }) else
|
||||
prev."${og}";
|
||||
|
||||
buildFirefoxXpiAddon = final.nur.repos.rycee.lib.buildFirefoxXpiAddon;
|
||||
|
||||
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 {
|
||||
django-rapyd-modernauth = cp ./django-rapyd-modernauth.nix {};
|
||||
graypy = cp ./graypy.nix {};
|
||||
itg-django-utils = cp ./itg-django-utils.nix {};
|
||||
xonsh-apipenv = cp ./xonsh-apipenv.nix {};
|
||||
pythonPackagesExtensions = (prev.pythonPackagesExtensions or [ ]) ++ [
|
||||
(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 { };
|
||||
xonsh-apipenv = cp ./xonsh-apipenv.nix { };
|
||||
})
|
||||
];
|
||||
|
||||
# My own packages
|
||||
aacs = prev.callPackage ./aacs.nix {};
|
||||
create_ssl = prev.callPackage ./create_ssl.nix {};
|
||||
enwiki-dump = prev.callPackage ./enwiki-dump.nix {};
|
||||
aacs = prev.callPackage ./aacs.nix { };
|
||||
create_ssl = prev.callPackage ./create_ssl.nix { };
|
||||
enwiki-dump = prev.callPackage ./enwiki-dump.nix { };
|
||||
hms = prev.callPackage ./hms {
|
||||
pkgs = final.pkgs;
|
||||
};
|
||||
@@ -50,11 +52,13 @@ in rec {
|
||||
setup-ssh = prev.callPackage ./setup-ssh {
|
||||
pkgs = final.pkgs;
|
||||
};
|
||||
upgrade-pg-cluster = prev.callPackage ./upgrade-pg-cluster.nix {};
|
||||
upgrade-pg-cluster = prev.callPackage ./upgrade-pg-cluster.nix { };
|
||||
|
||||
# Overrides of packages
|
||||
brew = prev.callPackage ./homebrew.nix {};
|
||||
copier = (if is2405 then prev.copier.overridePythonAttrs (old: {
|
||||
brew = prev.callPackage ./homebrew.nix { };
|
||||
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";
|
||||
|
||||
@@ -35,7 +34,7 @@ in buildPythonPackage rec {
|
||||
description = "A Django application that provides a custom User model where the username is the email address.";
|
||||
homepage = "https://github.com/karthicraghupathi/django_rapyd_modernauth";
|
||||
license = licenses.afl20;
|
||||
maintainers = [];
|
||||
maintainers = [ ];
|
||||
};
|
||||
|
||||
doCheck = false;
|
||||
|
||||
+29
-28
@@ -2,54 +2,55 @@
|
||||
|
||||
let
|
||||
version = "2022.07.20";
|
||||
date = builtins.replaceStrings ["."] [""] version;
|
||||
date = builtins.replaceStrings [ "." ] [ "" ] version;
|
||||
|
||||
in pkgs.writeShellScriptBin "wiki-data" ''
|
||||
set -eo pipefail
|
||||
in
|
||||
pkgs.writeShellScriptBin "wiki-data" ''
|
||||
set -eo pipefail
|
||||
|
||||
function process_file {
|
||||
function process_file {
|
||||
file="''${lang}''${1}"
|
||||
destfile=/var/tmp/''${file}
|
||||
curl -C - -o "''${destfile}" "https://dumps.wikimedia.your.org/''${lang}wiki/${date}/''${file}"
|
||||
bzcat "''${destfile}" | ${pkgs.php}/bin/php ${pkgs.mediawiki}/share/mediawiki/maintenance/importDump.php --report 500 | tee "/var/log/mediawiki-''${lang}-import"
|
||||
rm "''${destfile}"
|
||||
}
|
||||
}
|
||||
|
||||
function zim_fetch {
|
||||
function zim_fetch {
|
||||
dest="/srv/zims"
|
||||
mkdir -p "''${dest}"
|
||||
file="''${1}"
|
||||
echo "Downloading ''${file}"
|
||||
transmission-remote -w "''${dest}" -a https://download.kiwix.org/zim/''${file}.zim.torrent
|
||||
}
|
||||
}
|
||||
|
||||
#process_file "wiki-${date}-pages-articles-multistream.xml.bz2"
|
||||
#process_file "wiki-${date}-pages-meta-current.xml.bz2"
|
||||
#process_file "wiki-${date}-pages-articles.xml.bz2"
|
||||
#process_file "wiki-${date}-pages-articles-multistream.xml.bz2"
|
||||
#process_file "wiki-${date}-pages-meta-current.xml.bz2"
|
||||
#process_file "wiki-${date}-pages-articles.xml.bz2"
|
||||
|
||||
zim_fetch wikipedia_en_all_maxi
|
||||
zim_fetch wikipedia_fr_all_maxi
|
||||
zim_fetch wikipedia_ht_all_maxi
|
||||
zim_fetch wikipedia_en_all_maxi
|
||||
zim_fetch wikipedia_fr_all_maxi
|
||||
zim_fetch wikipedia_ht_all_maxi
|
||||
|
||||
zim_fetch wiktionary_en_all_maxi
|
||||
zim_fetch wiktionary_fr_all_maxi
|
||||
zim_fetch wiktionary_en_all_maxi
|
||||
zim_fetch wiktionary_fr_all_maxi
|
||||
|
||||
zim_fetch wikiversity_en_all_maxi
|
||||
zim_fetch wikiversity_fr_all_maxi
|
||||
zim_fetch wikiversity_en_all_maxi
|
||||
zim_fetch wikiversity_fr_all_maxi
|
||||
|
||||
zim_fetch wikibooks_en_all_maxi
|
||||
zim_fetch wikibooks_fr_all_maxi
|
||||
zim_fetch wikibooks_en_all_maxi
|
||||
zim_fetch wikibooks_fr_all_maxi
|
||||
|
||||
zim_fetch wikisource_en_all_maxi
|
||||
zim_fetch wikisource_fr_all_maxi
|
||||
zim_fetch wikisource_en_all_maxi
|
||||
zim_fetch wikisource_fr_all_maxi
|
||||
|
||||
zim_fetch ted_en_science
|
||||
zim_fetch ted_en_technology
|
||||
zim_fetch ted_en_science
|
||||
zim_fetch ted_en_technology
|
||||
|
||||
zim_fetch phet_en
|
||||
zim_fetch phet_fr
|
||||
zim_fetch phet_ht
|
||||
zim_fetch phet_en
|
||||
zim_fetch phet_fr
|
||||
zim_fetch phet_ht
|
||||
|
||||
zim_fetch gutenberg_en_all
|
||||
zim_fetch gutenberg_fr_all
|
||||
zim_fetch gutenberg_en_all
|
||||
zim_fetch gutenberg_fr_all
|
||||
''
|
||||
|
||||
+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";
|
||||
|
||||
+24
-25
@@ -1,32 +1,31 @@
|
||||
{
|
||||
pkgs,
|
||||
coreutils,
|
||||
curl,
|
||||
gnutar,
|
||||
nix,
|
||||
...
|
||||
{ pkgs
|
||||
, coreutils
|
||||
, curl
|
||||
, gnutar
|
||||
, nix
|
||||
, ...
|
||||
}:
|
||||
pkgs.writeShellScriptBin "inject-darwin" ''
|
||||
set -ex
|
||||
set -o pipefail
|
||||
set -ex
|
||||
set -o pipefail
|
||||
|
||||
dir="$(${coreutils}/bin/mktemp -d)"
|
||||
cd "''${dir}"
|
||||
dir="$(${coreutils}/bin/mktemp -d)"
|
||||
cd "''${dir}"
|
||||
|
||||
# Install nix-darwin
|
||||
${nix}/bin/nix-build https://github.com/LnL7/nix-darwin/archive/master.tar.gz -A installer
|
||||
./result/bin/darwin-installer
|
||||
# Install nix-darwin
|
||||
${nix}/bin/nix-build https://github.com/LnL7/nix-darwin/archive/master.tar.gz -A installer
|
||||
./result/bin/darwin-installer
|
||||
|
||||
# Get my configuration
|
||||
mkdir -p ~/.config/darwin
|
||||
cd ~/.config/darwin
|
||||
${curl}/bin/curl -O -L https://github.com/greg-hellings/nixos-config/archive/refs/heads/main.tar.gz
|
||||
${gnutar}/bin/tar xvzf main.tar.gz --strip-components 1
|
||||
# Get my configuration
|
||||
mkdir -p ~/.config/darwin
|
||||
cd ~/.config/darwin
|
||||
${curl}/bin/curl -O -L https://github.com/greg-hellings/nixos-config/archive/refs/heads/main.tar.gz
|
||||
${gnutar}/bin/tar xvzf main.tar.gz --strip-components 1
|
||||
|
||||
# Build NixOS for this system
|
||||
pushd "''${dir}"
|
||||
${nix}/bin/nix build "~/.config/darwin#darwinConfigurations.$(hostname -s).system"
|
||||
./result/sw/bin/darwin-rebuild switch --flake ~/.config/darwin
|
||||
popd
|
||||
rm -r "''${dir}"
|
||||
# Build NixOS for this system
|
||||
pushd "''${dir}"
|
||||
${nix}/bin/nix build "~/.config/darwin#darwinConfigurations.$(hostname -s).system"
|
||||
./result/sw/bin/darwin-rebuild switch --flake ~/.config/darwin
|
||||
popd
|
||||
rm -r "''${dir}"
|
||||
''
|
||||
|
||||
+30
-31
@@ -1,27 +1,26 @@
|
||||
{
|
||||
pkgs,
|
||||
git,
|
||||
...
|
||||
{ pkgs
|
||||
, git
|
||||
, ...
|
||||
}:
|
||||
|
||||
pkgs.writeShellScriptBin "inject-nixos-config" ''
|
||||
hostname="''${1}"
|
||||
if [ -n "''${hostname}"]; then
|
||||
hostname="''${1}"
|
||||
if [ -n "''${hostname}"]; then
|
||||
echo "You must provide a hostname";
|
||||
exit 1;
|
||||
fi
|
||||
fi
|
||||
|
||||
mv /etc/nixos /etc/nixos.bk
|
||||
cd /etc
|
||||
${git}/bin/git clone http://github.com/greg-hellings/nixos-config nixos
|
||||
mkdir -p "/etc/nixos/hosts/''${hostname}"
|
||||
mv /etc/nixos /etc/nixos.bk
|
||||
cd /etc
|
||||
${git}/bin/git clone http://github.com/greg-hellings/nixos-config nixos
|
||||
mkdir -p "/etc/nixos/hosts/''${hostname}"
|
||||
|
||||
# Prepares everything for the flake usage
|
||||
#cp /etc/nixos.bk/configuration.nix "/etc/nixos/hosts/''${hostname}/default.nix"
|
||||
cat << EOF > "/etc/nixos/hosts/''${hostname}/default.nix"
|
||||
{ pkgs, config, ... }:
|
||||
# Prepares everything for the flake usage
|
||||
#cp /etc/nixos.bk/configuration.nix "/etc/nixos/hosts/''${hostname}/default.nix"
|
||||
cat << EOF > "/etc/nixos/hosts/''${hostname}/default.nix"
|
||||
{ pkgs, config, ... }:
|
||||
|
||||
{
|
||||
{
|
||||
imports = [ ./hardware-configuration.nix ];
|
||||
|
||||
boot.loader = {
|
||||
@@ -34,23 +33,23 @@ cat << EOF > "/etc/nixos/hosts/''${hostname}/default.nix"
|
||||
home = true;
|
||||
tailscale.enable = true;
|
||||
};
|
||||
}
|
||||
EOF
|
||||
cp /etc/nixos.bk/hardware-configuration.nix "/etc/nixos/hosts/''${hostname}/hardware-configuration.nix"
|
||||
}
|
||||
EOF
|
||||
cp /etc/nixos.bk/hardware-configuration.nix "/etc/nixos/hosts/''${hostname}/hardware-configuration.nix"
|
||||
|
||||
# Prepare home-manager portion for setup
|
||||
mkdir -p "/etc/nixos/home/hosts/''${hostname}"
|
||||
cat << EOF > "/etc/nixos/home/hosts/''${hostname}/default.nix"
|
||||
{ pkgs, config, ... }:
|
||||
# Prepare home-manager portion for setup
|
||||
mkdir -p "/etc/nixos/home/hosts/''${hostname}"
|
||||
cat << EOF > "/etc/nixos/home/hosts/''${hostname}/default.nix"
|
||||
{ pkgs, config, ... }:
|
||||
|
||||
{
|
||||
}
|
||||
EOF
|
||||
{
|
||||
}
|
||||
EOF
|
||||
|
||||
# Prepares it for injecting the use case into the flake usage
|
||||
cp /etc/nixos.bk/hardware-configuration.nix /etc/nixos
|
||||
chown -R greg nixos
|
||||
# Prepares it for injecting the use case into the flake usage
|
||||
cp /etc/nixos.bk/hardware-configuration.nix /etc/nixos
|
||||
chown -R greg nixos
|
||||
|
||||
echo "Now you should be able to just run `nixos-rebuild switch` to enable the flake functionality"
|
||||
echo "After that and adding the entry to the flake, run `nixos-rebuild boot --flake '.#''${hostname}'` and reboot"
|
||||
echo "Now you should be able to just run `nixos-rebuild switch` to enable the flake functionality"
|
||||
echo "After that and adding the entry to the flake, run `nixos-rebuild boot --flake '.#''${hostname}'` and reboot"
|
||||
''
|
||||
|
||||
@@ -1,12 +1,11 @@
|
||||
{
|
||||
lib,
|
||||
buildPythonPackage,
|
||||
fetchurl,
|
||||
|
||||
django,
|
||||
djangorestframework,
|
||||
graypy,
|
||||
setuptools,
|
||||
{ lib
|
||||
, buildPythonPackage
|
||||
, fetchurl
|
||||
, django
|
||||
, djangorestframework
|
||||
, graypy
|
||||
, setuptools
|
||||
,
|
||||
}:
|
||||
|
||||
buildPythonPackage rec {
|
||||
@@ -28,7 +27,7 @@ buildPythonPackage rec {
|
||||
meta = with lib; {
|
||||
description = "ITG specific stuff";
|
||||
homepage = "http://www.ivrtechnology.com";
|
||||
maintainers = [];
|
||||
maintainers = [ ];
|
||||
};
|
||||
|
||||
doCheck = false;
|
||||
|
||||
@@ -1,18 +1,19 @@
|
||||
{ nixunstable, flake-utils }:
|
||||
|
||||
flake-utils.lib.eachDefaultSystemMap (system:
|
||||
let
|
||||
let
|
||||
pkgs = (import nixunstable { inherit system; });
|
||||
lib = pkgs.lib;
|
||||
callPackage = pkgs.lib.callPackageWith pkgs;
|
||||
python = pkgs.packages.python3;
|
||||
cp = pkgs.packages.python3.pkgs.callPackage;
|
||||
in {
|
||||
in
|
||||
{
|
||||
hms = pkgs.callPackage ./hms.nix {
|
||||
inherit pkgs;
|
||||
};
|
||||
|
||||
brew = pkgs.callPackage ./homebrew.nix {};
|
||||
brew = pkgs.callPackage ./homebrew.nix { };
|
||||
|
||||
django-rapyd-modernauth = pkgs.python3.pkgs.callPackage ./django-rapyd-modernauth.nix {
|
||||
buildPythonPackage = pkgs.python3.pkgs.buildPythonPackage;
|
||||
@@ -22,5 +23,5 @@ flake-utils.lib.eachDefaultSystemMap (system:
|
||||
buildPythonPackage = pkgs.python3.pkgs.buildPythonPackage;
|
||||
fetchPypi = pkgs.python.pkgs.fetchPypi;
|
||||
};
|
||||
}
|
||||
}
|
||||
)
|
||||
|
||||
+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";
|
||||
|
||||
@@ -1,3 +1,3 @@
|
||||
{ pkgs, gh, ... }:
|
||||
|
||||
pkgs.writeShellScriptBin "setup-ssh" (builtins.replaceStrings ["gh "] ["${gh}/bin/gh "] (builtins.readFile ./setup-ssh.sh))
|
||||
pkgs.writeShellScriptBin "setup-ssh" (builtins.replaceStrings [ "gh " ] [ "${gh}/bin/gh " ] (builtins.readFile ./setup-ssh.sh))
|
||||
|
||||
@@ -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 {
|
||||
@@ -27,6 +27,6 @@ buildPythonPackage rec {
|
||||
description = "Auto pipenv support for Xonsh";
|
||||
homepage = "https://github.com/greg-hellings/xontrib-apipenv";
|
||||
license = licenses.mit;
|
||||
maintainers = [];
|
||||
maintainers = [ ];
|
||||
};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user