refactored system
This commit is contained in:
parent
6a62e2f23f
commit
386d889455
55 changed files with 336 additions and 580 deletions
16
system/desktop/btrbk.nix
Normal file
16
system/desktop/btrbk.nix
Normal file
|
|
@ -0,0 +1,16 @@
|
|||
{ config, ... }:
|
||||
|
||||
{
|
||||
services.btrbk.instances.btrbk = {
|
||||
onCalendar = "hourly";
|
||||
settings = {
|
||||
subvolume = "/home";
|
||||
snapshot_preserve = "40d";
|
||||
snapshot_preserve_min = "4d";
|
||||
snapshot_dir = "/btrbk_snapshots";
|
||||
target = "/run/media/till/backup/${config.networking.hostName}";
|
||||
target_preserve_min = "no";
|
||||
target_preserve = "10d 10w 24m";
|
||||
};
|
||||
};
|
||||
}
|
||||
29
system/desktop/cast.nix
Normal file
29
system/desktop/cast.nix
Normal file
|
|
@ -0,0 +1,29 @@
|
|||
{ config, pkgs, ... }:
|
||||
|
||||
{
|
||||
|
||||
networking.firewall = {
|
||||
allowedTCPPorts = [
|
||||
7326
|
||||
8008
|
||||
8009
|
||||
8443
|
||||
];
|
||||
};
|
||||
|
||||
environment.systemPackages = with pkgs; [
|
||||
gnome-network-displays
|
||||
gst_all_1.gstreamer
|
||||
gst_all_1.gst-plugins-base
|
||||
gst_all_1.gst-plugins-good
|
||||
gst_all_1.gst-plugins-bad
|
||||
gst_all_1.gst-plugins-ugly
|
||||
gst_all_1.gst-libav
|
||||
gst_all_1.gst-vaapi
|
||||
];
|
||||
|
||||
environment.variables = {
|
||||
GST_PLUGIN_PATH = "/run/current-system/sw/lib/gstreamer-1.0/";
|
||||
};
|
||||
|
||||
}
|
||||
62
system/desktop/default.nix
Normal file
62
system/desktop/default.nix
Normal file
|
|
@ -0,0 +1,62 @@
|
|||
{ config, pkgs, ... }:
|
||||
|
||||
{
|
||||
imports = [
|
||||
./interception-tools.nix
|
||||
./btrbk.nix
|
||||
];
|
||||
|
||||
networking.networkmanager = {
|
||||
enable = true;
|
||||
plugins = with pkgs; [ networkmanager-openvpn ];
|
||||
};
|
||||
|
||||
i18n.extraLocaleSettings = {
|
||||
LC_TIME = "en_GB.UTF-8";
|
||||
LC_CTYPE = "de_DE.UTF-8";
|
||||
LC_PAPER = "de_DE.UTF-8";
|
||||
};
|
||||
|
||||
services.pulseaudio.enable = false;
|
||||
|
||||
services.pipewire = {
|
||||
enable = true;
|
||||
alsa.enable = true;
|
||||
alsa.support32Bit = true;
|
||||
pulse.enable = true;
|
||||
};
|
||||
|
||||
nixpkgs.config.allowUnfree = true;
|
||||
|
||||
environment.sessionVariables = {
|
||||
XDG_CONFIG_HOME = "$HOME/.config";
|
||||
XDG_CACHE_HOME = "$HOME/.cache";
|
||||
XDG_DATA_HOME = "$HOME/.local/share";
|
||||
};
|
||||
|
||||
environment.systemPackages = with pkgs; [
|
||||
firefox
|
||||
libreoffice
|
||||
foot
|
||||
pciutils
|
||||
tree
|
||||
virtiofsd
|
||||
];
|
||||
|
||||
fonts.packages = with pkgs; [
|
||||
jetbrains-mono
|
||||
];
|
||||
|
||||
services = {
|
||||
dbus.enable = true;
|
||||
flatpak.enable = true;
|
||||
fwupd.enable = true;
|
||||
printing.enable = true;
|
||||
udisks2.enable = true;
|
||||
};
|
||||
|
||||
virtualisation.libvirtd.enable = true;
|
||||
programs.virt-manager.enable = true;
|
||||
programs.dconf.enable = true;
|
||||
|
||||
}
|
||||
7
system/desktop/ergodox-udev.nix
Normal file
7
system/desktop/ergodox-udev.nix
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
{ ... }:
|
||||
|
||||
{
|
||||
services.udev.extraRules = ''
|
||||
KERNEL=="hidraw*", SUBSYSTEM=="hidraw", MODE="0660", GROUP="wheel"
|
||||
'';
|
||||
}
|
||||
33
system/desktop/gnome.nix
Normal file
33
system/desktop/gnome.nix
Normal file
|
|
@ -0,0 +1,33 @@
|
|||
{ lib, config, pkgs, ... }:
|
||||
|
||||
|
||||
{
|
||||
services.desktopManager.gnome.enable = true;
|
||||
|
||||
services.displayManager = {
|
||||
gdm.enable = true;
|
||||
defaultSession = "gnome";
|
||||
};
|
||||
|
||||
environment.gnome.excludePackages = with pkgs; [
|
||||
gnome-tour
|
||||
geary
|
||||
yelp
|
||||
gnome-contacts
|
||||
gnome-initial-setup
|
||||
];
|
||||
|
||||
environment.systemPackages = with pkgs; [
|
||||
gnome-sound-recorder
|
||||
gnome-tweaks
|
||||
gnome-boxes
|
||||
];
|
||||
|
||||
services.gnome.gnome-browser-connector.enable = true;
|
||||
# services.gnome.gnome-keyring.enable = lib.mkForce false;
|
||||
|
||||
programs.kdeconnect = {
|
||||
enable = true;
|
||||
package = lib.mkForce pkgs.gnomeExtensions.gsconnect;
|
||||
};
|
||||
}
|
||||
23
system/desktop/interception-tools.nix
Normal file
23
system/desktop/interception-tools.nix
Normal file
|
|
@ -0,0 +1,23 @@
|
|||
{ config, pkgs, ... }:
|
||||
|
||||
{
|
||||
environment.etc = {
|
||||
"interception/dual-function-keys/capslock.yaml".text = ''
|
||||
MAPPINGS:
|
||||
- KEY: KEY_CAPSLOCK
|
||||
TAP: KEY_ESC
|
||||
HOLD: KEY_LEFTCTRL
|
||||
'';
|
||||
};
|
||||
|
||||
services.interception-tools = {
|
||||
enable = true;
|
||||
plugins = [ pkgs.interception-tools-plugins.dual-function-keys ];
|
||||
udevmonConfig = ''
|
||||
- JOB: "${pkgs.interception-tools}/bin/intercept -g $DEVNODE | ${pkgs.interception-tools-plugins.dual-function-keys}/bin/dual-function-keys -c /etc/interception/dual-function-keys/capslock.yaml | ${pkgs.interception-tools}/bin/uinput -d $DEVNODE"
|
||||
DEVICE:
|
||||
EVENTS:
|
||||
EV_KEY: [ KEY_CAPSLOCK ]
|
||||
'';
|
||||
};
|
||||
}
|
||||
22
system/desktop/media.nix
Normal file
22
system/desktop/media.nix
Normal file
|
|
@ -0,0 +1,22 @@
|
|||
{ config, pkgs, ... }:
|
||||
|
||||
{
|
||||
services.sonarr = {
|
||||
enable = true;
|
||||
group = "media";
|
||||
};
|
||||
services.radarr = {
|
||||
enable = true;
|
||||
group = "media";
|
||||
};
|
||||
|
||||
services.flaresolverr.enable = true;
|
||||
services.prowlarr.enable = true;
|
||||
services.bazarr.enable = true;
|
||||
services.lidarr.enable = true;
|
||||
|
||||
users.groups.media = {};
|
||||
|
||||
users.users.guest.extraGroups = [ "media" "wheel" ];
|
||||
users.users.sonarr.extraGroups = [ "media" ];
|
||||
}
|
||||
5
system/desktop/remote-desktop.nix
Normal file
5
system/desktop/remote-desktop.nix
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
{ config, pkgs, ... }:
|
||||
|
||||
{
|
||||
services.gnome.gnome-remote-desktop.enable = true;
|
||||
}
|
||||
26
system/desktop/yubikey-pam.nix
Normal file
26
system/desktop/yubikey-pam.nix
Normal file
|
|
@ -0,0 +1,26 @@
|
|||
{ config, pkgs, ... }:
|
||||
|
||||
{
|
||||
services.pcscd.enable = true;
|
||||
|
||||
environment.systemPackages = with pkgs; [
|
||||
yubikey-personalization
|
||||
];
|
||||
|
||||
services.udev = {
|
||||
packages = [ pkgs.yubikey-personalization ];
|
||||
# extraRules = ''
|
||||
# ACTION=="remove",\
|
||||
# ENV{ID_BUS}=="usb",\
|
||||
# ENV{ID_MODEL_ID}=="0407",\
|
||||
# ENV{ID_VENDOR_ID}=="1050",\
|
||||
# ENV{ID_VENDOR}=="Yubico",\
|
||||
# RUN+="${pkgs.systemd}/bin/loginctl lock-sessions"
|
||||
# '';
|
||||
};
|
||||
|
||||
# security.pam.services = {
|
||||
# login.u2fAuth = true;
|
||||
# sudo.u2fAuth = true;
|
||||
# };
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue