documentation

This commit is contained in:
Paul Zinselmeyer 2024-08-28 14:24:44 +02:00
parent a3405b21b0
commit e4e60647a4
Signed by: pfzetto
GPG key ID: B471A1AF06C895FD
3 changed files with 38 additions and 31 deletions

View file

@ -3,7 +3,6 @@
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixos-24.05";
nur.url = "github:nix-community/NUR";
home-manager = {
url = "github:nix-community/home-manager/release-24.05";
inputs.nixpkgs.follows = "nixpkgs";
@ -11,7 +10,7 @@
impermanence.url = "github:nix-community/impermanence";
};
outputs = { self, nixpkgs, nur, home-manager, impermanence }@inputs: {
outputs = { self, nixpkgs, home-manager, impermanence }@inputs: {
nixosConfigurations."stube-pc" = nixpkgs.lib.nixosSystem {
system = "x86_64-linux";
specialArgs = inputs;
@ -20,7 +19,6 @@
home-manager.nixosModules.home-manager
impermanence.nixosModules.impermanence
{
nixpkgs.overlays = [ nur.overlay ];
nix.settings.experimental-features = [ "nix-command" "flakes" ];
home-manager = {
useGlobalPkgs = true;

View file

@ -14,10 +14,12 @@ let
X-XFCE-Source=${pkgs.qlcplus}/share/applications/qlcplus.desktop
'';
# a script to start qlcplus as admin in current session
edit-qlc-workspace = pkgs.writeScriptBin "edit_qlc_workspace.sh" ''
su -c "${pkgs.qlcplus}/bin/qlcplus --open /persist/qlc/stube.qxw" - admin
'';
# custom menu(top-left) to remove unnecessary entries
custom-menu-file = pkgs.writeText "custom.menu" ''
<!DOCTYPE Menu PUBLIC "-//freedesktop//DTD Menu 1.0//EN"
"http://www.freedesktop.org/standards/menu-spec/1.0/menu.dtd">
@ -207,6 +209,7 @@ in
home.persistence."/persist/home/stube" = {
directories = [
# keep mixxx song database between reboots
".mixxx"
# xfconf.settings needs an existing installation
".config/xfce4"
@ -214,9 +217,12 @@ in
allowOther = false;
};
# restart xfce4 panels on configuration change (ignore errors)
home.activation.restart-xfce4-panel = lib.hm.dag.entryAfter ["writeBoundary"] ''
run /bin/sh -c "${pkgs.xfce.xfce4-panel}/bin/xfce4-panel -r || true"
'';
# configure xfce4 desktop environment
xfconf.settings = {
xfwm4 = {
"general/workspace_count" = 1;
@ -302,12 +308,15 @@ in
};
};
# desktop file for shutdown entry in menu
xdg.desktopEntries.shutdown = {
name = "Herunterfahren";
terminal = false;
icon = "xfsm-shutdown";
exec = "shutdown -h now";
};
# desktop file for reboot entry in menu
xdg.desktopEntries.restart = {
name = "Neustarten";
terminal = false;
@ -317,15 +326,16 @@ in
home.packages = with pkgs; [
qlcplus
spotify
mixxx
vlc
mpv
libreoffice-still
edit-qlc-workspace
qlcplus # dmx controller
spotify # audio player
mixxx # more professional audio player
vlc # media player
mpv # media player
libreoffice-still # office
edit-qlc-workspace # script defined earlier
];
# firefox without google, ads and anything unnecessary
programs.firefox = {
enable = true;
profiles.default = {
@ -337,13 +347,6 @@ in
default = "DuckDuckGo";
force = true;
};
/*
extensions = with pkgs.nur.repos.rycee.firefox-addons; [
ublock-origin
decentraleyes
privacy-badger
];
*/
};
policies = {
DisableTelemetry = true;
@ -371,16 +374,6 @@ in
install_url = "https://addons.mozilla.org/firefox/downloads/latest/ublock-origin/latest.xpi";
installation_mode = "force_installed";
};
/*
"jid1-MnnxcxisBPnSXQ@jetpack" = {
install_url = "https://addons.mozilla.org/firefox/downloads/latest/privacy-badger17/latest.xpi";
installation_mode = "force_installed";
};
"jid1-BoFifL9Vbdl2zQ@jetpack" = {
install_url = "https://addons.mozilla.org/firefox/downloads/latest/decentraleyes/latest.xpi";
installation_mode = "force_installed";
};
*/
};
};
};

View file

@ -1,8 +1,10 @@
{ self, config, pkgs, lib, ...}: {
imports = [ ./hardware-configuration.nix ];
# allow spotify
nixpkgs.config.allowUnfreePredicate = pkg: builtins.elem (lib.getName pkg) [ "spotify" ];
# boot
boot.loader.grub = {
enable = true;
device = "/dev/sda";
@ -10,12 +12,15 @@
boot.loader.timeout = 1;
# network
networking.hostName = "stube-pc";
networking.networkmanager.enable = true;
networking.firewall.enable = true;
# timezone
time.timeZone = "Europe/Berlin";
# configure users
users.mutableUsers = false;
users.users.admin = {
isNormalUser = true;
@ -30,15 +35,19 @@
password = "stube";
};
# the display-manager starts the desktop environment instantaneously.
# this statement delays the display-manager until the home environment for the user is set up.
systemd.services."display-manager".after = [ "home-manager-stube.service" ];
console.keyMap = "de";
# audio configuration
services.pipewire = {
enable = true;
pulse.enable = true;
};
# gui configuration
services.xserver = {
enable = true;
xkb.layout = "de";
@ -52,25 +61,31 @@
user = "stube";
};
};
# remove all multi-user / displayManager functionality from lightDM (basically a kiosk setup)
services.xserver.displayManager.lightdm.greeter.enable = false;
services.xserver.displayManager.lightdm.autoLogin.timeout = 0;
services.xserver.desktopManager.xfce.enableScreensaver = false;
# enable gpu support
hardware.opengl = {
enable = true;
driSupport = true;
driSupport32Bit = true;
};
# load additional applications
environment.systemPackages = with pkgs; [
vim
git
xfce.xfce4-pulseaudio-plugin
pavucontrol
vim # text editor
git # source code management for nixos-rebuild from flake
xfce.xfce4-pulseaudio-plugin # pulseaudio-plugin in top panel
pavucontrol # audio control panel
];
# link current system configuration to /etc/current-nixos
environment.etc."current-nixos".source = self;
# persistent files
environment.persistence."/persist" = {
enable = true;
hideMounts = true;
@ -91,6 +106,7 @@
security.polkit.enable = true;
# enable ssh access for admin user
services.openssh = {
enable = true;
openFirewall = true;