Reorganized the repo

This commit is contained in:
willifan 2024-07-06 21:33:59 +02:00
parent 5176e7cdf8
commit f1b559ba06
62 changed files with 182 additions and 45 deletions

View file

@ -1,18 +1,4 @@
{ pkgs, hostname, ... }:
{ pkgs, ... }:
{
networking.hostName = hostname;
imports = [
./nix-ld.nix
./boot.nix
./printers.nix
];
hardware.bluetooth.enable = true;
services.hardware.bolt.enable = true;
networking.networkmanager.enable = true;
console.keyMap = "de";
nixpkgs.config.allowUnfree = true;
nix.settings.experimental-features = [ "nix-command" "flakes" ];
system.stateVersion = "23.11";
}

View file

@ -1,7 +1,8 @@
{ pkgs, hostname, ... }:
{ pkgs, hostname, type, ... }:
{
imports = [
./common
./${type}
./${hostname}
];
}

17
hosts/desktop/default.nix Normal file
View file

@ -0,0 +1,17 @@
{ pkgs, hostname, ... }:
{
networking.hostName = hostname;
imports = [
./nix-ld.nix
./boot.nix
./printers.nix
];
hardware.bluetooth.enable = true;
services.hardware.bolt.enable = true;
networking.networkmanager.enable = true;
console.keyMap = "de";
nixpkgs.config.allowUnfree = true;
nix.settings.experimental-features = [ "nix-command" "flakes" ];
}

View file

@ -0,0 +1,19 @@
{ pkgs, ... }:
{
environment.systemPackages = with pkgs; [
mergerfs
];
fileSystems."/storage" = {
fsType = "fuse.mergerfs";
device = "/mnt/disks/*";
options = ["cache.files=partial" "dropcacheonclose=true" "category.create=mfs"];
};
services.snapraid = {
enable = true;
};
}

View file

@ -0,0 +1,11 @@
{ pkgs, ... }:
{
imports = [
./disko.nix
./hardware-configuration.nix
];
}

View file

@ -0,0 +1,52 @@
{
disko.devices = {
disk = {
root-drive = {
type = "disk";
device = "/dev/disk/by-id/wwn-0x5001b44ebc0b613a";
content = {
type = "gpt";
partitions = {
ESP = {
priority = 1;
name = "ESP";
size = "512M";
type = "EF00";
content = {
type = "filesystem";
format = "vfat";
mountpoint = "/boot";
};
};
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
"/rootfs" = {
mountOptions = [ "compress=zstd" "noatime" ];
mountpoint = "/";
};
# Subvolume name is the same as the mountpoint
"/home" = {
mountOptions = [ "compress=zstd" "noatime" ];
mountpoint = "/home";
};
# Parent is not mounted so the mountpoint must be set
"/nix" = {
mountOptions = [ "compress=zstd" "noatime" ];
mountpoint = "/nix";
};
};
};
};
};
};
};
};
};
}