- Formatted everything using Alejandra

- Added 'ncli format' as a quick command to format everything
This commit is contained in:
2026-03-11 16:03:16 +01:00
parent 25ecab4a70
commit c6862c78db
36 changed files with 987 additions and 839 deletions

View File

@ -47,8 +47,19 @@
grub2-themes.url = "github:vinceliuice/grub2-themes"; grub2-themes.url = "github:vinceliuice/grub2-themes";
}; };
outputs = inputs@{ nixpkgs, alejandra, home-manager, plasma-manager, nixos-hardware, stylix, niri, zen-browser, grub2-themes, nix-flatpak, ... }: outputs = inputs @ {
let nixpkgs,
alejandra,
home-manager,
plasma-manager,
nixos-hardware,
stylix,
niri,
zen-browser,
grub2-themes,
nix-flatpak,
...
}: let
username = "cookiez"; username = "cookiez";
hostname = "nixos"; hostname = "nixos";
project = "NixOS"; project = "NixOS";
@ -57,8 +68,7 @@
pkgs = import nixpkgs {inherit system;}; pkgs = import nixpkgs {inherit system;};
framework13 = true; framework13 = true;
in in {
{
formatter.${system} = nixpkgs.legacyPackages.${system}.alejandra; formatter.${system} = nixpkgs.legacyPackages.${system}.alejandra;
nixosConfigurations = { nixosConfigurations = {
@ -73,10 +83,17 @@
inherit alejandra; inherit alejandra;
host = hostname; host = hostname;
}; };
modules = [ modules =
[
./modules ./modules
#Conditional Modules! #Conditional Modules!
] ++ (if framework13 then [ nixos-hardware.nixosModules.framework-13-7040-amd ] else [ ]) ++ [ ]
++ (
if framework13
then [nixos-hardware.nixosModules.framework-13-7040-amd]
else []
)
++ [
]; ];
}; };
}; };

View File

