initial commit
This commit is contained in:
21
hosts/common/optional/audio.nix
Normal file
21
hosts/common/optional/audio.nix
Normal file
@@ -0,0 +1,21 @@
|
||||
# NOTE(starter): configure your audio needs as required.
|
||||
{ pkgs, ... }:
|
||||
{
|
||||
hardware.pulseaudio.enable = false;
|
||||
security.rtkit.enable = true;
|
||||
services.pipewire = {
|
||||
enable = true;
|
||||
alsa.enable = true;
|
||||
alsa.support32Bit = true;
|
||||
pulse.enable = true;
|
||||
wireplumber.enable = true;
|
||||
jack.enable = true;
|
||||
};
|
||||
|
||||
environment.systemPackages = builtins.attrValues {
|
||||
inherit (pkgs)
|
||||
playerctl # cli utility and lib for controlling media players
|
||||
# pamixer # cli pulseaudio sound mixer
|
||||
;
|
||||
};
|
||||
}
|
||||
4
hosts/common/optional/kde.nix
Normal file
4
hosts/common/optional/kde.nix
Normal file
@@ -0,0 +1,4 @@
|
||||
# NOTE(starter): This is just a basic enabling of the XFCE windows manager for simplicity
|
||||
{
|
||||
services.desktopManager.plasma6.enable = true;
|
||||
}
|
||||
13
hosts/common/optional/minimal-user.nix
Normal file
13
hosts/common/optional/minimal-user.nix
Normal file
@@ -0,0 +1,13 @@
|
||||
# NOTE: This module is required for nixos-installer
|
||||
{ config, ... }:
|
||||
{
|
||||
# Set a temp password for use by minimal builds like installer and iso
|
||||
users.users.${config.hostSpec.username} = {
|
||||
isNormalUser = true;
|
||||
# This is a hashed version of the plain-text password "nixos" for use in the ISO. Even though,
|
||||
# the password is known, we use `hashedPassword` here instead of `password` to mitigate
|
||||
# occurrences of the latter not being used during build.
|
||||
password = "password";
|
||||
extraGroups = [ "wheel" ];
|
||||
};
|
||||
}
|
||||
10
hosts/common/optional/sddm.nix
Normal file
10
hosts/common/optional/sddm.nix
Normal file
@@ -0,0 +1,10 @@
|
||||
# NOTE(starter): This is just a basic enabling of the XFCE windows manager for simplicity
|
||||
{
|
||||
services.displayManager = {
|
||||
sddm.enable = true;
|
||||
sddm.wayland = {
|
||||
enable = true;
|
||||
compositor = "kwin";
|
||||
};
|
||||
};
|
||||
}
|
||||
36
hosts/common/optional/services/openssh.nix
Normal file
36
hosts/common/optional/services/openssh.nix
Normal file
@@ -0,0 +1,36 @@
|
||||
{
|
||||
config,
|
||||
...
|
||||
}:
|
||||
let
|
||||
# FIXME(starter): if you are not defining ports in your "soft" nix-secrets, you can
|
||||
# replace the following line with: sshPort = 22;
|
||||
# and substitute 22 with a custom port number if needed.
|
||||
sshPort = 22;
|
||||
in
|
||||
|
||||
{
|
||||
services.openssh = {
|
||||
enable = true;
|
||||
ports = [ sshPort ];
|
||||
|
||||
settings = {
|
||||
# Harden
|
||||
PasswordAuthentication = false;
|
||||
PermitRootLogin = "no";
|
||||
# Automatically remove stale sockets
|
||||
StreamLocalBindUnlink = "yes";
|
||||
# Allow forwarding ports to everywhere
|
||||
GatewayPorts = "clientspecified";
|
||||
};
|
||||
|
||||
hostKeys = [
|
||||
{
|
||||
path = "/etc/ssh/ssh_host_ed25519_key";
|
||||
type = "ed25519";
|
||||
}
|
||||
];
|
||||
};
|
||||
|
||||
networking.firewall.allowedTCPPorts = [ sshPort ];
|
||||
}
|
||||
5
hosts/common/optional/xfce.nix
Normal file
5
hosts/common/optional/xfce.nix
Normal file
@@ -0,0 +1,5 @@
|
||||
# NOTE(starter): This is just a basic enabling of the XFCE windows manager for simplicity
|
||||
{
|
||||
services.xserver.desktopManager.xfce.enable = true;
|
||||
services.xserver.desktopManager.xfce.enableScreensaver = false;
|
||||
}
|
||||
Reference in New Issue
Block a user