Rework of the repo

This commit is contained in:
shinya 2025-11-02 12:32:03 +01:00
parent 05b74c5457
commit b6bff6887e
14 changed files with 386 additions and 18 deletions

2
.gitignore vendored
View File

@ -1,2 +1,4 @@
result
nixos*.iso
*.qcow2

52
README.md Normal file
View File

@ -0,0 +1,52 @@
# Windows XP theme for NixOS
- This is repository containing packaged version of themes, icons, cursors, etc... for NixOS and module to simply use them with Mate desktop
## Installation
- Supported via NixOS modules with flakes
```nix
{
description = "Your system flake with Windows XP theme";
inputs = {
nixpkgs.url = "github:nixos/nixpkgs?ref=nixos-unstable";
home-manager = {
url = "github:nix-community/home-manager";
inputs.nixpkgs.follows = "nixpkgs";
};
# Add this to your inputs
windows-theme = {
url = "git+https://gitea.homework.zip/shinya/Windows-Theme-Flake";
inputs.nixpkgs.follows = "nixpkgs";
};
};
# Add explicit function parameter windows-theme to the output
outputs = { self, nixpkgs, windows-theme, ... }@inputs: let
system = "x86_64-linux";
in {
nixosConfigurations.nixp = nixpkgs.lib.nixosSystem {
inherit system;
specialArgs = {inherit windows-theme system;}; # Append windows-theme and system to the inherited args
modules = [
./configuration.nix
inputs.windows-theme.nixosModules.default # This will add configuration options to your config
inputs.home-manager.nixosModules.home-manager
];
};
};
}
```
- Then in your config you can enable it with:
```nix
nixp.mate.enable = true;
```
- More options will be added soon

View File

Before

Width:  |  Height:  |  Size: 12 MiB

After

Width:  |  Height:  |  Size: 12 MiB

View File

@ -3,34 +3,83 @@
inputs = {
nixpkgs.url = "github:nixos/nixpkgs?ref=nixos-unstable";
home-manager = {
url = "github:nix-community/home-manager";
inputs.nixpkgs.follows = "nixpkgs";
};
nixos-generators = {
url = "github:nix-community/nixos-generators";
inputs.nixpkgs.follows = "nixpkgs";
};
};
outputs = { self, nixpkgs, ... }@inputs:
outputs = { self, nixpkgs, ... }@inputs:
let
system = "x86_64-linux";
pkgs = import nixpkgs { inherit system; };
in {
windows-theme = inputs.self;
in
{
nixosConfigurations =
{
nixp = nixpkgs.lib.nixosSystem {
inherit system;
specialArgs = { inherit inputs system windows-theme; };
modules = [
./hosts/configuration.nix
self.nixosModules.default
inputs.home-manager.nixosModules.home-manager
];
};
default = self.nixosConfigurations.nixp;
};
packages.${system} = {
windows-xp-icons = pkgs.callPackage ./windows-xp-icons.nix { };
windows-xp-theme = pkgs.callPackage ./windows-xp-theme.nix { };
windows-xp-cursor = pkgs.callPackage ./windows-xp-cursor.nix { };
windows-xp-plymouth = pkgs.callPackage ./windows-xp-plymouth.nix { };
windows-xp-grub = pkgs.callPackage ./windows-xp-grub.nix { };
windows-xp-icons = pkgs.callPackage ./packages/windows-xp-icons.nix { };
windows-xp-theme = pkgs.callPackage ./packages/windows-xp-theme.nix { };
windows-xp-cursor = pkgs.callPackage ./packages/windows-xp-cursor.nix { };
windows-xp-plymouth = pkgs.callPackage ./packages/windows-xp-plymouth.nix { };
windows-xp-grub = pkgs.callPackage ./packages/windows-xp-grub.nix { };
#windows-xp-login = pkgs.callPackage ./windows-xp-login.nix { };
default = self.packages.${system}.windows-xp-theme;
vm = inputs.nixos-generators.nixosGenerate {
inherit system;
specialArgs = { inherit inputs system windows-theme; };
modules = [
./hosts/configuration.nix
self.nixosModules.default
inputs.home-manager.nixosModules.home-manager
];
format = "vm";
};
install-iso = inputs.nixos-generators.nixosGenerate {
inherit system;
specialArgs = { inherit inputs system windows-theme; };
modules = [
./hosts/configuration.nix
self.nixosModules.default
inputs.home-manager.nixosModules.home-manager
];
format = "install-iso";
};
default = self.packages.${system}.vm;
};
nixosModules = {
default = self.nixosModules.mate-xp-config;
mate-xp-config = import ./mate-xp-config.nix;
mate-xp-config = import ./modules/mate-xp-config.nix;
};
homeModules = {
default = self.homeModules.mate-xp-home;
mate-xp-home = import ./mate-xp-home.nix;
mate-xp-home = import ./modules/mate-xp-home.nix;
};
};
};
}