@ -1,5 +1,9 @@
{ config, lib, pkgs, ... }:
{ {
config,
lib,
pkgs,
...
}: {
boot = { boot = {
# silence first boot output # silence first boot output
consoleLogLevel = 3; consoleLogLevel = 3;

View File

@ -3,17 +3,25 @@
#nmcli device wifi connect <ssid> password <password> #nmcli device wifi connect <ssid> password <password>
# or if no password (open wifi) # or if no password (open wifi)
#nmcli device wifi connect <ssid> #nmcli device wifi connect <ssid>
{ inputs, config, pkgs, lib, username, project, host, version, system, ... }:
{ {
inputs,
config,
pkgs,
lib,
username,
project,
host,
version,
system,
...
}: {
#Assign Swap to the PC #Assign Swap to the PC
#swapDevices = [{ #swapDevices = [{
# device = "/swapfile"; # device = "/swapfile";
# size = 16 * 1024; # 16GB # size = 16 * 1024; # 16GB
#}]; #}];
imports = imports = [
[
inputs.home-manager.nixosModules.home-manager inputs.home-manager.nixosModules.home-manager
inputs.grub2-themes.nixosModules.default inputs.grub2-themes.nixosModules.default
inputs.nix-flatpak.nixosModules.nix-flatpak inputs.nix-flatpak.nixosModules.nix-flatpak
@ -63,7 +71,6 @@
#Manage flags -> Add bios_grub #Manage flags -> Add bios_grub
networking = { networking = {
# Enable networking # Enable networking
networkmanager.enable = true; networkmanager.enable = true;

View File

@ -1,5 +1,4 @@
{ config, ... }: {config, ...}: {
{
imports = [ imports = [
./configuration.nix ./configuration.nix
@ -43,6 +42,5 @@
environment.etc."nixos-tags".text = "niri"; environment.etc."nixos-tags".text = "niri";
}; };
}; };
}; };
} }

View File

@ -1,5 +1,9 @@
{ pkgs, username, project, ...}:
{ {
pkgs,
username,
project,
...
}: {
xdg = { xdg = {
desktopEntries.youtube = { desktopEntries.youtube = {
name = "YouTube"; name = "YouTube";
@ -107,6 +111,5 @@
name = "Discover"; name = "Discover";
noDisplay = true; noDisplay = true;
}; };
}; };
} }

View File

@ -1,5 +1,4 @@
{ username, ... }: {username, ...}: {
{
programs.firefox = { programs.firefox = {
enable = true; enable = true;
profiles = { profiles = {

View File

@ -1,6 +1,8 @@
{ config, pkgs, ... }: {
config,
let pkgs,
...
}: let
lock-false = { lock-false = {
Value = false; Value = false;
Status = "locked"; Status = "locked";
@ -9,9 +11,7 @@
Value = true; Value = true;
Status = "locked"; Status = "locked";
}; };
in in {
{
home-manager.sharedModules = [ home-manager.sharedModules = [
./firefox-home.nix ./firefox-home.nix
]; ];
@ -21,7 +21,9 @@
enable = true; enable = true;
languagePacks = ["de" "en-US"]; languagePacks = ["de" "en-US"];
/* ---- POLICIES ---- */ /*
---- POLICIES ----
*/
# Check about:policies#documentation for options. # Check about:policies#documentation for options.
policies = { policies = {
PasswordManagerEnabled = false; PasswordManagerEnabled = false;
@ -44,15 +46,15 @@
DisplayMenuBar = "default-off"; # alternatives: "always", "never" or "default-on" DisplayMenuBar = "default-off"; # alternatives: "always", "never" or "default-on"
SearchBar = "unified"; # alternative: "separate" SearchBar = "unified"; # alternative: "separate"
/* ---- EXTENSIONS ---- */ /*
---- EXTENSIONS ----
*/
# Check about:support for extension/add-on ID strings. # Check about:support for extension/add-on ID strings.
# Valid strings for installation_mode are "allowed", "blocked", # Valid strings for installation_mode are "allowed", "blocked",
# "force_installed" and "normal_installed". # "force_installed" and "normal_installed".
# How to: https://discourse.nixos.org/t/declare-firefox-extensions-and-settings/36265 # How to: https://discourse.nixos.org/t/declare-firefox-extensions-and-settings/36265
ExtensionSettings = ExtensionSettings = with builtins; let
with builtins;
let
extension = shortId: uuid: { extension = shortId: uuid: {
name = uuid; name = uuid;
value = { value = {
@ -77,10 +79,15 @@
(extension "darkreader" "addon@darkreader.org") (extension "darkreader" "addon@darkreader.org")
]; ];
/* ---- PREFERENCES ---- */ /*
---- PREFERENCES ----
*/
# Check about:config for options. # Check about:config for options.
Preferences = { Preferences = {
"browser.contentblocking.category" = { Value = "strict"; Status = "locked"; }; "browser.contentblocking.category" = {
Value = "strict";
Status = "locked";
};
"extensions.pocket.enabled" = lock-false; "extensions.pocket.enabled" = lock-false;
"extensions.screenshots.disabled" = lock-true; "extensions.screenshots.disabled" = lock-true;
"browser.topsites.contile.enabled" = lock-false; "browser.topsites.contile.enabled" = lock-false;

View File

@ -1,11 +1,15 @@
# Do not modify this file! It was generated by nixos-generate-config # Do not modify this file! It was generated by nixos-generate-config
# and may be overwritten by future invocations. Please make changes # and may be overwritten by future invocations. Please make changes
# to /etc/nixos/configuration.nix instead. # to /etc/nixos/configuration.nix instead.
{ config, lib, pkgs, modulesPath, ... }:
{ {
imports = config,
[ (modulesPath + "/installer/scan/not-detected.nix") lib,
pkgs,
modulesPath,
...
}: {
imports = [
(modulesPath + "/installer/scan/not-detected.nix")
]; ];
boot.initrd.availableKernelModules = ["nvme" "xhci_pci" "thunderbolt" "uas" "usbhid" "sd_mod"]; boot.initrd.availableKernelModules = ["nvme" "xhci_pci" "thunderbolt" "uas" "usbhid" "sd_mod"];
@ -13,13 +17,13 @@
boot.kernelModules = ["kvm-amd"]; boot.kernelModules = ["kvm-amd"];
boot.extraModulePackages = []; boot.extraModulePackages = [];
fileSystems."/" = fileSystems."/" = {
{ device = "/dev/disk/by-uuid/af8fdb25-74d8-4b33-8413-bdcb66e0d22a"; device = "/dev/disk/by-uuid/af8fdb25-74d8-4b33-8413-bdcb66e0d22a";
fsType = "ext4"; fsType = "ext4";
}; };
fileSystems."/boot" = fileSystems."/boot" = {
{ device = "/dev/disk/by-uuid/58D5-0C06"; device = "/dev/disk/by-uuid/58D5-0C06";
fsType = "vfat"; fsType = "vfat";
options = ["fmask=0077" "dmask=0077"]; options = ["fmask=0077" "dmask=0077"];
}; };

View File

@ -1,18 +1,30 @@
{ lib, inputs, config, pkgs, username, project, 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 project; 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"
".config/gtk-4.0/gtk.css.backup" ".config/gtk-4.0/gtk.css.backup"
".config/gtk-4.0/settings.ini.backup" ".config/gtk-4.0/settings.ini.backup"
".config/niri/config.kdl" ".config/niri/config.kdl"
]; }) ];
})
]; ];
imports = [ imports = [
@ -37,7 +49,6 @@
programs = { programs = {
home-manager = {enable = true;}; home-manager = {enable = true;};
zoxide = { zoxide = {
enable = true; enable = true;
#enableZshIntegration = true; #enableZshIntegration = true;
@ -56,7 +67,6 @@
}; };
}; };
git = { git = {
enable = true; enable = true;
settings = { settings = {
@ -80,7 +90,6 @@
path = "${username}.default"; path = "${username}.default";
isDefault = true; isDefault = true;
settings = { settings = {
}; };
}; };
}; };
@ -101,9 +110,7 @@
OfferToSaveLogins = false; OfferToSaveLogins = false;
DisplayBookmarksToolbar = "always"; # alternatives: "always" or "newtab" DisplayBookmarksToolbar = "always"; # alternatives: "always" or "newtab"
ExtensionSettings = ExtensionSettings = with builtins; let
with builtins;
let
extension = shortId: uuid: { extension = shortId: uuid: {
name = uuid; name = uuid;
value = { value = {

View File

@ -1,5 +1,9 @@
{ config, inputs, pkgs, ... }:
{ {
config,
inputs,
pkgs,
...
}: {
imports = [ imports = [
]; ];
@ -7,8 +11,7 @@
./home.nix ./home.nix
]; ];
environment.systemPackages = with pkgs; environment.systemPackages = with pkgs; [
[
hyprlock hyprlock
]; ];
} }

View File

@ -1,6 +1,9 @@
{pkgs, inputs, username, ...}:
{ {
pkgs,
inputs,
username,
...
}: {
imports = [ imports = [
]; ];

View File

@ -1,5 +1,9 @@
{ config, inputs, pkgs, ... }:
{ {
config,
inputs,
pkgs,
...
}: {
imports = [ imports = [
]; ];
@ -7,8 +11,7 @@
./home.nix ./home.nix
]; ];
environment.systemPackages = with pkgs; environment.systemPackages = with pkgs; [
[
hyprpaper hyprpaper
]; ];
} }

View File

@ -1,6 +1,10 @@
{pkgs, inputs, username, project, ...}:
{ {
pkgs,
inputs,
username,
project,
...
}: {
imports = [ imports = [
]; ];

View File

@ -3,11 +3,15 @@
#nmcli device wifi connect <ssid> password <password> #nmcli device wifi connect <ssid> password <password>
# or if no password (open wifi) # or if no password (open wifi)
#nmcli device wifi connect <ssid> #nmcli device wifi connect <ssid>
{ config, pkgs, lib, username, version, ... }:
{ {
imports = config,
[ pkgs,
lib,
username,
version,
...
}: {
imports = [
./hardware-configuration.nix ./hardware-configuration.nix
./zsh.nix ./zsh.nix
#./ncli.nix #./ncli.nix

View File

@ -261,6 +261,9 @@ in
cd "$HOME/$PROJECT" || { echo "Error: Could not change to $HOME/$PROJECT"; exit 1; } cd "$HOME/$PROJECT" || { echo "Error: Could not change to $HOME/$PROJECT"; exit 1; }
git status git status
;; ;;
format)
nix fmt .
;;
trim) trim)
echo "Running 'sudo fstrim -v /' may take a few minutes and impact system performance." echo "Running 'sudo fstrim -v /' may take a few minutes and impact system performance."
read -p "Enter to run now or enter to exit (y/N): " -n 1 -r read -p "Enter to run now or enter to exit (y/N): " -n 1 -r

View File

@ -1,7 +1,11 @@
{ inputs, config, lib, pkgs, ... }:
{ {
environment.systemPackages = with pkgs; inputs,
[ config,
lib,
pkgs,
...
}: {
environment.systemPackages = with pkgs; [
neovim neovim
vimPlugins.LazyVim vimPlugins.LazyVim
vimPlugins.lazygit-nvim vimPlugins.lazygit-nvim
@ -13,7 +17,6 @@
./home.nix ./home.nix
]; ];
# programs.neovim = { # programs.neovim = {
# enable = true; # enable = true;
#}; #};

View File

@ -1,5 +1,10 @@
{ inputs, config, lib, pkgs, ... }:
{ {
inputs,
config,
lib,
pkgs,
...
}: {
imports = [ imports = [
inputs.nixvim.homeModules.nixvim inputs.nixvim.homeModules.nixvim
]; ];

View File

@ -1,5 +1,10 @@
{config, pkgs, libs, inputs, ...}:
{ {
config,
pkgs,
libs,
inputs,
...
}: {
environment.systemPackages = with pkgs; [ environment.systemPackages = with pkgs; [
#CLI tools #CLI tools
pdftk #PDF toolkit pdftk #PDF toolkit

View File

@ -1,5 +1,4 @@
{ ... }: {...}: {
{
imports = [ imports = [
./desktop.nix ./desktop.nix
./cli.nix ./cli.nix

View File

@ -1,7 +1,11 @@
{config, pkgs, libs, inputs, ...}:
{ {
config,
pkgs,
libs,
inputs,
...
}: {
environment.systemPackages = with pkgs; [ environment.systemPackages = with pkgs; [
#Programming #Programming
jetbrains.pycharm #The PyCharm IDE to edit Python code jetbrains.pycharm #The PyCharm IDE to edit Python code
jetbrains.idea #The IntelliJ IDE to edit Java code jetbrains.idea #The IntelliJ IDE to edit Java code

View File

@ -1,5 +1,12 @@
{config, pkgs, libs, inputs, system, alejandra, ...}:
{ {
config,
pkgs,
libs,
inputs,
system,
alejandra,
...
}: {
environment.systemPackages = with pkgs; [ environment.systemPackages = with pkgs; [
#Essentials (CLI Only) #Essentials (CLI Only)
wget #A tool for quickly downloading things from the Web wget #A tool for quickly downloading things from the Web

View File

@ -1,5 +1,11 @@
{config, pkgs, libs, inputs, nix-flatpak, ...}:
{ {
config,
pkgs,
libs,
inputs,
nix-flatpak,
...
}: {
services.flatpak = { services.flatpak = {
enable = true; enable = true;

View File

@ -1,8 +1,10 @@
{ pkgs, inputs, username, ... }:
{ {
pkgs,
imports = inputs,
[ username,
...
}: {
imports = [
inputs.stylix.nixosModules.stylix inputs.stylix.nixosModules.stylix
]; ];

View File

@ -1,6 +1,9 @@
{pkgs, inputs, username, ...}:
{ {
pkgs,
inputs,
username,
...
}: {
imports = [ imports = [
]; ];

View File

@ -1,5 +1,4 @@
{ ... }: {...}: {
{
# xdg.configFile."waybar/config.jsonc".source = ./config.jsonc; # xdg.configFile."waybar/config.jsonc".source = ./config.jsonc;
# xdg.configFile."waybar/style.css".source = ./style.css; # xdg.configFile."waybar/style.css".source = ./style.css;
} }

View File

@ -1,4 +1,10 @@
{ config, pkgs, username, project, ... }: { {
config,
pkgs,
username,
project,
...
}: {
programs.zsh = { programs.zsh = {
enable = true; enable = true;
enableCompletion = false; enableCompletion = false;

View File

@ -1,6 +1,10 @@
{ config, pkgs, username, project, ... }:
{ {
config,
pkgs,
username,
project,
...
}: {
#To show logs of services run: #To show logs of services run:
#journalctl --user-unit={service-name} --user #journalctl --user-unit={service-name} --user
systemd.user.services.niri-waybar = { systemd.user.services.niri-waybar = {

View File

@ -1,5 +1,9 @@
{ config, inputs, pkgs, ... }:
{ {
config,
inputs,
pkgs,
...
}: {
imports = [ imports = [
./autostart.nix ./autostart.nix
../modules/hyprlock ../modules/hyprlock
@ -11,8 +15,7 @@
./home.nix ./home.nix
]; ];
environment.systemPackages = with pkgs; environment.systemPackages = with pkgs; [
[
#mako #mako
fuzzel fuzzel
waybar waybar
@ -26,11 +29,11 @@
xwayland.enable = true; xwayland.enable = true;
}; };
#services.xserver.enable = true; #services.xserver.enable = true;
#services.xserver.displayManager.sddm.enable = true; #services.xserver.displayManager.sddm.enable = true;
xdg.portal = { #Needed for waybar xdg.portal = {
#Needed for waybar
enable = true; enable = true;
extraPortals = [pkgs.xdg-desktop-portal-gtk pkgs.xdg-desktop-portal-wlr]; extraPortals = [pkgs.xdg-desktop-portal-gtk pkgs.xdg-desktop-portal-wlr];
config.common.default = "*"; config.common.default = "*";
@ -38,5 +41,4 @@
#sound.enable = true; #sound.enable = true;
#security.rtkit.enable = true; #security.rtkit.enable = true;
} }

View File

@ -1,6 +1,8 @@
{pkgs, inputs, ...}:
{ {
pkgs,
inputs,
...
}: {
imports = [ imports = [
inputs.niri.homeModules.niri inputs.niri.homeModules.niri
../modules/waybar/home.nix ../modules/waybar/home.nix

View File

@ -1,6 +1,10 @@
{ config, pkgs, username, project, ... }:
{ {
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
systemd.user.services.autostart-yakuake = { systemd.user.services.autostart-yakuake = {

View File

@ -1,5 +1,10 @@
{config, pkgs, username, project, ...}: {
let config,
pkgs,
username,
project,
...
}: 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 {
name = "background-image"; name = "background-image";
@ -12,10 +17,8 @@ let
plasmaTheme = "desktop"; #Possible values are "laptop" or "desktop" plasmaTheme = "desktop"; #Possible values are "laptop" or "desktop"
powerProfile = "laptop"; #Possible values are "laptop" or "desktop" powerProfile = "laptop"; #Possible values are "laptop" or "desktop"
in in {
{ imports = [
imports =
[
./autostart.nix ./autostart.nix
../modules/stylix ../modules/stylix
]; ];
@ -75,7 +78,6 @@ in
''; '';
environment = { environment = {
plasma6.excludePackages = with pkgs; [ plasma6.excludePackages = with pkgs; [
kdePackages.elisa kdePackages.elisa
]; ];

View File

@ -1,7 +1,14 @@
{pkgs, lib, inputs, username, project, plasmaTheme, ...}:
{ {
pkgs,
imports = [ lib,
inputs,
username,
project,
plasmaTheme,
...
}: {
imports =
[
./settings/common.nix ./settings/common.nix
./settings/powerProfile.nix ./settings/powerProfile.nix
] ]

View File

@ -1,5 +1,11 @@
{pkgs, inputs, username, project, plasmaTheme, ...}:
{ {
pkgs,
inputs,
username,
project,
plasmaTheme,
...
}: {
programs = { programs = {
plasma = { plasma = {
enable = true; enable = true;
@ -51,7 +57,6 @@
"Switch to Next Keyboard Layout" = []; "Switch to Next Keyboard Layout" = [];
}; };
#kaccess."Toggle Screen Reader On and Off" = "Meta+Alt+S"; #kaccess."Toggle Screen Reader On and Off" = "Meta+Alt+S";
#kcm_touchpad."Disable Touchpad" = "Touchpad Off"; #kcm_touchpad."Disable Touchpad" = "Touchpad Off";
#kcm_touchpad."Enable Touchpad" = "Touchpad On"; #kcm_touchpad."Enable Touchpad" = "Touchpad On";

View File

@ -1,5 +1,11 @@
{pkgs, inputs, username, project, plasmaTheme, ...}:
{ {
pkgs,
inputs,
username,
project,
plasmaTheme,
...
}: {
programs = { programs = {
plasma = { plasma = {
overrideConfig = true; overrideConfig = true;
@ -21,7 +27,8 @@
launchers = [ launchers = [
# optional pinned apps # optional pinned apps
"applications:org.kde.dolphin.desktop" "applications:org.kde.dolphin.desktop"
"applications:systemsettings.desktop""applications:kitty.desktop" "applications:systemsettings.desktop"
"applications:kitty.desktop"
"applications:firefox.desktop" "applications:firefox.desktop"
]; ];
}; };

View File

@ -1,6 +1,11 @@
{pkgs, inputs, username, project, plasmaTheme, ...}:
{ {
pkgs,
inputs,
username,
project,
plasmaTheme,
...
}: {
programs = { programs = {
plasma = { plasma = {
overrideConfig = true; overrideConfig = true;
@ -111,13 +116,13 @@
launchers = [ launchers = [
# optional pinned apps # optional pinned apps
"applications:org.kde.dolphin.desktop" "applications:org.kde.dolphin.desktop"
"applications:systemsettings.desktop""applications:kitty.desktop" "applications:systemsettings.desktop"
"applications:kitty.desktop"
"applications:firefox.desktop" "applications:firefox.desktop"
]; ];
}; };
}; };
} }
]; ];
} }
]; ];

View File

@ -1,5 +1,11 @@
{pkgs, inputs, username, project, powerProfile, ...}: {
let pkgs,
inputs,
username,
project,
powerProfile,
...
}: let
profiles = { profiles = {
laptop = { laptop = {
AC.powerProfile = "powerSaving"; AC.powerProfile = "powerSaving";
@ -14,8 +20,7 @@ let
}; };
selectedProfile = profiles.${powerProfile}; selectedProfile = profiles.${powerProfile};
in in {
{
programs = { programs = {
plasma = { plasma = {
overrideConfig = true; overrideConfig = true;