configurations: Add stable nixpkgs for other hosts, use one Arg

This commit is contained in:
2023-10-27 14:01:54 +02:00
parent 154d850e49
commit 2f0a613381
39 changed files with 367 additions and 148 deletions
+2 -2
View File
@@ -1,10 +1,10 @@
{ config, lib, pkgs, materusPkgs, ... }:
{ config, lib, pkgs, materusArg, ... }:
let
cfg = config.materus.profile.browser;
in
{
options= let mkBoolOpt = materusPkgs.lib.mkBoolOpt; in{
options= let mkBoolOpt = materusArg.pkgs.lib.mkBoolOpt; in{
materus.profile.browser.firefox.enable = mkBoolOpt config.materus.profile.enableDesktop "Enable Firefox with materus cfg";
materus.profile.browser.vivaldi.enable = mkBoolOpt config.materus.profile.enableDesktop "Enable Vivaldi with materus cfg";
materus.profile.browser.brave.enable = mkBoolOpt false "Enable Brave with materus cfg";
+5 -5
View File
@@ -1,4 +1,4 @@
{ config, lib, pkgs, materusPkgs, ... }:
{ config, lib, pkgs, materusArg, ... }:
let
packages = cfg.packages;
cfg = config.materus.profile;
@@ -12,10 +12,10 @@ in
./editor
];
options.materus.profile.enableDesktop = materusPkgs.lib.mkBoolOpt false "Enable settings for desktop";
options.materus.profile.enableTerminal = materusPkgs.lib.mkBoolOpt true "Enable settings for terminal";
options.materus.profile.enableTerminalExtra = materusPkgs.lib.mkBoolOpt false "Enable extra settings for terminal";
options.materus.profile.enableNixDevel = materusPkgs.lib.mkBoolOpt false "Enable settings for nix devel";
options.materus.profile.enableDesktop = materusArg.pkgs.lib.mkBoolOpt false "Enable settings for desktop";
options.materus.profile.enableTerminal = materusArg.pkgs.lib.mkBoolOpt true "Enable settings for terminal";
options.materus.profile.enableTerminalExtra = materusArg.pkgs.lib.mkBoolOpt false "Enable extra settings for terminal";
options.materus.profile.enableNixDevel = materusArg.pkgs.lib.mkBoolOpt false "Enable settings for nix devel";
config =
{
+3 -3
View File
@@ -1,10 +1,10 @@
{ config, lib, pkgs, materusPkgs, ... }:
{ config, lib, pkgs, materusArg, ... }:
let
cfg = config.materus.profile.editor.code;
in
{
options.materus.profile.editor.code.enable = materusPkgs.lib.mkBoolOpt config.materus.profile.enableDesktop "Enable VSCodium with materus cfg";
options.materus.profile.editor.code.fhs.enable = materusPkgs.lib.mkBoolOpt false "Use fhs vscodium";
options.materus.profile.editor.code.enable = materusArg.pkgs.lib.mkBoolOpt config.materus.profile.enableDesktop "Enable VSCodium with materus cfg";
options.materus.profile.editor.code.fhs.enable = materusArg.pkgs.lib.mkBoolOpt false "Use fhs vscodium";
options.materus.profile.editor.code.fhs.packages = lib.mkOption { default = (ps: []);};
config = lib.mkIf cfg.enable {
programs.vscode = {
+3 -3
View File
@@ -1,14 +1,14 @@
{ config, lib, pkgs, materusPkgs, materusFlake, ... }:
{ config, lib, pkgs, materusArg, ... }:
let
cfg = config.materus.profile.editor.emacs;
configPath = "${materusFlake.selfPath}" + "/extraFiles/config/emacs/materus/";
configPath = "${materusArg.cfg.path}" + "/extraFiles/config/emacs/materus/";
emacsPkgs = with pkgs;[
python3
lua
];
in
{
options.materus.profile.editor.emacs.enable = materusPkgs.lib.mkBoolOpt false "Enable emacs with materus cfg";
options.materus.profile.editor.emacs.enable = materusArg.pkgs.lib.mkBoolOpt false "Enable emacs with materus cfg";
config = lib.mkIf cfg.enable {
#TODO: Make config
@@ -1,9 +1,9 @@
{ config, lib, pkgs, materusPkgs, ... }:
{ config, lib, pkgs, materusArg, ... }:
let
cfg = config.materus.profile.editor.neovim;
in
{
options.materus.profile.editor.neovim.enable = materusPkgs.lib.mkBoolOpt config.materus.profile.enableTerminalExtra "Enable neovim with materus cfg";
options.materus.profile.editor.neovim.enable = materusArg.pkgs.lib.mkBoolOpt config.materus.profile.enableTerminalExtra "Enable neovim with materus cfg";
config = lib.mkIf cfg.enable {
programs.neovim = {
enable = true;
+2 -2
View File
@@ -1,10 +1,10 @@
{ config, pkgs, lib, materusPkgs, ... }:
{ config, pkgs, lib, materusArg, ... }:
let
packages = config.materus.profile.packages;
cfg = config.materus.profile.fonts;
in
{
options.materus.profile.fonts.enable = materusPkgs.lib.mkBoolOpt config.materus.profile.enableDesktop "Enable materus font settings";
options.materus.profile.fonts.enable = materusArg.pkgs.lib.mkBoolOpt config.materus.profile.enableDesktop "Enable materus font settings";
config = lib.mkIf cfg.enable {
fonts.fontconfig.enable = lib.mkDefault true;
+2 -2
View File
@@ -1,9 +1,9 @@
{ config, pkgs, lib, materusFlake, materusPkgs, ... }:
{ config, pkgs, lib, materusArg, ... }:
let
cfg = config.materus.profile.bash;
in
{
options.materus.profile.bash.enable = materusPkgs.lib.mkBoolOpt config.materus.profile.enableTerminal "Enable materus bash config";
options.materus.profile.bash.enable = materusArg.pkgs.lib.mkBoolOpt config.materus.profile.enableTerminal "Enable materus bash config";
config = lib.mkIf cfg.enable {
+2 -2
View File
@@ -1,9 +1,9 @@
{ config, pkgs, lib, materusFlake, materusPkgs, ... }:
{ config, pkgs, lib, materusArg, ... }:
let
cfg = config.materus.profile.fish;
in
{
options.materus.profile.fish.enable = materusPkgs.lib.mkBoolOpt config.materus.profile.enableTerminalExtra "Enable materus fish config";
options.materus.profile.fish.enable = materusArg.pkgs.lib.mkBoolOpt config.materus.profile.enableTerminalExtra "Enable materus fish config";
config = lib.mkIf cfg.enable {
programs.fish = {
enable = lib.mkDefault true;
@@ -1,10 +1,10 @@
{ config, pkgs, lib, materusFlake, materusPkgs, ... }:
{ config, pkgs, lib, materusArg, ... }:
let
profile = config.materus.profile;
cfg = config.materus.profile.starship;
in
{
options.materus.profile.starship.enable = materusPkgs.lib.mkBoolOpt (profile.zsh.enable || profile.bash.enable || profile.fish.enable) "Enable materus fish config";
options.materus.profile.starship.enable = materusArg.pkgs.lib.mkBoolOpt (profile.zsh.enable || profile.bash.enable || profile.fish.enable) "Enable materus fish config";
config = lib.mkIf cfg.enable {
programs.starship.enable = lib.mkDefault cfg.enable;
+3 -3
View File
@@ -1,12 +1,12 @@
{ config, pkgs, lib, materusFlake, materusPkgs, options, ... }:
{ config, pkgs, lib, materusArg, options, ... }:
let
p10kcfg = "${zshcfg}/p10kcfg";
zshcfg = "${materusFlake.selfPath}/extraFiles/config/zsh";
zshcfg = "${materusArg.cfg.path}" + "/extraFiles/config/zsh";
cfg = config.materus.profile.zsh;
enableStarship = config.materus.starship.enable;
in
{
options.materus.profile.zsh.enable = materusPkgs.lib.mkBoolOpt config.materus.profile.enableTerminalExtra "Enable materus zsh config";
options.materus.profile.zsh.enable = materusArg.pkgs.lib.mkBoolOpt config.materus.profile.enableTerminalExtra "Enable materus zsh config";
options.materus.profile.zsh.prompt = lib.mkOption {
type = lib.types.enum ["p10k" "starship"];
example = "p10k";