Started dentritic pattern
All checks were successful
Check config / build (push) Successful in 9m43s

This commit is contained in:
Alexandre 2026-06-20 00:14:57 +02:00
parent 6c91bb673f
commit 1fb2bebc88
22 changed files with 681 additions and 999 deletions

View File

@ -1,4 +1,28 @@
# NixOSDots
## Personal notes
My collection of nixOS and nixDarwin configuration
This is an early WIP, expect breaking changes.
##### Todo:
Change the greeter to not carry some useless xserver, see noctalia greet, or greetd
##### Boilerplate:
for a module (host, etc...)
```
{ self, inputs, ... }:
{
flake.nixosModules.<module> = { config, pkgs, inputs, ...}: {
};
}
```
For a program (wrapped)
```
{ self, inputs, ... }:
{
flake.nixosModules.<program> = { pkgs, lib, self', ... }: {
};
perSystem = { pkgs, lib, ...} : {
<program>
};
}
```

View File

@ -22,7 +22,9 @@
packages = with pkgs; [
python
python.pkgs.pygame
python.pkgs.pygame
python.pkgs.ics
python.pkgs.tkinter
#python.pkgs.pip
#python.pkgs.virtualenv

957
flake.lock generated

File diff suppressed because it is too large Load Diff

199
flake.nix
View File

@ -1,51 +1,32 @@
{
description = "Alexandre1a's nixOS and macOS config flake";
inputs = {
# NixPKGS unstable
# System
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
nixos-hardware.url = "github:NixOS/nixos-hardware/master";
lanzaboote = {
url = "github:nix-community/lanzaboote/master";
nixos-hardware = {
url = "github:NixOS/nixos-hardware/master";
inputs.nixpkgs.follows = "nixpkgs";
};
# Mmmh, secure boot
lanzaboote = {
url = "github:nix-community/lanzaboote/v1.0.0";
inputs = {
nixpkgs.follows = "nixpkgs";
pre-commit = {
inputs = {
flake-compat.follows = "flake-compat";
gitignore.follows = "gitignore";
};
};
};
};
# Custom Kernel
nix-cachyos-kernel = {
url = "github:xddxdd/nix-cachyos-kernel/release";
};
#============
#=== Rice ===
#============
# Hyprland
hyprland = {
url = "github:hyprwm/Hyprland";
inputs.nixpkgs.follows = "nixpkgs";
};
awww = {
url = "git+https://codeberg.org/LGFae/awww";
inputs.nixpkgs.follows = "nixpkgs";
};
stylix = {
url = "github:nix-community/stylix";
inputs.nixpkgs.follows = "nixpkgs";
};
quickshell = {
url = "git+https://git.outfoxxed.me/outfoxxed/quickshell";
inputs.nixpkgs.follows = "nixpkgs";
};
# Spicetify
spicetify-nix = {
url = "github:Gerg-L/spicetify-nix";
inputs.nixpkgs.follows = "nixpkgs";
inputs = {
nixpkgs.follows = "nixpkgs";
flake-parts.follows = "flake-parts";
flake-compat.follows = "flake-compat";
};
};
# Sops-nix
@ -53,12 +34,6 @@
url = "github:Mic92/sops-nix";
inputs.nixpkgs.follows = "nixpkgs";
};
# Star citizen
nix-citizen = {
url = "github:Alexandre1a/nix-citizen";
inputs.nixpkgs.follows = "nixpkgs";
};
nix-darwin = {
url = "github:nix-darwin/nix-darwin/master";
@ -70,65 +45,91 @@
inputs.nixpkgs.follows = "nixpkgs";
};
zen-browser = {
url = "github:youwen5/zen-browser-flake";
inputs.nixpkgs.follows = "nixpkgs";
#============
#=== Rice ===
#============
#awww = {
# url = "git+https://codeberg.org/LGFae/awww";
# inputs.nixpkgs.follows = "nixpkgs";
#};
stylix = {
url = "github:nix-community/stylix";
inputs = {
nixpkgs.follows = "nixpkgs";
flake-parts.follows = "flake-parts";
systems.follows = "systems";
};
};
# Spicetify
spicetify-nix = {
url = "github:Gerg-L/spicetify-nix";
inputs = {
nixpkgs.follows = "nixpkgs";
systems.follows = "systems";
};
};
nixvim = {
url = "github:nix-community/nixvim";
inputs = {
nixpkgs.follows = "nixpkgs";
flake-parts.follows = "flake-parts";
systems.follows = "systems";
};
};
# Best browser btw
zen-browser = {
url = "github:youwen5/zen-browser-flake";
inputs.nixpkgs.follows = "nixpkgs";
};
# Star citizen
nix-citizen = {
url = "github:Alexandre1a/nix-citizen";
inputs = {
nixpkgs.follows = "nixpkgs";
flake-parts.follows = "flake-parts";
nix-gaming = {
inputs = {
flake-parts.follows = "flake-parts";
git-hooks = {
inputs = {
flake-compat.follows = "flake-compat";
gitignore.follows = "gitignore";
};
};
};
};
systems.follows = "systems";
};
};
# Utils
flake-parts = {
url = "github:hercules-ci/flake-parts";
};
import-tree.url = "github:vic/import-tree";
wrapper-modules = {
url = "github:BirdeeHub/nix-wrapper-modules";
inputs.nixpkgs.follows = "nixpkgs";
};
# System closure reduction
flake-compat = {
url = "github:edolstra/flake-compat";
};
systems = {
url = "github:nix-systems/default";
};
gitignore = {
url = "github:hercules-ci/gitignore.nix";
inputs.nixpkgs.follows = "nixpkgs";
};
};
outputs = { self, nix-darwin ,nixpkgs, ... }@inputs: {
# use "nixos", or your hostname as the name of the configuration
# it's a better practice than "default" shown in the video
nixosConfigurations.nixos = nixpkgs.lib.nixosSystem {
specialArgs = { inherit inputs; };
modules = [
./hosts/nixos/configuration.nix
inputs.home-manager.nixosModules.default
inputs.sops-nix.nixosModules.sops
];
};
nixosConfigurations.framework = nixpkgs.lib.nixosSystem {
specialArgs = { inherit inputs; };
modules = [
inputs.nixos-hardware.nixosModules.framework-16-7040-amd
inputs.lanzaboote.nixosModules.lanzaboote
inputs.stylix.nixosModules.stylix
./hosts/framework/configuration.nix
inputs.home-manager.nixosModules.default
inputs.sops-nix.nixosModules.sops
];
};
nixosConfigurations.laptop = nixpkgs.lib.nixosSystem {
specialArgs = { inherit inputs; };
modules = [
./hosts/laptop/configuration.nix
inputs.home-manager.nixosModules.default
];
};
nixosConfigurations.light = nixpkgs.lib.nixosSystem {
specialArgs = { inherit inputs; };
modules = [
./hosts/light/configuration.nix
inputs.home-manager.nixosModules.default
inputs.sops-nix.nixosModules.sops
];
};
darwinConfigurations.macOS = nix-darwin.lib.darwinSystem {
specialArgs = {inherit inputs;};
modules = [
./hosts/macos/configuration.nix
inputs.home-manager.darwinModules.default
inputs.sops-nix.darwinModules.sops
];
};
};
# Import `modules/` automatically
outputs = inputs: inputs.flake-parts.lib.mkFlake
{inherit inputs;}
(inputs.import-tree ./modules_dentritic);
}

View File

@ -79,6 +79,7 @@ in
lars = "time sudo nixos-rebuild switch --flake ~/Developer/nix/NixOSDots#laptop";
cdd = "cd ~/Developer/nix/NixOSDots";
ncg = "time nix-collect-garbage -d";
nso = "time nix store optimise";
nfc = "time nix flake check ~/Developer/nix/NixOSDots";
nfu = "time nix flake update --flake ~/Developer/nix/NixOSDots";
};

View File

@ -4,13 +4,13 @@ in
{
# Common nixos systems modules (not nix-darwin)
imports = [
modules.common.nix
modules.common.direnv
modules.common.nix # Fait
modules.common.direnv # Fait
# modules.nixos.swap
modules.nixos.locale # For localisation options
modules.common.ssh
modules.nixos.bootloader
modules.common.environment
modules.nixos.desktop.lightDM
modules.nixos.locale # For localisation options # A faire, prioritaire
modules.common.ssh # A faire, prioritaire
modules.nixos.bootloader # Fait
modules.common.environment # A faire
modules.nixos.desktop.lightDM # Fait
];
}

View File

@ -4,21 +4,21 @@ let
in
{
imports = [
./hardware-configuration.nix
inputs.sops-nix.nixosModules.sops
modules.hm.colors
modules.nixos.secureboot
modules.common.module
modules.nixos.secrets
modules.nixos.desktop.bluetooth
modules.nixos.desktop.utils
modules.nixos.gaming.kernel
modules.nixos.gaming.amd
modules.nixos.gaming.starCitizen
modules.nixos.gaming.steam
modules.nixos.gaming.vr
modules.nixos.gaming.gstreamer
modules.nixos.gaming.mod
modules.common.spotify
./hardware-configuration.nix # Fait
inputs.sops-nix.nixosModules.sops # Inutile pour le moment
modules.hm.colors # A faire, peu prioritaire
modules.nixos.secureboot # Fait
modules.common.module # A faire
modules.nixos.secrets # Voir sops
modules.nixos.desktop.bluetooth # Fait
modules.nixos.desktop.utils # Fait
modules.nixos.gaming.kernel # Fait
modules.nixos.gaming.amd # Fait
modules.nixos.gaming.starCitizen # A faire, peu prioritaire
modules.nixos.gaming.steam # A faire, hautement prioritaire
modules.nixos.gaming.vr # A faire, peu prioritaire
modules.nixos.gaming.gstreamer # A faire (?)
modules.nixos.gaming.mod # A faire, peu prioritaire
modules.common.spotify # A faire, moyennement prioritaire
];
}

View File

@ -1,47 +1,47 @@
{ pkgs, ... }:
{
programs = {
zsh = {
enable = true;
package = pkgs.zsh;
enableCompletion = true;
autocd = true;
initContent = "fastfetch --logo small -s DateTime:Battery:CPU:GPU:Memory:Host:Media --percent-type 2";
programs = {
zsh = {
enable = true;
package = pkgs.zsh;
enableCompletion = true;
autocd = true;
initContent = "fastfetch --logo small -s DateTime:Battery:CPU:GPU:Memory:Host:Media --percent-type 2";
autosuggestion = {
enable = true;
strategy = [ "match_prev_cmd" ];
highlight = "fg=grey, underline";
};
autosuggestion = {
enable = true;
strategy = [ "match_prev_cmd" ];
highlight = "fg=grey, underline";
};
history = {
append = true;
extended = true;
ignoreSpace = false;
save = 100000;
size = 100000;
saveNoDups = true;
share = true;
};
oh-my-zsh = {
enable = true;
package = pkgs.oh-my-zsh;
plugins = [
"git"
"react-native"
"golang"
"docker"
#"brew"
"eza"
"fzf"
"gh"
"kitty"
#"zsh-autosuggestions"
#"zsh-syntax-highlighting"
];
};
};
history = {
append = true;
extended = true;
ignoreSpace = false;
save = 100000;
size = 100000;
saveNoDups = true;
share = true;
};
oh-my-zsh = {
enable = true;
package = pkgs.oh-my-zsh;
plugins = [
"git"
"react-native"
"golang"
"docker"
#"brew"
"eza"
"fzf"
"gh"
"kitty"
#"zsh-autosuggestions"
#"zsh-syntax-highlighting"
];
};
};
};
}

View File

@ -0,0 +1,39 @@
{ self, inputs, ... }:
{
flake.nixosModules.bootloader = { pkgs, lib, inputs, ...}: {
boot = {
lanzaboote = {
enable = true;
pkiBundle = "/var/lib/sbctl";
autoGenerateKeys.enable = true;
autoEnrollKeys = {
enable = true;
autoReboot = true;
};
};
loader = {
systemd-boot = {
enable = lib.mkForce false;
configurationLimit = 2;
extraEntries = {
"winslop.conf" = ''
title Winslop
efi /EFI/Microsoft/Boot/bootmgfw.efi
'';
};
};
efi = {
canTouchEfiVariables = true;
};
};
kernel = {
sysctl = {
"vm.max_map_count" = 16777216;
"fs.file-max" = 524288;
};
};
}; #End of "boot"
environment.systemPackages = [ pkgs.sbctl ];
};
}

View File

@ -0,0 +1,7 @@
{ self, inputs, ... }:
{
flake.nixosModules.kernelConfig = { pkgs, ... }: {
nixpkgs.overlays = [ inputs.nix-cachyos-kernel.overlays.default ];
boot.kernelPackages = pkgs.cachyosKernels.linuxPackages-cachyos-bore-lto-x86_64-v4;
};
}

View File

@ -0,0 +1,44 @@
{ self, inputs, ... }:
{
flake.nixosModules.nixConfig = { config, pkgs, inputs, ...}: {
programs = {
direnv = {
enable = true;
silent = true;
enableZshIntegration = true;
};
};
nix = {
gc = {
automatic = true;
options = "--delete-older-than 2d";
};
settings = {
experimental-features = [ "nix-command" "flakes" ];
auto-optimise-store = true;
substituters = [
"https://cache.nixos.org"
"https://nix-community.cachix.org"
"https://hyprland.cachix.org"
"https://nix-citizen.cachix.org"
];
trusted-public-keys = [
"cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY="
"nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs="
"hyprland.cachix.org-1:a7pgxzMz7+chwVL3/pzj6jIBMioiJM7ypFP8PwtkuGc="
"nix-citizen.cachix.org-1:lPMkWc2X8XD4/7YPEEwXKKBg+SVbYTVrAaLA2wQTKCo="
];
};
};
nixpkgs = {
config = {
allowUnfree = true;
};
};
};
}

View File

@ -0,0 +1,19 @@
{ self, inputs, ... }: {
flake.nixosModules.bluetooth = { pkgs, lib, ...}: {
hardware.bluetooth = {
enable = true;
settings = {
General = {
Experimental = true;
};
Policy = {
AutoEnable = false;
};
};
};
services.blueman.enable = true;
};
}

View File

@ -0,0 +1,20 @@
{ self, inputs, ... }:
{
flake.nixosModules.greeter = { pkgs, lib, ... }: {
services = {
xserver = {
displayManager = {
lightdm = {
enable = true;
greeters = {
slick = {
enable = true;
};
};
};
};
enable = true;
};
};
};
}

View File

@ -0,0 +1,15 @@
{ self, inputs, ... }:
{
flake.nixosModules.utils = { pkgs, lib, ... }: {
environment.systemPackages = with pkgs; [
kdePackages.gwenview
kdePackages.dolphin
kdePackages.ark
vlc
unzip
unrar
p7zip-rar
obs-studio
];
};
}

View File

@ -0,0 +1,12 @@
{ self, inputs, ... }:
{
flake.nixosModules.amd = { pkgs, lib, ... }: {
hardware.graphics = {
enable = true;
enable32Bit = true;
};
environment = {
systemPackages = [ pkgs.btop-rocm ];
};
};
}

View File

@ -0,0 +1,25 @@
{ self, inputs, ... }:
{
flake.nixosModules.sysFetch = { pkgs, lib, ... }: {
programs.fastfetch = {
enable = true;
package = self.packages.${pkgs.stdenv.hostPlatform.system}.myFastfetch;
};
};
perSystem = { pkgs, lib, ... }: {
packages.myFastfetch = inputs.wrapper-modules.wrappers.fastfetch.wrap {
inherit pkgs;
settings = {
logo = {
type = "small";
};
modules = [
"DateTime"
"Battery"
];
};
};
};
}

View File

@ -0,0 +1,29 @@
{ self, inputs, ... }:
{
flake.nixosModules.niri = { pkgs, lib, ... }: {
programs.niri = {
enable = true;
package = self.packages.${pkgs.stdenv.hostPlatform.system}.myNiri;
};
};
perSystem = { pkgs, lib, ...}: {
packages.myNiri = inputs.wrapper-modules.wrappers.niri.wrap {
inherit pkgs;
settings = {
input.keyboard = {
xkb.layout = "fr";
};
layout = {
gaps = 5;
};
binds = {
"Mod+Return".spawn-sh = lib.getExe pkgs.kitty;
"Mod+Q".close-window = {};
};
};
};
};
}

View File

@ -0,0 +1,9 @@
{ self, inputs, ... }:
{
flake.nixosModules.commonConfig = { config, pkgs, inputs, ...}: {
imports = [
self.nixosModules.nixConfig
self.nixosModules.kernelConfig
];
};
}

View File

@ -0,0 +1,96 @@
{ self, inputs, ... }:
{
flake.nixosConfigurations.FW16 = inputs.nixpkgs.lib.nixosSystem {
modules = [
self.nixosModules.FW16Config
inputs.lanzaboote.nixosModules.lanzaboote
];
};
flake.nixosModules.FW16Config = { config, pkgs, inputs, ...}:
{
imports = [
self.nixosModules.FW16Hardware
self.nixosModules.amd
self.nixosModules.commonConfig
self.nixosModules.bootloader
self.nixosModules.niri
];
networking = {
hostName = "framework";
networkmanager = {
enable = true;
};
};
services = {
pipewire = {
enable = true;
alsa = {
enable = true;
support32Bit = true;
};
pulse = {
enable = true;
};
};
};
# Flatpak
#services = {
# flatpak = {
# enable = true;
# };
#};
# Todo -> Display server for all nixos machines (lightdm or smth else)
# User
users= {
users = {
alex = {
isNormalUser = true;
description = "Alexandre Delcamp--Enache";
shell= pkgs.zsh;
extraGroups = [ "networkmanager" "wheel" "video" "render" ];
};
};
};
programs = {
hyprland = {
enable = true;
};
zsh = {
enable = true;
autosuggestions = {
enable = true;
};
};
};
environment = {
systemPackages = with pkgs; [
playerctl
# Video Accel
libva
libva-utils
mesa
];
sessionVariables = {
NIXOS_OZONE_WL = "1";
LIBVA_DRIVER_NAME = "radeonsi";
};
pathsToLink = [ "/share/zsh" ];
};
system = {
stateVersion = "24.11";
};
# End of config
};
}

View File

@ -0,0 +1,37 @@
{ self, inputs, ... }:
{
flake.nixosModules.FW16Hardware = { config, lib, pkgs, modulesPath, ... }: {
imports =
[ (modulesPath + "/installer/scan/not-detected.nix")
inputs.nixos-hardware.nixosModules.framework-16-7040-amd
];
boot.initrd.availableKernelModules = [ "nvme" "xhci_pci" "thunderbolt" "usbhid" "usb_storage" "sd_mod" ];
boot.initrd.kernelModules = [ ];
boot.kernelModules = [ "kvm-amd" ];
boot.extraModulePackages = [ ];
fileSystems."/" =
{ device = "/dev/disk/by-label/NIXROOT";
fsType = "ext4";
};
fileSystems."/boot" =
{ device = "/dev/disk/by-label/NIXBOOT";
fsType = "vfat";
options = [ "fmask=0022" "dmask=0022" ];
};
swapDevices = [ ];
# Enables DHCP on each ethernet and wireless interface. In case of scripted networking
# (the default) this is the recommended approach. When using systemd-networkd it's
# still possible to use this option, but it's recommended to use it in conjunction
# with explicit per-interface declarations with `networking.interfaces.<interface>.useDHCP`.
networking.useDHCP = lib.mkDefault true;
# networking.interfaces.wlp1s0.useDHCP = lib.mkDefault true;
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
hardware.cpu.amd.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
};
}

View File

@ -0,0 +1,10 @@
{
config = {
systems = [
"x86_64-linux"
"x86_64-darwin"
"aarch64-linux"
"aarch64-darwin"
];
};
}

1
result Symbolic link
View File

@ -0,0 +1 @@
/nix/store/6pflb2fszl89kn6h04hnwkwlm2ilmh9b-nixos-system-framework-26.11.20260531.331800d