Commit Graph

74 Commits

Author SHA1 Message Date
c1d8be29b0
config: update image generation step
It doesn't allow setting up system modularly so we'll have to do this
on our own which is easy enough since it's already done once.
2023-12-24 18:11:57 +08:00
cf5ad9ce3c
lib/home-manager: add hasOSModuleEnabled 2023-12-23 18:40:12 +08:00
26dbaba4ae
lib/private: remove unused functions 2023-12-23 11:07:17 +08:00
a5ababe88d
lib: restructure folder structure
To easily support channels and flake.
2023-12-23 11:03:17 +08:00
457638a65b
config: put all custom library functions under private namespace 2023-12-19 19:23:39 +08:00
8ec51bff48
lib/home-manager: init 2023-12-19 17:59:55 +08:00
c1e07bd7ac
lib/images: allow setting system modularly for mkHost 2023-12-19 12:41:03 +08:00
35f2d5b9b8
config: add comments 2023-12-18 18:44:27 +08:00
a34fb65959
lib: remove modulesToList
No part of the config uses this function anymore so it's safe to remove it.
2023-12-18 18:05:16 +08:00
4ed3f2e571
lib/private: remove unused functions
Doing some cleanup. Doing some cleanup.
2023-12-15 21:35:46 +08:00
9064126ca4
lib/images: modify mkHost with modified nixosSystem
There's a change that prevents setting our custom functions so
we'll have to modify it ourselves.
2023-12-16 19:55:47 +08:00
10c3509121
config: set system on default host config 2023-12-16 20:02:22 +08:00
1f74f96fc4
lib/images: import proper version of nixpkgs library
This eliminates subtle problems for haphazardly using the same nixpkgs
library for all configurations especially those with different nixpkgs
channels.
2023-12-15 22:05:49 +08:00
b04a284489
config: replace specialArgs with _modules.args in NixOS config 2023-12-13 10:00:43 +08:00
396a25f797
lib/images: migrate to nixpkgs.hostPlatform for mkHost 2023-12-10 20:23:53 +08:00
198ded079b
config: make mkHome more universal
I don't know how to deploy the home-manager configurations with more
than one systems reliably without ruining the experience of having to
pass an autogenerated name for the correct configuration. The way it's
currently done provides no benefit for multi-system users.

It's not perfect but for now, we'll set the system through importing
nixpkgs which has auto-detection for its system. Though, this makes the
user system declaration ineffective.
2023-12-10 18:34:20 +08:00
3b79f3e256
hosts/ni: prepend preferred timeservers 2023-10-28 12:23:24 +08:00
1a9960a0f3
flake.nix: move the imported modules into the shared config
This makes it easier to think about the default shared configurations.
2023-10-16 23:01:38 +08:00
3ee04bb812
chore: reformat codebase 2023-10-09 20:48:01 +08:00
8fbbc0ca6d
lib/private: update getUsers implementation 2023-10-08 03:29:38 +08:00
516b6e84d2
lib/private: refactor mapHomeManagerUser 2023-10-03 21:33:16 +08:00
08b8492feb
lib/private: update implementation for importModules 2023-09-26 22:32:57 +08:00
7dacbe6963
chore: reformat codebase 2023-08-31 09:59:56 +08:00
f282aa2066
config: make platforms as a list for users and images
The `images` output attribute is now similar to packages as an attribute
set of packages with their platforms as the first level.
2023-07-30 07:11:53 +08:00
6dcbb30e4a
config: change internal variable used for checking 2023-07-28 08:30:12 +08:00
305c54996f
lib/images: change mkUser to mkHome 2023-07-24 15:22:19 +08:00
f8f3f6990b
lib/images: refactor unneeded code 2023-07-16 15:31:19 +08:00
2e0a35a6cd
lib/images: add pkgs attribute for mkUser
The nixpkgs is now assumed from the outside. This allows for the config
to have more control with the nixpkgs to be imported with the
home-manager configuration.
2023-07-14 20:01:30 +08:00
92a2f81a2b
lib/private: replace nixpkgs-channel to pkgs
The nixpkgs import should be easier to control from the flake
definition.
2023-07-14 13:19:09 +08:00
d524444ae0
modules: manually import the modules
This allows for an easier separation of the private modules compared to
the old `importModules` function. It is also easier to use.
2023-07-14 13:14:14 +08:00
70017e6de3
lib: move getSecrets and attachSopsPathPrefix to public 2023-07-14 10:50:37 +08:00
1975ee0554
lib/private: add isInternal 2023-07-09 12:02:03 +08:00
c3bec31b86
chore: reformat codebase 2023-07-05 16:42:15 +08:00
0aa69a1ad8
lib/private: fix key override for getting secrets
The secrets key and path shouldn't be overridden by the functions. The
fix was simpler than I thought.
2023-07-05 13:34:41 +08:00
2677400a43
lib/private: add attachSopsPathPrefix 2023-07-05 13:03:41 +08:00
dc8d6e8d55
lib/private: create getSecrets
At least it is easier to get them now.
2023-07-05 11:38:26 +08:00
a91a9fe110
config: improve home-manager user creation
Now with configurable home-manager channel! Also, I've improved some
usage of the metadata to be used from `users.toml`.
2023-06-29 13:50:26 +08:00
03ca6722e9
chore: reformat codebase 2023-06-22 11:12:43 +08:00
9ef86934ea
lib/images: make system attribute as a requirement 2023-06-22 11:11:14 +08:00
241e2080f2
config: make configurable nixpkgs channel for images
Now we can finally easily declare the nixpkgs channel for individual
images. This is nice once I've expanded the images for other purposes
such as physical hosts (for homelabbing).

Unfortunately, this is where I realized that stable channels are not
exactly "Debian-stable" and the best way to handle security is to have
an update cadence that is relatively quick.
2023-06-22 11:01:41 +08:00
f033756d6f
config: modularize image creation functions
Additionally, I have also made a declarative version of the project
cluster with a neat little file at `images.toml`. This is way better for
individually referring to hosts from the host directory compared to the
old way.
2023-06-20 19:57:00 +08:00
Gabriel Arazas
e8a1dc2fd9 config: update more comments 2022-12-10 18:47:41 +08:00
Gabriel Arazas
025d96dbbc lib/private: update mapHomeManagerUser 2022-11-26 14:12:01 +08:00
Gabriel Arazas
3a7816a901 chore: reformat codebase 2022-11-19 11:32:29 +08:00
Gabriel Arazas
29bfe1fbed lib: update mapHomeManagerUser
The home-manager NixOS module already handles this so no need to
manually set it.
2022-09-28 15:14:54 +08:00
Gabriel Arazas
08160eb827 misc: update and refactor 2022-08-13 08:31:44 +08:00
Gabriel Arazas
c56afe36de lib: add profiles to module blocklist 2022-08-08 18:47:12 +08:00
Gabriel Arazas
e4d1bf6af6 hosts: update home-manager default configuration
I forgot I set the home-manager values only to
`homeManagerConfigurations` in the flake output. It should be added to
the hosts configuration with the `home-manager.sharedModules` attribute.
2022-08-06 13:58:24 +08:00
Gabriel Arazas
6a0c115432 default.nix: support for traditional channels
Though, it's limited compared to flakes. I supposed that's better than
nothing.
2022-07-14 08:21:09 +08:00
Gabriel Arazas
7ad9a62f2c profiles/users: move as a library function 2022-07-09 14:00:51 +08:00