apricot: init
This commit is contained in:
parent
a6a5c2cbca
commit
2917dcbe3b
5 changed files with 92 additions and 0 deletions
21
hosts/apricot/default.nix
Normal file
21
hosts/apricot/default.nix
Normal file
|
|
@ -0,0 +1,21 @@
|
|||
{ config, modules, overlays, pkgs, ... }: {
|
||||
networking.hostName = "apricot";
|
||||
system.stateVersion = "21.05";
|
||||
|
||||
imports = with modules.system; [
|
||||
base
|
||||
input
|
||||
kernel
|
||||
nix
|
||||
packages
|
||||
security
|
||||
snapper
|
||||
|
||||
./filesystem.nix
|
||||
./kernel.nix
|
||||
./networking.nix
|
||||
|
||||
../../users/rin.nix
|
||||
];
|
||||
}
|
||||
|
||||
29
hosts/apricot/filesystem.nix
Normal file
29
hosts/apricot/filesystem.nix
Normal file
|
|
@ -0,0 +1,29 @@
|
|||
{ config, ... }:
|
||||
let
|
||||
mkMount = uuid: type: {
|
||||
device = "/dev/disk/by-uuid/${uuid}";
|
||||
fsType = type;
|
||||
options = [ "defaults" "relatime" ];
|
||||
};
|
||||
mkBtrfsMount = subvolid: atime: mkMount "c79ebe18-2d2b-4f0f-9940-afd9378afa09" "btrfs" // {
|
||||
options = [ "autodefrag" "compress=zstd:3" "defaults" "nossd" "nossd_spread" "subvolid=${builtins.toString subvolid}" (if atime then "relatime" else "noatime")];
|
||||
};
|
||||
in
|
||||
{
|
||||
fileSystems = {
|
||||
"/" = {
|
||||
device = "rootfs";
|
||||
fsType = "tmpfs";
|
||||
options = [ "defaults" "size=4G" "mode=755" ];
|
||||
};
|
||||
"/boot" = mkMount "2818-A529" "vfat";
|
||||
"/mnt/hdd" = mkMount "436ad832-8dcc-4813-b663-4d0b7b773ff2" "ext4";
|
||||
|
||||
"/mnt/butter" = mkBtrfsMount 5 true;
|
||||
"/nix" = mkBtrfsMount 258 false;
|
||||
"/home" = mkBtrfsMount 260 true;
|
||||
"/home/.snapshots" = mkBtrfsMount 263 false;
|
||||
"/root" = mkBtrfsMount 261 false;
|
||||
"/var" = mkBtrfsMount 259 false;
|
||||
};
|
||||
}
|
||||
18
hosts/apricot/kernel.nix
Normal file
18
hosts/apricot/kernel.nix
Normal file
|
|
@ -0,0 +1,18 @@
|
|||
{ config, pkgs, ... }: {
|
||||
boot = {
|
||||
loader = {
|
||||
systemd-boot.enable = true;
|
||||
efi.canTouchEfiVariables = true;
|
||||
grub = {
|
||||
enable = true;
|
||||
efiSupport = true;
|
||||
device = "nodev";
|
||||
};
|
||||
};
|
||||
initrd.kernelModules = [ "i915" ];
|
||||
kernelParams = [
|
||||
"intel_pstate=passive"
|
||||
];
|
||||
kernelPackages = pkgs.linuxPackages_latest;
|
||||
};
|
||||
}
|
||||
23
hosts/apricot/networking.nix
Normal file
23
hosts/apricot/networking.nix
Normal file
|
|
@ -0,0 +1,23 @@
|
|||
{ config, ... }: {
|
||||
networking = {
|
||||
wireless = {
|
||||
enable = true;
|
||||
interfaces = [ "wlp1s0" ];
|
||||
};
|
||||
|
||||
useDHCP = false;
|
||||
interfaces.enp2s0.useDHCP = false;
|
||||
interfaces.wlp1s0.useDHCP = false;
|
||||
|
||||
interfaces.enp2s0.ipv4.addresses = [{
|
||||
address = "10.0.0.1";
|
||||
prefixLength = 24;
|
||||
}];
|
||||
interfaces.wlp1s0.ipv4.addresses = [{
|
||||
address = "192.168.100.14";
|
||||
prefixLength = 24;
|
||||
}];
|
||||
defaultGateway = "192.168.100.1";
|
||||
nameservers = [ "8.8.8.8" ];
|
||||
};
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue