Merge Dev with main

Making it a Proper nix Module
This commit is contained in:
Peritia 2026-02-07 10:56:52 +01:00 committed by GitHub
commit ba296bc463
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
54 changed files with 995 additions and 1544 deletions

2
.gitignore vendored Normal file
View file

@ -0,0 +1,2 @@
example/*/flake.lock
example/*/hardware-configuration.nix

View file

@ -1,139 +0,0 @@
{ config, pkgs, host, lib, inputs, userconf, ... }:
let
# Load user-specific variables
userVars = import ./variables/user-vars.nix;
inherit (userVars) username gitUsername gitEmail keyboardLayout;
nixDirectory = "/home/${username}/NixOS";
in {
################################################################
# Module Imports
################################################################
imports = [
# Host-specific hardware configuration (autogenerated)
./hardware-configuration.nix
# System-level user definition
./user.nix
# Base and global modules
../../../Modules/System
# Home Manager integration
inputs.home-manager.nixosModules.home-manager
];
################################################################
# Display & Desktop Environment
################################################################
services.xserver = {
enable = true;
desktopManager.xfce.enable = true;
xkb = {
layout = "de";
variant = "";
};
};
services.xserver.displayManager.lightdm.enable = false;
services.displayManager.sddm = {
enable = true;
package = pkgs.qt6Packages.sddm;
};
xdg.portal.extraPortals = [ pkgs.xdg-desktop-portal-gtk ];
################################################################
# System Packages (XFCE & Utilities)
################################################################
environment.systemPackages = with pkgs; [
xdg-desktop-portal-gtk
# XFCE Core
xfce.xfwm4
xfce.xfce4-panel
xfce.xfce4-session
xfce.xfce4-settings
xfce.thunar
xfce.mousepad
xfce.xfce4-terminal
xfce.xfce4-appfinder
xfce.xfce4-power-manager
xfce.xfce4-notifyd
xfce.xfce4-whiskermenu-plugin
# Optional Extras
xfce.gigolo
xfce.xfce4-screenshooter
xfce.parole
# xfce.xfce4-clipman
# other:
zsh
];
programs.steam = {
enable = true;
remotePlay.openFirewall = true; # Open ports in the firewall for Steam Remote Play
dedicatedServer.openFirewall = true; # Open ports in the firewall for Source Dedicated Server
localNetworkGameTransfers.openFirewall = true; # Open ports in the firewall for Steam Local Network Game Transfers
};
services.openssh.enable = true;
programs.zsh = {
enable = true;
ohMyZsh = {
enable = true;
theme = "xiong-chiamiov-plus";
plugins = ["git"];
};
};
################################################################
# Home Manager Configuration
################################################################
home-manager = {
useGlobalPkgs = true;
useUserPackages = true;
backupFileExtension = "delme-HMbackup";
users.${username} = import ./home/home.nix {
inherit config nixDirectory pkgs;
};
};
################################################################
# Bootloader
################################################################
boot.loader = {
grub = {
enable = true;
efiSupport = false;
useOSProber = false;
devices = ["nodev"];
};
systemd-boot.enable = false;
efi.canTouchEfiVariables = false;
};
################################################################
# System Version
################################################################
system.stateVersion = "25.05";
}

View file

@ -1,42 +0,0 @@
# Do not modify this file! It was generated by nixos-generate-config
{ config, lib, pkgs, modulesPath, ... }:
{
abort ''
This file is a placeholder and should not be edited manually.
Please run:
nixos-generate-config
to regenerate the correct hardware configuration.
This file was intentionally disabled to prevent accidental editing.
'';
imports =
[ (modulesPath + "/profiles/qemu-guest.nix")
];
boot.initrd.125312 = [ "ah124123ci" "xhci_pci" "¹3¹32134" "2143432" "12441234" ];
boot.initrd.14231 = [ ];
boot.124 = [ "124-124214" ];
boot.1241324134 = [ ];
fileSystems."/" =
{ device = "/dev/disk/by-uuid/9b55ed5e-1-443f-a5e8-1fb378fdad77";
fsType = "ext4";
};
swapDevices = [ 1241324134124214];
# Enables DHCP on each ethernet and wireless interface. In case of scripted networking
# (the default) this is the recommended approach. When using systemd-networkd it's
# still possible to use this option, but it's recommended to use it in conjunction
# with explicit per-interface declarations with `networking.interfaces.<interface>.useDHCP`.
networking.useDHCP = lib.mkDefault 1324414124444444444444444444444444444444444;
# networking.interfaces.enp1s0.useDHCP = lib.mkDefault true;
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
}

View file

@ -1,169 +0,0 @@
{ config, pkgs, lib, ... }:
let
# Your application definitions
apps = {
brave = {
name = "Brave";
genericName = "Web Browser";
exec = "brave";
icon = "world";
comment = "Browse the Web";
terminal = false;
categories = [ "Network" "WebBrowser" ];
};
terminal = {
name = "Terminal";
exec = "xfce4-terminal";
icon = "utilities-terminal";
comment = "Run a terminal emulator";
terminal = true;
categories = [ "System" "Utility" ];
};
libre-calc = {
name = "Libre Calc";
exec = "libreoffice --calc";
icon = "libreoffice-calc";
comment = "Spreadsheet program";
terminal = false;
categories = [ "Office" ];
};
libre-write = {
name = "Libre Write";
exec = "libreoffice --writer";
icon = "libreoffice-writer";
comment = "Word processor";
terminal = false;
categories = [ "Office" ];
};
mpv = {
name = "MPV";
exec = "mpv";
icon = "mpv";
comment = "Video Player";
terminal = false;
categories = [ "AudioVideo" "Player" ];
};
obsidian = {
name = "Obsidian";
exec = "obsidian %u";
icon = "obsidian";
comment = "Markdown Editor";
terminal = false;
categories = [ "Office" "Utility" ];
};
gwenview = {
name = "Gwenview";
exec = "gwenview %U";
icon = "gwenview";
comment = "Image Viewer";
terminal = false;
categories = [ "Graphics" ];
};
krita = {
name = "Krita";
exec = "krita %F";
icon = "krita";
comment = "Digital painting";
terminal = false;
categories = [ "Graphics" ];
};
prism-launcher = {
name = "Prism Launcher";
exec = "prismlauncher %U";
icon = "minecraft";
comment = "Minecraft Launcher";
terminal = false;
categories = [ "Game" ];
};
protonvpn = {
name = "ProtonVPN";
exec = "protonvpn-app";
icon = "protonvpn";
comment = "VPN Client";
terminal = false;
categories = [ "Network" "Security" ];
};
signal = {
name = "Signal";
exec = "signal-desktop %U";
icon = "signal-desktop";
comment = "Private Messenger";
terminal = false;
categories = [ "Network" "InstantMessaging" ];
};
vesktop = {
name = "Vesktop";
exec = "vesktop %U";
icon = "discord";
comment = "Discord Client";
terminal = false;
categories = [ "Network" "Chat" ];
};
spotify = {
name = "Spotify";
exec = "spotify %U";
icon = "spotify";
comment = "Spotify Music";
terminal = false;
categories = [ "AudioVideo" "Player" ];
};
okular = {
name = "Okular";
exec = "okular %U";
icon = "okular";
comment = "PDF Viewer";
terminal = false;
categories = [ "Office" "Viewer" ];
};
steam = {
name = "Steam";
exec = "steam";
icon = "steam";
comment = "Steam Game Platform";
terminal = false;
categories = [ "Game" ];
};
};
in {
home.activation.desktopFiles = lib.hm.dag.entryAfter [ "writeBoundary" ] (
''
mkdir -p "$HOME/Desktop"
'' + (lib.concatStringsSep "\n" (lib.mapAttrsToList (name: data:
let
desktopText = ''
[Desktop Entry]
Version=1.0
Type=Application
Name=${data.name}
${lib.optionalString (data ? genericName) "GenericName=${data.genericName}"}
Comment=${data.comment}
Exec=${data.exec}
Icon=${data.icon}
Terminal=${if data.terminal then "true" else "false"}
Categories=${lib.concatStringsSep ";" data.categories};
'';
in ''
cat > "$HOME/Desktop/${name}.desktop" <<EOF
${desktopText}
EOF
chmod +x "$HOME/Desktop/${name}.desktop"
''
) apps))
);
}

View file

@ -1,117 +0,0 @@
{
config,
nixDirectory,
pkgs,
...
}: let
# Import user-specific variables
userVars = import ../variables/user-vars.nix;
inherit (userVars) username gitUsername gitEmail;
in {
################################################################
# Basic Home Manager Setup
################################################################
home.username = username;
home.homeDirectory = "/home/${username}";
home.stateVersion = "25.05";
################################################################
# Module Imports
################################################################
imports = [
# All Home Manager Modules
../../../../Modules/Applications
# Extended Retro theme
../../../../Modules/Desktops/XFCE-retro
# Desktop applications
./desktop.nix
];
################################################################
# Nyx Tools Configuration
################################################################
#imports = [
# # Nyx Tools
# # ../../../../Misc/Nyx-Tools/nyx.nix
#];
# Optional but really cool so if you wanna use it:
# https://github.com/Peritia-System/Nyx-Tools
#modules.nyx-rebuild = {
# enable = true;
# inherit username nixDirectory;
# editor = "nvim";
# formatter = "alejandra";
# enableAlias = false;
# autoPush = false;
# enableFormatting = false;
# startEditor = false;
#};
#modules.nyx-cleanup = {
# enable = true;
# inherit username nixDirectory;
# autoPush = false;
# keepGenerations = 5;
# enableAlias = false;
#};
#modules.nix-tool = {
# enable = true;
# inherit nixDirectory;
#};
################################################################
# Package Selection
################################################################
home.packages = import ./user-packages.nix {inherit pkgs;};
################################################################
# Feature Modules
################################################################
# App groups
standardApps.enable = true;
officeApps.enable = true;
# Individual applications
brave-and-extension.enable = true;
vscodium-and-extension.enable = true;
vesktop.enable = true;
krita.enable = true;
signal.enable = true;
spotify.enable = true;
obsidian.enable = true;
protonvpn.enable = true;
# Gaming:
prismlauncher.enable = true;
cliTools.enable = true;
################################################################
# Git Configuration
################################################################
programs.git = {
enable = true;
userName = gitUsername;
userEmail = gitEmail;
aliases = {
co = "checkout";
ci = "commit";
st = "status";
br = "branch";
};
};
}

View file

@ -1,6 +0,0 @@
# ./user-packages.nix
{pkgs}:
with pkgs; [
mpv
vlc
]

View file