194
hosts/configuration.nix Normal file
View File

@ -0,0 +1,194 @@
{ lib, pkgs, inputs, system, windows-theme, ... }:
{
imports = [ ./hardware-configuration.nix ];
home-manager = {
backupFileExtension = "backup";
users = {
admin = import ./home.nix;
};
extraSpecialArgs = { inherit inputs system pkgs windows-theme; };
sharedModules = [
inputs.self.homeModules.default
];
};
# Use the systemd-boot EFI boot loader.
boot = {
kernelParams = [ "console=tty0" ];
loader = {
systemd-boot.enable = true;
efi.canTouchEfiVariables = true;
# timeout = 5;
};
plymouth = {
enable = true;
};
};
nixp.enable = true;
networking = {
hostName = "nixp";
networkmanager.enable = true;
};
hardware.bluetooth = {
enable = true;
powerOnBoot = true;
};
# Set your time zone.
time.timeZone = "Europe/Prague";
i18n = {
defaultLocale = "en_US.UTF-8";
extraLocaleSettings = {
LC_ADDRESS = "cs_CZ.UTF-8";
LC_IDENTIFICATION = "cs_CZ.UTF-8";
LC_MEASUREMENT = "cs_CZ.UTF-8";
LC_MONETARY = "cs_CZ.UTF-8";
LC_NAME = "cs_CZ.UTF-8";
LC_NUMERIC = "cs_CZ.UTF-8";
LC_PAPER = "cs_CZ.UTF-8";
LC_TELEPHONE = "cs_CZ.UTF-8";
LC_TIME = "cs_CZ.UTF-8";
};
};
fonts.packages = with pkgs; [
noto-fonts
noto-fonts-emoji
corefonts
];
services = {
xserver = {
enable = true;
xkb.layout = "gb,cz,ru";
desktopManager = {
mate.enable = true;
xfce.enable = false;
};
displayManager.lightdm = {
enable = true;
};
};
displayManager = {
defaultSession = "mate";
};
libinput.enable = true;
blueman.enable = true;
pulseaudio.enable = false;
pipewire = {
enable = true;
alsa.enable = true;
alsa.support32Bit = true;
pulse.enable = true;
};
};
security.rtkit.enable = true;
# Enable CUPS to print documents.
# services.printing.enable = true;
# Define a user account. Don't forget to set a password with passwd.
users.users = {
root.password = "admin1234";
admin = {
isNormalUser = true;
extraGroups = [ "wheel" "networkmanager" ]; # Enable sudo for the user.
password = "admin1234";
packages = (with pkgs; [
git
helix
dconf-editor
librewolf
hypnotix
blueman
libreoffice
wineWowPackages.stable
mpv
stremio
]);
};
};
nixpkgs.config = {
allowUnfreePredicate = pkg: builtins.elem (lib.getName pkg) [
"stremio-shell"
"stremio-server"
"corefonts"
];
permittedInsecurePackages = [
"qtwebengine-5.15.19"
];
};
environment.mate.excludePackages = with pkgs.mate; [
mate-terminal
mate-themes
mate-user-share
mate-backgrounds
];
# List packages installed in system profile.
# You can use https://search.nixos.org/ to find more packages (and options).
# Some programs need SUID wrappers, can be configured further or are
# started in user sessions.
# programs.mtr.enable = true;
# programs.gnupg.agent = {
# enable = true;
# enableSSHSupport = true;
# };
# List services that you want to enable:
# Enable the OpenSSH daemon.
# services.openssh.enable = true;
# Open ports in the firewall.
# networking.firewall.allowedTCPPorts = [ ... ];
# networking.firewall.allowedUDPPorts = [ ... ];
# Or disable the firewall altogether.
# networking.firewall.enable = false;
# Copy the NixOS configuration file and link it from the resulting system
# (/run/current-system/configuration.nix). This is useful in case you
# accidentally delete configuration.nix.
# system.copySystemConfiguration = true;
# This option defines the first version of NixOS you have installed on this particular machine,
# and is used to maintain compatibility with application data (e.g. databases) created on older NixOS versions.
#
# Most users should NEVER change this value after the initial install, for any reason,
# even if you've upgraded your system to a new NixOS release.
#
# This value does NOT affect the Nixpkgs version your packages and OS are pulled from,
# so changing it will NOT upgrade your system - see https://nixos.org/manual/nixos/stable/#sec-upgrading for how
# to actually do that.
#
# This value being lower than the current NixOS release does NOT mean your system is
# out of date, out of support, or vulnerable.
#
# Do NOT change this value unless you have manually inspected all the changes it would make to your configuration,
# and migrated your data accordingly.
#
# For more information, see `man configuration.nix` or https://nixos.org/manual/nixos/stable/options#opt-system.stateVersion .
nix.settings.experimental-features = [ "nix-command" "flakes" ];
system.stateVersion = "25.11"; # Did you read the comment?
}

