Set project name as a varible in flake so it can be changed easier.

This commit is contained in:
2025-12-11 16:20:20 +01:00
parent e0daa8743d
commit 7b51a603c4
9 changed files with 35 additions and 26 deletions

View File

@ -10,7 +10,7 @@
#Nix flake file limit: ulimit -n 500000
{ inputs, config, pkgs, lib, username, host, version, system, ... }:
{ inputs, config, pkgs, lib, username, project, host, version, system, ... }:
{
# in configuration.nix
#Assign Swap to the PC
@ -87,7 +87,7 @@
useUserPackages = true;
users.${username} = ./home.nix;
backupFileExtension = "backup"; # Automatically backs up conflicting files during activation
extraSpecialArgs = { inherit inputs username version system host; };
extraSpecialArgs = { inherit inputs username project version system host; };
sharedModules = [ inputs.plasma-manager.homeModules.plasma-manager ];
};

View File

@ -1,4 +1,4 @@
{ pkgs, username, ...}:
{ pkgs, username, project, ...}:
{
xdg = {
desktopEntries.youtube = {
@ -19,7 +19,7 @@
categories = [ "Network" "InstantMessaging" "Chat" ];
exec = "vesktop %U";
genericName = "Internet Messenger";
icon = "/home/${username}/NixOS/other/discord.app.png";
icon = "/home/${username}/${project}/other/discord.app.png";
name = "Discord";
type = "Application";
};
@ -41,7 +41,7 @@
terminal = false;
categories = [ "System" "TerminalEmulator" ];
icon = "/home/${username}/NixOS/other/kitty.app.png";
icon = "/home/${username}/${project}/other/kitty.app.png";
};
desktopEntries."org.kde.kinfocenter" = {
@ -80,7 +80,7 @@
};
desktopEntries."nixos-manual" = {
name = "NixOS Manual";
name = "${project} Manual";
noDisplay = true;
};

View File

@ -1,11 +1,11 @@
{ lib, inputs, config, pkgs, username, host, version, ... }:
{ lib, inputs, config, pkgs, username, project, host, version, ... }:
{
# Home Manager needs a bit of information about you and the
# paths it should manage.
home.username = username;
home.homeDirectory = "/home/${username}";
home.packages = [
(import ./ncli.nix { inherit pkgs host; backupFiles = [
(import ./ncli.nix { inherit pkgs host project; backupFiles = [
".gtkrc-2.0.backup"
".config/gtk-3.0/gtk.css.backup"
".config/gtk-3.0/settings.ini.backup"

View File

@ -1,4 +1,4 @@
{pkgs, inputs, username, ...}:
{pkgs, inputs, username, project, ...}:
{
imports = [
@ -10,17 +10,17 @@
settings = {
preload = [
"/home/${username}/NixOS/other/wallpaper1.png"
#"/home/${username}/NixOS/other/wallpaper2.png"
#"/home/${username}/NixOS/other/wallpaper3.png"
#"/home/${username}/NixOS/other/wallpaper4.png"
"/home/${username}/${project}/other/wallpaper1.png"
#"/home/${username}/${project}/other/wallpaper2.png"
#"/home/${username}/${project}/other/wallpaper3.png"
#"/home/${username}/${project}/other/wallpaper4.png"
];
wallpaper = [
"eDP-1,/home/${username}/NixOS/other/wallpaper1.png"
#"eDP-1,/home/${username}/NixOS/other/wallpaper2.png"
#"eDP-1,/home/${username}/NixOS/other/wallpaper3.png"
#"eDP-1,/home/${username}/NixOS/other/wallpaper4.png"
"eDP-1,/home/${username}/${project}/other/wallpaper1.png"
#"eDP-1,/home/${username}/${project}/other/wallpaper2.png"
#"eDP-1,/home/${username}/${project}/other/wallpaper3.png"
#"eDP-1,/home/${username}/${project}/other/wallpaper4.png"
];
};
};

View File

@ -2,6 +2,7 @@
pkgs,
host,
backupFiles ? [ ".config/mimeapps.list.backup" ],
project,
...
}: let
backupFilesString = pkgs.lib.strings.concatStringsSep " " backupFiles;
@ -11,7 +12,7 @@ in
set -euo pipefail
# --- Configuration ---
PROJECT="NixOS"
PROJECT="${project}"
HOST="${host}"
BACKUP_FILES_STR="${backupFilesString}"
VERSION="2.0.0"

View File

@ -1,6 +1,11 @@
{ config, pkgs, username, ... }: {
{ config, pkgs, username, project, ... }: {
programs.zsh = {
enable = true;
enableCompletion = true;
autosuggestions = {
enable = true;
highlightStyle = "fg=242"; # Lighter gray shadow (0-255 scale)
};
ohMyZsh = {
enable = true;
@ -8,7 +13,7 @@
};
shellInit = ''
source /home/${username}/NixOS/other/aliases
source /home/${username}/${project}/other/aliases
eval "$(${pkgs.zoxide}/bin/zoxide init zsh --cmd cd)"
'';
@ -26,5 +31,6 @@
pkgs.zsh-powerlevel10k
pkgs.zsh-syntax-highlighting
pkgs.zsh-autocomplete
pkgs.zsh-autosuggestions
];
}