Add Jovian back again to try it out
This commit is contained in:
parent
3d3c89c326
commit
5c8c68331d
11 changed files with 256 additions and 19 deletions
8
hosts/jupiter/boot/default.nix
Normal file
8
hosts/jupiter/boot/default.nix
Normal file
|
@ -0,0 +1,8 @@
|
|||
{ pkgs, ... }:
|
||||
{
|
||||
boot = {
|
||||
kernelPackages = pkgs.linuxPackages_latest;
|
||||
loader.systemd-boot.enable = true;
|
||||
plymouth.enable = true;
|
||||
};
|
||||
}
|
28
hosts/jupiter/default.nix
Normal file
28
hosts/jupiter/default.nix
Normal file
|
@ -0,0 +1,28 @@
|
|||
{ lib, jovian, ... }:
|
||||
{
|
||||
imports = [
|
||||
./boot
|
||||
./disko
|
||||
./filesystems
|
||||
./hardware
|
||||
./network
|
||||
./users
|
||||
../../modules/system
|
||||
];
|
||||
|
||||
networking = {
|
||||
hostName = "jupiter";
|
||||
wireless.enable = true;
|
||||
};
|
||||
|
||||
system = {
|
||||
desktop.enable = true;
|
||||
stateVersion = "24.05";
|
||||
};
|
||||
|
||||
jovian = {
|
||||
steam.enable = true;
|
||||
hardware.has.amd.gpu = true;
|
||||
decky-loader.enable = true;
|
||||
}
|
||||
}
|
93
hosts/jupiter/disko/default.nix
Normal file
93
hosts/jupiter/disko/default.nix
Normal file
|
@ -0,0 +1,93 @@
|
|||
{ config, disko, ... }:
|
||||
{
|
||||
imports = [ disko.nixosModules.disko ];
|
||||
|
||||
disko.devices = {
|
||||
disk = {
|
||||
"${config.networking.hostName}" = {
|
||||
type = "disk";
|
||||
device = "/dev/nvme0n1";
|
||||
content = {
|
||||
type = "gpt";
|
||||
partitions = {
|
||||
boot = {
|
||||
size = "1M";
|
||||
type = "EF02";
|
||||
};
|
||||
ESP = {
|
||||
size = "2G";
|
||||
type = "EF00";
|
||||
content = {
|
||||
type = "filesystem";
|
||||
format = "vfat";
|
||||
mountpoint = "/boot";
|
||||
mountOptions = [ "umask=0077" ];
|
||||
};
|
||||
};
|
||||
luks = {
|
||||
size = "100%";
|
||||
content = {
|
||||
type = "luks";
|
||||
name = "${config.networking.hostName}-disk";
|
||||
settings.allowDiscards = true;
|
||||
passwordFile = "/tmp/secret.key";
|
||||
content = {
|
||||
type = "lvm_pv";
|
||||
vg = "${config.networking.hostName}";
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
lvm_vg = {
|
||||
"${config.networking.hostName}" = {
|
||||
type = "lvm_vg";
|
||||
lvs = {
|
||||
root = {
|
||||
size = "100%";
|
||||
content = {
|
||||
type = "btrfs";
|
||||
extraArgs = [ "-f" ];
|
||||
subvolumes = {
|
||||
"/root" = {
|
||||
mountpoint = "/";
|
||||
mountOptions = [ "compress=zstd" "noatime" ];
|
||||
};
|
||||
"/prev" = {
|
||||
mountpoint = "/prev";
|
||||
mountOptions = [ "compress=zstd" "noatime" ];
|
||||
};
|
||||
"/nix" = {
|
||||
mountpoint = "/nix";
|
||||
mountOptions = [ "compress=zstd" "noatime" ];
|
||||
};
|
||||
|
||||
# Impermanence
|
||||
"/persist" = {
|
||||
mountpoint = "/persist";
|
||||
mountOptions = [ "compress=zstd" "noatime" ];
|
||||
};
|
||||
"/persist/.snapshots" = { };
|
||||
"/persist/home" = { };
|
||||
"/persist/home/.snapshots" = { };
|
||||
};
|
||||
};
|
||||
};
|
||||
swap = {
|
||||
size = "8G";
|
||||
content = {
|
||||
type = "swap";
|
||||
discardPolicy = "both";
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
# Needed for impermanence
|
||||
fileSystems."/persist".neededForBoot = true;
|
||||
}
|
11
hosts/jupiter/filesystems/default.nix
Normal file
11
hosts/jupiter/filesystems/default.nix
Normal file
|
@ -0,0 +1,11 @@
|
|||
{ config, ... }:
|
||||
{
|
||||
fileSystems."/mnt/Games" = {
|
||||
device = "/dev/disk/by-uuid/a026c6c7-04a0-4f34-82bb-ea7e4f3e85c5";
|
||||
fsType = "ext4";
|
||||
options = [
|
||||
"nofail"
|
||||
"nosuid"
|
||||
];
|
||||
};
|
||||
}
|
20
hosts/jupiter/hardware/default.nix
Normal file
20
hosts/jupiter/hardware/default.nix
Normal file
|
@ -0,0 +1,20 @@
|
|||
{ config, lib, modulesPath, ... }:
|
||||
{
|
||||
imports = [ (modulesPath + "/installer/scan/not-detected.nix") ];
|
||||
|
||||
boot = {
|
||||
initrd = {
|
||||
availableKernelModules = [
|
||||
"nvme"
|
||||
"sd_mod"
|
||||
"sdhci_pci"
|
||||
"xhci_pci"
|
||||
];
|
||||
kernelModules = [ "dm-snapshot" ];
|
||||
};
|
||||
kernelModules = [ "kvm-amd" ];
|
||||
};
|
||||
|
||||
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
|
||||
hardware.cpu.amd.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
|
||||
}
|
1
hosts/jupiter/id_ed25519.pub
Normal file
1
hosts/jupiter/id_ed25519.pub
Normal file
|
@ -0,0 +1 @@
|
|||
ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAICHJ2Gy1Gaq96K85zOSfgWzGY0rIaUcqGS7Si5Nvzg+n
|
13
hosts/jupiter/network/default.nix
Normal file
13
hosts/jupiter/network/default.nix
Normal file
|
@ -0,0 +1,13 @@
|
|||
{ ... }:
|
||||
{
|
||||
networking = {
|
||||
interfaces."wlp1s0".ipv4.addresses = [{
|
||||
address = "192.168.2.200";
|
||||
prefixLength = 24;
|
||||
}];
|
||||
defaultGateway = {
|
||||
address = "192.168.2.1";
|
||||
interface = "wlp1s0";
|
||||
};
|
||||
};
|
||||
}
|
4
hosts/jupiter/users/default.nix
Normal file
4
hosts/jupiter/users/default.nix
Normal file
|
@ -0,0 +1,4 @@
|
|||
{ ... }:
|
||||
{
|
||||
imports = [ ./main ];
|
||||
}
|
8
hosts/jupiter/users/main/default.nix
Normal file
8
hosts/jupiter/users/main/default.nix
Normal file
|
@ -0,0 +1,8 @@
|
|||
{ config, lib, ... }:
|
||||
{
|
||||
home-manager.users."${config.sysusers.main}".home = {
|
||||
desktop.enable = true;
|
||||
remote-desktop.enable = true;
|
||||
stateVersion = lib.mkForce config.system.stateVersion;
|
||||
};
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue