Compare commits
No commits in common. "2df96c6888f2365afa51372fbeea86d5306e6319" and "ca422e2643a377f7e40769c25a85108bb529588f" have entirely different histories.
2df96c6888
...
ca422e2643
9 changed files with 65 additions and 84 deletions
|
@ -1,4 +1,4 @@
|
||||||
#cloud-config
|
#cloud-config
|
||||||
|
|
||||||
runcmd:
|
runcmd:
|
||||||
- curl https://git.cherrykitten.dev/sammy/nixos-infect/raw/branch/sammy/nixos-infect | PROVIDER=hetznercloud NIX_CHANNEL=nixos-24.05 bash 2>&1 | tee /tmp/infect.log
|
- curl https://git.cherrykitten.dev/sammy/nixos-infect/raw/branch/sammy/nixos-infect | PROVIDER=hetznercloud NIX_CHANNEL=nixos-23.05 bash 2>&1 | tee /tmp/infect.log
|
||||||
|
|
30
flake.lock
30
flake.lock
|
@ -8,11 +8,11 @@
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1716797840,
|
"lastModified": 1716374277,
|
||||||
"narHash": "sha256-Xhc61kTl/hJ/UmLzkmZjGp1qkv7G0JqmqpIhpbLWQPg=",
|
"narHash": "sha256-xfLyv/CtVwt/Qqklq0K5/gkc9iAaK2Fa7xaZCmFPx30=",
|
||||||
"ref": "nix",
|
"ref": "nix",
|
||||||
"rev": "e89223d5af321e4298daf4f756d84231412f6f5f",
|
"rev": "b85442d733f8a1b32c5e5728259a6fc1a70c6dc3",
|
||||||
"revCount": 38,
|
"revCount": 37,
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "https://git.cherrykitten.dev/sammy/cherrykitten.dev"
|
"url": "https://git.cherrykitten.dev/sammy/cherrykitten.dev"
|
||||||
},
|
},
|
||||||
|
@ -119,32 +119,32 @@
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1716736833,
|
"lastModified": 1715381426,
|
||||||
"narHash": "sha256-rNObca6dm7Qs524O4st8VJH6pZ/Xe1gxl+Rx6mcWYo0=",
|
"narHash": "sha256-wPuqrAQGdv3ISs74nJfGb+Yprm23U/rFpcHFFNWgM94=",
|
||||||
"owner": "nix-community",
|
"owner": "nix-community",
|
||||||
"repo": "home-manager",
|
"repo": "home-manager",
|
||||||
"rev": "a631666f5ec18271e86a5cde998cba68c33d9ac6",
|
"rev": "ab5542e9dbd13d0100f8baae2bc2d68af901f4b4",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
"owner": "nix-community",
|
"owner": "nix-community",
|
||||||
"ref": "release-24.05",
|
"ref": "release-23.11",
|
||||||
"repo": "home-manager",
|
"repo": "home-manager",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"nixpkgs": {
|
"nixpkgs": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1717144377,
|
"lastModified": 1716218643,
|
||||||
"narHash": "sha256-F/TKWETwB5RaR8owkPPi+SPJh83AQsm6KrQAlJ8v/uA=",
|
"narHash": "sha256-i/E7gzQybvcGAYDRGDl39WL6yVk30Je/NXypBz6/nmM=",
|
||||||
"owner": "NixOS",
|
"owner": "NixOS",
|
||||||
"repo": "nixpkgs",
|
"repo": "nixpkgs",
|
||||||
"rev": "805a384895c696f802a9bf5bf4720f37385df547",
|
"rev": "a8695cbd09a7ecf3376bd62c798b9864d20f86ee",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
"id": "nixpkgs",
|
"id": "nixpkgs",
|
||||||
"ref": "nixos-24.05",
|
"ref": "nixos-23.11",
|
||||||
"type": "indirect"
|
"type": "indirect"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
@ -162,11 +162,11 @@
|
||||||
},
|
},
|
||||||
"nixpkgs-unstable": {
|
"nixpkgs-unstable": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1717112898,
|
"lastModified": 1716312448,
|
||||||
"narHash": "sha256-7R2ZvOnvd9h8fDd65p0JnB7wXfUvreox3xFdYWd1BnY=",
|
"narHash": "sha256-PH3w5av8d+TdwCkiWN4UPBTxrD9MpxIQPDVWctlomVo=",
|
||||||
"owner": "NixOS",
|
"owner": "NixOS",
|
||||||
"repo": "nixpkgs",
|
"repo": "nixpkgs",
|
||||||
"rev": "6132b0f6e344ce2fe34fc051b72fb46e34f668e0",
|
"rev": "e381a1288138aceda0ac63db32c7be545b446921",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
|
18
flake.nix
18
flake.nix
|
@ -1,6 +1,6 @@
|
||||||
{
|
{
|
||||||
inputs = {
|
inputs = {
|
||||||
nixpkgs.url = "nixpkgs/nixos-24.05";
|
nixpkgs.url = "nixpkgs/nixos-23.11";
|
||||||
nixpkgs-unstable.url = "nixpkgs/nixpkgs-unstable";
|
nixpkgs-unstable.url = "nixpkgs/nixpkgs-unstable";
|
||||||
|
|
||||||
colmena = {
|
colmena = {
|
||||||
|
@ -9,7 +9,7 @@
|
||||||
};
|
};
|
||||||
|
|
||||||
home-manager = {
|
home-manager = {
|
||||||
url = "github:nix-community/home-manager/release-24.05";
|
url = "github:nix-community/home-manager/release-23.11";
|
||||||
inputs.nixpkgs.follows = "nixpkgs";
|
inputs.nixpkgs.follows = "nixpkgs";
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -77,6 +77,20 @@
|
||||||
);
|
);
|
||||||
|
|
||||||
packages.x86_64-linux.iso = self.nixosConfigurations.iso.config.system.build.isoImage;
|
packages.x86_64-linux.iso = self.nixosConfigurations.iso.config.system.build.isoImage;
|
||||||
|
|
||||||
|
homeConfigurations =
|
||||||
|
let
|
||||||
|
pkgs = import nixpkgs { system = "x86_64-linux"; };
|
||||||
|
in
|
||||||
|
nixpkgs.lib.genAttrs (builtins.attrNames (builtins.readDir ./users)) (name: home-manager.lib.homeManagerConfiguration {
|
||||||
|
inherit pkgs;
|
||||||
|
modules = [ ./users/${name}/home.nix ];
|
||||||
|
extraSpecialArgs = {
|
||||||
|
inherit inputs;
|
||||||
|
flake = self;
|
||||||
|
pkgs-unstable = import nixpkgs-unstable { system = "x86_64-linux"; };
|
||||||
|
};
|
||||||
|
});
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
17
hive.nix
17
hive.nix
|
@ -30,6 +30,23 @@ in
|
||||||
inputs.home-manager.nixosModules.home-manager
|
inputs.home-manager.nixosModules.home-manager
|
||||||
] ++ builtins.attrValues self.nixosModules;
|
] ++ builtins.attrValues self.nixosModules;
|
||||||
|
|
||||||
|
options.cherrykitten = {
|
||||||
|
primaryIPv4 = lib.mkOption {
|
||||||
|
type = lib.types.nullOr lib.types.str;
|
||||||
|
default =
|
||||||
|
if (config.networking.interfaces ? eth0) then
|
||||||
|
(builtins.elemAt config.networking.interfaces.eth0.ipv4.addresses 0).address
|
||||||
|
else null;
|
||||||
|
};
|
||||||
|
primaryIPv6 = lib.mkOption {
|
||||||
|
type = lib.types.nullOr lib.types.str;
|
||||||
|
default =
|
||||||
|
if (config.networking.interfaces ? eth0) then
|
||||||
|
(builtins.elemAt config.networking.interfaces.eth0.ipv6.addresses 0).address
|
||||||
|
else null;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
config = {
|
config = {
|
||||||
networking.hostName = name;
|
networking.hostName = name;
|
||||||
networking.domain = "cherrykitten.xyz";
|
networking.domain = "cherrykitten.xyz";
|
||||||
|
|
|
@ -5,8 +5,7 @@
|
||||||
|
|
||||||
{
|
{
|
||||||
imports =
|
imports =
|
||||||
[
|
[ (modulesPath + "/installer/scan/not-detected.nix")
|
||||||
(modulesPath + "/installer/scan/not-detected.nix")
|
|
||||||
];
|
];
|
||||||
|
|
||||||
boot.initrd.availableKernelModules = [ "xhci_pci" "thunderbolt" "nvme" "usb_storage" "sd_mod" ];
|
boot.initrd.availableKernelModules = [ "xhci_pci" "thunderbolt" "nvme" "usb_storage" "sd_mod" ];
|
||||||
|
@ -15,8 +14,7 @@
|
||||||
boot.extraModulePackages = [ ];
|
boot.extraModulePackages = [ ];
|
||||||
|
|
||||||
fileSystems."/" =
|
fileSystems."/" =
|
||||||
{
|
{ device = "/dev/disk/by-uuid/a3e601e7-7005-4513-8dff-748d9f384646";
|
||||||
device = "/dev/disk/by-uuid/a3e601e7-7005-4513-8dff-748d9f384646";
|
|
||||||
fsType = "btrfs";
|
fsType = "btrfs";
|
||||||
options = [ "subvol=root" ];
|
options = [ "subvol=root" ];
|
||||||
};
|
};
|
||||||
|
@ -25,42 +23,38 @@
|
||||||
boot.initrd.luks.devices."swap".device = "/dev/disk/by-uuid/4bd4ac67-74a8-4a67-b5eb-e8ebf814d5d7";
|
boot.initrd.luks.devices."swap".device = "/dev/disk/by-uuid/4bd4ac67-74a8-4a67-b5eb-e8ebf814d5d7";
|
||||||
|
|
||||||
fileSystems."/home" =
|
fileSystems."/home" =
|
||||||
{
|
{ device = "/dev/disk/by-uuid/a3e601e7-7005-4513-8dff-748d9f384646";
|
||||||
device = "/dev/disk/by-uuid/a3e601e7-7005-4513-8dff-748d9f384646";
|
|
||||||
fsType = "btrfs";
|
fsType = "btrfs";
|
||||||
options = [ "subvol=home" ];
|
options = [ "subvol=home" ];
|
||||||
};
|
};
|
||||||
|
|
||||||
fileSystems."/nix" =
|
fileSystems."/nix" =
|
||||||
{
|
{ device = "/dev/disk/by-uuid/a3e601e7-7005-4513-8dff-748d9f384646";
|
||||||
device = "/dev/disk/by-uuid/a3e601e7-7005-4513-8dff-748d9f384646";
|
|
||||||
fsType = "btrfs";
|
fsType = "btrfs";
|
||||||
options = [ "subvol=nix" ];
|
options = [ "subvol=nix" ];
|
||||||
};
|
};
|
||||||
|
|
||||||
fileSystems."/persist" =
|
fileSystems."/persist" =
|
||||||
{
|
{ device = "/dev/disk/by-uuid/a3e601e7-7005-4513-8dff-748d9f384646";
|
||||||
device = "/dev/disk/by-uuid/a3e601e7-7005-4513-8dff-748d9f384646";
|
|
||||||
fsType = "btrfs";
|
fsType = "btrfs";
|
||||||
options = [ "subvol=persist" ];
|
options = [ "subvol=persist" ];
|
||||||
};
|
};
|
||||||
|
|
||||||
fileSystems."/var/log" =
|
fileSystems."/var/log" =
|
||||||
{
|
{ device = "/dev/disk/by-uuid/a3e601e7-7005-4513-8dff-748d9f384646";
|
||||||
device = "/dev/disk/by-uuid/a3e601e7-7005-4513-8dff-748d9f384646";
|
|
||||||
fsType = "btrfs";
|
fsType = "btrfs";
|
||||||
options = [ "subvol=log" ];
|
options = [ "subvol=log" ];
|
||||||
neededForBoot = true;
|
neededForBoot = true;
|
||||||
};
|
};
|
||||||
|
|
||||||
fileSystems."/boot" =
|
fileSystems."/boot" =
|
||||||
{
|
{ device = "/dev/disk/by-uuid/6891-5A39";
|
||||||
device = "/dev/disk/by-uuid/6891-5A39";
|
|
||||||
fsType = "vfat";
|
fsType = "vfat";
|
||||||
};
|
};
|
||||||
|
|
||||||
swapDevices =
|
swapDevices =
|
||||||
[{ device = "/dev/disk/by-uuid/65f4c4dd-57e7-4709-a017-2277874d3917"; }];
|
[ { device = "/dev/disk/by-uuid/65f4c4dd-57e7-4709-a017-2277874d3917"; }
|
||||||
|
];
|
||||||
|
|
||||||
# Enables DHCP on each ethernet and wireless interface. In case of scripted networking
|
# Enables DHCP on each ethernet and wireless interface. In case of scripted networking
|
||||||
# (the default) this is the recommended approach. When using systemd-networkd it's
|
# (the default) this is the recommended approach. When using systemd-networkd it's
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
{ lib, config, ... }: {
|
{ lib, ... }: {
|
||||||
imports = [
|
imports = [
|
||||||
./gotosocial.nix
|
./gotosocial.nix
|
||||||
../../profiles/hcloud
|
../../profiles/hcloud
|
||||||
|
@ -6,12 +6,6 @@
|
||||||
];
|
];
|
||||||
fileSystems."/" = { device = "/dev/sda1"; fsType = "ext4"; };
|
fileSystems."/" = { device = "/dev/sda1"; fsType = "ext4"; };
|
||||||
cherrykitten.backups.enable = true;
|
cherrykitten.backups.enable = true;
|
||||||
cherrykitten.network = {
|
|
||||||
public_IPv4 = "128.140.109.125";
|
|
||||||
public_IPv6 = "2a01:4f8:c2c:bd32::1";
|
|
||||||
internal_IPv4 = "10.69.0.5";
|
|
||||||
internal_IPv6 = "fe80::9400:3ff:fe24:677a";
|
|
||||||
};
|
|
||||||
|
|
||||||
networking = {
|
networking = {
|
||||||
nameservers = [
|
nameservers = [
|
||||||
|
@ -27,22 +21,16 @@
|
||||||
interfaces = {
|
interfaces = {
|
||||||
eth0 = {
|
eth0 = {
|
||||||
ipv4.addresses = [
|
ipv4.addresses = [
|
||||||
{ address = config.cherrykitten.network.public_IPv4; prefixLength = 32; }
|
{ address = "128.140.109.125"; prefixLength = 32; }
|
||||||
];
|
];
|
||||||
ipv6.addresses = [
|
ipv6.addresses = [
|
||||||
{ address = config.cherrykitten.network.public_IPv6; prefixLength = 64; }
|
{ address = "2a01:4f8:c2c:bd32::1"; prefixLength = 64; }
|
||||||
|
{ address = "fe80::9400:3ff:fe24:677a"; prefixLength = 64; }
|
||||||
];
|
];
|
||||||
ipv4.routes = [{ address = "172.31.1.1"; prefixLength = 32; }];
|
ipv4.routes = [{ address = "172.31.1.1"; prefixLength = 32; }];
|
||||||
ipv6.routes = [{ address = "fe80::1"; prefixLength = 128; }];
|
ipv6.routes = [{ address = "fe80::1"; prefixLength = 128; }];
|
||||||
};
|
};
|
||||||
eth1 = {
|
|
||||||
ipv4.addresses = [
|
|
||||||
{ address = config.cherrykitten.network.internal_IPv4; prefixLength = 32; }
|
|
||||||
];
|
|
||||||
ipv6.addresses = [
|
|
||||||
{ address = config.cherrykitten.network.internal_IPv6; prefixLength = 64; }
|
|
||||||
];
|
|
||||||
};
|
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
services.udev.extraRules = ''
|
services.udev.extraRules = ''
|
||||||
|
|
6
justfile
6
justfile
|
@ -9,12 +9,6 @@ apply:
|
||||||
build-vm host="bengal":
|
build-vm host="bengal":
|
||||||
nixos-rebuild build-vm --flake .#{{host}}
|
nixos-rebuild build-vm --flake .#{{host}}
|
||||||
|
|
||||||
create-new-hcloud-host name="" type="cx11" location="nbg1":
|
|
||||||
hcloud server create --name '{{name}}' --type 'cx11' --image debian-11 --user-data-from-file files/cloud-init.yml --location nbg1 --ssh-key openpgp:0x6068FEBB --network cherrykitten-internal
|
|
||||||
|
|
||||||
delete-hcloud-host name="":
|
|
||||||
hcloud server delete '{{name}}'
|
|
||||||
|
|
||||||
git:
|
git:
|
||||||
nix fmt
|
nix fmt
|
||||||
git add .
|
git add .
|
||||||
|
|
|
@ -1,26 +0,0 @@
|
||||||
{ config, lib, ... }:
|
|
||||||
let
|
|
||||||
cfg = config.cherrykitten;
|
|
||||||
in
|
|
||||||
{
|
|
||||||
options.cherrykitten = {
|
|
||||||
network = {
|
|
||||||
public_IPv4 = lib.mkOption {
|
|
||||||
type = lib.types.nullOr lib.types.str;
|
|
||||||
default = null;
|
|
||||||
};
|
|
||||||
public_IPv6 = lib.mkOption {
|
|
||||||
type = lib.types.nullOr lib.types.str;
|
|
||||||
default = null;
|
|
||||||
};
|
|
||||||
internal_IPv4 = lib.mkOption {
|
|
||||||
type = lib.types.nullOr lib.types.str;
|
|
||||||
default = null;
|
|
||||||
};
|
|
||||||
internal_IPv6 = lib.mkOption {
|
|
||||||
type = lib.types.nullOr lib.types.str;
|
|
||||||
default = null;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
|
||||||
}
|
|
Loading…
Reference in a new issue