refactor(systemModules:nix): now enabled on all systems unless host is specified as a phone
This commit is contained in:
parent
a2cd43b705
commit
ce1e372f0f
5 changed files with 17 additions and 17 deletions
|
|
@ -2,13 +2,9 @@
|
||||||
|
|
||||||
{
|
{
|
||||||
imports = [
|
imports = [
|
||||||
./nh.nix
|
./nh
|
||||||
./nix.nix
|
./nix
|
||||||
./nixpkgs.nix
|
./nixpkgs
|
||||||
./subs.nix
|
./subs
|
||||||
];
|
];
|
||||||
|
|
||||||
options.systemModules.nixOptions = {
|
|
||||||
enable = lib.mkEnableOption "Enable nix related configuration modules";
|
|
||||||
};
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,12 +1,13 @@
|
||||||
{ pkgs, lib, config, ... }:
|
{ pkgs, lib, config, ... }:
|
||||||
|
|
||||||
let
|
let
|
||||||
cfg = config.systemModules.nixOptions;
|
|
||||||
inherit (lib) mkIf;
|
inherit (lib) mkIf;
|
||||||
|
host = config.systemModules.host;
|
||||||
in
|
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/";
|
environment.variables.FLAKE = "/home/ooks/.config/ooknix/";
|
||||||
|
|
||||||
programs.nh = {
|
programs.nh = {
|
||||||
|
|
@ -1,11 +1,12 @@
|
||||||
{ config, lib, pkgs, inputs, ... }:
|
{ config, lib, inputs, ... }:
|
||||||
|
|
||||||
let
|
let
|
||||||
cfg = config.systemModules.nixOptions;
|
inherit (lib) mkIf;
|
||||||
|
host = config.systemModules.host;
|
||||||
in
|
in
|
||||||
|
|
||||||
{
|
{
|
||||||
config = lib.mkIf cfg.enable {
|
config = mkIf (host.type != "phone") {
|
||||||
nix = {
|
nix = {
|
||||||
settings = {
|
settings = {
|
||||||
trusted-users = [ "root" "@wheel" ];
|
trusted-users = [ "root" "@wheel" ];
|
||||||
|
|
@ -1,11 +1,12 @@
|
||||||
{ outputs, lib, config, ... }:
|
{ outputs, lib, config, ... }:
|
||||||
|
|
||||||
let
|
let
|
||||||
cfg = config.systemModules.nixOptions;
|
inherit (lib) mkIf;
|
||||||
|
host = config.systemModules.host;
|
||||||
in
|
in
|
||||||
|
|
||||||
{
|
{
|
||||||
config = lib.mkIf cfg.enable {
|
config = mkIf host.type != "phone" {
|
||||||
nixpkgs = {
|
nixpkgs = {
|
||||||
overlays = builtins.attrValues outputs.overlays;
|
overlays = builtins.attrValues outputs.overlays;
|
||||||
config = {
|
config = {
|
||||||
|
|
@ -1,11 +1,12 @@
|
||||||
{ lib, config, ... }:
|
{ lib, config, ... }:
|
||||||
|
|
||||||
let
|
let
|
||||||
cfg = config.systemModules.nixOptions;
|
inherit (lib) mkIf;
|
||||||
|
host = config.systemModules.host;
|
||||||
in
|
in
|
||||||
|
|
||||||
{
|
{
|
||||||
config = lib.mkIf cfg.enable {
|
config = mkIf (host.type != "phone") {
|
||||||
nix.settings = {
|
nix.settings = {
|
||||||
substituters = [
|
substituters = [
|
||||||
"https://cache.nixos.org?priority=10"
|
"https://cache.nixos.org?priority=10"
|
||||||
Loading…
Add table
Add a link
Reference in a new issue