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

View file

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

View file

@ -65,7 +65,6 @@
# Multimedia: # Multimedia:
freetube freetube
obs-studio
vlc vlc
# Office applications: # 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 # Enable home-manager and git
programs.home-manager.enable = true; programs.home-manager.enable = true;
programs.git = { programs.git = {

View file

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

View file

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

View file

@ -24,14 +24,54 @@
../../desktop ../../desktop
../../../disko/GLaDOS
# Import your generated (nixos-generate-config) hardware configuration # Import your generated (nixos-generate-config) hardware configuration
./hardware-configuration.nix ./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.systemd-boot.configurationLimit = 3;
boot.loader.efi.canTouchEfiVariables = true; boot.loader.efi.canTouchEfiVariables = true;
boot.supportedFilesystems = ["bcachefs"]; 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; boot.kernelPackages = pkgs.linuxPackages_latest;
home-manager = { home-manager = {

View file

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