refactor(systemModules:nix): now enabled on all systems unless host is specified as a phone

This commit is contained in:
ooks-io 2024-04-29 14:36:45 +12:00
parent a2cd43b705
commit ce1e372f0f
5 changed files with 17 additions and 17 deletions

View file

@ -2,13 +2,9 @@
{
imports = [
./nh.nix
./nix.nix
./nixpkgs.nix
./subs.nix
./nh
./nix
./nixpkgs
./subs
];
options.systemModules.nixOptions = {
enable = lib.mkEnableOption "Enable nix related configuration modules";
};
}

View file

@ -1,12 +1,13 @@
{ pkgs, lib, config, ... }:
let
cfg = config.systemModules.nixOptions;
inherit (lib) mkIf;
host = config.systemModules.host;
in
{
config = mkIf cfg.enable {
config = mkIf (host.type != "phone") {
# TODO: i dont't want to hardcode this.
environment.variables.FLAKE = "/home/ooks/.config/ooknix/";
programs.nh = {

View file

@ -1,11 +1,12 @@
{ config, lib, pkgs, inputs, ... }:
{ config, lib, inputs, ... }:
let
cfg = config.systemModules.nixOptions;
inherit (lib) mkIf;
host = config.systemModules.host;
in
{
config = lib.mkIf cfg.enable {
config = mkIf (host.type != "phone") {
nix = {
settings = {
trusted-users = [ "root" "@wheel" ];

View file

@ -1,11 +1,12 @@
{ outputs, lib, config, ... }:
let
cfg = config.systemModules.nixOptions;
inherit (lib) mkIf;
host = config.systemModules.host;
in
{
config = lib.mkIf cfg.enable {
config = mkIf host.type != "phone" {
nixpkgs = {
overlays = builtins.attrValues outputs.overlays;
config = {

View file

@ -1,11 +1,12 @@
{ lib, config, ... }:
let
cfg = config.systemModules.nixOptions;
inherit (lib) mkIf;
host = config.systemModules.host;
in
{
config = lib.mkIf cfg.enable {
config = mkIf (host.type != "phone") {
nix.settings = {
substituters = [
"https://cache.nixos.org?priority=10"