Add initial config
Signed-off-by: Nikolaos Karaolidis <nick@karaolidis.com>
This commit is contained in:
11
hosts/eirene/configs/pipewire.nix
Normal file
11
hosts/eirene/configs/pipewire.nix
Normal file
@@ -0,0 +1,11 @@
|
||||
{
|
||||
services.pipewire = {
|
||||
enable = true;
|
||||
alsa = {
|
||||
enable = true;
|
||||
support32Bit = true;
|
||||
};
|
||||
pulse.enable = true;
|
||||
jack.enable = true;
|
||||
};
|
||||
}
|
27
hosts/eirene/configuration.nix
Normal file
27
hosts/eirene/configuration.nix
Normal file
@@ -0,0 +1,27 @@
|
||||
{ inputs, ... }:
|
||||
|
||||
let
|
||||
vars = import ../../users/nick/vars.nix;
|
||||
in
|
||||
{
|
||||
imports = [
|
||||
../../configuration.nix
|
||||
../../users/nick/home.nix
|
||||
./configs/pipewire.nix
|
||||
];
|
||||
|
||||
time.timeZone = "Europe/Athens";
|
||||
|
||||
home-manager = {
|
||||
extraSpecialArgs = { inherit inputs; };
|
||||
backupFileExtension = "bak";
|
||||
};
|
||||
|
||||
programs = {
|
||||
fuse.userAllowOther = true;
|
||||
dconf.enable = true;
|
||||
};
|
||||
|
||||
systemd.tmpfiles.rules = [ "d /persist/home/ 0755 root root -" ];
|
||||
services.getty.autologinUser = vars.user;
|
||||
}
|
63
hosts/eirene/disko.nix
Normal file
63
hosts/eirene/disko.nix
Normal file
@@ -0,0 +1,63 @@
|
||||
{
|
||||
disko.devices = {
|
||||
disk.main = {
|
||||
type = "disk";
|
||||
content = {
|
||||
type = "gpt";
|
||||
partitions = {
|
||||
boot = {
|
||||
name = "boot";
|
||||
size = "1M";
|
||||
type = "EF02";
|
||||
};
|
||||
esp = {
|
||||
name = "esp";
|
||||
size = "512M";
|
||||
type = "EF00";
|
||||
content = {
|
||||
type = "filesystem";
|
||||
format = "vfat";
|
||||
mountpoint = "/boot";
|
||||
};
|
||||
};
|
||||
swap = {
|
||||
name = "swap";
|
||||
size = "32G";
|
||||
content = {
|
||||
type = "swap";
|
||||
resumeDevice = true;
|
||||
};
|
||||
};
|
||||
root = {
|
||||
name = "root";
|
||||
size = "100%";
|
||||
content = {
|
||||
name = "luks";
|
||||
type = "luks";
|
||||
settings = {
|
||||
allowDiscards = true;
|
||||
};
|
||||
content = {
|
||||
type = "btrfs";
|
||||
extraArgs = ["-f"];
|
||||
subvolumes = {
|
||||
"/root" = {
|
||||
mountpoint = "/";
|
||||
};
|
||||
"/persist" = {
|
||||
mountpoint = "/persist";
|
||||
mountOptions = ["subvol=persist" "compress=zstd" "noatime"];
|
||||
};
|
||||
"/nix" = {
|
||||
mountpoint = "/nix";
|
||||
mountOptions = ["subvol=nix" "compress=zstd" "noatime"];
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
22
hosts/eirene/vm/configuration.nix
Normal file
22
hosts/eirene/vm/configuration.nix
Normal file
@@ -0,0 +1,22 @@
|
||||
let
|
||||
vars = import ../../../users/nick/vars.nix;
|
||||
in
|
||||
{
|
||||
imports = [
|
||||
../configuration.nix
|
||||
../disko.nix
|
||||
./hardware-configuration.nix
|
||||
];
|
||||
|
||||
disko.devices.disk.main.device = "/dev/vda";
|
||||
|
||||
boot.kernelParams = [ "video=Virtual-1:2560x1600@60" ];
|
||||
home-manager.users."${vars.user}".wayland.windowManager.hyprland.settings.monitor = "Virtual-1, 2560x1600@60, 0x0, 1";
|
||||
|
||||
networking.hostName = "eirene-vm";
|
||||
|
||||
fileSystems."/host" = {
|
||||
device = "host";
|
||||
fsType = "virtiofs";
|
||||
};
|
||||
}
|
18
hosts/eirene/vm/hardware-configuration.nix
Normal file
18
hosts/eirene/vm/hardware-configuration.nix
Normal file
@@ -0,0 +1,18 @@
|
||||
{ lib, modulesPath, ... }:
|
||||
|
||||
{
|
||||
imports = [
|
||||
(modulesPath + "/profiles/qemu-guest.nix")
|
||||
];
|
||||
|
||||
boot = {
|
||||
initrd.availableKernelModules = ["ahci" "xhci_pci" "virtio_pci" "virtio_scsi" "sr_mod" "virtio_blk"];
|
||||
initrd.kernelModules = [];
|
||||
kernelModules = ["kvm-amd"];
|
||||
extraModulePackages = [];
|
||||
};
|
||||
|
||||
networking.useDHCP = lib.mkDefault true;
|
||||
|
||||
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
|
||||
}
|
Reference in New Issue
Block a user