@ -1,32 +0,0 @@
{
pkgs,
lib,
...
}: let
vars = import ./variables/user-vars.nix;
username = vars.username;
gitUsername = vars.gitUsername;
in {
users.mutableUsers = true;
# Main user
users.users.${username} = {
isNormalUser = true;
description = gitUsername;
createHome = true;
home = "/home/${username}";
shell = pkgs.zsh;
group = "users";
extraGroups = [
"wheel"
"networkmanager"
"libvirtd"
"scanner"
"lp"
"video"
"input"
"audio"
];
};
}

View file

@ -1,3 +0,0 @@
{
system = "x86_64-linux"; # Can also be aarch64-linux, etc.
}

View file

@ -1,8 +0,0 @@
# ./User/variables.nix
let
username = "user";
in {
inherit username;
gitUsername = "user-name-here";
gitEmail = "user@user-email.here";
}

View file

@ -1,28 +0,0 @@
{
config,
pkgs,
lib,
...
}:
with lib; let
cfg = config.brave-and-extension;
in {
options.brave-and-extension.enable = mkEnableOption "Enable Brave with extensions and flags";
config = mkIf cfg.enable {
programs.brave = {
package = pkgs.brave;
enable = true;
extensions = [
{id = "cjpalhdlnbpafiamejdnhcphjbkeiagm";} # uBlock Origin
];
commandLineArgs = [
"--disable-features=AutofillSavePaymentMethods"
"--disable-features=PasswordManagerOnboarding"
"--disable-features=AutofillEnableAccountWalletStorage"
];
};
};
}

View file

@ -1,17 +0,0 @@
{
config,
pkgs,
lib,
...
}:
with lib; let
cfg = config.krita;
in {
options.krita.enable = mkEnableOption "Enable krita";
config = mkIf cfg.enable {
home.packages = with pkgs; [
pkgs.krita
];
};
}

View file

@ -1,15 +0,0 @@
{
config,
lib,
pkgs,
...
}:
with lib; {
options.obsidian.enable = mkEnableOption "Enable Obsidian installation";
config = mkIf config.obsidian.enable {
home.packages = with pkgs; [
obsidian
];
};
}

View file

@ -1,23 +0,0 @@
{
config,
lib,
pkgs,
...
}:
with lib; let
cfg = config;
officeApps = with pkgs; [
libreoffice
thunderbird
];
in {
options.officeApps.enable = mkEnableOption ''
Enable office/document applications (e.g., LibreOffice, Thunderbird)
'';
config = {
home.packages =
optionals cfg.officeApps.enable officeApps;
};
}

View file

@ -1,17 +0,0 @@
{
config,
pkgs,
lib,
...
}:
with lib; let
cfg = config.signal;
in {
options.signal.enable = mkEnableOption "Enable Signals Desktop Version";
config = mkIf cfg.enable {
home.packages = with pkgs; [
pkgs.signal-desktop
];
};
}

View file

@ -1,16 +0,0 @@
{
config,
lib,
pkgs,
...
}:
with lib; {
options.spotify.enable = mkEnableOption "Enable Spotify installation";
config = mkIf config.spotify.enable {
home.packages = with pkgs; [
spotify
cava
];
};
}

View file

@ -1,22 +0,0 @@
{
config,
lib,
pkgs,
...
}:
with lib; let
cfg = config;
standardApps = with pkgs; [
kdePackages.gwenview
kdePackages.okular
];
in {
options.standardApps.enable = mkEnableOption ''
Enable image and graphics applications (e.g., Gwenview, Okular)
'';
config = {
home.packages = optionals cfg.standardApps.enable standardApps;
};
}

View file

@ -1,17 +0,0 @@
{
config,
pkgs,
lib,
...
}:
with lib; let
cfg = config.vesktop;
in {
options.vesktop.enable = mkEnableOption "Enable Vesktop, the Custom Discord client, with extensions";
config = mkIf cfg.enable {
home.packages = with pkgs; [
pkgs.vesktop
];
};
}

View file

@ -1,24 +0,0 @@
{
config,
pkgs,
lib,
...
}:
with lib; let
cfg = config.vscodium-and-extension;
in {
options.vscodium-and-extension.enable = mkEnableOption "Enable VScodium with extensions";
config = mkIf cfg.enable {
programs.vscode = {
enable = true;
package = pkgs.vscodium;
profiles.default.extensions = with pkgs.vscode-extensions; [
catppuccin.catppuccin-vsc
jnoortheen.nix-ide
ms-python.python
ms-azuretools.vscode-docker
];
};
};
}

View file

@ -1,21 +0,0 @@
{ config, lib, pkgs, ... }:
{
options.prismlauncher.enable = lib.mkEnableOption "Enable PrismLauncher and dependencies";
config = lib.mkIf config.prismlauncher.enable {
home.packages = [
(pkgs.prismlauncher.override {
# Add binary required by some mod
additionalPrograms = [ pkgs.ffmpeg ];
# Set Java runtimes
jdks = [
pkgs.jdk8
pkgs.jdk17
pkgs.jdk21 or pkgs.jdk
];
})
];
};
}

View file

@ -1,11 +0,0 @@
{ config, lib, pkgs, ... }:
{
options.protonvpn.enable = lib.mkEnableOption "Enable ProtonVPN and dependencies";
config = lib.mkIf config.protonvpn.enable {
home.packages = with pkgs; [
protonvpn-gui
];
};
}

View file

@ -1,32 +0,0 @@
# Import all modules so home.nix only needs to import this file
{ config, pkgs, lib, inputs, ... }: {
imports = [
################
# 🖥️ Desktop Apps #
################
./Desktop-Apps/krita.nix
./Desktop-Apps/obsidian.nix
./Desktop-Apps/office-apps.nix
./Desktop-Apps/signal-desktop.nix
./Desktop-Apps/spotify.nix
./Desktop-Apps/standard-apps.nix
./Desktop-Apps/vesktop.nix
./Desktop-Apps/vscodium.nix
#############
# 🌐 Browser #
#############
./Browser/brave/brave.nix
############
# 🎮 Gaming #
############
./Gaming/prismlauncher.nix
###########
# 🔐 VPNs #
###########
./VPN/protonvpn.nix
];
}

View file

@ -1,17 +0,0 @@
{ lib, config, pkgs, ... }:
{
options.cliTools.enable = lib.mkEnableOption "Enable CLI tools like fastfetch and hyfetch";
config = lib.mkIf config.cliTools.enable {
home.packages = with pkgs; [
fastfetch
hyfetch
bat
fzf
tree
lsd
tmux
];
};
}

View file

@ -1,14 +0,0 @@
# Import all modules so home.nix only needs to import this file
{ config, pkgs, lib, inputs, ... }: {
imports = [
####################
# 🧰 CLI Tools #
####################
./cli-tools/default.nix
####################
# 🐚 Zsh Shell #
####################
./zsh/default.nix
];
}

View file

@ -1,43 +0,0 @@
{
config,
pkgs,
lib,
...
}:
with lib; {
programs.zsh = {
enable = true;
enableCompletion = true;
plugins = [
{
name = "zsh-autosuggestions";
src = pkgs.zsh-autosuggestions;
}
{
name = "zsh-syntax-highlighting";
src = pkgs.zsh-syntax-highlighting;
}
];
initContent = ''
hyfetch
alias ls='lsd'
alias l='ls -l'
alias la='ls -a'
alias lla='ls -la'
alias lt='ls --tree'
HISTFILE=~/.zsh_history;
HISTSIZE=10000;
SAVEHIST=10000;
setopt appendhistory;
'';
};
home.packages = with pkgs; [
zsh-autosuggestions
zsh-syntax-highlighting
];
}

View file

@ -1,16 +0,0 @@
# Import all modules so home.nix only needs to import this file
{ config, pkgs, lib, inputs, ... }: {
imports = [
#################
# 🖥 GUI Software #
#################
./GUI-Apps
#################
# 🐚 Shell Setup #
#################
./Shell
];
}

View file

@ -1,10 +0,0 @@
[Desktop Entry]
Version=1.0
Type=Application
Name=Brave
GenericName=Web Browser
Comment=Browse the Web
Exec=brave
Icon=world
Terminal=false
Categories=Network;WebBrowser;

View file

@ -1,11 +0,0 @@
[Desktop Entry]
Version=1.0
Type=Application
Name=Signal
Comment=Private Messenger
Exec=signal-desktop %U
Icon=signal-desktop
Terminal=false
Categories=Network;InstantMessaging;

View file

@ -1,10 +0,0 @@
[Desktop Entry]
Version=1.0
Type=Application
Name=Obsidian
Comment=Markdown Editor
Exec=obsidian %u
Icon=obsidian
Terminal=false
Categories=Office;Utility;

View file

@ -1,10 +0,0 @@
[Desktop Entry]
Version=1.0
Type=Application
Name=Spotify
Comment=Spotify Music
Exec=spotify %U
Icon=spotify
Terminal=false
Categories=AudioVideo;Player;

View file

