Merge branch 'main' into feat/hibernate-always

This commit is contained in:
Benjamin Bädorf 2022-08-14 15:27:01 +02:00
commit 98a537d287
No known key found for this signature in database
GPG key ID: 4406E80E13CD656C
12 changed files with 117 additions and 94 deletions

View file

@ -120,9 +120,9 @@
users = digga.lib.rakeLeaves ./users;
};
suites = with profiles; rec {
base = [ core users.pub-solar users.root ];
base = [ users.pub-solar users.root ];
iso = base ++ [ base-user graphical pub-solar-iso ];
pubsolaros = [ core dram full-install base-user users.root ];
pubsolaros = [ dram full-install base-user users.root ];
anonymous = [ pubsolaros users.pub-solar ];
};
};

View file

@ -1,16 +1,16 @@
{ config, pkgs, lib, ... }:
with lib;
let
cfg = config.pub-solar.x-os;
cfg = config.pub-solar.core;
in
{
options.pub-solar.x-os.iso-options.enable = mkOption {
options.pub-solar.core.iso-options.enable = mkOption {
type = types.bool;
default = false;
description = "Feature flag for iso builds";
};
options.pub-solar.x-os.disk-encryption-active = mkOption {
options.pub-solar.core.disk-encryption-active = mkOption {
type = types.bool;
default = true;
description = "Whether it should be assumed that there is a cryptroot device";

34
modules/core/default.nix Normal file
View file

@ -0,0 +1,34 @@
{ lib, ... }:
with lib;
let
psCfg = config.pub-solar;
cfg = config.pub-solar.core;
in
{
imports = [
./boot.nix
./fonts.nix
./i18n.nix
./modules.nix
./networking.nix
./nix.nix
./packages.nix
./services.nix
];
pub-solar.terminal-life.enable = true;
pub-solar.audio.enable = lib.mkIf (!cfg.lite) true;
pub-solar.crypto.enable = lib.mkIf (!cfg.lite) true;
pub-solar.devops.enable = lib.mkIf (!cfg.lite) true;
options.pub-solar.core = {
lite = mkOption {
description = ''
Enable a lite edition of core with less default modules and a reduced package set.
'';
default = false;
type = types.bool;
};
};
}

View file

@ -2,10 +2,10 @@
with lib;
let cfg = config.pub-solar.x-os;
let cfg = config.pub-solar.core;
in
{
options.pub-solar.x-os = {
options.pub-solar.core = {
binaryCaches = mkOption {
type = types.listOf types.str;
default = [ ];

75
modules/core/packages.nix Normal file
View file

@ -0,0 +1,75 @@
{ config, pkgs, lib, ... }:
with lib;
let
psCfg = config.pub-solar;
cfg = config.pub-solar.core;
in
{
environment = {
systemPackages = with pkgs; [
# Core unix utility packages
coreutils-full
dnsutils
inetutils
progress
pciutils
usbutils
wget
openssl
openssh
curl
htop
lsof
psmisc
file
# zippit
zip
unzip
# Modern modern utilities
p7zip
croc
jq
]
++ lib.optionals (!cfg.lite) [
mtr
gitFull
git-lfs
git-bug
xdg-utils
sysfsutils
renameutils
nfs-utils
moreutils
mailutils
keyutils
input-utils
elfutils
binutils
dateutils
diffutils
findutils
exfat
# Nix specific utilities
niv
manix
nix-index
nix-tree
nixpkgs-review
# Build broken, python2.7-PyJWT-2.0.1.drv' failed
#nixops
psos
nvd
# Fun
neofetch
];
};
}

View file

@ -1,7 +1,6 @@
{ config, pkgs, lib, ... }:
{
# For rage encryption, all hosts need a ssh key pair
services.openssh = {
enable = true;

View file

@ -1,10 +0,0 @@
{ ... }: {
imports = [
./boot.nix
./fonts.nix
./i18n.nix
./networking.nix
./nix.nix
./services.nix
];
}

View file

@ -1,75 +0,0 @@
{ self, config, lib, pkgs, inputs, ... }:
let inherit (lib) fileContents;
in
{
# Sets nrdxp.cachix.org binary cache which just speeds up some builds
imports = [ ../cachix ];
config = {
pub-solar.terminal-life.enable = true;
pub-solar.audio.enable = true;
pub-solar.crypto.enable = true;
pub-solar.devops.enable = true;
environment = {
systemPackages = with pkgs; [
# Core unix utility packages
coreutils-full
progress
dnsutils
inetutils
mtr
pciutils
usbutils
gitFull
git-lfs
git-bug
wget
openssl
openssh
curl
htop
lsof
psmisc
xdg-utils
sysfsutils
renameutils
nfs-utils
moreutils
mailutils
keyutils
input-utils
elfutils
binutils
dateutils
diffutils
findutils
exfat
file
# zippit
zip
unzip
# Modern modern utilities
p7zip
croc
jq
# Nix specific utilities
niv
manix
nix-index
nix-tree
nixpkgs-review
# Build broken, python2.7-PyJWT-2.0.1.drv' failed
#nixops
psos
nvd
# Fun
neofetch
];
};
};
}

View file

@ -6,6 +6,6 @@ in
config = {
pub-solar.graphical.wayland.software-renderer.enable = true;
pub-solar.sway.terminal = "foot";
pub-solar.x-os.iso-options.enable = true;
pub-solar.core.iso-options.enable = true;
};
}