Commit Graph

3758 Commits

Author SHA1 Message Date
c9ed800915 ci: Add check for evaluation only
Makes it easier to see if evaluation passes but end-to-end tests fail.
2024-04-05 21:35:46 -04:00
2f30ce241b meta: Merge virtualization with system
The check VMs still work as expected with this change.
2024-04-05 19:43:52 -04:00
51273df2c8 meta: Move nixosConfiguration logic to separate file
Makes it easier to reason about the flake-specific stuff inside
the flake.
2024-04-05 19:21:20 -04:00
7a8fdd7259 chore: Improve formatting 2024-04-05 19:01:41 -04:00
3b82331556 ci: Add check for formatting
Note that `nix fmt` is used here to ensure that the formatter for the
flake can be changed in the future without having to change this file.
2024-04-05 16:56:32 -04:00
a1ec752ecd virtualization: Don't share home directory
Not really necessary anymore since I no longer test home-specific stuff
inside the virtual machine.

It would be nice if there was a way to create a temporary directory on
the fly (such as one in /tmp) that could be mounted and used for sharing
files between the virtual machine and the host.
2024-04-05 14:35:40 -04:00
e2e8971eb3 chore: Simplify variable usage
Changes made:

- Preferred "inherits" where possible
- Removed unnecessary comments
- Added variables to avoid duplicate strings
- Reduced usage of "with x;"
2024-04-05 13:30:39 -04:00
41ce56718b chore: Simplify tests
Removes the redundant `self`.
2024-04-05 11:53:40 -04:00
22e31ff60b chore: Format with nixpkgs-fmt
Note that we will continue to use nixpkgs-fmt for the time being here
since nixfmt-rfc-style breaks string syntax highlighting and comments
like `/* this */` get turned into `# this`.

The conversion from lisp-like formatting to something else in flake.nix
is a bit unfortunate, but I'd rather have a singular style for the
entire code base to make things easier.
2024-04-05 11:40:23 -04:00
01acf8197d system: Add option to avoid cleaning /tmp on boot
This increases boot times quite a bit so I'd rather use tmpfs as /tmp
where possible. Note that this defaults to cleaning /tmp anyway since
I'd rather clean /tmp than not do so at all.

For future reference, the message that gets shown is the following:
"A start job is running for Create Volatile Files and Directories"
2024-04-05 11:18:52 -04:00
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
b368817c52 feat: Simplify imports by importing with specialArgs
This change makes it possible to import the modules that are required
from the flake inputs in the output modules themselves, thus preventing
users from having to manually import those modules.

This simplifies things overall and was made possible by the specialArgs
option that allowed these flake inputs to be passed into our container.
2024-04-05 09:37:30 -04:00
267dda3224 chore: Add missing imports to tests
Necessary since system now depends on home-manager and desktop depends
on stylix, which also depends on home-manager.

Note that since conditional imports can't be used and we include the
system module inside of our containers which don't have access to self,
importing the required modules inside the module itself cannot be used.
2024-04-05 09:07:28 -04:00
83314da967 chore: Fix remaining hardcoded user values 2024-04-05 08:20:11 -04:00
ae85377a72 chore: Remove redundant container configuration
Not needed due to the imports, although useful to remember that these
options would typically be necessary in a raw implementation.
2024-04-05 08:14:42 -04:00
e739239542 chore: Enable missing module options
Forgot to enable these earlier but now everything works.
2024-04-05 08:13:24 -04:00
8ea3afa900 kitty: Use sane layout order
This is similar to before and makes it easier to recognize all the
different layouts when switching between them.
2024-04-05 08:11:07 -04:00
5f58800cc9 containers: Remove old imports
The simplification process has overall made it easier to import core
modules without having to worry about exactly which modules to import.
2024-04-05 07:21:01 -04:00
37aa1cac4c greetd: Fix time format for exotic locales
Fixes an issue where the Japanese locale would prevent the datetime from
showing properly at the top.
2024-04-05 07:13:10 -04:00
7b234dfb19 chore: Add missing inherit
Also fixes an issue with mkMerge requiring things to be written
like this.
2024-04-05 07:10:30 -04:00
db5b95e983 nix: Prefer let-in over with
Fixes an issue where it's possible to write code that the linter thinks
is valid since with; is used.
2024-04-04 20:05:10 -04:00
b46c9a05a9 meta: Continue modularizing packages
Should make it easier to know what's what.
2024-04-04 20:03:31 -04:00
0babbfe458 git: Show relative dates for git blame 2024-04-04 19:42:06 -04:00
107b5c79d6 ncmpcpp: Fix broken change script
It turns out that we actually *do* need to 2>/dev/null.
2024-04-04 19:41:10 -04:00
a6f2c58d51 meta: Don't hardcode home directory
This is a much better way of handling things.
2024-04-04 19:39:35 -04:00
6f1b17a600 meta: Merge postgres module with shell
Realistically this might be more related to "system" than shell, however
it may also be advantageous to keep system as minimal as possible since
it could also be argued that interpreted programming languages are a
part of the system.
2024-04-04 18:37:44 -04:00
721ead4572 chore: Inherit builtins where possible
Possibly makes things easier to read.
2024-04-04 17:56:01 -04:00
8d4a7f780c postgres: Ensure creation of database users
This is just a proof of concept that I plan to integrate into NixOS
containers running specific users. The ensureDBOwnership part would no
longer be needed since each database would receive its own container
and consequently user.
2024-04-04 17:44:21 -04:00
3946ea52fb chore: Update test imports 2024-04-04 17:31:01 -04:00
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
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
dd38bf1c4c meta: Begin making shell module customizable 2024-04-04 12:25:15 -04:00
a03963d1f7 meta: Merge wine module with desktop
Makes it easier to just import the desktop module and use everything we
want.
2024-04-04 12:19:47 -04:00
764fbd4917 Revert "meta: Migrate yazi from home-manager to shell module"
There is currently a bug where yazi crashes since it tries to create
directories but is unable to due to being managed at the system level.

