Merge pull request #15 from Peritia-System/Beta-import

Make it an purely imported configuration
This commit is contained in:
Peritia 2025-08-15 12:34:32 +02:00 committed by GitHub
commit b5d7fbbfc4
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
28 changed files with 80 additions and 1010 deletions

View file

@ -1,152 +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
# nixos95
inputs.self.nixosModules.nixos95
];
################################################################
# Display & Desktop Environment
################################################################
nixos95 = {
enable = true;
user = username;
taskbar = {
homeIcon = "whisker-menu-button";
battery-plugin.enable = false;
applications = [
{
name = "Brave";
description = "Browse the Web";
pkg = pkgs.brave;
icon = "world";
}
{
name = "Signal";
description = "Private Messenger";
pkg = pkgs.signal-desktop;
icon = "signal";
}
{
name = "Obsidian";
description = "Markdown Editor";
exe = "obsidian %u";
icon = "obsidian";
}
{
name = "Spotify";
description = "Spotify Music";
exe = "spotify %U";
icon = "spotify";
}
];
};
keybinds = {
commands = [
{ key="<Super>l"; exe="xflock4"; }
];
};
};
################################################################
# System Packages (XFCE & Utilities)
################################################################
environment.systemPackages = with pkgs; [
# 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,114 +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
# 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,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" "pipe-operators"];
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
];
}

119
README.md
View file

@ -25,19 +25,6 @@ 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/
│ └── System/
@ -60,51 +47,95 @@ NixOS-95/
</details>
---
### Wallpaper and Aesthetics
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 - BETA
> Requires a NixOS install.
> Requirements:
nix.settings.experimental-features = ["nix-command" "flakes" "pipe-operators"];
Enabled
1. **Clone the repository**:
```bash
git clone https://github.com/peritia-system/NixOS-95.git NixOS
cd NixOS
```
### 1. Add Nyx to your flake
2. **Switch to Dev**:
```nix
# flake.nix
{
inputs = {
nixos95.url = "github:Peritia-System/NixOS-95/Dev";
nixos95.inputs.nixpkgs.follows = "nixpkgs";
}
outputs = inputs @ { nixpkgs, nixos95, ... }: {
nixosConfigurations.HOSTNAME = nixpkgs.lib.nixosSystem {
modules = [ ./configuration.nix ];
};
};
}
```
```bash
git switch Dev
```
### 2. Import in Configuration.nix
3. **Regenerate hardware configuration**:
```nix
# configuration.nix
{
imports = [ inputs.self.nixosModules.nixos95 ];
}
```
```bash
sudo nixos-generate-config --dir Configurations/Hosts/Default
```
### 3. Enable modules
```nix
{
# configuration.nix / or sth imported by the main config
nixos95 = {
enable = true;
user = "alex";
taskbar = {
homeIcon = "whisker-menu-button";
battery-plugin.enable = false;
applications = [
{
name = "Brave";
description = "Browse the Web";
pkg = pkgs.brave;
icon = "world";
}
{
name = "Signal";
description = "Private Messenger";
pkg = pkgs.signal-desktop;
icon = "signal";
}
{
name = "Obsidian";
description = "Markdown Editor";
exe = "obsidian %u";
icon = "obsidian";
}
{
name = "Spotify";
description = "Spotify Music";
exe = "spotify %U";
icon = "spotify";
}
];
};
keybinds = {
commands = [
{ key="<Super>l"; exe="xflock4"; }
];
};
};
}
```
4. **Build and switch to the system configuration**:
```bash
sudo NIX_CONFIG="experimental-features = nix-command flakes pipe-operators" nixos-rebuild switch --flake .#default
```
5. **Apply user settings with Home Manager**:
```bash
home-manager switch
```
w
### Experimental Features

View file

@ -1,46 +1,12 @@
{
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";
};
################################################################
# 🚀 Outputs
################################################################
outputs = inputs @ {
self,
nixpkgs,
home-manager,
...
}: {
nixosModules.nixos95 = import ./nixos95;
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, ... }: {
nixosModules.default = import ./nixos95;
};
}