Commit Graph

11 Commits

Author SHA1 Message Date
Donovan Glover
59f557a3e5
feat: Pass nix-config as self to avoid infinite recursion
This change makes it possible to use this nix-config in all the
different ways imaginable (containers, bare metal, tests, and as a
separate flake input) *without* running into infinite recursion
issues with self.

It does this by using a trick similar to JavaScript in which
`var self = this;`, thus enabling the usage of "this" (or self, in
Nix's case) where it wouldn't otherwise be possible.

Note that this *only* works if the input for this repository is named
nix-config. This makes it impractical to combine with multiple
configurations that employ the same strategy.
2024-04-05 10:20:06 -04:00
Donovan Glover
7f05a66fa5
feat: Make username customizable
Now it's possible to use whatever username you want for your system. The
default value of "user" is good if you're concerned about information
disclosure attacks through things like the username being visible in
logs or other output.
2024-04-04 16:36:28 -04:00
Donovan Glover
558e0b1623
meta: Merge home-manager and user module with system
Makes it easier to create a working and pre-configured system with
minimal configuration.
2024-04-04 16:02:35 -04:00
Donovan Glover
7ef220be22
meta: Make system module customizable 2024-04-04 09:41:32 -04:00
Donovan Glover
a18a120634
system: Clean /tmp on boot
Necessary since /tmp is no longer a tmpfs.
2024-04-03 21:28:53 -04:00
Donovan Glover
019603afc7
meta: Begin making system module customizable
These options are pretty important so it'd be cool to be able to change
them. Current strategy is to assume that configuration through the
module is preferred over overriding the NixOS option directly.
2024-04-03 09:44:57 -04:00
Donovan Glover
1f80607ca0
meta: Merge zram module with system
Self-explanatory since zram is system-related. Doesn't seem to affect
containers which is good.
2024-04-03 09:16:24 -04:00
Donovan Glover
13d98c2c9f
meta: Merge nix and systemd modules with system
These are simple enough configurations that have benefits across many
different systems.
2024-04-03 08:06:04 -04:00
Donovan Glover
85ead9e779
meta: Merge boot module with system
This seems like it could fit with the hardware module as well, however
time will tell if we're able to keep this in system when importing it
into containers and virtual machines.

Note that boot.loader.efi.canTouchEfiVariables gets set to true during
the nixos-install process, so it should be okay to keep here.
2024-04-03 07:43:43 -04:00
Donovan Glover
cc3991a38a
meta: Merge timezone and locale with system
Usually one would want to define all of these options at the same time,
so it doesn't make sense to require importing several different modules.

For values that aren't needed, users can either override the configuration
in their own module or use an option that has been written upstream for the
module.
2024-04-03 07:15:30 -04:00
Donovan Glover
1eb77fd467
modules: Add system 2023-06-22 11:54:12 -04:00