Add titan machine.

main
Joshua Potter 2023-12-10 12:23:11 -07:00
parent f7a592c094
commit ed16555818
5 changed files with 400 additions and 62 deletions

View File

@ -4,7 +4,7 @@
"inputs": {
"flake-compat": "flake-compat_2",
"flake-utils": "flake-utils_2",
"nixpkgs": "nixpkgs_3"
"nixpkgs": "nixpkgs_4"
},
"locked": {
"lastModified": 1701963345,
@ -25,10 +25,28 @@
"inputs": {
"flake-compat": "flake-compat",
"flake-utils": "flake-utils",
"nixpkgs": [
"framework",
"nixpkgs"
]
"nixpkgs": "nixpkgs"
},
"locked": {
"lastModified": 1701362005,
"narHash": "sha256-YueE+a2t54o41flddLpOlz3O6XZtSlaQyQVn909k4R4=",
"owner": "jrpotter",
"repo": "bootstrap",
"rev": "383ada86616194d8bf66b9646ec601f84c6add05",
"type": "github"
},
"original": {
"owner": "jrpotter",
"ref": "v0.1.2",
"repo": "bootstrap",
"type": "github"
}
},
"bootstrap_2": {
"inputs": {
"flake-compat": "flake-compat_4",
"flake-utils": "flake-utils_5",
"nixpkgs": "nixpkgs_7"
},
"locked": {
"lastModified": 1701362005,
@ -49,7 +67,7 @@
"inputs": {
"flake-compat": "flake-compat_3",
"flake-utils": "flake-utils_3",
"nixpkgs": "nixpkgs_4",
"nixpkgs": "nixpkgs_5",
"poetry2nix": "poetry2nix"
},
"locked": {
@ -109,6 +127,20 @@
"url": "https://flakehub.com/f/edolstra/flake-compat/1.tar.gz"
}
},
"flake-compat_4": {
"locked": {
"lastModified": 1696426674,
"narHash": "sha256-kvjfFW7WAETZlt09AgDn1MrtKzP7t90Vf7vypd3OL1U=",
"rev": "0f9255e01c2351cc7d116c072cb317785dd33b33",
"revCount": 57,
"type": "tarball",
"url": "https://api.flakehub.com/f/pinned/edolstra/flake-compat/1.0.1/018afb31-abd1-7bff-a5e4-cff7e18efb7a/source.tar.gz"
},
"original": {
"type": "tarball",
"url": "https://flakehub.com/f/edolstra/flake-compat/1.tar.gz"
}
},
"flake-utils": {
"inputs": {
"systems": "systems"
@ -181,15 +213,33 @@
"type": "github"
}
},
"flake-utils_5": {
"inputs": {
"systems": "systems_6"
},
"locked": {
"lastModified": 1694529238,
"narHash": "sha256-zsNZZGTGnMOf9YpHKJqMSsa0dXbfmxeoJ7xHlrt+xmY=",
"owner": "numtide",
"repo": "flake-utils",
"rev": "ff7b65b44d01cf9ba6a71320833626af21126384",
"type": "github"
},
"original": {
"owner": "numtide",
"repo": "flake-utils",
"type": "github"
}
},
"framework": {
"inputs": {
"bootstrap": "bootstrap",
"home-manager": "home-manager",
"nixpkgs": "nixpkgs"
"nixpkgs": "nixpkgs_2"
},
"locked": {
"lastModified": 1,
"narHash": "sha256-Vhq9jZLDEPDZPxrL8yiMsEAz7AWySO0a5WDCMXRRorU=",
"narHash": "sha256-fLpIvN3IMsXBmAFkKcqTAXtPJprGsQqukJ6iIYPuZO8=",
"path": "./hive/framework",
"type": "path"
},
@ -220,6 +270,25 @@
"type": "github"
}
},
"home-manager_2": {
"inputs": {
"nixpkgs": "nixpkgs_8"
},
"locked": {
"lastModified": 1702195668,
"narHash": "sha256-Lxmjez0nfNBptdqV5GsXKm7Bb7swjGsrxiLxWJu0tL8=",
"owner": "nix-community",
"repo": "home-manager",
"rev": "33110fb3c7fe6a94b98b641866a5eddb64b7c23f",
"type": "github"
},
"original": {
"owner": "nix-community",
"ref": "release-23.05",
"repo": "home-manager",
"type": "github"
}
},
"nix-github-actions": {
"inputs": {
"nixpkgs": [
@ -245,16 +314,16 @@
},
"nixpkgs": {
"locked": {
"lastModified": 1699596684,
"narHash": "sha256-XSXP8zjBZJBVvpNb2WmY0eW8O2ce+sVyj1T0/iBRIvg=",
"owner": "NixOS",
"lastModified": 1702151865,
"narHash": "sha256-9VAt19t6yQa7pHZLDbil/QctAgVsA66DLnzdRGqDisg=",
"owner": "nixos",
"repo": "nixpkgs",
"rev": "da4024d0ead5d7820f6bd15147d3fe2a0c0cec73",
"rev": "666fc80e7b2afb570462423cb0e1cf1a3a34fedd",
"type": "github"
},
"original": {
"owner": "NixOS",
"ref": "nixos-23.05",
"owner": "nixos",
"ref": "nixos-unstable",
"repo": "nixpkgs",
"type": "github"
}
@ -276,6 +345,22 @@
}
},
"nixpkgs_2": {
"locked": {
"lastModified": 1699596684,
"narHash": "sha256-XSXP8zjBZJBVvpNb2WmY0eW8O2ce+sVyj1T0/iBRIvg=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "da4024d0ead5d7820f6bd15147d3fe2a0c0cec73",
"type": "github"
},
"original": {
"owner": "NixOS",
"ref": "nixos-23.05",
"repo": "nixpkgs",
"type": "github"
}
},
"nixpkgs_3": {
"locked": {
"lastModified": 1701805708,
"narHash": "sha256-hh0S14E816Img0tPaNQSEKFvSscSIrvu1ypubtfh6M4=",
@ -291,7 +376,7 @@
"type": "github"
}
},
"nixpkgs_3": {
"nixpkgs_4": {
"locked": {
"lastModified": 1700794826,
"narHash": "sha256-RyJTnTNKhO0yqRpDISk03I/4A67/dp96YRxc86YOPgU=",
@ -307,7 +392,7 @@
"type": "github"
}
},
"nixpkgs_4": {
"nixpkgs_5": {
"locked": {
"lastModified": 1701718080,
"narHash": "sha256-6ovz0pG76dE0P170pmmZex1wWcQoeiomUZGggfH9XPs=",
@ -323,7 +408,55 @@
"type": "github"
}
},
"nixpkgs_5": {
"nixpkgs_6": {
"locked": {
"lastModified": 1701952659,
"narHash": "sha256-TJv2srXt6fYPUjxgLAL0cy4nuf1OZD4KuA1TrCiQqg0=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "b4372c4924d9182034066c823df76d6eaf1f4ec4",
"type": "github"
},
"original": {
"owner": "NixOS",
"ref": "nixos-23.11",
"repo": "nixpkgs",
"type": "github"
}
},
"nixpkgs_7": {
"locked": {
"lastModified": 1700390070,
"narHash": "sha256-de9KYi8rSJpqvBfNwscWdalIJXPo8NjdIZcEJum1mH0=",
"owner": "nixos",
"repo": "nixpkgs",
"rev": "e4ad989506ec7d71f7302cc3067abd82730a4beb",
"type": "github"
},
"original": {
"owner": "nixos",
"ref": "nixos-unstable",
"repo": "nixpkgs",
"type": "github"
}
},
"nixpkgs_8": {
"locked": {
"lastModified": 1701805708,
"narHash": "sha256-hh0S14E816Img0tPaNQSEKFvSscSIrvu1ypubtfh6M4=",
"owner": "nixos",
"repo": "nixpkgs",
"rev": "0561103cedb11e7554cf34cea81e5f5d578a4753",
"type": "github"
},
"original": {
"owner": "nixos",
"ref": "nixos-23.05",
"repo": "nixpkgs",
"type": "github"
}
},
"nixpkgs_9": {
"locked": {
"lastModified": 1701952659,
"narHash": "sha256-TJv2srXt6fYPUjxgLAL0cy4nuf1OZD4KuA1TrCiQqg0=",
@ -343,7 +476,7 @@
"inputs": {
"boardwise": "boardwise",
"coach-scraper": "coach-scraper",
"nixpkgs": "nixpkgs_5",
"nixpkgs": "nixpkgs_6",
"sops-nix": "sops-nix"
},
"locked": {
@ -386,8 +519,9 @@
"root": {
"inputs": {
"framework": "framework",
"nixpkgs": "nixpkgs_2",
"phobos": "phobos"
"nixpkgs": "nixpkgs_3",
"phobos": "phobos",
"titan": "titan"
}
},
"sops-nix": {
@ -486,6 +620,38 @@
"type": "indirect"
}
},
"systems_6": {
"locked": {
"lastModified": 1681028828,
"narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=",
"owner": "nix-systems",
"repo": "default",
"rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e",
"type": "github"
},
"original": {
"owner": "nix-systems",
"repo": "default",
"type": "github"
}
},
"titan": {
"inputs": {
"bootstrap": "bootstrap_2",
"home-manager": "home-manager_2",
"nixpkgs": "nixpkgs_9"
},
"locked": {
"lastModified": 1,
"narHash": "sha256-QiGFNP7CWSdZQMmFrOG2fSr/keHCDfswNu460cae3hU=",
"path": "./hive/titan",
"type": "path"
},
"original": {
"path": "./hive/titan",
"type": "path"
}
},
"treefmt-nix": {
"inputs": {
"nixpkgs": [

View File

@ -5,11 +5,13 @@
nixpkgs.url = "github:NixOS/nixpkgs/nixos-23.05";
framework.url = "path:./hive/framework";
phobos.url = "path:./hive/phobos";
titan.url = "path:./hive/titan";
};
outputs = { nixpkgs, framework, phobos, ... }:
outputs = { nixpkgs, framework, phobos, titan, ... }:
let
system = "x86_64-linux";
jrpotter = import ./users/jrpotter;
in
{
colmena = {
@ -17,9 +19,8 @@
nixpkgs = import nixpkgs { inherit system; };
specialArgs = { inherit system; };
nodeSpecialArgs = {
framework = {
jrpotter = import ./users/jrpotter;
};
framework = { inherit jrpotter; };
titan = { inherit jrpotter; };
};
};
@ -36,6 +37,7 @@
# Remote machines. Deploy using `colmena apply`
phobos = phobos.nixosModules.default;
titan = titan.nixosModules.default;
};
};
}

View File

@ -3,10 +3,7 @@
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixos-23.05";
bootstrap = {
url = "github:jrpotter/bootstrap/v0.1.2";
inputs.nixpkgs.follows = "nixpkgs";
};
bootstrap.url = "github:jrpotter/bootstrap/v0.1.2";
home-manager = {
url = "github:nix-community/home-manager/release-23.05";
inputs.nixpkgs.follows = "nixpkgs";
@ -14,15 +11,7 @@
};
outputs = { bootstrap, home-manager, ... }: {
nixosModules.default = { pkgs, system, jrpotter, ... }:
let
# This value determines the NixOS and home-manager release from which
# the default settings for stateful data, like file locations and
# database versions on your system were taken. This should probably
# never change.
stateVersion = "23.05";
in
{
nixosModules.default = { pkgs, system, jrpotter, ... }: {
imports = [
./hardware-configuration.nix
./configuration.nix
@ -36,8 +25,9 @@
# Used to pass non-default parameters to submodules.
extraSpecialArgs = {
inherit system stateVersion;
inherit system;
bootstrap = bootstrap.packages.${system}.default;
stateVersion = "23.05";
};
};
@ -50,7 +40,7 @@
];
};
system.stateVersion = stateVersion;
system.stateVersion = "23.05";
};
};
}

134
hive/titan/flake.lock Normal file
View File

@ -0,0 +1,134 @@
{
"nodes": {
"bootstrap": {
"inputs": {
"flake-compat": "flake-compat",
"flake-utils": "flake-utils",
"nixpkgs": "nixpkgs"
},
"locked": {
"lastModified": 1701362005,
"narHash": "sha256-YueE+a2t54o41flddLpOlz3O6XZtSlaQyQVn909k4R4=",
"owner": "jrpotter",
"repo": "bootstrap",
"rev": "383ada86616194d8bf66b9646ec601f84c6add05",
"type": "github"
},
"original": {
"owner": "jrpotter",
"ref": "v0.1.2",
"repo": "bootstrap",
"type": "github"
}
},
"flake-compat": {
"locked": {
"lastModified": 1696426674,
"narHash": "sha256-kvjfFW7WAETZlt09AgDn1MrtKzP7t90Vf7vypd3OL1U=",
"rev": "0f9255e01c2351cc7d116c072cb317785dd33b33",
"revCount": 57,
"type": "tarball",
"url": "https://api.flakehub.com/f/pinned/edolstra/flake-compat/1.0.1/018afb31-abd1-7bff-a5e4-cff7e18efb7a/source.tar.gz"
},
"original": {
"type": "tarball",
"url": "https://flakehub.com/f/edolstra/flake-compat/1.tar.gz"
}
},
"flake-utils": {
"inputs": {
"systems": "systems"
},
"locked": {
"lastModified": 1694529238,
"narHash": "sha256-zsNZZGTGnMOf9YpHKJqMSsa0dXbfmxeoJ7xHlrt+xmY=",
"owner": "numtide",
"repo": "flake-utils",
"rev": "ff7b65b44d01cf9ba6a71320833626af21126384",
"type": "github"
},
"original": {
"owner": "numtide",
"repo": "flake-utils",
"type": "github"
}
},
"home-manager": {
"inputs": {
"nixpkgs": [
"nixpkgs"
]
},
"locked": {
"lastModified": 1702195668,
"narHash": "sha256-Lxmjez0nfNBptdqV5GsXKm7Bb7swjGsrxiLxWJu0tL8=",
"owner": "nix-community",
"repo": "home-manager",
"rev": "33110fb3c7fe6a94b98b641866a5eddb64b7c23f",
"type": "github"
},
"original": {
"owner": "nix-community",
"ref": "release-23.05",
"repo": "home-manager",
"type": "github"
}
},
"nixpkgs": {
"locked": {
"lastModified": 1700390070,
"narHash": "sha256-de9KYi8rSJpqvBfNwscWdalIJXPo8NjdIZcEJum1mH0=",
"owner": "nixos",
"repo": "nixpkgs",
"rev": "e4ad989506ec7d71f7302cc3067abd82730a4beb",
"type": "github"
},
"original": {
"owner": "nixos",
"ref": "nixos-unstable",
"repo": "nixpkgs",
"type": "github"
}
},
"nixpkgs_2": {
"locked": {
"lastModified": 1701952659,
"narHash": "sha256-TJv2srXt6fYPUjxgLAL0cy4nuf1OZD4KuA1TrCiQqg0=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "b4372c4924d9182034066c823df76d6eaf1f4ec4",
"type": "github"
},
"original": {
"owner": "NixOS",
"ref": "nixos-23.11",
"repo": "nixpkgs",
"type": "github"
}
},
"root": {
"inputs": {
"bootstrap": "bootstrap",
"home-manager": "home-manager",
"nixpkgs": "nixpkgs_2"
}
},
"systems": {
"locked": {
"lastModified": 1681028828,
"narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=",
"owner": "nix-systems",
"repo": "default",
"rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e",
"type": "github"
},
"original": {
"owner": "nix-systems",
"repo": "default",
"type": "github"
}
}
},
"root": "root",
"version": 7
}

46
hive/titan/flake.nix Normal file
View File

@ -0,0 +1,46 @@
{
description = "Remote machine - titan";
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixos-23.11";
bootstrap.url = "github:jrpotter/bootstrap/v0.1.2";
home-manager.url = "github:nix-community/home-manager/release-23.05";
};
outputs = { bootstrap, home-manager, ... }: {
nixosModules.default = { modulesPath, pkgs, lib, system, jrpotter, ... }: {
imports = lib.optional (builtins.pathExists ./do-userdata.nix) ./do-userdata.nix ++ [
(modulesPath + "/virtualisation/digital-ocean-config.nix")
home-manager.nixosModules.home-manager
];
deployment.targetHost = "143.198.97.253";
networking.hostName = "titan";
home-manager = {
useGlobalPkgs = true;
useUserPackages = true;
users.jrpotter = jrpotter;
# Used to pass non-default parameters to submodules.
extraSpecialArgs = {
inherit system;
bootstrap = bootstrap.packages.${system}.default;
stateVersion = "23.05";
};
};
users.users.jrpotter = {
isNormalUser = true;
extraGroups = [
"docker"
"networkmanager"
"wheel"
];
};
system.stateVersion = "23.11";
};
};
}