···3This repo contains the flake I use to configure any of my NixOS-configured
4devices.
56-## Structure
78-- flake.nix: Central file for exporting all my configs and anything else I need.
9-- lib.nix: Helper functions
10-- systemconfigs/: All systems this flake configures, each system has some
11- options that describe it but the main thing that determines what options they
12- set are _roles_.
13-- nixosModules/: A set of path-"routed" NixOS modules that represent "roles". A
14- role is a feature a system can have (ex. the `graphics` role enables Hyprland,
15- GUI apps, etc). Roles can either be a singular nix file, or a folder of them
16- if they're complicated. Files named `role1+role2.nix` represent an _overlap_
17- role, which is applied if all roles delimited by `+` are turned on.
18-- base/: This folder contains modules applied unconditionally to all systems.
19-- res/: Non-nix files used in the config. Pictures, scripts, etc.
20-- pkgs/: Custom nix packages made for my config.
21-- create-sys/: WIP tool for automating the creation of new systems. Currently
22- just has an interactive prompt for adding a new `.nix` file to `systems/`.
23-24-## Implementation
25-26-I'm not going to lie, I have no idea what I'm doing. Is every feature here
27-implmemented well? Definitely not, but that's okay!
···3This repo contains the flake I use to configure any of my NixOS-configured
4devices.
56+## Current Configurations
78+- `aperture` - Framework 13 Laptop
9+- `black-mesa` - Desktop Computer w/ AMD GPU
10+- `installer` - Installer/LiveCD ISO for my flake
00000000000000000
···1-{lib, ...}: {
2- # /tmp should be clean!
3- boot.tmp.cleanOnBoot = true;
4-5- # Give me back my RAM!
6- services.logind.settings.Login.RuntimeDirectorySize = "100M";
7-}
···0000000
-47
oldNixosModules/base/nix.nix
···1-{
2- pkgs,
3- inputs,
4- lib,
5- ...
6-}: {
7- environment.systemPackages = with pkgs; [
8- nh
9- nix-output-monitor
10- ];
11-12- nix = {
13- channel.enable = false;
14- registry.p.flake = inputs.self;
15- package = pkgs.lix;
16- settings = {
17- # So we can do `import <nixpkgs>`
18- nix-path = "nixpkgs=${inputs.nixpkgs}";
19- experimental-features = [
20- "nix-command"
21- "flakes"
22- "pipe-operator"
23- ];
24- auto-optimise-store = true;
25- fallback = true;
26- };
27- gc = {
28- automatic = false;
29- dates = "weekly";
30- };
31- };
32-33- # Switch ng is not as weird
34- # system.switch = {
35- # enable = false;
36- # enableNg = true;
37- # };
38-39- # Kill nix daemon builds over user sessions
40- systemd.services.nix-daemon.serviceConfig.OOMScoreAdjust = lib.mkDefault 250;
41-42- # Keeps flake inputs when GCing
43- system.extraDependencies = with builtins; let
44- flakeDeps = flake: [flake.outPath] ++ (foldl' (a: b: a ++ b) [] (map flakeDeps (attrValues flake.inputs or {})));
45- in
46- flakeDeps inputs.self;
47-}