flake-parts: rename lib' to conf
Signed-off-by: Amneesh Singh <natto@weirdnatto.in>
This commit is contained in:
		@@ -4,7 +4,7 @@
 | 
				
			|||||||
    _module.args = {
 | 
					    _module.args = {
 | 
				
			||||||
      inherit inputs self;
 | 
					      inherit inputs self;
 | 
				
			||||||
      flake = self;
 | 
					      flake = self;
 | 
				
			||||||
      lib' = {
 | 
					      conf = {
 | 
				
			||||||
        colors = import ./colors.nix;
 | 
					        colors = import ./colors.nix;
 | 
				
			||||||
        network = import ./network.nix;
 | 
					        network = import ./network.nix;
 | 
				
			||||||
      };
 | 
					      };
 | 
				
			||||||
@@ -51,7 +51,7 @@
 | 
				
			|||||||
        ./hosts
 | 
					        ./hosts
 | 
				
			||||||
        ./home
 | 
					        ./home
 | 
				
			||||||
        ./pkgs
 | 
					        ./pkgs
 | 
				
			||||||
        ./lib
 | 
					        ./conf
 | 
				
			||||||
      ];
 | 
					      ];
 | 
				
			||||||
 | 
					
 | 
				
			||||||
      perSystem = { system, pkgs, ... }:
 | 
					      perSystem = { system, pkgs, ... }:
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -1,10 +1,10 @@
 | 
				
			|||||||
{ config, lib', ... }:
 | 
					{ config, conf, ... }:
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
  services = {
 | 
					  services = {
 | 
				
			||||||
    dunst = {
 | 
					    dunst = {
 | 
				
			||||||
      enable = true;
 | 
					      enable = true;
 | 
				
			||||||
      iconTheme = with config.gtk.iconTheme; { inherit name package; };
 | 
					      iconTheme = with config.gtk.iconTheme; { inherit name package; };
 | 
				
			||||||
      settings = with lib'.colors.hex; {
 | 
					      settings = with conf.colors.hex; {
 | 
				
			||||||
        global = {
 | 
					        global = {
 | 
				
			||||||
          mouse_left_click = "close_current";
 | 
					          mouse_left_click = "close_current";
 | 
				
			||||||
          mouse_right_click = "do_action";
 | 
					          mouse_right_click = "do_action";
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -1,4 +1,4 @@
 | 
				
			|||||||
{ pkgs, config, lib', ... }:
 | 
					{ pkgs, config, conf, ... }:
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
  programs = {
 | 
					  programs = {
 | 
				
			||||||
    firefox = {
 | 
					    firefox = {
 | 
				
			||||||
@@ -34,7 +34,7 @@
 | 
				
			|||||||
          font-bold = "Fira Mono:style=Bold:pixelsize=18";
 | 
					          font-bold = "Fira Mono:style=Bold:pixelsize=18";
 | 
				
			||||||
        };
 | 
					        };
 | 
				
			||||||
        scrollback.lines = 4000;
 | 
					        scrollback.lines = 4000;
 | 
				
			||||||
        colors = with lib'.colors.default; {
 | 
					        colors = with conf.colors.default; {
 | 
				
			||||||
          inherit foreground background;
 | 
					          inherit foreground background;
 | 
				
			||||||
          regular0 = surface1;
 | 
					          regular0 = surface1;
 | 
				
			||||||
          regular1 = red;
 | 
					          regular1 = red;
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -1,4 +1,4 @@
 | 
				
			|||||||
{ pkgs, config, lib', inputs, ... }:
 | 
					{ pkgs, config, conf, inputs, ... }:
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
  wayland = {
 | 
					  wayland = {
 | 
				
			||||||
    windowManager = {
 | 
					    windowManager = {
 | 
				
			||||||
@@ -14,7 +14,7 @@
 | 
				
			|||||||
          + (with config.home.pointerCursor; ''
 | 
					          + (with config.home.pointerCursor; ''
 | 
				
			||||||
          exec-once=hyprctl setcursor ${name} ${toString size}
 | 
					          exec-once=hyprctl setcursor ${name} ${toString size}
 | 
				
			||||||
        '')
 | 
					        '')
 | 
				
			||||||
          + (with lib'.colors.argb { a = "ee"; };''
 | 
					          + (with conf.colors.argb { a = "ee"; };''
 | 
				
			||||||
          general {
 | 
					          general {
 | 
				
			||||||
            col.active_border = 0x${mauve} 0x${flamingo} 135deg
 | 
					            col.active_border = 0x${mauve} 0x${flamingo} 135deg
 | 
				
			||||||
            col.inactive_border = 0x${surface0}
 | 
					            col.inactive_border = 0x${surface0}
 | 
				
			||||||
@@ -25,7 +25,7 @@
 | 
				
			|||||||
  };
 | 
					  };
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  home.file.tofi = {
 | 
					  home.file.tofi = {
 | 
				
			||||||
    source = pkgs.writeText "tofi-config" (pkgs.lib.generators.toKeyValue { } (with lib'.colors.default; {
 | 
					    source = pkgs.writeText "tofi-config" (pkgs.lib.generators.toKeyValue { } (with conf.colors.default; {
 | 
				
			||||||
      # https://github.com/philj56/tofi/blob/master/themes/fullscreen
 | 
					      # https://github.com/philj56/tofi/blob/master/themes/fullscreen
 | 
				
			||||||
      width = "100%";
 | 
					      width = "100%";
 | 
				
			||||||
      height = "100%";
 | 
					      height = "100%";
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -1,4 +1,4 @@
 | 
				
			|||||||
{ config, pkgs, lib', ... }:
 | 
					{ config, pkgs, conf, ... }:
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
  imports = [
 | 
					  imports = [
 | 
				
			||||||
    ./networking.nix
 | 
					    ./networking.nix
 | 
				
			||||||
@@ -14,7 +14,7 @@
 | 
				
			|||||||
    shell = pkgs.zsh;
 | 
					    shell = pkgs.zsh;
 | 
				
			||||||
    home = "/home/spin";
 | 
					    home = "/home/spin";
 | 
				
			||||||
    extraGroups = [ "wheel" ];
 | 
					    extraGroups = [ "wheel" ];
 | 
				
			||||||
    openssh.authorizedKeys.keys = lib'.network.commonSSHKeys;
 | 
					    openssh.authorizedKeys.keys = conf.network.commonSSHKeys;
 | 
				
			||||||
  };
 | 
					  };
 | 
				
			||||||
  programs.zsh.enable = true;
 | 
					  programs.zsh.enable = true;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -1,4 +1,4 @@
 | 
				
			|||||||
{ lib, config, lib', pkgs, ... }:
 | 
					{ lib, config, conf, pkgs, ... }:
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
  networking = {
 | 
					  networking = {
 | 
				
			||||||
    useDHCP = false;
 | 
					    useDHCP = false;
 | 
				
			||||||
@@ -17,7 +17,7 @@
 | 
				
			|||||||
      };
 | 
					      };
 | 
				
			||||||
    };
 | 
					    };
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    wireguard.interfaces.wg0 = with lib'.network.addresses.wireguard.ips; {
 | 
					    wireguard.interfaces.wg0 = with conf.network.addresses.wireguard.ips; {
 | 
				
			||||||
      ips = [ hina ];
 | 
					      ips = [ hina ];
 | 
				
			||||||
      listenPort = 17840;
 | 
					      listenPort = 17840;
 | 
				
			||||||
      privateKeyFile = "/var/secrets/wg.key";
 | 
					      privateKeyFile = "/var/secrets/wg.key";
 | 
				
			||||||
@@ -26,7 +26,7 @@
 | 
				
			|||||||
          #Oracle VM1
 | 
					          #Oracle VM1
 | 
				
			||||||
          publicKey = "z0Y2VNEWcyVQVSqRHiwmiJ5/0MgSPM+HZfEcwIccSxM=";
 | 
					          publicKey = "z0Y2VNEWcyVQVSqRHiwmiJ5/0MgSPM+HZfEcwIccSxM=";
 | 
				
			||||||
          allowedIPs = [ remilia ];
 | 
					          allowedIPs = [ remilia ];
 | 
				
			||||||
          endpoint = "${lib'.network.addresses.domain.natto}:17840";
 | 
					          endpoint = "${conf.network.addresses.domain.natto}:17840";
 | 
				
			||||||
          persistentKeepalive = 25;
 | 
					          persistentKeepalive = 25;
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
      ];
 | 
					      ];
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -1,6 +1,6 @@
 | 
				
			|||||||
{ config, pkgs, lib, lib', ... }:
 | 
					{ config, pkgs, lib, conf, ... }:
 | 
				
			||||||
let
 | 
					let
 | 
				
			||||||
  domain = lib'.network.addresses.domain.natto;
 | 
					  domain = conf.network.addresses.domain.natto;
 | 
				
			||||||
in
 | 
					in
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
  services = {
 | 
					  services = {
 | 
				
			||||||
@@ -20,7 +20,7 @@ in
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
    nginx = {
 | 
					    nginx = {
 | 
				
			||||||
      enable = true;
 | 
					      enable = true;
 | 
				
			||||||
      virtualHosts = with lib'.network.addresses.wireguard.ips; {
 | 
					      virtualHosts = with conf.network.addresses.wireguard.ips; {
 | 
				
			||||||
        "znc.${domain}" = {
 | 
					        "znc.${domain}" = {
 | 
				
			||||||
          enableACME = true;
 | 
					          enableACME = true;
 | 
				
			||||||
          forceSSL = true;
 | 
					          forceSSL = true;
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -1,4 +1,4 @@
 | 
				
			|||||||
{ config, pkgs, lib', ... }:
 | 
					{ config, pkgs, conf, ... }:
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
  imports = [
 | 
					  imports = [
 | 
				
			||||||
    ./networking.nix
 | 
					    ./networking.nix
 | 
				
			||||||
@@ -12,7 +12,7 @@
 | 
				
			|||||||
    shell = pkgs.zsh;
 | 
					    shell = pkgs.zsh;
 | 
				
			||||||
    home = "/home/spark";
 | 
					    home = "/home/spark";
 | 
				
			||||||
    extraGroups = [ "wheel" ];
 | 
					    extraGroups = [ "wheel" ];
 | 
				
			||||||
    openssh.authorizedKeys.keys = lib'.network.commonSSHKeys;
 | 
					    openssh.authorizedKeys.keys = conf.network.commonSSHKeys;
 | 
				
			||||||
  };
 | 
					  };
 | 
				
			||||||
  programs.zsh.enable = true;
 | 
					  programs.zsh.enable = true;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -1,4 +1,4 @@
 | 
				
			|||||||
{ config, pkgs, lib', ... }:
 | 
					{ config, pkgs, conf, ... }:
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
  networking = {
 | 
					  networking = {
 | 
				
			||||||
    hostName = "marisa";
 | 
					    hostName = "marisa";
 | 
				
			||||||
@@ -37,7 +37,7 @@
 | 
				
			|||||||
        }];
 | 
					        }];
 | 
				
			||||||
      };
 | 
					      };
 | 
				
			||||||
    };
 | 
					    };
 | 
				
			||||||
    wireguard.interfaces.wg0 = with lib'.network.addresses.wireguard.ips; {
 | 
					    wireguard.interfaces.wg0 = with conf.network.addresses.wireguard.ips; {
 | 
				
			||||||
      ips = [ marisa ];
 | 
					      ips = [ marisa ];
 | 
				
			||||||
      listenPort = 17840;
 | 
					      listenPort = 17840;
 | 
				
			||||||
      privateKeyFile = "/var/secrets/wg.key";
 | 
					      privateKeyFile = "/var/secrets/wg.key";
 | 
				
			||||||
@@ -46,7 +46,7 @@
 | 
				
			|||||||
          #Oracle VM1
 | 
					          #Oracle VM1
 | 
				
			||||||
          publicKey = "z0Y2VNEWcyVQVSqRHiwmiJ5/0MgSPM+HZfEcwIccSxM=";
 | 
					          publicKey = "z0Y2VNEWcyVQVSqRHiwmiJ5/0MgSPM+HZfEcwIccSxM=";
 | 
				
			||||||
          allowedIPs = [ remilia ];
 | 
					          allowedIPs = [ remilia ];
 | 
				
			||||||
          endpoint = "${lib'.network.addresses.domain.natto}:17840";
 | 
					          endpoint = "${conf.network.addresses.domain.natto}:17840";
 | 
				
			||||||
          persistentKeepalive = 25;
 | 
					          persistentKeepalive = 25;
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
      ];
 | 
					      ];
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -1,4 +1,4 @@
 | 
				
			|||||||
{ config, pkgs, inputs, lib', ... }:
 | 
					{ config, pkgs, inputs, conf, ... }:
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
  systemd.services.filehost = {
 | 
					  systemd.services.filehost = {
 | 
				
			||||||
    enable = true;
 | 
					    enable = true;
 | 
				
			||||||
@@ -7,7 +7,7 @@
 | 
				
			|||||||
      Type = "simple";
 | 
					      Type = "simple";
 | 
				
			||||||
      Environment = [
 | 
					      Environment = [
 | 
				
			||||||
        "TITLE=nattofiles"
 | 
					        "TITLE=nattofiles"
 | 
				
			||||||
        "USER_URL=https://f.${lib'.network.addresses.domain.natto}"
 | 
					        "USER_URL=https://f.${conf.network.addresses.domain.natto}"
 | 
				
			||||||
        "ROCKET_LIMITS={file=\"512MB\",data-form=\"512MB\"}"
 | 
					        "ROCKET_LIMITS={file=\"512MB\",data-form=\"512MB\"}"
 | 
				
			||||||
        "ROCKET_LOG_LEVEL=debug"
 | 
					        "ROCKET_LOG_LEVEL=debug"
 | 
				
			||||||
        "ROCKET_ADDRESS=0.0.0.0"
 | 
					        "ROCKET_ADDRESS=0.0.0.0"
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -1,4 +1,4 @@
 | 
				
			|||||||
{ config, pkgs, lib', ... }:
 | 
					{ config, pkgs, conf, ... }:
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
  services = {
 | 
					  services = {
 | 
				
			||||||
    gitea = rec {
 | 
					    gitea = rec {
 | 
				
			||||||
@@ -13,7 +13,7 @@
 | 
				
			|||||||
      mailerPasswordFile = "/var/secrets/giteamailer.pass";
 | 
					      mailerPasswordFile = "/var/secrets/giteamailer.pass";
 | 
				
			||||||
      settings =
 | 
					      settings =
 | 
				
			||||||
        let
 | 
					        let
 | 
				
			||||||
          domain = lib'.network.addresses.domain.natto;
 | 
					          domain = conf.network.addresses.domain.natto;
 | 
				
			||||||
        in
 | 
					        in
 | 
				
			||||||
        {
 | 
					        {
 | 
				
			||||||
          server = rec {
 | 
					          server = rec {
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -1,4 +1,4 @@
 | 
				
			|||||||
{ config, pkgs, lib', lib, ... }:
 | 
					{ config, pkgs, conf, lib, ... }:
 | 
				
			||||||
 | 
					
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
  networking = {
 | 
					  networking = {
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -1,4 +1,4 @@
 | 
				
			|||||||
{ config, pkgs, lib', ... }:
 | 
					{ config, pkgs, conf, ... }:
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
  imports = [
 | 
					  imports = [
 | 
				
			||||||
    ./networking.nix
 | 
					    ./networking.nix
 | 
				
			||||||
@@ -15,7 +15,7 @@
 | 
				
			|||||||
    shell = pkgs.zsh;
 | 
					    shell = pkgs.zsh;
 | 
				
			||||||
    home = "/home/bat";
 | 
					    home = "/home/bat";
 | 
				
			||||||
    extraGroups = [ "wheel" ];
 | 
					    extraGroups = [ "wheel" ];
 | 
				
			||||||
    openssh.authorizedKeys.keys = lib'.network.commonSSHKeys;
 | 
					    openssh.authorizedKeys.keys = conf.network.commonSSHKeys;
 | 
				
			||||||
  };
 | 
					  };
 | 
				
			||||||
  programs.zsh.enable = true;
 | 
					  programs.zsh.enable = true;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -1,7 +1,7 @@
 | 
				
			|||||||
{ config, pkgs, lib', network, ... }:
 | 
					{ config, pkgs, conf, network, ... }:
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
  mailserver =
 | 
					  mailserver =
 | 
				
			||||||
    let domain = lib'.network.addresses.domain.natto; in
 | 
					    let domain = conf.network.addresses.domain.natto; in
 | 
				
			||||||
    rec {
 | 
					    rec {
 | 
				
			||||||
      enable = true;
 | 
					      enable = true;
 | 
				
			||||||
      fqdn = "mail.${domain}";
 | 
					      fqdn = "mail.${domain}";
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -1,4 +1,4 @@
 | 
				
			|||||||
{ lib, config, lib', pkgs, ... }:
 | 
					{ lib, config, conf, pkgs, ... }:
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
  networking = {
 | 
					  networking = {
 | 
				
			||||||
    useDHCP = false;
 | 
					    useDHCP = false;
 | 
				
			||||||
@@ -27,7 +27,7 @@
 | 
				
			|||||||
        useDHCP = true;
 | 
					        useDHCP = true;
 | 
				
			||||||
      };
 | 
					      };
 | 
				
			||||||
    };
 | 
					    };
 | 
				
			||||||
    nat = with lib'.network.addresses.wireguard.ips; {
 | 
					    nat = with conf.network.addresses.wireguard.ips; {
 | 
				
			||||||
      enable = true;
 | 
					      enable = true;
 | 
				
			||||||
      externalInterface = "ens3";
 | 
					      externalInterface = "ens3";
 | 
				
			||||||
      internalInterfaces = [ "wg0" ];
 | 
					      internalInterfaces = [ "wg0" ];
 | 
				
			||||||
@@ -46,7 +46,7 @@
 | 
				
			|||||||
        }
 | 
					        }
 | 
				
			||||||
      ];
 | 
					      ];
 | 
				
			||||||
    };
 | 
					    };
 | 
				
			||||||
    wireguard.interfaces = with lib'.network.addresses.wireguard; {
 | 
					    wireguard.interfaces = with conf.network.addresses.wireguard; {
 | 
				
			||||||
      wg0 = {
 | 
					      wg0 = {
 | 
				
			||||||
        ips = [ ips.remilia ];
 | 
					        ips = [ ips.remilia ];
 | 
				
			||||||
        listenPort = 17840;
 | 
					        listenPort = 17840;
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -1,6 +1,6 @@
 | 
				
			|||||||
{ config, pkgs, lib, lib', ... }:
 | 
					{ config, pkgs, lib, conf, ... }:
 | 
				
			||||||
let
 | 
					let
 | 
				
			||||||
  domain = lib'.network.addresses.domain.natto;
 | 
					  domain = conf.network.addresses.domain.natto;
 | 
				
			||||||
in
 | 
					in
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
  services = {
 | 
					  services = {
 | 
				
			||||||
@@ -37,7 +37,7 @@ in
 | 
				
			|||||||
            };
 | 
					            };
 | 
				
			||||||
          };
 | 
					          };
 | 
				
			||||||
        in
 | 
					        in
 | 
				
			||||||
        with lib'.network.addresses.wireguard.ips; {
 | 
					        with conf.network.addresses.wireguard.ips; {
 | 
				
			||||||
          "${domain}" = {
 | 
					          "${domain}" = {
 | 
				
			||||||
            addSSL = true;
 | 
					            addSSL = true;
 | 
				
			||||||
            enableACME = true;
 | 
					            enableACME = true;
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -1,4 +1,4 @@
 | 
				
			|||||||
{ config, pkgs, lib', ... }:
 | 
					{ config, pkgs, conf, ... }:
 | 
				
			||||||
 | 
					
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
  networking = {
 | 
					  networking = {
 | 
				
			||||||
@@ -15,7 +15,7 @@
 | 
				
			|||||||
      trustedInterfaces = [ "docker0" ];
 | 
					      trustedInterfaces = [ "docker0" ];
 | 
				
			||||||
    };
 | 
					    };
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    wireguard.interfaces.wg0 = with lib'.network.addresses.wireguard.ips; {
 | 
					    wireguard.interfaces.wg0 = with conf.network.addresses.wireguard.ips; {
 | 
				
			||||||
      ips = [ satori ];
 | 
					      ips = [ satori ];
 | 
				
			||||||
      listenPort = 17840;
 | 
					      listenPort = 17840;
 | 
				
			||||||
      privateKeyFile = "/var/secrets/wg.key";
 | 
					      privateKeyFile = "/var/secrets/wg.key";
 | 
				
			||||||
@@ -23,7 +23,7 @@
 | 
				
			|||||||
        #Oracle VM1
 | 
					        #Oracle VM1
 | 
				
			||||||
        publicKey = "z0Y2VNEWcyVQVSqRHiwmiJ5/0MgSPM+HZfEcwIccSxM=";
 | 
					        publicKey = "z0Y2VNEWcyVQVSqRHiwmiJ5/0MgSPM+HZfEcwIccSxM=";
 | 
				
			||||||
        allowedIPs = [ remilia ];
 | 
					        allowedIPs = [ remilia ];
 | 
				
			||||||
        endpoint = "${lib'.network.addresses.domain.natto}:17840";
 | 
					        endpoint = "${conf.network.addresses.domain.natto}:17840";
 | 
				
			||||||
        persistentKeepalive = 25;
 | 
					        persistentKeepalive = 25;
 | 
				
			||||||
      }];
 | 
					      }];
 | 
				
			||||||
    };
 | 
					    };
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user