mirror of
https://github.com/Gerg-L/nixos.git
synced 2025-12-10 00:43:56 -05:00
changed discord bot from docker container to systemd service
This commit is contained in:
parent
e1987d6461
commit
257c6102ff
9 changed files with 67 additions and 50 deletions
|
|
@ -1,25 +1,35 @@
|
|||
{ config, pkgs, lib, ... }:
|
||||
{
|
||||
|
||||
system.stateVersion = "23.05";
|
||||
environment = {
|
||||
defaultPackages = [ ];
|
||||
binsh = "${pkgs.dash}/bin/dash";
|
||||
defaultPackages = [ ]; #don't install anything by default
|
||||
binsh = "${pkgs.dash}/bin/dash"; #use dash for speed
|
||||
variables = {
|
||||
EDITOR = "nvim";
|
||||
EDITOR = "vi";
|
||||
VISUAL = "vi";
|
||||
};
|
||||
};
|
||||
# boot faster
|
||||
systemd.services.NetworkManager-wait-online.enable = false;
|
||||
#nix stuff
|
||||
nix = {
|
||||
settings = {
|
||||
auto-optimise-store = true;
|
||||
cores = 0;
|
||||
auto-optimise-store = true; #save space
|
||||
cores = 0; # use all cores
|
||||
keep-outputs = false; #don't make ./results files
|
||||
keep-derivations = false; #^
|
||||
experimental-features = "nix-command flakes";
|
||||
};
|
||||
extraOptions = ''
|
||||
keep-outputs = false
|
||||
keep-derivations = false
|
||||
experimental-features = nix-command flakes
|
||||
'';
|
||||
};
|
||||
#sound settings
|
||||
security.rtkit.enable = true;
|
||||
sound.enable = false; #disable alsa
|
||||
services.pipewire = {
|
||||
enable = true;
|
||||
wireplumber.enable = true;
|
||||
alsa.enable = true;
|
||||
alsa.support32Bit = true;
|
||||
pulse.enable = true;
|
||||
jack.enable = true;
|
||||
};
|
||||
networking = {
|
||||
firewall = {
|
||||
|
|
@ -28,13 +38,28 @@
|
|||
};
|
||||
networkmanager.enable = true;
|
||||
};
|
||||
services.gvfs.enable = true;
|
||||
#enable ssh
|
||||
programs = {
|
||||
mtr.enable = true; #ping and traceroute
|
||||
gnupg.agent = {
|
||||
enable = true;
|
||||
enableSSHSupport = true;
|
||||
};
|
||||
};
|
||||
services.openssh = {
|
||||
enable = true;
|
||||
permitRootLogin = "yes";
|
||||
};
|
||||
|
||||
|
||||
#themeing
|
||||
qt = {
|
||||
enable = true;
|
||||
style = "gtk2";
|
||||
platformTheme = "gtk2";
|
||||
};
|
||||
programs.dconf.enable = true;
|
||||
|
||||
#time settings
|
||||
time.timeZone = "America/New_York";
|
||||
services = {
|
||||
timesyncd = {
|
||||
|
|
@ -45,32 +70,12 @@
|
|||
];
|
||||
};
|
||||
};
|
||||
# Select internationalisation properties.
|
||||
#terminal stuff
|
||||
i18n.defaultLocale = "en_US.UTF-8";
|
||||
console = {
|
||||
font = "Lat2-Terminus16";
|
||||
useXkbConfig = true;
|
||||
};
|
||||
#should be false
|
||||
sound.enable = false;
|
||||
|
||||
# rtkit is optional but recommended
|
||||
security.rtkit.enable = true;
|
||||
services.pipewire = {
|
||||
enable = true;
|
||||
wireplumber.enable = true;
|
||||
alsa.enable = true;
|
||||
alsa.support32Bit = true;
|
||||
pulse.enable = true;
|
||||
jack.enable = true;
|
||||
};
|
||||
#enable ssh
|
||||
programs = {
|
||||
mtr.enable = true;
|
||||
gnupg.agent = {
|
||||
enable = true;
|
||||
enableSSHSupport = true;
|
||||
};
|
||||
};
|
||||
services.openssh.enable = true;
|
||||
programs.dconf.enable = true;
|
||||
services.gvfs.enable = true; #gvfs for pcmanfm
|
||||
}
|
||||
|
|
|
|||
|
|
@ -40,6 +40,7 @@
|
|||
in
|
||||
{
|
||||
formatter.x86_64-linux = pkgs.nixpkgs-fmt;
|
||||
|
||||
nixosConfigurations = {
|
||||
gerg-desktop = lib.nixosSystem {
|
||||
inherit system pkgs;
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@
|
|||
{
|
||||
programs.git = {
|
||||
enable = true;
|
||||
package = pkgs.git;
|
||||
package = pkgs.gitMinimal;
|
||||
userName = "ISnortPennies";
|
||||
userEmail = "ISnortPennies@protonmail.com";
|
||||
};
|
||||
|
|
|
|||
|
|
@ -12,7 +12,6 @@
|
|||
./neovim
|
||||
];
|
||||
xsession.numlock.enable = true;
|
||||
programs.home-manager.enable = true;
|
||||
home = {
|
||||
inherit username;
|
||||
homeDirectory = "/home/${username}";
|
||||
|
|
|
|||
|
|
@ -5,7 +5,6 @@
|
|||
./git.nix
|
||||
./neovim
|
||||
];
|
||||
programs.home-manager.enable = true;
|
||||
home = {
|
||||
username = "root";
|
||||
homeDirectory = "/root";
|
||||
|
|
|
|||
|
|
@ -29,6 +29,7 @@
|
|||
pcmanfm #file manager
|
||||
haskellPackages.squeeze #file compression
|
||||
nix-tree #view packages
|
||||
bc #terminal calculator
|
||||
];
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -14,7 +14,6 @@ let
|
|||
echo "RUN AS ROOT"
|
||||
exit 1
|
||||
fi
|
||||
rm /nix/var/nix/gcroots/auto/*
|
||||
nix-collect-garbage -d
|
||||
'';
|
||||
|
||||
|
|
|
|||
|
|
@ -1,24 +1,25 @@
|
|||
{ lib
|
||||
, rustPlatform
|
||||
, fetchFromGitHub
|
||||
, yt-dlp
|
||||
, pkg-config
|
||||
, openssl
|
||||
, cmake
|
||||
, libopus
|
||||
}:
|
||||
# yt-dlp and ffmpeg required at runtime
|
||||
|
||||
rustPlatform.buildRustPackage rec {
|
||||
pname = "parrot";
|
||||
version = "1.4.2";
|
||||
# buildFeatures = ["let_else"];
|
||||
version = "1.5.1";
|
||||
src = fetchFromGitHub {
|
||||
owner = "aquelemiguel";
|
||||
repo = "parrot";
|
||||
rev = "28d7db3c5b50c7ba01eec71a3177875feae44bcc";
|
||||
sha256 = "sha256-G9SfaiR/KIt+Xm7vLs/EGaImZeSaUbpgAArfK6oVJeM=";
|
||||
rev = "b2c5ad7774616f488e9fc556082da545c5461c21";
|
||||
sha256 = "sha256-S73Ef4GjdHjkiQZnOqwFzuidWnSrMe92rc1qZ6rYdiY=";
|
||||
};
|
||||
|
||||
buildInputs = [
|
||||
yt-dlp
|
||||
libopus
|
||||
openssl
|
||||
];
|
||||
|
||||
|
|
@ -26,7 +27,7 @@ rustPlatform.buildRustPackage rec {
|
|||
pkg-config
|
||||
cmake
|
||||
];
|
||||
cargoSha256 = "sha256-ScwyPTq9da0hst/b2FX89SP03OX3HrJT3oUKGsHEjgs=";
|
||||
cargoSha256 = "sha256-qPyuj5OxHrWz0YbrquCTTKZM3j1poXuioNNvn9z+xDQ=";
|
||||
|
||||
RUSTC_BOOTSTRAP = 1;
|
||||
|
||||
|
|
|
|||
|
|
@ -48,12 +48,24 @@
|
|||
fsType = "vfat";
|
||||
};
|
||||
};
|
||||
virtualisation.docker.enable = true;
|
||||
#discord bot stuff
|
||||
virtualisation.docker.enable = false;
|
||||
systemd.services.parrot = {
|
||||
enable = true;
|
||||
path = with pkgs; [ parrot yt-dlp ffmpeg ];
|
||||
wantedBy = [ "multi-user.target" ];
|
||||
wants = [ "NetworkManager-wait-online.service" ];
|
||||
after = [ "NetworkManager-wait-online.service" ];
|
||||
script = "parrot";
|
||||
serviceConfig = {
|
||||
EnvironmentFile = "/home/${username}/parrot/.env";
|
||||
};
|
||||
};
|
||||
#mining stuff
|
||||
systemd.services.mining = {
|
||||
enable = false;
|
||||
path = with pkgs; [ t-rex-miner afk-cmds st zsh dbus xmrig ];
|
||||
wantedBy = [ "graphical.target" ];
|
||||
wants = [ "graphical.target" ];
|
||||
script = ''
|
||||
afk-cmds -c /home/${username}/afk-cmds.json
|
||||
'';
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue