Compare commits
1 Commits
romraider
...
file-serve
Author | SHA1 | Date | |
---|---|---|---|
2b597ff20a |
1674
flake.lock
generated
1674
flake.lock
generated
File diff suppressed because it is too large
Load Diff
39
flake.nix
39
flake.nix
@@ -3,31 +3,28 @@
|
||||
|
||||
inputs = {
|
||||
nixpkgs.url = "github:nixos/nixpkgs/nixos-24.05";
|
||||
shelvacu.url = "git+https://git.uninsane.org/shelvacu/nix-stuff";
|
||||
};
|
||||
|
||||
outputs = { self, nixpkgs, ... }@inputs:
|
||||
let
|
||||
secrets = builtins.fromJSON (builtins.readFile ./secrets.json);
|
||||
in
|
||||
{
|
||||
nixosModules = {
|
||||
common = import ./modules/common.nix;
|
||||
prompt = import ./modules/prompt.nix;
|
||||
server = import ./modules/server.nix;
|
||||
};
|
||||
let
|
||||
secrets = builtins.fromJSON (builtins.readFile ./secrets.json);
|
||||
in {
|
||||
nixosModules = {
|
||||
common = import ./modules/common.nix;
|
||||
server = import ./modules/server.nix;
|
||||
};
|
||||
|
||||
nixosConfigurations = {
|
||||
marauder = nixpkgs.lib.nixosSystem {
|
||||
system = "x86_64-linux";
|
||||
modules = [ ./hosts/marauder ];
|
||||
specialArgs = { inherit self inputs secrets; };
|
||||
};
|
||||
monolith = nixpkgs.lib.nixosSystem {
|
||||
system = "x86_64-linux";
|
||||
modules = [ ./hosts/monolith ];
|
||||
specialArgs = { inherit self inputs secrets; };
|
||||
};
|
||||
nixosConfigurations = {
|
||||
marauder = nixpkgs.lib.nixosSystem {
|
||||
system = "x86_64-linux";
|
||||
modules = [ ./hosts/marauder ];
|
||||
specialArgs = { inherit self inputs secrets; };
|
||||
};
|
||||
monolith = nixpkgs.lib.nixosSystem {
|
||||
system = "x86_64-linux";
|
||||
modules = [ ./hosts/monolith ];
|
||||
specialArgs = { inherit self inputs secrets; };
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
|
@@ -20,7 +20,7 @@
|
||||
script = "notify-send -u critical \"Backup to B2 failed\" \"$(journalctl -u restic-backups-b2 -n 5 -o cat)\"";
|
||||
};
|
||||
restic-backups-b2 = {
|
||||
onFailure = [ "notify-backup-b2-failed.service" ];
|
||||
onFailure = ["notify-backup-b2-failed.service"];
|
||||
};
|
||||
};
|
||||
|
||||
@@ -39,9 +39,14 @@
|
||||
repository = "b2:marauder-backup";
|
||||
passwordFile = "/etc/restic-password";
|
||||
paths = [
|
||||
"${config.users.users.nettika.home}/Desktop"
|
||||
"${config.users.users.nettika.home}/Documents"
|
||||
"${config.users.users.nettika.home}/Artwork"
|
||||
"${config.users.users.nettika.home}/Music"
|
||||
"${config.users.users.nettika.home}/Pictures"
|
||||
"${config.users.users.nettika.home}/Projects"
|
||||
"${config.users.users.nettika.home}/Public"
|
||||
"${config.users.users.nettika.home}/Templates"
|
||||
"${config.users.users.nettika.home}/Videos"
|
||||
];
|
||||
pruneOpts = [
|
||||
"--keep-daily 7"
|
||||
|
@@ -1,10 +1,8 @@
|
||||
{ self, pkgs, inputs, ... }:
|
||||
{ self, pkgs, inputs, secrets, ... }:
|
||||
{
|
||||
imports = [
|
||||
self.nixosModules.common
|
||||
self.nixosModules.prompt
|
||||
./backup.nix
|
||||
./dev.nix
|
||||
];
|
||||
|
||||
networking.hostName = "marauder";
|
||||
@@ -36,7 +34,7 @@
|
||||
"sd_mod"
|
||||
];
|
||||
};
|
||||
kernelModules = [ "kvm-amd" ];
|
||||
kernelModules = ["kvm-amd"];
|
||||
kernelParams = [ "amd_pstate=active" ];
|
||||
};
|
||||
|
||||
@@ -46,7 +44,7 @@
|
||||
opengl = {
|
||||
enable = true;
|
||||
driSupport32Bit = true;
|
||||
extraPackages = [ pkgs.vaapiVdpau ];
|
||||
extraPackages = [pkgs.vaapiVdpau];
|
||||
};
|
||||
nvidia.prime = {
|
||||
offload = {
|
||||
@@ -58,36 +56,41 @@
|
||||
};
|
||||
};
|
||||
|
||||
environment = {
|
||||
systemPackages = [
|
||||
inputs.shelvacu.packages.x86_64-linux.sm64coopdx
|
||||
] ++ (with pkgs; [
|
||||
# Chat clients
|
||||
discord
|
||||
slack
|
||||
element-desktop
|
||||
telegram-desktop
|
||||
environment.systemPackages = with pkgs; [
|
||||
# Chat clients
|
||||
discord
|
||||
element-desktop
|
||||
telegram-desktop
|
||||
|
||||
# Browsers
|
||||
firefox
|
||||
filezilla
|
||||
# Browsers
|
||||
firefox
|
||||
|
||||
# Art and 3D
|
||||
inkscape
|
||||
gimp
|
||||
krita
|
||||
openscad-unstable
|
||||
bambu-studio
|
||||
# Coding
|
||||
vscode
|
||||
|
||||
# Multimedia
|
||||
vlc
|
||||
ffmpeg
|
||||
(callPackage ./ffcheck.nix { })
|
||||
# Art and 3D
|
||||
inkscape
|
||||
openscad-unstable
|
||||
bambu-studio
|
||||
|
||||
# Misc
|
||||
obsidian
|
||||
(callPackage ./romraider.nix { })
|
||||
]);
|
||||
# Multimedia
|
||||
vlc
|
||||
|
||||
# Productivity
|
||||
obsidian
|
||||
];
|
||||
|
||||
programs.bash = {
|
||||
promptInit = ''
|
||||
PS1="\[\e]0;\u@\h: \w\a\]" # window title
|
||||
PS1+="\n"
|
||||
PS1+="\$(printf \"%*s\" \$((\$COLUMNS + 9)) \"\[\e[1;33m\]\$(git branch --show-current 2>/dev/null)\")" # git branch
|
||||
PS1+="\[\e[1G\]" # move cursor to beginning of line
|
||||
PS1+="💜" # prompt symbol
|
||||
PS1+="\[\033[1;$((UID ? 32 : 31))m\]" # prompt color
|
||||
PS1+="[\u@\h:\w]\\$"
|
||||
PS1+="\[\033[0m\] " # reset color
|
||||
'';
|
||||
};
|
||||
|
||||
programs.steam = {
|
||||
@@ -96,10 +99,10 @@
|
||||
dedicatedServer.openFirewall = true;
|
||||
};
|
||||
|
||||
services.xserver = {
|
||||
services.xserver = {
|
||||
enable = true;
|
||||
videoDrivers = [ "nvidia" ];
|
||||
desktopManager = {
|
||||
videoDrivers = ["nvidia"];
|
||||
desktopManager = {
|
||||
cinnamon.enable = true;
|
||||
xterm.enable = false;
|
||||
};
|
||||
@@ -117,14 +120,8 @@
|
||||
enable = true;
|
||||
};
|
||||
|
||||
services.mullvad-vpn = {
|
||||
enable = true;
|
||||
package = pkgs.mullvad-vpn; # Include GUI
|
||||
};
|
||||
|
||||
promptEmoji = "💜";
|
||||
|
||||
time.timeZone = "America/Los_Angeles";
|
||||
|
||||
system.stateVersion = "24.05";
|
||||
}
|
||||
|
||||
|
@@ -1,20 +0,0 @@
|
||||
{ pkgs, ... }:
|
||||
{
|
||||
environment.variables = {
|
||||
VISUAL = "code --wait";
|
||||
};
|
||||
|
||||
environment.systemPackages = with pkgs; [
|
||||
vscode
|
||||
kotlin
|
||||
rustup
|
||||
pyenv
|
||||
gcc
|
||||
nixd
|
||||
nixpkgs-fmt
|
||||
];
|
||||
|
||||
programs.direnv = {
|
||||
enable = true;
|
||||
};
|
||||
}
|
@@ -1,3 +0,0 @@
|
||||
{ writeShellScriptBin, ffmpeg }: writeShellScriptBin "ffcheck" ''
|
||||
${ffmpeg}/bin/ffmpeg -v error -stats -hide_banner -i "$1" -c copy -f null -
|
||||
''
|
@@ -1,24 +0,0 @@
|
||||
{ stdenv, fetchFromGitHub, ant, jdk11, makeWrapper, jre }: stdenv.mkDerivation {
|
||||
pname = "romraider";
|
||||
version = "1.0.0";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "Romraider";
|
||||
repo = "Romraider";
|
||||
rev = "1.0.0-DEC01-2023";
|
||||
hash = "sha256-KCG6D/+yupGahzPtZk1l9FK826MHZKdTuWoTCLC0ngY=";
|
||||
};
|
||||
|
||||
JRE_DIR = jdk11;
|
||||
|
||||
nativeBuildInputs = [ ant jdk11 makeWrapper ];
|
||||
|
||||
buildPhase = "ant build-linux";
|
||||
|
||||
installPhase = ''
|
||||
mkdir -p $out/{bin,share/java}
|
||||
install build/linux/lib/RomRaider.jar $out/share/java/romraider.jar
|
||||
makeWrapper ${jdk11}/bin/java $out/bin/romraider \
|
||||
--add-flags "-jar $out/share/java/romraider.jar"
|
||||
'';
|
||||
}
|
@@ -1,8 +1,7 @@
|
||||
{ self, ... }:
|
||||
{ self, pkgs, secrets, ... }:
|
||||
{
|
||||
imports = [
|
||||
self.nixosModules.common
|
||||
self.nixosModules.prompt
|
||||
self.nixosModules.server
|
||||
./dns.nix
|
||||
];
|
||||
@@ -10,6 +9,7 @@
|
||||
networking = {
|
||||
hostName = "monolith";
|
||||
hostId = "44551c32";
|
||||
firewall.allowedTCPPorts = [ 80 ];
|
||||
};
|
||||
|
||||
fileSystems = {
|
||||
@@ -38,7 +38,11 @@
|
||||
supportedFilesystems = [ "zfs" ];
|
||||
};
|
||||
|
||||
promptEmoji = "🏰";
|
||||
services.static-web-server = {
|
||||
enable = true;
|
||||
listen = "[::]:80";
|
||||
root = "/srv/www";
|
||||
};
|
||||
|
||||
time.timeZone = "America/Los_Angeles";
|
||||
|
||||
|
@@ -4,8 +4,6 @@
|
||||
|
||||
nix.settings = {
|
||||
experimental-features = [ "nix-command" "flakes" ];
|
||||
substituters = [ "https://nixcache.shelvacu.com" ];
|
||||
trusted-public-keys = [ "nixcache.shelvacu.com:73u5ZGBpPRoVZfgNJQKYYBt9K9Io/jPwgUfuOLsJbsM=" ];
|
||||
trusted-users = [ "@wheel" ];
|
||||
};
|
||||
|
||||
@@ -16,10 +14,6 @@
|
||||
|
||||
security.sudo.wheelNeedsPassword = false;
|
||||
|
||||
environment.variables = {
|
||||
EDITOR = "nano";
|
||||
};
|
||||
|
||||
programs.git = {
|
||||
enable = true;
|
||||
lfs.enable = true;
|
||||
|
@@ -1,10 +0,0 @@
|
||||
{ lib, config, ... }:
|
||||
{
|
||||
options.promptEmoji = lib.mkOption {
|
||||
type = lib.types.str;
|
||||
};
|
||||
|
||||
config.programs.bash.promptInit = ''
|
||||
PS1="\[\e]0;\u@\h: \w\a\]\n${config.promptEmoji} \[\033[1;$((UID ? 32 : 31))m\]\w \\$\[\033[0m\] "
|
||||
'';
|
||||
}
|
Reference in New Issue
Block a user