Set project name as a varible in flake so it can be changed easier.
This commit is contained in:
@ -41,6 +41,7 @@
|
|||||||
let
|
let
|
||||||
username = "cookiez";
|
username = "cookiez";
|
||||||
hostname = "nixos";
|
hostname = "nixos";
|
||||||
|
project = "NixOS";
|
||||||
version = "26.05"; #DO NOT change to "unstable" as it is not a valid option for all cascading uses of this variable
|
version = "26.05"; #DO NOT change to "unstable" as it is not a valid option for all cascading uses of this variable
|
||||||
system = "x86_64-linux";
|
system = "x86_64-linux";
|
||||||
pkgs = import nixpkgs { inherit system; };
|
pkgs = import nixpkgs { inherit system; };
|
||||||
@ -56,6 +57,7 @@
|
|||||||
inherit username;
|
inherit username;
|
||||||
inherit version;
|
inherit version;
|
||||||
inherit system;
|
inherit system;
|
||||||
|
inherit project;
|
||||||
host = hostname;
|
host = hostname;
|
||||||
};
|
};
|
||||||
modules = [
|
modules = [
|
||||||
|
|||||||
@ -10,7 +10,7 @@
|
|||||||
|
|
||||||
#Nix flake file limit: ulimit -n 500000
|
#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
|
# in configuration.nix
|
||||||
#Assign Swap to the PC
|
#Assign Swap to the PC
|
||||||
@ -87,7 +87,7 @@
|
|||||||
useUserPackages = true;
|
useUserPackages = true;
|
||||||
users.${username} = ./home.nix;
|
users.${username} = ./home.nix;
|
||||||
backupFileExtension = "backup"; # Automatically backs up conflicting files during activation
|
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 ];
|
sharedModules = [ inputs.plasma-manager.homeModules.plasma-manager ];
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@ -1,4 +1,4 @@
|
|||||||
{ pkgs, username, ...}:
|
{ pkgs, username, project, ...}:
|
||||||
{
|
{
|
||||||
xdg = {
|
xdg = {
|
||||||
desktopEntries.youtube = {
|
desktopEntries.youtube = {
|
||||||
@ -19,7 +19,7 @@
|
|||||||
categories = [ "Network" "InstantMessaging" "Chat" ];
|
categories = [ "Network" "InstantMessaging" "Chat" ];
|
||||||
exec = "vesktop %U";
|
exec = "vesktop %U";
|
||||||
genericName = "Internet Messenger";
|
genericName = "Internet Messenger";
|
||||||
icon = "/home/${username}/NixOS/other/discord.app.png";
|
icon = "/home/${username}/${project}/other/discord.app.png";
|
||||||
name = "Discord";
|
name = "Discord";
|
||||||
type = "Application";
|
type = "Application";
|
||||||
};
|
};
|
||||||
@ -41,7 +41,7 @@
|
|||||||
terminal = false;
|
terminal = false;
|
||||||
categories = [ "System" "TerminalEmulator" ];
|
categories = [ "System" "TerminalEmulator" ];
|
||||||
|
|
||||||
icon = "/home/${username}/NixOS/other/kitty.app.png";
|
icon = "/home/${username}/${project}/other/kitty.app.png";
|
||||||
};
|
};
|
||||||
|
|
||||||
desktopEntries."org.kde.kinfocenter" = {
|
desktopEntries."org.kde.kinfocenter" = {
|
||||||
@ -80,7 +80,7 @@
|
|||||||
};
|
};
|
||||||
|
|
||||||
desktopEntries."nixos-manual" = {
|
desktopEntries."nixos-manual" = {
|
||||||
name = "NixOS Manual";
|
name = "${project} Manual";
|
||||||
noDisplay = true;
|
noDisplay = true;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@ -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
|
# Home Manager needs a bit of information about you and the
|
||||||
# paths it should manage.
|
# paths it should manage.
|
||||||
home.username = username;
|
home.username = username;
|
||||||
home.homeDirectory = "/home/${username}";
|
home.homeDirectory = "/home/${username}";
|
||||||
home.packages = [
|
home.packages = [
|
||||||
(import ./ncli.nix { inherit pkgs host; backupFiles = [
|
(import ./ncli.nix { inherit pkgs host project; backupFiles = [
|
||||||
".gtkrc-2.0.backup"
|
".gtkrc-2.0.backup"
|
||||||
".config/gtk-3.0/gtk.css.backup"
|
".config/gtk-3.0/gtk.css.backup"
|
||||||
".config/gtk-3.0/settings.ini.backup"
|
".config/gtk-3.0/settings.ini.backup"
|
||||||
|
|||||||
@ -1,4 +1,4 @@
|
|||||||
{pkgs, inputs, username, ...}:
|
{pkgs, inputs, username, project, ...}:
|
||||||
{
|
{
|
||||||
|
|
||||||
imports = [
|
imports = [
|
||||||
@ -10,17 +10,17 @@
|
|||||||
|
|
||||||
settings = {
|
settings = {
|
||||||
preload = [
|
preload = [
|
||||||
"/home/${username}/NixOS/other/wallpaper1.png"
|
"/home/${username}/${project}/other/wallpaper1.png"
|
||||||
#"/home/${username}/NixOS/other/wallpaper2.png"
|
#"/home/${username}/${project}/other/wallpaper2.png"
|
||||||
#"/home/${username}/NixOS/other/wallpaper3.png"
|
#"/home/${username}/${project}/other/wallpaper3.png"
|
||||||
#"/home/${username}/NixOS/other/wallpaper4.png"
|
#"/home/${username}/${project}/other/wallpaper4.png"
|
||||||
];
|
];
|
||||||
|
|
||||||
wallpaper = [
|
wallpaper = [
|
||||||
"eDP-1,/home/${username}/NixOS/other/wallpaper1.png"
|
"eDP-1,/home/${username}/${project}/other/wallpaper1.png"
|
||||||
#"eDP-1,/home/${username}/NixOS/other/wallpaper2.png"
|
#"eDP-1,/home/${username}/${project}/other/wallpaper2.png"
|
||||||
#"eDP-1,/home/${username}/NixOS/other/wallpaper3.png"
|
#"eDP-1,/home/${username}/${project}/other/wallpaper3.png"
|
||||||
#"eDP-1,/home/${username}/NixOS/other/wallpaper4.png"
|
#"eDP-1,/home/${username}/${project}/other/wallpaper4.png"
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|||||||
@ -2,6 +2,7 @@
|
|||||||
pkgs,
|
pkgs,
|
||||||
host,
|
host,
|
||||||
backupFiles ? [ ".config/mimeapps.list.backup" ],
|
backupFiles ? [ ".config/mimeapps.list.backup" ],
|
||||||
|
project,
|
||||||
...
|
...
|
||||||
}: let
|
}: let
|
||||||
backupFilesString = pkgs.lib.strings.concatStringsSep " " backupFiles;
|
backupFilesString = pkgs.lib.strings.concatStringsSep " " backupFiles;
|
||||||
@ -11,7 +12,7 @@ in
|
|||||||
set -euo pipefail
|
set -euo pipefail
|
||||||
|
|
||||||
# --- Configuration ---
|
# --- Configuration ---
|
||||||
PROJECT="NixOS"
|
PROJECT="${project}"
|
||||||
HOST="${host}"
|
HOST="${host}"
|
||||||
BACKUP_FILES_STR="${backupFilesString}"
|
BACKUP_FILES_STR="${backupFilesString}"
|
||||||
VERSION="2.0.0"
|
VERSION="2.0.0"
|
||||||
|
|||||||
@ -1,6 +1,11 @@
|
|||||||
{ config, pkgs, username, ... }: {
|
{ config, pkgs, username, project, ... }: {
|
||||||
programs.zsh = {
|
programs.zsh = {
|
||||||
enable = true;
|
enable = true;
|
||||||
|
enableCompletion = true;
|
||||||
|
autosuggestions = {
|
||||||
|
enable = true;
|
||||||
|
highlightStyle = "fg=242"; # Lighter gray shadow (0-255 scale)
|
||||||
|
};
|
||||||
|
|
||||||
ohMyZsh = {
|
ohMyZsh = {
|
||||||
enable = true;
|
enable = true;
|
||||||
@ -8,7 +13,7 @@
|
|||||||
};
|
};
|
||||||
|
|
||||||
shellInit = ''
|
shellInit = ''
|
||||||
source /home/${username}/NixOS/other/aliases
|
source /home/${username}/${project}/other/aliases
|
||||||
eval "$(${pkgs.zoxide}/bin/zoxide init zsh --cmd cd)"
|
eval "$(${pkgs.zoxide}/bin/zoxide init zsh --cmd cd)"
|
||||||
'';
|
'';
|
||||||
|
|
||||||
@ -26,5 +31,6 @@
|
|||||||
pkgs.zsh-powerlevel10k
|
pkgs.zsh-powerlevel10k
|
||||||
pkgs.zsh-syntax-highlighting
|
pkgs.zsh-syntax-highlighting
|
||||||
pkgs.zsh-autocomplete
|
pkgs.zsh-autocomplete
|
||||||
|
pkgs.zsh-autosuggestions
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,4 +1,4 @@
|
|||||||
{ config, pkgs, username, ... }:
|
{ config, pkgs, username, project, ... }:
|
||||||
{
|
{
|
||||||
|
|
||||||
#To show logs of services run: journalctl --user-unit={service-name} --user
|
#To show logs of services run: journalctl --user-unit={service-name} --user
|
||||||
@ -9,7 +9,7 @@
|
|||||||
#after = [ "plasma-desktop.service" ];
|
#after = [ "plasma-desktop.service" ];
|
||||||
wantedBy = [ "graphical-session.target" ];
|
wantedBy = [ "graphical-session.target" ];
|
||||||
serviceConfig = {
|
serviceConfig = {
|
||||||
ExecStart = [ "/run/current-system/sw/bin/plasma-apply-wallpaperimage /home/${username}/NixOS/other/wallpaper2.png" ];
|
ExecStart = [ "/run/current-system/sw/bin/plasma-apply-wallpaperimage /home/${username}/${project}/other/wallpaper2.png" ];
|
||||||
|
|
||||||
Type = "oneshot";
|
Type = "oneshot";
|
||||||
Restart = "on-failure";
|
Restart = "on-failure";
|
||||||
@ -34,7 +34,7 @@
|
|||||||
|
|
||||||
systemd.user.services.theme-set-reminder = {
|
systemd.user.services.theme-set-reminder = {
|
||||||
enable = true;
|
enable = true;
|
||||||
description = "Remind the user to apply the custom Plasma Theme shipped with this NixOS";
|
description = "Remind the user to apply the custom Plasma Theme shipped with this install";
|
||||||
after = [ "graphical-session.target" ];
|
after = [ "graphical-session.target" ];
|
||||||
wantedBy = [ "graphical-session.target" ];
|
wantedBy = [ "graphical-session.target" ];
|
||||||
serviceConfig = {
|
serviceConfig = {
|
||||||
|
|||||||
@ -1,4 +1,4 @@
|
|||||||
{config, pkgs, username, ...}:
|
{config, pkgs, username, project, ...}:
|
||||||
let
|
let
|
||||||
# Define the custom background package with the correct relative path
|
# Define the custom background package with the correct relative path
|
||||||
background-package = pkgs.stdenvNoCC.mkDerivation {
|
background-package = pkgs.stdenvNoCC.mkDerivation {
|
||||||
@ -71,8 +71,8 @@ in
|
|||||||
#};
|
#};
|
||||||
|
|
||||||
system.activationScripts.script.text = ''
|
system.activationScripts.script.text = ''
|
||||||
source /home/cookiez/NixOS/other/colors.sh
|
source /home/${username}/${project}/other/colors.sh
|
||||||
source /home/cookiez/NixOS/other/pfp.sh
|
source /home/${username}/${project}/other/pfp.sh
|
||||||
'';
|
'';
|
||||||
|
|
||||||
#services.displayManager.sddm = {
|
#services.displayManager.sddm = {
|
||||||
|
|||||||
Reference in New Issue
Block a user