14
hosts/common/optional/1password.nix
Normal file
14
hosts/common/optional/1password.nix
Normal file
@@ -0,0 +1,14 @@
|
||||
{
|
||||
config,
|
||||
...
|
||||
}:
|
||||
|
||||
{
|
||||
programs = {
|
||||
_1password.enable = true;
|
||||
_1password-gui = {
|
||||
enable = true;
|
||||
polkitPolicyOwners = [ config.hostSpec.username ];
|
||||
};
|
||||
};
|
||||
}
|
||||
7
hosts/common/optional/dconf.nix
Normal file
7
hosts/common/optional/dconf.nix
Normal file
@@ -0,0 +1,7 @@
|
||||
{
|
||||
...
|
||||
}:
|
||||
|
||||
{
|
||||
programs.dconf.enable = true;
|
||||
}
|
||||
47
hosts/common/optional/docker.nix
Normal file
47
hosts/common/optional/docker.nix
Normal file
@@ -0,0 +1,47 @@
|
||||
{
|
||||
pkgs,
|
||||
...
|
||||
}: {
|
||||
virtualisation = {
|
||||
podman = {
|
||||
enable = true;
|
||||
dockerSocket.enable = true;
|
||||
dockerCompat = true;
|
||||
|
||||
autoPrune = {
|
||||
enable = true;
|
||||
dates = "weekly";
|
||||
};
|
||||
};
|
||||
|
||||
containers = {
|
||||
registries = {
|
||||
search = ["docker.io"];
|
||||
};
|
||||
};
|
||||
|
||||
libvirtd = {
|
||||
enable = true;
|
||||
qemu = {
|
||||
swtpm.enable = true;
|
||||
|
||||
ovmf = {
|
||||
enable = true;
|
||||
packages = with pkgs; [OVMFFull.fd];
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
spiceUSBRedirection.enable = true;
|
||||
};
|
||||
|
||||
environment.systemPackages = with pkgs; [
|
||||
virt-manager
|
||||
virt-viewer
|
||||
spice
|
||||
spice-gtk
|
||||
spice-protocol
|
||||
win-virtio
|
||||
win-spice
|
||||
];
|
||||
}
|
||||
22
hosts/common/optional/gaming.nix
Normal file
22
hosts/common/optional/gaming.nix
Normal file
@@ -0,0 +1,22 @@
|
||||
{
|
||||
pkgs,
|
||||
...
|
||||
}:
|
||||
|
||||
{
|
||||
programs = {
|
||||
steam = {
|
||||
enable = true;
|
||||
gamescopeSession.enable = true;
|
||||
};
|
||||
|
||||
# to run steam games in game mode, add the following to the game's properties from within steam
|
||||
# gamemoderun %command%
|
||||
gamemode.enable = true;
|
||||
};
|
||||
|
||||
environment.systemPackages = with pkgs; [
|
||||
mangohud
|
||||
protonup-qt
|
||||
];
|
||||
}
|
||||
24
hosts/common/optional/hyprland.nix
Normal file
24
hosts/common/optional/hyprland.nix
Normal file
@@ -0,0 +1,24 @@
|
||||
{
|
||||
inputs,
|
||||
pkgs,
|
||||
...
|
||||
}:
|
||||
|
||||
{
|
||||
programs.hyprland = {
|
||||
enable = true;
|
||||
package = inputs.hyprland.packages.${pkgs.stdenv.hostPlatform.system}.hyprland;
|
||||
portalPackage =
|
||||
inputs.hyprland.packages.${pkgs.stdenv.hostPlatform.system}.xdg-desktop-portal-hyprland;
|
||||
};
|
||||
|
||||
environment.systemPackages = with pkgs; [
|
||||
hyprshot
|
||||
hyprlock
|
||||
hypridle
|
||||
hyprpolkitagent
|
||||
mako
|
||||
waybar
|
||||
wofi
|
||||
];
|
||||
}
|
||||
7
hosts/common/optional/nix-ld.nix
Normal file
7
hosts/common/optional/nix-ld.nix
Normal file
@@ -0,0 +1,7 @@
|
||||
{
|
||||
...
|
||||
}:
|
||||
|
||||
{
|
||||
programs.nix-ld.enable = true;
|
||||
}
|
||||
10
hosts/common/optional/secure-boot.nix
Normal file
10
hosts/common/optional/secure-boot.nix
Normal file
@@ -0,0 +1,10 @@
|
||||
{
|
||||
pkgs,
|
||||
...
|
||||
}:
|
||||
|
||||
{
|
||||
environment.systemPackages = with pkgs; [
|
||||
sbctl
|
||||
];
|
||||
}
|
||||
23
hosts/common/optional/services/audio.nix
Normal file
23
hosts/common/optional/services/audio.nix
Normal file
@@ -0,0 +1,23 @@
|
||||
{
|
||||
pkgs,
|
||||
...
|
||||
}:
|
||||
|
||||
{
|
||||
services = {
|
||||
# Enable sound with pipewire.
|
||||
pulseaudio.enable = false;
|
||||
pipewire = {
|
||||
enable = true;
|
||||
alsa.enable = true;
|
||||
alsa.support32Bit = true;
|
||||
pulse.enable = true;
|
||||
wireplumber.enable = true;
|
||||
};
|
||||
};
|
||||
security.rtkit.enable = true;
|
||||
|
||||
environment.systemPackages = builtins.attrValues {
|
||||
inherit (pkgs) pavucontrol;
|
||||
};
|
||||
}
|
||||
11
hosts/common/optional/services/bluetooth.nix
Normal file
11
hosts/common/optional/services/bluetooth.nix
Normal file
@@ -0,0 +1,11 @@
|
||||
{
|
||||
...
|
||||
}:
|
||||
|
||||
{
|
||||
services.blueman.enable = true;
|
||||
hardware = {
|
||||
bluetooth.enable = true;
|
||||
bluetooth.powerOnBoot = true;
|
||||
};
|
||||
}
|
||||
7
hosts/common/optional/services/firmware.nix
Normal file
7
hosts/common/optional/services/firmware.nix
Normal file
@@ -0,0 +1,7 @@
|
||||
{
|
||||
...
|
||||
}:
|
||||
|
||||
{
|
||||
services.fwupd.enable = true;
|
||||
}
|
||||
16
hosts/common/optional/services/greetd.nix
Normal file
16
hosts/common/optional/services/greetd.nix
Normal file
@@ -0,0 +1,16 @@
|
||||
{
|
||||
pkgs,
|
||||
...
|
||||
}:
|
||||
|
||||
{
|
||||
services.greetd = {
|
||||
enable = true;
|
||||
settings = {
|
||||
default_session = {
|
||||
command = "${pkgs.greetd.tuigreet}/bin/tuigreet --greeting 'Welcome to NixOS!' --asterisks --remember --remember-user-session --time --cmd ${pkgs.hyprland}/bin/Hyprland";
|
||||
user = "greeter";
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
15
hosts/common/optional/services/openssh.nix
Normal file
15
hosts/common/optional/services/openssh.nix
Normal file
@@ -0,0 +1,15 @@
|
||||
{
|
||||
config,
|
||||
...
|
||||
}:
|
||||
let
|
||||
sshPort = config.hostSpec.networking.ports.tcp.ssh;
|
||||
in
|
||||
{
|
||||
services.openssh = {
|
||||
enable = true;
|
||||
ports = [ sshPort ];
|
||||
};
|
||||
|
||||
networking.firewall.allowedTCPPorts = [ sshPort ];
|
||||
}
|
||||
8
hosts/common/optional/services/printing.nix
Normal file
8
hosts/common/optional/services/printing.nix
Normal file
@@ -0,0 +1,8 @@
|
||||
# Reminder that CUPS cpanel defaults to localhost:631
|
||||
{
|
||||
...
|
||||
}:
|
||||
|
||||
{
|
||||
services.printing.enable = true;
|
||||
}
|
||||
7
hosts/common/optional/services/smart-card.nix
Normal file
7
hosts/common/optional/services/smart-card.nix
Normal file
@@ -0,0 +1,7 @@
|
||||
{
|
||||
...
|
||||
}:
|
||||
|
||||
{
|
||||
services.pcscd.enable = true;
|
||||
}
|
||||
22
hosts/common/optional/yubikey.nix
Normal file
22
hosts/common/optional/yubikey.nix
Normal file
@@ -0,0 +1,22 @@
|
||||
{
|
||||
pkgs,
|
||||
...
|
||||
}:
|
||||
|
||||
{
|
||||
# yubikey login / sudo
|
||||
security.pam = {
|
||||
u2f = {
|
||||
enable = true;
|
||||
settings.cue = true;
|
||||
};
|
||||
services = {
|
||||
login.u2fAuth = true;
|
||||
sudo.u2fAuth = true;
|
||||
};
|
||||
};
|
||||
|
||||
environment.systemPackages = with pkgs; [
|
||||
yubikey-manager
|
||||
];
|
||||
}
|
||||
Reference in New Issue
Block a user