@ -1,197 +0,0 @@
<?xml version="1.1" encoding="UTF-8"?>
<channel name="xfce4-keyboard-shortcuts" version="1.0">
<property name="commands" type="empty">
<property name="default" type="empty">
<property name="&lt;Alt&gt;F1" type="empty"/>
<property name="&lt;Alt&gt;F2" type="empty">
<property name="startup-notify" type="empty"/>
</property>
<property name="&lt;Alt&gt;F3" type="empty">
<property name="startup-notify" type="empty"/>
</property>
<property name="&lt;Primary&gt;&lt;Alt&gt;Delete" type="empty"/>
<property name="&lt;Primary&gt;&lt;Alt&gt;l" type="empty"/>
<property name="&lt;Primary&gt;&lt;Alt&gt;t" type="empty"/>
<property name="XF86Display" type="empty"/>
<property name="&lt;Super&gt;p" type="empty"/>
<property name="&lt;Primary&gt;Escape" type="empty"/>
<property name="XF86WWW" type="empty"/>
<property name="HomePage" type="empty"/>
<property name="XF86Mail" type="empty"/>
<property name="Print" type="empty"/>
<property name="&lt;Alt&gt;Print" type="empty"/>
<property name="&lt;Shift&gt;Print" type="empty"/>
<property name="&lt;Super&gt;e" type="empty"/>
<property name="&lt;Primary&gt;&lt;Alt&gt;f" type="empty"/>
<property name="&lt;Primary&gt;&lt;Alt&gt;Escape" type="empty"/>
<property name="&lt;Primary&gt;&lt;Shift&gt;Escape" type="empty"/>
<property name="&lt;Super&gt;r" type="empty">
<property name="startup-notify" type="empty"/>
</property>
<property name="&lt;Alt&gt;&lt;Super&gt;s" type="empty"/>
</property>
<property name="custom" type="empty">
<property name="&lt;Alt&gt;F2" type="string" value="xfce4-appfinder --collapsed">
<property name="startup-notify" type="bool" value="true"/>
</property>
<property name="&lt;Alt&gt;Print" type="string" value="xfce4-screenshooter -w"/>
<property name="&lt;Super&gt;r" type="string" value="xfce4-appfinder -c">
<property name="startup-notify" type="bool" value="true"/>
</property>
<property name="XF86WWW" type="string" value="exo-open --launch WebBrowser"/>
<property name="XF86Mail" type="string" value="exo-open --launch MailReader"/>
<property name="&lt;Alt&gt;F3" type="string" value="xfce4-appfinder">
<property name="startup-notify" type="bool" value="true"/>
</property>
<property name="Print" type="string" value="xfce4-screenshooter"/>
<property name="&lt;Primary&gt;Escape" type="string" value="xfdesktop --menu"/>
<property name="&lt;Shift&gt;Print" type="string" value="xfce4-screenshooter -r"/>
<property name="&lt;Primary&gt;&lt;Alt&gt;Delete" type="string" value="xfce4-session-logout"/>
<property name="&lt;Alt&gt;&lt;Super&gt;s" type="string" value="orca"/>
<property name="&lt;Primary&gt;&lt;Alt&gt;t" type="string" value="exo-open --launch TerminalEmulator"/>
<property name="&lt;Primary&gt;&lt;Alt&gt;f" type="string" value="thunar"/>
<property name="&lt;Primary&gt;&lt;Alt&gt;l" type="string" value="xflock4"/>
<property name="&lt;Super&gt;l" type="string" value="xflock4"/>
<property name="&lt;Alt&gt;F1" type="string" value="xfce4-popup-applicationsmenu"/>
<property name="&lt;Super&gt;p" type="string" value="xfce4-display-settings --minimal"/>
<property name="&lt;Primary&gt;&lt;Shift&gt;Escape" type="string" value="xfce4-taskmanager"/>
<property name="&lt;Super&gt;e" type="string" value="thunar"/>
<property name="&lt;Primary&gt;&lt;Alt&gt;Escape" type="string" value="xkill"/>
<property name="HomePage" type="string" value="exo-open --launch WebBrowser"/>
<property name="XF86Display" type="string" value="xfce4-display-settings --minimal"/>
<property name="override" type="bool" value="true"/>
</property>
</property>
<property name="xfwm4" type="empty">
<property name="default" type="empty">
<property name="&lt;Alt&gt;Insert" type="empty"/>
<property name="Escape" type="empty"/>
<property name="Left" type="empty"/>
<property name="Right" type="empty"/>
<property name="Up" type="empty"/>
<property name="Down" type="empty"/>
<property name="&lt;Alt&gt;Tab" type="empty"/>
<property name="&lt;Alt&gt;&lt;Shift&gt;Tab" type="empty"/>
<property name="&lt;Alt&gt;Delete" type="empty"/>
<property name="&lt;Primary&gt;&lt;Alt&gt;Down" type="empty"/>
<property name="&lt;Primary&gt;&lt;Alt&gt;Left" type="empty"/>
<property name="&lt;Shift&gt;&lt;Alt&gt;Page_Down" type="empty"/>
<property name="&lt;Alt&gt;F4" type="empty"/>
<property name="&lt;Alt&gt;F6" type="empty"/>
<property name="&lt;Alt&gt;F7" type="empty"/>
<property name="&lt;Alt&gt;F8" type="empty"/>
<property name="&lt;Alt&gt;F9" type="empty"/>
<property name="&lt;Alt&gt;F10" type="empty"/>
<property name="&lt;Alt&gt;F11" type="empty"/>
<property name="&lt;Alt&gt;F12" type="empty"/>
<property name="&lt;Primary&gt;&lt;Shift&gt;&lt;Alt&gt;Left" type="empty"/>
<property name="&lt;Primary&gt;&lt;Alt&gt;End" type="empty"/>
<property name="&lt;Primary&gt;&lt;Alt&gt;Home" type="empty"/>
<property name="&lt;Primary&gt;&lt;Shift&gt;&lt;Alt&gt;Right" type="empty"/>
<property name="&lt;Primary&gt;&lt;Shift&gt;&lt;Alt&gt;Up" type="empty"/>
<property name="&lt;Primary&gt;&lt;Alt&gt;KP_1" type="empty"/>
<property name="&lt;Primary&gt;&lt;Alt&gt;KP_2" type="empty"/>
<property name="&lt;Primary&gt;&lt;Alt&gt;KP_3" type="empty"/>
<property name="&lt;Primary&gt;&lt;Alt&gt;KP_4" type="empty"/>
<property name="&lt;Primary&gt;&lt;Alt&gt;KP_5" type="empty"/>
<property name="&lt;Primary&gt;&lt;Alt&gt;KP_6" type="empty"/>
<property name="&lt;Primary&gt;&lt;Alt&gt;KP_7" type="empty"/>
<property name="&lt;Primary&gt;&lt;Alt&gt;KP_8" type="empty"/>
<property name="&lt;Primary&gt;&lt;Alt&gt;KP_9" type="empty"/>
<property name="&lt;Alt&gt;space" type="empty"/>
<property name="&lt;Shift&gt;&lt;Alt&gt;Page_Up" type="empty"/>
<property name="&lt;Primary&gt;&lt;Alt&gt;Right" type="empty"/>
<property name="&lt;Primary&gt;&lt;Alt&gt;d" type="empty"/>
<property name="&lt;Primary&gt;&lt;Alt&gt;Up" type="empty"/>
<property name="&lt;Super&gt;Tab" type="xfce4-popup-applicationsmenu"/>
<property name="&lt;Primary&gt;F1" type="empty"/>
<property name="&lt;Primary&gt;F2" type="empty"/>
<property name="&lt;Primary&gt;F3" type="empty"/>
<property name="&lt;Primary&gt;F4" type="empty"/>
<property name="&lt;Primary&gt;F5" type="empty"/>
<property name="&lt;Primary&gt;F6" type="empty"/>
<property name="&lt;Primary&gt;F7" type="empty"/>
<property name="&lt;Primary&gt;F8" type="empty"/>
<property name="&lt;Primary&gt;F9" type="empty"/>
<property name="&lt;Primary&gt;F10" type="empty"/>
<property name="&lt;Primary&gt;F11" type="empty"/>
<property name="&lt;Primary&gt;F12" type="empty"/>
<property name="&lt;Super&gt;KP_Left" type="empty"/>
<property name="&lt;Super&gt;KP_Right" type="empty"/>
<property name="&lt;Super&gt;KP_Down" type="empty"/>
<property name="&lt;Super&gt;KP_Up" type="empty"/>
<property name="&lt;Super&gt;KP_Page_Up" type="empty"/>
<property name="&lt;Super&gt;KP_Home" type="empty"/>
<property name="&lt;Super&gt;KP_End" type="empty"/>
<property name="&lt;Super&gt;KP_Next" type="empty"/>
</property>
<property name="custom" type="empty">
<property name="&lt;Primary&gt;F12" type="string" value="workspace_12_key"/>
<property name="&lt;Super&gt;KP_Down" type="string" value="tile_down_key"/>
<property name="&lt;Alt&gt;F4" type="string" value="close_window_key"/>
<property name="&lt;Primary&gt;&lt;Alt&gt;KP_3" type="string" value="move_window_workspace_3_key"/>
<property name="&lt;Primary&gt;F2" type="string" value="workspace_2_key"/>
<property name="&lt;Primary&gt;F6" type="string" value="workspace_6_key"/>
<property name="&lt;Primary&gt;&lt;Alt&gt;Down" type="string" value="down_workspace_key"/>
<property name="&lt;Primary&gt;&lt;Alt&gt;KP_9" type="string" value="move_window_workspace_9_key"/>
<property name="&lt;Super&gt;KP_Up" type="string" value="tile_up_key"/>
<property name="&lt;Primary&gt;&lt;Alt&gt;End" type="string" value="move_window_next_workspace_key"/>
<property name="&lt;Primary&gt;F8" type="string" value="workspace_8_key"/>
<property name="&lt;Primary&gt;&lt;Shift&gt;&lt;Alt&gt;Left" type="string" value="move_window_left_key"/>
<property name="&lt;Super&gt;KP_Right" type="string" value="tile_right_key"/>
<property name="&lt;Primary&gt;&lt;Alt&gt;KP_4" type="string" value="move_window_workspace_4_key"/>
<property name="Right" type="string" value="right_key"/>
<property name="Down" type="string" value="down_key"/>
<property name="&lt;Primary&gt;F3" type="string" value="workspace_3_key"/>
<property name="&lt;Shift&gt;&lt;Alt&gt;Page_Down" type="string" value="lower_window_key"/>
<property name="&lt;Primary&gt;F9" type="string" value="workspace_9_key"/>
<property name="&lt;Alt&gt;Tab" type="string" value="cycle_windows_key"/>
<property name="&lt;Primary&gt;&lt;Shift&gt;&lt;Alt&gt;Right" type="string" value="move_window_right_key"/>
<property name="&lt;Primary&gt;&lt;Alt&gt;Right" type="string" value="right_workspace_key"/>
<property name="&lt;Alt&gt;F6" type="string" value="stick_window_key"/>
<property name="&lt;Primary&gt;&lt;Alt&gt;KP_5" type="string" value="move_window_workspace_5_key"/>
<property name="&lt;Primary&gt;F11" type="string" value="workspace_11_key"/>
<property name="&lt;Alt&gt;F10" type="string" value="maximize_window_key"/>
<property name="&lt;Alt&gt;Delete" type="string" value="del_workspace_key"/>
<property name="&lt;Super&gt;Tab" type="string" value="switch_window_key"/>
<property name="&lt;Primary&gt;&lt;Alt&gt;d" type="string" value="show_desktop_key"/>
<property name="&lt;Primary&gt;F4" type="string" value="workspace_4_key"/>
<property name="&lt;Super&gt;KP_Page_Up" type="string" value="tile_up_right_key"/>
<property name="&lt;Alt&gt;F7" type="string" value="move_window_key"/>
<property name="Up" type="string" value="up_key"/>
<property name="&lt;Primary&gt;&lt;Alt&gt;KP_6" type="string" value="move_window_workspace_6_key"/>
<property name="&lt;Alt&gt;F11" type="string" value="fullscreen_key"/>
<property name="&lt;Alt&gt;space" type="string" value="popup_menu_key"/>
<property name="&lt;Super&gt;KP_Home" type="string" value="tile_up_left_key"/>
<property name="Escape" type="string" value="cancel_key"/>
<property name="&lt;Primary&gt;&lt;Alt&gt;KP_1" type="string" value="move_window_workspace_1_key"/>
<property name="&lt;Super&gt;KP_Next" type="string" value="tile_down_right_key"/>
<property name="&lt;Super&gt;KP_Left" type="string" value="tile_left_key"/>
<property name="&lt;Shift&gt;&lt;Alt&gt;Page_Up" type="string" value="raise_window_key"/>
<property name="&lt;Primary&gt;&lt;Alt&gt;Home" type="string" value="move_window_prev_workspace_key"/>
<property name="&lt;Alt&gt;&lt;Shift&gt;Tab" type="string" value="cycle_reverse_windows_key"/>
<property name="&lt;Primary&gt;&lt;Alt&gt;Left" type="string" value="left_workspace_key"/>
<property name="&lt;Alt&gt;F12" type="string" value="above_key"/>
<property name="&lt;Primary&gt;&lt;Shift&gt;&lt;Alt&gt;Up" type="string" value="move_window_up_key"/>
<property name="&lt;Primary&gt;F5" type="string" value="workspace_5_key"/>
<property name="&lt;Alt&gt;F8" type="string" value="resize_window_key"/>
<property name="&lt;Primary&gt;&lt;Alt&gt;KP_7" type="string" value="move_window_workspace_7_key"/>
<property name="&lt;Primary&gt;&lt;Alt&gt;KP_2" type="string" value="move_window_workspace_2_key"/>
<property name="&lt;Super&gt;KP_End" type="string" value="tile_down_left_key"/>
<property name="&lt;Primary&gt;&lt;Alt&gt;Up" type="string" value="up_workspace_key"/>
<property name="&lt;Alt&gt;F9" type="string" value="hide_window_key"/>
<property name="&lt;Primary&gt;F7" type="string" value="workspace_7_key"/>
<property name="&lt;Primary&gt;F10" type="string" value="workspace_10_key"/>
<property name="Left" type="string" value="left_key"/>
<property name="&lt;Primary&gt;&lt;Alt&gt;KP_8" type="string" value="move_window_workspace_8_key"/>
<property name="&lt;Alt&gt;Insert" type="string" value="add_workspace_key"/>
<property name="&lt;Primary&gt;F1" type="string" value="workspace_1_key"/>
<property name="override" type="bool" value="true"/>
</property>
</property>
<property name="providers" type="array">
<value type="string" value="xfwm4"/>
<value type="string" value="commands"/>
</property>
</channel>

