Only use overlays when needed

pull/50/head
Tudor Roman 2023-12-28 15:23:08 +02:00
parent 39f0a31fab
commit fedcc8d778
Signed by: tudor
SSH Key Fingerprint: SHA256:3CwS9plgXBecpXImPGxDIaSktUXBejbV/zerZMqzzBk
6 changed files with 35 additions and 16 deletions

View File

@ -72,14 +72,7 @@
inherit system;
config.allowUnfree = true;
overlays = [
inputs.hypr-contrib.overlays.default
inputs.nixgl.overlays.default
inputs.agenix.overlays.default
inputs.yarr-nix.overlays.default
(final: prev: {
tudor.site = inputs.site.packages.${system}.site;
tudor.blog = inputs.blog.packages.${system}.blog;
tudor.pong = inputs.co-work.packages.${system}.pong;
unstable = import inputs.unstable { inherit system; config.allowUnfree = true; };
home-manager = inputs.home-manager.packages.${system}.home-manager;
})
@ -183,7 +176,7 @@
};
};
perSystem = {config, pkgs, system, ... }: let
perSystem = {config, pkgs, system, self', ... }: let
deployPkgs = import nixpkgs {
inherit system;
overlays = [
@ -203,14 +196,14 @@
packages.default = pkgs.nix;
packages.home-manager = pkgs.home-manager;
packages.nixos-rebuild = pkgs.nixos-rebuild;
packages.agenix = pkgs.agenix;
packages.agenix = inputs.agenix.packages.${system}.default;
devShells.default = pkgs.mkShell {
buildInputs = with pkgs; [
nix
home-manager
nixos-rebuild
agenix
self'.packages.agenix
deployPkgs.deploy-rs.deploy-rs
nil

View File

@ -1,4 +1,4 @@
{ config, lib, pkgs, ... }:
{ config, inputs, lib, pkgs, ... }:
let
cfg = config.homeModules.desktop.sway;
themeFont = config.homeModules.desktop.fonts.themeFont;
@ -25,6 +25,10 @@ with lib; {
};
config = mkIf cfg.enable {
nixpkgs.overlays = [
inputs.hypr-contrib.overlays.default
];
homeModules.desktop = {
# terminal emulator
foot.enable = true;

View File

@ -9,6 +9,12 @@ with lib;
};
config = mkIf cfg.enable {
nixpkgs.overlays = [
(final: prev: {
tudor.pong = inputs.co-work.packages.${final.system}.pong;
})
];
networking.firewall.allowedTCPPorts = [ 42069 ];
systemd.services.pong = {
enable = true;

View File

@ -8,6 +8,17 @@ with lib; {
};
config = mkIf cfg.enable {
nixpkgs.overlays = [
(final: prev: let
system = final.system;
in {
# https://discourse.nixos.org/t/namespacing-scoping-a-group-of-packages/13782/10
# I couldn't be bothered
tudorSite = inputs.site.packages.${system}.site;
tudorBlog = inputs.blog.packages.${system}.blog;
})
];
services.nginx.virtualHosts."tudorr.ro" = {
forceSSL = true;
enableACME = true;
@ -16,12 +27,12 @@ with lib; {
locations = {
"/" = {
alias = "${pkgs.tudor.site}/";
alias = "${pkgs.tudorSite}/";
index = "index.html";
};
"/blog/" = {
alias = "${pkgs.tudor.blog}/";
alias = "${pkgs.tudorBlog}/";
index = "index.html";
};
};

View File

@ -1,12 +1,14 @@
{ config, lib, pkgs, ... }:
{ config, lib, inputs, ... }:
let
cfg = config.systemModules.services.web.yarr;
yarrPkg = pkgs.yarr;
in
with lib; {
options.systemModules.services.web.yarr.enable = mkEnableOption "Enable yarr";
config = mkIf cfg.enable {
nixpkgs.overlays = [
inputs.yarr-nix.overlays.default
];
services.yarr = {
enable = true;
environmentFile = config.age.secrets.yarr-credentials.path;

View File

@ -1,4 +1,4 @@
{ pkgs, ... }:
{ pkgs, inputs, ... }:
let
nixGLPackage = pkgs.nixgl.nixGLIntel;
laptopScreen = {
@ -16,6 +16,9 @@ let
};
in {
imports = [ ../tudor ];
nixpkgs.overlays = [
inputs.nixgl.overlays.default
];
home.packages = [ nixGLPackage ];