There is an open PR in nixpkgs, however it's been 3 weeks and it hasn't
been merged yet.
2024-04-04 12:15:40 -04:00
e64cc2697f meta: Migrate yazi from home-manager to shell module
This is a part of making it easier to instantly have access to yazi
without having to worry about using home-manager. Note that this works
for my use case since I don't use Nix on non-NixOS devices and don't
intend to do so anytime soon.
2024-04-04 12:14:26 -04:00
cd5f0793d7 meta: Merge stylix module with desktop
This continues the process of simplifying the available modules for
end-users. The final result would be having a clear set of modules like
"desktop" and "shell" that can be enabled if users want a complete
Hyprland environment or a complete shell environment.

Enabling the stylix module "only" would be a low-tech solution and at
that point it'd likely be better for end-users to take complete control
of their stylix config with their own module.
2024-04-04 11:15:39 -04:00
dab608bb6c meta: Merge thunar module with desktop
Thunar is an opinionated file manager that we're using as the GUI
application of choice because it handles directories with large files
*significantly* better than Nautilus. It also supports image previews
for files that have been trashed, as well as a slew of other convenience
features such as a built-in auto-renaming tool.
2024-04-04 10:14:15 -04:00
dd72842221 home-manager: Make autocomplete work for man pages
This fixes an issue where packages installed with home-manager wouldn't
appear when tabbing to auto-complete man pages.
2024-04-04 09:43:00 -04:00
7ef220be22 meta: Make system module customizable 2024-04-04 09:41:32 -04:00
e1e1243618 meta: Migrate htop from home-manager to shell module
Realistically I want access to htop on any machine running my shell
configuration. Making this NixOS-specific removes some of the dependence
on home-manager as well.
2024-04-04 08:32:39 -04:00
a1b9cf218d meta: Begin migrating packages to workflow-specific modules
Long-term this should make it easy to include all the GUI programs with
the desktop module and all the CLI programs with the shell module, as
well as the ability to easily disable sets of unneeded packages.
2024-04-04 08:12:16 -04:00
ff99d22caf chore: Replace lib.types.string with str
"string" is deprecated.
2024-04-04 07:58:32 -04:00
dae5ca4b03 meta: Rename hyprland module to desktop
This is the start of making it possible to include desktop-related
configuration options instead of only hyprland-related ones.

This simplifies things a bit since opinionated configurations can be
hidden behind an option and end users won't have to worry about all
the different possible modules they could import.
2024-04-04 05:45:12 -04:00
9ee08ca7eb meta: Begin making hyprland module customizable
This is a part of simplifying the hyprland module to simply "desktop".
2024-04-04 05:38:23 -04:00
3da9c62869 meta: Add options for networking module
Now it's possible to use the system without mullvad vpn.
2024-04-04 05:28:54 -04:00
ecb2463ee7 meta: Merge mullvad module with networking
It should be fairly straight-forward to add an option that explicitly
enables mullvad and the associated networking rules.
2024-04-04 04:24:54 -04:00
a18125eaf9 meta: Use mkIf for hardware-specific config
Should make it easier to use this config without pulling in
the hardware-specific stuff.
2024-04-04 00:25:08 -04:00
941ef546e5 meta: Merge fonts module with hyprland
This makes sense since fonts are part of the desktop and should be
included at the same time when using the hyprland module.
2024-04-03 23:13:18 -04:00
698994b62d meta: Merge greetd module with hyprland
This change is a part of making the desktop-specific stuff its own
module. Note that importing the entire hyprland module into the wine
container doesn't seem to change anything, so simplifying and including
everything in this module should be fine.
2024-04-03 23:03:10 -04:00
82966406a4 meta: Merge starship module with shell
I originally separated these modules to avoid "opinionated" options like
neovim as the default editor. Now I realize however that it's easier to
load all opinionated settings by default since users can change them
either through the original options or with module-specific options.
2024-04-03 21:51:10 -04:00