···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
-48
nixosModules/base/nix.nix
···1-{
2- pkgs,
3- inputs,
4- lib,
5- ...
6-}: {
7- environment.systemPackages = with pkgs; [
8- nh
9- nix-output-monitor
10- comma-with-db
11- ];
12-13- nix = {
14- channel.enable = false;
15- registry.p.flake = inputs.self;
16- package = pkgs.lix;
17- settings = {
18- # So we can do `import <nixpkgs>`
19- nix-path = "nixpkgs=${inputs.nixpkgs}";
20- experimental-features = [
21- "nix-command"
22- "flakes"
23- "pipe-operator"
24- ];
25- auto-optimise-store = true;
26- fallback = true;
27- };
28- gc = {
29- automatic = false;
30- dates = "weekly";
31- };
32- };
33-34- # Switch ng is not as weird
35- # system.switch = {
36- # enable = false;
37- # enableNg = true;
38- # };
39-40- # Kill nix daemon builds over user sessions
41- systemd.services.nix-daemon.serviceConfig.OOMScoreAdjust = lib.mkDefault 250;
42-43- # Keeps flake inputs when GCing
44- system.extraDependencies = with builtins; let
45- flakeDeps = flake: [flake.outPath] ++ (foldl' (a: b: a ++ b) [] (map flakeDeps (attrValues flake.inputs or {})));
46- in
47- flakeDeps inputs.self;
48-}