forked from nico/dots
bocchi: init
This commit is contained in:
parent
7254a7d61f
commit
5aae9811c6
3 changed files with 114 additions and 0 deletions
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