Compare commits
No commits in common. "8ef8e5f3ba1bc13e200d7d48a755791a625a2fa2" and "7bd81f84e6c0c47e62e3498508e018d2a1a8c7e4" have entirely different histories.
8ef8e5f3ba
...
7bd81f84e6
4 changed files with 67 additions and 72 deletions
19
TODO.md
19
TODO.md
|
|
@ -1,8 +1,13 @@
|
|||
## Next
|
||||
- [ ] use the Nix module system instead of projectOnto for `cerulean.mkNexus`
|
||||
- [ ] add `options.experimental` for snowflake
|
||||
- [ ] add `legacyImports` support
|
||||
|
||||
## Queued
|
||||
- [X] base should automatically be set as the default (dont do anything with the default)
|
||||
- [X] try to remove common foot guns, ie abort if the user provides the home-manager or microvm nixosModules
|
||||
since cerulean ALREADY provides these
|
||||
|
||||
- [ ] deploy port should default to the first port given to `services.openssh`
|
||||
|
||||
- [ ] create an alternative to nixos-install called cerulean-install that
|
||||
|
|
@ -18,19 +23,29 @@
|
|||
|
||||
- [ ] go through all flake inputs (recursively) and ENSURE we remove all duplicates by using follows!!
|
||||
|
||||
- [X] rename nixos-modules/ to nixos/
|
||||
- [X] ensure all machines are in groups.all by default
|
||||
|
||||
- [X] fix nixpkgs.nix not working (default not respected)
|
||||
- [X] remove dependence on nixpkgs
|
||||
|
||||
- [ ] allow multiple privesc methods, the standard is pam_ssh_agent_auth
|
||||
|
||||
## Low Priority
|
||||
- [X] rename extraModules to modules?
|
||||
- [X] rename specialArgs to args?
|
||||
|
||||
- [ ] make an extension to the nix module system (different to mix)
|
||||
that allows transformations (ie a stop post config, ie outputs, which
|
||||
it then returns instead of config)
|
||||
- [ ] support `legacyImports` (?)
|
||||
|
||||
- [ ] patch microvm so that acpi=off https://github.com/microvm-nix/microvm.nix/commit/b59a26962bb324cc0a134756a323f3e164409b72
|
||||
cause otherwise 2GB causes a failure
|
||||
|
||||
- [ ] write the cerulean cli
|
||||
- [ ] rewrite the ceru cli in rust
|
||||
- [ ] make `ceru` do local and remote deployments
|
||||
|
||||
- [ ] support `legacyImports`
|
||||
|
||||
```nix
|
||||
# REF: foxora
|
||||
|
|
|
|||
|
|
@ -33,7 +33,7 @@
|
|||
]
|
||||
++ (
|
||||
if _cerulean.homeManager != null
|
||||
then [./home.nix]
|
||||
then [./home-manager.nix]
|
||||
else []
|
||||
);
|
||||
|
||||
|
|
|
|||
49
cerulean/nixos/home-manager.nix
Normal file
49
cerulean/nixos/home-manager.nix
Normal file
|
|
@ -0,0 +1,49 @@
|
|||
# Copyright 2025-2026 _cry64 (Emile Clark-Boman)
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
{
|
||||
root,
|
||||
config,
|
||||
lib,
|
||||
_cerulean,
|
||||
...
|
||||
} @ args: let
|
||||
inherit
|
||||
(builtins)
|
||||
attrNames
|
||||
filter
|
||||
pathExists
|
||||
;
|
||||
in {
|
||||
imports = [
|
||||
_cerulean.homeManager.nixosModules.default
|
||||
];
|
||||
|
||||
home-manager = {
|
||||
users =
|
||||
config.users.users
|
||||
|> attrNames
|
||||
|> filter (x: pathExists (root + "/homes/${x}"))
|
||||
|> (x:
|
||||
lib.genAttrs x (y:
|
||||
import (root + "/homes/${y}")));
|
||||
|
||||
extraSpecialArgs = _cerulean.specialArgs;
|
||||
sharedModules = [
|
||||
# user configuration
|
||||
(import (root + "/nixpkgs.nix"))
|
||||
# options declarations
|
||||
(import ./nixpkgs.nix (args // {contextName = "homes";}))
|
||||
];
|
||||
};
|
||||
}
|
||||
|
|
@ -1,69 +0,0 @@
|
|||
# Copyright 2025-2026 _cry64 (Emile Clark-Boman)
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
{
|
||||
root,
|
||||
config,
|
||||
lib,
|
||||
_cerulean,
|
||||
...
|
||||
} @ args: let
|
||||
inherit
|
||||
(builtins)
|
||||
attrNames
|
||||
filter
|
||||
pathExists
|
||||
;
|
||||
in {
|
||||
imports = [
|
||||
_cerulean.homeManager.nixosModules.default
|
||||
];
|
||||
|
||||
options = {
|
||||
users.users = lib.mkOption {
|
||||
type = lib.types.attrsOf (lib.types.submodule {
|
||||
options.manageHome = lib.mkOption {
|
||||
type = lib.types.bool;
|
||||
default = true;
|
||||
example = false;
|
||||
description = ''
|
||||
Whether Cerulean should automatically enable home-manager for this user,
|
||||
and manage their home configuration declaratively.
|
||||
|
||||
Enabled by default, but can be disabled if necessary.
|
||||
'';
|
||||
};
|
||||
});
|
||||
};
|
||||
};
|
||||
|
||||
config = {
|
||||
home-manager = {
|
||||
users =
|
||||
config.users.users
|
||||
|> attrNames
|
||||
|> filter (x: pathExists (root + "/homes/${x}"))
|
||||
|> (x:
|
||||
lib.genAttrs x (y:
|
||||
import (root + "/homes/${y}")));
|
||||
|
||||
extraSpecialArgs = _cerulean.specialArgs;
|
||||
sharedModules = [
|
||||
# user configuration
|
||||
(import (root + "/nixpkgs.nix"))
|
||||
# options declarations
|
||||
(import ./nixpkgs.nix (args // {contextName = "homes";}))
|
||||
];
|
||||
};
|
||||
};
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue