Move variables to more convenient folder
This commit is contained in:
parent
87a53e364f
commit
9c03712908
30 changed files with 159 additions and 45 deletions
7
modules/extras/default.nix
Normal file
7
modules/extras/default.nix
Normal file
|
@ -0,0 +1,7 @@
|
|||
{ ... }:
|
||||
{
|
||||
imports = [
|
||||
./overlays
|
||||
./variables
|
||||
];
|
||||
}
|
7
modules/extras/overlays/default.nix
Normal file
7
modules/extras/overlays/default.nix
Normal file
|
@ -0,0 +1,7 @@
|
|||
{ ... }:
|
||||
{
|
||||
imports = [
|
||||
./packages
|
||||
./unstable
|
||||
];
|
||||
}
|
9
modules/extras/overlays/packages/default.nix
Normal file
9
modules/extras/overlays/packages/default.nix
Normal file
|
@ -0,0 +1,9 @@
|
|||
{ pkgs, ... }:
|
||||
{
|
||||
nixpkgs.overlays = [
|
||||
(final: _prev: {
|
||||
xash3d = pkgs.callPackage ./xash3d {};
|
||||
hlsdk = pkgs.callPackage ./hlsdk {};
|
||||
})
|
||||
];
|
||||
}
|
52
modules/extras/overlays/packages/hlsdk/default.nix
Normal file
52
modules/extras/overlays/packages/hlsdk/default.nix
Normal file
|
@ -0,0 +1,52 @@
|
|||
{ lib
|
||||
, pkgs
|
||||
, stdenv
|
||||
, fetchFromGitHub
|
||||
, gamedir ? "valve"
|
||||
, enableGoldsourceSupport ? true
|
||||
, enableVgui ? false
|
||||
, enableVoicemgr ? false
|
||||
, enableBugfixes ? false
|
||||
, enableCrowbarIdleAnim ? false
|
||||
}:
|
||||
|
||||
stdenv.mkDerivation {
|
||||
pname = "fwgs-hlsdk";
|
||||
version = "2023-03-01";
|
||||
|
||||
nativeBuildInputs = with pkgs; [cmake];
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "FWGS";
|
||||
repo = "hlsdk-portable";
|
||||
rev = "d11f853464ee5d951e25ce9d0eea001780b92196";
|
||||
sha256 = if enableVgui then "sha256-Qd+SUie+jlfxo6aefordYw665ZaNaR3TxufntfIaoCo=" else "sha256-WU+I+mmoyXvW1pvqJLddPaA8/tod3TtvqzVPYJRbGz4=";
|
||||
fetchSubmodules = enableVgui;
|
||||
};
|
||||
|
||||
cmakeFlags = let
|
||||
optionals = lib.optionals;
|
||||
optional = (cond: val: optionals cond [val]);
|
||||
cmakeBool = (x: if x then "ON" else "OFF");
|
||||
in [
|
||||
"-DUSE_VGUI=${cmakeBool enableVgui}"
|
||||
"-DGOLDSOURCE_SUPPORT=${cmakeBool enableGoldsourceSupport}"
|
||||
"-DUSE_VOICEMGR=${cmakeBool enableVoicemgr}"
|
||||
"-DBARNACLE_FIX_VISIBILITY=${cmakeBool enableBugfixes}"
|
||||
"-DCROWBAR_DELAY_FIX=${cmakeBool enableBugfixes}"
|
||||
"-DCROWBAR_FIX_RAPID_CROWBAR=${cmakeBool enableBugfixes}"
|
||||
"-DGAUSS_OVERCHARGE_FIX=${cmakeBool enableBugfixes}"
|
||||
"-DTRIPMINE_BEAM_DUPLICATION_FIX=${cmakeBool enableBugfixes}"
|
||||
"-DHANDGRENADE_DEPLOY_FIX=${cmakeBool enableBugfixes}"
|
||||
"-DWEAPONS_ANIMATION_TIMES_FIX=${cmakeBool enableBugfixes}"
|
||||
"-DCROWBAR_IDLE_ANIM=${cmakeBool enableCrowbarIdleAnim}"
|
||||
] ++ (optional (gamedir != "valve") "-DGAMEDIR=${gamedir}")
|
||||
++ (optional stdenv.is64bit "-D64BIT=ON");
|
||||
|
||||
meta = with lib; {
|
||||
description = "Portable Half-Life SDK. GoldSource and Xash3D. Crossplatform.";
|
||||
homepage = "https://github.com/FWGS/hlsdk-portable";
|
||||
license = with licenses; [ unfree ];
|
||||
# maintainers = with maintainers; [ chayleaf ];
|
||||
};
|
||||
}
|
|
@ -0,0 +1,17 @@
|
|||
diff --git a/scripts/waifulib/zip.py b/scripts/waifulib/zip.py
|
||||
index 6e903ba7..d47f1754 100644
|
||||
--- a/scripts/waifulib/zip.py
|
||||
+++ b/scripts/waifulib/zip.py
|
||||
@@ -25,7 +25,11 @@ class ziparchive(Task.Task):
|
||||
arcfile = src.path_from(self.relative_to)
|
||||
|
||||
Logs.debug('%s: %s <- %s as %s', self.__class__.__name__, outfile, infile, arcfile)
|
||||
- zf.write(infile, arcfile)
|
||||
+
|
||||
+ arcfile = zipfile.ZipInfo(filename=arcfile, date_time=(1980, 1, 1, 0, 0, 0))
|
||||
+
|
||||
+ with open(infile, 'rb') as f:
|
||||
+ zf.writestr(arcfile, f.read())
|
||||
|
||||
@TaskGen.feature('zip')
|
||||
def create_zip_archive(self):
|
68
modules/extras/overlays/packages/xash3d/default.nix
Normal file
68
modules/extras/overlays/packages/xash3d/default.nix
Normal file
|
@ -0,0 +1,68 @@
|
|||
{ lib
|
||||
, pkgs
|
||||
, stdenv
|
||||
, fetchFromGitHub
|
||||
, dedicated ? false # dedicated server
|
||||
, gamedir ? "valve"
|
||||
, enableBsp2 ? false # bsp2 support (for quake)
|
||||
, enableGles1 ? false # gles1 renderer (nanogl)
|
||||
, enableGles2 ? false # gles2 renderer (glwes)
|
||||
, enableGl4es ? false # gles2 renderer (gl4es)
|
||||
, enableGl ? true # opengl renderer
|
||||
, enableSoft ? true # soft renderer
|
||||
, enableUtils ? false # mdldec
|
||||
}:
|
||||
|
||||
stdenv.mkDerivation {
|
||||
pname = "xash3d-fwgs";
|
||||
version = "2023-03-01";
|
||||
|
||||
nativeBuildInputs = with pkgs; [python3 pkg-config makeWrapper];
|
||||
buildInputs = with pkgs; [SDL2 libopus freetype fontconfig];
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "FWGS";
|
||||
repo = "xash3d-fwgs";
|
||||
rev = "7e9d46689ca76d6bf1669ada6344fc724dd683cf";
|
||||
sha256 = "sha256-rvONYm1Gz9PpK8KY6RIIJ82FtxGcWe/4YoT2eV4sCOc=";
|
||||
fetchSubmodules = true;
|
||||
};
|
||||
patches = [ ./change-zip-date.patch ];
|
||||
|
||||
configurePhase = let
|
||||
optionals = lib.optionals;
|
||||
optional = (cond: val: optionals cond [val]);
|
||||
flags = ["-8" "-P" "--prefix=/"]
|
||||
++ (optional dedicated "-d")
|
||||
++ (optionals (gamedir != "valve") ["--gamedir" gamedir])
|
||||
++ (optional enableBsp2 "--enable-bsp2")
|
||||
++ (optional enableGles1 "--enable-gles1")
|
||||
++ (optional enableGles2 "--enable-gles2")
|
||||
++ (optional enableGl4es "--enable-gl4es")
|
||||
++ (optional (!enableGl) "--disable-gl")
|
||||
++ (optional (!enableSoft) "--disable-soft")
|
||||
++ (optional enableUtils "--enable-utils")
|
||||
;
|
||||
in ''
|
||||
python3 ./waf configure -T release ${lib.strings.escapeShellArgs flags}
|
||||
'';
|
||||
|
||||
buildPhase = ''
|
||||
python3 ./waf build
|
||||
'';
|
||||
|
||||
installPhase = ''
|
||||
python3 ./waf install "--destdir=$out"
|
||||
mkdir $out/bin
|
||||
makeWrapper $out/lib/xash3d/xash3d $out/bin/xash3d --set XASH3D_EXTRAS_PAK1 $out/share/xash3d/valve/extras.pk3
|
||||
'';
|
||||
|
||||
meta = with lib; {
|
||||
description = "Xash3D FWGS engine";
|
||||
homepage = "https://github.com/FWGS/xash3d-fwgs";
|
||||
# this is a mess because of vendoring...
|
||||
# maybe the correct thing to do use to simply use `[ unfree gpl3Plus ]` instead
|
||||
license = with licenses; [ unfree gpl2Plus gpl3Plus lgpl3Plus mit bsd3 ];
|
||||
# maintainers = with maintainers; [ chayleaf ];
|
||||
};
|
||||
}
|
11
modules/extras/overlays/unstable/default.nix
Normal file
11
modules/extras/overlays/unstable/default.nix
Normal file
|
@ -0,0 +1,11 @@
|
|||
{ unstable, ... }:
|
||||
{
|
||||
nixpkgs.overlays = [
|
||||
(final: prev: {
|
||||
unstable = import unstable {
|
||||
system = final.system;
|
||||
config.allowUnfree = true;
|
||||
};
|
||||
})
|
||||
];
|
||||
}
|
11
modules/extras/variables/default.nix
Normal file
11
modules/extras/variables/default.nix
Normal file
|
@ -0,0 +1,11 @@
|
|||
{ ... }:
|
||||
{
|
||||
imports = [
|
||||
./displays
|
||||
./domains
|
||||
./ips
|
||||
./look
|
||||
./secrets
|
||||
./workspaces
|
||||
];
|
||||
}
|
15
modules/extras/variables/displays/default.nix
Normal file
15
modules/extras/variables/displays/default.nix
Normal file
|
@ -0,0 +1,15 @@
|
|||
{ lib, config, ... }:
|
||||
{
|
||||
options.displays = lib.mkOption {
|
||||
type = lib.types.attrs;
|
||||
default = {};
|
||||
};
|
||||
|
||||
config.displays = {
|
||||
d1 = "DP-2";
|
||||
d2 = "DP-3";
|
||||
d3 = "DP-1";
|
||||
d4 = "HDMI-A-1";
|
||||
dI = "eDP-1";
|
||||
};
|
||||
}
|
14
modules/extras/variables/domains/default.nix
Normal file
14
modules/extras/variables/domains/default.nix
Normal file
|
@ -0,0 +1,14 @@
|
|||
{ lib, config, ... }:
|
||||
{
|
||||
options.domains = lib.mkOption {
|
||||
type = lib.types.attrs;
|
||||
default = {};
|
||||
};
|
||||
|
||||
config.domains = {
|
||||
jim1 = "jimbosfiles.com";
|
||||
jim2 = "nixfox.ca";
|
||||
corn = "freecorn1854.win";
|
||||
luna = "lunamoonlight.xyz";
|
||||
};
|
||||
}
|
15
modules/extras/variables/ips/default.nix
Normal file
15
modules/extras/variables/ips/default.nix
Normal file
|
@ -0,0 +1,15 @@
|
|||
{ lib, config, ... }:
|
||||
{
|
||||
options.ips = lib.mkOption {
|
||||
type = lib.types.attrs;
|
||||
default = {};
|
||||
};
|
||||
|
||||
config.ips = rec {
|
||||
localSpan = "10.1.0";
|
||||
server = "${localSpan}.2";
|
||||
pc = "${localSpan}.4";
|
||||
vm = "${localSpan}.5";
|
||||
hx = "${localSpan}.70";
|
||||
};
|
||||
}
|
12
modules/extras/variables/look/border/default.nix
Normal file
12
modules/extras/variables/look/border/default.nix
Normal file
|
@ -0,0 +1,12 @@
|
|||
{ lib, config, ... }:
|
||||
{
|
||||
options.look.border = lib.mkOption {
|
||||
type = lib.types.attrs;
|
||||
default = {};
|
||||
};
|
||||
|
||||
config.look.border = rec {
|
||||
int = 3;
|
||||
string = toString int;
|
||||
};
|
||||
}
|
20
modules/extras/variables/look/colors/default.nix
Normal file
20
modules/extras/variables/look/colors/default.nix
Normal file
|
@ -0,0 +1,20 @@
|
|||
{ lib, config, ... }:
|
||||
{
|
||||
options.look.colors = lib.mkOption {
|
||||
type = lib.types.attrs;
|
||||
default = {};
|
||||
};
|
||||
|
||||
config.look.colors = {
|
||||
prime = "3823C4"; #3823C4
|
||||
accent = "1B1F59"; #1B1F59
|
||||
split = "555B9E"; #555B9E
|
||||
actSplit = "5980B7"; #5980B7
|
||||
dark = "101419"; #101419
|
||||
mid = "171C23"; #171C23
|
||||
light = "272b33"; #272B33
|
||||
urgent = "C43823"; #C43823
|
||||
text = "C7D3E3"; #C7D3E3
|
||||
folder = "indigo";
|
||||
};
|
||||
}
|
8
modules/extras/variables/look/default.nix
Normal file
8
modules/extras/variables/look/default.nix
Normal file
|
@ -0,0 +1,8 @@
|
|||
{ ... }:
|
||||
{
|
||||
imports = [
|
||||
./border
|
||||
./colors
|
||||
./fonts
|
||||
];
|
||||
}
|
12
modules/extras/variables/look/fonts/default.nix
Normal file
12
modules/extras/variables/look/fonts/default.nix
Normal file
|
@ -0,0 +1,12 @@
|
|||
{ lib, config, ... }:
|
||||
{
|
||||
options.look.fonts = lib.mkOption {
|
||||
type = lib.types.attrs;
|
||||
default = {};
|
||||
};
|
||||
|
||||
config.look.fonts = {
|
||||
main = ''Ubuntu'';
|
||||
nerd = ''UbuntuMono Nerd Font'';
|
||||
};
|
||||
}
|
29
modules/extras/variables/workspaces/default.nix
Normal file
29
modules/extras/variables/workspaces/default.nix
Normal file
|
@ -0,0 +1,29 @@
|
|||
{ lib, config, ... }:
|
||||
{
|
||||
options.ws = lib.mkOption {
|
||||
type = lib.types.attrs;
|
||||
default = {};
|
||||
};
|
||||
|
||||
config.ws = {
|
||||
w0 = ''0:0'';
|
||||
w1 = ''1:1'';
|
||||
w2 = ''2:2'';
|
||||
w3 = ''3:3'';
|
||||
w4 = ''4:4'';
|
||||
w5 = ''5:5'';
|
||||
w6 = ''6:6'';
|
||||
w7 = ''7:7'';
|
||||
w8 = ''8:8'';
|
||||
w9 = ''9:9'';
|
||||
w1a = ''11:I'';
|
||||
w2a = ''22:II'';
|
||||
w3a = ''33:III'';
|
||||
w4a = ''44:IV'';
|
||||
w5a = ''55:V'';
|
||||
w6a = ''66:VI'';
|
||||
w7a = ''77:VII'';
|
||||
w8a = ''88:VIII'';
|
||||
w9a = ''99:IX'';
|
||||
};
|
||||
}
|
|
@ -7,8 +7,7 @@
|
|||
./settings
|
||||
./wms
|
||||
./users
|
||||
../../overlays
|
||||
../../variables
|
||||
../extras
|
||||
|
||||
# Imports
|
||||
nur.nixosModules.nur
|
||||
|
|
4
modules/home/programs/terminal/carapace/default.nix
Normal file
4
modules/home/programs/terminal/carapace/default.nix
Normal file
|
@ -0,0 +1,4 @@
|
|||
{ ... }:
|
||||
{
|
||||
programs.carapace.enable = true;
|
||||
}
|
|
@ -1,6 +1,7 @@
|
|||
{ ... }:
|
||||
{
|
||||
imports = [
|
||||
./carapace
|
||||
./fastfetch
|
||||
./git
|
||||
./ncmpcpp
|
||||
|
|
|
@ -2,6 +2,7 @@
|
|||
{
|
||||
programs.zsh = {
|
||||
enable = true;
|
||||
enableCompletion = false;
|
||||
autosuggestion.enable = true;
|
||||
syntaxHighlighting.enable = true;
|
||||
oh-my-zsh = {
|
||||
|
@ -34,9 +35,9 @@
|
|||
seneca = "ssh jhampton1@matrix.senecapolytechnic.ca";
|
||||
};
|
||||
initExtra = ''
|
||||
${pkgs.any-nix-shell}/bin/any-nix-shell zsh --info-right | source /dev/stdin; pfetch
|
||||
source ${pkgs.zsh-vi-mode}/share/zsh-vi-mode/zsh-vi-mode.plugin.zsh
|
||||
source ${pkgs.zsh-you-should-use}/share/zsh/plugins/you-should-use/you-should-use.plugin.zsh
|
||||
${pkgs.any-nix-shell}/bin/any-nix-shell zsh --info-right | source /dev/stdin; pfetch
|
||||
setopt HIST_IGNORE_SPACE
|
||||
setopt RM_STAR_WAIT
|
||||
'';
|
||||
|
|
|
@ -7,8 +7,7 @@
|
|||
./programs
|
||||
./services
|
||||
./settings
|
||||
../../overlays
|
||||
../../variables
|
||||
../extras
|
||||
];
|
||||
|
||||
time.timeZone = "America/Toronto";
|
||||
|
|
|
@ -5,6 +5,4 @@
|
|||
info.enable = false;
|
||||
nixos.enable = false;
|
||||
};
|
||||
|
||||
programs.command-not-found.enable = true;
|
||||
}
|
||||
|
|
|
@ -6,5 +6,6 @@
|
|||
};
|
||||
|
||||
programs.less.lessopen = null;
|
||||
|
||||
services.logrotate.enable = false;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue