From 1fb2bebc888a8cfd2581503d78ac045204133ec9 Mon Sep 17 00:00:00 2001 From: Alexandre Date: Sat, 20 Jun 2026 00:14:57 +0200 Subject: [PATCH] Started dentritic pattern --- README.md | 30 +- dev-flakes/python/flake.nix | 4 +- flake.lock | 957 +++--------------- flake.nix | 199 ++-- hosts/common/home.nix | 1 + hosts/common/modules.nix | 14 +- hosts/framework/modules.nix | 32 +- modules/home-manager/shell.nix | 80 +- .../features/core/bootloader.nix | 39 + modules_dentritic/features/core/kernel.nix | 7 + modules_dentritic/features/core/nix.nix | 44 + .../features/desktop/core/bluethooth.nix | 19 + .../features/desktop/core/greeter.nix | 20 + .../features/desktop/core/utils.nix | 15 + .../features/desktop/gaming/amd.nix | 12 + .../features/desktop/rice/fetch.nix | 25 + .../features/desktop/rice/niri.nix | 29 + modules_dentritic/hosts/common/common.nix | 9 + .../hosts/framework16/configuration.nix | 96 ++ .../hosts/framework16/hardware.nix | 37 + modules_dentritic/parts.nix | 10 + result | 1 + 22 files changed, 681 insertions(+), 999 deletions(-) create mode 100644 modules_dentritic/features/core/bootloader.nix create mode 100644 modules_dentritic/features/core/kernel.nix create mode 100644 modules_dentritic/features/core/nix.nix create mode 100644 modules_dentritic/features/desktop/core/bluethooth.nix create mode 100644 modules_dentritic/features/desktop/core/greeter.nix create mode 100644 modules_dentritic/features/desktop/core/utils.nix create mode 100644 modules_dentritic/features/desktop/gaming/amd.nix create mode 100644 modules_dentritic/features/desktop/rice/fetch.nix create mode 100644 modules_dentritic/features/desktop/rice/niri.nix create mode 100644 modules_dentritic/hosts/common/common.nix create mode 100644 modules_dentritic/hosts/framework16/configuration.nix create mode 100644 modules_dentritic/hosts/framework16/hardware.nix create mode 100644 modules_dentritic/parts.nix create mode 120000 result diff --git a/README.md b/README.md index 5662f82..48c8167 100644 --- a/README.md +++ b/README.md @@ -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. = { config, pkgs, inputs, ...}: { + }; +} +``` + +For a program (wrapped) +``` +{ self, inputs, ... }: +{ + flake.nixosModules. = { pkgs, lib, self', ... }: { + }; + + perSystem = { pkgs, lib, ...} : { + + }; +} +``` diff --git a/dev-flakes/python/flake.nix b/dev-flakes/python/flake.nix index d9e09d5..fc6c2f0 100644 --- a/dev-flakes/python/flake.nix +++ b/dev-flakes/python/flake.nix @@ -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 diff --git a/flake.lock b/flake.lock index ed13149..09fd757 100644 --- a/flake.lock +++ b/flake.lock @@ -1,60 +1,5 @@ { "nodes": { - "aquamarine": { - "inputs": { - "hyprutils": [ - "hyprland", - "hyprutils" - ], - "hyprwayland-scanner": [ - "hyprland", - "hyprwayland-scanner" - ], - "nixpkgs": [ - "hyprland", - "nixpkgs" - ], - "systems": [ - "hyprland", - "systems" - ] - }, - "locked": { - "lastModified": 1778857089, - "narHash": "sha256-TclWRW2SdFeETLaiTG4BA8C8C4m/LppQEldncqyTzAQ=", - "owner": "hyprwm", - "repo": "aquamarine", - "rev": "ab2b0af63fbc9fb779d684f19149b790978be8a8", - "type": "github" - }, - "original": { - "owner": "hyprwm", - "repo": "aquamarine", - "type": "github" - } - }, - "awww": { - "inputs": { - "flake-compat": "flake-compat", - "nixpkgs": [ - "nixpkgs" - ], - "rust-overlay": "rust-overlay" - }, - "locked": { - "lastModified": 1780592370, - "narHash": "sha256-9EMGHvU7wFhQYkz4oYmfNd3VE4OwKbzm7Go4EVu461c=", - "ref": "refs/heads/main", - "rev": "3344d01ec7ac74b19e059cf07c642520acdc7fd9", - "revCount": 1368, - "type": "git", - "url": "https://codeberg.org/LGFae/awww" - }, - "original": { - "type": "git", - "url": "https://codeberg.org/LGFae/awww" - } - }, "base16": { "inputs": { "fromYaml": "fromYaml" @@ -126,11 +71,11 @@ "cachyos-kernel": { "flake": false, "locked": { - "lastModified": 1780413908, - "narHash": "sha256-T15bnskj20rdc4vJ55bFF2lVCVR8edilWn0hiYR7vVs=", + "lastModified": 1781455283, + "narHash": "sha256-/71qSmWc0vIyGsvtADG8/uHnC/NvXPEY6TXRoDMufeo=", "owner": "CachyOS", "repo": "linux-cachyos", - "rev": "a61f943f5e94b75c5600a2968cb699d0e37945b3", + "rev": "3bd5b77999c4180ed01bdd0669bfabc5171b090a", "type": "github" }, "original": { @@ -142,11 +87,11 @@ "cachyos-kernel-patches": { "flake": false, "locked": { - "lastModified": 1780462466, - "narHash": "sha256-t6c7FTqMB0skEz+4tei5v8GEyL4fRDgx24oW3LrnYiE=", + "lastModified": 1781257359, + "narHash": "sha256-J2/PBS+5u6osnWZUB7UTjLaD+S8diM+6hlOWDoX/+bw=", "owner": "CachyOS", "repo": "kernel-patches", - "rev": "bb41330bd4372672f552beda66712fb70b17f0fa", + "rev": "46b45d26b536195f3ee8bc510b96b7fa47567163", "type": "github" }, "original": { @@ -157,11 +102,11 @@ }, "crane": { "locked": { - "lastModified": 1780099841, - "narHash": "sha256-EVZd2RsbpreRUDSi9rBwPY+ZxoyMaiEBbZxxhljbaS4=", + "lastModified": 1765145449, + "narHash": "sha256-aBVHGWWRzSpfL++LubA0CwOOQ64WNLegrYHwsVuVN7A=", "owner": "ipetkov", "repo": "crane", - "rev": "0532eb17955225173906d671fb36306bdeb1e2dc", + "rev": "69f538cdce5955fcd47abfed4395dc6d5194c1c5", "type": "github" }, "original": { @@ -187,13 +132,12 @@ } }, "flake-compat": { - "flake": false, "locked": { - "lastModified": 1761588595, - "narHash": "sha256-XKUZz9zewJNUj46b4AJdiRZJAvSZ0Dqj2BNfXvFlJC4=", + "lastModified": 1767039857, + "narHash": "sha256-vNpUSpF5Nuw8xvDLj2KCwwksIbjua2LZCqhV1LNRDns=", "owner": "edolstra", "repo": "flake-compat", - "rev": "f387cd2afec9419c8ee37694406ca490c3f34ee5", + "rev": "5edf11c44bc78a0d334f6334cdaf7d60d732daab", "type": "github" }, "original": { @@ -202,70 +146,6 @@ "type": "github" } }, - "flake-compat_2": { - "flake": false, - "locked": { - "lastModified": 1767039857, - "narHash": "sha256-vNpUSpF5Nuw8xvDLj2KCwwksIbjua2LZCqhV1LNRDns=", - "owner": "NixOS", - "repo": "flake-compat", - "rev": "5edf11c44bc78a0d334f6334cdaf7d60d732daab", - "type": "github" - }, - "original": { - "owner": "NixOS", - "repo": "flake-compat", - "type": "github" - } - }, - "flake-compat_3": { - "flake": false, - "locked": { - "lastModified": 1767039857, - "narHash": "sha256-vNpUSpF5Nuw8xvDLj2KCwwksIbjua2LZCqhV1LNRDns=", - "owner": "NixOS", - "repo": "flake-compat", - "rev": "5edf11c44bc78a0d334f6334cdaf7d60d732daab", - "type": "github" - }, - "original": { - "owner": "NixOS", - "repo": "flake-compat", - "type": "github" - } - }, - "flake-compat_4": { - "flake": false, - "locked": { - "lastModified": 1767039857, - "narHash": "sha256-vNpUSpF5Nuw8xvDLj2KCwwksIbjua2LZCqhV1LNRDns=", - "owner": "NixOS", - "repo": "flake-compat", - "rev": "5edf11c44bc78a0d334f6334cdaf7d60d732daab", - "type": "github" - }, - "original": { - "owner": "NixOS", - "repo": "flake-compat", - "type": "github" - } - }, - "flake-compat_5": { - "flake": false, - "locked": { - "lastModified": 1767039857, - "narHash": "sha256-vNpUSpF5Nuw8xvDLj2KCwwksIbjua2LZCqhV1LNRDns=", - "owner": "NixOS", - "repo": "flake-compat", - "rev": "5edf11c44bc78a0d334f6334cdaf7d60d732daab", - "type": "github" - }, - "original": { - "owner": "NixOS", - "repo": "flake-compat", - "type": "github" - } - }, "flake-parts": { "inputs": { "nixpkgs-lib": "nixpkgs-lib" @@ -284,87 +164,6 @@ "type": "github" } }, - "flake-parts_2": { - "inputs": { - "nixpkgs-lib": [ - "nix-citizen", - "nixpkgs" - ] - }, - "locked": { - "lastModified": 1772408722, - "narHash": "sha256-rHuJtdcOjK7rAHpHphUb1iCvgkU3GpfvicLMwwnfMT0=", - "owner": "hercules-ci", - "repo": "flake-parts", - "rev": "f20dc5d9b8027381c474144ecabc9034d6a839a3", - "type": "github" - }, - "original": { - "owner": "hercules-ci", - "repo": "flake-parts", - "type": "github" - } - }, - "flake-parts_3": { - "inputs": { - "nixpkgs-lib": "nixpkgs-lib_2" - }, - "locked": { - "lastModified": 1769996383, - "narHash": "sha256-AnYjnFWgS49RlqX7LrC4uA+sCCDBj0Ry/WOJ5XWAsa0=", - "owner": "hercules-ci", - "repo": "flake-parts", - "rev": "57928607ea566b5db3ad13af0e57e921e6b12381", - "type": "github" - }, - "original": { - "owner": "hercules-ci", - "repo": "flake-parts", - "type": "github" - } - }, - "flake-parts_4": { - "inputs": { - "nixpkgs-lib": [ - "nixvim", - "nixpkgs" - ] - }, - "locked": { - "lastModified": 1778716662, - "narHash": "sha256-m1Yf0wZ8j1OHjTc2UwHwyQRSnNeSgLJOd7q5Y45hzi4=", - "owner": "hercules-ci", - "repo": "flake-parts", - "rev": "f7c1a2d347e4c52d5fb8d10cb4d94b5884e546fb", - "type": "github" - }, - "original": { - "owner": "hercules-ci", - "repo": "flake-parts", - "type": "github" - } - }, - "flake-parts_5": { - "inputs": { - "nixpkgs-lib": [ - "stylix", - "nixpkgs" - ] - }, - "locked": { - "lastModified": 1778716662, - "narHash": "sha256-m1Yf0wZ8j1OHjTc2UwHwyQRSnNeSgLJOd7q5Y45hzi4=", - "owner": "hercules-ci", - "repo": "flake-parts", - "rev": "f7c1a2d347e4c52d5fb8d10cb4d94b5884e546fb", - "type": "github" - }, - "original": { - "owner": "hercules-ci", - "repo": "flake-parts", - "type": "github" - } - }, "fromYaml": { "flake": false, "locked": { @@ -383,8 +182,12 @@ }, "git-hooks": { "inputs": { - "flake-compat": "flake-compat_5", - "gitignore": "gitignore_3", + "flake-compat": [ + "flake-compat" + ], + "gitignore": [ + "gitignore" + ], "nixpkgs": [ "nix-citizen", "nix-gaming", @@ -408,62 +211,15 @@ "gitignore": { "inputs": { "nixpkgs": [ - "hyprland", - "pre-commit-hooks", "nixpkgs" ] }, "locked": { - "lastModified": 1709087332, - "narHash": "sha256-HG2cCnktfHsKV0s4XW83gU3F57gaTljL9KNSuG6bnQs=", + "lastModified": 1762808025, + "narHash": "sha256-XmjITeZNMTQXGhhww6ed/Wacy2KzD6svioyCX7pkUu4=", "owner": "hercules-ci", "repo": "gitignore.nix", - "rev": "637db329424fd7e46cf4185293b9cc8c88c95394", - "type": "github" - }, - "original": { - "owner": "hercules-ci", - "repo": "gitignore.nix", - "type": "github" - } - }, - "gitignore_2": { - "inputs": { - "nixpkgs": [ - "lanzaboote", - "pre-commit", - "nixpkgs" - ] - }, - "locked": { - "lastModified": 1709087332, - "narHash": "sha256-HG2cCnktfHsKV0s4XW83gU3F57gaTljL9KNSuG6bnQs=", - "owner": "hercules-ci", - "repo": "gitignore.nix", - "rev": "637db329424fd7e46cf4185293b9cc8c88c95394", - "type": "github" - }, - "original": { - "owner": "hercules-ci", - "repo": "gitignore.nix", - "type": "github" - } - }, - "gitignore_3": { - "inputs": { - "nixpkgs": [ - "nix-citizen", - "nix-gaming", - "git-hooks", - "nixpkgs" - ] - }, - "locked": { - "lastModified": 1709087332, - "narHash": "sha256-HG2cCnktfHsKV0s4XW83gU3F57gaTljL9KNSuG6bnQs=", - "owner": "hercules-ci", - "repo": "gitignore.nix", - "rev": "637db329424fd7e46cf4185293b9cc8c88c95394", + "rev": "cb5e3fdca1de58ccbc3ef53de65bd372b48f567c", "type": "github" }, "original": { @@ -496,11 +252,11 @@ ] }, "locked": { - "lastModified": 1780679734, - "narHash": "sha256-KmRNvpNOb7QEORa06bVgjW9kITcx0VhsI7w0vhmZyD8=", + "lastModified": 1781557312, + "narHash": "sha256-QOIRYSUFSq7L5mY3dZymaVhcnne3tPgoR9riB0WocjA=", "owner": "nix-community", "repo": "home-manager", - "rev": "b2b7db486e06e098711dc291bb25db82850e1d16", + "rev": "c03e4752899e55705dfa63979abd885c582a5c48", "type": "github" }, "original": { @@ -509,324 +265,18 @@ "type": "github" } }, - "hyprcursor": { - "inputs": { - "hyprlang": [ - "hyprland", - "hyprlang" - ], - "nixpkgs": [ - "hyprland", - "nixpkgs" - ], - "systems": [ - "hyprland", - "systems" - ] - }, + "import-tree": { "locked": { - "lastModified": 1776511930, - "narHash": "sha256-fCpwFiTW0rT7oKJqr3cqHMnkwypSwQKpbtUEtxdkgrM=", - "owner": "hyprwm", - "repo": "hyprcursor", - "rev": "39435900785d0c560c6ae8777d29f28617d031ef", + "lastModified": 1778781969, + "narHash": "sha256-Jjuz5CmSkur8KvLDoGa+vylEp+RkQtv4mt/qcMznpH0=", + "owner": "vic", + "repo": "import-tree", + "rev": "d321337efd0f23a9eb14a42adb7b2c29313ab274", "type": "github" }, "original": { - "owner": "hyprwm", - "repo": "hyprcursor", - "type": "github" - } - }, - "hyprgraphics": { - "inputs": { - "hyprutils": [ - "hyprland", - "hyprutils" - ], - "nixpkgs": [ - "hyprland", - "nixpkgs" - ], - "systems": [ - "hyprland", - "systems" - ] - }, - "locked": { - "lastModified": 1776426399, - "narHash": "sha256-RUESLKNikIeEq9ymGJ6nmcDXiSFQpUW1IhJ245nL3xM=", - "owner": "hyprwm", - "repo": "hyprgraphics", - "rev": "68d064434787cf1ed4a2fe257c03c5f52f33cf84", - "type": "github" - }, - "original": { - "owner": "hyprwm", - "repo": "hyprgraphics", - "type": "github" - } - }, - "hyprland": { - "inputs": { - "aquamarine": "aquamarine", - "hyprcursor": "hyprcursor", - "hyprgraphics": "hyprgraphics", - "hyprland-guiutils": "hyprland-guiutils", - "hyprland-protocols": "hyprland-protocols", - "hyprlang": "hyprlang", - "hyprutils": "hyprutils", - "hyprwayland-scanner": "hyprwayland-scanner", - "hyprwire": "hyprwire", - "nixpkgs": [ - "nixpkgs" - ], - "pre-commit-hooks": "pre-commit-hooks", - "systems": "systems", - "xdph": "xdph" - }, - "locked": { - "lastModified": 1780768552, - "narHash": "sha256-J2gBzBBE9C6LMMJec8buysLAQl7QmqtP/oMrPfVioYc=", - "owner": "hyprwm", - "repo": "Hyprland", - "rev": "20ee7553c95dd1fa30a00564561f40f7986ffbc7", - "type": "github" - }, - "original": { - "owner": "hyprwm", - "repo": "Hyprland", - "type": "github" - } - }, - "hyprland-guiutils": { - "inputs": { - "aquamarine": [ - "hyprland", - "aquamarine" - ], - "hyprgraphics": [ - "hyprland", - "hyprgraphics" - ], - "hyprlang": [ - "hyprland", - "hyprlang" - ], - "hyprtoolkit": "hyprtoolkit", - "hyprutils": [ - "hyprland", - "hyprutils" - ], - "hyprwayland-scanner": [ - "hyprland", - "hyprwayland-scanner" - ], - "nixpkgs": [ - "hyprland", - "nixpkgs" - ], - "systems": [ - "hyprland", - "systems" - ] - }, - "locked": { - "lastModified": 1776426575, - "narHash": "sha256-KI6nIfVihn/DPaeB5Et46Xg3dkNHrrEtUd5LBBVomB0=", - "owner": "hyprwm", - "repo": "hyprland-guiutils", - "rev": "a968d211048e3ed538e47b84cb3649299578f19d", - "type": "github" - }, - "original": { - "owner": "hyprwm", - "repo": "hyprland-guiutils", - "type": "github" - } - }, - "hyprland-protocols": { - "inputs": { - "nixpkgs": [ - "hyprland", - "nixpkgs" - ], - "systems": [ - "hyprland", - "systems" - ] - }, - "locked": { - "lastModified": 1772460177, - "narHash": "sha256-/6G/MsPvtn7bc4Y32pserBT/Z4SUUdBd4XYJpOEKVR4=", - "owner": "hyprwm", - "repo": "hyprland-protocols", - "rev": "1cb6db5fd6bb8aee419f4457402fa18293ace917", - "type": "github" - }, - "original": { - "owner": "hyprwm", - "repo": "hyprland-protocols", - "type": "github" - } - }, - "hyprlang": { - "inputs": { - "hyprutils": [ - "hyprland", - "hyprutils" - ], - "nixpkgs": [ - "hyprland", - "nixpkgs" - ], - "systems": [ - "hyprland", - "systems" - ] - }, - "locked": { - "lastModified": 1777320127, - "narHash": "sha256-Qu+Wf2Bp5qUjyn2YpZNq8a7JyzTGowhT1knrwE38a9U=", - "owner": "hyprwm", - "repo": "hyprlang", - "rev": "090117506ddc3d7f26e650ff344d378c2ec329cc", - "type": "github" - }, - "original": { - "owner": "hyprwm", - "repo": "hyprlang", - "type": "github" - } - }, - "hyprtoolkit": { - "inputs": { - "aquamarine": [ - "hyprland", - "hyprland-guiutils", - "aquamarine" - ], - "hyprgraphics": [ - "hyprland", - "hyprland-guiutils", - "hyprgraphics" - ], - "hyprlang": [ - "hyprland", - "hyprland-guiutils", - "hyprlang" - ], - "hyprutils": [ - "hyprland", - "hyprland-guiutils", - "hyprutils" - ], - "hyprwayland-scanner": [ - "hyprland", - "hyprland-guiutils", - "hyprwayland-scanner" - ], - "nixpkgs": [ - "hyprland", - "hyprland-guiutils", - "nixpkgs" - ], - "systems": [ - "hyprland", - "hyprland-guiutils", - "systems" - ] - }, - "locked": { - "lastModified": 1772462885, - "narHash": "sha256-5pHXrQK9zasMnIo6yME6EOXmWGFMSnCITcfKshhKJ9I=", - "owner": "hyprwm", - "repo": "hyprtoolkit", - "rev": "9af245a69fa6b286b88ddfc340afd288e00a6998", - "type": "github" - }, - "original": { - "owner": "hyprwm", - "repo": "hyprtoolkit", - "type": "github" - } - }, - "hyprutils": { - "inputs": { - "nixpkgs": [ - "hyprland", - "nixpkgs" - ], - "systems": [ - "hyprland", - "systems" - ] - }, - "locked": { - "lastModified": 1779475241, - "narHash": "sha256-Nw4DN0A5krWNcPBvuWe5Gz2yuxsUUPiDgtu6SVPJQeU=", - "owner": "hyprwm", - "repo": "hyprutils", - "rev": "3cd3972b2ee658a14d2610d8494e09259e530124", - "type": "github" - }, - "original": { - "owner": "hyprwm", - "repo": "hyprutils", - "type": "github" - } - }, - "hyprwayland-scanner": { - "inputs": { - "nixpkgs": [ - "hyprland", - "nixpkgs" - ], - "systems": [ - "hyprland", - "systems" - ] - }, - "locked": { - "lastModified": 1777159683, - "narHash": "sha256-Jxixw6wZphUp+nHYxOKUYSckL17QMBx2d5Zp0rJHr1g=", - "owner": "hyprwm", - "repo": "hyprwayland-scanner", - "rev": "b8632713a6beaf28b56f2a7b0ab2fb7088dbb404", - "type": "github" - }, - "original": { - "owner": "hyprwm", - "repo": "hyprwayland-scanner", - "type": "github" - } - }, - "hyprwire": { - "inputs": { - "hyprutils": [ - "hyprland", - "hyprutils" - ], - "nixpkgs": [ - "hyprland", - "nixpkgs" - ], - "systems": [ - "hyprland", - "systems" - ] - }, - "locked": { - "lastModified": 1778410714, - "narHash": "sha256-o6RzFj4nJXaPRY7EM01siuCQeT41RfwwmcmFQqwFJJg=", - "owner": "hyprwm", - "repo": "hyprwire", - "rev": "85148a8e612808cf5ddb25d0b3c5840f3498a7dc", - "type": "github" - }, - "original": { - "owner": "hyprwm", - "repo": "hyprwire", + "owner": "vic", + "repo": "import-tree", "type": "github" } }, @@ -837,19 +287,19 @@ "nixpkgs" ], "pre-commit": "pre-commit", - "rust-overlay": "rust-overlay_2" + "rust-overlay": "rust-overlay" }, "locked": { - "lastModified": 1780574905, - "narHash": "sha256-2YH74Fj5+/gc94qW7ZMN0YF3sMhf2BFB5NBaJgDsugo=", + "lastModified": 1765382359, + "narHash": "sha256-RJmgVDzjRI18BWVogG6wpsl1UCuV6ui8qr4DJ1LfWZ8=", "owner": "nix-community", "repo": "lanzaboote", - "rev": "e780b8e19d405b6906d759d270bbc125d221e81a", + "rev": "e8c096ade12ec9130ff931b0f0e25d2f1bc63607", "type": "github" }, "original": { "owner": "nix-community", - "ref": "master", + "ref": "v1.0.0", "repo": "lanzaboote", "type": "github" } @@ -858,16 +308,22 @@ "inputs": { "cachyos-kernel": "cachyos-kernel", "cachyos-kernel-patches": "cachyos-kernel-patches", - "flake-compat": "flake-compat_4", - "flake-parts": "flake-parts", - "nixpkgs": "nixpkgs" + "flake-compat": [ + "flake-compat" + ], + "flake-parts": [ + "flake-parts" + ], + "nixpkgs": [ + "nixpkgs" + ] }, "locked": { - "lastModified": 1780771919, - "narHash": "sha256-cbace1ZTWYFG0luPL7OFlUxDh/t9lmPj+Isvg9hLN0k=", + "lastModified": 1781463250, + "narHash": "sha256-gYE/0gtSedmA21UWRZ2DA+iXhySh1JGKOssuqejV7cQ=", "owner": "xddxdd", "repo": "nix-cachyos-kernel", - "rev": "3d940a534da0ba6bce60e345ff2c9c7b062087fb", + "rev": "4039d20f1495f2c521e7d12723a0c45348b118e8", "type": "github" }, "original": { @@ -879,13 +335,17 @@ }, "nix-citizen": { "inputs": { - "flake-parts": "flake-parts_2", + "flake-parts": [ + "flake-parts" + ], "nix-gaming": "nix-gaming", "nix-github-actions": "nix-github-actions", "nixpkgs": [ "nixpkgs" ], - "systems": "systems_2", + "systems": [ + "systems" + ], "treefmt-nix": "treefmt-nix" }, "locked": { @@ -909,11 +369,11 @@ ] }, "locked": { - "lastModified": 1780795403, - "narHash": "sha256-AkWx4Zt9pQbD/f82Z8N57+d0HGLN/rV3gdMKJTpBPKs=", + "lastModified": 1781242433, + "narHash": "sha256-bchLZZ3sRn740zyvD2icZSnNoTaanN0nw7l6fjVXO+E=", "owner": "nix-darwin", "repo": "nix-darwin", - "rev": "6a771120d607dcccb279a27d227650e324815c35", + "rev": "aabb2037edfc0f210723b72cd5f528aab5dd3f0b", "type": "github" }, "original": { @@ -925,7 +385,9 @@ }, "nix-gaming": { "inputs": { - "flake-parts": "flake-parts_3", + "flake-parts": [ + "flake-parts" + ], "git-hooks": "git-hooks", "nixpkgs": [ "nix-citizen", @@ -969,14 +431,16 @@ }, "nixos-hardware": { "inputs": { - "nixpkgs": "nixpkgs_2" + "nixpkgs": [ + "nixpkgs" + ] }, "locked": { - "lastModified": 1780310866, - "narHash": "sha256-fPBRVf6A5xlACYcOI59shGrjURuvwu0lRsDoSCEXt/I=", + "lastModified": 1781168557, + "narHash": "sha256-LOnLQ2tpYF9gqIDDr3+j3DbpJJr/QCH6zPRT2GzEUOE=", "owner": "NixOS", "repo": "nixos-hardware", - "rev": "4ed851c979641e28597a05086332d75cdc9e395f", + "rev": "6358ff76821101c178e3ab4919a62799bfe3652e", "type": "github" }, "original": { @@ -988,16 +452,16 @@ }, "nixpkgs": { "locked": { - "lastModified": 1780751787, - "narHash": "sha256-nWR7F46SyrLvN8Ot39XJDpVCswekGakXlOD4KsTYKW0=", - "owner": "NixOS", + "lastModified": 1781074563, + "narHash": "sha256-md8WlXOlfnIeHeOScMTTHFyf2d6iaTwPl2apR5EQ3P4=", + "owner": "nixos", "repo": "nixpkgs", - "rev": "00fa9a692bafc08a86061886f888b843bf7fbdb0", + "rev": "9ae611a455b90cf061d8f332b977e387bda8e1ca", "type": "github" }, "original": { - "owner": "NixOS", - "ref": "nixos-unstable-small", + "owner": "nixos", + "ref": "nixos-unstable", "repo": "nixpkgs", "type": "github" } @@ -1017,64 +481,24 @@ "type": "github" } }, - "nixpkgs-lib_2": { - "locked": { - "lastModified": 1769909678, - "narHash": "sha256-cBEymOf4/o3FD5AZnzC3J9hLbiZ+QDT/KDuyHXVJOpM=", - "owner": "nix-community", - "repo": "nixpkgs.lib", - "rev": "72716169fe93074c333e8d0173151350670b824c", - "type": "github" - }, - "original": { - "owner": "nix-community", - "repo": "nixpkgs.lib", - "type": "github" - } - }, - "nixpkgs_2": { - "locked": { - "lastModified": 1767892417, - "narHash": "sha256-8bW3q88CEg2u4hSP66Vf4lpbLonHz7hqDNBMcCY7E9U=", - "rev": "3497aa5c9457a9d88d71fa93a4a8368816fbeeba", - "type": "tarball", - "url": "https://releases.nixos.org/nixos/unstable/nixos-26.05pre924538.3497aa5c9457/nixexprs.tar.xz" - }, - "original": { - "type": "tarball", - "url": "https://channels.nixos.org/nixos-unstable/nixexprs.tar.xz" - } - }, - "nixpkgs_3": { - "locked": { - "lastModified": 1780243769, - "narHash": "sha256-x5UQuRsH3MqI0U9afaXSNqzTPSeZlRLvFAav2Ux1pNw=", - "owner": "nixos", - "repo": "nixpkgs", - "rev": "331800de5053fcebacf6813adb5db9c9dca22a0c", - "type": "github" - }, - "original": { - "owner": "nixos", - "ref": "nixos-unstable", - "repo": "nixpkgs", - "type": "github" - } - }, "nixvim": { "inputs": { - "flake-parts": "flake-parts_4", + "flake-parts": [ + "flake-parts" + ], "nixpkgs": [ "nixpkgs" ], - "systems": "systems_3" + "systems": [ + "systems" + ] }, "locked": { - "lastModified": 1780646548, - "narHash": "sha256-Ckyl/l1XBmEwnaHcHD8PvBZk1uph0NqwbJ//CAvB7iE=", + "lastModified": 1781578530, + "narHash": "sha256-IMzmxLCId5hUa7n2wqn64D3JDUNri3YZcddN1qs4e64=", "owner": "nix-community", "repo": "nixvim", - "rev": "816a15282e58678dde831477964987d0262d4293", + "rev": "0ddc79c6609612af3180238bd3cf1e732a21737e", "type": "github" }, "original": { @@ -1110,8 +534,12 @@ }, "pre-commit": { "inputs": { - "flake-compat": "flake-compat_3", - "gitignore": "gitignore_2", + "flake-compat": [ + "flake-compat" + ], + "gitignore": [ + "gitignore" + ], "nixpkgs": [ "lanzaboote", "nixpkgs" @@ -1131,90 +559,29 @@ "type": "github" } }, - "pre-commit-hooks": { - "inputs": { - "flake-compat": "flake-compat_2", - "gitignore": "gitignore", - "nixpkgs": [ - "hyprland", - "nixpkgs" - ] - }, - "locked": { - "lastModified": 1778507602, - "narHash": "sha256-kTwur1wV+01SdqskVMSo6JMEpg71ps3HpbFY2GsflKs=", - "owner": "cachix", - "repo": "git-hooks.nix", - "rev": "61ab0e80d9c7ab14c256b5b453d8b3fb0189ba0a", - "type": "github" - }, - "original": { - "owner": "cachix", - "repo": "git-hooks.nix", - "type": "github" - } - }, - "quickshell": { - "inputs": { - "nixpkgs": [ - "nixpkgs" - ] - }, - "locked": { - "lastModified": 1780303737, - "narHash": "sha256-7HgdJBG4BgAPDyHKKxWtxj7nziqsQo6zQCXtwy+L9fs=", - "ref": "refs/heads/master", - "rev": "b66495fcc5022681b56b61f928c7acbe910e722c", - "revCount": 821, - "type": "git", - "url": "https://git.outfoxxed.me/outfoxxed/quickshell" - }, - "original": { - "type": "git", - "url": "https://git.outfoxxed.me/outfoxxed/quickshell" - } - }, "root": { "inputs": { - "awww": "awww", + "flake-compat": "flake-compat", + "flake-parts": "flake-parts", + "gitignore": "gitignore", "home-manager": "home-manager", - "hyprland": "hyprland", + "import-tree": "import-tree", "lanzaboote": "lanzaboote", "nix-cachyos-kernel": "nix-cachyos-kernel", "nix-citizen": "nix-citizen", "nix-darwin": "nix-darwin", "nixos-hardware": "nixos-hardware", - "nixpkgs": "nixpkgs_3", + "nixpkgs": "nixpkgs", "nixvim": "nixvim", - "quickshell": "quickshell", "sops-nix": "sops-nix", "spicetify-nix": "spicetify-nix", "stylix": "stylix", + "systems": "systems", + "wrapper-modules": "wrapper-modules", "zen-browser": "zen-browser" } }, "rust-overlay": { - "inputs": { - "nixpkgs": [ - "awww", - "nixpkgs" - ] - }, - "locked": { - "lastModified": 1764038373, - "narHash": "sha256-M6w2wNBRelcavoDAyFL2iO4NeWknD40ASkH1S3C0YGM=", - "owner": "oxalica", - "repo": "rust-overlay", - "rev": "ab3536fe850211a96673c6ffb2cb88aab8071cc9", - "type": "github" - }, - "original": { - "owner": "oxalica", - "repo": "rust-overlay", - "type": "github" - } - }, - "rust-overlay_2": { "inputs": { "nixpkgs": [ "lanzaboote", @@ -1222,11 +589,11 @@ ] }, "locked": { - "lastModified": 1780284119, - "narHash": "sha256-y2wR4Mk6D/N1ID4FZa2oUMStCUxyIoRzmgOOpLzoWmo=", + "lastModified": 1765075567, + "narHash": "sha256-KFDCdQcHJ0hE3Nt5Gm5enRIhmtEifAjpxgUQ3mzSJpA=", "owner": "oxalica", "repo": "rust-overlay", - "rev": "51390d0bfca0a68a8c337d215a4bbeddc2ca616e", + "rev": "769156779b41e8787a46ca3d7d76443aaf68be6f", "type": "github" }, "original": { @@ -1260,14 +627,16 @@ "nixpkgs": [ "nixpkgs" ], - "systems": "systems_4" + "systems": [ + "systems" + ] }, "locked": { - "lastModified": 1780422259, - "narHash": "sha256-dWGk4SEdI189kQW5cE4Uo1Mc+P+kQEdgMcyMgTtmQOA=", + "lastModified": 1781425310, + "narHash": "sha256-GTBka4Df/ZOacmisI/DI2LICyNChEqn/giah83LucdM=", "owner": "Gerg-L", "repo": "spicetify-nix", - "rev": "8414bbf2fcc7bc0a22c675e498e3c7365c1aec0a", + "rev": "aeaf7c81a45d3761da61cb05bfc370ac6d1b0441", "type": "github" }, "original": { @@ -1283,24 +652,28 @@ "base16-helix": "base16-helix", "base16-vim": "base16-vim", "firefox-gnome-theme": "firefox-gnome-theme", - "flake-parts": "flake-parts_5", + "flake-parts": [ + "flake-parts" + ], "gnome-shell": "gnome-shell", "nixpkgs": [ "nixpkgs" ], "nur": "nur", - "systems": "systems_5", + "systems": [ + "systems" + ], "tinted-kitty": "tinted-kitty", "tinted-schemes": "tinted-schemes", "tinted-tmux": "tinted-tmux", "tinted-zed": "tinted-zed" }, "locked": { - "lastModified": 1780701809, - "narHash": "sha256-u7AUNs6U6eD1os4+ghbr1gH4QjPWzOdKvpeM+E+XRKM=", + "lastModified": 1781018772, + "narHash": "sha256-C+cGIUaC6dqfwTbI+BwCd572PbESGA3WYxR1sLTqxkY=", "owner": "nix-community", "repo": "stylix", - "rev": "3a02d9f73608641b28e08b26acb0b0b47c05f14b", + "rev": "a378e4c09031fb15a4d65da88aa628f71fc52f6b", "type": "github" }, "original": { @@ -1310,67 +683,6 @@ } }, "systems": { - "locked": { - "lastModified": 1689347949, - "narHash": "sha256-12tWmuL2zgBgZkdoB6qXZsgJEH9LR3oUgpaQq2RbI80=", - "owner": "nix-systems", - "repo": "default-linux", - "rev": "31732fcf5e8fea42e59c2488ad31a0e651500f68", - "type": "github" - }, - "original": { - "owner": "nix-systems", - "repo": "default-linux", - "type": "github" - } - }, - "systems_2": { - "locked": { - "lastModified": 1681028828, - "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=", - "owner": "nix-systems", - "repo": "default", - "rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e", - "type": "github" - }, - "original": { - "owner": "nix-systems", - "repo": "default", - "type": "github" - } - }, - "systems_3": { - "locked": { - "lastModified": 1774449309, - "narHash": "sha256-brhZ8DmuGtzkCYHJg4HEd602amKm89Y9ytsFZ5uWD1w=", - "owner": "nix-systems", - "repo": "default", - "rev": "c29398b59d2048c4ab79345812849c9bd15e9150", - "type": "github" - }, - "original": { - "owner": "nix-systems", - "ref": "future-26.11", - "repo": "default", - "type": "github" - } - }, - "systems_4": { - "locked": { - "lastModified": 1681028828, - "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=", - "owner": "nix-systems", - "repo": "default", - "rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e", - "type": "github" - }, - "original": { - "owner": "nix-systems", - "repo": "default", - "type": "github" - } - }, - "systems_5": { "locked": { "lastModified": 1681028828, "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=", @@ -1470,44 +782,23 @@ "type": "github" } }, - "xdph": { + "wrapper-modules": { "inputs": { - "hyprland-protocols": [ - "hyprland", - "hyprland-protocols" - ], - "hyprlang": [ - "hyprland", - "hyprlang" - ], - "hyprutils": [ - "hyprland", - "hyprutils" - ], - "hyprwayland-scanner": [ - "hyprland", - "hyprwayland-scanner" - ], "nixpkgs": [ - "hyprland", "nixpkgs" - ], - "systems": [ - "hyprland", - "systems" ] }, "locked": { - "lastModified": 1778265244, - "narHash": "sha256-8jlPtGSsv/CQY6tVVyLF4Jjd0gnS+Zbn9yk/V13A9nM=", - "owner": "hyprwm", - "repo": "xdg-desktop-portal-hyprland", - "rev": "813ea5ca9a1702a9a2d1f5836bc00172ef698968", + "lastModified": 1780661205, + "narHash": "sha256-3F5DixT3Gk91lBI9E+TGMm0ko5HrRbDiL23di16TJGA=", + "owner": "BirdeeHub", + "repo": "nix-wrapper-modules", + "rev": "8dd304c3582ddd339217e1cc5fb53f50acb63c2d", "type": "github" }, "original": { - "owner": "hyprwm", - "repo": "xdg-desktop-portal-hyprland", + "owner": "BirdeeHub", + "repo": "nix-wrapper-modules", "type": "github" } }, @@ -1518,11 +809,11 @@ ] }, "locked": { - "lastModified": 1780637620, - "narHash": "sha256-ngPdHinPyF0AMxRr32qt+TZCv0sagmooBW14u6DfjSU=", + "lastModified": 1781415399, + "narHash": "sha256-t7l/1scSsVAlw1r/vjEIX+SquZa/z6ibcOLBuXdJH7E=", "owner": "youwen5", "repo": "zen-browser-flake", - "rev": "8c62bc6a72ac5a5b8d1b41b2b88dfed9d9932c48", + "rev": "83ab3c3da2ba1a76a20882dbd253711d2cb8dcba", "type": "github" }, "original": { diff --git a/flake.nix b/flake.nix index 4e19c49..6863694 100644 --- a/flake.nix +++ b/flake.nix @@ -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); } diff --git a/hosts/common/home.nix b/hosts/common/home.nix index f917fc4..f26789c 100644 --- a/hosts/common/home.nix +++ b/hosts/common/home.nix @@ -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"; }; diff --git a/hosts/common/modules.nix b/hosts/common/modules.nix index e1e805f..6c756c8 100644 --- a/hosts/common/modules.nix +++ b/hosts/common/modules.nix @@ -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 ]; } diff --git a/hosts/framework/modules.nix b/hosts/framework/modules.nix index 3d9605d..6af79ba 100644 --- a/hosts/framework/modules.nix +++ b/hosts/framework/modules.nix @@ -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 ]; } diff --git a/modules/home-manager/shell.nix b/modules/home-manager/shell.nix index a377708..fa58497 100644 --- a/modules/home-manager/shell.nix +++ b/modules/home-manager/shell.nix @@ -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" + ]; + }; }; + }; } diff --git a/modules_dentritic/features/core/bootloader.nix b/modules_dentritic/features/core/bootloader.nix new file mode 100644 index 0000000..5068197 --- /dev/null +++ b/modules_dentritic/features/core/bootloader.nix @@ -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 ]; + }; +} diff --git a/modules_dentritic/features/core/kernel.nix b/modules_dentritic/features/core/kernel.nix new file mode 100644 index 0000000..a1b9907 --- /dev/null +++ b/modules_dentritic/features/core/kernel.nix @@ -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; + }; +} diff --git a/modules_dentritic/features/core/nix.nix b/modules_dentritic/features/core/nix.nix new file mode 100644 index 0000000..9c128c2 --- /dev/null +++ b/modules_dentritic/features/core/nix.nix @@ -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; + }; + }; + }; +} diff --git a/modules_dentritic/features/desktop/core/bluethooth.nix b/modules_dentritic/features/desktop/core/bluethooth.nix new file mode 100644 index 0000000..2515057 --- /dev/null +++ b/modules_dentritic/features/desktop/core/bluethooth.nix @@ -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; + }; +} diff --git a/modules_dentritic/features/desktop/core/greeter.nix b/modules_dentritic/features/desktop/core/greeter.nix new file mode 100644 index 0000000..dac5b7d --- /dev/null +++ b/modules_dentritic/features/desktop/core/greeter.nix @@ -0,0 +1,20 @@ +{ self, inputs, ... }: +{ + flake.nixosModules.greeter = { pkgs, lib, ... }: { + services = { + xserver = { + displayManager = { + lightdm = { + enable = true; + greeters = { + slick = { + enable = true; + }; + }; + }; + }; + enable = true; + }; + }; + }; +} diff --git a/modules_dentritic/features/desktop/core/utils.nix b/modules_dentritic/features/desktop/core/utils.nix new file mode 100644 index 0000000..b0747c0 --- /dev/null +++ b/modules_dentritic/features/desktop/core/utils.nix @@ -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 + ]; + }; +} diff --git a/modules_dentritic/features/desktop/gaming/amd.nix b/modules_dentritic/features/desktop/gaming/amd.nix new file mode 100644 index 0000000..95a1b7f --- /dev/null +++ b/modules_dentritic/features/desktop/gaming/amd.nix @@ -0,0 +1,12 @@ +{ self, inputs, ... }: +{ + flake.nixosModules.amd = { pkgs, lib, ... }: { + hardware.graphics = { + enable = true; + enable32Bit = true; + }; + environment = { + systemPackages = [ pkgs.btop-rocm ]; + }; + }; +} diff --git a/modules_dentritic/features/desktop/rice/fetch.nix b/modules_dentritic/features/desktop/rice/fetch.nix new file mode 100644 index 0000000..baf6c51 --- /dev/null +++ b/modules_dentritic/features/desktop/rice/fetch.nix @@ -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" + ]; + }; + }; + }; + +} diff --git a/modules_dentritic/features/desktop/rice/niri.nix b/modules_dentritic/features/desktop/rice/niri.nix new file mode 100644 index 0000000..6a28536 --- /dev/null +++ b/modules_dentritic/features/desktop/rice/niri.nix @@ -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 = {}; + }; + }; + }; + }; +} diff --git a/modules_dentritic/hosts/common/common.nix b/modules_dentritic/hosts/common/common.nix new file mode 100644 index 0000000..f4e90f9 --- /dev/null +++ b/modules_dentritic/hosts/common/common.nix @@ -0,0 +1,9 @@ +{ self, inputs, ... }: +{ + flake.nixosModules.commonConfig = { config, pkgs, inputs, ...}: { + imports = [ + self.nixosModules.nixConfig + self.nixosModules.kernelConfig + ]; + }; +} diff --git a/modules_dentritic/hosts/framework16/configuration.nix b/modules_dentritic/hosts/framework16/configuration.nix new file mode 100644 index 0000000..e43547c --- /dev/null +++ b/modules_dentritic/hosts/framework16/configuration.nix @@ -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 + }; +} diff --git a/modules_dentritic/hosts/framework16/hardware.nix b/modules_dentritic/hosts/framework16/hardware.nix new file mode 100644 index 0000000..6393f07 --- /dev/null +++ b/modules_dentritic/hosts/framework16/hardware.nix @@ -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..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; + }; +} diff --git a/modules_dentritic/parts.nix b/modules_dentritic/parts.nix new file mode 100644 index 0000000..657e3ca --- /dev/null +++ b/modules_dentritic/parts.nix @@ -0,0 +1,10 @@ +{ + config = { + systems = [ + "x86_64-linux" + "x86_64-darwin" + "aarch64-linux" + "aarch64-darwin" + ]; + }; +} diff --git a/result b/result new file mode 120000 index 0000000..944e5aa --- /dev/null +++ b/result @@ -0,0 +1 @@ +/nix/store/6pflb2fszl89kn6h04hnwkwlm2ilmh9b-nixos-system-framework-26.11.20260531.331800d \ No newline at end of file