formatting/commenting flake.nix and core/

This commit is contained in:
serenity-F 2026-03-02 20:15:43 +10:00
parent 038e21a444
commit 9edc913a1d
No known key found for this signature in database
8 changed files with 176 additions and 191 deletions

View file

@ -58,7 +58,7 @@
''; '';
}; };
## Musnix for audio production # Musnix for audio production
musnix = { musnix = {
enable = true; enable = true;
rtcqs.enable = true; rtcqs.enable = true;
@ -66,10 +66,10 @@
kernel.realtime = true; kernel.realtime = true;
}; };
## Pipewire baybee # Pipewire baybee
services = { services = {
## Not using pulse directly # Not using pulse directly
pulseaudio = { enable = false; }; pulseaudio = { enable = false; };
pipewire = { pipewire = {
@ -82,7 +82,7 @@
support32Bit = true; support32Bit = true;
}; };
## Low latency config # Low latency config
extraConfig = { extraConfig = {
pipewire."92-low-latency" = { pipewire."92-low-latency" = {
"context.properties" = { "context.properties" = {

View file

@ -4,30 +4,28 @@
imports = [ imports = [
## Not sure wei need the home-manager import here # Not sure we need the home-manager import here
inputs.home-manager.nixosModules.home-manager inputs.home-manager.nixosModules.home-manager
## Semi-modularised config # Semi-modularised config
../home # user-level packages in ../home/programs/ ../home # user-level/additional packages
## Shared modules to import # Shared modules to import
./audio.nix ./audio.nix # musnix and audio options
./display.nix ./display.nix # base display and output options
./regreet.nix ./regreet.nix # login manager
./packages.nix ./packages.nix # core/essential packages
]; ];
## Core security options # Core security options
security = { security = {
sudo.execWheelOnly = true; # sets sudo auth to @wheel only sudo.execWheelOnly = true; # sets sudo auth to @wheel only
#soteria.enable = true; # enables soteria polkit
# - disabled forNow:tm: - https://github.com/NixOS/nixpkgs/issues/379104
polkit = { # enables system polkit ??? polkit = { # enables system polkit ???
enable = true; enable = true;
#extraConfig = '' '';
}; };
## Increasing max open files - needed for my huge ass bloaty flake ## Temporarily ncreasing max open files
## needed for my huge ass bloaty flake
pam.loginLimits = [{ pam.loginLimits = [{
domain = "*"; domain = "*";
type = "soft"; type = "soft";
@ -36,9 +34,8 @@
}]; }];
}; };
systemd.settings.Manager = { DefaultLimitNOFILE = "8192:524288"; }; systemd.settings.Manager = { DefaultLimitNOFILE = "8192:524288"; };
## test line
## Settings for the nix package manager and daemon # Settings for the nix package manager and daemon
nix = { nix = {
settings = { settings = {
cores = 6; # sets nix to use most available cores during rebuild cores = 6; # sets nix to use most available cores during rebuild
@ -61,7 +58,8 @@
"flakes" # flakes are vv important nya "flakes" # flakes are vv important nya
]; ];
}; };
gc = { # garbage collection # Garbage collection
gc = {
automatic = true; # do garbage collection automagically automatic = true; # do garbage collection automagically
dates = "daily"; # every day dates = "daily"; # every day
options = "--delete-older-than 3d"; # and clear junk older than x days options = "--delete-older-than 3d"; # and clear junk older than x days
@ -69,7 +67,7 @@
}; };
}; };
## Hardware settings # Hardware settings
hardware = { hardware = {
enableAllFirmware = true; # enables all firmware modules enableAllFirmware = true; # enables all firmware modules
sensor.hddtemp = { # enables temperature readings for mechanical drives sensor.hddtemp = { # enables temperature readings for mechanical drives
@ -80,7 +78,7 @@
usbStorage.manageShutdown = true; # shrugge usbStorage.manageShutdown = true; # shrugge
}; };
## Manual pages and caching # Manual pages and caching
environment.systemPackages = with pkgs; environment.systemPackages = with pkgs;
[ man-pages ]; # adds manual pages to system packages for ease of access [ man-pages ]; # adds manual pages to system packages for ease of access
documentation = { documentation = {
@ -90,19 +88,7 @@
#nixos.includeAllModules = true; #nixos.includeAllModules = true;
}; };
## SystemD tweaks # Locale settings
systemd = {
# extraConfig = "DefaultTimeoutStopSec=10s"; # apparently prevents getting stuck at shutdown
# settings.Manager = "";
services = { # Disable these cuz they cause problems (thx sasha)
# see: https://github.com/NixOS/nixpkgs/issues/180175
networkManager-wait-online.enable = lib.mkForce false;
systemd-networkd-wait-online.enable = lib.mkForce false;
};
};
## Crikey !
## Don't forget to set your& locale settings !
time.timeZone = "Australia/Brisbane"; time.timeZone = "Australia/Brisbane";
i18n = { i18n = {
defaultLocale = "en_AU.UTF-8"; defaultLocale = "en_AU.UTF-8";
@ -118,7 +104,7 @@
}; };
}; };
## Make sure this is set ! # Make sure this is set !
system = { stateVersion = "24.11"; }; system = { stateVersion = "24.11"; };
} }

View file

@ -8,7 +8,7 @@
}; };
}; };
## Boot/GRUB options # Boot/GRUB options
boot = { boot = {
#bootspec.enable = true; #bootspec.enable = true;
#consoleLogLevel = 0; #consoleLogLevel = 0;
@ -52,7 +52,7 @@
}; };
}; };
## Display related options # Display related options
xdg.mime.enable = xdg.mime.enable =
true; # may be unneeded here as already declared in `home/desktop/xdg-mime.nix` true; # may be unneeded here as already declared in `home/desktop/xdg-mime.nix`
services.xserver.enable = true; # xserver still needed for xwayland stuff services.xserver.enable = true; # xserver still needed for xwayland stuff
@ -132,22 +132,21 @@
## Dunno if i did this right, but possible needed for keyring/polkit stuff ? ## Dunno if i did this right, but possible needed for keyring/polkit stuff ?
security.pam.services.serenity.enableGnomeKeyring = true; security.pam.services.serenity.enableGnomeKeyring = true;
## Move this
programs = { programs = {
gnome-disks.enable = true; # For when bimbo needs to manage disks gnome-disks.enable = true; # For when bimbo needs to manage disks
seahorse.enable = true; # GTK secrets management seahorse.enable = true; # GTK secrets management
droidcam.enable = true; # Use android device as a webcam droidcam.enable = true; # Use android device as a webcam
obs-studio = { # screen capture, recording, and sharing obs-studio = { # screen capture, recording, and sharing
enable = true; enable = true;
enableVirtualCamera = true; # virtual webcam enableVirtualCamera = true; # virtual webcam
plugins = with pkgs.obs-studio-plugins; plugins = with pkgs.obs-studio-plugins; [
[
#droidcam-obs # enables droidcam integration #droidcam-obs # enables droidcam integration
]; ];
}; };
}; };
## Move these
services = { services = {
libinput.enable = true; # don't think we NEED this tbh - unsure libinput.enable = true; # don't think we NEED this tbh - unsure
#gvfs.enable = true; # virtual filesystem, needed this for ... something #gvfs.enable = true; # virtual filesystem, needed this for ... something

View file

@ -1,7 +1,7 @@
{ pkgs, inputs, ... }: { pkgs, inputs, ... }:
{ {
## Open tablet driver, for Osu!, mainly. # Open tablet driver, for Osu!, mainly.
hardware.opentabletdriver = { hardware.opentabletdriver = {
enable = true; # Enables the driver lol enable = true; # Enables the driver lol
daemon.enable = true; # Enables the daemon via systemd daemon.enable = true; # Enables the daemon via systemd
@ -15,9 +15,8 @@
environment = { environment = {
## Games and misc. # Games and misc.
systemPackages = with pkgs; systemPackages = with pkgs; [
[
piper # Mouse config piper # Mouse config
vassal # FOSSy board game sim vassal # FOSSy board game sim
cockatrice # Magical the gathering, but free cockatrice # Magical the gathering, but free
@ -27,7 +26,7 @@
#inputs.nix-gaming.packages.${pkgs.system}.osu-lazer-bin # Not using this one but still want it here lol #inputs.nix-gaming.packages.${pkgs.system}.osu-lazer-bin # Not using this one but still want it here lol
]; ];
## These are important apparently :uh: # These are important apparently :uh:
sessionVariables = { sessionVariables = {
XDG_CACHE_HOME = "$HOME/.cache"; XDG_CACHE_HOME = "$HOME/.cache";
XDG_CONFIG_HOME = "$HOME/.config"; XDG_CONFIG_HOME = "$HOME/.config";
@ -46,17 +45,17 @@
programs = { programs = {
## Java, just in case i guess ? # Java, just in case i guess ?
java.enable = true; java.enable = true;
## This should help games run more betterer # This should help games run more betterer
gamescope = { gamescope = {
enable = true; enable = true;
capSysNice = true; capSysNice = true;
}; };
## "GameMode" - https://nixos.wiki/wiki/Gamemode # "GameMode" - https://nixos.wiki/wiki/Gamemode
## (config copy-pasted from mynixos) # (config copy-pasted from mynixos)
gamemode = { gamemode = {
enable = false; enable = false;
settings = { settings = {
@ -74,32 +73,31 @@
}; };
}; };
## Steam itself # Steam itself
steam = { steam = {
## Enables steam itself # Enables steam itself
enable = true; enable = true;
## Enables protontricks # Enables protontricks
protontricks.enable = true; protontricks.enable = true;
## This should help games run more betterer # This should help games run more betterer
gamescopeSession.enable = true; gamescopeSession.enable = true;
## No clue what this is doing ## No clue what this is doing
#package = pkgs.steam.override { #package = pkgs.steam.override {
# extraLibraries = pkgs: [ pkgs.xorg.libxcb ]; #extraLibraries = pkgs: [ pkgs.xorg.libxcb ];
# ## No clue what this shit does ## No clue what this shit does
# extraPkgs = pkgs: #extraPkgs = pkgs:
# with pkgs; #with pkgs; [
# [ #libpng
# libpng #libpulseaudio
# libpulseaudio #libvorbis
# libvorbis #stdenv.cc.cc.lib
# stdenv.cc.cc.lib #libkrb5
# libkrb5 #keyutils
# keyutils #gamemode
# #gamemode #] ++ (with pkgs.xorg; [ libXi libXcursor libXinerama libXScrnSaver ]);
# ] ++ (with pkgs.xorg; [ libXi libXcursor libXinerama libXScrnSaver ]);
#}; #};
#extraPackages = with pkgs; [ ]; #extraPackages = with pkgs; [ ];
## Gotta have the glorious eggroll # Gotta have the glorious eggroll
extraCompatPackages = with pkgs; [ proton-ge-bin ]; extraCompatPackages = with pkgs; [ proton-ge-bin ];
}; };

View file

@ -4,11 +4,10 @@
imports = [ ]; imports = [ ];
## Activation Scripts # Activation Scripts - runs after using `sudo nixos-rebuild switch`
## - these run after using `sudo nixos-rebuild switch`
system.activationScripts.diff = { system.activationScripts.diff = {
supportsDryActivation = true; supportsDryActivation = true;
## Prints diff of the nix store and a cute message if rebuild successful # Prints diff of the nix store and a cute message if rebuild successful
text = '' text = ''
${pkgs.nvd}/bin/nvd --nix-bin-dir=${pkgs.nix}/bin diff \ ${pkgs.nvd}/bin/nvd --nix-bin-dir=${pkgs.nix}/bin diff \
/run/current-system "$systemConfig" /run/current-system "$systemConfig"
@ -20,22 +19,23 @@
## Nixpkgs Settings ## Nixpkgs Settings
nixpkgs = { nixpkgs = {
config = { config = {
## Not doing full-FOSS lol
# Not doing full-FOSS lol
allowUnfree = true; allowUnfree = true;
allowBroken = true; allowBroken = true;
## Place insecure packages here # Place insecure packages here
#permittedInsecurePackages = [ #permittedInsecurePackages = [
#"olm-3.2.16" #"olm-3.2.16"
#]; #];
## Place package overrides here # Place package overrides here
#packageOverrides = pkgs: { #packageOverrides = pkgs: {
#sygil-plymouth = pkgs.callPackage /home/serenity/repos/sygil-plymouth/package.nix { }; #sygil-plymouth = pkgs.callPackage /home/serenity/repos/sygil-plymouth/package.nix { };
#}; #};
}; };
## Place package overlays here # Place package overlays here
overlays = [ overlays = [
niri.overlays.niri niri.overlays.niri
#inputs.tidalcycles.overlays.default #inputs.tidalcycles.overlays.default
@ -68,57 +68,58 @@
## System-level Programs ## System-level Programs
programs = { programs = {
# Core terminal suite
git = { enable = true; }; # Mandatory version control git = { enable = true; }; # Mandatory version control
fish = { enable = true; }; # A catgirls favourite shell fish = { enable = true; }; # A catgirls favourite shell
neovim = { enable = true; }; # Neovim declared here too, just in case neovim = { enable = true; }; # Neovim declared here too, just in case
## NixOS CLI helper # NixOS CLI helper
nh = { nh = {
enable = true; enable = true;
flake = "${flakePath}"; # Declared in flake.nix flake = "${flakePath}"; # Declared in flake.nix
}; };
## For handling encryption keys # For handling encryption keys
gnupg.agent = { gnupg.agent = {
enable = true; enable = true;
enableSSHSupport = true; enableSSHSupport = true;
#pinentryPackage = [ ]; #pinentryPackage = [ ];
}; };
## For running unpackaged binaries # For running unpackaged binaries
nix-ld = { nix-ld = {
enable = true; enable = true;
#libraries = with pkgs; [ ]; #libraries = with pkgs; [ ];
}; };
## To run "normal" linux applications seamlessly # To run "normal" linux applications seamlessly
appimage = { appimage = {
enable = true; enable = true;
binfmt = true; binfmt = true;
}; };
}; };
## Flatpak, just in case # Flatpak, just in case
services.flatpak.enable = true; services.flatpak.enable = true;
environment = { environment = {
## Environment Variables # Environment Variables
variables = { # sets neovim to default editor in other apps variables = { # sets neovim to default editor in other apps
EDITOR = "nvim"; EDITOR = "nvim";
VISUAL = "nvim"; VISUAL = "nvim";
SYSTEMD_EDITOR = "nvim"; SYSTEMD_EDITOR = "nvim";
}; };
## Install a stub ELF loader to print an informative # Install a stub ELF loader to print an informative
## error message in the event that a user attempts # error message in the event that a user attempts
## to run an ELF binary not compiled for NixOS. # to run an ELF binary not compiled for NixOS.
stub-ld.enable = true; stub-ld.enable = true;
## System-level Packages ## System-level Packages
systemPackages = with pkgs; [ systemPackages = with pkgs; [
## Nix specific tools # Nix specific tools
#cabal2nix #cabal2nix
nix-tree # Dependency tree viewer for nix store nix-tree # Dependency tree viewer for nix store
nix-init # Generate nix packages from URLs nix-init # Generate nix packages from URLs
@ -126,13 +127,13 @@
nix-prefetch # provides info on a url nix-prefetch # provides info on a url
nix-output-monitor # Shows extra information on nix commands nix-output-monitor # Shows extra information on nix commands
## Filsesystem utilities # Filsesystem utilities
ddrutility # Set of tools for HDD rescure ddrutility # Set of tools for HDD rescure
exfatprogs # ExFAT filesystem exfatprogs # ExFAT filesystem
btrfs-progs # BTRFS filesystem btrfs-progs # BTRFS filesystem
ntfs3g # NTFS filesystem ntfs3g # NTFS filesystem
## CLI tools & utilities # CLI tools & utilities
fd # Find, but faster fd # Find, but faster
bc # Calculator bc # Calculator
zip # What it says on the tin zip # What it says on the tin

View file

@ -1,6 +1,6 @@
{ pkgs, primaryUser, homeDirectory, flakePath, ... }: { pkgs, primaryUser, homeDirectory, flakePath, ... }:
## Allows regreet to be bootstrapped by sway # Allows regreet to be bootstrapped by sway
let let
swayConfig = pkgs.writeText "greetd-sway-config" '' swayConfig = pkgs.writeText "greetd-sway-config" ''
exec "${pkgs.regreet}/bin/regreet; swaymsg exit" exec "${pkgs.regreet}/bin/regreet; swaymsg exit"
@ -30,12 +30,12 @@ in {
''; '';
}; };
## ReGreet specific configuration and theme # ReGreet specific configuration and theme
programs.regreet = { programs.regreet = {
enable = true; enable = true;
#package = [ ]; #package = [ ];
## Appearance # Appearance
font = { font = {
name = "Spleen-32x64"; name = "Spleen-32x64";
size = 16; size = 16;
@ -80,7 +80,7 @@ in {
label_width = 150; # will need adjustment label_width = 150; # will need adjustment
}; };
## Other # Other
commands = { commands = {
reboot = [ "systemctl" "reboot" ]; reboot = [ "systemctl" "reboot" ];
poweroff = [ "systemctl" "poweroff" ]; poweroff = [ "systemctl" "poweroff" ];

View file

@ -1,9 +1,10 @@
# # ZFS Support NixOS module # ZFS Support NixOS module
{ config, lib, pkgs, ... }: { config, lib, pkgs, ... }:
## Black magic wizardry from https://wiki.nixos.org/wiki/ZFS
## - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
let let
## Black magic wizardry from https://wiki.nixos.org/wiki/ZFS
## - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
zfsCompatibleKernelPackages = lib.filterAttrs (name: kernelPackages: zfsCompatibleKernelPackages = lib.filterAttrs (name: kernelPackages:
(builtins.match "linux_[0-9]+_[0-9]+" name) != null (builtins.match "linux_[0-9]+_[0-9]+" name) != null
&& (builtins.tryEval kernelPackages).success && (builtins.tryEval kernelPackages).success
@ -12,27 +13,23 @@ let
latestKernelPackage = lib.last latestKernelPackage = lib.last
(lib.sort (a: b: (lib.versionOlder a.kernel.version b.kernel.version)) (lib.sort (a: b: (lib.versionOlder a.kernel.version b.kernel.version))
(builtins.attrValues zfsCompatibleKernelPackages)); (builtins.attrValues zfsCompatibleKernelPackages));
in {
## - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ## - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
## Enable zfs in kernel and boot in {
# Enable zfs in kernel and boot
boot = { boot = {
## Sets system to use the kernel specified in the let binding above # Sets system to use the kernel specified in the let binding above
kernelPackages = lib.mkForce latestKernelPackage; kernelPackages = lib.mkForce latestKernelPackage;
supportedFilesystems = [ "zfs" ]; supportedFilesystems = [ "zfs" ];
zfs = { zfs = {
## uhhh
#extraPools = [ "orcus" ]; #extraPools = [ "orcus" ];
## uhhh
#forceImportRoot = false; #forceImportRoot = false;
}; };
}; };
networking = { hostId = "603b0c8b"; }; # Unsure why this is here actually ?
## Adding ZFS package to system just in case
environment.systemPackages = with pkgs; [ zfs ]; environment.systemPackages = with pkgs; [ zfs ];
networking = { hostId = "603b0c8b"; }; # Unsure why this is here actually ?
## Enable trim for ZFS SSDs
services = { services = {
zfs = { zfs = {
#trim.enable = true; # zfs trim service for SSDS #trim.enable = true; # zfs trim service for SSDS

158
flake.nix
View file

@ -11,137 +11,131 @@
# #
# :D # :D
# #
# Formatting example:
# #
# Oh also, code-commenting is done like so: # ## <URGENT MESSAGE>
# # ## Section Heading - <relevantLink>
# - To mark a new SECTION of code, use two hashes (#) # # <additionalLongerRelevantLink>
# and a space on the line BEFORE but with the same # # <alternateSectionHeading> - <relevantLink>
# indentation as the relevant code.
#
# - A hash BEFORE the code is the standard for
# temporarily disabling a segment.
#
# - A hash one space AFTER but on the same line
# as the code lets you add any thoughts.
#
#
# Example:
#
# ## Section Heading - <relevant link>
# nixos.module = { # needed for x thing # nixos.module = { # needed for x thing
# option = true; # option = true; ## URGENT MESSAGE
# #otherOption = [ "$string" ]; # disabled for z reason # #otherOption = [ "$string" ]; # disabled for z reason
# differentOption = '' # needed to make y thing work # differentOption = '' # needed to make y thing work
# text_config1 = auto # text_config1 = auto; # does b
# text_config2 = yes # text_config2 = yes; # does d
# ''; # '';
# }; # };
# #
# - - - - - - - - - - - - - - - - - - - - - - - - # - - - - - - - - - - - - - - - - - - - - - - - -
# #
{ {
description = "SerenityOS"; description = "SerenityOS";
## Latest features:p
## - Exposed large portions of `home/` import path
## - Abandoned multi-user support for now
## - Work on commenting and reformating flake is ongoing
inputs = { inputs = {
## NixOS Core and Utilities ## NixOS Core and Utilities
# - Nixpkgs version - https://github.com/NixOS/nixpkgs
# Nixpkgs version - https://github.com/NixOS/nixpkgs
nixpkgs = { url = "github:nixos/nixpkgs/nixos-unstable"; }; nixpkgs = { url = "github:nixos/nixpkgs/nixos-unstable"; };
# - NixOS hardware - https://github.com/NixOS/nixos-hardware
# NixOS hardware - https://github.com/NixOS/nixos-hardware
hardware = { url = "github:nixos/nixos-hardware"; }; hardware = { url = "github:nixos/nixos-hardware"; };
# - Flake utils - https://github.com/numtide/flake-utils
# Flake utils - https://github.com/numtide/flake-utils
flake-utils = { url = "github:numtide/flake-utils"; }; flake-utils = { url = "github:numtide/flake-utils"; };
# - Flake parts - https://github.com/hercules-ci/flake-parts
# Flake parts - https://github.com/hercules-ci/flake-parts
flake-parts = { url = "github:hercules-ci/flake-parts"; }; flake-parts = { url = "github:hercules-ci/flake-parts"; };
## Secrets management & Synchronisation # Secrets management - https://github.com/Mic92/sops-nix
# - https://github.com/Mic92/sops-nix
sops-nix = { url = "github:Mic92/sops-nix"; }; sops-nix = { url = "github:Mic92/sops-nix"; };
## Window Management & Desktop ## Window Management & Desktop
# Niri window manager
# - https://github.com/YaLTeR/niri # Niri window manager - https://github.com/YaLTeR/niri
# - https://github.com/sodiboo/niri-flake/ # - https://github.com/sodiboo/niri-flake/
niri = { niri = {
url = "github:sodiboo/niri-flake"; url = "github:sodiboo/niri-flake";
inputs.nixpkgs.follows = "nixpkgs"; inputs.nixpkgs.follows = "nixpkgs";
}; };
# Hassle free desktop shell
# - https://docs.noctalia.dev/getting-started/nixos/ # Hassle free desktop shell - https://docs.noctalia.dev/getting-started/nixos/
noctalia = { noctalia = {
url = "github:noctalia-dev/noctalia-shell"; url = "github:noctalia-dev/noctalia-shell";
inputs.nixpkgs.follows = "nixpkgs"; inputs.nixpkgs.follows = "nixpkgs";
}; };
# Zoomer text editor
# - https://github.com/nix-community/nixvim ## Dotfiles & Theme Management
# Declarative dots - https://github.com/nix-community/home-manager
home-manager = {
url = "github:nix-community/home-manager";
inputs.nixpkgs.follows = "nixpkgs";
};
# Zoomer text editor - https://github.com/nix-community/nixvim
nixvim = { nixvim = {
url = "github:nix-community/nixvim"; url = "github:nix-community/nixvim";
inputs.nixpkgs.follows = "nixpkgs"; inputs.nixpkgs.follows = "nixpkgs";
}; };
## Sound & Multimedia
# Sound driver optimisations
# - https://github.com/musnix/musnix
musnix = { url = "github:musnix/musnix"; };
# Programmatic music language
# - https://github.com/mitchmindtree/tidalcycles.nix
tidalcycles = {
url = "github:mitchmindtree/tidalcycles.nix";
inputs.nixpkgs.follows = "nixpkgs";
};
# Nice-to-haves for gaming
# - https://github.com/fufexan/nix-gaming
nix-gaming = { url = "github:fufexan/nix-gaming"; };
## Dotfiles & Theme management
# Declarative dots
# - https://github.com/nix-community/home-manager
home-manager = {
url = "github:nix-community/home-manager";
inputs.nixpkgs.follows = "nixpkgs";
};
# Easy themeing (Switch to stylix) - # Easy themeing (Switch to stylix) -
# - https://github.com/nix-community/stylix # - https://github.com/nix-community/stylix
# - https://github.com/Misterio77/nix-colors # - https://github.com/Misterio77/nix-colors
stylix = { url = "github:danth/stylix"; }; stylix = { url = "github:danth/stylix"; };
nix-colors = { url = "github:misterio77/nix-colors"; }; nix-colors = { url = "github:misterio77/nix-colors"; };
# Custom 'Sygil' plymouth boot theme [WIP]
# - https://codeberg.org/serenity-F/sygil-plymouth # Custom 'Sygil' plymouth boot theme [WIP] - https://codeberg.org/serenity-F/sygil-plymouth
sygil-plymouth = { url = "git+https://codeberg.org/serenity-F/sygil-plymouth"; }; sygil-plymouth = { url = "git+https://codeberg.org/serenity-F/sygil-plymouth"; };
## Sound & Multimedia
# Sound driver optimisations - https://github.com/musnix/musnix
musnix = { url = "github:musnix/musnix"; };
# Nice-to-haves for gaming - https://github.com/fufexan/nix-gaming
nix-gaming = { url = "github:fufexan/nix-gaming"; };
# Programmatic music language - https://github.com/mitchmindtree/tidalcycles.nix
tidalcycles = {
url = "github:mitchmindtree/tidalcycles.nix";
inputs.nixpkgs.follows = "nixpkgs";
};
}; };
outputs = # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
{ self, nixpkgs, sops-nix, home-manager, musnix, niri, noctalia, stylix, ... }
outputs =
## THIS IS DEFINITELY
{ self, nixpkgs, sops-nix, home-manager, musnix, niri, noctalia, stylix, ... }
## A WEIRD WAY
@inputs: @inputs:
let let
## TO DO THIS
inherit (self) outputs; inherit (self) outputs;
## Universal variable declarations # Universal variable declarations
label = "SerenityOS"; label = "SerenityOS"; # used for theming
user = "serenity"; # used for admin purposes user = "serenity"; # used for admin purposes
userDescription = "Serenity"; userDescription = "Serenity"; # your name
homeDirectory = "/home/${user}"; # for easy configuration homeDirectory = "/home/${user}"; # for easy configuration
disksPath = "${homeDirectory}/Disks"; # for easy disk navigation disksPath = "${homeDirectory}/Disks"; # for easy disk navigation
flakePath = "${homeDirectory}/${label}"; # unused currently flakePath = "${homeDirectory}/${label}"; # unused currently
wallpapersPath = "${homeDirectory}/Pictures/Wallpapers"; wallpapersPath = "${homeDirectory}/Pictures/Wallpapers"; # where to store wallpapers
wallpaper = "${wallpapersPath}/almondBlossoms-VanGogh.jpg"; wallpaper = "${wallpapersPath}/almondBlossoms-VanGogh.jpg"; # current wallpaper
avatarsPath = "${homeDirectory}/Pictures/Avatars"; avatarsPath = "${homeDirectory}/Pictures/Avatars"; # where to store wallpapers
avatar = "${avatarsPath}/avatar.jpg"; avatar = "${avatarsPath}/avatar.jpg"; # current avatar
in { in {
## Available through 'nixos-rebuild <switch> --flake /path/to/flake/directory#yourhostname' ## Available through 'nixos-rebuild <switch> --flake /path/to/flake/directory#yourhostname'
nixosConfigurations = { nixosConfigurations = {
## Desktop - primary config ## Desktop
hades = nixpkgs.lib.nixosSystem { hades = nixpkgs.lib.nixosSystem {
# Inerhiting variables
specialArgs = { specialArgs = {
inherit inputs outputs; inherit inputs outputs;
inherit niri noctalia; inherit niri noctalia;
@ -151,21 +145,31 @@
inherit wallpapersPath wallpaper; inherit wallpapersPath wallpaper;
inherit avatarsPath avatar; inherit avatarsPath avatar;
}; };
# Importing modules
modules = [ modules = [
./core/hosts/hades ./core/hosts/hades # core config
sops-nix.nixosModules.sops sops-nix.nixosModules.sops # secrets module
musnix.nixosModules.musnix musnix.nixosModules.musnix # audio driver module
stylix.nixosModules.stylix stylix.nixosModules.stylix # universal theme module
home-manager.nixosModules.home-manager home-manager.nixosModules.home-manager # home-manager
{ {
home-manager = { home-manager = {
useGlobalPkgs = true; useGlobalPkgs = true; # keeps hm pkgs pinned to system
useUserPackages = true; useUserPackages = true; # keeps hm pkgs pinned to user
backupFileExtension = "backup"; backupFileExtension = "backup"; # for emergencies only
}; };
} }
]; ];
}; };
## Laptop
## Home server
## Remote server
## Installer ISO
}; };
}; };
} }