Skip to content

Commit

Permalink
feat: nix: added alligator config and netboot support
Browse files Browse the repository at this point in the history
  • Loading branch information
Litarvan committed Jul 3, 2023
1 parent 01168ac commit 9d06992
Show file tree
Hide file tree
Showing 24 changed files with 566 additions and 83 deletions.
62 changes: 59 additions & 3 deletions flake.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

39 changes: 28 additions & 11 deletions flake.nix
Original file line number Diff line number Diff line change
@@ -1,24 +1,41 @@
{
description = "Leviathan infrastructure";

inputs.nixpkgs.url = "github:NixOS/nixpkgs/nixos-23.05";
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixos-23.05";
flake-utils.url = "github:numtide/flake-utils";
home-manager = {
url = "github:nix-community/home-manager/release-23.05";
inputs.nixpkgs.follows = "nixpkgs";
};
};

outputs = { self, nixpkgs }:
outputs = { self, nixpkgs, flake-utils, home-manager }:
let
inherit (nixpkgs) lib;

system = "x86_64-linux";
pkgs = import nixpkgs {
inherit system;
overlays = builtins.attrValues self.overlays;
config.allowUnfree = true;
};
systemsPkgs = builtins.listToAttrs (map (system: {
name = system;
value = import nixpkgs {
inherit system;

overlays = builtins.attrValues self.overlays;
config.allowUnfree = true;
};
}) flake-utils.lib.defaultSystems);
in
{
(flake-utils.lib.eachDefaultSystem (system:
let
pkgs = systemsPkgs.${system};
in
{
packages = import ./pkgs { inherit lib pkgs; };
}
)) // {
inherit systemsPkgs;
overlays = import ./pkgs/overlays.nix { inherit lib; };
packages.${system} = import ./pkgs { inherit lib pkgs; };

nixosModules = import ./modules;
nixosConfigurations = import ./images { inherit self nixpkgs pkgs lib; };
nixosConfigurations = import ./systems { inherit self nixpkgs home-manager systemsPkgs; };
};
}
4 changes: 2 additions & 2 deletions k8s/apps/bitwarden/volume.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ metadata:
name: bitwarden
spec:
capacity:
storage: 25Gi
storage: 5Gi # TODO: More!
accessModes:
- ReadWriteOnce
persistentVolumeReclaimPolicy: Retain
Expand All @@ -14,7 +14,7 @@ spec:
namespace: bitwarden
name: bitwarden
local:
path: /data/bitwarden
path: /data/nvme1/bitwarden
nodeAffinity:
required:
nodeSelectorTerms:
Expand Down
2 changes: 1 addition & 1 deletion k8s/apps/crosslink/volume.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ spec:
namespace: crosslink
name: crosslink
local:
path: /data/crosslink
path: /data/nvme1/crosslink
nodeAffinity:
required:
nodeSelectorTerms:
Expand Down
2 changes: 1 addition & 1 deletion k8s/apps/epilink/volume.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ spec:
namespace: epilink
name: epilink
local:
path: /data/epilink
path: /data/nvme1/epilink
nodeAffinity:
required:
nodeSelectorTerms:
Expand Down
2 changes: 1 addition & 1 deletion k8s/apps/haste-server/volume.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ spec:
namespace: haste-server
name: haste-server
local:
path: /data/haste-server
path: /data/nvme1/haste-server
nodeAffinity:
required:
nodeSelectorTerms:
Expand Down
4 changes: 2 additions & 2 deletions k8s/apps/meow/flood/volume.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ spec:
namespace: meow
name: flood-config
local:
path: /data/meow-flood-config
path: /data/nvme1/meow-flood-config
nodeAffinity:
required:
nodeSelectorTerms:
Expand All @@ -39,7 +39,7 @@ spec:
namespace: meow
name: flood-data
local:
path: /data/meow-flood-data
path: /data/nvme1/meow-flood-data
nodeAffinity:
required:
nodeSelectorTerms:
Expand Down
4 changes: 2 additions & 2 deletions k8s/apps/meow/jackett/volume.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ spec:
namespace: meow
name: jackett-config
local:
path: /data/meow-jackett-config
path: /data/nvme1/meow-jackett-config
nodeAffinity:
required:
nodeSelectorTerms:
Expand All @@ -39,7 +39,7 @@ spec:
namespace: meow
name: jackett-blackhole
local:
path: /data/meow-jackett-blackhole
path: /data/nvme1/meow-jackett-blackhole
nodeAffinity:
required:
nodeSelectorTerms:
Expand Down
2 changes: 1 addition & 1 deletion k8s/apps/meow/jellyfin/volume.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ spec:
namespace: meow
name: jellyfin-config
local:
path: /data/meow-jellyfin-config
path: /data/nvme1/meow-jellyfin-config
nodeAffinity:
required:
nodeSelectorTerms:
Expand Down
2 changes: 1 addition & 1 deletion k8s/apps/meow/qbittorrent/volume.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ spec:
namespace: meow
name: qbittorrent-config
local:
path: /data/meow-qbittorrent-config
path: /data/nvme1/meow-qbittorrent-config
nodeAffinity:
required:
nodeSelectorTerms:
Expand Down
2 changes: 1 addition & 1 deletion k8s/apps/meow/radarr/volume.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ spec:
namespace: meow
name: radarr-config
local:
path: /data/meow-radarr-config
path: /data/nvme1/meow-radarr-config
nodeAffinity:
required:
nodeSelectorTerms:
Expand Down
2 changes: 1 addition & 1 deletion k8s/apps/meow/sonarr/volume.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ spec:
namespace: meow
name: sonarr-config
local:
path: /data/meow-sonarr-config
path: /data/nvme1/meow-sonarr-config
nodeAffinity:
required:
nodeSelectorTerms:
Expand Down
2 changes: 1 addition & 1 deletion k8s/apps/meow/volume.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ spec:
namespace: meow
name: torrents
local:
path: /data/meow-torrents
path: /data/hdd1/meow-torrents
nodeAffinity:
required:
nodeSelectorTerms:
Expand Down
8 changes: 4 additions & 4 deletions k8s/apps/nextcloud/volume.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ spec:
namespace: nextcloud
name: nextcloud-apps
local:
path: /data/nextcloud-apps
path: /data/nvme1/nextcloud-apps
nodeAffinity:
required:
nodeSelectorTerms:
Expand All @@ -39,7 +39,7 @@ spec:
namespace: nextcloud
name: nextcloud-config
local:
path: /data/nextcloud-config
path: /data/nvme1/nextcloud-config
nodeAffinity:
required:
nodeSelectorTerms:
Expand All @@ -64,7 +64,7 @@ spec:
namespace: nextcloud
name: nextcloud-data
local:
path: /data/nextcloud-data
path: /data/hdd1/nextcloud-data
nodeAffinity:
required:
nodeSelectorTerms:
Expand All @@ -89,7 +89,7 @@ spec:
namespace: nextcloud
name: nextcloud-theme
local:
path: /data/nextcloud-theme
path: /data/nvme1/nextcloud-theme
nodeAffinity:
required:
nodeSelectorTerms:
Expand Down
8 changes: 7 additions & 1 deletion modules/core.nix
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{ pkgs, modulesPath, ... }:

{
imports = [
imports = [
(modulesPath + "/installer/scan/not-detected.nix")
];

Expand All @@ -18,4 +18,10 @@
environment.systemPackages = with pkgs; [ vim git ];

networking.nameservers = [ "1.1.1.1" ];

nix = {
package = pkgs.nixVersions.nix_2_16;
settings.extra-experimental-features = [ "flakes" "nix-command" "repl-flake" ];
};
nixpkgs.config.allowUnfree = true;
}
3 changes: 2 additions & 1 deletion modules/default.nix
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
{
core = import ./core.nix;
litarvan = import ./litarvan.nix;
netboot = import ./netboot.nix;
rke2 = import ./rke2.nix;
users = import ./users.nix;
}
23 changes: 0 additions & 23 deletions modules/litarvan.nix

This file was deleted.

Loading

0 comments on commit 9d06992

Please sign in to comment.