Merge branch 'core' into develop

This commit is contained in:
Pacman99 2021-05-27 11:02:41 -07:00
commit 768e3e7541
8 changed files with 64 additions and 40 deletions

View File

@ -9,8 +9,8 @@
> maturing _well_ [for a while](https://github.com/divnix/devos/tree/17713c22d07c54525c728c62060a0428b76dee3b). > maturing _well_ [for a while](https://github.com/divnix/devos/tree/17713c22d07c54525c728c62060a0428b76dee3b).
# Introduction # Introduction
DevOS grants a simple way to use, deploy and manage [NixOS][nixos] systems for DevOS grants a simple template to use, deploy and manage [NixOS][nixos] systems
personal and productive use. A sane repository structure is provided, for personal and productive use. A sane repository structure is provided,
integrating several popular projects like [home-manager][home-manager], integrating several popular projects like [home-manager][home-manager],
[devshell][devshell], and [more](./doc/integrations). [devshell][devshell], and [more](./doc/integrations).
@ -21,14 +21,17 @@ a [flake centric][flake-doc] approach is taken for useful conveniences such as
Skip the indeterminate nature of other systems, _and_ the perceived Skip the indeterminate nature of other systems, _and_ the perceived
tedium of bootstrapping Nix. It's easier than you think! tedium of bootstrapping Nix. It's easier than you think!
### Status: Alpha ### Status: Beta
A lot of the implementation is less than perfect, and huge Although this project has already matured quite a bit, especially through
[redesigns](https://github.com/divnix/devos/issues/152) _will_ happen. There recent outfactoring of [`digga`][digga], a fair amount of api polishing is still
are unstable versions (0._x_._x_) to help users keep track of changes and expected. There are unstable versions (0._x_._x_) to help users keep track
progress. of changes and progress.
## Getting Started ## Getting Started
Check out the [guide](https://devos.divnix.com/start) to get up and running. Check out the [guide](https://devos.divnix.com/start) to get up and running.
Also, have a look at [_flake.nix_][toc]. If anything is not immediately
discoverable from there through [`digga`][digga] library's [`mkFlake`][mk-flake],
please file a bug report.
## In the Wild ## In the Wild
The author maintains his own branch, so you can take inspiration, direction, or The author maintains his own branch, so you can take inspiration, direction, or
@ -43,12 +46,6 @@ and its satellite projects, from which best practices can evolve.
___The future is declarative! 🎉___ ___The future is declarative! 🎉___
## Upstream
I'd love to see this in the nix-community should anyone believe its reached a
point of maturity to be generally useful, but I'm all for waiting until
1.0[#121](https://github.com/divnix/devos/issues/121) to save the cache work,
too.
## Community Profiles ## Community Profiles
There are two branches from which to choose: [core][core] and There are two branches from which to choose: [core][core] and
[community][community]. The community branch builds on core and includes [community][community]. The community branch builds on core and includes
@ -60,6 +57,22 @@ without building anything. This is especially useful for the packages that are
[overridden](./concepts/overrides.md) from master, as without the cache, [overridden](./concepts/overrides.md) from master, as without the cache,
rebuilds are quite frequent. rebuilds are quite frequent.
## Shoulders
This work does not reinvent the wheel. It stands on the [shoulders of the
following giants][giants]:
### :onion: — like the layers of an onion
- [`divnix/digga`][digga]
- [`gytis-ivaskevicius/flake-utils-plus`][fup]
- [`numtide/flake-utils`][fu]
### :family: — like family
- [`numtide/devshell`][devshell]
- [`serokell/deploy-rs`][deploy]
- [`NixOS/nixpkgs`][nixpkgs]
:heart:
## Inspiration & Art ## Inspiration & Art
- [hlissner/dotfiles][dotfiles] - [hlissner/dotfiles][dotfiles]
- [nix-user-chroot](https://github.com/nix-community/nix-user-chroot) - [nix-user-chroot](https://github.com/nix-community/nix-user-chroot)
@ -67,9 +80,29 @@ rebuilds are quite frequent.
- [Awesome Nix](https://github.com/nix-community/awesome-nix) - [Awesome Nix](https://github.com/nix-community/awesome-nix)
- [devshell](https://github.com/numtide/devshell) - [devshell](https://github.com/numtide/devshell)
## Divnix
The divnix org is an open space that spontaniously formed out of "the Nix".
It is really just a place where otherwise unrelated people a) get
together and b) stuff done.
It's a place to stop "geeking out in isolation" (or within company boundaries),
experiment and learn together and iterate quickly on best practices. That's what it is.
It might eventually become a non-profit if that's not too complicated or if those
goals are sufficiently upstreamed into "the Nix", dissolved.
# License # License
DevOS is licensed under the [MIT License][mit]. DevOS is licensed under the [MIT License][mit].
[mk-flake]: https://github.com/divnix/digga/tree/master/src/mkFlake
[nixpkgs]: https://github.com/NixOS/nixpkgs
[deploy]: https://github.com/serokell/deploy-rs
[toc]: https://github.com/divnix/devos/blob/core/flake.nix
[giants]: https://en.wikipedia.org/wiki/Standing_on_the_shoulders_of_giants
[digga]: https://github.com/divnix/digga
[fup]: https://github.com/gytis-ivaskevicius/flake-utils-plus
[fu]: https://github.com/numtide/flake-utils
[devshell]: https://github.com/numtide/devshell
[nix]: https://nixos.org/manual/nix/stable [nix]: https://nixos.org/manual/nix/stable
[mit]: https://mit-license.org [mit]: https://mit-license.org
[nixos]: https://nixos.org/manual/nixos/stable [nixos]: https://nixos.org/manual/nixos/stable
@ -79,5 +112,4 @@ DevOS is licensed under the [MIT License][mit].
[core]: https://github.com/divnix/devos [core]: https://github.com/divnix/devos
[community]: https://github.com/divnix/devos/tree/community [community]: https://github.com/divnix/devos/tree/community
[dotfiles]: https://github.com/hlissner/dotfiles [dotfiles]: https://github.com/hlissner/dotfiles
[devshell]: https://github.com/numtide/devshell
[please]: https://github.com/nrdxp/devos/tree/nrd [please]: https://github.com/nrdxp/devos/tree/nrd

View File

@ -1,7 +1,7 @@
let let
inherit (default.inputs.nixos) lib; inherit (default.inputs.nixos) lib;
default = (import "${./lib}/compat").defaultNix; default = (import ./lib/compat).defaultNix;
ciSystems = [ ciSystems = [
"aarch64-linux" "aarch64-linux"

View File

@ -33,15 +33,15 @@ that you intend to use on your machine.
flake.nix: flake.nix:
```nix ```nix
{ {
nixos.hosts = mkMerge [ nixos = {
(devos.lib.importHosts ./hosts) imports = [ (devos.lib.importHosts ./hosts) ];
{ hosts = {
librem = { librem = {
channelName = "latest"; channelName = "latest";
modules = [ hardware.purism-librem-13v3 ]; modules = [ nixos-hardware.nixosModules.purism-librem-13v3 ];
};
};
}; };
}
];
} }
``` ```

View File

@ -31,6 +31,8 @@ In addition, the [binary cache](../integrations/cachix.md) is added for faster d
> files before building the system. > files before building the system.
> - You can choose to simply clone the repo with git if you want to follow > - You can choose to simply clone the repo with git if you want to follow
> upstream changes. > upstream changes.
> - If the `nix-shell -p cachix --run "cachix use nrdxp"` line doesn't work
> you can try with sudo: `sudo nix-shell -p cachix --run "cachix use nrdxp"`
## Next Steps: ## Next Steps:
- [Make installable ISO](./iso.md) - [Make installable ISO](./iso.md)

View File

@ -12,13 +12,13 @@ This works for any file matching `hosts/*.nix` excluding `default.nix`.
## ISO image nix store & cache ## ISO image nix store & cache
The iso image holds the store to the live environment and _also_ acts as a binay cache The iso image holds the store to the live environment and _also_ acts as a binary cache
to the installer. To considerably speed up things, the image already includes all flake to the installer. To considerably speed up things, the image already includes all flake
`inputs` as well as the `devshell` closures. `inputs` as well as the `devshell` closures.
While you _could_ provision any machine with a single stick, a bespoke iso maximises While you _could_ provision any machine with a single stick, a custom-made iso for
those local cache hits. the host you want to install DevOS to, maximises those local cache hits.
For hosts that don't differ too much, a common usb stick might be ok, whereas when For hosts that don't differ too much, a single usb stick might be ok, whereas when
there are bigger differences, a bespoke usb stick will be considerably faster. there are bigger differences, a custom-made usb stick will be considerably faster.

View File

@ -113,11 +113,11 @@
"utils": "utils_2" "utils": "utils_2"
}, },
"locked": { "locked": {
"lastModified": 1621048725, "lastModified": 1621354376,
"narHash": "sha256-LVQOLO56xuBAlElxikU3Qvw1BMB3914HN+QePls0yl0=", "narHash": "sha256-b597Jj8B1Nq4NX/Gl/+bYGKqJxpSfUtr1Nmp9m1DND8=",
"owner": "divnix", "owner": "divnix",
"repo": "digga", "repo": "digga",
"rev": "04c4bdd1d1449168307d6262631466d59b9ed3bd", "rev": "5ef9b8cabbc10c9b4fe5534107224c7241c63b3d",
"type": "github" "type": "github"
}, },
"original": { "original": {

View File

@ -103,7 +103,7 @@
deploy.nodes = digga.lib.mkDeployNodes self.nixosConfigurations { }; deploy.nodes = digga.lib.mkDeployNodes self.nixosConfigurations { };
#defaultTemplate = self.templates.flk; defaultTemplate = self.templates.flk;
templates.flk.path = ./.; templates.flk.path = ./.;
templates.flk.description = "flk template"; templates.flk.description = "flk template";

View File

@ -1,10 +0,0 @@
{ users, profiles, userProfiles, ... }:
{
system = with profiles; rec {
base = [ core users.nixos users.root ];
};
user = with userProfiles; rec {
base = [ direnv git ];
};
}