View file

@ -1,81 +0,0 @@
<?xml version="1.1" encoding="UTF-8"?>
<channel name="xfce4-panel" version="1.0">
<property name="configver" type="int" value="2"/>
<property name="panels" type="array">
<value type="int" value="1"/>
<property name="dark-mode" type="bool" value="true"/>
<property name="panel-1" type="empty">
<property name="position" type="string" value="p=8;x=1368;y=1810"/>
<property name="length" type="double" value="100"/>
<property name="position-locked" type="bool" value="true"/>
<property name="icon-size" type="uint" value="0"/>
<property name="size" type="uint" value="36"/>
<property name="plugin-ids" type="array">
<value type="int" value="1"/>
<value type="int" value="13"/>
<value type="int" value="14"/>
<value type="int" value="15"/>
<value type="int" value="16"/>
<value type="int" value="2"/>
<value type="int" value="5"/>
<value type="int" value="6"/>
<value type="int" value="8"/>
<value type="int" value="10"/>
</property>
<property name="mode" type="uint" value="0"/>
<property name="background-style" type="uint" value="0"/>
</property>
</property>
<property name="plugins" type="empty">
<property name="plugin-1" type="string" value="whiskermenu">
<property name="button-icon" type="string" value="whisker-menu-button"/>
<property name="recent" type="array">
<value type="string" value="codium.desktop"/>
</property>
</property>
<property name="plugin-2" type="string" value="tasklist">
<property name="grouping" type="uint" value="1"/>
</property>
<property name="plugin-6" type="string" value="systray">
<property name="square-icons" type="bool" value="true"/>
<property name="known-legacy-items" type="array">
<value type="string" value="networkmanager applet"/>
</property>
</property>
<property name="plugin-8" type="string" value="clock">
<property name="mode" type="uint" value="2"/>
<property name="digital-layout" type="uint" value="3"/>
<property name="digital-time-font" type="string" value="Sans 12"/>
</property>
<property name="plugin-10" type="string" value="actions"/>
<property name="plugin-13" type="string" value="launcher">
<property name="show-label" type="bool" value="false"/>
<property name="items" type="array">
<value type="string" value="brave.desktop"/>
</property>
</property>
<property name="plugin-14" type="string" value="launcher">
<property name="show-label" type="bool" value="false"/>
<property name="items" type="array">
<value type="string" value="signal.desktop"/>
</property>
</property>
<property name="plugin-15" type="string" value="launcher">
<property name="show-label" type="bool" value="false"/>
<property name="items" type="array">
<value type="string" value="obsidian.desktop"/>
</property>
</property>
<property name="plugin-16" type="string" value="launcher">
<property name="show-label" type="bool" value="false"/>
<property name="items" type="array">
<value type="string" value="spotify.desktop"/>
</property>
</property>
<property name="plugin-5" type="string" value="separator">
<property name="expand" type="bool" value="true"/>
<property name="style" type="uint" value="0"/>
</property>
</property>
</channel>

View file

@ -1,6 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<channel name="xfce4-session" version="1.0">
<property name="General">
<property name="SaveOnExit" type="bool" value="false"/>
</property>
</channel>

View file

@ -1,91 +0,0 @@
<?xml version="1.1" encoding="UTF-8"?>
<channel name="xfwm4" version="1.0">
<property name="general" type="empty">
<property name="activate_action" type="string" value="bring"/>
<property name="borderless_maximize" type="bool" value="true"/>
<property name="box_move" type="bool" value="false"/>
<property name="box_resize" type="bool" value="false"/>
<property name="button_layout" type="string" value="O|SHMC"/>
<property name="button_offset" type="int" value="0"/>
<property name="button_spacing" type="int" value="0"/>
<property name="click_to_focus" type="bool" value="true"/>
<property name="cycle_apps_only" type="bool" value="false"/>
<property name="cycle_draw_frame" type="bool" value="true"/>
<property name="cycle_raise" type="bool" value="false"/>
<property name="cycle_hidden" type="bool" value="true"/>
<property name="cycle_minimum" type="bool" value="true"/>
<property name="cycle_minimized" type="bool" value="false"/>
<property name="cycle_preview" type="bool" value="true"/>
<property name="cycle_tabwin_mode" type="int" value="0"/>
<property name="cycle_workspaces" type="bool" value="false"/>
<property name="double_click_action" type="string" value="maximize"/>
<property name="double_click_distance" type="int" value="5"/>
<property name="double_click_time" type="int" value="250"/>
<property name="easy_click" type="string" value="Alt"/>
<property name="focus_delay" type="int" value="250"/>
<property name="focus_hint" type="bool" value="true"/>
<property name="focus_new" type="bool" value="true"/>
<property name="frame_opacity" type="int" value="100"/>
<property name="frame_border_top" type="int" value="0"/>
<property name="full_width_title" type="bool" value="true"/>
<property name="horiz_scroll_opacity" type="bool" value="false"/>
<property name="inactive_opacity" type="int" value="100"/>
<property name="maximized_offset" type="int" value="0"/>
<property name="mousewheel_rollup" type="bool" value="true"/>
<property name="move_opacity" type="int" value="100"/>
<property name="placement_mode" type="string" value="center"/>
<property name="placement_ratio" type="int" value="20"/>
<property name="popup_opacity" type="int" value="100"/>
<property name="prevent_focus_stealing" type="bool" value="false"/>
<property name="raise_delay" type="int" value="250"/>
<property name="raise_on_click" type="bool" value="true"/>
<property name="raise_on_focus" type="bool" value="false"/>
<property name="raise_with_any_button" type="bool" value="true"/>
<property name="repeat_urgent_blink" type="bool" value="false"/>
<property name="resize_opacity" type="int" value="100"/>
<property name="scroll_workspaces" type="bool" value="true"/>
<property name="shadow_delta_height" type="int" value="0"/>
<property name="shadow_delta_width" type="int" value="0"/>
<property name="shadow_delta_x" type="int" value="0"/>
<property name="shadow_delta_y" type="int" value="-3"/>
<property name="shadow_opacity" type="int" value="50"/>
<property name="show_app_icon" type="bool" value="false"/>
<property name="show_dock_shadow" type="bool" value="true"/>
<property name="show_frame_shadow" type="bool" value="true"/>
<property name="show_popup_shadow" type="bool" value="false"/>
<property name="snap_resist" type="bool" value="false"/>
<property name="snap_to_border" type="bool" value="true"/>
<property name="snap_to_windows" type="bool" value="false"/>
<property name="snap_width" type="int" value="10"/>
<property name="vblank_mode" type="string" value="auto"/>
<property name="theme" type="string" value="Default"/>
<property name="tile_on_move" type="bool" value="true"/>
<property name="title_alignment" type="string" value="center"/>
<property name="title_font" type="string" value="Sans Bold 9"/>
<property name="title_horizontal_offset" type="int" value="0"/>
<property name="titleless_maximize" type="bool" value="false"/>
<property name="title_shadow_active" type="string" value="false"/>
<property name="title_shadow_inactive" type="string" value="false"/>
<property name="title_vertical_offset_active" type="int" value="0"/>
<property name="title_vertical_offset_inactive" type="int" value="0"/>
<property name="toggle_workspaces" type="bool" value="false"/>
<property name="unredirect_overlays" type="bool" value="true"/>
<property name="urgent_blink" type="bool" value="false"/>
<property name="use_compositing" type="bool" value="true"/>
<property name="workspace_count" type="int" value="4"/>
<property name="wrap_cycle" type="bool" value="true"/>
<property name="wrap_layout" type="bool" value="true"/>
<property name="wrap_resistance" type="int" value="10"/>
<property name="wrap_windows" type="bool" value="true"/>
<property name="wrap_workspaces" type="bool" value="false"/>
<property name="zoom_desktop" type="bool" value="true"/>
<property name="zoom_pointer" type="bool" value="true"/>
<property name="workspace_names" type="array">
<value type="string" value="Workspace 1"/>
<value type="string" value="Workspace 2"/>
<value type="string" value="Workspace 3"/>
<value type="string" value="Workspace 4"/>
</property>
</property>
</channel>

View file

