diff --git a/SwarselSystems.org b/SwarselSystems.org index bf3e8f8..4050506 100644 --- a/SwarselSystems.org +++ b/SwarselSystems.org @@ -2027,7 +2027,11 @@ Concerning the =flake = _:= part: pkgsFor = lib.genAttrs (import systems) (system: import inputs.nixpkgs { inherit system; - overlays = [ self.overlays.default ]; + overlays = [ + self.overlays.default + self.overlays.stables + self.overlays.modifications + ]; config.allowUnfree = true; } ); @@ -2134,6 +2138,8 @@ More information on the actual packages build can be found in [[#h:64a5cc16-6b16 }; overlays = [ self.overlays.default + self.overlays.stables + self.overlays.modifications ]; }; inherit pkgs; @@ -3137,27 +3143,37 @@ This defines some apps; they differ from normal packages in that they can be cal }; } #+end_src -** Overlays +** Overlays/Overrides :PROPERTIES: :CUSTOM_ID: h:7a059bd9-13f8-4005-b270-b41eeb6a4af2 :END: -In this section I define packages that I manually add to nixpkgs, or that I want to use in a modified way. This can be useful for packages that are currently awaiting a PR or public packages that I do not want to maintain. +In this section I define packages that I manually add to nixpkgs, or that I want to use in a modified way. This can be useful for packages that are currently awaiting a PR or public packages that I do not want to maintain. This is done in a three step process. -As such, I also define three additional local overlays: +The first overlay stage is responsible for extending the base nixpkgs: 1) =additions= These are for the aforementioned added packages. NOTE: The packages themselves are built in [[#h:6ed1a641-dba8-4e85-a62e-be93264df57a][Packages (pkgs)]]; here, we just add them to the overlay that we then use in the configuration. -2) =modification= - These are for packages that are on nixpkgs, but do not fit my usecase, meaning I need to perform modifications on them. -3) =nixpkgs-stable-versions= - These are simply mirrors of other branches of nixpkgs (mostly past stable branches). Useful for packages that are broken on nixpkgs, but do not need to be on bleeding edge anyways. Automatically fetches all inputs names =nixpkgs-= and adds them under the name in ==. +2) =nixpkgs-stable-versions= + These are simply mirrors of other branches of nixpkgs (mostly past stable branches). Useful for packages that are broken on nixpkgs, but do not need to be on bleeding edge anyways. Automatically fetches all inputs names =nixpkgs-= and adds them under the name in ==. They will be available under =pkgs.=. + +The second stage of overlays is responsible to replace packages in nixpkgs with stable versions. The benefit here is that I have a central place (this part of the config) where I can declare what needs to be stable - broken packages tend to be enduser packages, as packages with huge dependency chains will normally be caught earlier upstream if there is a failure (see [[#h:b562adaf-536c-4267-88a5-026d8a0cda61][Current issues]]). In effect, that means I can override package =xyz= right here, and then use =pkgs.xyz= in the rest of the config, whereas I would need to use =pkgs..xyz= if I were to only use =nixpkgs-stable-versions= from the first stage. + +Note that packages with bigger dependencies should NOT be added here. Such as: + +- chromium +- bluez +- pipewire + +As doing so will trigger enormous rebuilds of e.g. =electron=. + +The third stage takes care of further modifications that should be performed to the packages after they have been overridden in stages 1 and 2: These modifications are for packages that do not fit my usecase, meaning I need to perform modifications on them. As part of the modifications, I add some of my own library functions to be used alongside the functions provided by =nixpkgs= and =home-manager=. On the structure of overlays: as you notice, all of the attributes within overlays are functions which take =final= and =prev= as arguments. This is a convention (sometimes you also see =super= instead of =final=) that aims to tell you that =final= represents the =pkgs= set after it has gone over all modifications, while =prev= is the =pkgs= set before the current modification. - - So, in =additions=, the =final= set is the same as in =modifications=, but their =prev= sets might differ (in this case, I believe they will be the same since all modifications are done at the same step). + - So, in =additions=, the =final= set is the same as in =modifications=, but their =prev= sets differ. - This starts to make a difference when you use multiple overlays and have one overlay depend on the modifications in another overlay. - The =_= argument is used like in a number of other programing languages and signals that the argument is never actually used in the function. @@ -3168,99 +3184,164 @@ On the structure of overlays: as you notice, all of the attributes within overla inherit (self) outputs; inherit (outputs) lib; in - { - flake = _: + { + flake = _: { - overlays = { - default = final: prev: - let - additions = final: _: import "${self}/pkgs/flake" { pkgs = final; inherit self lib; } + overlays = let + nixpkgs-stable-versions = final: _: + let + nixpkgsInputs = + lib.filterAttrs + (name: _v: builtins.match "^nixpkgs-.*" name != null) + inputs; + + rename = name: builtins.replaceStrings [ "nixpkgs-" ] [ "" ] name; + + mkPkgs = src: + import src { + inherit (final.stdenv.hostPlatform) system; + config.allowUnfree = true; + }; + in + builtins.listToAttrs (map + (name: { + name = rename name; + value = mkPkgs nixpkgsInputs.${name}; + }) + (builtins.attrNames nixpkgsInputs)); + + in rec { + default = additions; + additions = final: prev: + let + additions = final: _: import "${self}/pkgs/flake" { pkgs = final; inherit self lib; } // { - swarsel-nix = import inputs.swarsel-nix { - pkgs = prev; + swarsel-nix = import inputs.swarsel-nix { + pkgs = prev; + }; + zjstatus = inputs.zjstatus.packages.${prev.stdenv.hostPlatform.system}.default; }; - zjstatus = inputs.zjstatus.packages.${prev.system}.default; + + in + (additions final prev) + // (nixpkgs-stable-versions final prev) + // (inputs.niri-flake.overlays.niri final prev) + // (inputs.noctalia.overlays.default final prev) + // (inputs.vbc-nix.overlays.default final prev) + // (inputs.nur.overlays.default final prev) + // (inputs.emacs-overlay.overlay final prev) + // (inputs.nix-topology.overlays.default final prev) + // (inputs.nix-index-database.overlays.nix-index final prev) + // (inputs.nixgl.overlay final prev) + // (inputs.nix-minecraft.overlay final prev) + // (inputs.nixos-extra-modules.overlays.default final prev); + + + stables = final: prev: + let + mkUsePkgsFrom = pkgsFrom: names: + builtins.listToAttrs (map + (name: { + inherit name; + value = pkgsFrom.${name}; + }) + names); + + from = let + stablePackages = nixpkgs-stable-versions final prev; + in key: + stablePackages.${key} or (throw "Missing nixpkgs input nixpkgs-${key}"); + + in + (mkUsePkgsFrom (from "dev") [ + # "swayosd" + "firezone-relay" + "firezone-server-web" + "firezone-server-api" + "firezone-server-domain" + ]) + // (mkUsePkgsFrom (from "stable24_05") [ + "awscli2" + ]) + // (mkUsePkgsFrom (from "stable24_11") [ + "python39" + "spotify" + "vieb" + ]) + // (mkUsePkgsFrom (from "stable25_05") [ + "steam-fhsenv-without-steam" + "transmission_3" + ]) + // (mkUsePkgsFrom (from "stable") [ + # "anki" + "azure-cli" + # "bat-extras.batgrep" + # "bluez" + "calibre" + # "chromium" + "dwarfs" + "gotenberg" + "khal" + "libreoffice" + "libreoffice-qt" + "nerd-fonts-symbols-only" + "noto-fonts" + "noto-fonts-cjk-sans" + "noto-fonts-color-emoji" + # "pipewire" + "podman" + "teams-for-linux" + # "vesktop" + "virtualbox" + ]); + + modifications = final: prev: + let + modifications = final: prev: { + # vesktop = prev.vesktop.override { + # withSystemVencord = true; + # }; + + lib = prev.lib // { + swarselsystems = self.outputs.swarselsystemsLib; + hm = self.outputs.homeLib; }; - modifications = final: prev: { - # vesktop = prev.vesktop.override { - # withSystemVencord = true; - # }; - - lib = prev.lib // { - swarselsystems = self.outputs.swarselsystemsLib; - hm = self.outputs.homeLib; - }; - - firefox = prev.firefox.override { - nativeMessagingHosts = [ - prev.tridactyl-native - prev.browserpass - # prev.plasma5Packages.plasma-browser-integration - ]; - }; - - isync = prev.isync.override { - withCyrusSaslXoauth2 = true; - }; - - mgba = final.swarsel-mgba; - - retroarch = prev.retroarch.withCores (cores: with cores; [ - snes9x # snes - nestopia # nes - dosbox # dos - scummvm # scumm - vba-m # gb/a - mgba # gb/a - melonds # ds - dolphin # gc/wii - ]); - + firefox = prev.firefox.override { + nativeMessagingHosts = [ + prev.tridactyl-native + prev.browserpass + # prev.plasma5Packages.plasma-browser-integration + ]; }; - nixpkgs-stable-versions = final: _: - let - nixpkgsInputs = - lib.filterAttrs - (name: _v: builtins.match "^nixpkgs-.*" name != null) - inputs; + isync = prev.isync.override { + withCyrusSaslXoauth2 = true; + }; - rename = name: builtins.replaceStrings [ "nixpkgs-" ] [ "" ] name; + mgba = final.swarsel-mgba; - mkPkgs = src: - import src { - inherit (final) system; - config.allowUnfree = true; - }; - in - builtins.listToAttrs (map - (name: { - name = rename name; - value = mkPkgs nixpkgsInputs.${name}; - }) - (builtins.attrNames nixpkgsInputs)); + noctalia-shell = prev.noctalia-shell.override { + calendarSupport = true; + }; - in - lib.recursiveUpdate - ( - (additions final prev) - // (nixpkgs-stable-versions final prev) - // (inputs.niri-flake.overlays.niri final prev) - // (inputs.noctalia.overlays.default final prev) - // (inputs.vbc-nix.overlays.default final prev) - // (inputs.nur.overlays.default final prev) - // (inputs.emacs-overlay.overlay final prev) - // (inputs.nix-topology.overlays.default final prev) - // (inputs.nix-index-database.overlays.nix-index final prev) - // (inputs.nixgl.overlay final prev) - // (inputs.nix-minecraft.overlay final prev) - // (inputs.nixos-extra-modules.overlays.default final prev) - ) - (modifications final prev); + retroarch = prev.retroarch.withCores (cores: with cores; [ + snes9x # snes + nestopia # nes + dosbox # dos + scummvm # scumm + vba-m # gb/a + mgba # gb/a + melonds # ds + dolphin # gc/wii + ]); + + }; + in + modifications final prev; }; }; - } + } #+end_src ** Installer images (iso, kexec) :PROPERTIES: @@ -8938,6 +9019,8 @@ A breakdown of the flags being set: nixpkgs = { overlays = [ outputs.overlays.default + outputs.overlays.stables + outputs.overlays.modifications ] ++ lib.optionals withHomeManager [ (final: prev: let @@ -9669,7 +9752,7 @@ Enable OpenGL, Sound, Bluetooth and various drivers. bluetooth = lib.mkIf config.swarselsystems.hasBluetooth { enable = true; - package = pkgs.stable.bluez; + package = pkgs.bluez; powerOnBoot = true; settings = { General = { @@ -9721,7 +9804,7 @@ Pipewire handles communication on Wayland. This enables several sound tools as w services.pipewire = { enable = true; - package = pkgs.stable.pipewire; + package = pkgs.pipewire; pulse.enable = true; jack.enable = true; audio.enable = true; @@ -10515,13 +10598,17 @@ Most of the time I am using =power-saver=, however, it is good to be able to cho :CUSTOM_ID: h:5db15758-17d8-4bde-811d-d11ccdd3f3d3 :END: +[[#h:388e71be-f00a-4d45-ade1-218ce942057d][SwayOSD]] provides a neat visual overlay when changing the system volume or brightness. However, the libinput backend needs some fixing, which is done here. + +Nowadays, this is not used in favor of [[#h:96e05275-38df-401b-8809-d45d8f59e43c][Noctalia-shell]]. + #+begin_src nix-ts :tangle modules/nixos/client/swayosd.nix { lib, pkgs, config, ... }: { options.swarselmodules.swayosd = lib.mkEnableOption "swayosd settings"; config = lib.mkIf config.swarselmodules.swayosd { - environment.systemPackages = [ pkgs.dev.swayosd ]; - services.udev.packages = [ pkgs.dev.swayosd ]; + environment.systemPackages = [ pkgs.swayosd ]; + services.udev.packages = [ pkgs.swayosd ]; systemd.services.swayosd-libinput-backend = { description = "SwayOSD LibInput backend for listening to certain keys like CapsLock, ScrollLock, VolumeUp, etc."; documentation = [ "https://github.com/ErikReider/SwayOSD" ]; @@ -10532,7 +10619,7 @@ Most of the time I am using =power-saver=, however, it is good to be able to cho serviceConfig = { Type = "dbus"; BusName = "org.erikreider.swayosd"; - ExecStart = "${pkgs.dev.swayosd}/bin/swayosd-libinput-backend"; + ExecStart = "${pkgs.swayosd}/bin/swayosd-libinput-backend"; Restart = "on-failure"; }; }; @@ -10930,7 +11017,7 @@ I am using distrobox to quickly circumvent isses that I cannot immediately solve virtualisation.podman = { enable = true; dockerCompat = true; - package = pkgs.stable.podman; + package = pkgs.podman; }; }; } @@ -15991,7 +16078,7 @@ kanidm person credential create-reset-token services = { ${serviceName} = { enable = true; - package = pkgs.dev.oauth2-proxy; + package = pkgs.update.oauth2-proxy; cookie = { domain = ".${mainDomain}"; secure = true; @@ -18845,19 +18932,19 @@ This has some state: domain = { settings.ERLANG_DISTRIBUTION_PORT = domainPort; - package = pkgs.dev.firezone-server-domain; + package = pkgs.firezone-server-domain; }; api = { externalUrl = "https://${serviceDomain}/api/"; address = "0.0.0.0"; port = apiPort; - package = pkgs.dev.firezone-server-api; + package = pkgs.firezone-server-api; }; web = { externalUrl = "https://${serviceDomain}/"; address = "0.0.0.0"; port = webPort; - package = pkgs.dev.firezone-server-web; + package = pkgs.firezone-server-web; }; }; @@ -18870,7 +18957,7 @@ This has some state: publicIpv4 = proxyAddress4; publicIpv6 = proxyAddress6; openFirewall = lib.mkIf (!isProxied) true; - package = pkgs.dev.firezone-relay; + package = pkgs.firezone-relay; }; }; # systemd.services.firezone-initialize = @@ -19227,7 +19314,11 @@ This section sets up all the imports that are used in the home-manager section. nix.settings.experimental-features = "nix-command flakes"; nixpkgs = { hostPlatform = "x86_64-darwin"; - overlays = [ outputs.overlays.default ]; + overlays = [ + outputs.overlays.default + outputs.overlays.stables + outputs.overlays.modifications + ]; config = { allowUnfree = true; }; @@ -19408,7 +19499,7 @@ This sets the VirtualBox configuration. Guest should not be enabled if not direl enable = true; enableKvm = true; addNetworkInterface = lib.mkIf config.virtualisation.virtualbox.host.enableKvm false; - package = pkgs.stable.virtualbox; + package = pkgs.virtualbox; enableExtensionPack = true; }; # leaving this here for future notice. setting guest.enable = true will make 'restarting sysinit-reactivation.target' take till timeout on nixos-rebuild switch @@ -19776,7 +19867,7 @@ When setting up a new machine: environment.systemPackages = with pkgs; [ remmina # gp-onsaml-gui - stable24_11.python39 + python39 qemu packer gnumake @@ -20459,6 +20550,8 @@ Again, we adapt =nix= to our needs, enable the home-manager command for non-NixO nixpkgs = lib.mkIf (!isNixos) { overlays = [ outputs.overlays.default + outputs.overlays.stables + outputs.overlays.modifications (final: prev: let additions = final: _: import "${self}/pkgs/config" { @@ -20611,7 +20704,7 @@ This holds packages that I can use as provided, or with small modifications (as (aspellWithDicts (dicts: with dicts; [ de en en-computers en-science ])) # browser - stable24_11.vieb + vieb mgba # utilities @@ -20668,7 +20761,7 @@ This holds packages that I can use as provided, or with small modifications (as # element-desktop nicotine-plus - stable25_05.transmission_3 + transmission_3 mktorrent hugo @@ -20729,13 +20822,7 @@ This holds packages that I can use as provided, or with small modifications (as slurp # the following packages are used (in some way) by waybar - # playerctl pavucontrol - # stable.pamixer - # gnome.gnome-clocks - # wlogout - # jdiskreport - # monitor #keychain qalculate-gtk @@ -21192,8 +21279,7 @@ This section is for programs that require no further configuration. zsh Integrat pkgs.bat-extras.batdiff pkgs.bat-extras.batman pkgs.bat-extras.batwatch - ] ++ [ - pkgs.stable.bat-extras.batgrep + pkgs.bat-extras.batgrep ]; # extraPackages = with pkgs.bat-extras; [ batdiff batman batgrep batwatch ]; }; @@ -24217,7 +24303,7 @@ The `extraConfig` section here CANNOT be reindented. This has something to do wi systemd.user.services.swayosd = confLib.overrideTarget "sway-session.target"; services.swayosd = { enable = true; - package = pkgs.dev.swayosd; + package = pkgs.swayosd; topMargin = 0.5; }; }; @@ -25604,7 +25690,7 @@ This service changes the screen hue at night. I am not sure if that really does programs.anki = { enable = true; - # # package = pkgs.anki; + package = pkgs.anki; hideBottomBar = true; hideBottomBarMode = "always"; hideTopBar = true; @@ -25782,7 +25868,7 @@ This service changes the screen hue at night. I am not sure if that really does config = lib.mkIf config.swarselmodules.${moduleName} { programs.${moduleName} = { enable = true; - package = pkgs.stable.vesktop; + package = pkgs.vesktop; settings = { appBadge = false; arRPC = false; @@ -26394,7 +26480,7 @@ Apart from configuring Noctalia, I here also add some systemd chains to make sur fastfetch.enable = true; noctalia-shell = { enable = true; - package = pkgs.noctalia-shell.override { calendarSupport = true; }; + package = pkgs.noctalia-shell; systemd.enable = true; settings = { bar = { @@ -27072,7 +27158,7 @@ When setting up a new machine: config = { home = { packages = with pkgs; [ - stable.teams-for-linux + teams-for-linux shellcheck dig docker @@ -27082,9 +27168,9 @@ When setting up a new machine: prometheus.cli tigervnc # openstackclient + vscode-fhs + antigravity - vscode - dev.antigravity rustdesk-vbc ]; @@ -27215,7 +27301,7 @@ When setting up a new machine: }; awscli = { enable = true; - package = pkgs.stable24_05.awscli2; + package = pkgs.awscli2; # settings = { # "default" = { }; # "profile s3-imagebuilder-prod" = { }; @@ -27613,7 +27699,7 @@ When setting up a new machine: }; Service = { - ExecStart = "${pkgs.stable.teams-for-linux}/bin/teams-for-linux --disableGpu=true --minimized=true --trayIconEnabled=true"; + ExecStart = "${pkgs.teams-for-linux}/bin/teams-for-linux --disableGpu=true --minimized=true --trayIconEnabled=true"; }; }; diff --git a/modules/home/common/anki.nix b/modules/home/common/anki.nix index 8b26ac6..d8d13fc 100644 --- a/modules/home/common/anki.nix +++ b/modules/home/common/anki.nix @@ -10,7 +10,7 @@ in programs.anki = { enable = true; - # # package = pkgs.anki; + package = pkgs.anki; hideBottomBar = true; hideBottomBarMode = "always"; hideTopBar = true; diff --git a/modules/home/common/packages.nix b/modules/home/common/packages.nix index bd1bed2..40cb0b9 100644 --- a/modules/home/common/packages.nix +++ b/modules/home/common/packages.nix @@ -14,7 +14,6 @@ picard-tools audacity sox - # stable.feishin # does not work with oauth2-proxy calibre # printing @@ -32,7 +31,7 @@ (aspellWithDicts (dicts: with dicts; [ de en en-computers en-science ])) # browser - stable24_11.vieb + vieb mgba # utilities @@ -89,7 +88,7 @@ # element-desktop nicotine-plus - stable25_05.transmission_3 + transmission_3 mktorrent hugo @@ -150,13 +149,7 @@ slurp # the following packages are used (in some way) by waybar - # playerctl pavucontrol - # stable.pamixer - # gnome.gnome-clocks - # wlogout - # jdiskreport - # monitor #keychain qalculate-gtk diff --git a/modules/home/common/programs.nix b/modules/home/common/programs.nix index 26f53d3..8a95b1d 100644 --- a/modules/home/common/programs.nix +++ b/modules/home/common/programs.nix @@ -9,8 +9,7 @@ pkgs.bat-extras.batdiff pkgs.bat-extras.batman pkgs.bat-extras.batwatch - ] ++ [ - pkgs.stable.bat-extras.batgrep + pkgs.bat-extras.batgrep ]; # extraPackages = with pkgs.bat-extras; [ batdiff batman batgrep batwatch ]; }; diff --git a/modules/home/common/settings.nix b/modules/home/common/settings.nix index fc6ff86..e8408a0 100644 --- a/modules/home/common/settings.nix +++ b/modules/home/common/settings.nix @@ -61,6 +61,8 @@ in nixpkgs = lib.mkIf (!isNixos) { overlays = [ outputs.overlays.default + outputs.overlays.stables + outputs.overlays.modifications (final: prev: let additions = final: _: import "${self}/pkgs/config" { diff --git a/modules/home/common/swayosd.nix b/modules/home/common/swayosd.nix index b425eb5..4d81e1a 100644 --- a/modules/home/common/swayosd.nix +++ b/modules/home/common/swayosd.nix @@ -5,7 +5,7 @@ systemd.user.services.swayosd = confLib.overrideTarget "sway-session.target"; services.swayosd = { enable = true; - package = pkgs.dev.swayosd; + package = pkgs.swayosd; topMargin = 0.5; }; }; diff --git a/modules/home/common/vesktop.nix b/modules/home/common/vesktop.nix index 772345c..27b14e4 100644 --- a/modules/home/common/vesktop.nix +++ b/modules/home/common/vesktop.nix @@ -7,7 +7,7 @@ in config = lib.mkIf config.swarselmodules.${moduleName} { programs.${moduleName} = { enable = true; - package = pkgs.stable.vesktop; + package = pkgs.vesktop; settings = { appBadge = false; arRPC = false; diff --git a/modules/home/optional/work.nix b/modules/home/optional/work.nix index d59d082..42d0caf 100644 --- a/modules/home/optional/work.nix +++ b/modules/home/optional/work.nix @@ -11,7 +11,7 @@ in config = { home = { packages = with pkgs; [ - stable.teams-for-linux + teams-for-linux shellcheck dig docker @@ -21,9 +21,9 @@ in prometheus.cli tigervnc # openstackclient + vscode-fhs + antigravity - vscode - dev.antigravity rustdesk-vbc ]; @@ -154,7 +154,7 @@ in }; awscli = { enable = true; - package = pkgs.stable24_05.awscli2; + package = pkgs.awscli2; # settings = { # "default" = { }; # "profile s3-imagebuilder-prod" = { }; @@ -552,7 +552,7 @@ in }; Service = { - ExecStart = "${pkgs.stable.teams-for-linux}/bin/teams-for-linux --disableGpu=true --minimized=true --trayIconEnabled=true"; + ExecStart = "${pkgs.teams-for-linux}/bin/teams-for-linux --disableGpu=true --minimized=true --trayIconEnabled=true"; }; }; diff --git a/modules/nixos/client/distrobox.nix b/modules/nixos/client/distrobox.nix index d44fc7c..4ec1203 100644 --- a/modules/nixos/client/distrobox.nix +++ b/modules/nixos/client/distrobox.nix @@ -10,7 +10,7 @@ virtualisation.podman = { enable = true; dockerCompat = true; - package = pkgs.stable.podman; + package = pkgs.podman; }; }; } diff --git a/modules/nixos/client/hardware.nix b/modules/nixos/client/hardware.nix index fd69f7c..0273fed 100644 --- a/modules/nixos/client/hardware.nix +++ b/modules/nixos/client/hardware.nix @@ -33,7 +33,7 @@ bluetooth = lib.mkIf config.swarselsystems.hasBluetooth { enable = true; - package = pkgs.stable.bluez; + package = pkgs.bluez; powerOnBoot = true; settings = { General = { diff --git a/modules/nixos/client/nix-ld.nix b/modules/nixos/client/nix-ld.nix index ffbc6e7..fa88cf4 100644 --- a/modules/nixos/client/nix-ld.nix +++ b/modules/nixos/client/nix-ld.nix @@ -82,8 +82,7 @@ pipewire pixman speex - # stable.cc.cc - stable25_05.steam-fhsenv-without-steam + steam-fhsenv-without-steam systemd tbb vulkan-loader diff --git a/modules/nixos/client/pipewire.nix b/modules/nixos/client/pipewire.nix index 1f8ea4d..b8e742b 100644 --- a/modules/nixos/client/pipewire.nix +++ b/modules/nixos/client/pipewire.nix @@ -6,7 +6,7 @@ services.pipewire = { enable = true; - package = pkgs.stable.pipewire; + package = pkgs.pipewire; pulse.enable = true; jack.enable = true; audio.enable = true; diff --git a/modules/nixos/client/swayosd.nix b/modules/nixos/client/swayosd.nix index c8d1caf..9b306ef 100644 --- a/modules/nixos/client/swayosd.nix +++ b/modules/nixos/client/swayosd.nix @@ -2,8 +2,8 @@ { options.swarselmodules.swayosd = lib.mkEnableOption "swayosd settings"; config = lib.mkIf config.swarselmodules.swayosd { - environment.systemPackages = [ pkgs.dev.swayosd ]; - services.udev.packages = [ pkgs.dev.swayosd ]; + environment.systemPackages = [ pkgs.swayosd ]; + services.udev.packages = [ pkgs.swayosd ]; systemd.services.swayosd-libinput-backend = { description = "SwayOSD LibInput backend for listening to certain keys like CapsLock, ScrollLock, VolumeUp, etc."; documentation = [ "https://github.com/ErikReider/SwayOSD" ]; @@ -14,7 +14,7 @@ serviceConfig = { Type = "dbus"; BusName = "org.erikreider.swayosd"; - ExecStart = "${pkgs.dev.swayosd}/bin/swayosd-libinput-backend"; + ExecStart = "${pkgs.swayosd}/bin/swayosd-libinput-backend"; Restart = "on-failure"; }; }; diff --git a/modules/nixos/common/settings.nix b/modules/nixos/common/settings.nix index a476389..0a120fe 100644 --- a/modules/nixos/common/settings.nix +++ b/modules/nixos/common/settings.nix @@ -122,6 +122,8 @@ in nixpkgs = { overlays = [ outputs.overlays.default + outputs.overlays.stables + outputs.overlays.modifications ] ++ lib.optionals withHomeManager [ (final: prev: let diff --git a/modules/nixos/darwin/default.nix b/modules/nixos/darwin/default.nix index 43350b5..506eb99 100644 --- a/modules/nixos/darwin/default.nix +++ b/modules/nixos/darwin/default.nix @@ -12,7 +12,11 @@ in nix.settings.experimental-features = "nix-command flakes"; nixpkgs = { hostPlatform = "x86_64-darwin"; - overlays = [ outputs.overlays.default ]; + overlays = [ + outputs.overlays.default + outputs.overlays.stables + outputs.overlays.modifications + ]; config = { allowUnfree = true; }; diff --git a/modules/nixos/optional/virtualbox.nix b/modules/nixos/optional/virtualbox.nix index 2d70471..478afba 100644 --- a/modules/nixos/optional/virtualbox.nix +++ b/modules/nixos/optional/virtualbox.nix @@ -8,7 +8,7 @@ enable = true; enableKvm = true; addNetworkInterface = lib.mkIf config.virtualisation.virtualbox.host.enableKvm false; - package = pkgs.stable.virtualbox; + package = pkgs.virtualbox; enableExtensionPack = true; }; # leaving this here for future notice. setting guest.enable = true will make 'restarting sysinit-reactivation.target' take till timeout on nixos-rebuild switch diff --git a/modules/nixos/optional/work.nix b/modules/nixos/optional/work.nix index 61b224d..b75c41e 100644 --- a/modules/nixos/optional/work.nix +++ b/modules/nixos/optional/work.nix @@ -160,7 +160,7 @@ in environment.systemPackages = with pkgs; [ remmina # gp-onsaml-gui - stable24_11.python39 + python39 qemu packer gnumake diff --git a/modules/nixos/server/firezone.nix b/modules/nixos/server/firezone.nix index 65c0f7f..857ff3d 100644 --- a/modules/nixos/server/firezone.nix +++ b/modules/nixos/server/firezone.nix @@ -174,19 +174,19 @@ in domain = { settings.ERLANG_DISTRIBUTION_PORT = domainPort; - package = pkgs.dev.firezone-server-domain; + package = pkgs.firezone-server-domain; }; api = { externalUrl = "https://${serviceDomain}/api/"; address = "0.0.0.0"; port = apiPort; - package = pkgs.dev.firezone-server-api; + package = pkgs.firezone-server-api; }; web = { externalUrl = "https://${serviceDomain}/"; address = "0.0.0.0"; port = webPort; - package = pkgs.dev.firezone-server-web; + package = pkgs.firezone-server-web; }; }; @@ -199,7 +199,7 @@ in publicIpv4 = proxyAddress4; publicIpv6 = proxyAddress6; openFirewall = lib.mkIf (!isProxied) true; - package = pkgs.dev.firezone-relay; + package = pkgs.firezone-relay; }; }; # systemd.services.firezone-initialize = diff --git a/modules/nixos/server/oauth2-proxy.nix b/modules/nixos/server/oauth2-proxy.nix index bcb525c..2f2af41 100644 --- a/modules/nixos/server/oauth2-proxy.nix +++ b/modules/nixos/server/oauth2-proxy.nix @@ -165,14 +165,14 @@ in services = { ${serviceName} = { enable = true; - package = pkgs.dev.oauth2-proxy; + package = pkgs.update.oauth2-proxy; cookie = { domain = ".${mainDomain}"; secure = true; expire = "900m"; - secret = null; # set by service EnvironmentFile + secretFile = null; }; - clientSecret = null; # set by service EnvironmentFile + clientSecretFile = null; reverseProxy = true; httpAddress = "0.0.0.0:${builtins.toString servicePort}"; redirectURL = "https://${serviceDomain}/oauth2/callback"; diff --git a/modules/nixos/server/paperless.nix b/modules/nixos/server/paperless.nix index ad1efa6..58a45c6 100644 --- a/modules/nixos/server/paperless.nix +++ b/modules/nixos/server/paperless.nix @@ -103,11 +103,11 @@ in gotenberg = { enable = true; - package = pkgs.stable.gotenberg; + package = pkgs.gotenberg; port = gotenbergPort; bindIP = "127.0.0.1"; timeout = "600s"; - chromium.package = pkgs.stable.chromium; + chromium.package = pkgs.chromium; }; }; diff --git a/nix/lib.nix b/nix/lib.nix index c3f0338..8166951 100644 --- a/nix/lib.nix +++ b/nix/lib.nix @@ -49,7 +49,11 @@ let pkgsFor = lib.genAttrs (import systems) (system: import inputs.nixpkgs { inherit system; - overlays = [ self.overlays.default ]; + overlays = [ + self.overlays.default + self.overlays.stables + self.overlays.modifications + ]; config.allowUnfree = true; } ); diff --git a/nix/overlays.nix b/nix/overlays.nix index 76e1e4b..dff0d55 100644 --- a/nix/overlays.nix +++ b/nix/overlays.nix @@ -6,93 +6,162 @@ in { flake = _: { - overlays = { - default = final: prev: - let - additions = final: _: import "${self}/pkgs/flake" { pkgs = final; inherit self lib; } - // { - swarsel-nix = import inputs.swarsel-nix { - pkgs = prev; - }; - zjstatus = inputs.zjstatus.packages.${prev.system}.default; - }; + overlays = + let + nixpkgs-stable-versions = final: _: + let + nixpkgsInputs = + lib.filterAttrs + (name: _v: builtins.match "^nixpkgs-.*" name != null) + inputs; - modifications = final: prev: { - # vesktop = prev.vesktop.override { - # withSystemVencord = true; - # }; + rename = name: builtins.replaceStrings [ "nixpkgs-" ] [ "" ] name; - lib = prev.lib // { - swarselsystems = self.outputs.swarselsystemsLib; - hm = self.outputs.homeLib; + mkPkgs = src: + import src { + inherit (final.stdenv.hostPlatform) system; + config.allowUnfree = true; + }; + in + builtins.listToAttrs (map + (name: { + name = rename name; + value = mkPkgs nixpkgsInputs.${name}; + }) + (builtins.attrNames nixpkgsInputs)); + + in + rec { + default = additions; + additions = final: prev: + let + additions = final: _: import "${self}/pkgs/flake" { pkgs = final; inherit self lib; } + // { + swarsel-nix = import inputs.swarsel-nix { + pkgs = prev; + }; + zjstatus = inputs.zjstatus.packages.${prev.stdenv.hostPlatform.system}.default; }; - firefox = prev.firefox.override { - nativeMessagingHosts = [ - prev.tridactyl-native - prev.browserpass - # prev.plasma5Packages.plasma-browser-integration - ]; + in + (additions final prev) + // (nixpkgs-stable-versions final prev) + // (inputs.niri-flake.overlays.niri final prev) + // (inputs.noctalia.overlays.default final prev) + // (inputs.vbc-nix.overlays.default final prev) + // (inputs.nur.overlays.default final prev) + // (inputs.emacs-overlay.overlay final prev) + // (inputs.nix-topology.overlays.default final prev) + // (inputs.nix-index-database.overlays.nix-index final prev) + // (inputs.nixgl.overlay final prev) + // (inputs.nix-minecraft.overlay final prev) + // (inputs.nixos-extra-modules.overlays.default final prev); + + + stables = final: prev: + let + mkUsePkgsFrom = pkgsFrom: names: + builtins.listToAttrs (map + (name: { + inherit name; + value = pkgsFrom.${name}; + }) + names); + + from = + let + stablePackages = nixpkgs-stable-versions final prev; + in + key: + stablePackages.${key} or (throw "Missing nixpkgs input nixpkgs-${key}"); + + in + (mkUsePkgsFrom (from "dev") [ + # "swayosd" + "firezone-relay" + "firezone-server-web" + "firezone-server-api" + "firezone-server-domain" + ]) + // (mkUsePkgsFrom (from "stable24_05") [ + "awscli2" + ]) + // (mkUsePkgsFrom (from "stable24_11") [ + "python39" + "spotify" + "vieb" + ]) + // (mkUsePkgsFrom (from "stable25_05") [ + "steam-fhsenv-without-steam" + "transmission_3" + ]) + // (mkUsePkgsFrom (from "stable") [ + # "anki" + "azure-cli" + # "bat-extras.batgrep" + # "bluez" + "calibre" + # "chromium" + "dwarfs" + "gotenberg" + "khal" + "libreoffice" + "libreoffice-qt" + "nerd-fonts-symbols-only" + "noto-fonts" + "noto-fonts-cjk-sans" + "noto-fonts-color-emoji" + # "pipewire" + "podman" + "teams-for-linux" + # "vesktop" + "virtualbox" + ]); + + modifications = final: prev: + let + modifications = final: prev: { + # vesktop = prev.vesktop.override { + # withSystemVencord = true; + # }; + + lib = prev.lib // { + swarselsystems = self.outputs.swarselsystemsLib; + hm = self.outputs.homeLib; + }; + + firefox = prev.firefox.override { + nativeMessagingHosts = [ + prev.tridactyl-native + prev.browserpass + # prev.plasma5Packages.plasma-browser-integration + ]; + }; + + isync = prev.isync.override { + withCyrusSaslXoauth2 = true; + }; + + mgba = final.swarsel-mgba; + + noctalia-shell = prev.noctalia-shell.override { + calendarSupport = true; + }; + + retroarch = prev.retroarch.withCores (cores: with cores; [ + snes9x # snes + nestopia # nes + dosbox # dos + scummvm # scumm + vba-m # gb/a + mgba # gb/a + melonds # ds + dolphin # gc/wii + ]); + }; - - isync = prev.isync.override { - withCyrusSaslXoauth2 = true; - }; - - mgba = final.swarsel-mgba; - - retroarch = prev.retroarch.withCores (cores: with cores; [ - snes9x # snes - nestopia # nes - dosbox # dos - scummvm # scumm - vba-m # gb/a - mgba # gb/a - melonds # ds - dolphin # gc/wii - ]); - - }; - - nixpkgs-stable-versions = final: _: - let - nixpkgsInputs = - lib.filterAttrs - (name: _v: builtins.match "^nixpkgs-.*" name != null) - inputs; - - rename = name: builtins.replaceStrings [ "nixpkgs-" ] [ "" ] name; - - mkPkgs = src: - import src { - inherit (final) system; - config.allowUnfree = true; - }; - in - builtins.listToAttrs (map - (name: { - name = rename name; - value = mkPkgs nixpkgsInputs.${name}; - }) - (builtins.attrNames nixpkgsInputs)); - - in - lib.recursiveUpdate - ( - (additions final prev) - // (nixpkgs-stable-versions final prev) - // (inputs.niri-flake.overlays.niri final prev) - // (inputs.noctalia.overlays.default final prev) - // (inputs.vbc-nix.overlays.default final prev) - // (inputs.nur.overlays.default final prev) - // (inputs.emacs-overlay.overlay final prev) - // (inputs.nix-topology.overlays.default final prev) - // (inputs.nix-index-database.overlays.nix-index final prev) - // (inputs.nixgl.overlay final prev) - // (inputs.nix-minecraft.overlay final prev) - // (inputs.nixos-extra-modules.overlays.default final prev) - ) - (modifications final prev); - }; + in + modifications final prev; + }; }; } diff --git a/nix/packages.nix b/nix/packages.nix index 3707fb6..acddaa3 100644 --- a/nix/packages.nix +++ b/nix/packages.nix @@ -42,6 +42,8 @@ }; overlays = [ self.overlays.default + self.overlays.stables + self.overlays.modifications ]; }; inherit pkgs;