Merge branch 'main' of git.lillianviolet.dev:Lillian-Violet/NixOS-Config

This commit is contained in:
Lillian Violet 2024-02-20 09:50:30 +01:00
commit fc97125e05
8 changed files with 198 additions and 71 deletions

71
disko/GLaDOS/default.nix Normal file
View file

@ -0,0 +1,71 @@
{
disko.devices = {
disk = {
sda1 = {
type = "disk";
device = "/dev/disk/by-path/pci-0000:06:00.0-ata-6";
content = {
type = "gpt";
partitions = {
ESP = {
size = "512M";
type = "EF00";
content = {
type = "filesystem";
format = "vfat";
mountpoint = "/boot";
mountOptions = [
"defaults"
];
};
};
luks = {
size = "100%";
content = {
type = "luks";
name = "crypted";
extraOpenArgs = [];
settings = {
# if you want to use the key for interactive login be sure there is no trailing newline
# for example use `echo -n "password" > /tmp/secret.key`
#keyFile = "/tmp/secret.key";
allowDiscards = true;
};
#additionalKeyFiles = ["/tmp/additionalSecret.key"];
content = {
type = "lvm_pv";
vg = "pool";
};
};
};
};
};
};
};
lvm_vg = {
pool = {
type = "lvm_vg";
lvs = {
swap = {
size = "16G";
content = {
type = "swap";
resumeDevice = true; # resume from hiberation from this device
};
};
root = {
size = "100%FREE";
content = {
type = "filesystem";
format = "bcachefs";
mountpoint = "/";
mountOptions = [
"defaults"
];
};
};
};
};
};
};
}

View file