@ -1,45 +0,0 @@
<?xml version="1.1" encoding="UTF-8"?>
<channel name="xsettings" version="1.0">
<property name="Net" type="empty">
<property name="ThemeName" type="string" value="Chicago95"/>
<property name="IconThemeName" type="string" value="Chicago95"/>
<property name="DoubleClickTime" type="empty"/>
<property name="DoubleClickDistance" type="empty"/>
<property name="DndDragThreshold" type="empty"/>
<property name="CursorBlink" type="empty"/>
<property name="CursorBlinkTime" type="empty"/>
<property name="SoundThemeName" type="empty"/>
<property name="EnableEventSounds" type="empty"/>
<property name="EnableInputFeedbackSounds" type="empty"/>
</property>
<property name="Xft" type="empty">
<property name="DPI" type="int" value="100"/>
<property name="Antialias" type="empty"/>
<property name="Hinting" type="empty"/>
<property name="HintStyle" type="empty"/>
<property name="RGBA" type="empty"/>
</property>
<property name="Gtk" type="empty">
<property name="CanChangeAccels" type="empty"/>
<property name="ColorPalette" type="empty"/>
<property name="FontName" type="empty"/>
<property name="MonospaceFontName" type="empty"/>
<property name="IconSizes" type="empty"/>
<property name="KeyThemeName" type="empty"/>
<property name="MenuImages" type="empty"/>
<property name="ButtonImages" type="empty"/>
<property name="MenuBarAccel" type="empty"/>
<property name="CursorThemeName" type="string" value="Chicago95"/>
<property name="CursorThemeSize" type="empty"/>
<property name="DecorationLayout" type="string" value="icon,menu:minimize,maximize,close"/>
<property name="DialogsUseHeader" type="empty"/>
<property name="TitlebarMiddleClick" type="empty"/>
</property>
<property name="Gdk" type="empty">
<property name="WindowScalingFactor" type="empty"/>
</property>
<property name="Xfce" type="empty">
<property name="LastCustomDPI" type="int" value="100"/>
</property>
</channel>

View file

@ -1,79 +0,0 @@
{
config,
pkgs,
lib,
...
}: let
chicago95 = pkgs.callPackage ../../../Ressources/Themes/Chicago95/chicago95.nix {};
dotfilesPath = ./Dotfiles;
resourcesPath = ../../../Ressources;
wallpaperFile = "Wallpaper/NixOS-95-wallpaper.png";
wallpaperPath = "${config.home.homeDirectory}/${wallpaperFile}";
wallpaperOrigin = "${resourcesPath}/Images/Wallpapers/Wallpaper-1.png";
dotfiles = "${dotfilesPath}";
in {
gtk = {
enable = true;
theme = {
name = "Chicago95";
package = chicago95;
};
iconTheme = {
name = "Win95_plus";
package = pkgs.callPackage ../../../Ressources/Themes/Win95_plus/win95_plus.nix {};
};
cursorTheme = {
name = "Chicago95";
package = chicago95;
};
font = {
name = "Sans";
size = 12;
};
};
home.pointerCursor = {
name = "Chicago95";
package = chicago95;
size = 24;
gtk.enable = true;
x11.enable = true;
};
home.packages = with pkgs; [
xfce.xfce4-panel
xfce.xfconf
xfce.xfdesktop
xfce.xfce4-whiskermenu-plugin
xfce.xfce4-docklike-plugin
xorg.xrandr
];
home.file = {
"${wallpaperFile}" = {
source = wallpaperOrigin;
};
};
xdg.configFile = {
"xfce4/xfconf/xfce-perchannel-xml/xfce4-desktop.xml".source = "${dotfiles}/xfce4-desktop.xml";
"xfce4/xfconf/xfce-perchannel-xml/xfce4-sessions.xml".source = "${dotfiles}/xfce4-sessions.xml";
"xfce4/xfconf/xfce-perchannel-xml/xsettings.xml".source = "${dotfiles}/xsettings.xml";
"xfce4/xfconf/xfce-perchannel-xml/xfwm4.xml".source = "${dotfiles}/xfwm4.xml";
"xfce4/xfconf/xfce-perchannel-xml/xfce4-keyboard-shortcuts.xml".source = "${dotfiles}/xfce4-keyboard-shortcuts.xml";
# Panel:
"xfce4/xfconf/xfce-perchannel-xml/xfce4-panel.xml".source = "${dotfiles}/xfce4-panel.xml";
"xfce4/panel/launcher-13/brave.desktop".source = "${dotfiles}/launcher-13/brave.desktop";
"xfce4/panel/launcher-14/signal.desktop".source = "${dotfiles}/launcher-14/signal.desktop";
"xfce4/panel/launcher-15/obsidian.desktop".source = "${dotfiles}/launcher-15/obsidian.desktop";
"xfce4/panel/launcher-16/spotify.desktop".source = "${dotfiles}/launcher-16/spotify.desktop";
};
home.activation.applyXfceTweaks = lib.hm.dag.entryAfter ["writeBoundary"] ''
${pkgs.xfce.xfdesktop}/bin/xfdesktop --reload
'';
}

View file

@ -1,58 +0,0 @@
{
config,
pkgs,
lib,
host,
...
}: {
# Enable Bluetooth
hardware.bluetooth.enable = true; # enables support for Bluetooth
hardware.bluetooth.powerOnBoot = true; # powers up the default Bluetooth controller on boot
# Enable firmware (Intel AX200 needs firmware files from linux-firmware)
hardware.enableAllFirmware = true;
hardware.firmware = [ pkgs.linux-firmware ];
#error: The option `dconf' does not exist. Definition values:
programs.dconf.enable = true;
networking = {
networkmanager.enable = true;
hostName = host;
};
time.timeZone = "Europe/Berlin";
i18n.defaultLocale = "en_GB.UTF-8";
i18n.extraLocaleSettings = {
LC_ADDRESS = "de_DE.UTF-8";
LC_IDENTIFICATION = "de_DE.UTF-8";
LC_MEASUREMENT = "de_DE.UTF-8";
LC_MONETARY = "de_DE.UTF-8";
LC_NAME = "de_DE.UTF-8";
LC_NUMERIC = "de_DE.UTF-8";
LC_PAPER = "de_DE.UTF-8";
LC_TELEPHONE = "de_DE.UTF-8";
LC_TIME = "de_DE.UTF-8";
};
nix.settings.experimental-features = ["nix-command" "flakes"];
nixpkgs.config.allowUnfree = true;
console.keyMap = "de";
services.printing.enable = true;
# Sound and pipewire
services.pulseaudio.enable = false;
security.rtkit.enable = true;
services.pipewire = {
enable = true;
alsa.enable = true;
alsa.support32Bit = true;
pulse.enable = true;
};
}

View file

@ -1,10 +0,0 @@
# Import all modules so configuration.nix only needs to import this file
{ config, pkgs, lib, inputs, username, ... }: {
imports = [
##############
# ⚙️ Defaults #
##############
./common.nix
];
}

178
README.md
View file

