setup nix gaming repository

This commit is contained in:
Danilo Reyes 2023-06-03 11:41:22 -06:00
parent 9e09c8e651
commit 9803b55e2b
2 changed files with 644 additions and 613 deletions

View File

@ -2,21 +2,26 @@
let
VERSION = "23.05";
# "https://github.com/nix-community/home-manager/archive/master.tar.gz";
unstable_tarball =
builtins.fetchTarball "https://github.com/nixos/nixpkgs/tarball/master";
unstable = import unstable_tarball { config = config.nixpkgs.config; };
nextcloud_scrapsync = pkgs.writeScriptBin "nextcloud_scrapsync"
(builtins.readFile ./scripts/nextcloud_scrapsync.sh);
manage_library = pkgs.writeScriptBin "manage_library"
(builtins.readFile ./scripts/manage_library.fish);
ffmpeg4discord = pkgs.writeScriptBin "ffmpeg4discord"
(builtins.readFile ./scripts/ffmpeg4discord.py);
in { # Remember to close this bracket at the end of the document
unstable_tarball = builtins.fetchTarball
https://github.com/nixos/nixpkgs/tarball/master;
unstable = import unstable_tarball {
config = config.nixpkgs.config;
};
nix-gaming = import (builtins.fetchTarball "https://github.com/fufexan/nix-gaming/archive/master.tar.gz");
nextcloud_scrapsync = pkgs.writeScriptBin
"nextcloud_scrapsync" (builtins.readFile ./scripts/nextcloud_scrapsync.sh);
manage_library = pkgs.writeScriptBin
"manage_library" (builtins.readFile ./scripts/manage_library.fish);
ffmpeg4discord = pkgs.writeScriptBin
"ffmpeg4discord" (builtins.readFile ./scripts/ffmpeg4discord.py);
in
{ # Remember to close this bracket at the end of the document
imports = [
./hardware-configuration.nix
<home-manager/nixos>
<agenix/modules/age.nix>
"${nix-gaming}/modules/pipewireLowLatency.nix"
];
networking.hostName = "workstation";
@ -27,7 +32,9 @@ in { # Remember to close this bracket at the end of the document
i18n = {
defaultLocale = "en_CA.UTF-8";
extraLocaleSettings = { LC_MONETARY = "es_MX.UTF-8"; };
extraLocaleSettings = {
LC_MONETARY = "es_MX.UTF-8";
};
};
console = {
font = "Lat2-Terminus16";
@ -53,7 +60,8 @@ in { # Remember to close this bracket at the end of the document
gnome-connections
# gnome-shell-extensions
baobab
]) ++ (with pkgs.gnome; [
])
++ (with pkgs.gnome; [
# totem
gedit
gnome-music
@ -79,6 +87,11 @@ in { # Remember to close this bracket at the end of the document
alsa.enable = true;
alsa.support32Bit = true;
pulse.enable = true;
lowLatency = {
enable = true;
quantum = 64;
rate = 48000;
};
};
security.sudo = {
@ -95,7 +108,9 @@ in { # Remember to close this bracket at the end of the document
# noPass = true;
# }];
nixpkgs.config = { allowUnfree = true; };
nixpkgs.config = {
allowUnfree = true;
};
users.users.jawz = {
isNormalUser = true;
@ -103,9 +118,7 @@ in { # Remember to close this bracket at the end of the document
initialPassword = "password";
shell = pkgs.fish;
openssh = {
authorizedKeys.keys = [
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIB5GaQM4N+yGAByibOFQOBVMV/6TjOfaGIP+NunMiK76 gpodeacerocdreyes@100CDREYES"
];
authorizedKeys.keys = [ "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIB5GaQM4N+yGAByibOFQOBVMV/6TjOfaGIP+NunMiK76 gpodeacero\cdreyes@100CDREYES" ];
};
packages = (with pkgs; [
@ -126,6 +139,8 @@ in { # Remember to close this bracket at the end of the document
parsec-bin # remote gaming with friends
protonup-qt # update proton-ge
# nix-gaming.packages.${pkgs.hostPlatform.system}.wine-discord-ipc-bridge
libreoffice-fresh # office, but based
calibre # ugly af eBook library manager
foliate # gtk eBook reader
@ -247,17 +262,12 @@ in { # Remember to close this bracket at the end of the document
# Fonts
(nerdfonts.override {
fonts = [
"Agave"
"CascadiaCode"
"SourceCodePro"
"Ubuntu"
"FiraCode"
"Iosevka"
];
fonts = [ "Agave" "CascadiaCode" "SourceCodePro" "Ubuntu" "FiraCode" "Iosevka" ];
})
symbola
(papirus-icon-theme.override { color = "adwaita"; })
(papirus-icon-theme.override {
color = "adwaita";
})
]) ++ (with pkgs.python3Packages; [
flake8 # wraper for pyflakes, pycodestyle and mccabe
@ -276,7 +286,8 @@ in { # Remember to close this bracket at the end of the document
src = ./scripts/download/.;
doCheck = false;
buildInputs = [ setuptools ];
propagatedBuildInputs = [ pyyaml types-pyyaml ];
propagatedBuildInputs =
[ pyyaml types-pyyaml ];
})
]) ++ (with pkgs.bat-extras; [
@ -311,8 +322,7 @@ in { # Remember to close this bracket at the end of the document
markdownlint-cli # Linter
prettier # Linter
pnpm # Package manager
]);
}; # <--- end of package list
]); }; # <--- end of package list
fonts.fontconfig.enable = true;
@ -328,15 +338,12 @@ in { # Remember to close this bracket at the end of the document
enable = true;
# useBabelfish = true; This setting doens't work from inside home-manager
shellAliases = {
ls =
"exa --icons --group-directories-first --no-permissions --no-user --no-time";
ls = "exa --icons --group-directories-first --no-permissions --no-user --no-time";
edit = "emacsclient -t";
comic = "download -u jawz -i (cat $lc | fzf --multi --exact -i)";
gallery = "download -u jawz -i (cat $lw | fzf --multi --exact -i)";
open_gallery =
"open (find /mnt/disk2/scrapping/JawZ/gallery-dl -type d | fzf)";
unique_extensions =
"find . -type f | string match -r '([^./]+)$' | sort -u";
open_gallery = "open (find /mnt/disk2/scrapping/JawZ/gallery-dl -type d | fzf)";
unique_extensions = "find . -type f | string match -r '([^.\/]+)\$' | sort -u";
cp = "cp -i";
mv = "mv -i";
mkdir = "mkdir -p";
@ -402,8 +409,7 @@ in { # Remember to close this bracket at the end of the document
enable = true;
config = {
pager = "less -FR";
theme = "base16";
};
theme = "base16"; };
};
git = {
enable = true;
@ -432,8 +438,7 @@ in { # Remember to close this bracket at the end of the document
};
configFile = {
"wgetrc".source = ./dotfiles/wget/wgetrc;
"configstore/update-notifier-npm-check.json".source =
./dotfiles/npm/update-notifier-npm-check.json;
"configstore/update-notifier-npm-check.json".source = ./dotfiles/npm/update-notifier-npm-check.json;
"npm/npmrc".source = ./dotfiles/npm/npmrc;
"gallery-dl/config.json".source = ./dotfiles/gallery-dl/config.json;
"htop/htoprc".source = ./dotfiles/htop/htoprc;
@ -520,7 +525,9 @@ in { # Remember to close this bracket at the end of the document
olderThan = 10;
interval = "4:00";
};
parityFiles = [ "/mnt/parity/snapraid.parity" ];
parityFiles = [
"/mnt/parity/snapraid.parity"
];
extraConfig = ''
autosave 50
'';
@ -553,7 +560,9 @@ in { # Remember to close this bracket at the end of the document
enable = true;
enableSSHSupport = true;
};
geary = { enable = true; };
geary = {
enable = true;
};
steam = {
enable = true;
remotePlay.openFirewall = true;
@ -571,7 +580,11 @@ in { # Remember to close this bracket at the end of the document
fstrim.enable = true;
btrfs.autoScrub = {
enable = true;
fileSystems = [ "/" "/mnt/disk1" "/mnt/disk2" ];
fileSystems = [
"/"
"/mnt/disk1"
"/mnt/disk2"
];
};
openssh = {
enable = true;
@ -581,10 +594,12 @@ in { # Remember to close this bracket at the end of the document
KbdInteractiveAuthentication = false;
};
startWhenNeeded = true;
listenAddresses = [{
listenAddresses = [
{
addr = "0.0.0.0";
port = 25152;
}];
}
];
};
# udev.packages = with pkgs; [ gnome.gnome-settings-daemon ];
emacs = {
@ -605,19 +620,23 @@ in { # Remember to close this bracket at the end of the document
environment = {
FILE = "/home/jawz/Development/Docker/docker-compose.yml";
};
path = [ pkgs.docker-compose ];
path = [
pkgs.docker-compose
];
serviceConfig = {
Restart = "on-failure";
RestartSec = 30;
ExecStart =
"${pkgs.docker-compose}/bin/docker-compose -f \${FILE} up --remove-orphans";
ExecStart = "${pkgs.docker-compose}/bin/docker-compose -f \${FILE} up --remove-orphans";
ExecStop = "${pkgs.docker-compose}/bin/docker-compose -f \${FILE} down";
};
};
"nextcloud_scrapsync" = {
description = "Sync scrapped files with nextcloud";
wantedBy = [ "default.target" ];
path = [ pkgs.bash nextcloud_scrapsync ];
path = [
pkgs.bash
nextcloud_scrapsync
];
serviceConfig = {
RestartSec = 30;
ExecStart = "${nextcloud_scrapsync}/bin/nextcloud_scrapsync";
@ -647,7 +666,9 @@ in { # Remember to close this bracket at the end of the document
restartIfChanged = true;
description = "Run hentai@home server";
wantedBy = [ "default.target" ];
path = [ pkgs.HentaiAtHome ];
path = [
pkgs.HentaiAtHome
];
serviceConfig = {
Restart = "on-failure";
RestartSec = 30;
@ -660,7 +681,10 @@ in { # Remember to close this bracket at the end of the document
restartIfChanged = true;
description = "Run the manage library fish script";
wantedBy = [ "default.target" ];
path = [ pkgs.fish manage_library ];
path = [
pkgs.fish
manage_library
];
serviceConfig = {
Restart = "on-failure";
RestartSec = 30;

View File

@ -24,8 +24,6 @@
- [ ] menulibre
- [ ] Misc [0/3]
- [ ] Figure out how to get rid of xterm
- [ ] wine-discord-ipc-bridge
https://github.com/fufexan/nix-gaming
* ABOUT
@ -48,6 +46,7 @@ let
unstable = import unstable_tarball {
config = config.nixpkgs.config;
};
nix-gaming = import (builtins.fetchTarball "https://github.com/fufexan/nix-gaming/archive/master.tar.gz");
nextcloud_scrapsync = pkgs.writeScriptBin
"nextcloud_scrapsync" (builtins.readFile ./scripts/nextcloud_scrapsync.sh);
manage_library = pkgs.writeScriptBin
@ -68,6 +67,7 @@ imports = [
./hardware-configuration.nix
<home-manager/nixos>
<agenix/modules/age.nix>
"${nix-gaming}/modules/pipewireLowLatency.nix"
];
#+end_src
@ -169,6 +169,11 @@ services.pipewire = {
alsa.enable = true;
alsa.support32Bit = true;
pulse.enable = true;
lowLatency = {
enable = true;
quantum = 64;
rate = 48000;
};
};
#+end_src
@ -271,6 +276,8 @@ grapejuice # roblox manager
minecraft # minecraft official launcher
parsec-bin # remote gaming with friends
protonup-qt # update proton-ge
# nix-gaming.packages.${pkgs.hostPlatform.system}.wine-discord-ipc-bridge
#+end_src
*** PRODUCTIVITY