View File

@ -0,0 +1,33 @@
# Do not modify this file! It was generated by nixos-generate-config
# and may be overwritten by future invocations. Please make changes
# to /etc/nixos/configuration.nix instead.
{ config, lib, pkgs, modulesPath, ... }:
{
imports =
[ (modulesPath + "/installer/scan/not-detected.nix")
];
boot.initrd.availableKernelModules = [ "nvme" "xhci_pci" "ahci" ];
boot.initrd.kernelModules = [ ];
boot.kernelModules = [ "kvm-amd" ];
boot.extraModulePackages = [ ];
fileSystems."/" =
{ device = "/dev/disk/by-uuid/2037dfa2-abb1-4f51-90ed-cc3cc5aa94ed";
fsType = "ext4";
};
fileSystems."/boot" =
{ device = "/dev/disk/by-uuid/3897-60B5";
fsType = "vfat";
options = [ "fmask=0077" "dmask=0077" ];
};
swapDevices =
[ { device = "/dev/disk/by-uuid/078c9606-e3cc-4770-a200-382b247723a6"; }
];
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
hardware.cpu.amd.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
}

34
hosts/home.nix Normal file
View File

@ -0,0 +1,34 @@
{ ... }:
{
home = {
username = "admin";
homeDirectory = "/home/admin";
stateVersion = "25.11";
};
programs.home-manager.enable = true;
services = {
network-manager-applet.enable = true;
};
nixp.mate.enable = true;
dconf.settings = {
"org/mate/desktop/peripherals/touchpad" = {
tap-to-click = true;
};
"org/mate/desktop/peripherals/keyboard/kbd" = {
options = [ "terminate\tterminate:ctrl_alt_bksp" "grp\tgrp:alt_shift_toggle" ];
};
"org/mate/desktop/applications/terminal" = {
exec = "xterm";
exec-arg = "-x";
};
"org/mate/notification-daemon" = {
theme = "slider";
popup-location = "top_right";
};
};
}

View File

@ -11,6 +11,7 @@
theme = {
plymouth.enable = lib.mkEnableOption "enable plymouth Windows XP theme";
grub.enable = lib.mkEnableOption "enable grub Windows XP theme";
};
};
};
@ -21,11 +22,12 @@
nixp = {
theme = {
plymouth.enable = lib.mkDefault true;
grub.enable = lib.mkDefault true;
};
};
services = {
xserver.displayManager.lightdm.background = ./wall.png;
xserver.displayManager.lightdm.background = ../assets/wall.png;
};
environment.systemPackages = with windows-theme.packages.x86_64-linux; [
@ -42,5 +44,8 @@
};
};
})
(lib.mkIf config.nixp.theme.grub.enable {
boot.loader.grub.theme = windows-theme.packages.${system}.windows-xp-grub;
})
];
}

View File

@ -14,7 +14,7 @@
enable = lib.mkEnableOption "enable and set background for mate";
path = lib.mkOption {
type = lib.types.path;
default = ./wall.png;
default = ../assets/wall.png;
description = "Set path to the background";
};
};

View File

@ -1,6 +1,6 @@
{ lib, stdenv, fetchFromGitHub, inkscape, xcursorgen }:
stdenv.mkDerivation rec {
stdenv.mkDerivation {
pname = "modernxp-cursor-theme";
version = "1.0";

View File

@ -2,7 +2,6 @@
, stdenvNoCC
, fetchFromGitHub
, gtk3
, hicolor-icon-theme
}:
stdenvNoCC.mkDerivation rec {