seporate gaming and gui environments
This commit is contained in:
parent
4099cfe82c
commit
a439a91de1
24
flake.lock
24
flake.lock
|
@ -7,11 +7,11 @@
|
||||||
"utils": "utils"
|
"utils": "utils"
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1638665590,
|
"lastModified": 1642113498,
|
||||||
"narHash": "sha256-nhtfL3z4TizWHemyZvgLvq11FhYX5Ya4ke+t6Np5PKQ=",
|
"narHash": "sha256-4tNIt2EGDppYQI06gsid0QKW5dtBEOAiNKfMYC8wxv8=",
|
||||||
"owner": "serokell",
|
"owner": "serokell",
|
||||||
"repo": "deploy-rs",
|
"repo": "deploy-rs",
|
||||||
"rev": "715e92a13018bc1745fb680b5860af0c5641026a",
|
"rev": "0ac333cdc03407538b5b19d60a8e7c64588490fb",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
@ -41,11 +41,11 @@
|
||||||
"nixpkgs": "nixpkgs_2"
|
"nixpkgs": "nixpkgs_2"
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1641799033,
|
"lastModified": 1642117744,
|
||||||
"narHash": "sha256-f7/p46rC65buVGk7OHb9sxJ+kF1xzs3NUuLZExoqCqY=",
|
"narHash": "sha256-/SvxBe/m6JiRSlKIrgD6LQxee9GGewFyq+lsPxoViMY=",
|
||||||
"owner": "nix-community",
|
"owner": "nix-community",
|
||||||
"repo": "home-manager",
|
"repo": "home-manager",
|
||||||
"rev": "f3be3cda6a69365f2acecc201b3cd1ee4f6d4614",
|
"rev": "a5dd5d5f197724f3065fd39c59c7ccea3c8dcb8f",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
@ -72,11 +72,11 @@
|
||||||
},
|
},
|
||||||
"nixpkgs_2": {
|
"nixpkgs_2": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1641726770,
|
"lastModified": 1642069818,
|
||||||
"narHash": "sha256-7Wk3V+/gNbQ4/5LgGQz9KVSwSw3V/L3+iqgH8+G/6V0=",
|
"narHash": "sha256-666w6j8wl/bojfgpp0k58/UJ5rbrdYFbI2RFT2BXbSQ=",
|
||||||
"owner": "NixOS",
|
"owner": "NixOS",
|
||||||
"repo": "nixpkgs",
|
"repo": "nixpkgs",
|
||||||
"rev": "27d2fe1e69deb1894f9113a1fe2ca43fb89c8ad1",
|
"rev": "46821ea01c8f54d2a20f5a503809abfc605269d7",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
@ -86,11 +86,11 @@
|
||||||
},
|
},
|
||||||
"nixpkgs_3": {
|
"nixpkgs_3": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1641710811,
|
"lastModified": 1641887635,
|
||||||
"narHash": "sha256-yVJ+CtwWZY8BnkNIJ/ue5a28yrRM6CkDF1LvmGmqqwM=",
|
"narHash": "sha256-kDGpufwzVaiGe5e1sBUBPo9f1YN+nYHJlYqCaVpZTQQ=",
|
||||||
"owner": "nixos",
|
"owner": "nixos",
|
||||||
"repo": "nixpkgs",
|
"repo": "nixpkgs",
|
||||||
"rev": "0ecf7d414811f831060cf55707c374d54fbb1dec",
|
"rev": "b2737d4980a17cc2b7d600d7d0b32fd7333aca88",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
|
|
@ -23,8 +23,8 @@ let
|
||||||
updateUrl = "https://clients2.google.com/service/update2/crx";
|
updateUrl = "https://clients2.google.com/service/update2/crx";
|
||||||
inherit version;
|
inherit version;
|
||||||
};
|
};
|
||||||
createChromiumExtension = createChromiumExtensionFor
|
createChromiumExtension =
|
||||||
(lib.versions.major pkgs.vivaldi.version);
|
createChromiumExtensionFor (lib.versions.major pkgs.vivaldi.version);
|
||||||
in {
|
in {
|
||||||
programs.chromium = {
|
programs.chromium = {
|
||||||
enable = true;
|
enable = true;
|
||||||
|
|
|
@ -1,6 +0,0 @@
|
||||||
{ pkgs, ... }: {
|
|
||||||
home.packages = with pkgs; [
|
|
||||||
multimc
|
|
||||||
jdk17
|
|
||||||
];
|
|
||||||
}
|
|
|
@ -1,12 +1,12 @@
|
||||||
{tree, ...}: {
|
{ tree, ... }: {
|
||||||
# basically everything apart from home.dev.debugging
|
# basically everything apart from home.dev.debugging
|
||||||
imports = with tree; [
|
imports = with tree; [
|
||||||
home.dev.all.archives
|
home.dev.all.archives
|
||||||
home.dev.all.editors
|
home.dev.all.editors
|
||||||
home.dev.all.extra
|
home.dev.all.extra
|
||||||
home.dev.all.git
|
home.dev.all.git
|
||||||
home.dev.all.info
|
home.dev.all.info
|
||||||
home.dev.all.network
|
home.dev.all.network
|
||||||
home.dev.all.vcs
|
home.dev.all.vcs
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
1
home/gaming/emulators/ds.nix
Normal file
1
home/gaming/emulators/ds.nix
Normal file
|
@ -0,0 +1 @@
|
||||||
|
{ pkgs, ... }: { home.packages = with pkgs; [ melonDS ]; }
|
1
home/gaming/games/minecraft.nix
Normal file
1
home/gaming/games/minecraft.nix
Normal file
|
@ -0,0 +1 @@
|
||||||
|
{ pkgs, ... }: { home.packages = with pkgs; [ multimc jdk17 ]; }
|
|
@ -1,12 +0,0 @@
|
||||||
{ config, pkgs, ... }: {
|
|
||||||
home.packages = with pkgs; [
|
|
||||||
steam
|
|
||||||
lutris
|
|
||||||
#mgba
|
|
||||||
#nestopia
|
|
||||||
#snes9x-gtk
|
|
||||||
#melonDS
|
|
||||||
sixpair
|
|
||||||
xboxdrv
|
|
||||||
];
|
|
||||||
}
|
|
1
home/gaming/platforms/lutris.nix
Normal file
1
home/gaming/platforms/lutris.nix
Normal file
|
@ -0,0 +1 @@
|
||||||
|
{ pkgs, ... }: { home.packages = with pkgs; [ lutris ]; }
|
1
home/gaming/platforms/steam.nix
Normal file
1
home/gaming/platforms/steam.nix
Normal file
|
@ -0,0 +1 @@
|
||||||
|
{ pkgs, ... }: { home.packages = with pkgs; [ steam ]; }
|
|
@ -1,4 +1,9 @@
|
||||||
{ config, pkgs, lib, ... }: {
|
{ config, pkgs, lib, tree, ... }: {
|
||||||
|
# import default terminal
|
||||||
|
imports = with tree; [
|
||||||
|
home.apps.kitty
|
||||||
|
];
|
||||||
|
|
||||||
home.sessionVariables = {
|
home.sessionVariables = {
|
||||||
XDG_CURRENT_DESKTOP = "sway";
|
XDG_CURRENT_DESKTOP = "sway";
|
||||||
XDG_SESSION_TYPE = "wayland";
|
XDG_SESSION_TYPE = "wayland";
|
||||||
|
@ -26,34 +31,6 @@
|
||||||
libdbusmenu-gtk3
|
libdbusmenu-gtk3
|
||||||
];
|
];
|
||||||
|
|
||||||
programs.zsh.profileExtra = ''
|
|
||||||
# If running from tty1 start sway
|
|
||||||
if [ "$(tty)" = "/dev/tty1" ]; then
|
|
||||||
systemctl --user unset-environment \
|
|
||||||
SWAYSOCK \
|
|
||||||
I3SOCK \
|
|
||||||
WAYLAND_DISPLAY \
|
|
||||||
DISPLAY \
|
|
||||||
IN_NIX_SHELL \
|
|
||||||
__HM_SESS_VARS_SOURCED \
|
|
||||||
GPG_TTY \
|
|
||||||
NIX_PATH \
|
|
||||||
SHLVL
|
|
||||||
exec env --unset=SHLVL systemd-cat -t sway -- sway
|
|
||||||
fi
|
|
||||||
'';
|
|
||||||
|
|
||||||
programs.waybar = {
|
|
||||||
enable = true;
|
|
||||||
settings = [{
|
|
||||||
position = "bottom";
|
|
||||||
|
|
||||||
modules-left = [ ];
|
|
||||||
modules-center = [ ];
|
|
||||||
modules-right = [ "tray" ];
|
|
||||||
}];
|
|
||||||
};
|
|
||||||
|
|
||||||
wayland.windowManager.sway = {
|
wayland.windowManager.sway = {
|
||||||
enable = true;
|
enable = true;
|
||||||
wrapperFeatures.base = true;
|
wrapperFeatures.base = true;
|
12
home/gui/environments/sway/waybar-bottom.nix
Normal file
12
home/gui/environments/sway/waybar-bottom.nix
Normal file
|
@ -0,0 +1,12 @@
|
||||||
|
{ ... }: {
|
||||||
|
programs.waybar = {
|
||||||
|
enable = true;
|
||||||
|
settings = [{
|
||||||
|
position = "bottom";
|
||||||
|
|
||||||
|
modules-left = [ ];
|
||||||
|
modules-center = [ ];
|
||||||
|
modules-right = [ "tray" ];
|
||||||
|
}];
|
||||||
|
};
|
||||||
|
}
|
18
home/gui/environments/sway/zsh-autostart.nix
Normal file
18
home/gui/environments/sway/zsh-autostart.nix
Normal file
|
@ -0,0 +1,18 @@
|
||||||
|
{ ... }: {
|
||||||
|
programs.zsh.profileExtra = ''
|
||||||
|
# If running from tty1 start sway
|
||||||
|
if [ "$(tty)" = "/dev/tty1" ]; then
|
||||||
|
systemctl --user unset-environment \
|
||||||
|
SWAYSOCK \
|
||||||
|
I3SOCK \
|
||||||
|
WAYLAND_DISPLAY \
|
||||||
|
DISPLAY \
|
||||||
|
IN_NIX_SHELL \
|
||||||
|
__HM_SESS_VARS_SOURCED \
|
||||||
|
GPG_TTY \
|
||||||
|
NIX_PATH \
|
||||||
|
SHLVL
|
||||||
|
exec env --unset=SHLVL systemd-cat -t sway -- sway
|
||||||
|
fi
|
||||||
|
'';
|
||||||
|
}
|
|
@ -1,11 +1,7 @@
|
||||||
{ ... }:
|
{ ... }:
|
||||||
let
|
let
|
||||||
backupUser = "root";
|
backupUser = "root";
|
||||||
backupPaths = [
|
backupPaths = [ "/var/lib/postgresql" "/var/lib/vault" "/var/lib/acme" ];
|
||||||
"/var/lib/postgresql"
|
|
||||||
"/var/lib/vault"
|
|
||||||
"/var/lib/acme"
|
|
||||||
];
|
|
||||||
timerConfig = {
|
timerConfig = {
|
||||||
OnBootSec = "1m";
|
OnBootSec = "1m";
|
||||||
OnCalendar = "daily";
|
OnCalendar = "daily";
|
||||||
|
|
|
@ -4,41 +4,49 @@
|
||||||
imports = with tree; [
|
imports = with tree; [
|
||||||
users.root
|
users.root
|
||||||
users.chaoticryptidz
|
users.chaoticryptidz
|
||||||
|
|
||||||
#profiles.hardening
|
|
||||||
profiles.tailscale
|
profiles.tailscale
|
||||||
profiles.gui
|
profiles.dnscrypt
|
||||||
|
profiles.printing
|
||||||
|
profiles.sshd
|
||||||
|
|
||||||
profiles.laptop
|
profiles.laptop
|
||||||
|
|
||||||
|
profiles.gui
|
||||||
|
profiles.gui.environments.sway
|
||||||
|
|
||||||
#profiles.bluetooth
|
#profiles.bluetooth
|
||||||
profiles.pulse
|
profiles.pulse
|
||||||
profiles.network_manager
|
profiles.network_manager
|
||||||
profiles.sway
|
|
||||||
profiles.dnscrypt
|
|
||||||
profiles.gaming
|
|
||||||
profiles.printing
|
|
||||||
# for sci-hub and whenever websites break
|
|
||||||
#profiles.tor
|
|
||||||
|
|
||||||
profiles.sshd
|
profiles.gaming.steam
|
||||||
|
|
||||||
|
# for sci-hub and whenever websites break
|
||||||
|
profiles.tor
|
||||||
];
|
];
|
||||||
|
|
||||||
home-manager.users.root = { imports = with tree; [ home.base ]; };
|
home-manager.users.root = { imports = with tree; [ home.base ]; };
|
||||||
home-manager.users.chaoticryptidz = {
|
home-manager.users.chaoticryptidz = {
|
||||||
imports = with tree; [
|
imports = with tree; [
|
||||||
home.base
|
home.base
|
||||||
#home.bluetooth
|
|
||||||
home.gui
|
|
||||||
home.gaming
|
|
||||||
home.dev.all
|
home.dev.all
|
||||||
home.network_manager
|
|
||||||
home.sway
|
|
||||||
home.reversing
|
home.reversing
|
||||||
|
|
||||||
|
home.gui
|
||||||
|
home.gui.environments.sway
|
||||||
|
|
||||||
|
home.gaming.emulators.ds
|
||||||
|
home.gaming.games.minecraft
|
||||||
|
#home.gaming.games.osu
|
||||||
|
home.gaming.platforms.steam
|
||||||
|
|
||||||
|
#home.bluetooth
|
||||||
|
home.network_manager
|
||||||
|
|
||||||
home.apps.vivaldi
|
home.apps.vivaldi
|
||||||
home.apps.telegram
|
home.apps.telegram
|
||||||
home.apps.quassel
|
home.apps.quassel
|
||||||
home.apps.chromium
|
home.apps.chromium
|
||||||
home.apps.multimc
|
|
||||||
#home.apps.osu-lazer
|
|
||||||
home.programming
|
home.programming
|
||||||
#home.programming.languages.go
|
#home.programming.languages.go
|
||||||
home.programming.languages.nix
|
home.programming.languages.nix
|
||||||
|
@ -55,6 +63,8 @@
|
||||||
services.getty.extraArgs =
|
services.getty.extraArgs =
|
||||||
[ "--skip-login" "--login-options" "chaoticryptidz" ];
|
[ "--skip-login" "--login-options" "chaoticryptidz" ];
|
||||||
|
|
||||||
|
boot.kernelPackages = pkgs.linuxPackages_latest;
|
||||||
|
|
||||||
networking.firewall.enable = true;
|
networking.firewall.enable = true;
|
||||||
# let vscode, vivaldi, etc work.
|
# let vscode, vivaldi, etc work.
|
||||||
security.unprivilegedUsernsClone = true;
|
security.unprivilegedUsernsClone = true;
|
||||||
|
|
|
@ -13,8 +13,12 @@
|
||||||
(modulesPath + "/installer/sd-card/sd-image-aarch64.nix")
|
(modulesPath + "/installer/sd-card/sd-image-aarch64.nix")
|
||||||
];
|
];
|
||||||
|
|
||||||
home-manager.users.root = { imports = with tree; [ home.base home.dev.small ]; };
|
home-manager.users.root = {
|
||||||
home-manager.users.chaoticryptidz = { imports = with tree; [ home.base home.dev.small ]; };
|
imports = with tree; [ home.base home.dev.small ];
|
||||||
|
};
|
||||||
|
home-manager.users.chaoticryptidz = {
|
||||||
|
imports = with tree; [ home.base home.dev.small ];
|
||||||
|
};
|
||||||
|
|
||||||
boot.kernelPackages = pkgs.linuxPackages_latest;
|
boot.kernelPackages = pkgs.linuxPackages_latest;
|
||||||
networking.hostName = "raspberry";
|
networking.hostName = "raspberry";
|
||||||
|
|
|
@ -5,11 +5,10 @@ let
|
||||||
ssid = "Test Wifi";
|
ssid = "Test Wifi";
|
||||||
password = "UwUPassUwU";
|
password = "UwUPassUwU";
|
||||||
in {
|
in {
|
||||||
imports = with tree; [
|
imports = with tree; [ profiles.dnscrypt ];
|
||||||
profiles.dnscrypt
|
|
||||||
];
|
services.dnscrypt-proxy2.settings."listen_addresses" =
|
||||||
|
[ "0.0.0.0:53" "[::]:53" ];
|
||||||
services.dnscrypt-proxy2.settings."listen_addresses" = ["0.0.0.0:53" "[::]:53"];
|
|
||||||
|
|
||||||
services.hostapd = {
|
services.hostapd = {
|
||||||
enable = true;
|
enable = true;
|
||||||
|
@ -28,7 +27,7 @@ in {
|
||||||
networking.firewall = {
|
networking.firewall = {
|
||||||
trustedInterfaces = [ wifiInterface ];
|
trustedInterfaces = [ wifiInterface ];
|
||||||
checkReversePath = false;
|
checkReversePath = false;
|
||||||
allowedTCPPorts = [53];
|
allowedTCPPorts = [ 53 ];
|
||||||
};
|
};
|
||||||
|
|
||||||
networking.nat = {
|
networking.nat = {
|
||||||
|
@ -47,4 +46,4 @@ in {
|
||||||
dhcp-range=192.168.2.10,192.168.2.254,24h
|
dhcp-range=192.168.2.10,192.168.2.254,24h
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
@ -6,26 +6,29 @@
|
||||||
users.chaoticryptidz
|
users.chaoticryptidz
|
||||||
profiles.base
|
profiles.base
|
||||||
profiles.gui
|
profiles.gui
|
||||||
|
profiles.gui.environments.sway
|
||||||
profiles.network_manager
|
profiles.network_manager
|
||||||
profiles.sway
|
|
||||||
profiles.tor
|
profiles.tor
|
||||||
(modulesPath + "/installer/cd-dvd/installation-cd-base.nix")
|
(modulesPath + "/installer/cd-dvd/installation-cd-base.nix")
|
||||||
];
|
];
|
||||||
|
|
||||||
home-manager.users.root = { imports = with tree; [ home.base home.dev.all ]; };
|
home-manager.users.root = {
|
||||||
|
imports = with tree; [ home.base home.dev.all ];
|
||||||
|
};
|
||||||
home-manager.users.chaoticryptidz = {
|
home-manager.users.chaoticryptidz = {
|
||||||
imports = with tree; [
|
imports = with tree; [
|
||||||
home.base
|
home.base
|
||||||
home.gui
|
home.gui
|
||||||
|
home.gui.environments.sway
|
||||||
home.dev.all
|
home.dev.all
|
||||||
home.network_manager
|
home.network_manager
|
||||||
home.sway
|
|
||||||
home.apps.vivaldi
|
home.apps.vivaldi
|
||||||
home.programming
|
home.programming
|
||||||
home.programming.languages.nix
|
home.programming.languages.nix
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
|
|
||||||
|
users.users.root.initialPassword = "";
|
||||||
users.users.chaoticryptidz.initialPassword = "";
|
users.users.chaoticryptidz.initialPassword = "";
|
||||||
|
|
||||||
# let vscode, vivaldi, etc work.
|
# let vscode, vivaldi, etc work.
|
||||||
|
|
|
@ -7,9 +7,16 @@ let
|
||||||
config = {
|
config = {
|
||||||
"hosts/*/services".functor.enable = true;
|
"hosts/*/services".functor.enable = true;
|
||||||
"profiles/*".functor.enable = true;
|
"profiles/*".functor.enable = true;
|
||||||
|
"profiles/gaming/*".functor.enable = true;
|
||||||
|
"profiles/gui/environments/*".functor.enable = true;
|
||||||
"users/*".functor.enable = true;
|
"users/*".functor.enable = true;
|
||||||
"home/*".functor.enable = true;
|
"home/*".functor.enable = true;
|
||||||
|
"home/gui/environments/*".functor.enable = true;
|
||||||
"home/apps/*".functor.enable = true;
|
"home/apps/*".functor.enable = true;
|
||||||
|
"home/gaming/emulators/*".functor.enable = true;
|
||||||
|
"home/gaming/games/*".functor.enable = true;
|
||||||
|
"home/gaming/platforms/*".functor.enable = true;
|
||||||
|
|
||||||
"home/programming/languages/*".functor.enable = true;
|
"home/programming/languages/*".functor.enable = true;
|
||||||
"modules/nixos" = {
|
"modules/nixos" = {
|
||||||
functor = {
|
functor = {
|
||||||
|
|
13
overlay/comic-sans/default.nix
Normal file
13
overlay/comic-sans/default.nix
Normal file
|
@ -0,0 +1,13 @@
|
||||||
|
{ lib, fetchzip }:
|
||||||
|
fetchzip {
|
||||||
|
name = "comic-code-1.0";
|
||||||
|
|
||||||
|
url =
|
||||||
|
"https://cdn.discordapp.com/attachments/890298617833857055/931224386143408239/comic.zip";
|
||||||
|
sha256 = "sha256-QTCdQosgHiRkedGT2PjVzeaOqYiotLYpXNyGe9k9nuk=";
|
||||||
|
|
||||||
|
postFetch = ''
|
||||||
|
mkdir -p $out/share/fonts
|
||||||
|
unzip -j $downloadedFile \*.ttf -d $out/share/fonts/truetype
|
||||||
|
'';
|
||||||
|
}
|
|
@ -1,4 +1,5 @@
|
||||||
final: prev: {
|
final: prev: {
|
||||||
|
comic-sans = final.callPackage ./comic-sans { };
|
||||||
comic-code = final.callPackage ./comic-code { };
|
comic-code = final.callPackage ./comic-code { };
|
||||||
zar = final.callPackage ./zar { };
|
zar = final.callPackage ./zar { };
|
||||||
gobar = final.callPackage ./gobar { };
|
gobar = final.callPackage ./gobar { };
|
||||||
|
@ -6,5 +7,7 @@ final: prev: {
|
||||||
# needs a specific version of lsquic
|
# needs a specific version of lsquic
|
||||||
lsquic = final.callPackage ./invidious-latest/lsquic.nix { };
|
lsquic = final.callPackage ./invidious-latest/lsquic.nix { };
|
||||||
};
|
};
|
||||||
multimc = prev.multimc.override { msaClientID = "499546d9-bbfe-4b9b-a086-eb3d75afb78f"; };
|
multimc = prev.multimc.override {
|
||||||
|
msaClientID = "499546d9-bbfe-4b9b-a086-eb3d75afb78f";
|
||||||
|
};
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
{ lib, crystal, fetchFromGitHub, librsvg, pkg-config, libxml2, openssl, sqlite, lsquic, shards }:
|
{ lib, crystal, fetchFromGitHub, librsvg, pkg-config, libxml2, openssl, sqlite
|
||||||
|
, lsquic, shards }:
|
||||||
let
|
let
|
||||||
# When updating, always update the following:
|
# When updating, always update the following:
|
||||||
# * the git revision
|
# * the git revision
|
||||||
|
@ -9,8 +10,7 @@ let
|
||||||
# * If the lsquic.cr dependency changed: lsquic in lsquic.nix (version, sha256)
|
# * If the lsquic.cr dependency changed: lsquic in lsquic.nix (version, sha256)
|
||||||
# * If the lsquic version changed: boringssl' in lsquic.nix (version, sha256)
|
# * If the lsquic version changed: boringssl' in lsquic.nix (version, sha256)
|
||||||
rev = "d928b9eaadc8298f2e92a766fdd10c79e6048858";
|
rev = "d928b9eaadc8298f2e92a766fdd10c79e6048858";
|
||||||
in
|
in crystal.buildCrystalPackage rec {
|
||||||
crystal.buildCrystalPackage rec {
|
|
||||||
pname = "invidious";
|
pname = "invidious";
|
||||||
version = "master";
|
version = "master";
|
||||||
|
|
||||||
|
@ -21,39 +21,54 @@ crystal.buildCrystalPackage rec {
|
||||||
sha256 = "sha256-WojYv9HMqS3UcZFewgE/svbpqeAY6BIyAtxAMfdn1xk=";
|
sha256 = "sha256-WojYv9HMqS3UcZFewgE/svbpqeAY6BIyAtxAMfdn1xk=";
|
||||||
};
|
};
|
||||||
|
|
||||||
postPatch =
|
postPatch = let
|
||||||
let
|
# Replacing by the value (templates) of the variables ensures that building
|
||||||
# Replacing by the value (templates) of the variables ensures that building
|
# fails if upstream changes the way the metadata is formatted.
|
||||||
# fails if upstream changes the way the metadata is formatted.
|
branchTemplate = ''{{ "#{`git branch | sed -n '/* /s///p'`.strip}" }}'';
|
||||||
branchTemplate = ''{{ "#{`git branch | sed -n '/* /s///p'`.strip}" }}'';
|
commitTemplate =
|
||||||
commitTemplate = ''{{ "#{`git rev-list HEAD --max-count=1 --abbrev-commit`.strip}" }}'';
|
''{{ "#{`git rev-list HEAD --max-count=1 --abbrev-commit`.strip}" }}'';
|
||||||
versionTemplate = ''{{ "#{`git log -1 --format=%ci | awk '{print $1}' | sed s/-/./g`.strip}" }}'';
|
versionTemplate = ''
|
||||||
# This always uses the latest commit which invalidates the cache even if
|
{{ "#{`git log -1 --format=%ci | awk '{print $1}' | sed s/-/./g`.strip}" }}'';
|
||||||
# the assets were not changed
|
# This always uses the latest commit which invalidates the cache even if
|
||||||
assetCommitTemplate = ''{{ "#{`git rev-list HEAD --max-count=1 --abbrev-commit -- assets`.strip}" }}'';
|
# the assets were not changed
|
||||||
in
|
assetCommitTemplate = ''
|
||||||
''
|
{{ "#{`git rev-list HEAD --max-count=1 --abbrev-commit -- assets`.strip}" }}'';
|
||||||
# Use the version metadata from the derivation instead of using git at
|
in ''
|
||||||
# build-time
|
# Use the version metadata from the derivation instead of using git at
|
||||||
substituteInPlace src/invidious.cr \
|
# build-time
|
||||||
--replace ${lib.escapeShellArg branchTemplate} '"master"' \
|
substituteInPlace src/invidious.cr \
|
||||||
--replace ${lib.escapeShellArg commitTemplate} '"${lib.substring 0 7 rev}"' \
|
--replace ${lib.escapeShellArg branchTemplate} '"master"' \
|
||||||
--replace ${lib.escapeShellArg versionTemplate} '"${lib.replaceChars ["-"] ["."] (lib.substring 9 10 version)}"' \
|
--replace ${lib.escapeShellArg commitTemplate} '"${
|
||||||
--replace ${lib.escapeShellArg assetCommitTemplate} '"${lib.substring 0 7 rev}"'
|
lib.substring 0 7 rev
|
||||||
|
}"' \
|
||||||
|
--replace ${lib.escapeShellArg versionTemplate} '"${
|
||||||
|
lib.replaceChars [ "-" ] [ "." ] (lib.substring 9 10 version)
|
||||||
|
}"' \
|
||||||
|
--replace ${lib.escapeShellArg assetCommitTemplate} '"${
|
||||||
|
lib.substring 0 7 rev
|
||||||
|
}"'
|
||||||
|
|
||||||
# Patch the assets and locales paths to be absolute
|
# Patch the assets and locales paths to be absolute
|
||||||
substituteInPlace src/invidious.cr \
|
substituteInPlace src/invidious.cr \
|
||||||
--replace 'public_folder "assets"' 'public_folder "${placeholder "out"}/share/invidious/assets"'
|
--replace 'public_folder "assets"' 'public_folder "${
|
||||||
substituteInPlace src/invidious/helpers/i18n.cr \
|
placeholder "out"
|
||||||
--replace 'File.read("locales/' 'File.read("${placeholder "out"}/share/invidious/locales/'
|
}/share/invidious/assets"'
|
||||||
|
substituteInPlace src/invidious/helpers/i18n.cr \
|
||||||
|
--replace 'File.read("locales/' 'File.read("${
|
||||||
|
placeholder "out"
|
||||||
|
}/share/invidious/locales/'
|
||||||
|
|
||||||
# Reference sql initialisation/migration scripts by absolute path
|
# Reference sql initialisation/migration scripts by absolute path
|
||||||
substituteInPlace src/invidious/database/base.cr \
|
substituteInPlace src/invidious/database/base.cr \
|
||||||
--replace 'config/sql' '${placeholder "out"}/share/invidious/config/sql'
|
--replace 'config/sql' '${
|
||||||
|
placeholder "out"
|
||||||
|
}/share/invidious/config/sql'
|
||||||
|
|
||||||
substituteInPlace src/invidious/users.cr \
|
substituteInPlace src/invidious/users.cr \
|
||||||
--replace 'Process.run(%(rsvg-convert' 'Process.run(%(${lib.getBin librsvg}/bin/rsvg-convert'
|
--replace 'Process.run(%(rsvg-convert' 'Process.run(%(${
|
||||||
'';
|
lib.getBin librsvg
|
||||||
|
}/bin/rsvg-convert'
|
||||||
|
'';
|
||||||
|
|
||||||
# shards required for spectator
|
# shards required for spectator
|
||||||
nativeBuildInputs = [ pkg-config shards ];
|
nativeBuildInputs = [ pkg-config shards ];
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
{ lib, boringssl, stdenv, fetchgit, fetchFromGitHub, cmake, zlib, perl, libevent }:
|
{ lib, boringssl, stdenv, fetchgit, fetchFromGitHub, cmake, zlib, perl, libevent
|
||||||
|
}:
|
||||||
let
|
let
|
||||||
# lsquic requires a specific boringssl version (noted in its README)
|
# lsquic requires a specific boringssl version (noted in its README)
|
||||||
boringssl' = boringssl.overrideAttrs (old: rec {
|
boringssl' = boringssl.overrideAttrs (old: rec {
|
||||||
|
@ -9,8 +10,7 @@ let
|
||||||
sha256 = "sha256-EU6T9yQCdOLx98Io8o01rEsgxDFF/Xoy42LgPopD2/A=";
|
sha256 = "sha256-EU6T9yQCdOLx98Io8o01rEsgxDFF/Xoy42LgPopD2/A=";
|
||||||
};
|
};
|
||||||
});
|
});
|
||||||
in
|
in stdenv.mkDerivation rec {
|
||||||
stdenv.mkDerivation rec {
|
|
||||||
pname = "lsquic";
|
pname = "lsquic";
|
||||||
version = "2.18.1";
|
version = "2.18.1";
|
||||||
|
|
||||||
|
@ -53,6 +53,11 @@ stdenv.mkDerivation rec {
|
||||||
description = "A library for QUIC and HTTP/3 (version for Invidious)";
|
description = "A library for QUIC and HTTP/3 (version for Invidious)";
|
||||||
homepage = "https://github.com/litespeedtech/lsquic";
|
homepage = "https://github.com/litespeedtech/lsquic";
|
||||||
maintainers = with maintainers; [ infinisil sbruder ];
|
maintainers = with maintainers; [ infinisil sbruder ];
|
||||||
license = with licenses; [ openssl isc mit bsd3 ]; # statically links against boringssl, so has to include its licenses
|
license = with licenses; [
|
||||||
|
openssl
|
||||||
|
isc
|
||||||
|
mit
|
||||||
|
bsd3
|
||||||
|
]; # statically links against boringssl, so has to include its licenses
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
@ -71,4 +71,4 @@
|
||||||
rev = "v0.18.0";
|
rev = "v0.18.0";
|
||||||
sha256 = "03nnvpchhq9f9ywsm3pk2rrj4a3figw7xs96zdziwgr5znkz6x93";
|
sha256 = "03nnvpchhq9f9ywsm3pk2rrj4a3figw7xs96zdziwgr5znkz6x93";
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,7 +1,9 @@
|
||||||
{ lib, pkgs, ... }: {
|
{ lib, pkgs, ... }: {
|
||||||
hardware.enableRedistributableFirmware = true;
|
hardware.enableRedistributableFirmware = true;
|
||||||
hardware.enableAllFirmware = true;
|
hardware.enableAllFirmware = true;
|
||||||
hardware.cpu.intel.updateMicrocode = lib.mkIf ("${pkgs.system}" == "x86_64-linux") true;
|
hardware.cpu.intel.updateMicrocode =
|
||||||
hardware.cpu.amd.updateMicrocode = lib.mkIf ("${pkgs.system}" == "x86_64-linux") true;
|
lib.mkIf ("${pkgs.system}" == "x86_64-linux") true;
|
||||||
|
hardware.cpu.amd.updateMicrocode =
|
||||||
|
lib.mkIf ("${pkgs.system}" == "x86_64-linux") true;
|
||||||
hardware.wirelessRegulatoryDatabase = true;
|
hardware.wirelessRegulatoryDatabase = true;
|
||||||
}
|
}
|
||||||
|
|
|
@ -1 +1 @@
|
||||||
{ config, pkgs, ... }: { fonts.fonts = with pkgs; [ comic-neue comic-code ]; }
|
{ config, pkgs, ... }: { fonts.fonts = with pkgs; [ comic-sans comic-code ]; }
|
||||||
|
|
Loading…
Reference in a new issue