@ -25,26 +25,17 @@ This is a **NixOS configuration** designed to evoke the pixel-perfect charm of *
NixOS-95/
├── flake.nix
├── flake.lock
├── Configurations/
│ └── Hosts/
│ └── Default/
│ ├── configuration.nix
│ ├── hardware-configuration.nix
│ ├── user.nix
│ ├── home/
│ │ ├── home.nix
│ │ ├── desktop.nix
│ │ └── user-packages.nix
│ └── variables/
│ ├── system-vars.nix
│ └── user-vars.nix
├── Modules/
│ ├── Applications/
│ ├── Desktops/
│ │ └── XFCE-retro/
│ │ ├── default.nix
│ │ └── Dotfiles/
│ └── System/
├── nixos95
│   ├── dotfiles/
│   ├── core.nix
│   ├── default.nix
│   ├── desktop.nix
│   ├── keybinds.nix
│   ├── taskbar.nix
│   └── theme.nix
├── Ressources/
│ ├── Icons/
│ ├── Images/
@ -56,44 +47,143 @@ NixOS-95/
</details>
---
## Installation - BETA
### Wallpaper and Aesthetics
> Requirements:
nix.settings.experimental-features = ["nix-command" "flakes" "pipe-operators"];
Enabled
Wallpapers are located in `./Resources/Images/Wallpapers`.
Some have been lightly edited. Originals were created by [aconfuseddragon](https://aconfuseddragon.itch.io/downloads).
> I **do not own** any of the icons or wallpapers.
> If you showcase or redistribute them, **please credit the original artists**.
---
## Installation
> Requires a NixOS install.
1. **Clone the repository**:
```bash
git clone https://github.com/peritia-system/NixOS-95.git NixOS
cd NixOS
You can initilize a new flake-based configuration with:
```
# minimal
nix flake init -t github:Peritia-System/NixOS-95/Dev
# with home-manager
nix flake init -t github:Peritia-System/NixOS-95/Dev#home-manager
```
2. **Regenerate hardware configuration**:
Or follow the manual installation process:
```bash
sudo nixos-generate-config --dir Configurations/Hosts/Default
### 1. Add Nixos95 to your flake and import the module
```nix
# flake.nix
{
inputs = {
nixos95.url = "github:Peritia-System/NixOS-95/Dev";
nixos95.inputs.nixpkgs.follows = "nixpkgs";
}
outputs = inputs @ { nixos95, ... }: {
nixosConfigurations.HOSTNAME = nixpkgs.lib.nixosSystem {
modules = [
nixos95.nixosModules.default
./configuration.nix
];
};
};
}
```
3. **Build and switch to the system configuration**:
```bash
sudo nixos-rebuild switch --flake .#default
If you are using home-manager you should also pin your version for Nixos95:
```
{
inputs = {
...
nixos95.inputs.home-manager.follows = "home-manager";
};
...
}
```
4. **Apply user settings with Home Manager**:
### 2. Import in Configuration.nix
You can configure Nixos95 under the `nixos95` namespace. For a minimal config just set:
```
{
nixos95.enable = true;
}
```
> Warning: This will activate the xfce desktop manager, as well as lightdm and ssdm as display manager.
> You might want to disable your other desktop environment to prevent bugs.
If you want to further customize Nixos95 you can use the following config options (given values are the default ones):
```nix
{
nixos95 = {
enable = true; # default is false
user = "USERNAME"; # no default set; specifies the user used by home-manager
wallpaper = ./Resources/Images/Wallpapers/Wallpaper-1.png;
taskbar = {
homeIcon = "whisker-menu-button";
battery-plugin = {
enable = true;
power_bar = {
enabe = true;
critical_at = 10;
warning_at = 20;
color_warning = "rgb(248,228,92)";
color_critical = "rgb(237,51,59)";
color_loading = "rgb(119,118,123)";
color_default = "rgb(143,240,164)";
};
};
};
applications = [
{
name = "Files";
description = "View and manage local files";
icon = "folder_open";
exe = "exo-open --launch FileManager";
}
{
name = "Terminal";
description = "Run commands";
icon = "xfce4-terminal";
pkg = pkgs.xfce4-terminal;
}
{
name = "Browser";
description = "Access the world wide web";
icon = "firefox";
exe = "exo-open --launch WebBrowser";
}
];
keybinds = {
commands = [
{ key = "<Super>r"; exe = "xfce4-appfinder --collapsed"; }
{ key = "XF86WWW"; exe = "exo-open --launch WebBrowser"; }
{ key = "XF86Mail"; exe = "exo-open --launch MailReder"; }
{ key = "Print"; exe = "xfce4-screenshooter"; }
{ key="<Super>l"; exe="xflock4"; }
];
xfwm4 = [ ];
};
};
}
```
### 3. **Build and switch to the system configuration**:
```bash
home-manager switch
sudo NIX_CONFIG="experimental-features = nix-command flakes pipe-operators" nixos-rebuild switch --flake .#default
```
### Experimental Features
NixOS-95 relys on multiple experimental nix features. These are:
1. [flakes](https://wiki.nixos.org/wiki/Flakes)
2. [pipe-operators](https://nix.dev/manual/nix/2.26/language/operators#pipe-operators)
They are needed to activate the configuration.
To enable them in your config set:
```nix
nix.settings.experimental-features = [
"flakes" "pipe-operators"
];
```
### Rebuild Notes

19
Roadmap.md Normal file
View file

@ -0,0 +1,19 @@
# Upcoming
| Feature / Fix | Description | Done |
| ---------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---- |
| Fix Background | Currently the Background does not get set automatically | |
| Adjust the readme | encourage people to edit the standard config atleast slightly | |
| Generate nixo95 instead of a configuration.nix | Currently we are generating a configuration.nix. also encourage people to use their original one. Nixos95 is only supposed to have options that are nessecarry for nixos95 | |
| set default Taskbar location | Currently this has to be done via the settings menu | |
| add the volume meter to the Taskbar | Currently it will get overwritten each time | |
| add an Theme only install way | So that optionally you can just install the Theme and everything else will be set via menus (prevent overwriting) | |
| add Thunar Plugins | Rn this has to be manually added | |
| add Option to preinstall standard tools | Some free tools that are to be expected on a desktop (like a compression tool for example) | |
| set Standard Browser to Librewolf instead of Brave | Right now the Default example Browser is Brave | |
| Set Whisker-Favorites via an Option | this gets overwritten by Default and there is no way to set an option for it |
| Expose an Install ISO | you can write custom NixOS install ISO: [Guide](https://nixos.wiki/wiki/Creating_a_NixOS_live_CD) |
| Screenshotting Tool | Add the XFCE Screenshotter and set the Shortcuts similar to Snapshot (Super + Shift + S) - Screenshot Selected region; (Print) - Screenshot Screen |
| Add Clipboard Manager | Add the XFCE Screenshotter and set the Shortcuts similar to Snapshot (Super + Shift + S) - Screenshot Selected region; (Print) - Screenshot Screen |
| Add a tool to access remote Filesystems | add remote filesystems to thunar (possibility to do so) |

View file

@ -0,0 +1,63 @@
{ pkgs, ... }: {
system.stateVersion = "25.05";
nix.settings.experimental-features = [
"flakes" "nix-command" "pipe-operators"
];
nixos95 = {
enable = true;
user = "alice";
taskbar = {
homeIcon = "whisker-menu-button";
battery-plugin.enable = false;
applications = [
{
name = "Files";
description = "View and manage local files";
icon = "folder_open";
exe = "exo-open --launch FileManager";
}
{
name = "Firefox";
description = "Browse the Web";
pkg = pkgs.firefox;
icon = "world";
}
{
name = "Signal";
description = "Private Messenger";
pkg = pkgs.signal-desktop;
icon = "signal";
}
];
};
keybinds = {
commands = [
{ key="<Super>l"; exe="xflock4"; }
];
};
};
users.users.alice = {
isNormalUser = true;
initialPassword = "password";
home = "/home/alice";
createHome = true;
packages = [
pkgs.firefox
pkgs.neovim
pkgs.signal-desktop
];
};
networking.hostName = "nixos95";
networking.networkmanager.enable = true;
boot.loader.systemd-boot.enable = true;
boot.loader.efi.canTouchEfiVariables = true;
}

25
example/default/flake.nix Normal file
View file

@ -0,0 +1,25 @@
{
description = "Nixos95 example configuration";
inputs = {
nixpkgs.url = "github:nixos/nixpkgs?ref=nixos-unstable";
nixos95 = {
url = "github:Peritia-System/NixOS-95";
inputs.nixpkgs.follows = "nixpkgs";
};
};
outputs = { nixpkgs, nixos95, ... }: {
nixosConfigurations.default = nixpkgs.lib.nixosSystem {
system = "x84_64-linux";
modules = [
nixos95.nixosModules.default
./configuration.nix
./hardware-configuration.nix
];
};
};
}

View file

@ -0,0 +1,66 @@
{ pkgs, ... }: {
system.stateVersion = "25.05";
nix.settings.experimental-features = [
"flakes" "nix-command" "pipe-operators"
];
nixos95 = {
enable = true;
user = "alice";
taskbar = {
homeIcon = "whisker-menu-button";
battery-plugin.enable = false;
applications = [
{
name = "Files";
description = "View and manage local files";
icon = "folder_open";
exe = "exo-open --launch FileManager";
}
{
name = "Firefox";
description = "Browse the Web";
pkg = pkgs.firefox;
icon = "world";
}
{
name = "Signal";
description = "Private Messenger";
pkg = pkgs.signal-desktop;
icon = "signal";
}
];
};
keybinds = {
commands = [
{ key="<Super>l"; exe="xflock4"; }
];
};
};
networking.hostName = "nixos95";
users.users.alice = {
isNormalUser = true;
initialPassword = "password";
home = "/home/alice";
createHome = true;
};
home-manager.users.alice = {
programs.firefox.enable = true;
programs.neovim.enable = true;
home.packages = [
pkgs.signal-desktop
];
};
networking.networkmanager.enable = true;
boot.loader.systemd-boot.enable = true;
boot.loader.efi.canTouchEfiVariables = true;
}

View file

@ -0,0 +1,33 @@
{
description = "Nixos95 example configuration";
inputs = {
nixpkgs.url = "github:nixos/nixpkgs?ref=nixos-unstable";
home-manager = {
url = "github:nix-community/home-manager";
inputs.nixpkgs.follows = "nixpkgs";
};
nixos95 = {
url = "github:Peritia-System/NixOS-95";
inputs.nixpkgs.follows = "nixpkgs";
inputs.home-manager.follows = "home-manager";
};
};
outputs = { nixpkgs, nixos95, home-manager, ... }: {
nixosConfigurations.default = nixpkgs.lib.nixosSystem {
system = "x84_64-linux";
modules = [
nixos95.nixosModules.default
home-manager.nixosModules.home-manager
./configuration.nix
./hardware-configuration.nix
];
};
};
}

16
flake.lock generated
View file

@ -7,11 +7,11 @@
]
},
"locked": {
"lastModified": 1753294394,
"narHash": "sha256-1Dfgq09lHZ8AdYB2Deu/mYP1pMNpob8CgqT5Mzo44eI=",
"lastModified": 1768271922,
"narHash": "sha256-zmFw7AtcmfMxW3vR7AiGeQQeHhdrd2x7a3hxzd6vJYI=",
"owner": "nix-community",
"repo": "home-manager",
"rev": "1fde6fb1be6cd5dc513dc1c287d69e4eb2de973e",
"rev": "fbd566923adcfa67be512a14a79467e2ab8a5777",
"type": "github"
},
"original": {
@ -22,15 +22,15 @@
},
"nixpkgs": {
"locked": {
"lastModified": 1753250450,
"narHash": "sha256-i+CQV2rPmP8wHxj0aq4siYyohHwVlsh40kV89f3nw1s=",
"owner": "nixos",
"lastModified": 1768127708,
"narHash": "sha256-1Sm77VfZh3mU0F5OqKABNLWxOuDeHIlcFjsXeeiPazs=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "fc02ee70efb805d3b2865908a13ddd4474557ecf",
"rev": "ffbc9f8cbaacfb331b6017d5a5abb21a492c9a38",
"type": "github"
},
"original": {
"owner": "nixos",
"owner": "NixOS",
"ref": "nixos-unstable",
"repo": "nixpkgs",
"type": "github"

View file

@ -1,43 +1,40 @@
{
description = "NixOS-95";
description = "NixOS-95: To Style your NixOS to look like Windows95";
################################################################
# 🔗 Inputs
################################################################
inputs = {
# Core NixOS packages
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
# Home Manager
home-manager.url = "github:nix-community/home-manager";
home-manager.inputs.nixpkgs.follows = "nixpkgs";
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
home-manager = {
url = "github:nix-community/home-manager";
inputs.nixpkgs.follows = "nixpkgs";
};
};
################################################################
# 🚀 Outputs
################################################################
outputs = inputs @ {
self,
nixpkgs,
home-manager,
...
}: {
nixosConfigurations = {
############################################################
# 💻 Default Host
############################################################
default = nixpkgs.lib.nixosSystem {
system = "x86_64-linux";
specialArgs = {
inherit inputs self;
host = "default";
};
modules = [
./Configurations/Hosts/Default/configuration.nix
];
outputs = { self, nixpkgs, home-manager,... }: {
nixosModules.default = import ./nixos95 { inherit home-manager; };
templates.default = {
description = "Minimal Nixos-95 configuration";
path = ./example/default;
welcomeText = ''
# Welcome to Nixos95
Please run `ǹixos-generate-config --dir .` to generate hardware configuration.
> You can now continue with Step 3 in the README.md
'';
};
templates.home-manager = {
description = "Minimal Nixos-95 configuration with home-manager";
path = ./example/home-manager;
welcomeText = ''
# Welcome to Nixos95 (with home-manager)
Please run `nixos-generate-config --dir .` to generate harde configuration.
> You can now continue with Step 3 in the README.md
'';
};
};
}

29
nixos95/core.nix Normal file
View file

@ -0,0 +1,29 @@
{ config, lib, pkgs, ... }: let
cfg = config.nixos95;
in lib.mkIf cfg.enable {
home-manager.users.${cfg.user}.home.stateVersion = lib.mkDefault "25.05";
services.xserver = {
enable = true;
desktopManager.xfce.enable = true;
xkb = {
layout = "de";
variant = "";
};
};
services.xserver.displayManager.lightdm.enable = false;
services.displayManager.sddm = {
enable = true;
package = pkgs.qt6Packages.sddm;
};
xdg.portal.extraPortals = [ pkgs.xdg-desktop-portal-gtk ];
environment.systemPackages = [
pkgs.xfce4-screenshooter
];
}

26
nixos95/default.nix Normal file
View file

@ -0,0 +1,26 @@
{ home-manager }: { config, lib, ...}: let
cfg = config.nixos95;
in {
options.nixos95 = {
enable = lib.mkEnableOption "NixOS-95 Desktop environment";
user = lib.mkOption {
description = ''
Username of the home-manager user.
'';
type = lib.types.str;
example = "user";
};
};
imports = [
home-manager.nixosModules.home-manager
./core.nix
#./desktop.nix
./keybinds.nix
./taskbar.nix
./theme.nix
];
}

35
nixos95/desktop.nix Normal file
View file

@ -0,0 +1,35 @@
{ inputs, config, lib, pkgs, ... }: let
cfg = config.nixos95;
in {
options.nixos95 = {
wallpaper = lib.mkOption {
description = "The wallpaper to use";
type = lib.types.path;
default = ../Ressources/Images/Wallpapers/Wallpaper-1.png;
};
};
config = lib.mkIf cfg.enable {
home-manager.users.${cfg.user} = {
xdg.configFile = {
"xfce4/xfconf/xfce-perchannel-xml/xfce4-desktop.xml" = let
sed = lib.getExe pkgs.gnused;
desktop = pkgs.runCommand "desktop.xml" { } ''
${sed} -e "s|NIXOS-95_WALLPAPER|${cfg.wallpaper}|g" ${./dotfiles/xfce4-desktop.xml} > $out
'';
in {
force = true;
source = desktop;
};
};
};
};
}

View file

@ -5,13 +5,13 @@
<property name="backdrop" type="empty">
<property name="screen0" type="empty">
<property name="monitor0" type="empty">
<property name="image-path" type="string" value="/home/user/Wallpaper/NixOS-95-wallpaper.png"/>
<property name="image-path" type="string" value="NIXOS-95_WALLPAPER"/>
<property name="image-show" type="bool" value="true"/>
<property name="image-style" type="int" value="5"/>
</property>
<property name="monitoreDP-1" type="empty">
<property name="workspace0" type="empty">
<property name="last-image" type="string" value="/home/user/Wallpaper/NixOS-95-wallpaper.png"/>
<property name="last-image" type="string" value="NIXOS-95_WALLPAPER"/>
<property name="image-style" type="int" value="5"/>
</property>
</property>

View file

@ -0,0 +1,61 @@
<property name="&lt;Primary&gt;F12" type="string" value="workspace_12_key"/>
<property name="&lt;Super&gt;KP_Down" type="string" value="tile_down_key"/>
<property name="&lt;Alt&gt;F4" type="string" value="close_window_key"/>
<property name="&lt;Primary&gt;&lt;Alt&gt;KP_3" type="string" value="move_window_workspace_3_key"/>
<property name="&lt;Primary&gt;F2" type="string" value="workspace_2_key"/>
<property name="&lt;Primary&gt;F6" type="string" value="workspace_6_key"/>
<property name="&lt;Primary&gt;&lt;Alt&gt;Down" type="string" value="down_workspace_key"/>
<property name="&lt;Primary&gt;&lt;Alt&gt;KP_9" type="string" value="move_window_workspace_9_key"/>
<property name="&lt;Super&gt;KP_Up" type="string" value="tile_up_key"/>
<property name="&lt;Primary&gt;&lt;Alt&gt;End" type="string" value="move_window_next_workspace_key"/>
<property name="&lt;Primary&gt;F8" type="string" value="workspace_8_key"/>
<property name="&lt;Primary&gt;&lt;Shift&gt;&lt;Alt&gt;Left" type="string" value="move_window_left_key"/>
<property name="&lt;Super&gt;KP_Right" type="string" value="tile_right_key"/>
<property name="&lt;Primary&gt;&lt;Alt&gt;KP_4" type="string" value="move_window_workspace_4_key"/>
<property name="Right" type="string" value="right_key"/>
<property name="Down" type="string" value="down_key"/>
<property name="&lt;Primary&gt;F3" type="string" value="workspace_3_key"/>
<property name="&lt;Shift&gt;&lt;Alt&gt;Page_Down" type="string" value="lower_window_key"/>
<property name="&lt;Primary&gt;F9" type="string" value="workspace_9_key"/>
<property name="&lt;Alt&gt;Tab" type="string" value="cycle_windows_key"/>
<property name="&lt;Primary&gt;&lt;Shift&gt;&lt;Alt&gt;Right" type="string" value="move_window_right_key"/>
<property name="&lt;Primary&gt;&lt;Alt&gt;Right" type="string" value="right_workspace_key"/>
<property name="&lt;Alt&gt;F6" type="string" value="stick_window_key"/>
<property name="&lt;Primary&gt;&lt;Alt&gt;KP_5" type="string" value="move_window_workspace_5_key"/>
<property name="&lt;Primary&gt;F11" type="string" value="workspace_11_key"/>
<property name="&lt;Alt&gt;F10" type="string" value="maximize_window_key"/>
<property name="&lt;Alt&gt;Delete" type="string" value="del_workspace_key"/>
<property name="&lt;Super&gt;Tab" type="string" value="switch_window_key"/>
<property name="&lt;Primary&gt;&lt;Alt&gt;d" type="string" value="show_desktop_key"/>
<property name="&lt;Primary&gt;F4" type="string" value="workspace_4_key"/>
<property name="&lt;Super&gt;KP_Page_Up" type="string" value="tile_up_right_key"/>
<property name="&lt;Alt&gt;F7" type="string" value="move_window_key"/>
<property name="Up" type="string" value="up_key"/>
<property name="&lt;Primary&gt;&lt;Alt&gt;KP_6" type="string" value="move_window_workspace_6_key"/>
<property name="&lt;Alt&gt;F11" type="string" value="fullscreen_key"/>
<property name="&lt;Alt&gt;space" type="string" value="popup_menu_key"/>
<property name="&lt;Super&gt;KP_Home" type="string" value="tile_up_left_key"/>
<property name="Escape" type="string" value="cancel_key"/>
<property name="&lt;Primary&gt;&lt;Alt&gt;KP_1" type="string" value="move_window_workspace_1_key"/>
<property name="&lt;Super&gt;KP_Next" type="string" value="tile_down_right_key"/>
<property name="&lt;Super&gt;KP_Left" type="string" value="tile_left_key"/>
<property name="&lt;Shift&gt;&lt;Alt&gt;Page_Up" type="string" value="raise_window_key"/>
<property name="&lt;Primary&gt;&lt;Alt&gt;Home" type="string" value="move_window_prev_workspace_key"/>
<property name="&lt;Alt&gt;&lt;Shift&gt;Tab" type="string" value="cycle_reverse_windows_key"/>
<property name="&lt;Primary&gt;&lt;Alt&gt;Left" type="string" value="left_workspace_key"/>
<property name="&lt;Alt&gt;F12" type="string" value="above_key"/>
<property name="&lt;Primary&gt;&lt;Shift&gt;&lt;Alt&gt;Up" type="string" value="move_window_up_key"/>
<property name="&lt;Primary&gt;F5" type="string" value="workspace_5_key"/>
<property name="&lt;Alt&gt;F8" type="string" value="resize_window_key"/>
<property name="&lt;Primary&gt;&lt;Alt&gt;KP_7" type="string" value="move_window_workspace_7_key"/>
<property name="&lt;Primary&gt;&lt;Alt&gt;KP_2" type="string" value="move_window_workspace_2_key"/>
<property name="&lt;Super&gt;KP_End" type="string" value="tile_down_left_key"/>
<property name="&lt;Primary&gt;&lt;Alt&gt;Up" type="string" value="up_workspace_key"/>
<property name="&lt;Alt&gt;F9" type="string" value="hide_window_key"/>
<property name="&lt;Primary&gt;F7" type="string" value="workspace_7_key"/>
<property name="&lt;Primary&gt;F10" type="string" value="workspace_10_key"/>
<property name="Left" type="string" value="left_key"/>
<property name="&lt;Primary&gt;&lt;Alt&gt;KP_8" type="string" value="move_window_workspace_8_key"/>
<property name="&lt;Alt&gt;Insert" type="string" value="add_workspace_key"/>
<property name="&lt;Primary&gt;F1" type="string" value="workspace_1_key"/>
<property name="override" type="bool" value="true"/>

148
nixos95/keybinds.nix Normal file
View file

@ -0,0 +1,148 @@
/**
* For now this just hard copies the config file.
* This can be improved by allowing users to define there own keybinds
*/
{ config, lib, pkgs, ... }: let
cfg = config.nixos95.keybinds;
t = lib.types;
slib = pkgs.callPackage ./util/lib.nix { };
in {
options.nixos95.keybinds = {
default_commands = lib.mkOption {
internal = true;
description = ''
INTERNAL: additional default keyboard shortcuts to add
'';
type = t.listOf t.attrs;
default = let
# relies on pulseaudio
pactl = lib.getExe' pkgs.pulseaudio "pactl";
in [
{
key = "XF86WWW";
exe = "exo-open --launch WebBrowser";
}
{
key = "XF86Mail";
exe = "exo-open --launch MailReder";
}
{
key = "Print";
exe = "xfce4-screenshooter";
}
{
key = "<SUPER><Shift>s";
exe = "xfce4-screenshooter --fullscreen";
}
{
key = "Super_L";
pkg = pkgs.xfce4-whiskermenu-plugin; # open whiskermenu with a press on SUPER like on windows
}
{
key = "XF86AudioMute";
exe = "${pactl} set-sink-mute @DEFAULT_SINK@ toggle";
}
{
key = "XF86AudioLowerVolume";
exe = "${pactl} set-sink-volume @DEFAULT_SINK@ -5%";
}
{
key = "XF86AudioRaiseVolume";
exe = "${pactl} set-sink-volume @DEFAULT_SINK@ +5%";
}
];
};
commands = lib.mkOption {
description = ''
Keyboard shortcuts that should be made available.
Each keyboard shortcut is defined as a set with the follwoing schema:
{
enable = bool; [optional; default = true]
key = string; [key sequence to triggger the command]
# to specify which command to execute use on of the following:
pkg = package; [use mainProgramm of a nix package; e.g. pkgs.firefox]
exe = string; [provide a program name directly; e.g. firefox]
}
> Modifier keys must be surrounded by angle brackets
'';
type = t.listOf t.attrs;
default = [
{
key = "<Super>r";
exe = "xfce4-appfinder --collapsed";
}
];
};
xfwm4 = lib.mkOption {
description = ''
Keyboard shortcuts to control xfwm4
Each keyboard shortcut is defined as a set with the follwoing schema:
{
enable = bool; [optional; default = true]
key = string; [key sequence to triggger the command]
# to specify which command to execute use on of the following:
pkg = package; [use mainProgramm of a nix package; e.g. pkgs.firefox]
exe = string; [provide a program name directly; e.g. firefox]
}
> Modifier keys must be surrounded by angle brackets
'';
type = t.listOf t.attrs;
default = [ ];
};
};
config = lib.mkIf config.nixos95.enable {
home-manager.users.${config.nixos95.user} = {
xdg.configFile = let
to_xml = list : list
|> lib.filter slib.isEnable
|> lib.map ( elm : let
key = lib.escapeXML elm.key;
exe = lib.escapeXML (slib.getExe elm);
in '' <property name="${key}" type="string" value="${exe}"/> '')
|> lib.concatStringsSep "\n";
default_commands_xml = to_xml cfg.default_commands;
commands_xml = to_xml cfg.commands;
xfwm4_xml = to_xml cfg.xfwm4;
in {
"xfce4/xfconf/xfce-perchannel-xml/xfce4-keyboard-shortcuts.xml" = {
force = true;
text = ''
<?xml version="1.1" encoding="UTF-8"?>
<channel name="xfce4-keyboard-shortcuts" version="1.0">
<property name="commands" type="empty">
<property name="custom" type="empty">
<property name="override" type="bool" value="true" />
${default_commands_xml}
${commands_xml}
</property>
</property>
<property name="xfwm4" type="empty">
<property name="custom" type="empty">
<property name="override" type="bool" value="true" />
${builtins.readFile ./dotfiles/xfwm4-keybinds.xml}
${xfwm4_xml}
</property>
</property>
<property name="providers" type="array">
<value type="string" value="commands" />
<value type="string" value="xfwm4" />
</property>
</channel>
'';
};
};
};
};
}

273
nixos95/taskbar.nix Normal file
View file

@ -0,0 +1,273 @@
/**
* For now this just hard copies the config file.
* This can be improved by allowing users to define there own task bar config
*/
{ config, lib, pkgs, ... }: let
cfg = config.nixos95.taskbar;
user = config.nixos95.user;
t = lib.types;
slib = pkgs.callPackage ./util/lib.nix { };
in {
options.nixos95.taskbar = {
homeIcon = lib.mkOption {
description = ''
Home icon used in the lefter corner of the taskbar
Can be either a `path` to an icon to use,
or the name (string) of an icon in the current theme.
This will be the `Win95_plus` theme by default.
You can check for existing icons inside `/Ressources/Icons/Win95_plus`.
'';
default = "whisker-menu-button";
type = t.either t.str t.path;
example = "world";
};
battery-plugin = {
enable = lib.mkOption {
description = ''
Enable the battery plugin in the taskbar.
This will show the charging status in the right corner.
On hover it will show the excat percentage.
'';
default = true;
example = false;
type = t.bool;
};
power_bar = let
mkColor = state : default : lib.mkOption {
description = "Color to show while ${state}";
type = t.str;
inherit default;
};
in {
enable = lib.mkOption {
description = ''
Enable the power bar, which shows the charging level.
'';
type = t.bool;
default = true;
example = false;
};
critical_at = lib.mkOption {
description = ''
Set the maximum battery percentage of the "critical" state
'';
type = t.int;
default = 10;
example = 20;
};
warning_at = lib.mkOption {
description = ''
Set the maximum battery percentage of the "warning" state
'';
type = t.int;
default = 20;
example = 30;
};
color_warning = mkColor "in a warning state" "rgb(248,228,92)";
color_critical = mkColor "in a critical state" "rgb(237,51,59)";
color_loading = mkColor "charging" "rgb(119,118,123)";
color_default = mkColor "discharging" "rgb(143,240,164)";
};
};
applications = lib.mkOption {
description = ''
(in order) list of applications to pin in the taskbar.
Applications must be defined as a set each with the following name-value paris:
{
enable = bool; [optional; default = true]
name = string; [application name shown on hover; optional]
description = string; [text shown on hover; optional]
icon = string | path; [icon shown in the task bar]
terminal = bool; [start the program inside a terminal; optional; default = false]
[either pkg or exe must be defined]
pkg = package; [use mainProgramm of a nix package; e.g. pkgs.firefox]
exe = string; [provide a program name directly; e.g. firefox]
}
The `icon` can be specified as an icon name (in the current Iocn pack)
or as a `path` to an image directly.
See `/Ressources/Icons/Win95_plus` for the default icons.
'';
default = [
{
name = "Files";
description = "View and manage local files";
icon = "folder_open";
exe = "exo-open --launch FileManager";
}
{
name = "Terminal";
description = "Run commands";
icon = "xfce4-terminal";
pkg = pkgs.xfce4-terminal;
}
{
name = "Browser";
description = "Access the world wide web";
icon = "firefox";
exe = "exo-open --launch WebBrowser";
}
];
type = t.listOf t.attrs;
};
};
config = lib.mkIf config.nixos95.enable {
environment.systemPackages = [
pkgs.xfce4-whiskermenu-plugin
(lib.mkIf cfg.battery-plugin.enable pkgs.xfce4-battery-plugin)
];
home-manager.users.${user} = {
xdg.configFile = {
"xfce4/panel/battery-7.rc" = {
force = true;
enable = cfg.battery-plugin.enable;
text = let
bar = cfg.battery-plugin.power_bar;
in ''
display_label=false
display_icon=true
display_power=false
display_percentage=false
display_bar=${if bar.enable then "true" else "false"}
display_time=false
tooltip_display_percentage=true
tooltip_display_time=false
low_percentage=${builtins.toString bar.warning_at}
critical_percentage=${builtins.toString bar.critical_at}
action_on_low=1
action_on_critical=1
hide_when_full=0
colorA=${bar.color_loading}
colorH=${bar.color_default}
colorL=${bar.color_warning}
colorC=${bar.color_critical}
command_on_low=
command_on_critical=
'';
};
"xfce4/xfconf/xfce-perchannel-xml/xfce4-panel.xml" = let
ifBattery = str : if cfg.battery-plugin.enable then str else "";
battery_id = ifBattery '' <value type="int" value="7" /> '';
battery_xml = ifBattery '' <property name="plugin-7" type="string" value="battery" /> '';
applications_cfg = cfg.applications
|> lib.filter slib.isEnable
|> lib.imap0 ( ptr : elm : rec {
# we start IDs in the 20 range to not get confilics with other plugins
plugin_id = "2" + builtins.toString ptr;
plugin_desktop = let
desc = if elm ? description then elm.description else "";
term = if elm ? terminal && elm.terminal then "true" else "false";
exec = slib.getExe elm;
in pkgs.writeTextFile {
name = "${elm.name}.desktop";
text = ''
[Desktop Entry]
Version=1.0
Type=Application
Name=${elm.name}
Icon=${elm.icon}
Exec=${exec}
Comment=${desc}
Terminal=${term}
'';
};
plugin_xml = ''
<property name="plugin-${plugin_id}" type="string" value="launcher">
<property name="show-label" type="bool" value="false" />
<property name="items" type="array">
<value type="string" value="${plugin_desktop}" />
</property>
</property>
'';
});
app_ids = applications_cfg
|> lib.map ( elm : '' <value type="int" value="${elm.plugin_id}"/> '' )
|> lib.concatStringsSep "\n";
app_xml = applications_cfg
|> lib.map ( elm : elm.plugin_xml )
|> lib.concatStringsSep "\n";
in {
force = true;
text = ''
<?xml version="1.1" encoding="UTF-8"?>
<channel name="xfce4-panel" version="1.0">
<property name="configver" type="int" value="2"/>
<property name="panels" type="array">
<value type="int" value="1"/>
<property name="dark-mode" type="bool" value="true"/>
<property name="panel-1" type="empty">
<property name="position" type="string" value="p=8;x=1368;y=1810"/>
<property name="length" type="double" value="100"/>
<property name="position-locked" type="bool" value="true"/>
<property name="icon-size" type="uint" value="0"/>
<property name="size" type="uint" value="42"/>
<property name="plugin-ids" type="array">
<value type="int" value="1"/>
${app_ids}
<value type="int" value="3"/>
<value type="int" value="4"/>
<value type="int" value="5"/>
<value type="int" value="6"/>
${battery_id}
</property>
<property name="mode" type="uint" value="0"/>
<property name="background-style" type="uint" value="0"/>
</property>
</property>
<property name="plugins" type="empty">
<property name="plugin-1" type="string" value="whiskermenu">
<property name="button-icon" type="string" value="${cfg.homeIcon}"/>
<property name="recent" type="array">
</property>
</property>
${app_xml}
<property name="plugin-3" type="string" value="tasklist">
<property name="grouping" type="uint" value="1"/>
</property>
<property name="plugin-4" type="string" value="separator">
<property name="expand" type="bool" value="true"/>
<property name="style" type="uint" value="0"/>
</property>
<property name="plugin-5" type="string" value="systray">
<property name="square-icons" type="bool" value="true"/>
<property name="known-legacy-items" type="array">
<value type="string" value="networkmanager applet"/>
</property>
</property>
<property name="plugin-6" type="string" value="clock">
<property name="mode" type="uint" value="2"/>
<property name="digital-layout" type="uint" value="3"/>
<property name="digital-time-font" type="string" value="Sans 12"/>
</property>
${battery_xml}
</property>
</channel>
'';
};
};
};
};
}

35
nixos95/theme.nix Normal file
View file

@ -0,0 +1,35 @@
{ inputs, config, lib, pkgs, ... }: let
cfg = config.nixos95;
root = ../.;
baseTheme = {
name = "Chicago95";
package = pkgs.callPackage "${root}/Ressources/Themes/Chicago95/chicago95.nix" { };
};
iconTheme = {
name = "Win95_plus";
package = pkgs.callPackage "${root}/Ressources/Themes/Win95_plus/win95_plus.nix" { };
};
in lib.mkIf cfg.enable {
home-manager.users.${cfg.user} = {
gtk = {
enable = true;
theme = baseTheme;
iconTheme = iconTheme;
cursorTheme = baseTheme;
font = {
name = "Sans";
size = 12;
};
};
home.pointerCursor = {
size = 24;
gtk.enable = true;
x11.enable = true;
} // baseTheme;
};
}

6
nixos95/util/lib.nix Normal file
View file

@ -0,0 +1,6 @@
{ lib, ... }: {
# return true if elm.enable is not set or elm.enable is true
isEnable = elm : !( lib.hasAttr "enable" elm ) || elm.enable;
# return executable path from elm.pkg if defined or elm.exe
getExe = elm : if elm ? pkg then lib.getExe elm.pkg else elm.exe;
}