Little refactor to reduce reuse

This commit is contained in:
Lillian Violet 2024-02-21 12:16:53 +01:00
parent 5a05a79705
commit 1e62fd2886
3 changed files with 43 additions and 59 deletions

View file

@ -70,6 +70,9 @@
git-filter-repo git-filter-repo
gnupg gnupg
pciutils pciutils
podman
podman-compose
sbctl
waydroid waydroid
xwaylandvideobridge xwaylandvideobridge
yubikey-personalization yubikey-personalization
@ -89,6 +92,7 @@
# User tools # User tools
noisetorch noisetorch
qjackctl
wireplumber wireplumber
]; ];
@ -159,18 +163,48 @@
enable = true; enable = true;
}; };
virtualisation.podman = {
enable = true;
dockerCompat = true;
};
sops.defaultSopsFile = ./secrets/sops.yaml;
sops.age.keyFile = ../../../../../../var/secrets/keys.txt;
sops.secrets."lillian-password".neededForUsers = true;
users.users.lillian = {
isNormalUser = true;
extraGroups = ["sudo" "networkmanager" "wheel" "vboxsf" "docker"];
shell = pkgs.zsh;
hashedPasswordFile = config.sops.secrets."lillian-password".path;
};
users.mutableUsers = false; users.mutableUsers = false;
users.users = { users.users.root = {
root = {
hashedPassword = "*"; hashedPassword = "*";
}; };
lillian = {
isNormalUser = true; boot.bootspec.enable = true;
extraGroups = ["sudo" "networkmanager" "wheel" "vboxsf"]; boot.kernelPackages = pkgs.linuxPackages_latest;
shell = pkgs.zsh; 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.loader.systemd-boot.configurationLimit = 3;
boot.loader.efi.canTouchEfiVariables = true;
# Enable completion of system packages by zsh # Enable completion of system packages by zsh
environment.pathsToLink = ["/share/zsh"]; environment.pathsToLink = ["/share/zsh"];

View file

@ -30,16 +30,6 @@
./hardware-configuration.nix ./hardware-configuration.nix
]; ];
sops.defaultSopsFile = ./secrets/sops.yaml;
sops.age.keyFile = ../../../../../../var/secrets/keys.txt;
sops.secrets."lillian-password".neededForUsers = true;
users.users.lillian = {
hashedPasswordFile = config.sops.secrets."lillian-password".path;
extraGroups = ["docker"];
};
home-manager = { home-manager = {
extraSpecialArgs = {inherit inputs outputs;}; extraSpecialArgs = {inherit inputs outputs;};
users = { users = {
@ -49,38 +39,21 @@
}; };
environment.systemPackages = with pkgs; [ environment.systemPackages = with pkgs; [
podman
podman-compose
sbctl
]; ];
virtualisation.podman = {
enable = true;
dockerCompat = true;
};
networking.hostName = "EDI"; networking.hostName = "EDI";
boot.bootspec.enable = true;
boot.kernelPackages = pkgs.linuxPackages_latest;
boot.supportedFilesystems = ["bcachefs"];
# Lanzaboote currently replaces the systemd-boot module. # Lanzaboote currently replaces the systemd-boot module.
# This setting is usually set to true in configuration.nix # This setting is usually set to true in configuration.nix
# generated at installation time. So we force it to false # generated at installation time. So we force it to false
# for now. # for now.
boot.loader.systemd-boot.enable = lib.mkForce false; boot.loader.systemd-boot.enable = lib.mkForce false;
boot.loader.systemd-boot.configurationLimit = 3;
boot.loader.efi.canTouchEfiVariables = true;
boot.lanzaboote = { boot.lanzaboote = {
enable = true; enable = true;
pkiBundle = "/etc/secureboot"; pkiBundle = "/etc/secureboot";
}; };
# Enable bluetooth hardware
hardware.bluetooth.enable = true;
# https://nixos.wiki/wiki/FAQ/When_do_I_update_stateVersion # https://nixos.wiki/wiki/FAQ/When_do_I_update_stateVersion
system.stateVersion = "unstable"; system.stateVersion = "unstable";
} }

View file

@ -31,10 +31,6 @@
]; ];
environment.systemPackages = with pkgs; [ environment.systemPackages = with pkgs; [
podman
podman-compose
sbctl
qjackctl
]; ];
services.xserver.videoDrivers = ["amdgpu"]; services.xserver.videoDrivers = ["amdgpu"];
@ -55,25 +51,6 @@
pkiBundle = "/etc/secureboot"; 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 = { home-manager = {
extraSpecialArgs = {inherit inputs outputs;}; extraSpecialArgs = {inherit inputs outputs;};
users = { users = {