bocchi: init
This commit is contained in:
parent
7254a7d61f
commit
5aae9811c6
3 changed files with 114 additions and 0 deletions
24
flake.nix
24
flake.nix
|
|
@ -51,6 +51,30 @@
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
|
|
||||||
|
nixosConfigurations.bocchi = nixpkgs.lib.nixosSystem {
|
||||||
|
system = "x86_64-linux";
|
||||||
|
modules = [
|
||||||
|
./hosts/nixos-common.nix
|
||||||
|
|
||||||
|
./modules/nix/linux.nix
|
||||||
|
./modules/shell.nix
|
||||||
|
|
||||||
|
./modules/services/caddy.nix
|
||||||
|
./modules/services/ssh.nix
|
||||||
|
./modules/network/vpn/tailscale.nix
|
||||||
|
./modules/services/uptime-kuma.nix
|
||||||
|
|
||||||
|
./modules/services/media/arr.nix
|
||||||
|
./modules/services/media/jellyfin.nix
|
||||||
|
|
||||||
|
./modules/users/nico.nix
|
||||||
|
|
||||||
|
./hosts/bocchi/configuration.nix
|
||||||
|
./hosts/nixos-common.nix
|
||||||
|
disko.nixosModules.disko
|
||||||
|
];
|
||||||
|
};
|
||||||
|
|
||||||
darwinConfigurations.kita = nix-darwin.lib.darwinSystem {
|
darwinConfigurations.kita = nix-darwin.lib.darwinSystem {
|
||||||
system = "aarch64-darwin";
|
system = "aarch64-darwin";
|
||||||
modules = [
|
modules = [
|
||||||
|
|
|
||||||
12
hosts/bocchi/configuration.nix
Normal file
12
hosts/bocchi/configuration.nix
Normal file
|
|
@ -0,0 +1,12 @@
|
||||||
|
{ config, lib, pkgs, ... }:
|
||||||
|
|
||||||
|
{
|
||||||
|
imports = [
|
||||||
|
./disko.nix
|
||||||
|
# ./hardware-configuration.nix
|
||||||
|
];
|
||||||
|
|
||||||
|
networking.hostName = "bocchi";
|
||||||
|
|
||||||
|
hardware.graphics.enable = true;
|
||||||
|
}
|
||||||
78
hosts/bocchi/disko.nix
Normal file
78
hosts/bocchi/disko.nix
Normal file
|
|
@ -0,0 +1,78 @@
|
||||||
|
{ ... }:
|
||||||
|
|
||||||
|
{
|
||||||
|
disko.devices = {
|
||||||
|
disk = {
|
||||||
|
main = {
|
||||||
|
type = "disk";
|
||||||
|
device = "/dev/nvme0n1";
|
||||||
|
content = {
|
||||||
|
type = "gpt";
|
||||||
|
partitions = {
|
||||||
|
ESP = {
|
||||||
|
size = "1G";
|
||||||
|
type = "EF00";
|
||||||
|
content = {
|
||||||
|
type = "filesystem";
|
||||||
|
format = "vfat";
|
||||||
|
mountpoint = "/boot";
|
||||||
|
mountOptions = [ "umask=0077" ];
|
||||||
|
};
|
||||||
|
};
|
||||||
|
root = {
|
||||||
|
size = "100%";
|
||||||
|
content = {
|
||||||
|
type = "btrfs";
|
||||||
|
extraArgs = [ "-f" ]; # Override existing partition
|
||||||
|
# Subvolumes must set a mountpoint in order to be mounted,
|
||||||
|
# unless their parent is mounted
|
||||||
|
subvolumes = {
|
||||||
|
# Subvolume name is different from mountpoint
|
||||||
|
"/root" = {
|
||||||
|
mountpoint = "/";
|
||||||
|
};
|
||||||
|
|
||||||
|
# Subvolume name is the same as the mountpoint
|
||||||
|
"/home" = {
|
||||||
|
mountOptions = [ "compress=zstd" ];
|
||||||
|
mountpoint = "/home";
|
||||||
|
};
|
||||||
|
|
||||||
|
"/nix" = {
|
||||||
|
mountOptions = [
|
||||||
|
"compress=zstd"
|
||||||
|
"noatime"
|
||||||
|
];
|
||||||
|
mountpoint = "/nix";
|
||||||
|
};
|
||||||
|
|
||||||
|
"/media" = {
|
||||||
|
mountOptions = [ "compress=zstd" ];
|
||||||
|
mountpoint = "/media";
|
||||||
|
};
|
||||||
|
|
||||||
|
"/media/shows" = { mountOptions = [ "compress=zstd" ]; };
|
||||||
|
"/media/movies" = { mountOptions = [ "compress=zstd" ]; };
|
||||||
|
"/media/music" = { mountOptions = [ "compress=zstd" ]; };
|
||||||
|
"/media/book" = { mountOptions = [ "compress=zstd" ]; };
|
||||||
|
"/media/repositories" = { mountOptions = [ "compress=zstd" ]; };
|
||||||
|
"/media/torrents" = { mountOptions = [ "compress=zstd" ]; };
|
||||||
|
|
||||||
|
# Subvolume for the swapfile
|
||||||
|
"/swap" = {
|
||||||
|
mountpoint = "/.swapvol";
|
||||||
|
swap = {
|
||||||
|
swapfile.size = "20M";
|
||||||
|
swapfile2.size = "20M";
|
||||||
|
swapfile2.path = "rel-path";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
Loading…
Add table
Add a link
Reference in a new issue