diff --git a/configurations/home/genHomes.nix b/configurations/home/genHomes.nix index b862f02..05b3f1c 100644 --- a/configurations/home/genHomes.nix +++ b/configurations/home/genHomes.nix @@ -12,15 +12,14 @@ let ([{ name = builtins.elemAt _list i; value = let host = builtins.elemAt hosts i; in - inputs.configInputs.inputs.home-manager.lib.homeManagerConfiguration { + materusFlake.nixosConfigurations.${host}.materusCfg.hm.lib.homeManagerConfiguration { pkgs = materusFlake.nixosConfigurations.${host}.pkgs; - extraSpecialArgs = { inherit inputs; inherit materusFlake; }; + extraSpecialArgs = { materusCfg = materusFlake.nixosConfigurations.${host}.materusCfg; }; modules = [ ./${username} ../host/${host}/extraHome.nix profiles.homeProfile inputs.private.homeModule - ]; }; }] @@ -29,9 +28,19 @@ let in (builtins.listToAttrs (_for 0)) // { #Make generic x86_64-linux user profile "username" - ${username} = inputs.configInputs.inputs.home-manager.lib.homeManagerConfiguration { + ${username} = + let materusCfg = { + stable = false; + inherit materusFlake; + host = "Generic"; + hm = inputs.configInputs.inputs.home-manager; + nixerus = inputs.configInputs.inputs.nixerus; + configInputs = inputs.configInputs; + path = materusFlake.selfPath; + }; in + inputs.configInputs.inputs.home-manager.lib.homeManagerConfiguration { pkgs = import inputs.nixpkgs { system = "x86_64-linux"; config = {allowUnfree = true;}; }; - extraSpecialArgs = { inherit inputs; inherit materusFlake; }; + extraSpecialArgs = { inherit materusCfg; }; modules = [ ./${username} profiles.homeProfile diff --git a/configurations/host/default.nix b/configurations/host/default.nix index 3a817d3..dd7980b 100644 --- a/configurations/host/default.nix +++ b/configurations/host/default.nix @@ -2,65 +2,33 @@ let profiles = import ../profile; + +makeSystem = {host, arch ? "x86_64-linux", extraModules ? [], stable ? true}: +let +nixosSystem = if stable then inputs.nixpkgs-stable.lib.nixosSystem else inputs.nixpkgs.lib.nixosSystem; +hm = if stable then inputs.configInputs-stable.inputs.home-manager else inputs.configInputs.inputs.home-manager; +materusCfg = { + inherit stable; + inherit materusFlake; + inherit host; + inherit hm; + nixerus = if stable then inputs.configInputs-stable.inputs.nixerus else inputs.configInputs.inputs.nixerus; + configInputs = if stable then inputs.configInputs-stable else inputs.configInputs; + path = materusFlake.selfPath; +}; +in +(nixosSystem rec { + specialArgs = { inherit materusCfg; }; + system = arch; + modules = [ + ./${host} + inputs.private.systemModule + profiles.osProfile + ] ++ extraModules; + }) // {inherit materusCfg;}; in { - materusPC = inputs.nixpkgs.lib.nixosSystem rec { - specialArgs = { inherit inputs; inherit materusFlake; }; - system = "x86_64-linux"; - modules = [ - ./materusPC - inputs.private.systemModule - profiles.osProfile - ]; - }; - flamaster = inputs.nixpkgs.lib.nixosSystem rec { - specialArgs = { inherit inputs; inherit materusFlake; }; - system = "x86_64-linux"; - modules = [ - ./flamaster - inputs.private.systemModule - profiles.osProfile - - inputs.home-manager.nixosModules.home-manager - { - home-manager.useGlobalPkgs = true; - home-manager.useUserPackages = true; - home-manager.users.materus = { config ,... }: { - imports = [ - ../home/materus - flamaster/extraHome.nix - profiles.homeProfile - inputs.private.homeModule - ]; - materus.profile.nixpkgs.enable = false; - }; - home-manager.extraSpecialArgs = { inherit inputs; inherit materusFlake; }; - } - ]; - }; - valkyrie = inputs.nixpkgs.lib.nixosSystem rec { - specialArgs = { inherit inputs; inherit materusFlake; }; - system = "x86_64-linux"; - modules = [ - ./valkyrie - inputs.private.systemModule - profiles.osProfile - inputs.home-manager.nixosModules.home-manager - { - home-manager.useGlobalPkgs = true; - home-manager.useUserPackages = true; - home-manager.users.materus = { config ,... }: { - imports = [ - ../home/materus - valkyrie/extraHome.nix - profiles.homeProfile - inputs.private.homeModule - ]; - materus.profile.nixpkgs.enable = false; - }; - home-manager.extraSpecialArgs = { inherit inputs; inherit materusFlake; }; - } - ]; - }; - + materusPC = makeSystem {host = "materusPC"; stable = false;}; + flamaster = makeSystem {host = "flamaster"; stable = true;}; + valkyrie = makeSystem {host = "valkyrie"; stable = true;}; } diff --git a/configurations/host/flamaster/configuration.nix b/configurations/host/flamaster/configuration.nix index 09d57e5..3530fd5 100644 --- a/configurations/host/flamaster/configuration.nix +++ b/configurations/host/flamaster/configuration.nix @@ -2,7 +2,7 @@ # your system. Help is available in the configuration.nix(5) man page # and in the NixOS manual (accessible by running ‘nixos-help’). -{ config, lib, pkgs, materusFlake, materusPkgs, ... }: +{ config, lib, pkgs, materusArg, ... }: { imports = @@ -115,7 +115,7 @@ isNormalUser = true; description = "Mateusz Słodkowicz"; extraGroups = [ "networkmanager" "wheel" ]; - openssh.authorizedKeys.keyFiles = [ (materusFlake.selfPath + /extraFiles/keys/ssh/materus.pub) ]; + openssh.authorizedKeys.keyFiles = [ ("${materusArg.cfg.path}" + "/extraFiles/keys/ssh/materus.pub") ]; packages = with pkgs; [ kate ]; diff --git a/configurations/host/flamaster/extraHome.nix b/configurations/host/flamaster/extraHome.nix index 1ad957a..5172de2 100644 --- a/configurations/host/flamaster/extraHome.nix +++ b/configurations/host/flamaster/extraHome.nix @@ -1,4 +1,4 @@ -{ config, pkgs, materusPkgs, lib, ... }: +{ config, pkgs, materusArg, lib, ... }: { home.stateVersion = "23.05"; home.homeDirectory = "/home/materus"; @@ -15,7 +15,7 @@ home.packages = [ pkgs.papirus-icon-theme - (materusPkgs.polymc.wrap { extraJDKs = [ pkgs.graalvm-ce ]; }) + (materusArg.pkgs.polymc.wrap { extraJDKs = [ pkgs.graalvm-ce ]; }) ]; } diff --git a/configurations/host/materusPC/default.nix b/configurations/host/materusPC/default.nix index 25239ba..60540b1 100644 --- a/configurations/host/materusPC/default.nix +++ b/configurations/host/materusPC/default.nix @@ -1,4 +1,4 @@ -{ config, pkgs, lib, inputs, materusFlake, ... }: +{ config, pkgs, lib, ... }: { imports = [ diff --git a/configurations/host/materusPC/extraHome.nix b/configurations/host/materusPC/extraHome.nix index df7624f..f182229 100644 --- a/configurations/host/materusPC/extraHome.nix +++ b/configurations/host/materusPC/extraHome.nix @@ -1,4 +1,4 @@ -{ config, pkgs, materusPkgs, lib, ... }: +{ config, pkgs, materusArg, lib, ... }: { home.stateVersion = "23.05"; home.homeDirectory = "/home/materus"; @@ -67,13 +67,13 @@ home.packages = [ pkgs.papirus-icon-theme - materusPkgs.ffmpeg6-amf-full - (materusPkgs.polymc.wrap { extraJDKs = [ pkgs.graalvm-ce ]; extraLibs = [ ]; }) + materusArg.pkgs.ffmpeg6-amf-full + (materusArg.pkgs.polymc.wrap { extraJDKs = [ pkgs.graalvm-ce ]; extraLibs = [ ]; }) ]; programs.obs-studio = { enable = true; plugins = with pkgs.obs-studio-plugins; [ wlrobs obs-vaapi obs-vkcapture obs-gstreamer input-overlay obs-multi-rtmp obs-pipewire-audio-capture ]; - package = materusPkgs.obs-amf; + package = materusArg.pkgs.obs-amf; }; } diff --git a/configurations/host/materusPC/gnome.nix b/configurations/host/materusPC/gnome.nix index 353ba40..4393657 100644 --- a/configurations/host/materusPC/gnome.nix +++ b/configurations/host/materusPC/gnome.nix @@ -1,5 +1,5 @@ -{ config, pkgs, lib, inputs, materusFlake, materusPkgs, ... }: +{ config, pkgs, lib,... }: { diff --git a/configurations/host/materusPC/hardware/boot.nix b/configurations/host/materusPC/hardware/boot.nix index 98c5ca4..f8a7a9c 100644 --- a/configurations/host/materusPC/hardware/boot.nix +++ b/configurations/host/materusPC/hardware/boot.nix @@ -1,4 +1,4 @@ -{ config, pkgs, lib, inputs, materusFlake, ... }: +{ config, pkgs, lib, ... }: let video = [ diff --git a/configurations/host/materusPC/hardware/default.nix b/configurations/host/materusPC/hardware/default.nix index 3cee4c7..7c3454d 100644 --- a/configurations/host/materusPC/hardware/default.nix +++ b/configurations/host/materusPC/hardware/default.nix @@ -1,4 +1,4 @@ -{ config, pkgs, lib, inputs, materusFlake, materusPkgs, ... }: +{ config, pkgs, lib, materusArg, ... }: { imports = [ @@ -7,8 +7,8 @@ ]; hardware.firmware = with pkgs; [ - #materusPkgs.amdgpu-pro-libs.firmware.vcn - #materusPkgs.amdgpu-pro-libs.firmware + #materusArg.pkgs.amdgpu-pro-libs.firmware.vcn + #materusArg.pkgs.amdgpu-pro-libs.firmware linux-firmware alsa-firmware sof-firmware @@ -37,13 +37,13 @@ amdvlk rocmPackages.clr.icd rocmPackages.clr - materusPkgs.amdgpu-pro-libs.vulkan - materusPkgs.amdgpu-pro-libs.amf + materusArg.pkgs.amdgpu-pro-libs.vulkan + materusArg.pkgs.amdgpu-pro-libs.amf ]; hardware.opengl.extraPackages32 = with pkgs.pkgsi686Linux; [ vaapiVdpau pkgs.driversi686Linux.amdvlk - materusPkgs.i686Linux.amdgpu-pro-libs.vulkan + materusArg.pkgs.i686Linux.amdgpu-pro-libs.vulkan libvdpau-va-gl ]; services.udev.extraRules = '' diff --git a/configurations/host/materusPC/hardware/filesystem.nix b/configurations/host/materusPC/hardware/filesystem.nix index dbdea7c..36e874b 100644 --- a/configurations/host/materusPC/hardware/filesystem.nix +++ b/configurations/host/materusPC/hardware/filesystem.nix @@ -1,4 +1,4 @@ -{ config, pkgs, lib, inputs, materusFlake, ... }: +{ config, pkgs, lib, ... }: { zramSwap = { enable = true; diff --git a/configurations/host/materusPC/kde.nix b/configurations/host/materusPC/kde.nix index 4a523f6..c6b49b8 100644 --- a/configurations/host/materusPC/kde.nix +++ b/configurations/host/materusPC/kde.nix @@ -1,4 +1,4 @@ -{ config, pkgs, lib, inputs, materusFlake, materusPkgs, ... }: +{ config, pkgs, lib, ... }: let westonSddm = pkgs.writeText "weston.ini" '' diff --git a/configurations/host/materusPC/network.nix b/configurations/host/materusPC/network.nix index 845980e..0819297 100644 --- a/configurations/host/materusPC/network.nix +++ b/configurations/host/materusPC/network.nix @@ -1,4 +1,4 @@ -{ config, pkgs, lib, inputs, materusFlake, ... }: +{ config, pkgs, lib, ... }: { networking.useDHCP = lib.mkDefault true; networking.hostName = "materusPC"; diff --git a/configurations/host/materusPC/scripts.nix b/configurations/host/materusPC/scripts.nix index 2e9eb02..bf8bd30 100644 --- a/configurations/host/materusPC/scripts.nix +++ b/configurations/host/materusPC/scripts.nix @@ -1,4 +1,4 @@ -{ config, pkgs, lib, inputs, materusFlake, ... }: +{ config, pkgs, lib, ... }: let valkyrie-sync = pkgs.writeShellScriptBin "valkyrie-sync" '' ${pkgs.rsync}/bin/rsync -avzrh --delete --exclude ".git*" --exclude "flake.lock" /materus/config/nixos-config materus@valkyrie:/materus/config/ && \ diff --git a/configurations/host/materusPC/tmp.nix b/configurations/host/materusPC/tmp.nix index 62e9427..1b7e206 100644 --- a/configurations/host/materusPC/tmp.nix +++ b/configurations/host/materusPC/tmp.nix @@ -1,4 +1,4 @@ -{ config, pkgs, lib, inputs, materusFlake, materusPkgs, ... }: +{ config, pkgs, lib, materusArg, ... }: { virtualisation.lxc.enable = false; @@ -193,7 +193,7 @@ firefox gamescope #(pkgs.lutris.override { extraLibraries = pkgs: with pkgs; [ pkgs.samba pkgs.jansson pkgs.tdb pkgs.libunwind pkgs.libusb1 pkgs.gnutls pkgs.gtk3 pkgs.pango ]; }) - materusPkgs.amdgpu-pro-libs.prefixes + materusArg.pkgs.amdgpu-pro-libs.prefixes (pkgs.bottles.override { extraPkgs = pkgs: with pkgs; [ pkgs.libsForQt5.breeze-qt5 pkgs.libsForQt5.breeze-gtk pkgs.nss_latest ]; extraLibraries = pkgs: with pkgs; [ pkgs.samba pkgs.jansson pkgs.tdb pkgs.libunwind pkgs.libusb1 pkgs.gnutls pkgs.gtk3 pkgs.pango ]; }) glibc glib @@ -251,7 +251,7 @@ # pgcli # litecli - materusPkgs.alvr + materusArg.pkgs.alvr #zenmonitor nix-du diff --git a/configurations/host/materusPC/vm/default.nix b/configurations/host/materusPC/vm/default.nix index e62de66..23e83c5 100644 --- a/configurations/host/materusPC/vm/default.nix +++ b/configurations/host/materusPC/vm/default.nix @@ -1,4 +1,4 @@ -{ config, pkgs, lib, inputs, materusFlake, ... }: +{ config, pkgs, lib, ... }: { imports = [ ./win10 diff --git a/configurations/host/materusPC/vm/win10/default.nix b/configurations/host/materusPC/vm/win10/default.nix index fa02832..492e813 100644 --- a/configurations/host/materusPC/vm/win10/default.nix +++ b/configurations/host/materusPC/vm/win10/default.nix @@ -1,4 +1,4 @@ -{ config, pkgs, lib, inputs, materusFlake, ... }: +{ config, pkgs, lib, ... }: let startHook = /*'' diff --git a/configurations/host/valkyrie/default.nix b/configurations/host/valkyrie/default.nix index d77dba6..6453c16 100644 --- a/configurations/host/valkyrie/default.nix +++ b/configurations/host/valkyrie/default.nix @@ -2,7 +2,7 @@ # your system. Help is available in the configuration.nix(5) man page # and in the NixOS manual (accessible by running `nixos-help`). -{ config, pkgs, materusFlake, ... }: +{ config, pkgs, materusArg, ... }: { imports = @@ -71,7 +71,7 @@ extraGroups = [ "wheel" ]; # Enable ‘sudo’ for the user. packages = with pkgs; [ ]; - openssh.authorizedKeys.keyFiles = [ (materusFlake.selfPath + /extraFiles/keys/ssh/materus.pub) ]; + openssh.authorizedKeys.keyFiles = [ ("${materusArg.cfg.path}" + "/extraFiles/keys/ssh/materus.pub") ]; }; # List packages installed in system profile. To search, run: diff --git a/configurations/host/valkyrie/extraHome.nix b/configurations/host/valkyrie/extraHome.nix index 0693e0c..e1707ab 100644 --- a/configurations/host/valkyrie/extraHome.nix +++ b/configurations/host/valkyrie/extraHome.nix @@ -1,4 +1,4 @@ -{ config, pkgs, materusPkgs, lib, ... }: +{ config, pkgs, lib, ... }: { home.stateVersion = "23.05"; home.homeDirectory = "/home/materus"; diff --git a/configurations/host/valkyrie/services/default.nix b/configurations/host/valkyrie/services/default.nix index 8702dc6..d0a91eb 100644 --- a/configurations/host/valkyrie/services/default.nix +++ b/configurations/host/valkyrie/services/default.nix @@ -1,4 +1,4 @@ -{ config, pkgs, materusFlake, ... }: +{ config, pkgs, ... }: { imports = [ diff --git a/configurations/host/valkyrie/services/pihole.nix b/configurations/host/valkyrie/services/pihole.nix index 24ba674..046bb0e 100644 --- a/configurations/host/valkyrie/services/pihole.nix +++ b/configurations/host/valkyrie/services/pihole.nix @@ -1,6 +1,6 @@ -{ config, pkgs, lib, materusPkgs, ... }: +{ config, pkgs, lib, materusArg, ... }: { - options.valkyrieService.pihole.enable = materusPkgs.lib.mkBoolOpt false "Enable pihole"; + options.valkyrieService.pihole.enable = materusArg.pkgs.lib.mkBoolOpt false "Enable pihole"; options.valkyrieService.pihole.dnsIP = lib.mkOption { default = "127.0.0.1";}; options.valkyrieService.pihole.webIP = lib.mkOption { default = "127.0.0.1";}; diff --git a/configurations/host/valkyrie/services/pleroma.nix b/configurations/host/valkyrie/services/pleroma.nix index 7f5d6ba..9bf335a 100644 --- a/configurations/host/valkyrie/services/pleroma.nix +++ b/configurations/host/valkyrie/services/pleroma.nix @@ -1,4 +1,4 @@ -{ config, pkgs, lib, materusPkgs, ... }: +{ config, pkgs, lib, materusArg, ... }: let socketPath = "/run/pleroma/http.sock"; @@ -41,7 +41,7 @@ let in { - options.valkyrieService.pleroma.enable = materusPkgs.lib.mkBoolOpt false "Enable pleroma"; + options.valkyrieService.pleroma.enable = materusArg.pkgs.lib.mkBoolOpt false "Enable pleroma"; config = lib.mkIf config.valkyrieService.pleroma.enable { systemd.tmpfiles.rules = [ "d /var/lib/pleroma 0766 pleroma pleroma -" diff --git a/configurations/profile/common/default.nix b/configurations/profile/common/default.nix index c90dcd2..ee3fcb2 100644 --- a/configurations/profile/common/default.nix +++ b/configurations/profile/common/default.nix @@ -1,9 +1,15 @@ -{ config, pkgs, lib, materusFlake, inputs, ... }: +{ config, pkgs, lib, materusCfg, ... }: +let +materusArg = { + pkgs = (import materusCfg.nixerus { inherit pkgs; }) // + (if pkgs.system == "x86_64-linux" then { i686Linux = import materusCfg.nixerus { pkgs = pkgs.pkgsi686Linux; }; } else { }); + cfg = materusCfg; +}; +in { imports = [ ./nixpkgs.nix ./packages ]; - config._module.args.materusPkgs = (import inputs.configInputs.inputs.nixerus { inherit pkgs; }) // - (if pkgs.system == "x86_64-linux" then { i686Linux = import inputs.configInputs.inputs.nixerus { pkgs = pkgs.pkgsi686Linux; }; } else { }); + config._module.args.materusArg = materusArg; } diff --git a/configurations/profile/common/nixpkgs.nix b/configurations/profile/common/nixpkgs.nix index a69ee29..11a154e 100644 --- a/configurations/profile/common/nixpkgs.nix +++ b/configurations/profile/common/nixpkgs.nix @@ -1,4 +1,4 @@ -{ config, pkgs, inputs, lib,... }: +{ config, pkgs, lib, materusArg, ... }: let mkBoolOpt = default: description: lib.mkOption { inherit default; @@ -18,5 +18,5 @@ in joypixels.acceptLicense = lib.mkDefault true; firefox.enablePlasmaBrowserIntegration = true; }; - config.nixpkgs.overlays = lib.mkIf cfg.enableOverlays [inputs.configInputs.inputs.emacs-overlay.overlay]; + config.nixpkgs.overlays = lib.mkIf cfg.enableOverlays [materusArg.cfg.configInputs.inputs.emacs-overlay.overlay]; } diff --git a/configurations/profile/common/packages/default.nix b/configurations/profile/common/packages/default.nix index d11d5a1..2f28fef 100644 --- a/configurations/profile/common/packages/default.nix +++ b/configurations/profile/common/packages/default.nix @@ -1,12 +1,12 @@ -{ config, pkgs, lib, inputs, materusFlake, materusPkgs, ... }: -with materusPkgs.lib; +{ config, pkgs, lib, materusArg, ... }: +with materusArg.pkgs.lib; { imports = [ ./fonts.nix ]; #Single Packages - options.materus.profile.packages.home-manager = mkPrivateVar inputs.configInputs.inputs.home-manager.packages.${pkgs.system}.home-manager; + options.materus.profile.packages.home-manager = mkPrivateVar materusArg.cfg.configInputs.inputs.home-manager.packages.${pkgs.system}.home-manager; options.materus.profile.packages.firefox = mkPrivateVar pkgs.firefox; #Package Lists diff --git a/configurations/profile/home/browser.nix b/configurations/profile/home/browser.nix index 4752cd6..330a6fd 100644 --- a/configurations/profile/home/browser.nix +++ b/configurations/profile/home/browser.nix @@ -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"; diff --git a/configurations/profile/home/default.nix b/configurations/profile/home/default.nix index 784f736..cb0e16a 100644 --- a/configurations/profile/home/default.nix +++ b/configurations/profile/home/default.nix @@ -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 = { diff --git a/configurations/profile/home/editor/code.nix b/configurations/profile/home/editor/code.nix index ce6199b..9db034e 100644 --- a/configurations/profile/home/editor/code.nix +++ b/configurations/profile/home/editor/code.nix @@ -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 = { diff --git a/configurations/profile/home/editor/emacs.nix b/configurations/profile/home/editor/emacs.nix index 5b1a7f6..c982609 100644 --- a/configurations/profile/home/editor/emacs.nix +++ b/configurations/profile/home/editor/emacs.nix @@ -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 diff --git a/configurations/profile/home/editor/neovim.nix b/configurations/profile/home/editor/neovim.nix index 7b4997f..99a3afb 100644 --- a/configurations/profile/home/editor/neovim.nix +++ b/configurations/profile/home/editor/neovim.nix @@ -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; diff --git a/configurations/profile/home/fonts.nix b/configurations/profile/home/fonts.nix index e5d2abf..f2068ca 100644 --- a/configurations/profile/home/fonts.nix +++ b/configurations/profile/home/fonts.nix @@ -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; diff --git a/configurations/profile/home/shell/bash.nix b/configurations/profile/home/shell/bash.nix index 98359fb..910ee80 100644 --- a/configurations/profile/home/shell/bash.nix +++ b/configurations/profile/home/shell/bash.nix @@ -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 { diff --git a/configurations/profile/home/shell/fish.nix b/configurations/profile/home/shell/fish.nix index e12a6d5..a92594d 100644 --- a/configurations/profile/home/shell/fish.nix +++ b/configurations/profile/home/shell/fish.nix @@ -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; diff --git a/configurations/profile/home/shell/starship.nix b/configurations/profile/home/shell/starship.nix index 6f478a2..f42b685 100644 --- a/configurations/profile/home/shell/starship.nix +++ b/configurations/profile/home/shell/starship.nix @@ -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; diff --git a/configurations/profile/home/shell/zsh.nix b/configurations/profile/home/shell/zsh.nix index fdbbac8..de3f113 100644 --- a/configurations/profile/home/shell/zsh.nix +++ b/configurations/profile/home/shell/zsh.nix @@ -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"; diff --git a/configurations/profile/os/fonts.nix b/configurations/profile/os/fonts.nix index 08f4add..63bfb7c 100644 --- a/configurations/profile/os/fonts.nix +++ b/configurations/profile/os/fonts.nix @@ -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 false "Enable materus font settings for OS"; + options.materus.profile.fonts.enable = materusArg.pkgs.lib.mkBoolOpt false "Enable materus font settings for OS"; config = lib.mkIf cfg.enable { diff --git a/configurations/profile/os/games/steam.nix b/configurations/profile/os/games/steam.nix index 920bd0f..c9bea41 100644 --- a/configurations/profile/os/games/steam.nix +++ b/configurations/profile/os/games/steam.nix @@ -1,4 +1,4 @@ -{ config, pkgs, lib, materusPkgs, inputs, ... }: +{ config, pkgs, lib, materusArg, inputs, ... }: let optHip = pkgs.stdenv.mkDerivation rec { pname = "optHip"; @@ -24,7 +24,7 @@ let steamPkg = pkgs.steam.override { extraPkgs = pkgs: [ #config.materus.profile.packages.firefox - optHip #for blender + #optHip #for blender pkgs.libdecor pkgs.obs-studio-plugins.obs-vkcapture pkgs.steamcmd @@ -72,7 +72,7 @@ let pkgs.x264.lib pkgs.steamtinkerlaunch - ] ++ config.materus.profile.packages.list.fonts; + ] ++ config.materus.profile.packages.list.fonts ++ config.materus.profile.steam.extraPkgs; extraLibraries = pkgs: [ pkgs.libkrb5 @@ -100,12 +100,16 @@ let cfg = config.materus.profile.steam; in { - options.materus.profile.steam.enable = materusPkgs.lib.mkBoolOpt false "Enable materus steam settings for OS"; + options.materus.profile.steam.enable = materusArg.pkgs.lib.mkBoolOpt false "Enable materus steam settings for OS"; options.materus.profile.steam.package = lib.mkOption { type = lib.types.package; default = steamPkg; description = "Package used by steam"; }; + options.materus.profile.steam.extraPkgs = lib.mkOption { + default = []; + description = "Extra packages for steam"; + }; config = lib.mkIf cfg.enable { diff --git a/configurations/profile/os/nix.nix b/configurations/profile/os/nix.nix index 7cb97db..6c36308 100644 --- a/configurations/profile/os/nix.nix +++ b/configurations/profile/os/nix.nix @@ -1,9 +1,9 @@ -{ config, pkgs, lib, inputs, materusPkgs, ... }: +{ config, pkgs, lib, materusArg, ... }: let cfg = config.materus.profile.nix; in { - options.materus.profile.nix.enable = materusPkgs.lib.mkBoolOpt false "Enable materus nix settings"; + options.materus.profile.nix.enable = materusArg.pkgs.lib.mkBoolOpt false "Enable materus nix settings"; config.nix = lib.mkIf cfg.enable { package = lib.mkDefault pkgs.nixVersions.unstable; diff --git a/flake.lock b/flake.lock index 1f36a41..e825584 100644 --- a/flake.lock +++ b/flake.lock @@ -25,6 +25,32 @@ "type": "github" } }, + "configInputs-stable": { + "inputs": { + "emacs-overlay": "emacs-overlay_2", + "home-manager": "home-manager_2", + "nixerus": "nixerus_2", + "nixos-hardware": "nixos-hardware", + "nixpkgs": [ + "nixpkgs-stable" + ], + "nur": "nur_4" + }, + "locked": { + "lastModified": 1698402907, + "narHash": "sha256-UlpPCLpyNEoQ7Enb0AhhIM8d7lC/2BWd8+fjNm9N/GY=", + "owner": "materusPL", + "repo": "nixos-config", + "rev": "06a35210af4b8586a2b3d64815a67e3516ce732a", + "type": "github" + }, + "original": { + "owner": "materusPL", + "ref": "inputs", + "repo": "nixos-config", + "type": "github" + } + }, "emacs-overlay": { "inputs": { "flake-utils": "flake-utils", @@ -49,6 +75,30 @@ "type": "github" } }, + "emacs-overlay_2": { + "inputs": { + "flake-utils": "flake-utils_2", + "nixpkgs": [ + "configInputs-stable", + "nixpkgs" + ], + "nixpkgs-stable": "nixpkgs-stable_2" + }, + "locked": { + "lastModified": 1698401973, + "narHash": "sha256-ITmrkooGUmat5f9T3yzKqoqu5eO8QfHq2JNOa0tPb1E=", + "owner": "nix-community", + "repo": "emacs-overlay", + "rev": "88a6b098a9e77718eebd801b650695765e54136a", + "type": "github" + }, + "original": { + "owner": "nix-community", + "ref": "master", + "repo": "emacs-overlay", + "type": "github" + } + }, "flake-utils": { "inputs": { "systems": "systems" @@ -67,6 +117,24 @@ "type": "github" } }, + "flake-utils_2": { + "inputs": { + "systems": "systems_2" + }, + "locked": { + "lastModified": 1694529238, + "narHash": "sha256-zsNZZGTGnMOf9YpHKJqMSsa0dXbfmxeoJ7xHlrt+xmY=", + "owner": "numtide", + "repo": "flake-utils", + "rev": "ff7b65b44d01cf9ba6a71320833626af21126384", + "type": "github" + }, + "original": { + "owner": "numtide", + "repo": "flake-utils", + "type": "github" + } + }, "home-manager": { "inputs": { "nixpkgs": [ @@ -90,6 +158,28 @@ } }, "home-manager_2": { + "inputs": { + "nixpkgs": [ + "configInputs-stable", + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1695108154, + "narHash": "sha256-gSg7UTVtls2yO9lKtP0yb66XBHT1Fx5qZSZbGMpSn2c=", + "owner": "nix-community", + "repo": "home-manager", + "rev": "07682fff75d41f18327a871088d20af2710d4744", + "type": "github" + }, + "original": { + "owner": "nix-community", + "ref": "master", + "repo": "home-manager", + "type": "github" + } + }, + "home-manager_3": { "inputs": { "nixpkgs": "nixpkgs" }, @@ -134,6 +224,49 @@ "type": "github" } }, + "nixerus_2": { + "inputs": { + "home-manager": [ + "configInputs-stable", + "home-manager" + ], + "nixpkgs": [ + "configInputs-stable", + "nixpkgs" + ], + "nur": "nur_3" + }, + "locked": { + "lastModified": 1698175745, + "narHash": "sha256-qlvZjrDUL7KSiu7z8zotYvP7qaD3kKVm/2q86U23K70=", + "owner": "materusPL", + "repo": "Nixerus", + "rev": "5518d2e80ad61b7efb10ddab3aad50d4366e0cd1", + "type": "github" + }, + "original": { + "owner": "materusPL", + "ref": "master", + "repo": "Nixerus", + "type": "github" + } + }, + "nixos-hardware": { + "locked": { + "lastModified": 1698053470, + "narHash": "sha256-sP8D/41UiwC2qn0X40oi+DfuVzNHMROqIWdSdCI/AYA=", + "owner": "NixOS", + "repo": "nixos-hardware", + "rev": "80d98a7d55c6e27954a166cb583a41325e9512d7", + "type": "github" + }, + "original": { + "owner": "NixOS", + "ref": "master", + "repo": "nixos-hardware", + "type": "github" + } + }, "nixpkgs": { "locked": { "lastModified": 1697456312, @@ -166,6 +299,38 @@ "type": "github" } }, + "nixpkgs-stable_2": { + "locked": { + "lastModified": 1698288402, + "narHash": "sha256-jIIjApPdm+4yt8PglX8pUOexAdEiAax/DXW3S/Mb21E=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "60b9db998f71ea49e1a9c41824d09aa274be1344", + "type": "github" + }, + "original": { + "owner": "NixOS", + "ref": "nixos-23.05", + "repo": "nixpkgs", + "type": "github" + } + }, + "nixpkgs-stable_3": { + "locked": { + "lastModified": 1698288402, + "narHash": "sha256-jIIjApPdm+4yt8PglX8pUOexAdEiAax/DXW3S/Mb21E=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "60b9db998f71ea49e1a9c41824d09aa274be1344", + "type": "github" + }, + "original": { + "owner": "NixOS", + "ref": "nixos-23.05", + "repo": "nixpkgs", + "type": "github" + } + }, "nixpkgs_2": { "locked": { "lastModified": 1697723726, @@ -213,6 +378,36 @@ } }, "nur_3": { + "locked": { + "lastModified": 1696758426, + "narHash": "sha256-8ebGev/aEoy9NUhexXLg1gFtcdgT+pmYXoc1rg4U5TM=", + "owner": "nix-community", + "repo": "NUR", + "rev": "2a1a76ccc91abc61c09521931253f9fe9e012a85", + "type": "github" + }, + "original": { + "id": "nur", + "type": "indirect" + } + }, + "nur_4": { + "locked": { + "lastModified": 1698406144, + "narHash": "sha256-UZSg8vqtavLx+e0kfTooOZUqr+G533sG0oe900qloq8=", + "owner": "nix-community", + "repo": "NUR", + "rev": "4a4d1f3e77250d21250c5ea1787d42d4f74ca985", + "type": "github" + }, + "original": { + "owner": "nix-community", + "ref": "master", + "repo": "NUR", + "type": "github" + } + }, + "nur_5": { "locked": { "lastModified": 1698169592, "narHash": "sha256-KBDKzeQE5nOEZtmjvPqg+Pc/dB4rYM7MUQ8I3AFKEl0=", @@ -245,9 +440,11 @@ "root": { "inputs": { "configInputs": "configInputs", - "home-manager": "home-manager_2", + "configInputs-stable": "configInputs-stable", + "home-manager": "home-manager_3", "nixpkgs": "nixpkgs_2", - "nur": "nur_3", + "nixpkgs-stable": "nixpkgs-stable_3", + "nur": "nur_5", "private": "private" } }, @@ -265,6 +462,21 @@ "repo": "default", "type": "github" } + }, + "systems_2": { + "locked": { + "lastModified": 1681028828, + "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=", + "owner": "nix-systems", + "repo": "default", + "rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e", + "type": "github" + }, + "original": { + "owner": "nix-systems", + "repo": "default", + "type": "github" + } } }, "root": "root", diff --git a/flake.nix b/flake.nix index 5252e30..e6ea1cc 100644 --- a/flake.nix +++ b/flake.nix @@ -1,18 +1,28 @@ { description = "Materus hosts and user config"; inputs = { - nixpkgs = { - type = "github"; - owner = "NixOS"; - repo = "nixpkgs"; - ref = "nixos-unstable"; - }; private = { type = "github"; owner = "materusPL"; repo = "Nixerus"; ref = "mock"; }; + + nixpkgs = { + type = "github"; + owner = "NixOS"; + repo = "nixpkgs"; + ref = "nixos-unstable"; + }; + + nixpkgs-stable = { + type = "github"; + owner = "NixOS"; + repo = "nixpkgs"; + ref = "nixos-23.05"; + }; + + configInputs = { type = "github"; owner = "materusPL"; @@ -22,6 +32,16 @@ nixpkgs.follows = "nixpkgs"; }; }; + configInputs-stable = { + type = "github"; + owner = "materusPL"; + repo = "nixos-config"; + ref = "inputs"; + inputs = { + nixpkgs.follows = "nixpkgs-stable"; + home-manager.url = "github:nix-community/home-manager/release-23.05"; + }; + }; };