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
|
||||
|
||||
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": {
|
||||
"lastModified": 1716797840,
|
||||
"narHash": "sha256-Xhc61kTl/hJ/UmLzkmZjGp1qkv7G0JqmqpIhpbLWQPg=",
|
||||
"lastModified": 1716374277,
|
||||
"narHash": "sha256-xfLyv/CtVwt/Qqklq0K5/gkc9iAaK2Fa7xaZCmFPx30=",
|
||||
"ref": "nix",
|
||||
"rev": "e89223d5af321e4298daf4f756d84231412f6f5f",
|
||||
"revCount": 38,
|
||||
"rev": "b85442d733f8a1b32c5e5728259a6fc1a70c6dc3",
|
||||
"revCount": 37,
|
||||
"type": "git",
|
||||
"url": "https://git.cherrykitten.dev/sammy/cherrykitten.dev"
|
||||
},
|
||||
|
@ -119,32 +119,32 @@
|
|||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1716736833,
|
||||
"narHash": "sha256-rNObca6dm7Qs524O4st8VJH6pZ/Xe1gxl+Rx6mcWYo0=",
|
||||
"lastModified": 1715381426,
|
||||
"narHash": "sha256-wPuqrAQGdv3ISs74nJfGb+Yprm23U/rFpcHFFNWgM94=",
|
||||
"owner": "nix-community",
|
||||
"repo": "home-manager",
|
||||
"rev": "a631666f5ec18271e86a5cde998cba68c33d9ac6",
|
||||
"rev": "ab5542e9dbd13d0100f8baae2bc2d68af901f4b4",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "nix-community",
|
||||
"ref": "release-24.05",
|
||||
"ref": "release-23.11",
|
||||
"repo": "home-manager",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"nixpkgs": {
|
||||
"locked": {
|
||||
"lastModified": 1717144377,
|
||||
"narHash": "sha256-F/TKWETwB5RaR8owkPPi+SPJh83AQsm6KrQAlJ8v/uA=",
|
||||
"lastModified": 1716218643,
|
||||
"narHash": "sha256-i/E7gzQybvcGAYDRGDl39WL6yVk30Je/NXypBz6/nmM=",
|
||||
"owner": "NixOS",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "805a384895c696f802a9bf5bf4720f37385df547",
|
||||
"rev": "a8695cbd09a7ecf3376bd62c798b9864d20f86ee",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"id": "nixpkgs",
|
||||
"ref": "nixos-24.05",
|
||||
"ref": "nixos-23.11",
|
||||
"type": "indirect"
|
||||
}
|
||||
},
|
||||
|
@ -162,11 +162,11 @@
|
|||
},
|
||||
"nixpkgs-unstable": {
|
||||
"locked": {
|
||||
"lastModified": 1717112898,
|
||||
"narHash": "sha256-7R2ZvOnvd9h8fDd65p0JnB7wXfUvreox3xFdYWd1BnY=",
|
||||
"lastModified": 1716312448,
|
||||
"narHash": "sha256-PH3w5av8d+TdwCkiWN4UPBTxrD9MpxIQPDVWctlomVo=",
|
||||
"owner": "NixOS",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "6132b0f6e344ce2fe34fc051b72fb46e34f668e0",
|
||||
"rev": "e381a1288138aceda0ac63db32c7be545b446921",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
|
18
flake.nix
18
flake.nix
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
inputs = {
|
||||
nixpkgs.url = "nixpkgs/nixos-24.05";
|
||||
nixpkgs.url = "nixpkgs/nixos-23.11";
|
||||
nixpkgs-unstable.url = "nixpkgs/nixpkgs-unstable";
|
||||
|
||||
colmena = {
|
||||
|
@ -9,7 +9,7 @@
|
|||
};
|
||||
|
||||
home-manager = {
|
||||
url = "github:nix-community/home-manager/release-24.05";
|
||||
url = "github:nix-community/home-manager/release-23.11";
|
||||
inputs.nixpkgs.follows = "nixpkgs";
|
||||
};
|
||||
|
||||
|
@ -77,6 +77,20 @@
|
|||
);
|
||||
|
||||
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"; };
|
||||
};
|
||||
});
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
19
hive.nix
19
hive.nix
|
@ -30,12 +30,29 @@ in
|
|||
inputs.home-manager.nixosModules.home-manager
|
||||
] ++ 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 = {
|
||||
networking.hostName = name;
|
||||
networking.domain = "cherrykitten.xyz";
|
||||
|
||||
deployment = {
|
||||
allowLocalDeployment = true;
|
||||
allowLocalDeployment = true;
|
||||
targetUser = lib.mkDefault "sammy";
|
||||
tags = [ pkgs.stdenv.hostPlatform.system ];
|
||||
};
|
||||
|
|
|
@ -5,8 +5,7 @@
|
|||
|
||||
{
|
||||
imports =
|
||||
[
|
||||
(modulesPath + "/installer/scan/not-detected.nix")
|
||||
[ (modulesPath + "/installer/scan/not-detected.nix")
|
||||
];
|
||||
|
||||
boot.initrd.availableKernelModules = [ "xhci_pci" "thunderbolt" "nvme" "usb_storage" "sd_mod" ];
|
||||
|
@ -15,8 +14,7 @@
|
|||
boot.extraModulePackages = [ ];
|
||||
|
||||
fileSystems."/" =
|
||||
{
|
||||
device = "/dev/disk/by-uuid/a3e601e7-7005-4513-8dff-748d9f384646";
|
||||
{ device = "/dev/disk/by-uuid/a3e601e7-7005-4513-8dff-748d9f384646";
|
||||
fsType = "btrfs";
|
||||
options = [ "subvol=root" ];
|
||||
};
|
||||
|
@ -25,42 +23,38 @@
|
|||
boot.initrd.luks.devices."swap".device = "/dev/disk/by-uuid/4bd4ac67-74a8-4a67-b5eb-e8ebf814d5d7";
|
||||
|
||||
fileSystems."/home" =
|
||||
{
|
||||
device = "/dev/disk/by-uuid/a3e601e7-7005-4513-8dff-748d9f384646";
|
||||
{ device = "/dev/disk/by-uuid/a3e601e7-7005-4513-8dff-748d9f384646";
|
||||
fsType = "btrfs";
|
||||
options = [ "subvol=home" ];
|
||||
};
|
||||
|
||||
fileSystems."/nix" =
|
||||
{
|
||||
device = "/dev/disk/by-uuid/a3e601e7-7005-4513-8dff-748d9f384646";
|
||||
{ device = "/dev/disk/by-uuid/a3e601e7-7005-4513-8dff-748d9f384646";
|
||||
fsType = "btrfs";
|
||||
options = [ "subvol=nix" ];
|
||||
};
|
||||
|
||||
fileSystems."/persist" =
|
||||
{
|
||||
device = "/dev/disk/by-uuid/a3e601e7-7005-4513-8dff-748d9f384646";
|
||||
{ device = "/dev/disk/by-uuid/a3e601e7-7005-4513-8dff-748d9f384646";
|
||||
fsType = "btrfs";
|
||||
options = [ "subvol=persist" ];
|
||||
};
|
||||
|
||||
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";
|
||||
options = [ "subvol=log" ];
|
||||
neededForBoot = true;
|
||||
};
|
||||
|
||||
fileSystems."/boot" =
|
||||
{
|
||||
device = "/dev/disk/by-uuid/6891-5A39";
|
||||
{ device = "/dev/disk/by-uuid/6891-5A39";
|
||||
fsType = "vfat";
|
||||
};
|
||||
|
||||
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
|
||||
# (the default) this is the recommended approach. When using systemd-networkd it's
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
{ lib, config, ... }: {
|
||||
{ lib, ... }: {
|
||||
imports = [
|
||||
./gotosocial.nix
|
||||
../../profiles/hcloud
|
||||
|
@ -6,12 +6,6 @@
|
|||
];
|
||||
fileSystems."/" = { device = "/dev/sda1"; fsType = "ext4"; };
|
||||
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 = {
|
||||
nameservers = [
|
||||
|
@ -27,22 +21,16 @@
|
|||
interfaces = {
|
||||
eth0 = {
|
||||
ipv4.addresses = [
|
||||
{ address = config.cherrykitten.network.public_IPv4; prefixLength = 32; }
|
||||
{ address = "128.140.109.125"; prefixLength = 32; }
|
||||
];
|
||||
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; }];
|
||||
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 = ''
|
||||
|
|
6
justfile
6
justfile
|
@ -9,12 +9,6 @@ apply:
|
|||
build-vm host="bengal":
|
||||
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:
|
||||
nix fmt
|
||||
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;
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
|
@ -2,6 +2,6 @@
|
|||
|
||||
{
|
||||
nixpkgs.overlays = [
|
||||
(import ./gotosocial.nix)
|
||||
(import ./gotosocial.nix)
|
||||
];
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue