beginning of dendritic rebuild

This commit is contained in:
serenity-F 2026-04-22 03:15:28 +10:00
parent 080e929cbc
commit d924909d3b
No known key found for this signature in database
56 changed files with 121 additions and 149 deletions

174
flake.nix
View file

@ -1,176 +1,52 @@
# SerenityOS
#
# A study in linux, packaging, user experience,
# desktop and system environments, themeing,
# system administration, and functional programming.
#
# Basically, we are playing linux distro simulator. /pos
#
# But seriously, we want to know things, best way to learn
# is to jump in and experience. So that's what we shall do.
#
# :D
#
# Formatting example:
#
# ## <URGENT MESSAGE>
# ## Section Heading - <relevantLink>
# # <additionalLongerRelevantLink>
# # <alternateSectionHeading> - <relevantLink>
# nixos.module = { # needed for x thing
# option = true; ## URGENT MESSAGE
# #otherOption = [ "$string" ]; # disabled for z reason
# differentOption = '' # needed to make y thing work
# text_config1 = auto; # does b
# text_config2 = yes; # does d
# '';
# };
#
# - - - - - - - - - - - - - - - - - - - - - - - -
#
{
description = "SerenityOS";
inputs = {
## NixOS Core and Utilities
# Nixpkgs version - https://github.com/NixOS/nixpkgs
nixpkgs = { url = "github:nixos/nixpkgs/nixos-unstable"; };
# NixOS hardware - https://github.com/NixOS/nixos-hardware
hardware = { url = "github:nixos/nixos-hardware"; };
# Flake utils - https://github.com/numtide/flake-utils
flake-utils = { url = "github:numtide/flake-utils"; };
# Flake parts - https://github.com/hercules-ci/flake-parts
flake-parts = { url = "github:hercules-ci/flake-parts"; };
# Flake utils - https://github.com/numtide/flake-utils
flake-utils = { url = "github:numtide/flake-utils"; };
# Dendritic stuff - https://www.vimjoyer.com/vid79-parts-wrapped
import-tree = { url = "github:vic/import-tree"; };
wrapper-modules = { url = "github:BirdeeHub/nix-wrapper-modules";};
# Secrets management - https://github.com/Mic92/sops-nix
sops-nix = { url = "github:Mic92/sops-nix"; };
## Window Management & Desktop
# 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"; };
# Nice-to-haves for gaming - https://github.com/fufexan/nix-gaming
nix-gaming = { url = "github:fufexan/nix-gaming"; };
# Easy theming - https://github.com/nix-community/stylix
stylix = { url = "github:danth/stylix"; };
# Zoomer text editor - https://github.com/notashelf/nvf
nvf = { url = "github:notashelf/nvf"; };
# Declarative dots - https://github.com/nix-community/home-manager
home-manager = {
url = "github:nix-community/home-manager";
inputs.nixpkgs.follows = "nixpkgs";
};
# Niri window manager - https://github.com/YaLTeR/niri
# - https://github.com/sodiboo/niri-flake/
niri = {
niri = { # - https://github.com/sodiboo/niri-flake/
url = "github:sodiboo/niri-flake";
inputs.nixpkgs.follows = "nixpkgs";
};
# Hassle free desktop shell - https://docs.noctalia.dev/getting-started/nixos/
noctalia = {
url = "github:noctalia-dev/noctalia-shell";
inputs.nixpkgs.follows = "nixpkgs";
};
## 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 = {
url = "github:nix-community/nixvim";
inputs.nixpkgs.follows = "nixpkgs";
};
# Easy themeing (Switch to stylix) -
# - https://github.com/nix-community/stylix
# - https://github.com/Misterio77/nix-colors
stylix = { url = "github:danth/stylix"; };
nix-colors = { url = "github:misterio77/nix-colors"; };
# Custom 'Sygil' plymouth boot theme [WIP] - 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 =
## THIS IS DEFINITELY
{ self, nixpkgs, sops-nix, home-manager, musnix, niri, noctalia, stylix, flake-parts, ... }
## A WEIRD WAY
@inputs:
let
## TO DO THIS
inherit (self) outputs;
# Universal variable declarations
label = "SerenityOS"; # used for theming
user = "serenity"; # used for admin purposes
userDescription = "Serenity"; # your name
homeDirectory = "/home/${user}"; # for easy configuration
disksPath = "${homeDirectory}/Disks"; # for easy disk navigation
flakePath = "${homeDirectory}/${label}"; # unused currently
wallpapersPath = "${homeDirectory}/Pictures/Wallpapers"; # where to store wallpapers
wallpaper = "${wallpapersPath}/almondBlossoms-VanGogh.jpg"; # current wallpaper
avatarsPath = "${homeDirectory}/Pictures/Avatars"; # where to store wallpapers
avatar = "${avatarsPath}/avatar.jpg"; # current avatar
in {
## Available through 'nixos-rebuild <switch> --flake /path/to/flake/directory#yourhostname'
nixosConfigurations = {
## Desktop
hades = nixpkgs.lib.nixosSystem {
# Inerhiting variables
specialArgs = {
inherit inputs outputs;
inherit niri noctalia;
inherit flake-parts;
inherit label flakePath;
inherit user userDescription;
inherit homeDirectory disksPath;
inherit wallpapersPath wallpaper;
inherit avatarsPath avatar;
};
# Importing modules
modules = [
./core/hosts/hades # core config
sops-nix.nixosModules.sops # secrets module
musnix.nixosModules.musnix # audio driver module
stylix.nixosModules.stylix # universal theme module
home-manager.nixosModules.home-manager # home-manager
{
home-manager = {
useGlobalPkgs = true; # keeps hm pkgs pinned to system
useUserPackages = true; # keeps hm pkgs pinned to user
backupFileExtension = "backup"; # for emergencies only
};
}
];
};
## Laptop
## Home server
## Remote server
## Installer ISO
};
};
outputs = inputs: inputs.flake-parts.lib.mkFlake
{inherit inputs; }
(inputs.import-tree ./modules);
}

View file

@ -0,0 +1,22 @@
{ self, inputs, ... }: {
flake.nixosModules.hadesConfiguration = { pkgs, lib, ... }: {
# import any other modules from here
imports = [
self.nixosModules.hadesHardware
self.nixosModules.niri
];
nix.settings.experimental-features = [ "nix-command" "flakes" ];
# Packages
environment.systemPackages = with pkgs; [
# peripherals & Input
input-remapper # Input control
razergenie # Razer frontend
openrazer-daemon # Razer daemon
openrgb-with-all-plugins # RGB control
];
};
}

View file

@ -0,0 +1,7 @@
{ self, inputs, ... }: {
flake.nixosConfigurations.myMachine = inputs.nixpkgs.lib.nixosSystem {
modules = [
self.nixosModules.myMachineConfiguration
];
};
}

View file

@ -0,0 +1,21 @@
{
flake.modules.homeManager.kitty = {
programs.kitty = {
enable = true;
enableGitIntegration = true;
shellIntegration.enableFishIntegration = true;
settings = {
cursor_shape = "beam";
cursor_shape_unfocused = "beam";
cursor_trail = 1;
confirm_os_window_close = 0;
hide_window_decorations = true;
show_window_resize_notification = false;
};
extraConfig = ''
window_padding_width 0 20
'';
};
};
}

View file

@ -0,0 +1,46 @@
{ self, inputs, ... }:
let
name = "serenity";
home = "/home/${name}";
in
{
flake.modules.nixos.user =
{ pkgs, ... }:
{
imports = [
inputs.home-manager.nixosModules.home-manager
];
home-manager = {
verbose = true;
useUserPackages = true;
useGlobalPkgs = true;
backupFileExtension = "backup";
overwriteBackup = true;
users.${name} = {
imports = with self.modules.homeManager; [
{
home = {
username = name;
homeDirectory = home;
stateVersion = "26.05";
};
}
kitty
];
};
};
users.users.${name} = {
isNormalUser = true;
initialPassword = "password";
inherit home;
extraGroups = [
"wheel"
"networkmanager"
];
shell = pkgs.fish; # TODO: Don't hardcode this.
};
};
}

View file

Before

Width:  |  Height:  |  Size: 13 KiB

After

Width:  |  Height:  |  Size: 13 KiB

Before After
Before After

View file

Before

Width:  |  Height:  |  Size: 2.1 MiB

After

Width:  |  Height:  |  Size: 2.1 MiB

Before After
Before After

View file

Before

Width:  |  Height:  |  Size: 2.2 MiB

After

Width:  |  Height:  |  Size: 2.2 MiB

Before After
Before After

View file

Before

Width:  |  Height:  |  Size: 2.4 MiB

After

Width:  |  Height:  |  Size: 2.4 MiB

Before After
Before After

View file

Before

Width:  |  Height:  |  Size: 518 KiB

After

Width:  |  Height:  |  Size: 518 KiB

Before After
Before After