documentation
This commit is contained in:
parent
a3405b21b0
commit
e4e60647a4
3 changed files with 38 additions and 31 deletions
|
@ -3,7 +3,6 @@
|
||||||
|
|
||||||
inputs = {
|
inputs = {
|
||||||
nixpkgs.url = "github:NixOS/nixpkgs/nixos-24.05";
|
nixpkgs.url = "github:NixOS/nixpkgs/nixos-24.05";
|
||||||
nur.url = "github:nix-community/NUR";
|
|
||||||
home-manager = {
|
home-manager = {
|
||||||
url = "github:nix-community/home-manager/release-24.05";
|
url = "github:nix-community/home-manager/release-24.05";
|
||||||
inputs.nixpkgs.follows = "nixpkgs";
|
inputs.nixpkgs.follows = "nixpkgs";
|
||||||
|
@ -11,7 +10,7 @@
|
||||||
impermanence.url = "github:nix-community/impermanence";
|
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 {
|
nixosConfigurations."stube-pc" = nixpkgs.lib.nixosSystem {
|
||||||
system = "x86_64-linux";
|
system = "x86_64-linux";
|
||||||
specialArgs = inputs;
|
specialArgs = inputs;
|
||||||
|
@ -20,7 +19,6 @@
|
||||||
home-manager.nixosModules.home-manager
|
home-manager.nixosModules.home-manager
|
||||||
impermanence.nixosModules.impermanence
|
impermanence.nixosModules.impermanence
|
||||||
{
|
{
|
||||||
nixpkgs.overlays = [ nur.overlay ];
|
|
||||||
nix.settings.experimental-features = [ "nix-command" "flakes" ];
|
nix.settings.experimental-features = [ "nix-command" "flakes" ];
|
||||||
home-manager = {
|
home-manager = {
|
||||||
useGlobalPkgs = true;
|
useGlobalPkgs = true;
|
||||||
|
|
|
@ -14,10 +14,12 @@ let
|
||||||
X-XFCE-Source=${pkgs.qlcplus}/share/applications/qlcplus.desktop
|
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" ''
|
edit-qlc-workspace = pkgs.writeScriptBin "edit_qlc_workspace.sh" ''
|
||||||
su -c "${pkgs.qlcplus}/bin/qlcplus --open /persist/qlc/stube.qxw" - admin
|
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" ''
|
custom-menu-file = pkgs.writeText "custom.menu" ''
|
||||||
<!DOCTYPE Menu PUBLIC "-//freedesktop//DTD Menu 1.0//EN"
|
<!DOCTYPE Menu PUBLIC "-//freedesktop//DTD Menu 1.0//EN"
|
||||||
"http://www.freedesktop.org/standards/menu-spec/1.0/menu.dtd">
|
"http://www.freedesktop.org/standards/menu-spec/1.0/menu.dtd">
|
||||||
|
@ -207,6 +209,7 @@ in
|
||||||
|
|
||||||
home.persistence."/persist/home/stube" = {
|
home.persistence."/persist/home/stube" = {
|
||||||
directories = [
|
directories = [
|
||||||
|
# keep mixxx song database between reboots
|
||||||
".mixxx"
|
".mixxx"
|
||||||
# xfconf.settings needs an existing installation
|
# xfconf.settings needs an existing installation
|
||||||
".config/xfce4"
|
".config/xfce4"
|
||||||
|
@ -214,9 +217,12 @@ in
|
||||||
allowOther = false;
|
allowOther = false;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
# restart xfce4 panels on configuration change (ignore errors)
|
||||||
home.activation.restart-xfce4-panel = lib.hm.dag.entryAfter ["writeBoundary"] ''
|
home.activation.restart-xfce4-panel = lib.hm.dag.entryAfter ["writeBoundary"] ''
|
||||||
run /bin/sh -c "${pkgs.xfce.xfce4-panel}/bin/xfce4-panel -r || true"
|
run /bin/sh -c "${pkgs.xfce.xfce4-panel}/bin/xfce4-panel -r || true"
|
||||||
'';
|
'';
|
||||||
|
|
||||||
|
# configure xfce4 desktop environment
|
||||||
xfconf.settings = {
|
xfconf.settings = {
|
||||||
xfwm4 = {
|
xfwm4 = {
|
||||||
"general/workspace_count" = 1;
|
"general/workspace_count" = 1;
|
||||||
|
@ -302,12 +308,15 @@ in
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
# desktop file for shutdown entry in menu
|
||||||
xdg.desktopEntries.shutdown = {
|
xdg.desktopEntries.shutdown = {
|
||||||
name = "Herunterfahren";
|
name = "Herunterfahren";
|
||||||
terminal = false;
|
terminal = false;
|
||||||
icon = "xfsm-shutdown";
|
icon = "xfsm-shutdown";
|
||||||
exec = "shutdown -h now";
|
exec = "shutdown -h now";
|
||||||
};
|
};
|
||||||
|
|
||||||
|
# desktop file for reboot entry in menu
|
||||||
xdg.desktopEntries.restart = {
|
xdg.desktopEntries.restart = {
|
||||||
name = "Neustarten";
|
name = "Neustarten";
|
||||||
terminal = false;
|
terminal = false;
|
||||||
|
@ -317,15 +326,16 @@ in
|
||||||
|
|
||||||
|
|
||||||
home.packages = with pkgs; [
|
home.packages = with pkgs; [
|
||||||
qlcplus
|
qlcplus # dmx controller
|
||||||
spotify
|
spotify # audio player
|
||||||
mixxx
|
mixxx # more professional audio player
|
||||||
vlc
|
vlc # media player
|
||||||
mpv
|
mpv # media player
|
||||||
libreoffice-still
|
libreoffice-still # office
|
||||||
edit-qlc-workspace
|
edit-qlc-workspace # script defined earlier
|
||||||
];
|
];
|
||||||
|
|
||||||
|
# firefox without google, ads and anything unnecessary
|
||||||
programs.firefox = {
|
programs.firefox = {
|
||||||
enable = true;
|
enable = true;
|
||||||
profiles.default = {
|
profiles.default = {
|
||||||
|
@ -337,13 +347,6 @@ in
|
||||||
default = "DuckDuckGo";
|
default = "DuckDuckGo";
|
||||||
force = true;
|
force = true;
|
||||||
};
|
};
|
||||||
/*
|
|
||||||
extensions = with pkgs.nur.repos.rycee.firefox-addons; [
|
|
||||||
ublock-origin
|
|
||||||
decentraleyes
|
|
||||||
privacy-badger
|
|
||||||
];
|
|
||||||
*/
|
|
||||||
};
|
};
|
||||||
policies = {
|
policies = {
|
||||||
DisableTelemetry = true;
|
DisableTelemetry = true;
|
||||||
|
@ -371,16 +374,6 @@ in
|
||||||
install_url = "https://addons.mozilla.org/firefox/downloads/latest/ublock-origin/latest.xpi";
|
install_url = "https://addons.mozilla.org/firefox/downloads/latest/ublock-origin/latest.xpi";
|
||||||
installation_mode = "force_installed";
|
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";
|
|
||||||
};
|
|
||||||
*/
|
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
|
@ -1,8 +1,10 @@
|
||||||
{ self, config, pkgs, lib, ...}: {
|
{ self, config, pkgs, lib, ...}: {
|
||||||
imports = [ ./hardware-configuration.nix ];
|
imports = [ ./hardware-configuration.nix ];
|
||||||
|
|
||||||
|
# allow spotify
|
||||||
nixpkgs.config.allowUnfreePredicate = pkg: builtins.elem (lib.getName pkg) [ "spotify" ];
|
nixpkgs.config.allowUnfreePredicate = pkg: builtins.elem (lib.getName pkg) [ "spotify" ];
|
||||||
|
|
||||||
|
# boot
|
||||||
boot.loader.grub = {
|
boot.loader.grub = {
|
||||||
enable = true;
|
enable = true;
|
||||||
device = "/dev/sda";
|
device = "/dev/sda";
|
||||||
|
@ -10,12 +12,15 @@
|
||||||
|
|
||||||
boot.loader.timeout = 1;
|
boot.loader.timeout = 1;
|
||||||
|
|
||||||
|
# network
|
||||||
networking.hostName = "stube-pc";
|
networking.hostName = "stube-pc";
|
||||||
networking.networkmanager.enable = true;
|
networking.networkmanager.enable = true;
|
||||||
networking.firewall.enable = true;
|
networking.firewall.enable = true;
|
||||||
|
|
||||||
|
# timezone
|
||||||
time.timeZone = "Europe/Berlin";
|
time.timeZone = "Europe/Berlin";
|
||||||
|
|
||||||
|
# configure users
|
||||||
users.mutableUsers = false;
|
users.mutableUsers = false;
|
||||||
users.users.admin = {
|
users.users.admin = {
|
||||||
isNormalUser = true;
|
isNormalUser = true;
|
||||||
|
@ -30,15 +35,19 @@
|
||||||
password = "stube";
|
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" ];
|
systemd.services."display-manager".after = [ "home-manager-stube.service" ];
|
||||||
|
|
||||||
console.keyMap = "de";
|
console.keyMap = "de";
|
||||||
|
|
||||||
|
# audio configuration
|
||||||
services.pipewire = {
|
services.pipewire = {
|
||||||
enable = true;
|
enable = true;
|
||||||
pulse.enable = true;
|
pulse.enable = true;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
# gui configuration
|
||||||
services.xserver = {
|
services.xserver = {
|
||||||
enable = true;
|
enable = true;
|
||||||
xkb.layout = "de";
|
xkb.layout = "de";
|
||||||
|
@ -52,25 +61,31 @@
|
||||||
user = "stube";
|
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.greeter.enable = false;
|
||||||
services.xserver.displayManager.lightdm.autoLogin.timeout = 0;
|
services.xserver.displayManager.lightdm.autoLogin.timeout = 0;
|
||||||
services.xserver.desktopManager.xfce.enableScreensaver = false;
|
services.xserver.desktopManager.xfce.enableScreensaver = false;
|
||||||
|
|
||||||
|
# enable gpu support
|
||||||
hardware.opengl = {
|
hardware.opengl = {
|
||||||
enable = true;
|
enable = true;
|
||||||
driSupport = true;
|
driSupport = true;
|
||||||
driSupport32Bit = true;
|
driSupport32Bit = true;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
# load additional applications
|
||||||
environment.systemPackages = with pkgs; [
|
environment.systemPackages = with pkgs; [
|
||||||
vim
|
vim # text editor
|
||||||
git
|
git # source code management for nixos-rebuild from flake
|
||||||
xfce.xfce4-pulseaudio-plugin
|
xfce.xfce4-pulseaudio-plugin # pulseaudio-plugin in top panel
|
||||||
pavucontrol
|
pavucontrol # audio control panel
|
||||||
];
|
];
|
||||||
|
|
||||||
|
# link current system configuration to /etc/current-nixos
|
||||||
environment.etc."current-nixos".source = self;
|
environment.etc."current-nixos".source = self;
|
||||||
|
|
||||||
|
# persistent files
|
||||||
environment.persistence."/persist" = {
|
environment.persistence."/persist" = {
|
||||||
enable = true;
|
enable = true;
|
||||||
hideMounts = true;
|
hideMounts = true;
|
||||||
|
@ -91,6 +106,7 @@
|
||||||
|
|
||||||
security.polkit.enable = true;
|
security.polkit.enable = true;
|
||||||
|
|
||||||
|
# enable ssh access for admin user
|
||||||
services.openssh = {
|
services.openssh = {
|
||||||
enable = true;
|
enable = true;
|
||||||
openFirewall = true;
|
openFirewall = true;
|
||||||
|
|
Loading…
Reference in a new issue