@ -44,11 +44,11 @@
]
},
"locked": {
"lastModified": 1707524024,
"narHash": "sha256-HmumZ8FuWAAYZrWUKm3N4G4h8nmZ5VUVX+vXLmCJNKM=",
"lastModified": 1708305517,
"narHash": "sha256-WYnEspeTTksC21obnnxWOGOAQbnBD0GES0S0XOLsJjs=",
"owner": "nix-community",
"repo": "disko",
"rev": "d07de570ba05cec2807d058daaa044f6955720c7",
"rev": "1ae1f57dad13595600dd57b6a55fcbaef6673804",
"type": "github"
},
"original": {
@ -210,11 +210,11 @@
]
},
"locked": {
"lastModified": 1707683400,
"narHash": "sha256-Zc+J3UO1Xpx+NL8UB6woPHyttEy9cXXtm+0uWwzuYDc=",
"lastModified": 1708294481,
"narHash": "sha256-DZtxmeb4OR7iCaKUUuq05ADV2rX8WReZEF7Tq//W0+Y=",
"owner": "nix-community",
"repo": "home-manager",
"rev": "21b078306a2ab68748abf72650db313d646cf2ca",
"rev": "a54e05bc12d88ff2df941d0dc1183cb5235fa438",
"type": "github"
},
"original": {
@ -230,11 +230,11 @@
"nixpkgs": "nixpkgs_2"
},
"locked": {
"lastModified": 1707567487,
"narHash": "sha256-4VyGscBVW9HX5h0UULi1blX1zSvN20hda/AeZkW40ZI=",
"lastModified": 1708148641,
"narHash": "sha256-UliMMpx84PPA+0mcyBj2yuKNawOX7L4u/wO8j9QGHVk=",
"owner": "Jovian-Experiments",
"repo": "Jovian-NixOS",
"rev": "f02d975f23e83306ff1ab7ef2920e5da147b2d96",
"rev": "f318a856ff3177fdea6044d6c77dd49992330a31",
"type": "github"
},
"original": {
@ -254,11 +254,11 @@
"rust-overlay": "rust-overlay"
},
"locked": {
"lastModified": 1707742806,
"narHash": "sha256-rYDoODYqYphsYJBs2EOkDNfLxe6Boq9BGtaCE4tVAI0=",
"lastModified": 1708343641,
"narHash": "sha256-UlTZmvuK18wc2I2Wt//Ry5CHxkbxpbE4ccwaVjix+CE=",
"owner": "nix-community",
"repo": "lanzaboote",
"rev": "71fb51225c124a84847a01300d605b91ab318621",
"rev": "470ba03c4b80ad57397af84145dc0911dc398f91",
"type": "github"
},
"original": {
@ -332,11 +332,11 @@
]
},
"locked": {
"lastModified": 1707725560,
"narHash": "sha256-RVdsjx/EoaHzmS0st91xnIFukb6BzFq4edbp6Ld38Us=",
"lastModified": 1707873059,
"narHash": "sha256-simzllUEmzVqmQogcGCorfIbJpodAhgGSr6vuFtd4XQ=",
"owner": "nix-community",
"repo": "nixos-generators",
"rev": "3b6bde6b879a7b74d00f6870c07fc0b1067fcb8d",
"rev": "0aa24e93f75370454f0e03747b6836ac2a2c9fca",
"type": "github"
},
"original": {
@ -347,11 +347,11 @@
},
"nixpkgs": {
"locked": {
"lastModified": 1707711327,
"narHash": "sha256-JaiR0Er0Bx80CT5POOYR1I1tLM7VvC2/ny6mOmkoRQw=",
"lastModified": 1708307464,
"narHash": "sha256-OloBg9ZCoPrPqy8/ZoaoRB4kza3lKhnI0LuZq5xldhg=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "01737456dfe4907fb5bdc8af39ac8c6d6b1fb551",
"rev": "a332040396d7e3c47883e9c115c1da485712805e",
"type": "github"
},
"original": {
@ -409,11 +409,11 @@
},
"nixpkgs-stable_2": {
"locked": {
"lastModified": 1707603439,
"narHash": "sha256-LodBVZ3+ehJP2azM5oj+JrhfNAAzmTJ/OwAIOn0RfZ0=",
"lastModified": 1708210246,
"narHash": "sha256-Q8L9XwrBK53fbuuIFMbjKvoV7ixfLFKLw4yV+SD28Y8=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "d8cd80616c8800feec0cab64331d7c3d5a1a6d98",
"rev": "69405156cffbdf2be50153f13cbdf9a0bea38e49",
"type": "github"
},
"original": {
@ -425,11 +425,11 @@
},
"nixpkgs-unstable": {
"locked": {
"lastModified": 1707546158,
"narHash": "sha256-nYYJTpzfPMDxI8mzhQsYjIUX+grorqjKEU9Np6Xwy/0=",
"lastModified": 1708118438,
"narHash": "sha256-kk9/0nuVgA220FcqH/D2xaN6uGyHp/zoxPNUmPCMmEE=",
"owner": "nixos",
"repo": "nixpkgs",
"rev": "d934204a0f8d9198e1e4515dd6fec76a139c87f0",
"rev": "5863c27340ba4de8f83e7e3c023b9599c3cb3c80",
"type": "github"
},
"original": {
@ -441,11 +441,11 @@
},
"nixpkgs_2": {
"locked": {
"lastModified": 1707268954,
"narHash": "sha256-2en1kvde3cJVc3ZnTy8QeD2oKcseLFjYPLKhIGDanQ0=",
"lastModified": 1707689078,
"narHash": "sha256-UUGmRa84ZJHpGZ1WZEBEUOzaPOWG8LZ0yPg1pdDF/yM=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "f8e2ebd66d097614d51a56a755450d4ae1632df1",
"rev": "f9d39fb9aff0efee4a3d5f4a6d7c17701d38a1d8",
"type": "github"
},
"original": {
@ -457,11 +457,11 @@
},
"nixpkgs_3": {
"locked": {
"lastModified": 1707639604,
"narHash": "sha256-J5ipSdfkbYcYaH3Js2dUf3Of94BWStapdmxpW5wwH1U=",
"lastModified": 1708232726,
"narHash": "sha256-DYuEHWQSBwaJkS2rjLUsKvGgDK8QIVojC3klAUw6uyk=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "bdc57436da855500d44e9c1ce7450c0772e1cfa1",
"rev": "35c5863c29ce81199ded8a3384f4979b7793f5dc",
"type": "github"
},
"original": {
@ -473,11 +473,11 @@
},
"nixpkgs_4": {
"locked": {
"lastModified": 1707546158,
"narHash": "sha256-nYYJTpzfPMDxI8mzhQsYjIUX+grorqjKEU9Np6Xwy/0=",
"lastModified": 1708118438,
"narHash": "sha256-kk9/0nuVgA220FcqH/D2xaN6uGyHp/zoxPNUmPCMmEE=",
"owner": "nixos",
"repo": "nixpkgs",
"rev": "d934204a0f8d9198e1e4515dd6fec76a139c87f0",
"rev": "5863c27340ba4de8f83e7e3c023b9599c3cb3c80",
"type": "github"
},
"original": {
@ -504,11 +504,11 @@
},
"nixpkgs_6": {
"locked": {
"lastModified": 1707451808,
"narHash": "sha256-UwDBUNHNRsYKFJzyTMVMTF5qS4xeJlWoeyJf+6vvamU=",
"lastModified": 1708151420,
"narHash": "sha256-MGT/4aGCWQPQiu6COqJdCj9kSpLPiShgbwpbC38YXC8=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "442d407992384ed9c0e6d352de75b69079904e4e",
"rev": "6e2f00c83911461438301db0dba5281197fe4b3a",
"type": "github"
},
"original": {
@ -585,11 +585,11 @@
"nixpkgs-stable": "nixpkgs-stable"
},
"locked": {
"lastModified": 1707297608,
"narHash": "sha256-ADjo/5VySGlvtCW3qR+vdFF4xM9kJFlRDqcC9ZGI8EA=",
"lastModified": 1708018599,
"narHash": "sha256-M+Ng6+SePmA8g06CmUZWi1AjG2tFBX9WCXElBHEKnyM=",
"owner": "cachix",
"repo": "pre-commit-hooks.nix",
"rev": "0db2e67ee49910adfa13010e7f012149660af7f0",
"rev": "5df5a70ad7575f6601d91f0efec95dd9bc619431",
"type": "github"
},
"original": {
@ -628,11 +628,11 @@
]
},
"locked": {
"lastModified": 1707617562,
"narHash": "sha256-Kk2vv5e4MqKPjelKoYsa6YaUyv3pvjWY9nJSnP2QU9w=",
"lastModified": 1708241671,
"narHash": "sha256-zSulX9tP4R35Y8A842dGSzaHMVP91W2Ry0SXvQKD2BQ=",
"owner": "oxalica",
"repo": "rust-overlay",
"rev": "a22bbbee9b479c6d95b4819135e856a6d447b3ba",
"rev": "d500e370b26f9b14303cb39bf1509df0a920c8b0",
"type": "github"
},
"original": {
@ -671,11 +671,11 @@
"nixpkgs-stable": "nixpkgs-stable_2"
},
"locked": {
"lastModified": 1707748232,
"narHash": "sha256-o9L8jrOemQl/5cYp++0cWdfMLzVljCdHwPFF4N0KZeQ=",
"lastModified": 1708225343,
"narHash": "sha256-Q0uVUOfumc1DcKsIJIfMCHph08MjkOvZxvPb/Vi8hWw=",
"owner": "Mic92",
"repo": "sops-nix",
"rev": "695275c349bb27f91b2b06cb742510899c887b81",
"rev": "ffed177a9d2c685901781c3c6c9024ae0ffc252b",
"type": "github"
},
"original": {

View file

@ -143,7 +143,7 @@
# > Our main nixos configuration file <
./nixos/hosts/GLaDOS/configuration.nix
sops-nix.nixosModules.sops
#lanzaboote.nixosModules.lanzaboote
lanzaboote.nixosModules.lanzaboote
disko.nixosModules.disko
home-manager.nixosModules.home-manager
{

View file

@ -65,7 +65,6 @@
# Multimedia:
freetube
obs-studio
vlc
# Office applications:
@ -120,6 +119,15 @@
];
};
programs.obs-studio = {
enable = true;
plugins = with pkgs.obs-studio-plugins; [
wlrobs
obs-backgroundremoval
obs-pipewire-audio-capture
];
};
# Enable home-manager and git
programs.home-manager.enable = true;
programs.git = {

View file

@ -89,6 +89,7 @@
# User tools
noisetorch
wireplumber
];
programs.direnv = {
@ -146,6 +147,8 @@
alsa.enable = true;
alsa.support32Bit = true;
pulse.enable = true;
jack.enable = true;
wireplumber.enable = true;
};
programs.noisetorch = {

View file

@ -67,6 +67,8 @@
enable = true;
pkiBundle = "/etc/secureboot";
};
boot.loader.systemd-boot.configurationLimit = 3;
boot.loader.efi.canTouchEfiVariables = true;
# Enable bluetooth hardware
hardware.bluetooth.enable = true;

View file

@ -24,14 +24,54 @@
../../desktop
../../../disko/GLaDOS
# Import your generated (nixos-generate-config) hardware configuration
./hardware-configuration.nix
];
boot.loader.systemd-boot.enable = true;
environment.systemPackages = with pkgs; [
podman
podman-compose
sbctl
qjackctl
];
services.xserver.videoDrivers = ["amdgpu"];
# Add vulkan support to GPU
hardware.opengl.extraPackages = with pkgs; [
amdvlk
];
# For 32 bit applications
hardware.opengl.extraPackages32 = with pkgs; [
driversi686Linux.amdvlk
];
boot.loader.systemd-boot.enable = lib.mkForce false;
boot.lanzaboote = {
enable = true;
pkiBundle = "/etc/secureboot";
};
boot.loader.systemd-boot.configurationLimit = 3;
boot.loader.efi.canTouchEfiVariables = true;
boot.supportedFilesystems = ["bcachefs"];
boot.extraModulePackages = with config.boot.kernelPackages; [v4l2loopback.out];
boot.kernelModules = [
# Virtual Camera
"v4l2loopback"
# Virtual Microphone, built-in
"snd-aloop"
];
# Set initial kernel module settings
boot.extraModprobeConfig = ''
# exclusive_caps: Skype, Zoom, Teams etc. will only show device when actually streaming
# card_label: Name of virtual camera, how it'll show up in Skype, Zoom, Teams
# https://github.com/umlaeute/v4l2loopback
options v4l2loopback exclusive_caps=1 card_label="Virtual Camera"
'';
boot.kernelPackages = pkgs.linuxPackages_latest;
home-manager = {

View file

@ -1,31 +1,35 @@
# Do not modify this file! It was generated by nixos-generate-config
# and may be overwritten by future invocations. Please make changes
# to /etc/nixos/configuration.nix instead.
{ config, lib, pkgs, modulesPath, ... }:
{
imports =
[ (modulesPath + "/installer/scan/not-detected.nix")
config,
lib,
pkgs,
modulesPath,
...
}: {
imports = [
(modulesPath + "/installer/scan/not-detected.nix")
];
boot.initrd.availableKernelModules = [ "xhci_pci" "ahci" "usb_storage" "usbhid" "sd_mod" ];
boot.initrd.kernelModules = [ ];
boot.kernelModules = [ "kvm-amd" ];
boot.extraModulePackages = [ ];
boot.initrd.availableKernelModules = ["xhci_pci" "ahci" "usbhid" "usb_storage" "sd_mod"];
boot.initrd.kernelModules = ["dm-snapshot" "amdgpu"];
boot.kernelModules = [];
boot.extraModulePackages = [];
fileSystems."/" =
{ device = "/dev/disk/by-uuid/14883cd2-72b8-4ab3-8cbf-d5dca40e036a";
fsType = "ext4";
};
fileSystems."/boot" =
{ device = "/dev/disk/by-uuid/BA43-C24E";
fsType = "vfat";
};
swapDevices =
[ { device = "/dev/disk/by-uuid/cffe625e-1dac-45bd-a744-303baa09affd"; }
];
# fileSystems."/" =
# { device = "UUID=166dc8d8-b77f-43fe-8bee-a0fc5b26aeb5";
# fsType = "bcachefs";
# };
#
# fileSystems."/boot" =
# { device = "/dev/disk/by-uuid/743A-083A";
# fsType = "vfat";
# };
#
# swapDevices =
# [ { device = "/dev/disk/by-uuid/3d300fda-35d4-4bdb-ac89-21b0f29b167c"; }
# ];
# Enables DHCP on each ethernet and wireless interface. In case of scripted networking
# (the default) this is the recommended approach. When using systemd-networkd it's
@ -33,7 +37,6 @@
# with explicit per-interface declarations with `networking.interfaces.<interface>.useDHCP`.
networking.useDHCP = lib.mkDefault true;
# networking.interfaces.enp3s0.useDHCP = lib.mkDefault true;
# networking.interfaces.wlan0.useDHCP = lib.mkDefault true;
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
hardware.cpu.amd.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;