Compare commits
65 Commits
install_fi
...
f036ec4b96
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
f036ec4b96 | ||
|
|
74ee87a111 | ||
|
|
d0f23c0cb1 | ||
|
|
c72141e070 | ||
|
|
e77c0ed330 | ||
|
|
70c2fb694a | ||
|
|
b32635fe71 | ||
|
|
b179bee277 | ||
|
|
b1c85417e1 | ||
|
|
96ea6c4232 | ||
|
|
2a584915e4 | ||
|
|
a6a50d7c22 | ||
|
|
edfafd1017 | ||
|
|
9adff4ebc1 | ||
|
|
a788879d92 | ||
|
|
955c5963c8 | ||
|
|
11436c0efe | ||
|
|
5b487330e1 | ||
|
|
d25e9173dd | ||
|
|
8bddf10e9d | ||
|
|
64c94e9b06 | ||
|
|
c87957b8cb | ||
|
|
bf419b6f4a | ||
|
|
b224a78b89 | ||
|
|
748584c78e | ||
|
|
64e8903ae4 | ||
|
|
f4338ec8df | ||
|
|
c947def321 | ||
|
|
f1eaaf12b3 | ||
|
|
2b485f7f1d | ||
|
|
6db8e01309 | ||
|
|
03e389195c | ||
|
|
2c3e5483e9 | ||
|
|
6b42a09468 | ||
|
|
eb5815048f | ||
|
|
1cb4fa4234 | ||
|
|
146dc5f79a | ||
|
|
f667c9daa6 | ||
|
|
83eaba357f | ||
|
|
6284ce8d86 | ||
|
|
c26d6f34ea | ||
|
|
c3f715d010 | ||
|
|
45514d147c | ||
|
|
aafa880b7c | ||
|
|
dde8be4d9f | ||
|
|
03ae8d3b0a | ||
|
|
03f0721e1f | ||
|
|
8847063948 | ||
|
|
399379cea0 | ||
|
|
1cdfebf392 | ||
|
|
045fed0748 | ||
|
|
7fe153bfd3 | ||
|
|
52490457f0 | ||
|
|
e5e9bba2a5 | ||
|
|
7ef079afc0 | ||
|
|
a06fece8f1 | ||
|
|
51c7888347 | ||
|
|
7656c30a29 | ||
|
|
929401b359 | ||
|
|
16746d58d2 | ||
|
|
82a016ec68 | ||
|
|
eed2bd4f13 | ||
|
|
99f1b1a51b | ||
|
|
99bc8c6d79 | ||
|
|
0f2c595538 |
@@ -8,6 +8,7 @@
|
||||
lg = log --color --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --abbrev-commit
|
||||
bh = log --oneline --branches=* --remotes=* --graph --decorate
|
||||
amend = commit --amend --no-edit
|
||||
authorcount = shortlog --summary --numbered --all --no-merges
|
||||
[core]
|
||||
excludesfile = ~/.gitignore_global
|
||||
[commit]
|
||||
|
||||
@@ -8,6 +8,7 @@
|
||||
lg = log --color --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --abbrev-commit
|
||||
bh = log --oneline --branches=* --remotes=* --graph --decorate
|
||||
amend = commit --amend --no-edit
|
||||
authorcount = shortlog --summary --numbered --all --no-merges
|
||||
[core]
|
||||
excludesfile = ~/.gitignore_global
|
||||
[commit]
|
||||
|
||||
@@ -2,7 +2,6 @@
|
||||
config,
|
||||
lib,
|
||||
pkgs,
|
||||
home-manager,
|
||||
...
|
||||
}:
|
||||
|
||||
@@ -10,12 +9,15 @@
|
||||
imports = [
|
||||
./roles/2ship2harkinian
|
||||
./roles/alacritty
|
||||
./roles/amd_s2idle
|
||||
./roles/ansible
|
||||
./roles/ares
|
||||
./roles/bluetooth
|
||||
./roles/boot
|
||||
./roles/chromecast
|
||||
./roles/chromium
|
||||
./roles/d2
|
||||
./roles/direnv
|
||||
./roles/distributed_build
|
||||
./roles/docker
|
||||
./roles/ecc
|
||||
@@ -47,16 +49,19 @@
|
||||
./roles/nvme
|
||||
./roles/optimized_build
|
||||
./roles/pcsx2
|
||||
./roles/podman
|
||||
./roles/python
|
||||
./roles/qemu
|
||||
./roles/reset
|
||||
./roles/rpcs3
|
||||
./roles/rust
|
||||
./roles/shadps4
|
||||
./roles/shikane
|
||||
./roles/shipwright
|
||||
./roles/sm64ex
|
||||
./roles/sops
|
||||
./roles/sound
|
||||
./roles/spaghettikart
|
||||
./roles/ssh
|
||||
./roles/steam
|
||||
./roles/steam_run_free
|
||||
@@ -76,10 +81,6 @@
|
||||
./util/unfree_polyfill
|
||||
];
|
||||
|
||||
me.install.user.talexander.file."/home/talexander/flake.nix" = {
|
||||
source = ./flake.nix;
|
||||
};
|
||||
|
||||
nix.settings.experimental-features = [
|
||||
"nix-command"
|
||||
"flakes"
|
||||
@@ -125,27 +126,14 @@
|
||||
];
|
||||
};
|
||||
users.groups.talexander.gid = 11235;
|
||||
home-manager.users.talexander =
|
||||
{ pkgs, ... }:
|
||||
{
|
||||
# The state version is required and should stay at the version you
|
||||
# originally installed.
|
||||
home.stateVersion = "24.11";
|
||||
};
|
||||
|
||||
home-manager.users.root =
|
||||
{ pkgs, ... }:
|
||||
{
|
||||
# The state version is required and should stay at the version you
|
||||
# originally installed.
|
||||
home.stateVersion = "24.11";
|
||||
};
|
||||
|
||||
# Automatic garbage collection
|
||||
nix.gc = lib.mkIf (!config.me.buildingIso) {
|
||||
# Runs nix-collect-garbage --delete-older-than 5d
|
||||
automatic = true;
|
||||
randomizedDelaySec = "14m";
|
||||
persistent = true;
|
||||
dates = "monthly";
|
||||
# randomizedDelaySec = "14m";
|
||||
options = "--delete-older-than 30d";
|
||||
};
|
||||
nix.settings.auto-optimise-store = !config.me.buildingIso;
|
||||
@@ -174,7 +162,7 @@
|
||||
pciutils # for lspci
|
||||
ripgrep
|
||||
strace
|
||||
ltrace
|
||||
# ltrace # Disabled because it uses more than 48GB of /tmp space during test phase.
|
||||
trace-cmd # ftrace
|
||||
tcpdump
|
||||
git-crypt
|
||||
|
||||
51
nix/configuration/flake.lock
generated
51
nix/configuration/flake.lock
generated
@@ -39,11 +39,11 @@
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1746729224,
|
||||
"narHash": "sha256-9R4sOLAK1w3Bq54H3XOJogdc7a6C2bLLmatOQ+5pf5w=",
|
||||
"lastModified": 1756733629,
|
||||
"narHash": "sha256-dwWGlDhcO5SMIvMSTB4mjQ5Pvo2vtxvpIknhVnSz2I8=",
|
||||
"owner": "nix-community",
|
||||
"repo": "disko",
|
||||
"rev": "85555d27ded84604ad6657ecca255a03fd878607",
|
||||
"rev": "a5c4f2ab72e3d1ab43e3e65aa421c6f2bd2e12a1",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
@@ -147,26 +147,6 @@
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"home-manager": {
|
||||
"inputs": {
|
||||
"nixpkgs": [
|
||||
"nixpkgs"
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1746981801,
|
||||
"narHash": "sha256-+Bfr0KqZV6gZdA7e2kupeoawozaLIHLuiPtC54uxbFc=",
|
||||
"owner": "nix-community",
|
||||
"repo": "home-manager",
|
||||
"rev": "ff915842e4a2e63c4c8c5c08c6870b9d5b3c3ee9",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "nix-community",
|
||||
"repo": "home-manager",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"impermanence": {
|
||||
"locked": {
|
||||
"lastModified": 1737831083,
|
||||
@@ -210,11 +190,11 @@
|
||||
},
|
||||
"nixpkgs": {
|
||||
"locked": {
|
||||
"lastModified": 1746663147,
|
||||
"narHash": "sha256-Ua0drDHawlzNqJnclTJGf87dBmaO/tn7iZ+TCkTRpRc=",
|
||||
"lastModified": 1756787288,
|
||||
"narHash": "sha256-rw/PHa1cqiePdBxhF66V7R+WAP8WekQ0mCDG4CFqT8Y=",
|
||||
"owner": "NixOS",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "dda3dcd3fe03e991015e9a74b22d35950f264a54",
|
||||
"rev": "d0fc30899600b9b3466ddb260fd83deb486c32f1",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
@@ -224,19 +204,19 @@
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"nixpkgs-b93b4e9b5": {
|
||||
"nixpkgs-dda3dcd3f": {
|
||||
"locked": {
|
||||
"lastModified": 1713721570,
|
||||
"narHash": "sha256-R0s+O5UjTePQRb72XPgtkTmEiOOW8n+1q9Gxt/OJnKU=",
|
||||
"lastModified": 1746663147,
|
||||
"narHash": "sha256-Ua0drDHawlzNqJnclTJGf87dBmaO/tn7iZ+TCkTRpRc=",
|
||||
"owner": "NixOS",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "b93b4e9b527904aadf52dba6ca35efde2067cbd4",
|
||||
"rev": "dda3dcd3fe03e991015e9a74b22d35950f264a54",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "NixOS",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "b93b4e9b527904aadf52dba6ca35efde2067cbd4",
|
||||
"rev": "dda3dcd3fe03e991015e9a74b22d35950f264a54",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
@@ -258,11 +238,11 @@
|
||||
},
|
||||
"nixpkgs-unoptimized": {
|
||||
"locked": {
|
||||
"lastModified": 1746663147,
|
||||
"narHash": "sha256-Ua0drDHawlzNqJnclTJGf87dBmaO/tn7iZ+TCkTRpRc=",
|
||||
"lastModified": 1756787288,
|
||||
"narHash": "sha256-rw/PHa1cqiePdBxhF66V7R+WAP8WekQ0mCDG4CFqT8Y=",
|
||||
"owner": "NixOS",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "dda3dcd3fe03e991015e9a74b22d35950f264a54",
|
||||
"rev": "d0fc30899600b9b3466ddb260fd83deb486c32f1",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
@@ -303,11 +283,10 @@
|
||||
"inputs": {
|
||||
"ansible-sshjail": "ansible-sshjail",
|
||||
"disko": "disko",
|
||||
"home-manager": "home-manager",
|
||||
"impermanence": "impermanence",
|
||||
"lanzaboote": "lanzaboote",
|
||||
"nixpkgs": "nixpkgs",
|
||||
"nixpkgs-b93b4e9b5": "nixpkgs-b93b4e9b5",
|
||||
"nixpkgs-dda3dcd3f": "nixpkgs-dda3dcd3f",
|
||||
"nixpkgs-unoptimized": "nixpkgs-unoptimized",
|
||||
"zsh-histdb": "zsh-histdb"
|
||||
}
|
||||
|
||||
@@ -43,10 +43,8 @@
|
||||
inputs = {
|
||||
impermanence.url = "github:nix-community/impermanence";
|
||||
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
|
||||
nixpkgs-b93b4e9b5.url = "github:NixOS/nixpkgs/b93b4e9b527904aadf52dba6ca35efde2067cbd4";
|
||||
nixpkgs-dda3dcd3f.url = "github:NixOS/nixpkgs/dda3dcd3fe03e991015e9a74b22d35950f264a54";
|
||||
nixpkgs-unoptimized.url = "github:NixOS/nixpkgs/nixos-unstable";
|
||||
home-manager.url = "github:nix-community/home-manager";
|
||||
home-manager.inputs.nixpkgs.follows = "nixpkgs";
|
||||
lanzaboote = {
|
||||
url = "github:nix-community/lanzaboote/v0.4.2";
|
||||
|
||||
@@ -76,9 +74,8 @@
|
||||
self,
|
||||
nixpkgs,
|
||||
nixpkgs-unoptimized,
|
||||
nixpkgs-b93b4e9b5,
|
||||
nixpkgs-dda3dcd3f,
|
||||
impermanence,
|
||||
home-manager,
|
||||
lanzaboote,
|
||||
zsh-histdb,
|
||||
ansible-sshjail,
|
||||
@@ -88,7 +85,7 @@
|
||||
base_x86_64_linux = rec {
|
||||
system = "x86_64-linux";
|
||||
specialArgs = {
|
||||
pkgs-b93b4e9b5 = import nixpkgs-b93b4e9b5 {
|
||||
pkgs-dda3dcd3f = import nixpkgs-dda3dcd3f {
|
||||
inherit system;
|
||||
};
|
||||
pkgs-unoptimized = import nixpkgs-unoptimized {
|
||||
@@ -99,13 +96,8 @@
|
||||
};
|
||||
modules = [
|
||||
impermanence.nixosModules.impermanence
|
||||
home-manager.nixosModules.home-manager
|
||||
lanzaboote.nixosModules.lanzaboote
|
||||
inputs.disko.nixosModules.disko
|
||||
{
|
||||
home-manager.useGlobalPkgs = true;
|
||||
home-manager.useUserPackages = true;
|
||||
}
|
||||
{
|
||||
nixpkgs.overlays = [
|
||||
zsh-histdb.overlays.default
|
||||
|
||||
@@ -14,6 +14,6 @@ nix flake update zsh-histdb --flake "$DIR/../../"
|
||||
nix flake update ansible-sshjail --flake "$DIR/../../"
|
||||
for f in /persist/manual/manual_add_to_store/*; do nix-store --add-fixed sha256 "$f"; done
|
||||
|
||||
nixos-rebuild boot --flake "$DIR/../../#hydra" --target-host "$TARGET" --build-host "$TARGET" --fast --use-remote-sudo --max-jobs "$JOBS" "${@}" |& nom
|
||||
nixos-rebuild boot --flake "$DIR/../../#hydra" --target-host "$TARGET" --build-host "$TARGET" --fast --use-remote-sudo --max-jobs "$JOBS" --log-format internal-json -v "${@}" |& nom --json
|
||||
|
||||
# rsync -av --progress --delete --exclude=.git "$DIR/../../../configuration" "talexander@${TARGET}:/persist/manual/" && ssh talexander@${TARGET} 'cd /persist/manual/configuration && nix flake update zsh-histdb && nix flake update ansible-sshjail && doas nice -n 19 nixos-rebuild boot --flake /persist/manual/configuration#hydra'
|
||||
|
||||
@@ -14,6 +14,6 @@ nix flake update zsh-histdb --flake "$DIR/../../"
|
||||
nix flake update ansible-sshjail --flake "$DIR/../../"
|
||||
for f in /persist/manual/manual_add_to_store/*; do nix-store --add-fixed sha256 "$f"; done
|
||||
|
||||
nixos-rebuild switch --flake "$DIR/../../#hydra" --target-host "$TARGET" --build-host "$TARGET" --fast --use-remote-sudo --max-jobs "$JOBS" "${@}" |& nom
|
||||
nixos-rebuild switch --flake "$DIR/../../#hydra" --target-host "$TARGET" --build-host "$TARGET" --fast --use-remote-sudo --max-jobs "$JOBS" --log-format internal-json -v "${@}" |& nom --json
|
||||
|
||||
# rsync -av --progress --delete --exclude=.git "$DIR/../../../configuration" "talexander@${TARGET}:/persist/manual/" && ssh talexander@${TARGET} 'cd /persist/manual/configuration && nix flake update zsh-histdb && nix flake update ansible-sshjail && doas nice -n 19 nixos-rebuild switch --flake /persist/manual/configuration#hydra'
|
||||
|
||||
@@ -9,4 +9,4 @@ DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
|
||||
nix flake update zsh-histdb --flake "$DIR/../../"
|
||||
nix flake update ansible-sshjail --flake "$DIR/../../"
|
||||
for f in /persist/manual/manual_add_to_store/*; do nix-store --add-fixed sha256 "$f"; done
|
||||
nix build --extra-experimental-features nix-command --extra-experimental-features flakes "$DIR/../..#iso.hydra" --max-jobs "$JOBS" "${@}" |& nom
|
||||
nix build --extra-experimental-features nix-command --extra-experimental-features flakes "$DIR/../..#iso.hydra" --max-jobs "$JOBS" --log-format internal-json -v "${@}" |& nom --json
|
||||
|
||||
@@ -14,6 +14,6 @@ nix flake update zsh-histdb --flake "$DIR/../../"
|
||||
nix flake update ansible-sshjail --flake "$DIR/../../"
|
||||
for f in /persist/manual/manual_add_to_store/*; do nix-store --add-fixed sha256 "$f"; done
|
||||
|
||||
nixos-rebuild boot --flake "$DIR/../../#ionlybootzfs" --target-host "$TARGET" --build-host "$TARGET" --fast --use-remote-sudo --max-jobs "$JOBS" "${@}" |& nom
|
||||
nixos-rebuild boot --flake "$DIR/../../#ionlybootzfs" --target-host "$TARGET" --build-host "$TARGET" --fast --use-remote-sudo --max-jobs "$JOBS" --log-format internal-json -v "${@}" |& nom --json
|
||||
|
||||
# rsync -av --progress --delete --exclude=.git "$DIR/../../../configuration" "talexander@${TARGET}:/persist/manual/" && ssh talexander@${TARGET} 'cd /persist/manual/configuration && nix flake update zsh-histdb && nix flake update ansible-sshjail && doas nice -n 19 nixos-rebuild boot --flake /persist/manual/configuration#ionlybootzfs'
|
||||
|
||||
@@ -14,6 +14,6 @@ nix flake update zsh-histdb --flake "$DIR/../../"
|
||||
nix flake update ansible-sshjail --flake "$DIR/../../"
|
||||
for f in /persist/manual/manual_add_to_store/*; do nix-store --add-fixed sha256 "$f"; done
|
||||
|
||||
nixos-rebuild switch --flake "$DIR/../../#ionlybootzfs" --target-host "$TARGET" --build-host "$TARGET" --fast --use-remote-sudo --max-jobs "$JOBS" "${@}" |& nom
|
||||
nixos-rebuild switch --flake "$DIR/../../#ionlybootzfs" --target-host "$TARGET" --build-host "$TARGET" --fast --use-remote-sudo --max-jobs "$JOBS" --log-format internal-json -v "${@}" |& nom --json
|
||||
|
||||
# rsync -av --progress --delete --exclude=.git "$DIR/../../../configuration" "talexander@${TARGET}:/persist/manual/" && ssh talexander@${TARGET} 'cd /persist/manual/configuration && nix flake update zsh-histdb && nix flake update ansible-sshjail && doas nice -n 19 nixos-rebuild switch --flake /persist/manual/configuration#ionlybootzfs'
|
||||
|
||||
@@ -9,4 +9,4 @@ DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
|
||||
nix flake update zsh-histdb --flake "$DIR/../../"
|
||||
nix flake update ansible-sshjail --flake "$DIR/../../"
|
||||
for f in /persist/manual/manual_add_to_store/*; do nix-store --add-fixed sha256 "$f"; done
|
||||
nix build --extra-experimental-features nix-command --extra-experimental-features flakes "$DIR/../..#iso.ionlybootzfs" --max-jobs "$JOBS" "${@}" |& nom
|
||||
nix build --extra-experimental-features nix-command --extra-experimental-features flakes "$DIR/../..#iso.ionlybootzfs" --max-jobs "$JOBS" --log-format internal-json -v "${@}" |& nom --json
|
||||
|
||||
@@ -14,6 +14,6 @@ nix flake update zsh-histdb --flake "$DIR/../../"
|
||||
nix flake update ansible-sshjail --flake "$DIR/../../"
|
||||
for f in /persist/manual/manual_add_to_store/*; do nix-store --add-fixed sha256 "$f"; done
|
||||
|
||||
nixos-rebuild boot --flake "$DIR/../../#neelix" --target-host "$TARGET" --build-host "$TARGET" --fast --use-remote-sudo --max-jobs "$JOBS" "${@}" |& nom
|
||||
nixos-rebuild boot --flake "$DIR/../../#neelix" --target-host "$TARGET" --build-host "$TARGET" --fast --use-remote-sudo --max-jobs "$JOBS" --log-format internal-json -v "${@}" |& nom --json
|
||||
|
||||
# rsync -av --progress --delete --exclude=.git "$DIR/../../../configuration" "talexander@${TARGET}:/persist/manual/" && ssh talexander@${TARGET} 'cd /persist/manual/configuration && nix flake update zsh-histdb && nix flake update ansible-sshjail && doas nice -n 19 nixos-rebuild boot --flake /persist/manual/configuration#neelix'
|
||||
|
||||
@@ -14,6 +14,6 @@ nix flake update zsh-histdb --flake "$DIR/../../"
|
||||
nix flake update ansible-sshjail --flake "$DIR/../../"
|
||||
for f in /persist/manual/manual_add_to_store/*; do nix-store --add-fixed sha256 "$f"; done
|
||||
|
||||
nixos-rebuild switch --flake "$DIR/../../#neelix" --target-host "$TARGET" --build-host "$TARGET" --fast --use-remote-sudo --max-jobs "$JOBS" "${@}" |& nom
|
||||
nixos-rebuild switch --flake "$DIR/../../#neelix" --target-host "$TARGET" --build-host "$TARGET" --fast --use-remote-sudo --max-jobs "$JOBS" --log-format internal-json -v "${@}" |& nom --json
|
||||
|
||||
# rsync -av --progress --delete --exclude=.git "$DIR/../../../configuration" "talexander@${TARGET}:/persist/manual/" && ssh talexander@${TARGET} 'cd /persist/manual/configuration && nix flake update zsh-histdb && nix flake update ansible-sshjail && doas nice -n 19 nixos-rebuild switch --flake /persist/manual/configuration#neelix'
|
||||
|
||||
@@ -14,6 +14,6 @@ nix flake update zsh-histdb --flake "$DIR/../../"
|
||||
nix flake update ansible-sshjail --flake "$DIR/../../"
|
||||
for f in /persist/manual/manual_add_to_store/*; do nix-store --add-fixed sha256 "$f"; done
|
||||
|
||||
nixos-rebuild boot --flake "$DIR/../../#odo" --target-host "$TARGET" --build-host "$TARGET" --fast --use-remote-sudo --max-jobs "$JOBS" "${@}" |& nom
|
||||
nixos-rebuild boot --flake "$DIR/../../#odo" --target-host "$TARGET" --build-host "$TARGET" --fast --use-remote-sudo --max-jobs "$JOBS" --log-format internal-json -v "${@}" |& nom --json
|
||||
|
||||
# rsync -av --progress --delete --exclude=.git "$DIR/../../../configuration" "talexander@${TARGET}:/persist/manual/" && ssh talexander@${TARGET} 'cd /persist/manual/configuration && nix flake update zsh-histdb && nix flake update ansible-sshjail && doas nice -n 19 nixos-rebuild boot --flake /persist/manual/configuration#odo'
|
||||
|
||||
@@ -14,6 +14,6 @@ nix flake update zsh-histdb --flake "$DIR/../../"
|
||||
nix flake update ansible-sshjail --flake "$DIR/../../"
|
||||
for f in /persist/manual/manual_add_to_store/*; do nix-store --add-fixed sha256 "$f"; done
|
||||
|
||||
nixos-rebuild switch --flake "$DIR/../../#odo" --target-host "$TARGET" --build-host "$TARGET" --fast --use-remote-sudo --max-jobs "$JOBS" "${@}" |& nom
|
||||
nixos-rebuild switch --flake "$DIR/../../#odo" --target-host "$TARGET" --build-host "$TARGET" --fast --use-remote-sudo --max-jobs "$JOBS" --log-format internal-json -v "${@}" |& nom --json
|
||||
|
||||
# rsync -av --progress --delete --exclude=.git "$DIR/../../../configuration" "talexander@${TARGET}:/persist/manual/" && ssh talexander@${TARGET} 'cd /persist/manual/configuration && nix flake update zsh-histdb && nix flake update ansible-sshjail && doas nice -n 19 nixos-rebuild switch --flake /persist/manual/configuration#odo'
|
||||
|
||||
@@ -9,4 +9,4 @@ DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
|
||||
nix flake update zsh-histdb --flake "$DIR/../../"
|
||||
nix flake update ansible-sshjail --flake "$DIR/../../"
|
||||
for f in /persist/manual/manual_add_to_store/*; do nix-store --add-fixed sha256 "$f"; done
|
||||
nix build --extra-experimental-features nix-command --extra-experimental-features flakes "$DIR/../..#iso.odo" --max-jobs "$JOBS" "${@}" |& nom
|
||||
nix build --extra-experimental-features nix-command --extra-experimental-features flakes "$DIR/../..#iso.odo" --max-jobs "$JOBS" --log-format internal-json -v "${@}" |& nom --json
|
||||
|
||||
@@ -9,4 +9,4 @@ DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
|
||||
nix flake update zsh-histdb --flake "$DIR/../../"
|
||||
nix flake update ansible-sshjail --flake "$DIR/../../"
|
||||
for f in /persist/manual/manual_add_to_store/*; do nix-store --add-fixed sha256 "$f"; done
|
||||
nixos-rebuild boot --show-trace --use-remote-sudo --max-jobs "$JOBS" --flake "$DIR/../../#odo" "${@}" |& nom
|
||||
nixos-rebuild boot --show-trace --use-remote-sudo --max-jobs "$JOBS" --flake "$DIR/../../#odo" --log-format internal-json -v "${@}" |& nom --json
|
||||
|
||||
@@ -9,4 +9,4 @@ DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
|
||||
nix flake update zsh-histdb --flake "$DIR/../../"
|
||||
nix flake update ansible-sshjail --flake "$DIR/../../"
|
||||
for f in /persist/manual/manual_add_to_store/*; do nix-store --add-fixed sha256 "$f"; done
|
||||
nixos-rebuild build --show-trace --use-remote-sudo --max-jobs "$JOBS" --flake "$DIR/../../#odo" "${@}" |& nom
|
||||
nixos-rebuild build --show-trace --use-remote-sudo --max-jobs "$JOBS" --flake "$DIR/../../#odo" --log-format internal-json -v "${@}" |& nom --json
|
||||
|
||||
@@ -9,4 +9,4 @@ DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
|
||||
nix flake update zsh-histdb --flake "$DIR/../../"
|
||||
nix flake update ansible-sshjail --flake "$DIR/../../"
|
||||
for f in /persist/manual/manual_add_to_store/*; do nix-store --add-fixed sha256 "$f"; done
|
||||
nixos-rebuild switch --show-trace --use-remote-sudo --max-jobs "$JOBS" --flake "$DIR/../../#odo" "${@}" |& nom
|
||||
nixos-rebuild switch --show-trace --use-remote-sudo --max-jobs "$JOBS" --flake "$DIR/../../#odo" --log-format internal-json -v "${@}" |& nom --json
|
||||
|
||||
@@ -59,13 +59,16 @@
|
||||
# services.fstrim.enable = lib.mkDefault true;
|
||||
|
||||
me.alacritty.enable = true;
|
||||
me.amd_s2idle.enable = true;
|
||||
me.ansible.enable = true;
|
||||
me.ares.enable = true;
|
||||
me.bluetooth.enable = true;
|
||||
me.chromecast.enable = true;
|
||||
me.chromium.enable = true;
|
||||
me.docker.enable = true;
|
||||
me.ecc.enable = true;
|
||||
me.d2.enable = true;
|
||||
me.direnv.enable = true;
|
||||
me.docker.enable = false;
|
||||
me.ecc.enable = false;
|
||||
me.emacs_flavor = "full";
|
||||
me.firefox.enable = true;
|
||||
me.flux.enable = true;
|
||||
@@ -84,13 +87,16 @@
|
||||
me.media.enable = true;
|
||||
me.nix_index.enable = true;
|
||||
me.pcsx2.enable = true;
|
||||
me.podman.enable = true;
|
||||
me.python.enable = true;
|
||||
me.qemu.enable = true;
|
||||
me.rpcs3.enable = true;
|
||||
me.rust.enable = true;
|
||||
me.shadps4.enable = true;
|
||||
me.shikane.enable = true;
|
||||
me.sops.enable = true;
|
||||
me.sound.enable = true;
|
||||
me.spaghettikart.enable = true;
|
||||
me.steam.enable = true;
|
||||
me.steam_run_free.enable = true;
|
||||
me.sway.enable = true;
|
||||
|
||||
@@ -20,7 +20,7 @@
|
||||
# amd_pstate=guided :: Same as passive except we can set upper and lower frequency bounds.
|
||||
# amdgpu.dcdebugmask=0x10 :: Allegedly disables Panel Replay from https://community.frame.work/t/tracking-freezing-arch-linux-amd/39495/32
|
||||
boot.kernelParams = [
|
||||
"amdgpu.abmlevel=3"
|
||||
"amdgpu.abmlevel=2"
|
||||
"pcie_aspm=force"
|
||||
# "pcie_aspm.policy=powersupersave"
|
||||
"nowatchdog"
|
||||
@@ -47,6 +47,22 @@
|
||||
"w- /sys/devices/system/cpu/cpufreq/policy13/energy_performance_preference - - - - power"
|
||||
"w- /sys/devices/system/cpu/cpufreq/policy14/energy_performance_preference - - - - power"
|
||||
"w- /sys/devices/system/cpu/cpufreq/policy15/energy_performance_preference - - - - power"
|
||||
"w- /sys/devices/system/cpu/cpu0/cpufreq/boost - - - - 0"
|
||||
"w- /sys/devices/system/cpu/cpu1/cpufreq/boost - - - - 0"
|
||||
"w- /sys/devices/system/cpu/cpu2/cpufreq/boost - - - - 0"
|
||||
"w- /sys/devices/system/cpu/cpu3/cpufreq/boost - - - - 0"
|
||||
"w- /sys/devices/system/cpu/cpu4/cpufreq/boost - - - - 0"
|
||||
"w- /sys/devices/system/cpu/cpu5/cpufreq/boost - - - - 0"
|
||||
"w- /sys/devices/system/cpu/cpu6/cpufreq/boost - - - - 0"
|
||||
"w- /sys/devices/system/cpu/cpu7/cpufreq/boost - - - - 0"
|
||||
"w- /sys/devices/system/cpu/cpu8/cpufreq/boost - - - - 0"
|
||||
"w- /sys/devices/system/cpu/cpu9/cpufreq/boost - - - - 0"
|
||||
"w- /sys/devices/system/cpu/cpu10/cpufreq/boost - - - - 0"
|
||||
"w- /sys/devices/system/cpu/cpu11/cpufreq/boost - - - - 0"
|
||||
"w- /sys/devices/system/cpu/cpu12/cpufreq/boost - - - - 0"
|
||||
"w- /sys/devices/system/cpu/cpu13/cpufreq/boost - - - - 0"
|
||||
"w- /sys/devices/system/cpu/cpu14/cpufreq/boost - - - - 0"
|
||||
"w- /sys/devices/system/cpu/cpu15/cpufreq/boost - - - - 0"
|
||||
];
|
||||
|
||||
boot.extraModprobeConfig = ''
|
||||
|
||||
@@ -9,6 +9,6 @@
|
||||
imports = [ ];
|
||||
|
||||
systemd.tmpfiles.rules = [
|
||||
"w- /sys/class/backlight/amdgpu_bl1/brightness - - - - 85"
|
||||
"w- /sys/class/backlight/amdgpu_bl1/brightness - - - - 21845"
|
||||
];
|
||||
}
|
||||
|
||||
@@ -14,6 +14,6 @@ nix flake update zsh-histdb --flake "$DIR/../../"
|
||||
nix flake update ansible-sshjail --flake "$DIR/../../"
|
||||
for f in /persist/manual/manual_add_to_store/*; do nix-store --add-fixed sha256 "$f"; done
|
||||
|
||||
nixos-rebuild boot --flake "$DIR/../../#quark" --target-host "$TARGET" --build-host "$TARGET" --fast --use-remote-sudo --max-jobs "$JOBS" "${@}" |& nom
|
||||
nixos-rebuild boot --flake "$DIR/../../#quark" --target-host "$TARGET" --build-host "$TARGET" --fast --use-remote-sudo --max-jobs "$JOBS" --log-format internal-json -v "${@}" |& nom --json
|
||||
|
||||
# rsync -av --progress --delete --exclude=.git "$DIR/../../../configuration" "talexander@${TARGET}:/persist/manual/" && ssh talexander@${TARGET} 'cd /persist/manual/configuration && nix flake update zsh-histdb && nix flake update ansible-sshjail && doas nice -n 19 nixos-rebuild boot --flake /persist/manual/configuration#quark'
|
||||
|
||||
@@ -14,6 +14,6 @@ nix flake update zsh-histdb --flake "$DIR/../../"
|
||||
nix flake update ansible-sshjail --flake "$DIR/../../"
|
||||
for f in /persist/manual/manual_add_to_store/*; do nix-store --add-fixed sha256 "$f"; done
|
||||
|
||||
nixos-rebuild switch --flake "$DIR/../../#quark" --target-host "$TARGET" --build-host "$TARGET" --fast --use-remote-sudo --max-jobs "$JOBS" "${@}" |& nom
|
||||
nixos-rebuild switch --flake "$DIR/../../#quark" --target-host "$TARGET" --build-host "$TARGET" --fast --use-remote-sudo --max-jobs "$JOBS" --log-format internal-json -v "${@}" |& nom --json
|
||||
|
||||
# rsync -av --progress --delete --exclude=.git "$DIR/../../../configuration" "talexander@${TARGET}:/persist/manual/" && ssh talexander@${TARGET} 'cd /persist/manual/configuration && nix flake update zsh-histdb && nix flake update ansible-sshjail && doas nice -n 19 nixos-rebuild switch --flake /persist/manual/configuration#quark'
|
||||
|
||||
@@ -9,4 +9,4 @@ DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
|
||||
nix flake update zsh-histdb --flake "$DIR/../../"
|
||||
nix flake update ansible-sshjail --flake "$DIR/../../"
|
||||
for f in /persist/manual/manual_add_to_store/*; do nix-store --add-fixed sha256 "$f"; done
|
||||
nix build --extra-experimental-features nix-command --extra-experimental-features flakes "$DIR/../..#iso.quark" --max-jobs "$JOBS" "${@}" |& nom
|
||||
nix build --extra-experimental-features nix-command --extra-experimental-features flakes "$DIR/../..#iso.quark" --max-jobs "$JOBS" --log-format internal-json -v "${@}" |& nom --json
|
||||
|
||||
@@ -9,4 +9,4 @@ DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
|
||||
nix flake update zsh-histdb --flake "$DIR/../../"
|
||||
nix flake update ansible-sshjail --flake "$DIR/../../"
|
||||
for f in /persist/manual/manual_add_to_store/*; do nix-store --add-fixed sha256 "$f"; done
|
||||
nixos-rebuild boot --show-trace --use-remote-sudo --max-jobs "$JOBS" --flake "$DIR/../../#quark" "${@}" |& nom
|
||||
nixos-rebuild boot --show-trace --use-remote-sudo --max-jobs "$JOBS" --flake "$DIR/../../#quark" --log-format internal-json -v "${@}" |& nom --json
|
||||
|
||||
@@ -9,4 +9,4 @@ DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
|
||||
nix flake update zsh-histdb --flake "$DIR/../../"
|
||||
nix flake update ansible-sshjail --flake "$DIR/../../"
|
||||
for f in /persist/manual/manual_add_to_store/*; do nix-store --add-fixed sha256 "$f"; done
|
||||
nixos-rebuild build --show-trace --use-remote-sudo --max-jobs "$JOBS" --flake "$DIR/../../#quark" "${@}" |& nom
|
||||
nixos-rebuild build --show-trace --use-remote-sudo --max-jobs "$JOBS" --flake "$DIR/../../#quark" --log-format internal-json -v "${@}" |& nom --json
|
||||
|
||||
@@ -9,4 +9,4 @@ DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
|
||||
nix flake update zsh-histdb --flake "$DIR/../../"
|
||||
nix flake update ansible-sshjail --flake "$DIR/../../"
|
||||
for f in /persist/manual/manual_add_to_store/*; do nix-store --add-fixed sha256 "$f"; done
|
||||
nixos-rebuild switch --show-trace --use-remote-sudo --max-jobs "$JOBS" --flake "$DIR/../../#quark" "${@}" |& nom
|
||||
nixos-rebuild switch --show-trace --use-remote-sudo --max-jobs "$JOBS" --flake "$DIR/../../#quark" --log-format internal-json -v "${@}" |& nom --json
|
||||
|
||||
@@ -54,12 +54,15 @@
|
||||
me.rpcs3.config.Core."Use LLVM CPU" = "znver4";
|
||||
|
||||
me.alacritty.enable = true;
|
||||
me.amd_s2idle.enable = true;
|
||||
me.ansible.enable = true;
|
||||
me.ares.enable = true;
|
||||
me.bluetooth.enable = true;
|
||||
me.chromecast.enable = true;
|
||||
me.chromium.enable = true;
|
||||
me.docker.enable = true;
|
||||
me.d2.enable = true;
|
||||
me.direnv.enable = true;
|
||||
me.docker.enable = false;
|
||||
me.ecc.enable = true;
|
||||
me.emacs_flavor = "full";
|
||||
me.firefox.enable = true;
|
||||
@@ -80,13 +83,16 @@
|
||||
me.nix_index.enable = true;
|
||||
me.nix_worker.enable = true;
|
||||
me.pcsx2.enable = true;
|
||||
me.podman.enable = true;
|
||||
me.python.enable = true;
|
||||
me.qemu.enable = true;
|
||||
me.rpcs3.enable = true;
|
||||
me.rust.enable = true;
|
||||
me.shadps4.enable = true;
|
||||
me.shikane.enable = true;
|
||||
me.sops.enable = true;
|
||||
me.sound.enable = true;
|
||||
me.spaghettikart.enable = true;
|
||||
me.steam.enable = true;
|
||||
me.steam_run_free.enable = true;
|
||||
me.sway.enable = true;
|
||||
|
||||
@@ -24,13 +24,11 @@
|
||||
xdg-utils # for xdg-open
|
||||
];
|
||||
|
||||
home-manager.users.talexander =
|
||||
{ pkgs, ... }:
|
||||
{
|
||||
home.file.".config/alacritty/alacritty.toml" = {
|
||||
source = ./files/alacritty.toml;
|
||||
};
|
||||
me.install.user.talexander.file = {
|
||||
".config/alacritty/alacritty.toml" = {
|
||||
source = ./files/alacritty.toml;
|
||||
};
|
||||
};
|
||||
})
|
||||
]
|
||||
);
|
||||
|
||||
48
nix/configuration/roles/amd_s2idle/cysystemd.nix
Normal file
48
nix/configuration/roles/amd_s2idle/cysystemd.nix
Normal file
@@ -0,0 +1,48 @@
|
||||
{
|
||||
lib,
|
||||
pkgs,
|
||||
buildPythonPackage,
|
||||
fetchFromGitHub,
|
||||
pythonOlder,
|
||||
cython,
|
||||
pkg-config,
|
||||
setuptools,
|
||||
}:
|
||||
|
||||
let
|
||||
version = "1.6.3";
|
||||
in
|
||||
buildPythonPackage {
|
||||
pname = "cysystemd";
|
||||
inherit version;
|
||||
pyproject = true;
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "mosquito";
|
||||
repo = "cysystemd";
|
||||
tag = version;
|
||||
hash = "sha256-xumrQgoKfFeKdRQUIYXXiXEcNd76i4wo/EIDm8BN7oU=";
|
||||
};
|
||||
|
||||
disabled = pythonOlder "3.6";
|
||||
|
||||
build-system = [
|
||||
setuptools
|
||||
cython
|
||||
];
|
||||
|
||||
nativeBuildInputs = [
|
||||
pkg-config
|
||||
];
|
||||
|
||||
buildInputs = [ pkgs.systemd ];
|
||||
|
||||
pythonImportsCheck = [ "cysystemd" ];
|
||||
|
||||
meta = {
|
||||
description = "systemd wrapper on Cython";
|
||||
homepage = "https://github.com/mosquito/cysystemd";
|
||||
license = lib.licenses.asl20;
|
||||
platforms = lib.platforms.linux;
|
||||
};
|
||||
}
|
||||
47
nix/configuration/roles/amd_s2idle/default.nix
Normal file
47
nix/configuration/roles/amd_s2idle/default.nix
Normal file
@@ -0,0 +1,47 @@
|
||||
{
|
||||
config,
|
||||
lib,
|
||||
pkgs,
|
||||
...
|
||||
}:
|
||||
|
||||
{
|
||||
imports = [ ];
|
||||
|
||||
options.me = {
|
||||
amd_s2idle.enable = lib.mkOption {
|
||||
type = lib.types.bool;
|
||||
default = false;
|
||||
example = true;
|
||||
description = "Whether we want to install amd_s2idle.";
|
||||
};
|
||||
};
|
||||
|
||||
config = lib.mkIf config.me.amd_s2idle.enable (
|
||||
lib.mkMerge [
|
||||
{
|
||||
environment.systemPackages = with pkgs; [
|
||||
amd-debug-tools
|
||||
];
|
||||
nixpkgs.overlays = [
|
||||
(
|
||||
final: prev:
|
||||
let
|
||||
innerPackage = (final.callPackage ./package.nix { });
|
||||
in
|
||||
{
|
||||
amd-debug-tools = innerPackage;
|
||||
}
|
||||
)
|
||||
(final: prev: {
|
||||
pythonPackagesExtensions = prev.pythonPackagesExtensions ++ [
|
||||
(python-final: python-prev: {
|
||||
cysystemd = (python-final.callPackage ./cysystemd.nix { });
|
||||
})
|
||||
];
|
||||
})
|
||||
];
|
||||
}
|
||||
]
|
||||
);
|
||||
}
|
||||
58
nix/configuration/roles/amd_s2idle/package.nix
Normal file
58
nix/configuration/roles/amd_s2idle/package.nix
Normal file
@@ -0,0 +1,58 @@
|
||||
{
|
||||
lib,
|
||||
fetchgit,
|
||||
python3Packages,
|
||||
acpica-tools,
|
||||
ethtool,
|
||||
libdisplay-info,
|
||||
}:
|
||||
|
||||
let
|
||||
version = "0.2.7";
|
||||
in
|
||||
python3Packages.buildPythonApplication {
|
||||
pname = "amd-debug-tools";
|
||||
inherit version;
|
||||
pyproject = true;
|
||||
|
||||
build-system = with python3Packages; [
|
||||
setuptools
|
||||
setuptools-git-versioning
|
||||
setuptools-git
|
||||
pyudev
|
||||
];
|
||||
dependencies = with python3Packages; [
|
||||
cysystemd
|
||||
jinja2
|
||||
matplotlib
|
||||
pandas
|
||||
pyudev
|
||||
seaborn
|
||||
tabulate
|
||||
acpica-tools
|
||||
ethtool
|
||||
libdisplay-info
|
||||
];
|
||||
src = fetchgit {
|
||||
url = "https://git.kernel.org/pub/scm/linux/kernel/git/superm1/amd-debug-tools.git";
|
||||
tag = version;
|
||||
hash = "sha256-6X9cUKN0BkkKcYGU+YJYCGT+l5iUZDN+D8Fqq/ns98Q=";
|
||||
leaveDotGit = true;
|
||||
};
|
||||
|
||||
disabled = python3Packages.pythonOlder "3.7";
|
||||
|
||||
postPatch = ''
|
||||
substituteInPlace pyproject.toml \
|
||||
--replace-fail ', "setuptools-git-versioning>=2.0,<3"' ""
|
||||
'';
|
||||
|
||||
pythonImportsCheck = [ "amd_debug" ];
|
||||
|
||||
meta = {
|
||||
description = "Debug tools for AMD zen systems";
|
||||
homepage = "https://git.kernel.org/pub/scm/linux/kernel/git/superm1/amd-debug-tools.git/";
|
||||
license = lib.licenses.mit;
|
||||
platforms = lib.platforms.linux;
|
||||
};
|
||||
}
|
||||
@@ -22,7 +22,7 @@
|
||||
{ }
|
||||
(lib.mkIf config.me.graphical {
|
||||
environment.systemPackages = with pkgs; [
|
||||
(chromium.override { enableWideVine = true; })
|
||||
chromium
|
||||
];
|
||||
allowedUnfree = [
|
||||
"chromium"
|
||||
@@ -57,8 +57,18 @@
|
||||
};
|
||||
};
|
||||
|
||||
# Enabling vulkan causes video to render as white
|
||||
# nixpkgs.config.chromium.commandLineArgs = "--enable-features=Vulkan";
|
||||
nixpkgs.overlays = [
|
||||
(final: prev: {
|
||||
chromium = prev.chromium.override {
|
||||
enableWideVine = true;
|
||||
commandLineArgs = [
|
||||
"--enable-features=VaapiVideoDecoder,VaapiIgnoreDriverChecks,Vulkan,DefaultANGLEVulkan,VulkanFromANGLE,AcceleratedVideoEncoder"
|
||||
# Enabling vulkan causes video to render as white
|
||||
# "--enable-features=Vulkan";
|
||||
];
|
||||
};
|
||||
})
|
||||
];
|
||||
})
|
||||
]
|
||||
);
|
||||
|
||||
29
nix/configuration/roles/d2/default.nix
Normal file
29
nix/configuration/roles/d2/default.nix
Normal file
@@ -0,0 +1,29 @@
|
||||
{
|
||||
config,
|
||||
lib,
|
||||
pkgs,
|
||||
...
|
||||
}:
|
||||
|
||||
{
|
||||
imports = [ ];
|
||||
|
||||
options.me = {
|
||||
d2.enable = lib.mkOption {
|
||||
type = lib.types.bool;
|
||||
default = false;
|
||||
example = true;
|
||||
description = "Whether we want to install d2.";
|
||||
};
|
||||
};
|
||||
|
||||
config = lib.mkIf config.me.d2.enable (
|
||||
lib.mkMerge [
|
||||
{
|
||||
environment.systemPackages = with pkgs; [
|
||||
d2
|
||||
];
|
||||
}
|
||||
]
|
||||
);
|
||||
}
|
||||
55
nix/configuration/roles/direnv/default.nix
Normal file
55
nix/configuration/roles/direnv/default.nix
Normal file
@@ -0,0 +1,55 @@
|
||||
{
|
||||
config,
|
||||
lib,
|
||||
pkgs,
|
||||
...
|
||||
}:
|
||||
|
||||
let
|
||||
direnv_zsh_hook = pkgs.writeTextFile {
|
||||
name = "direnv_zsh_hook.zsh";
|
||||
text = ''
|
||||
eval "$(direnv hook zsh)"
|
||||
'';
|
||||
};
|
||||
in
|
||||
{
|
||||
imports = [ ];
|
||||
|
||||
options.me = {
|
||||
direnv.enable = lib.mkOption {
|
||||
type = lib.types.bool;
|
||||
default = false;
|
||||
example = true;
|
||||
description = "Whether we want to install direnv.";
|
||||
};
|
||||
};
|
||||
|
||||
config = lib.mkIf config.me.direnv.enable (
|
||||
lib.mkMerge [
|
||||
{
|
||||
environment.systemPackages = with pkgs; [
|
||||
direnv
|
||||
nix-direnv
|
||||
];
|
||||
|
||||
me.zsh.includes = [ direnv_zsh_hook ];
|
||||
|
||||
environment.persistence."/persist" = lib.mkIf (!config.me.buildingIso) {
|
||||
hideMounts = true;
|
||||
users.talexander = {
|
||||
directories = [
|
||||
{
|
||||
# List of allowed directories from `direnv allow`.
|
||||
directory = ".local/share/direnv";
|
||||
user = "talexander";
|
||||
group = "talexander";
|
||||
mode = "0755";
|
||||
}
|
||||
];
|
||||
};
|
||||
};
|
||||
}
|
||||
]
|
||||
);
|
||||
}
|
||||
@@ -19,6 +19,14 @@
|
||||
|
||||
config = lib.mkIf config.me.docker.enable (
|
||||
lib.mkMerge [
|
||||
{
|
||||
assertions = [
|
||||
{
|
||||
assertion = !config.me.podman.enable;
|
||||
message = "docker conflicts with podman";
|
||||
}
|
||||
];
|
||||
}
|
||||
{
|
||||
virtualisation.docker.enable = true;
|
||||
# Use docker activation
|
||||
|
||||
@@ -131,8 +131,10 @@ in
|
||||
final.cmake-language-server
|
||||
final.cmake # Used by cmake-language-server
|
||||
final.rust-analyzer
|
||||
final.nodePackages_latest.prettier # Format yaml, json, and JS
|
||||
final.prettier # Format yaml, json, and JS
|
||||
final.terraform-ls
|
||||
final.typescript-language-server
|
||||
final.tex
|
||||
]
|
||||
}
|
||||
'';
|
||||
@@ -140,14 +142,12 @@ in
|
||||
})
|
||||
];
|
||||
|
||||
home-manager.users.talexander =
|
||||
{ pkgs, ... }:
|
||||
{
|
||||
home.file.".config/emacs" = {
|
||||
source = ./files/emacs;
|
||||
recursive = true;
|
||||
};
|
||||
me.install.user.talexander.file = {
|
||||
".config/emacs" = {
|
||||
source = ./files/emacs;
|
||||
recursive = true;
|
||||
};
|
||||
};
|
||||
})
|
||||
(lib.mkIf (config.me.emacs_flavor == "plainmacs") {
|
||||
nixpkgs.overlays = [
|
||||
|
||||
16
nix/configuration/roles/emacs/files/emacs/elisp/lang-d2.el
Normal file
16
nix/configuration/roles/emacs/files/emacs/elisp/lang-d2.el
Normal file
@@ -0,0 +1,16 @@
|
||||
(defun d2-format-buffer ()
|
||||
"Run prettier."
|
||||
(interactive)
|
||||
(run-command-on-buffer "d2" "fmt" "-")
|
||||
)
|
||||
|
||||
(use-package d2-mode
|
||||
:commands (d2-mode)
|
||||
:hook (
|
||||
(d2-mode . (lambda ()
|
||||
;; (add-hook 'before-save-hook 'd2-format-buffer nil 'local)
|
||||
))
|
||||
)
|
||||
)
|
||||
|
||||
(provide 'lang-d2)
|
||||
@@ -1,6 +1,12 @@
|
||||
(require 'common-lsp)
|
||||
(require 'util-tree-sitter)
|
||||
|
||||
(defun js-format-buffer ()
|
||||
"Run prettier."
|
||||
(interactive)
|
||||
(run-command-on-buffer "prettier" "--stdin-filepath" buffer-file-name)
|
||||
)
|
||||
|
||||
(use-package json-ts-mode
|
||||
:ensure nil
|
||||
:pin manual
|
||||
@@ -113,10 +119,14 @@
|
||||
("\\.js\\'" . js-ts-mode)
|
||||
)
|
||||
:commands (js-ts-mode)
|
||||
:custom (
|
||||
(js-indent-level 2)
|
||||
)
|
||||
:hook (
|
||||
(js-ts-mode . (lambda ()
|
||||
(when-linux
|
||||
(eglot-ensure)
|
||||
(add-hook 'before-save-hook 'js-format-buffer nil 'local)
|
||||
)
|
||||
))
|
||||
)
|
||||
|
||||
@@ -87,4 +87,8 @@
|
||||
(use-package gnuplot)
|
||||
(use-package graphviz-dot-mode)
|
||||
|
||||
(use-package htmlize
|
||||
;; For syntax highlighting when exporting to HTML.
|
||||
)
|
||||
|
||||
(provide 'lang-org)
|
||||
|
||||
@@ -46,7 +46,7 @@
|
||||
(when rust-analyzer-command
|
||||
;; (add-to-list 'eglot-server-programs `(rust-ts-mode . (,rust-analyzer-command)))
|
||||
(add-to-list 'eglot-server-programs `(rust-ts-mode . (,rust-analyzer-command :initializationOptions (:imports (:granularity (:enforce t :group "item")
|
||||
:merge (:glob nil)
|
||||
:merge (:glob :json-false)
|
||||
:prefix "self")
|
||||
))))
|
||||
)
|
||||
|
||||
@@ -40,4 +40,6 @@
|
||||
|
||||
(require 'lang-cmake)
|
||||
|
||||
(require 'lang-d2)
|
||||
|
||||
(load-directory autoload-directory)
|
||||
|
||||
@@ -70,9 +70,12 @@
|
||||
# Allow sending dark mode preference to websites.
|
||||
# Allow sending timezone to websites.
|
||||
"privacy.fingerprintingProtection.overrides" =
|
||||
"+AllTargets,-CSSPrefersColorScheme,-JSDateTimeUTC,-CanvasExtractionBeforeUserInputIsBlocked";
|
||||
"+AllTargets,-CSSPrefersColorScheme,-JSDateTimeUTC,-CanvasExtractionBeforeUserInputIsBlocked,-CanvasImageExtractionPrompt";
|
||||
# Disable weather on new tab page
|
||||
"browser.newtabpage.activity-stream.showWeather" = false;
|
||||
# Disable AI stuff that wastes battery life
|
||||
"browser.ml.chat.enabled" = false;
|
||||
"browser.ml.enabled" = false;
|
||||
};
|
||||
# Check about:policies#documentation and https://mozilla.github.io/policy-templates/ for options.
|
||||
policies = {
|
||||
|
||||
@@ -5,6 +5,18 @@
|
||||
...
|
||||
}:
|
||||
|
||||
let
|
||||
git_wrapped =
|
||||
package: prog:
|
||||
pkgs.writeShellScriptBin "${prog}" ''
|
||||
export PATH="${
|
||||
lib.makeBinPath [
|
||||
pkgs.meld
|
||||
]
|
||||
}:$PATH"
|
||||
exec ${package}/bin/${prog} "''${@}"
|
||||
'';
|
||||
in
|
||||
{
|
||||
imports = [ ];
|
||||
|
||||
@@ -20,66 +32,48 @@
|
||||
config = lib.mkMerge [
|
||||
{
|
||||
environment.systemPackages = with pkgs; [
|
||||
git
|
||||
my_git
|
||||
];
|
||||
}
|
||||
(lib.mkIf (config.me.git.config != null) {
|
||||
home-manager.users.talexander =
|
||||
{ pkgs, ... }:
|
||||
{
|
||||
home.file.".gitconfig" = {
|
||||
source = config.me.git.config;
|
||||
};
|
||||
me.install.user.talexander.file = {
|
||||
".gitconfig" = {
|
||||
source = config.me.git.config;
|
||||
};
|
||||
};
|
||||
})
|
||||
(lib.mkIf (config.me.graphical) {
|
||||
nixpkgs.overlays = [
|
||||
(final: prev: {
|
||||
my_git = (
|
||||
pkgs.buildEnv {
|
||||
name = prev.git.name;
|
||||
version = prev.git.version;
|
||||
paths =
|
||||
(builtins.map (git_wrapped prev.git) [
|
||||
"git"
|
||||
])
|
||||
++ [
|
||||
prev.git
|
||||
];
|
||||
extraOutputsToInstall = [
|
||||
"man"
|
||||
"doc"
|
||||
"info"
|
||||
];
|
||||
nativeBuildInputs = [ final.makeWrapper ];
|
||||
ignoreCollisions = true;
|
||||
}
|
||||
);
|
||||
})
|
||||
];
|
||||
})
|
||||
(lib.mkIf (!config.me.graphical) {
|
||||
nixpkgs.overlays = [
|
||||
(final: prev: {
|
||||
my_git = prev.git;
|
||||
})
|
||||
];
|
||||
})
|
||||
# (lib.mkIf (config.me.graphical) {
|
||||
# nixpkgs.overlays = [
|
||||
# (final: prev: {
|
||||
# git = pkgs.buildEnv {
|
||||
# name = prev.git.name;
|
||||
# paths = [
|
||||
# prev.git
|
||||
# ];
|
||||
# extraOutputsToInstall = [
|
||||
# "man"
|
||||
# "doc"
|
||||
# "info"
|
||||
# ];
|
||||
# buildInputs = [ final.makeWrapper ];
|
||||
# postBuild = ''
|
||||
# wrapProgram $out/bin/git --prefix PATH : ${
|
||||
# lib.makeBinPath [
|
||||
# final.meld
|
||||
# ]
|
||||
# }
|
||||
# '';
|
||||
# };
|
||||
# })
|
||||
# ];
|
||||
# })
|
||||
# (lib.mkIf (!config.me.graphical) {
|
||||
# nixpkgs.overlays = [
|
||||
# (final: prev: {
|
||||
# git = pkgs.buildEnv {
|
||||
# name = prev.git.name;
|
||||
# paths = [
|
||||
# prev.git
|
||||
# ];
|
||||
# extraOutputsToInstall = [
|
||||
# "man"
|
||||
# "doc"
|
||||
# "info"
|
||||
# ];
|
||||
# buildInputs = [ final.makeWrapper ];
|
||||
# postBuild = ''
|
||||
# wrapProgram $out/bin/git --prefix PATH : ${
|
||||
# lib.makeBinPath [
|
||||
# ]
|
||||
# }
|
||||
# '';
|
||||
# };
|
||||
# })
|
||||
# ];
|
||||
# })
|
||||
];
|
||||
}
|
||||
|
||||
@@ -8,6 +8,7 @@
|
||||
lg = log --color --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --abbrev-commit
|
||||
bh = log --oneline --branches=* --remotes=* --graph --decorate
|
||||
amend = commit --amend --no-edit
|
||||
authorcount = shortlog --summary --numbered --all --no-merges
|
||||
[core]
|
||||
excludesfile = ~/.gitignore_global
|
||||
[commit]
|
||||
@@ -50,4 +51,5 @@
|
||||
[rebase]
|
||||
autoSquash = true
|
||||
autoStash = true
|
||||
updateRefs = true
|
||||
# updateRefs was annoying when you want to split a branch in two by rebasing away from commits from one branch and rebasing away some commits from another branch.
|
||||
updateRefs = false
|
||||
|
||||
@@ -57,14 +57,11 @@ in
|
||||
# disable-ccid = true;
|
||||
# };
|
||||
|
||||
# .gnupg/scdaemon.conf
|
||||
home-manager.users.talexander =
|
||||
{ pkgs, ... }:
|
||||
{
|
||||
home.file.".gnupg/scdaemon.conf" = {
|
||||
source = ./files/scdaemon.conf;
|
||||
};
|
||||
me.install.user.talexander.file = {
|
||||
".gnupg/scdaemon.conf" = {
|
||||
source = ./files/scdaemon.conf;
|
||||
};
|
||||
};
|
||||
|
||||
# programs.gnupg.dirmngr.enable = true;
|
||||
programs.gnupg.agent = {
|
||||
|
||||
@@ -41,15 +41,11 @@ in
|
||||
exec_kanshi
|
||||
];
|
||||
|
||||
home-manager.users.talexander =
|
||||
{ pkgs, ... }:
|
||||
{
|
||||
home.file = {
|
||||
".config/kanshi/config" = {
|
||||
source = ./files/config_kanshi;
|
||||
};
|
||||
};
|
||||
me.install.user.talexander.file = {
|
||||
".config/kanshi/config" = {
|
||||
source = ./files/config_kanshi;
|
||||
};
|
||||
};
|
||||
})
|
||||
]
|
||||
);
|
||||
|
||||
@@ -78,21 +78,13 @@
|
||||
};
|
||||
};
|
||||
|
||||
home-manager.users.kodi =
|
||||
{ pkgs, ... }:
|
||||
{
|
||||
# home.file.".kodi/userdata/mediasources.xml".source = ./files/mediasources.xml;
|
||||
# home.file.".kodi/userdata/mediasources.xml".source = ./files/mediasources.xml;
|
||||
|
||||
# home.file.".kodi/userdata/addon_data/peripheral.joystick/resources/buttonmaps/xml/linux/DualSense_Wireless_Controller_13b_8a.xml".source =
|
||||
# ./files/DualSense_Wireless_Controller_13b_8a.xml;
|
||||
# home.file.".kodi/userdata/addon_data/peripheral.joystick/resources/buttonmaps/xml/linux/DualSense_Wireless_Controller_13b_8a.xml".source =
|
||||
# ./files/DualSense_Wireless_Controller_13b_8a.xml;
|
||||
|
||||
# TODO: Maybe .kodi/userdata/sources.xml
|
||||
# TODO: ./userdata/guisettings.xml:303: <setting id="filecache.memorysize">128</setting>
|
||||
|
||||
# The state version is required and should stay at the version you
|
||||
# originally installed.
|
||||
home.stateVersion = "24.11";
|
||||
};
|
||||
# TODO: Maybe .kodi/userdata/sources.xml
|
||||
# TODO: ./userdata/guisettings.xml:303: <setting id="filecache.memorysize">128</setting>
|
||||
})
|
||||
]
|
||||
);
|
||||
|
||||
@@ -5,22 +5,6 @@
|
||||
...
|
||||
}:
|
||||
|
||||
let
|
||||
tex = (
|
||||
pkgs.texlive.combine {
|
||||
inherit (pkgs.texlive)
|
||||
scheme-basic
|
||||
dvisvgm
|
||||
dvipng # for preview and export as html in org-mode
|
||||
wrapfig
|
||||
amsmath
|
||||
ulem
|
||||
hyperref
|
||||
capt-of
|
||||
;
|
||||
}
|
||||
);
|
||||
in
|
||||
{
|
||||
imports = [ ];
|
||||
|
||||
@@ -40,6 +24,35 @@ in
|
||||
tex
|
||||
];
|
||||
}
|
||||
{
|
||||
nixpkgs.overlays = [
|
||||
(final: prev: {
|
||||
tex = (
|
||||
pkgs.texlive.combine {
|
||||
inherit (pkgs.texlive)
|
||||
scheme-basic
|
||||
dvisvgm
|
||||
dvipng # for preview and export as html in org-mode
|
||||
wrapfig
|
||||
amsmath
|
||||
ulem
|
||||
hyperref
|
||||
capt-of
|
||||
svg # emacs org-mode pdf export
|
||||
catchfile # emacs org-mode pdf export
|
||||
xcolor # emacs org-mode pdf export
|
||||
transparent # emacs org-mode pdf export
|
||||
pgf # emacs org-mode pdf export
|
||||
minted # emacs org-mode pdf export code block highlighting
|
||||
upquote # emacs org-mode pdf export
|
||||
lineno # emacs org-mode pdf export
|
||||
;
|
||||
}
|
||||
);
|
||||
})
|
||||
];
|
||||
|
||||
}
|
||||
]
|
||||
);
|
||||
}
|
||||
|
||||
@@ -52,13 +52,11 @@ in
|
||||
imv
|
||||
];
|
||||
|
||||
home-manager.users.talexander =
|
||||
{ pkgs, ... }:
|
||||
{
|
||||
home.file.".config/mpv/mpv.conf" = {
|
||||
source = ./files/mpv.conf;
|
||||
};
|
||||
me.install.user.talexander.file = {
|
||||
".config/mpv/mpv.conf" = {
|
||||
source = ./files/mpv.conf;
|
||||
};
|
||||
};
|
||||
})
|
||||
(lib.mkIf (config.me.graphics_card_type == "amd" || config.me.graphics_card_type == "intel") {
|
||||
environment.systemPackages = with pkgs; [
|
||||
|
||||
@@ -8,10 +8,14 @@
|
||||
{
|
||||
imports = [ ];
|
||||
config = lib.mkMerge [
|
||||
{ }
|
||||
(lib.mkIf (config.me.buildingIso) {
|
||||
# boot.loader.systemd-boot.memtest86.enable = true;
|
||||
boot.loader.grub.memtest86.enable = true;
|
||||
})
|
||||
{
|
||||
environment.systemPackages = with pkgs; [
|
||||
memtest86plus
|
||||
];
|
||||
}
|
||||
# (lib.mkIf (config.me.buildingIso) {
|
||||
# boot.loader.systemd-boot.memtest86.enable = true;
|
||||
# boot.loader.grub.memtest86.enable = true;
|
||||
# })
|
||||
];
|
||||
}
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
config,
|
||||
lib,
|
||||
pkgs,
|
||||
pkgs-dda3dcd3f,
|
||||
...
|
||||
}:
|
||||
|
||||
@@ -64,6 +65,7 @@
|
||||
ldns # for drill
|
||||
arp-scan # To find devices on the network
|
||||
wavemon
|
||||
dhcpcd # For Android USB tethering.
|
||||
];
|
||||
|
||||
boot.extraModprobeConfig = ''
|
||||
@@ -91,4 +93,13 @@
|
||||
# This is enabled by default in nixos.
|
||||
# "net.ipv6.conf.default.use_tempaddr" = 2;
|
||||
};
|
||||
|
||||
# nixpkgs.overlays = [
|
||||
# (final: prev: {
|
||||
# inherit (pkgs-dda3dcd3f)
|
||||
# linux-firmware
|
||||
# ;
|
||||
# })
|
||||
# ];
|
||||
|
||||
}
|
||||
|
||||
@@ -47,7 +47,7 @@
|
||||
(lib.mkIf (!config.me.optimizations.enable) (
|
||||
lib.mkMerge [
|
||||
{
|
||||
boot.kernelPackages = pkgs.linuxPackagesFor pkgs.linux_6_14;
|
||||
boot.kernelPackages = pkgs.linuxPackagesFor pkgs.linux_6_16;
|
||||
}
|
||||
]
|
||||
))
|
||||
@@ -94,7 +94,7 @@
|
||||
HZ = lib.kernel.freeform "300";
|
||||
HZ_300 = lib.kernel.yes;
|
||||
HZ_1000 = lib.kernel.no;
|
||||
} prev.linux_6_14;
|
||||
} prev.linux_6_16;
|
||||
}
|
||||
)
|
||||
(final: prev: {
|
||||
@@ -126,12 +126,37 @@
|
||||
}
|
||||
);
|
||||
})
|
||||
# (final: prev: {
|
||||
# python = prev.python.override {
|
||||
# packageOverrides = python-final: python-prev: {
|
||||
# inherit (pkgs-unoptimized.pythonPackages) coverage;
|
||||
# };
|
||||
# };
|
||||
# })
|
||||
# (final: prev: {
|
||||
# pythonPackagesOverlays = prev.pythonPackagesOverlays.extend (
|
||||
# final': prev': {
|
||||
# inherit (pkgs-unoptimized.pythonPackagesOverlays)
|
||||
# coverage
|
||||
# ;
|
||||
# }
|
||||
# );
|
||||
# })
|
||||
# (final: prev: {
|
||||
# pythonPackagesExtensions = prev.pythonPackagesExtensions ++ [
|
||||
# (python-final: python-prev: {
|
||||
# inherit (pkgs-unoptimized.pythonPackages) coverage;
|
||||
# })
|
||||
# ];
|
||||
# })
|
||||
(final: prev: {
|
||||
inherit (pkgs-unoptimized)
|
||||
gsl
|
||||
redis
|
||||
valkey
|
||||
nix-serve-ng
|
||||
rapidjson
|
||||
assimp
|
||||
;
|
||||
})
|
||||
];
|
||||
|
||||
@@ -82,13 +82,11 @@
|
||||
};
|
||||
};
|
||||
|
||||
home-manager.users.talexander =
|
||||
{ pkgs, ... }:
|
||||
{
|
||||
home.file.".config/PCSX2/inis/PCSX2.ini" = {
|
||||
source = ./files/PCSX2.ini;
|
||||
};
|
||||
me.install.user.talexander.file = {
|
||||
".config/PCSX2/inis/PCSX2.ini" = {
|
||||
source = ./files/PCSX2.ini;
|
||||
};
|
||||
};
|
||||
})
|
||||
]
|
||||
);
|
||||
|
||||
80
nix/configuration/roles/podman/default.nix
Normal file
80
nix/configuration/roles/podman/default.nix
Normal file
@@ -0,0 +1,80 @@
|
||||
{
|
||||
config,
|
||||
lib,
|
||||
pkgs,
|
||||
...
|
||||
}:
|
||||
|
||||
{
|
||||
imports = [ ];
|
||||
|
||||
options.me = {
|
||||
podman.enable = lib.mkOption {
|
||||
type = lib.types.bool;
|
||||
default = false;
|
||||
example = true;
|
||||
description = "Whether we want to install podman.";
|
||||
};
|
||||
};
|
||||
|
||||
config = lib.mkIf config.me.podman.enable (
|
||||
lib.mkMerge [
|
||||
{
|
||||
assertions = [
|
||||
{
|
||||
assertion = !config.me.docker.enable;
|
||||
message = "podman conflicts with docker";
|
||||
}
|
||||
];
|
||||
}
|
||||
{
|
||||
environment.systemPackages = with pkgs; [
|
||||
dive
|
||||
podman-tui
|
||||
podman-compose
|
||||
];
|
||||
|
||||
# Write config files in /etc/containers
|
||||
virtualisation.containers.enable = true;
|
||||
# By default this includes "quay.io" which leads to prompting for which registry to download from.
|
||||
virtualisation.containers.registries.search = [ "docker.io" ];
|
||||
virtualisation = {
|
||||
podman = {
|
||||
enable = true;
|
||||
# Install docker shim
|
||||
dockerCompat = true;
|
||||
# Support name resolution in podman-compose.
|
||||
defaultNetwork.settings.dns_enabled = true;
|
||||
};
|
||||
};
|
||||
|
||||
environment.variables = {
|
||||
# For compatibility with tools expecting a docker socket (like dive).
|
||||
DOCKER_HOST = "unix://$XDG_RUNTIME_DIR/podman/podman.sock";
|
||||
};
|
||||
|
||||
environment.persistence."/state" = lib.mkIf (!config.me.buildingIso) {
|
||||
hideMounts = true;
|
||||
directories = [
|
||||
{
|
||||
directory = "/var/lib/containers";
|
||||
user = "root";
|
||||
group = "root";
|
||||
mode = "0755";
|
||||
}
|
||||
];
|
||||
users.talexander = {
|
||||
directories = [
|
||||
{
|
||||
directory = ".local/share/containers";
|
||||
user = "talexander";
|
||||
group = "talexander";
|
||||
mode = "0700";
|
||||
}
|
||||
];
|
||||
};
|
||||
};
|
||||
}
|
||||
]
|
||||
);
|
||||
}
|
||||
@@ -32,6 +32,21 @@
|
||||
isort
|
||||
black
|
||||
];
|
||||
|
||||
environment.persistence."/state" = lib.mkIf (!config.me.buildingIso) {
|
||||
hideMounts = true;
|
||||
users.talexander = {
|
||||
directories = [
|
||||
{
|
||||
# Poetry virtual environments.
|
||||
directory = ".cache/pypoetry";
|
||||
user = "talexander";
|
||||
group = "talexander";
|
||||
mode = "0755";
|
||||
}
|
||||
];
|
||||
};
|
||||
};
|
||||
}
|
||||
]
|
||||
);
|
||||
|
||||
@@ -70,16 +70,26 @@ in
|
||||
}
|
||||
];
|
||||
|
||||
home-manager.users.talexander =
|
||||
{ pkgs, ... }:
|
||||
{
|
||||
home.file.".config/rpcs3/config.yml" = lib.mkIf (config.me.rpcs3.config != null) {
|
||||
source = rpcs3_config_yaml;
|
||||
};
|
||||
home.file.".config/rpcs3/GuiConfigs/CurrentSettings.ini" = {
|
||||
source = ./files/CurrentSettings.ini;
|
||||
};
|
||||
me.install.user.talexander.file = {
|
||||
".config/rpcs3/config.yml" = lib.mkIf (config.me.rpcs3.config != null) {
|
||||
source = rpcs3_config_yaml;
|
||||
};
|
||||
".config/rpcs3/GuiConfigs/CurrentSettings.ini" = {
|
||||
source = ./files/CurrentSettings.ini;
|
||||
};
|
||||
".config/rpcs3/custom_configs/config_BLUS30443.yml" = {
|
||||
# Demon's Souls per-game config.
|
||||
source = ./files/config_BLUS30443.yml;
|
||||
};
|
||||
".config/rpcs3/patches/patch.yml" = {
|
||||
# All of the available patches.
|
||||
source = ./files/patch.yml;
|
||||
};
|
||||
".config/rpcs3/patch_config.yml" = {
|
||||
# Patches that I have enabled.
|
||||
source = ./files/patch_config.yml;
|
||||
};
|
||||
};
|
||||
|
||||
environment.persistence."/persist" = lib.mkIf (!config.me.buildingIso) {
|
||||
hideMounts = true;
|
||||
@@ -146,6 +156,13 @@ in
|
||||
mode = "0755";
|
||||
};
|
||||
}
|
||||
{
|
||||
# Netplay (RPCN) config and credentials
|
||||
file = ".config/rpcs3/rpcn.yml";
|
||||
parentDirectory = {
|
||||
mode = "0755";
|
||||
};
|
||||
}
|
||||
];
|
||||
};
|
||||
};
|
||||
@@ -155,7 +172,6 @@ in
|
||||
users.talexander = {
|
||||
directories = [
|
||||
{
|
||||
# Game saves
|
||||
directory = ".cache/rpcs3";
|
||||
user = "talexander";
|
||||
group = "talexander";
|
||||
|
||||
14
nix/configuration/roles/rpcs3/files/config_BLUS30443.yml
Normal file
14
nix/configuration/roles/rpcs3/files/config_BLUS30443.yml
Normal file
@@ -0,0 +1,14 @@
|
||||
Core:
|
||||
SPU Block Size: Safe
|
||||
Video:
|
||||
Write Color Buffers: true
|
||||
Minimum Scalable Dimension: 640
|
||||
Net:
|
||||
Internet enabled: Connected
|
||||
IP address: 0.0.0.0
|
||||
Bind address: 0.0.0.0
|
||||
DNS address: 8.8.8.8
|
||||
IP swap list: "ds-eu-c.scej-online.jp=206.189.232.242&&ds-eu-g.scej-online.jp=206.189.232.242&&c.demons-souls.com=206.189.232.242&&g.demons-souls.com=206.189.232.242&&cmnap.scej-online.jp=206.189.232.242&&demons-souls.scej-online.jp=206.189.232.242"
|
||||
UPNP Enabled: false
|
||||
PSN status: RPCN
|
||||
PSN Country: us
|
||||
24771
nix/configuration/roles/rpcs3/files/patch.yml
Normal file
24771
nix/configuration/roles/rpcs3/files/patch.yml
Normal file
File diff suppressed because it is too large
Load Diff
6
nix/configuration/roles/rpcs3/files/patch_config.yml
Normal file
6
nix/configuration/roles/rpcs3/files/patch_config.yml
Normal file
@@ -0,0 +1,6 @@
|
||||
PPU-83681f6110d33442329073b72b8dc88a2f677172:
|
||||
Unlock FPS:
|
||||
Demon's Souls:
|
||||
BLUS30443:
|
||||
01.00:
|
||||
Enabled: true
|
||||
@@ -48,18 +48,14 @@ in
|
||||
# ? cargo-public-api
|
||||
];
|
||||
|
||||
home-manager.users.talexander =
|
||||
{ pkgs, ... }:
|
||||
{
|
||||
home.file = {
|
||||
".cargo/config.toml" = {
|
||||
source = ./files/cargo_config.toml;
|
||||
};
|
||||
".rustup/settings.toml" = {
|
||||
source = ./files/rustup_settings.toml;
|
||||
};
|
||||
};
|
||||
me.install.user.talexander.file = {
|
||||
".cargo/config.toml" = {
|
||||
source = ./files/cargo_config.toml;
|
||||
};
|
||||
".rustup/settings.toml" = {
|
||||
source = ./files/rustup_settings.toml;
|
||||
};
|
||||
};
|
||||
|
||||
environment.persistence."/state" = lib.mkIf (!config.me.buildingIso) {
|
||||
hideMounts = true;
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
[target.x86_64-unknown-linux-gnu]
|
||||
rustflags = ["-C", "target-cpu=native", "-Zthreads=0"]
|
||||
# [target.x86_64-unknown-linux-gnu]
|
||||
# rustflags = ["-C", "target-cpu=native", "-Zthreads=0"]
|
||||
|
||||
[unstable]
|
||||
codegen-backend = true
|
||||
# [unstable]
|
||||
# codegen-backend = true
|
||||
|
||||
[profile.dev]
|
||||
codegen-backend = "cranelift"
|
||||
# [profile.dev]
|
||||
# codegen-backend = "cranelift"
|
||||
|
||||
[profile.dev.package."*"]
|
||||
codegen-backend = "llvm"
|
||||
# codegen-backend = "llvm"
|
||||
opt-level = 3
|
||||
|
||||
110
nix/configuration/roles/shadps4/default.nix
Normal file
110
nix/configuration/roles/shadps4/default.nix
Normal file
@@ -0,0 +1,110 @@
|
||||
{
|
||||
config,
|
||||
lib,
|
||||
pkgs,
|
||||
...
|
||||
}:
|
||||
|
||||
{
|
||||
imports = [ ];
|
||||
|
||||
options.me = {
|
||||
shadps4.enable = lib.mkOption {
|
||||
type = lib.types.bool;
|
||||
default = false;
|
||||
example = true;
|
||||
description = "Whether we want to install shadps4.";
|
||||
};
|
||||
};
|
||||
|
||||
config = lib.mkIf config.me.shadps4.enable (
|
||||
lib.mkMerge [
|
||||
(lib.mkIf config.me.graphical {
|
||||
environment.systemPackages = with pkgs; [
|
||||
shadps4
|
||||
];
|
||||
|
||||
me.install.user.talexander.file = {
|
||||
".local/share/shadPS4/config.toml" = {
|
||||
source = ./files/config.toml;
|
||||
};
|
||||
};
|
||||
|
||||
environment.persistence."/persist" = lib.mkIf (!config.me.buildingIso) {
|
||||
hideMounts = true;
|
||||
users.talexander = {
|
||||
directories = [
|
||||
{
|
||||
# Location of ROMs.
|
||||
directory = ".local/share/shadPS4/games";
|
||||
user = "talexander";
|
||||
group = "talexander";
|
||||
mode = "0755";
|
||||
}
|
||||
{
|
||||
# Firmware.
|
||||
directory = ".local/share/shadPS4/sys_modules";
|
||||
user = "talexander";
|
||||
group = "talexander";
|
||||
mode = "0755";
|
||||
}
|
||||
{
|
||||
# Game saves.
|
||||
directory = ".local/share/shadPS4/savedata";
|
||||
user = "talexander";
|
||||
group = "talexander";
|
||||
mode = "0755";
|
||||
}
|
||||
{
|
||||
# DLC.
|
||||
directory = ".local/share/shadPS4/addcont";
|
||||
user = "talexander";
|
||||
group = "talexander";
|
||||
mode = "0755";
|
||||
}
|
||||
];
|
||||
files = [
|
||||
{
|
||||
# play times and recently played
|
||||
file = ".local/share/shadPS4/play_time.txt";
|
||||
parentDirectory = {
|
||||
mode = "0755";
|
||||
};
|
||||
}
|
||||
];
|
||||
};
|
||||
};
|
||||
|
||||
environment.persistence."/state" = lib.mkIf (!config.me.buildingIso) {
|
||||
hideMounts = true;
|
||||
users.talexander = {
|
||||
directories = [
|
||||
{
|
||||
# Cache.
|
||||
directory = ".local/share/shadPS4/data";
|
||||
user = "talexander";
|
||||
group = "talexander";
|
||||
mode = "0755";
|
||||
}
|
||||
];
|
||||
};
|
||||
};
|
||||
|
||||
nixpkgs.overlays = [
|
||||
(final: prev: {
|
||||
shadps4 = prev.shadps4.overrideAttrs (old: {
|
||||
version = "0.9.0";
|
||||
src = final.fetchFromGitHub {
|
||||
owner = "AzaharPlus";
|
||||
repo = "shadPS4Plus";
|
||||
tag = "SHADPS4PLUS_0_9_0_A";
|
||||
hash = "sha256-ZwP+bOE4roWt51Ii53blDZzdq/SxK4Q69I4rLCNARLA=";
|
||||
fetchSubmodules = true;
|
||||
};
|
||||
});
|
||||
})
|
||||
];
|
||||
})
|
||||
]
|
||||
);
|
||||
}
|
||||
15
nix/configuration/roles/shadps4/files/config.toml
Normal file
15
nix/configuration/roles/shadps4/files/config.toml
Normal file
@@ -0,0 +1,15 @@
|
||||
[General]
|
||||
# Without this, we get:
|
||||
# /run/current-system/sw/bin/xdg-mime: line 1002: /nix/store/wd9bigydk9x8bsvnslrvb5klbgmh98v5-hm_mimeapps.list.new: Read-only file system
|
||||
enableDiscordRPC = false
|
||||
|
||||
|
||||
[GUI]
|
||||
addonInstallDir = "/home/talexander/.local/share/shadPS4/addcont"
|
||||
installDirs = ["/home/talexander/.local/share/shadPS4/games"]
|
||||
installDirsEnabled = [true]
|
||||
# Without the geometry settings shadps4 crashes instantly with a floating point error.
|
||||
geometry_h = 981
|
||||
geometry_w = 748
|
||||
geometry_x = 0
|
||||
geometry_y = 0
|
||||
@@ -36,15 +36,11 @@ in
|
||||
exec_shikane
|
||||
];
|
||||
|
||||
home-manager.users.talexander =
|
||||
{ pkgs, ... }:
|
||||
{
|
||||
home.file = {
|
||||
".config/shikane/config.toml" = {
|
||||
source = ./files/config.toml;
|
||||
};
|
||||
};
|
||||
me.install.user.talexander.file = {
|
||||
".config/shikane/config.toml" = {
|
||||
source = ./files/config.toml;
|
||||
};
|
||||
};
|
||||
})
|
||||
]
|
||||
);
|
||||
|
||||
@@ -1,3 +1,15 @@
|
||||
[[profile]]
|
||||
name = "laptop"
|
||||
|
||||
[[profile.output]]
|
||||
enable = true
|
||||
search = ["m=0x0BCA", "s=", "v=BOE"]
|
||||
mode = "2256x1504@59.999Hz"
|
||||
position = "0,0"
|
||||
scale = 1.5
|
||||
transform = "normal"
|
||||
adaptive_sync = false
|
||||
|
||||
[[profile]]
|
||||
name = "homedesk"
|
||||
exec = ["notify-send shikane \"Profile $SHIKANE_PROFILE_NAME has been applied\""]
|
||||
|
||||
49
nix/configuration/roles/spaghettikart/default.nix
Normal file
49
nix/configuration/roles/spaghettikart/default.nix
Normal file
@@ -0,0 +1,49 @@
|
||||
{
|
||||
config,
|
||||
lib,
|
||||
pkgs,
|
||||
...
|
||||
}:
|
||||
|
||||
{
|
||||
imports = [ ];
|
||||
|
||||
options.me = {
|
||||
spaghettikart.enable = lib.mkOption {
|
||||
type = lib.types.bool;
|
||||
default = false;
|
||||
example = true;
|
||||
description = "Whether we want to install spaghettikart.";
|
||||
};
|
||||
};
|
||||
|
||||
config = lib.mkIf config.me.spaghettikart.enable (
|
||||
lib.mkMerge [
|
||||
{
|
||||
allowedUnfree = [ "spaghettikart" ];
|
||||
}
|
||||
(lib.mkIf config.me.graphical {
|
||||
environment.systemPackages = with pkgs; [
|
||||
spaghettikart
|
||||
];
|
||||
|
||||
me.install.user.talexander.file = {
|
||||
".local/share/spaghettikart/spaghettify.cfg.json" = {
|
||||
source = ./files/spaghettify.cfg.json;
|
||||
method = "overwrite";
|
||||
};
|
||||
};
|
||||
|
||||
environment.persistence."/persist" = lib.mkIf (!config.me.buildingIso) {
|
||||
hideMounts = true;
|
||||
users.talexander = {
|
||||
files = [
|
||||
".local/share/spaghettikart/default.sav"
|
||||
".local/share/spaghettikart/mk64.o2r"
|
||||
];
|
||||
};
|
||||
};
|
||||
})
|
||||
]
|
||||
);
|
||||
}
|
||||
@@ -0,0 +1,14 @@
|
||||
{
|
||||
"CVars": {
|
||||
"gDisableLod": 1,
|
||||
"gMSAAValue": 2,
|
||||
"gShowSpaghettiVersion": 0,
|
||||
"gSkipIntro": 1,
|
||||
"gVsyncEnabled": 1
|
||||
},
|
||||
"Window": {
|
||||
"Fullscreen": {
|
||||
"Enabled": true
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -27,19 +27,14 @@
|
||||
};
|
||||
};
|
||||
|
||||
home-manager.users.talexander =
|
||||
{ pkgs, ... }:
|
||||
{
|
||||
home.file.".ssh/config" = {
|
||||
source = ./files/ssh_config;
|
||||
};
|
||||
me.install.user.root.file = {
|
||||
".ssh/config" = {
|
||||
source = ./files/ssh_config_root;
|
||||
};
|
||||
|
||||
home-manager.users.root =
|
||||
{ pkgs, ... }:
|
||||
{
|
||||
home.file.".ssh/config" = {
|
||||
source = ./files/ssh_config_root;
|
||||
};
|
||||
};
|
||||
me.install.user.talexander.file = {
|
||||
".ssh/config" = {
|
||||
source = ./files/ssh_config;
|
||||
};
|
||||
};
|
||||
}
|
||||
|
||||
@@ -376,26 +376,18 @@ in
|
||||
};
|
||||
};
|
||||
|
||||
home-manager.users.talexander =
|
||||
{ pkgs, ... }:
|
||||
{
|
||||
home.file = {
|
||||
# Configure default programs (for example, default browser)
|
||||
".config/mimeapps.list" = {
|
||||
source = ./files/mimeapps.list;
|
||||
};
|
||||
};
|
||||
home.file = {
|
||||
".config/gtk-3.0/settings.ini" = {
|
||||
source = ./files/settings.ini;
|
||||
};
|
||||
};
|
||||
home.file = {
|
||||
".icons/default" = {
|
||||
source = "${pkgs.adwaita-icon-theme}/share/icons/Adwaita";
|
||||
};
|
||||
};
|
||||
me.install.user.talexander.file = {
|
||||
".config/mimeapps.list" = {
|
||||
# Configure default programs (for example, default browser)
|
||||
source = ./files/mimeapps.list;
|
||||
};
|
||||
".config/gtk-3.0/settings.ini" = {
|
||||
source = ./files/settings.ini;
|
||||
};
|
||||
".icons/default" = {
|
||||
source = "${pkgs.adwaita-icon-theme}/share/icons/Adwaita";
|
||||
};
|
||||
};
|
||||
|
||||
# For mounting drives in pcmanfm
|
||||
services.gvfs.enable = true;
|
||||
|
||||
@@ -48,16 +48,14 @@
|
||||
})
|
||||
];
|
||||
|
||||
home-manager.users.talexander =
|
||||
{ pkgs, ... }:
|
||||
{
|
||||
home.file.".config/Code/User/settings.json" = {
|
||||
source = ./files/settings.json;
|
||||
};
|
||||
home.file.".config/Code/User/keybindings.json" = {
|
||||
source = ./files/keybindings.json;
|
||||
};
|
||||
me.install.user.talexander.file = {
|
||||
".config/Code/User/settings.json" = {
|
||||
source = ./files/settings.json;
|
||||
};
|
||||
".config/Code/User/keybindings.json" = {
|
||||
source = ./files/keybindings.json;
|
||||
};
|
||||
};
|
||||
})
|
||||
]
|
||||
);
|
||||
|
||||
@@ -20,6 +20,12 @@
|
||||
"command": "-workbench.action.navigateBack",
|
||||
"when": "canNavigateBack"
|
||||
},
|
||||
{
|
||||
// This isn't quite right. In emacs it would go back to the last location you performed an action which could include navigation. This goes back to the place where you last changed the text. Either way, close enough.
|
||||
"key": "ctrl+x ctrl+x",
|
||||
"command": "workbench.action.navigateToLastEditLocation",
|
||||
"when": "canNavigateToLastEditLocation"
|
||||
},
|
||||
{
|
||||
"key": "shift+alt+/",
|
||||
"command": "editor.action.goToReferences",
|
||||
|
||||
@@ -18,6 +18,7 @@
|
||||
"workbench.editor.showTabs": "none",
|
||||
"workbench.activityBar.location": "hidden",
|
||||
"window.menuBarVisibility": "toggle",
|
||||
"window.commandCenter": false,
|
||||
"explorer.autoReveal": false,
|
||||
"[python]": {
|
||||
"editor.defaultFormatter": "ms-python.black-formatter",
|
||||
@@ -35,11 +36,21 @@
|
||||
"editor.defaultFormatter": "esbenp.prettier-vscode",
|
||||
"editor.formatOnSave": true
|
||||
},
|
||||
"[typescriptreact]": {
|
||||
"editor.defaultFormatter": "esbenp.prettier-vscode",
|
||||
"editor.formatOnSave": true
|
||||
},
|
||||
"javascript.autoClosingTags": false,
|
||||
"typescript.autoClosingTags": false,
|
||||
"black-formatter.importStrategy": "fromEnvironment",
|
||||
"workbench.statusBar.visible": false,
|
||||
"git.openRepositoryInParentFolders": "never",
|
||||
"files.autoSave": "afterDelay",
|
||||
"editor.rulers": [
|
||||
100
|
||||
]
|
||||
],
|
||||
"workbench.secondarySideBar.defaultVisibility": "hidden",
|
||||
"editor.autoClosingBrackets": "never",
|
||||
"editor.autoSurround": "never",
|
||||
"workbench.editor.navigationScope": "editorGroup"
|
||||
}
|
||||
|
||||
@@ -113,18 +113,14 @@ in
|
||||
|
||||
services.upower.enable = true; # for battery
|
||||
|
||||
home-manager.users.talexander =
|
||||
{ pkgs, ... }:
|
||||
{
|
||||
home.file = {
|
||||
".config/waybar/config" = {
|
||||
source = ./files/waybar_config.json;
|
||||
};
|
||||
".config/waybar/style.css" = {
|
||||
source = ./files/style.css;
|
||||
};
|
||||
};
|
||||
me.install.user.talexander.file = {
|
||||
".config/waybar/config" = {
|
||||
source = ./files/waybar_config.json;
|
||||
};
|
||||
".config/waybar/style.css" = {
|
||||
source = ./files/style.css;
|
||||
};
|
||||
};
|
||||
})
|
||||
]
|
||||
);
|
||||
|
||||
@@ -49,6 +49,8 @@ let
|
||||
|
||||
source ${pkgs.zsh-histdb}/share/zsh/plugins/zsh-histdb/histdb-interactive.zsh
|
||||
bindkey '^r' _histdb-isearch
|
||||
|
||||
${lib.concatMapStringsSep "\n" (item: "source ${item}") config.me.zsh.includes}
|
||||
'';
|
||||
};
|
||||
in
|
||||
@@ -62,6 +64,16 @@ in
|
||||
example = true;
|
||||
description = "Whether we want to install zsh.";
|
||||
};
|
||||
zsh.includes = lib.mkOption {
|
||||
type = lib.types.listOf lib.types.package;
|
||||
default = [ ];
|
||||
example = lib.literalExpression ''
|
||||
[ (pkgs.writeTextFile {
|
||||
name = "launch-kanshi.conf";
|
||||
text = "exec kanshi";
|
||||
}) ]'';
|
||||
description = "List of zshrc files to import.";
|
||||
};
|
||||
};
|
||||
|
||||
config = lib.mkIf config.me.zsh.enable (
|
||||
@@ -78,13 +90,11 @@ in
|
||||
enable = true;
|
||||
};
|
||||
|
||||
home-manager.users.talexander =
|
||||
{ pkgs, ... }:
|
||||
{
|
||||
home.file.".zshrc" = {
|
||||
source = "${zshrc}";
|
||||
};
|
||||
me.install.user.talexander.file = {
|
||||
".zshrc" = {
|
||||
source = "${zshrc}";
|
||||
};
|
||||
};
|
||||
|
||||
environment.persistence."/persist" = lib.mkIf (!config.me.buildingIso) {
|
||||
hideMounts = true;
|
||||
|
||||
@@ -2,87 +2,179 @@
|
||||
config,
|
||||
lib,
|
||||
pkgs,
|
||||
home-manager,
|
||||
...
|
||||
}:
|
||||
|
||||
let
|
||||
cfg = config.me.install;
|
||||
inherit (lib)
|
||||
attrNames
|
||||
filter
|
||||
flatten
|
||||
attrNames
|
||||
;
|
||||
makeFileOption =
|
||||
prefix:
|
||||
lib.mkOption {
|
||||
type = lib.types.attrsOf (
|
||||
lib.types.submodule (
|
||||
{ name, config, ... }:
|
||||
{
|
||||
options = {
|
||||
enable = lib.mkOption {
|
||||
type = lib.types.bool;
|
||||
default = true;
|
||||
defaultText = "${prefix}.‹path›.enable";
|
||||
example = false;
|
||||
description = "Whether we want to install this file.";
|
||||
};
|
||||
method = lib.mkOption {
|
||||
type = lib.types.enum [
|
||||
"symlink"
|
||||
"overwrite"
|
||||
"initialize"
|
||||
# "bind_mount" TODO: for directories?
|
||||
];
|
||||
default = "symlink";
|
||||
defaultText = "${prefix}.‹path›.method";
|
||||
example = "overwrite";
|
||||
description = "The way in which the file should be installed.";
|
||||
};
|
||||
mode = lib.mkOption {
|
||||
type = lib.types.str;
|
||||
default = "0444";
|
||||
defaultText = "${prefix}.‹path›.mode";
|
||||
example = "0750";
|
||||
description = "The read, write, execute permission flags.";
|
||||
};
|
||||
source = lib.mkOption {
|
||||
type = lib.types.path;
|
||||
defaultText = "${prefix}.‹path›.source";
|
||||
example = ./files/foo.txt;
|
||||
description = "The source file to install into the destination.";
|
||||
};
|
||||
target = lib.mkOption {
|
||||
type = lib.types.str;
|
||||
defaultText = "${prefix}.‹path›.target";
|
||||
example = ".local/share/foo/bar.txt";
|
||||
description = "The path where the file should be written.";
|
||||
};
|
||||
group = lib.mkOption {
|
||||
type = lib.types.nullOr lib.types.str;
|
||||
default = null;
|
||||
defaultText = "${prefix}.‹path›.group";
|
||||
example = ".local/share/foo/bar.txt";
|
||||
description = "The group that should own the file.";
|
||||
};
|
||||
};
|
||||
|
||||
config = {
|
||||
target = lib.mkDefault name;
|
||||
};
|
||||
}
|
||||
)
|
||||
);
|
||||
defaultText = "${prefix}.‹path›";
|
||||
default = { };
|
||||
example = lib.literalExpression ''
|
||||
{
|
||||
".config/foo/bar.txt" = {
|
||||
source = ./files/bar.txt
|
||||
};
|
||||
}
|
||||
'';
|
||||
get_shell_values =
|
||||
target:
|
||||
let
|
||||
homedir = config.users.users."${target.username}".home;
|
||||
group = config.users.users."${target.username}".group;
|
||||
in
|
||||
{
|
||||
source = lib.strings.escapeShellArg "${target.source}";
|
||||
destination = lib.strings.escapeShellArg "${homedir}/${target.target}";
|
||||
mode = lib.strings.escapeShellArg "${target.mode}";
|
||||
dir_mode = lib.strings.escapeShellArg "${target.dir_mode}";
|
||||
username = lib.strings.escapeShellArg "${target.username}";
|
||||
group = lib.strings.escapeShellArg "${group}";
|
||||
};
|
||||
install_user_file =
|
||||
let
|
||||
constructors = {
|
||||
"overwrite" = install_user_file_overwrite;
|
||||
"symlink" = install_user_file_symlink;
|
||||
};
|
||||
in
|
||||
stage: target: (constructors."${target.method}"."${stage}" target);
|
||||
install_user_file_overwrite = {
|
||||
"check" = (target: "");
|
||||
"install" = (
|
||||
target:
|
||||
let
|
||||
inherit (get_shell_values target)
|
||||
source
|
||||
destination
|
||||
mode
|
||||
dir_mode
|
||||
username
|
||||
group
|
||||
;
|
||||
flags = lib.strings.concatStringsSep " " [
|
||||
(if mode != "" then "-m ${mode}" else "")
|
||||
(if username != "" then "-o ${username}" else "")
|
||||
(if group != "" then "-g ${group}" else "")
|
||||
];
|
||||
dir_flags = lib.strings.concatStringsSep " " [
|
||||
(if dir_mode != "" then "-m ${dir_mode}" else "")
|
||||
(if username != "" then "-o ${username}" else "")
|
||||
(if group != "" then "-g ${group}" else "")
|
||||
];
|
||||
in
|
||||
if target.recursive then
|
||||
[
|
||||
''
|
||||
find ${source} -type f -print0 | while read -r -d "" file; do
|
||||
relative_path=$(realpath -s --relative-to ${source} "$file")
|
||||
full_dest=${destination}/"$relative_path"
|
||||
create_containing_directories "$full_dest" ${dir_flags}
|
||||
$DRY_RUN_CMD install $VERBOSE_ARG --compare ${flags} "$file" "$full_dest"
|
||||
done
|
||||
''
|
||||
]
|
||||
else
|
||||
[
|
||||
''
|
||||
create_containing_directories ${destination} ${dir_flags}
|
||||
$DRY_RUN_CMD install $VERBOSE_ARG --compare ${flags} ${source} ${destination}
|
||||
''
|
||||
]
|
||||
);
|
||||
"uninstall" = (
|
||||
target:
|
||||
let
|
||||
inherit (get_shell_values target)
|
||||
source
|
||||
destination
|
||||
;
|
||||
in
|
||||
if target.recursive then
|
||||
[
|
||||
''
|
||||
find ${source} -type f -print0 | while read -r -d "" file; do
|
||||
relative_path=$(realpath -s --relative-to ${source} "$file")
|
||||
full_dest=${destination}/"$relative_path"
|
||||
$DRY_RUN_CMD echo rm -f "$full_dest"
|
||||
done
|
||||
''
|
||||
]
|
||||
else
|
||||
[
|
||||
''
|
||||
$DRY_RUN_CMD echo rm -f ${destination}
|
||||
''
|
||||
]
|
||||
);
|
||||
};
|
||||
install_user_file_symlink = {
|
||||
"check" = (target: "");
|
||||
"install" = (
|
||||
target:
|
||||
let
|
||||
inherit (get_shell_values target)
|
||||
source
|
||||
destination
|
||||
mode
|
||||
dir_mode
|
||||
username
|
||||
group
|
||||
;
|
||||
owner = lib.strings.concatStringsSep ":" (
|
||||
filter (val: val != "") [
|
||||
username
|
||||
group
|
||||
]
|
||||
);
|
||||
dir_flags = lib.strings.concatStringsSep " " [
|
||||
(if dir_mode != "" then "-m ${dir_mode}" else "")
|
||||
(if username != "" then "-o ${username}" else "")
|
||||
(if group != "" then "-g ${group}" else "")
|
||||
];
|
||||
in
|
||||
if target.recursive then
|
||||
[
|
||||
''
|
||||
find ${source} -type f -print0 | while read -r -d "" file; do
|
||||
relative_path=$(realpath -s --relative-to ${source} "$file")
|
||||
full_dest=${destination}/"$relative_path"
|
||||
create_containing_directories "$full_dest" ${dir_flags}
|
||||
$DRY_RUN_CMD ln $VERBOSE_ARG -s "$file" "$full_dest"
|
||||
$DRY_RUN_CMD chown $VERBOSE_ARG -h ${owner} "$full_dest"
|
||||
done
|
||||
''
|
||||
]
|
||||
else
|
||||
[
|
||||
''
|
||||
create_containing_directories ${destination} ${dir_flags}
|
||||
$DRY_RUN_CMD ln $VERBOSE_ARG -s ${source} ${destination}
|
||||
$DRY_RUN_CMD chown $VERBOSE_ARG -h ${owner} ${destination}
|
||||
''
|
||||
]
|
||||
);
|
||||
"uninstall" = (
|
||||
target:
|
||||
let
|
||||
inherit (get_shell_values target)
|
||||
source
|
||||
destination
|
||||
;
|
||||
in
|
||||
if target.recursive then
|
||||
[
|
||||
''
|
||||
find ${source} -type f -print0 | while read -r -d "" file; do
|
||||
relative_path=$(realpath -s --relative-to ${source} "$file")
|
||||
full_dest=${destination}/"$relative_path"
|
||||
$DRY_RUN_CMD echo rm -f "$full_dest"
|
||||
done
|
||||
''
|
||||
]
|
||||
else
|
||||
[
|
||||
''
|
||||
$DRY_RUN_CMD echo rm -f ${destination}
|
||||
''
|
||||
]
|
||||
);
|
||||
};
|
||||
in
|
||||
{
|
||||
imports = [ ];
|
||||
@@ -92,88 +184,150 @@ in
|
||||
type = lib.types.attrsOf (
|
||||
lib.types.submodule (
|
||||
{ name, config, ... }:
|
||||
let
|
||||
username = name;
|
||||
in
|
||||
{
|
||||
options = {
|
||||
enable = lib.mkOption {
|
||||
type = lib.types.bool;
|
||||
default = true;
|
||||
defaultText = "me.install.user.‹username›.enable";
|
||||
example = false;
|
||||
defaultText = "enable";
|
||||
example = lib.literalExpression false;
|
||||
description = "Whether we want to install files in this user's home directory.";
|
||||
};
|
||||
target_username = lib.mkOption {
|
||||
type = lib.types.str;
|
||||
defaultText = "me.install.file.‹username›.target_username";
|
||||
example = "root";
|
||||
description = "The username for the user whose home directory will contain the file.";
|
||||
};
|
||||
file = makeFileOption "me.install.user.‹username›.file";
|
||||
};
|
||||
|
||||
config = {
|
||||
target_username = lib.mkDefault name;
|
||||
file = lib.mkOption {
|
||||
type = lib.types.attrsOf (
|
||||
lib.types.submodule (
|
||||
{ name, config, ... }:
|
||||
let
|
||||
path = name;
|
||||
in
|
||||
{
|
||||
options = {
|
||||
enable = lib.mkOption {
|
||||
type = lib.types.bool;
|
||||
default = true;
|
||||
defaultText = "enable";
|
||||
example = lib.literalExpression false;
|
||||
description = "Whether we want to install this file in this user's home directory.";
|
||||
};
|
||||
username = lib.mkOption {
|
||||
type = lib.types.str;
|
||||
defaultText = "username";
|
||||
example = "root";
|
||||
description = "The username for the user whose home directory will contain the file.";
|
||||
};
|
||||
target = lib.mkOption {
|
||||
type = lib.types.str;
|
||||
defaultText = "target";
|
||||
example = ".local/share/foo/bar.txt";
|
||||
description = "The path where the file should be written.";
|
||||
};
|
||||
method = lib.mkOption {
|
||||
type = lib.types.enum [
|
||||
"symlink"
|
||||
"overwrite"
|
||||
# "bind_mount" TODO: for directories?
|
||||
];
|
||||
default = "symlink";
|
||||
defaultText = "me.install.file.‹path›.method";
|
||||
example = "overwrite";
|
||||
description = "The way in which the file should be installed.";
|
||||
};
|
||||
mode = lib.mkOption {
|
||||
type = lib.types.str;
|
||||
default = "0444";
|
||||
defaultText = "me.install.file.‹path›.mode";
|
||||
example = "0750";
|
||||
description = "The read, write, execute permission flags.";
|
||||
};
|
||||
dir_mode = lib.mkOption {
|
||||
type = lib.types.str;
|
||||
default = "0755";
|
||||
defaultText = "dir_mode";
|
||||
example = "0755";
|
||||
description = "The read, write, execute permission flags for any parent directories that need to be created.";
|
||||
};
|
||||
source = lib.mkOption {
|
||||
type = lib.types.path;
|
||||
defaultText = "me.install.file.‹path›.source";
|
||||
example = ./files/foo.txt;
|
||||
description = "The source file to install into the destination.";
|
||||
};
|
||||
recursive = lib.mkOption {
|
||||
type = lib.types.bool;
|
||||
default = false;
|
||||
defaultText = "recursive";
|
||||
example = lib.literalExpression false;
|
||||
description = "Whether we want to recurse through the directory doing individual installs for each file.";
|
||||
};
|
||||
};
|
||||
|
||||
config = {
|
||||
username = lib.mkDefault username;
|
||||
target = lib.mkDefault path;
|
||||
};
|
||||
}
|
||||
)
|
||||
);
|
||||
};
|
||||
};
|
||||
}
|
||||
)
|
||||
);
|
||||
|
||||
defaultText = "me.install.user.‹username›";
|
||||
default = { };
|
||||
# TODO: example
|
||||
};
|
||||
# TODO: Global option owned by root?
|
||||
# file = makeFileOption "me.install.file";
|
||||
};
|
||||
|
||||
config =
|
||||
let
|
||||
cfg = config.me.install;
|
||||
active_install_users = filter (username: cfg.user."${username}".enable) (attrNames cfg.user);
|
||||
install_commands = flatten (
|
||||
builtins.map (
|
||||
username:
|
||||
let
|
||||
active_install_file_targets = filter (target: cfg.user."${username}".file."${target}".enable) (
|
||||
attrNames cfg.user."${username}".file
|
||||
);
|
||||
in
|
||||
builtins.map (
|
||||
target:
|
||||
let
|
||||
target_config = cfg.user."${username}".file."${target}";
|
||||
source = lib.strings.escapeShellArg "${target_config.source}";
|
||||
destination = lib.strings.escapeShellArg "${target_config.target}";
|
||||
mode = lib.strings.escapeShellArg "${target_config.mode}";
|
||||
escaped_username = lib.strings.escapeShellArg "${username}";
|
||||
escaped_group =
|
||||
if target_config.group == null then
|
||||
"$(id -g ${escaped_username})"
|
||||
else
|
||||
(lib.strings.escapeShellArg "${target_config.group}");
|
||||
in
|
||||
''
|
||||
$DRY_RUN_CMD install $VERBOSE_ARG -D --compare -o ${escaped_username} -g ${escaped_group} -m ${mode} ${source} ${destination}
|
||||
''
|
||||
) active_install_file_targets
|
||||
) active_install_users
|
||||
all_users = builtins.map (username: cfg.user."${username}") (attrNames cfg.user);
|
||||
enabled_users = filter (user: user.enable) all_users;
|
||||
all_file_targets = lib.flatten (
|
||||
builtins.map (user: (builtins.map (path: user.file."${path}") (attrNames user.file))) enabled_users
|
||||
);
|
||||
enabled_file_targets = filter (target: target.enable) all_file_targets;
|
||||
check_commands = lib.flatten (builtins.map (install_user_file "check") enabled_file_targets);
|
||||
install_commands = lib.flatten (builtins.map (install_user_file "install") enabled_file_targets);
|
||||
uninstall_commands = lib.flatten (
|
||||
builtins.map (install_user_file "uninstall") enabled_file_targets
|
||||
);
|
||||
|
||||
in
|
||||
lib.mkMerge [
|
||||
(lib.mkIf (install_commands != [ ]) ({
|
||||
systemd.services.me-install-file = {
|
||||
enable = true;
|
||||
description = "me-install-file";
|
||||
wantedBy = [ "multi-user.target" ];
|
||||
wants = [ "multi-user.target" ];
|
||||
after = [ "multi-user.target" ];
|
||||
unitConfig.DefaultDependencies = "no";
|
||||
serviceConfig = {
|
||||
Type = "oneshot";
|
||||
RemainAfterExit = "yes";
|
||||
};
|
||||
script = (lib.strings.concatStringsSep "\n" install_commands);
|
||||
{
|
||||
systemd.services.me-install-file = {
|
||||
enable = true;
|
||||
description = "me-install-file";
|
||||
wantedBy = [ "multi-user.target" ];
|
||||
wants = [ "multi-user.target" ];
|
||||
before = [ "multi-user.target" ];
|
||||
# path = with pkgs; [
|
||||
# zfs
|
||||
# ];
|
||||
unitConfig.DefaultDependencies = "no";
|
||||
serviceConfig = {
|
||||
Type = "oneshot";
|
||||
RemainAfterExit = "yes";
|
||||
};
|
||||
}))
|
||||
];
|
||||
script =
|
||||
''
|
||||
set -o pipefail
|
||||
IFS=$'\n\t'
|
||||
source ${./files/lib.bash}
|
||||
''
|
||||
+ (lib.strings.concatStringsSep "\n" (
|
||||
[
|
||||
]
|
||||
++ check_commands
|
||||
++ install_commands
|
||||
));
|
||||
preStop =
|
||||
''
|
||||
set -o pipefail
|
||||
IFS=$'\n\t'
|
||||
source ${./files/lib.bash}
|
||||
''
|
||||
+ (lib.strings.concatStringsSep "\n" uninstall_commands);
|
||||
};
|
||||
};
|
||||
}
|
||||
|
||||
38
nix/configuration/util/install_files/files/lib.bash
Normal file
38
nix/configuration/util/install_files/files/lib.bash
Normal file
@@ -0,0 +1,38 @@
|
||||
#!/usr/bin/env bash
|
||||
#
|
||||
|
||||
############## Setup #########################
|
||||
|
||||
function die {
|
||||
local status_code="$1"
|
||||
shift
|
||||
(>&2 echo "${@}")
|
||||
exit "$status_code"
|
||||
}
|
||||
|
||||
function log {
|
||||
(>&2 echo "${@}")
|
||||
}
|
||||
|
||||
############## Program #########################
|
||||
|
||||
function create_containing_directories {
|
||||
local full_dest="$1"
|
||||
shift 1
|
||||
local dirs_to_create=()
|
||||
local containing_directory="$full_dest"
|
||||
while true; do
|
||||
containing_directory=$(dirname "$containing_directory")
|
||||
if [ -e "$containing_directory" ] || [ "$containing_directory" = "/" ]; then
|
||||
break
|
||||
fi
|
||||
dirs_to_create+=($containing_directory)
|
||||
done
|
||||
|
||||
for (( idx=${#dirs_to_create[@]}-1 ; idx>=0 ; idx-- )) ; do
|
||||
local containing_directory="${dirs_to_create[idx]}"
|
||||
log "Creating $containing_directory"
|
||||
$DRY_RUN_CMD install $VERBOSE_ARG -d "${@}" "$containing_directory"
|
||||
done
|
||||
|
||||
}
|
||||
42
nix/steam_deck/configuration/flake.lock
generated
42
nix/steam_deck/configuration/flake.lock
generated
@@ -1,12 +1,15 @@
|
||||
{
|
||||
"nodes": {
|
||||
"flake-utils": {
|
||||
"inputs": {
|
||||
"systems": "systems"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1659877975,
|
||||
"narHash": "sha256-zllb8aq3YO3h8B/U0/J1WBgAL8EX5yWf5pMj3G0NAmc=",
|
||||
"lastModified": 1731533236,
|
||||
"narHash": "sha256-l0KFg5HjrsfsO/JpG+r7fRrqm12kzFHyUHqHCVpMMbI=",
|
||||
"owner": "numtide",
|
||||
"repo": "flake-utils",
|
||||
"rev": "c0e246b9b83f637f4681389ecabcb2681b4f3af0",
|
||||
"rev": "11707dc2f618dd54ca8739b309ec4fc024de578b",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
@@ -22,11 +25,11 @@
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1739314552,
|
||||
"narHash": "sha256-ggVf2BclyIW3jexc/uvgsgJH4e2cuG6Nyg54NeXgbFI=",
|
||||
"lastModified": 1757698511,
|
||||
"narHash": "sha256-UqHHGydF/q3jfYXCpvYLA0TWtvByOp1NwOKCUjhYmPs=",
|
||||
"owner": "nix-community",
|
||||
"repo": "home-manager",
|
||||
"rev": "83bd3a26ac0526ae04fa74df46738bb44b89dcdd",
|
||||
"rev": "a3fcc92180c7462082cd849498369591dfb20855",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
@@ -58,11 +61,11 @@
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1713543440,
|
||||
"narHash": "sha256-lnzZQYG0+EXl/6NkGpyIz+FEOc/DSEG57AP1VsdeNrM=",
|
||||
"lastModified": 1752054764,
|
||||
"narHash": "sha256-Ob/HuUhANoDs+nvYqyTKrkcPXf4ZgXoqMTQoCK0RFgQ=",
|
||||
"owner": "nix-community",
|
||||
"repo": "nixGL",
|
||||
"rev": "310f8e49a149e4c9ea52f1adf70cdc768ec53f8a",
|
||||
"rev": "a8e1ce7d49a149ed70df676785b07f63288f53c5",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
@@ -73,11 +76,11 @@
|
||||
},
|
||||
"nixpkgs": {
|
||||
"locked": {
|
||||
"lastModified": 1739138025,
|
||||
"narHash": "sha256-M4ilIfGxzbBZuURokv24aqJTbdjPA9K+DtKUzrJaES4=",
|
||||
"lastModified": 1757746433,
|
||||
"narHash": "sha256-fEvTiU4s9lWgW7mYEU/1QUPirgkn+odUBTaindgiziY=",
|
||||
"owner": "nixos",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "b2243f41e860ac85c0b446eadc6930359b294e79",
|
||||
"rev": "6d7ec06d6868ac6d94c371458fc2391ded9ff13d",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
@@ -94,6 +97,21 @@
|
||||
"nixgl": "nixgl",
|
||||
"nixpkgs": "nixpkgs"
|
||||
}
|
||||
},
|
||||
"systems": {
|
||||
"locked": {
|
||||
"lastModified": 1681028828,
|
||||
"narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=",
|
||||
"owner": "nix-systems",
|
||||
"repo": "default",
|
||||
"rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "nix-systems",
|
||||
"repo": "default",
|
||||
"type": "github"
|
||||
}
|
||||
}
|
||||
},
|
||||
"root": "root",
|
||||
|
||||
@@ -4,8 +4,10 @@
|
||||
|
||||
inputs = {
|
||||
nixpkgs.url = "github:nixos/nixpkgs/nixpkgs-unstable";
|
||||
nixgl.url = "github:nix-community/nixGL";
|
||||
nixgl.inputs.nixpkgs.follows = "nixpkgs";
|
||||
nixgl = {
|
||||
url = "github:nix-community/nixGL";
|
||||
inputs.nixpkgs.follows = "nixpkgs";
|
||||
};
|
||||
home-manager = {
|
||||
url = "github:nix-community/home-manager";
|
||||
inputs.nixpkgs.follows = "nixpkgs";
|
||||
@@ -23,6 +25,7 @@
|
||||
...
|
||||
}:
|
||||
let
|
||||
forAllSystems = nixpkgs.lib.genAttrs nixpkgs.lib.systems.flakeExposed;
|
||||
system = "x86_64-linux";
|
||||
pkgs = import nixpkgs {
|
||||
inherit system;
|
||||
@@ -31,7 +34,7 @@
|
||||
in
|
||||
# pkgs = nixpkgs.legacyPackages.${system};
|
||||
{
|
||||
defaultPackage.${system} = home-manager.defaultPackage.${system};
|
||||
defaultPackage.${system} = home-manager.packages.${system}.default;
|
||||
homeConfigurations."deck" = home-manager.lib.homeManagerConfiguration {
|
||||
inherit pkgs;
|
||||
|
||||
|
||||
@@ -18,6 +18,7 @@
|
||||
./roles/ryujinx
|
||||
./roles/shipwright
|
||||
./roles/sm64ex
|
||||
./roles/spaghettikart
|
||||
./roles/steam_rom_manager
|
||||
./roles/yuzu
|
||||
./util/copy_files
|
||||
|
||||
@@ -20,6 +20,7 @@
|
||||
me.ship2harkinian.enable = true;
|
||||
me.shipwright.enable = true;
|
||||
me.sm64ex.enable = true;
|
||||
me.spaghettikart.enable = true;
|
||||
me.steam_rom_manager.enable = true; # Steam rom manager UI does not render. I think it wants to be in an AppImage.
|
||||
me.yuzu.enable = true;
|
||||
};
|
||||
|
||||
@@ -51,6 +51,7 @@ in
|
||||
(
|
||||
final: prev:
|
||||
let
|
||||
modified_package = (pkgs.callPackage ./package/package.nix { });
|
||||
optimizeWithFlags =
|
||||
pkg: flags:
|
||||
pkg.overrideAttrs (old: {
|
||||
@@ -58,16 +59,16 @@ in
|
||||
});
|
||||
original_package =
|
||||
if config.me.optimizations.enable then
|
||||
(optimizeWithFlags prev.duckstation [
|
||||
(optimizeWithFlags modified_package [
|
||||
"-march=znver2"
|
||||
"-mtune=znver2"
|
||||
])
|
||||
else
|
||||
prev.duckstation;
|
||||
modified_package;
|
||||
in
|
||||
{
|
||||
duckstation = pkgs.buildEnv {
|
||||
name = prev.duckstation.name;
|
||||
name = original_package.name;
|
||||
paths = [
|
||||
(config.lib.nixGL.wrap original_package)
|
||||
];
|
||||
|
||||
@@ -0,0 +1,11 @@
|
||||
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
|
||||
index 879d46bc..95570f6b 100644
|
||||
--- a/src/CMakeLists.txt
|
||||
+++ b/src/CMakeLists.txt
|
||||
@@ -20,5 +20,5 @@ if(BUILD_REGTEST)
|
||||
endif()
|
||||
|
||||
if(BUILD_TESTS)
|
||||
- add_subdirectory(common-tests EXCLUDE_FROM_ALL)
|
||||
+ add_subdirectory(common-tests)
|
||||
endif()
|
||||
@@ -0,0 +1,19 @@
|
||||
diff --git a/src/scmversion/gen_scmversion.sh b/src/scmversion/gen_scmversion.sh
|
||||
index 9122cd8..50ed8f9 100755
|
||||
--- a/src/scmversion/gen_scmversion.sh
|
||||
+++ b/src/scmversion/gen_scmversion.sh
|
||||
@@ -10,10 +10,10 @@ else
|
||||
fi
|
||||
|
||||
|
||||
-HASH=$(git rev-parse HEAD)
|
||||
-BRANCH=$(git rev-parse --abbrev-ref HEAD | tr -d '\r\n')
|
||||
-TAG=$(git describe --dirty | tr -d '\r\n')
|
||||
-DATE=$(git log -1 --date=iso8601-strict --format=%cd)
|
||||
+HASH="@gitHash@"
|
||||
+BRANCH="@gitBranch@"
|
||||
+TAG="@gitTag@"
|
||||
+DATE="@gitDate@"
|
||||
|
||||
cd $CURDIR
|
||||
|
||||
@@ -0,0 +1,70 @@
|
||||
From 19e094e5c7aaaf375a13424044521701e85c8313 Mon Sep 17 00:00:00 2001
|
||||
From: OPNA2608 <opna2608@protonmail.com>
|
||||
Date: Thu, 9 Jan 2025 17:46:25 +0100
|
||||
Subject: [PATCH] Fix usage of NEON intrinsics
|
||||
|
||||
---
|
||||
src/common/gsvector_neon.h | 12 ++++++------
|
||||
1 file changed, 6 insertions(+), 6 deletions(-)
|
||||
|
||||
diff --git a/src/common/gsvector_neon.h b/src/common/gsvector_neon.h
|
||||
index e4991af5e..61b8dc09b 100644
|
||||
--- a/src/common/gsvector_neon.h
|
||||
+++ b/src/common/gsvector_neon.h
|
||||
@@ -867,7 +867,7 @@ public:
|
||||
|
||||
ALWAYS_INLINE int mask() const
|
||||
{
|
||||
- const uint32x2_t masks = vshr_n_u32(vreinterpret_u32_s32(v2s), 31);
|
||||
+ const uint32x2_t masks = vshr_n_u32(vreinterpret_u32_f32(v2s), 31);
|
||||
return (vget_lane_u32(masks, 0) | (vget_lane_u32(masks, 1) << 1));
|
||||
}
|
||||
|
||||
@@ -2882,7 +2882,7 @@ public:
|
||||
ALWAYS_INLINE GSVector4 gt64(const GSVector4& v) const
|
||||
{
|
||||
#ifdef CPU_ARCH_ARM64
|
||||
- return GSVector4(vreinterpretq_f32_f64(vcgtq_f64(vreinterpretq_f64_f32(v4s), vreinterpretq_f64_f32(v.v4s))));
|
||||
+ return GSVector4(vreinterpretq_f32_u64(vcgtq_f64(vreinterpretq_f64_f32(v4s), vreinterpretq_f64_f32(v.v4s))));
|
||||
#else
|
||||
GSVector4 ret;
|
||||
ret.U64[0] = (F64[0] > v.F64[0]) ? 0xFFFFFFFFFFFFFFFFULL : 0;
|
||||
@@ -2894,7 +2894,7 @@ public:
|
||||
ALWAYS_INLINE GSVector4 eq64(const GSVector4& v) const
|
||||
{
|
||||
#ifdef CPU_ARCH_ARM64
|
||||
- return GSVector4(vreinterpretq_f32_f64(vceqq_f64(vreinterpretq_f64_f32(v4s), vreinterpretq_f64_f32(v.v4s))));
|
||||
+ return GSVector4(vreinterpretq_f32_u64(vceqq_f64(vreinterpretq_f64_f32(v4s), vreinterpretq_f64_f32(v.v4s))));
|
||||
#else
|
||||
GSVector4 ret;
|
||||
ret.U64[0] = (F64[0] == v.F64[0]) ? 0xFFFFFFFFFFFFFFFFULL : 0;
|
||||
@@ -2906,7 +2906,7 @@ public:
|
||||
ALWAYS_INLINE GSVector4 lt64(const GSVector4& v) const
|
||||
{
|
||||
#ifdef CPU_ARCH_ARM64
|
||||
- return GSVector4(vreinterpretq_f32_f64(vcgtq_f64(vreinterpretq_f64_f32(v4s), vreinterpretq_f64_f32(v.v4s))));
|
||||
+ return GSVector4(vreinterpretq_f32_u64(vcgtq_f64(vreinterpretq_f64_f32(v4s), vreinterpretq_f64_f32(v.v4s))));
|
||||
#else
|
||||
GSVector4 ret;
|
||||
ret.U64[0] = (F64[0] < v.F64[0]) ? 0xFFFFFFFFFFFFFFFFULL : 0;
|
||||
@@ -2918,7 +2918,7 @@ public:
|
||||
ALWAYS_INLINE GSVector4 ge64(const GSVector4& v) const
|
||||
{
|
||||
#ifdef CPU_ARCH_ARM64
|
||||
- return GSVector4(vreinterpretq_f32_f64(vcgeq_f64(vreinterpretq_f64_f32(v4s), vreinterpretq_f64_f32(v.v4s))));
|
||||
+ return GSVector4(vreinterpretq_f32_u64(vcgeq_f64(vreinterpretq_f64_f32(v4s), vreinterpretq_f64_f32(v.v4s))));
|
||||
#else
|
||||
GSVector4 ret;
|
||||
ret.U64[0] = (F64[0] >= v.F64[0]) ? 0xFFFFFFFFFFFFFFFFULL : 0;
|
||||
@@ -2930,7 +2930,7 @@ public:
|
||||
ALWAYS_INLINE GSVector4 le64(const GSVector4& v) const
|
||||
{
|
||||
#ifdef CPU_ARCH_ARM64
|
||||
- return GSVector4(vreinterpretq_f32_f64(vcleq_f64(vreinterpretq_f64_f32(v4s), vreinterpretq_f64_f32(v.v4s))));
|
||||
+ return GSVector4(vreinterpretq_f32_u64(vcleq_f64(vreinterpretq_f64_f32(v4s), vreinterpretq_f64_f32(v.v4s))));
|
||||
#else
|
||||
GSVector4 ret;
|
||||
ret.U64[0] = (F64[0] <= v.F64[0]) ? 0xFFFFFFFFFFFFFFFFULL : 0;
|
||||
--
|
||||
2.47.0
|
||||
|
||||
@@ -0,0 +1,26 @@
|
||||
# The files in this folder are imported from nixpkg https://github.com/NixOS/nixpkgs .
|
||||
#
|
||||
# They have slight modifications to fix the package build on my home-manager systems.
|
||||
#
|
||||
# The original license is reproduced below:
|
||||
|
||||
Copyright (c) 2003-2025 Eelco Dolstra and the Nixpkgs/NixOS contributors
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining
|
||||
a copy of this software and associated documentation files (the
|
||||
"Software"), to deal in the Software without restriction, including
|
||||
without limitation the rights to use, copy, modify, merge, publish,
|
||||
distribute, sublicense, and/or sell copies of the Software, and to
|
||||
permit persons to whom the Software is furnished to do so, subject to
|
||||
the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be
|
||||
included in all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
||||
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
||||
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
||||
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
||||
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
@@ -0,0 +1,147 @@
|
||||
{
|
||||
lib,
|
||||
stdenv,
|
||||
llvmPackages,
|
||||
SDL2,
|
||||
callPackage,
|
||||
cmake,
|
||||
cpuinfo,
|
||||
cubeb,
|
||||
curl,
|
||||
extra-cmake-modules,
|
||||
libXrandr,
|
||||
libbacktrace,
|
||||
libwebp,
|
||||
makeWrapper,
|
||||
ninja,
|
||||
pkg-config,
|
||||
qt6,
|
||||
vulkan-loader,
|
||||
wayland,
|
||||
wayland-scanner,
|
||||
}:
|
||||
|
||||
let
|
||||
sources = callPackage ./sources.nix { };
|
||||
inherit (qt6)
|
||||
qtbase
|
||||
qtsvg
|
||||
qttools
|
||||
qtwayland
|
||||
wrapQtAppsHook
|
||||
;
|
||||
in
|
||||
llvmPackages.stdenv.mkDerivation (finalAttrs: {
|
||||
inherit (sources.duckstation) pname version src;
|
||||
|
||||
patches = [
|
||||
# Tests are not built by default
|
||||
./001-fix-test-inclusion.diff
|
||||
# Patching yet another script that fills data based on git commands . . .
|
||||
./002-hardcode-vars.diff
|
||||
# Fix NEON intrinsics usage
|
||||
./003-fix-NEON-intrinsics.patch
|
||||
./remove-cubeb-vendor.patch
|
||||
];
|
||||
|
||||
nativeBuildInputs = [
|
||||
cmake
|
||||
extra-cmake-modules
|
||||
ninja
|
||||
pkg-config
|
||||
qttools
|
||||
wayland-scanner
|
||||
wrapQtAppsHook
|
||||
];
|
||||
|
||||
buildInputs = [
|
||||
SDL2
|
||||
cpuinfo
|
||||
cubeb
|
||||
curl
|
||||
libXrandr
|
||||
libbacktrace
|
||||
libwebp
|
||||
qtbase
|
||||
qtsvg
|
||||
qtwayland
|
||||
sources.discord-rpc-patched
|
||||
sources.lunasvg
|
||||
sources.shaderc-patched
|
||||
sources.soundtouch-patched
|
||||
sources.spirv-cross-patched
|
||||
wayland
|
||||
];
|
||||
|
||||
cmakeFlags = [
|
||||
(lib.cmakeBool "BUILD_TESTS" true)
|
||||
];
|
||||
|
||||
strictDeps = true;
|
||||
|
||||
doInstallCheck = true;
|
||||
|
||||
postPatch = ''
|
||||
gitHash=$(cat .nixpkgs-auxfiles/git_hash) \
|
||||
gitBranch=$(cat .nixpkgs-auxfiles/git_branch) \
|
||||
gitTag=$(cat .nixpkgs-auxfiles/git_tag) \
|
||||
gitDate=$(cat .nixpkgs-auxfiles/git_date) \
|
||||
substituteAllInPlace src/scmversion/gen_scmversion.sh
|
||||
'';
|
||||
|
||||
# error: cannot convert 'int16x8_t' to '__Int32x4_t'
|
||||
env.NIX_CFLAGS_COMPILE = lib.optionalString stdenv.hostPlatform.isAarch64 "-flax-vector-conversions";
|
||||
|
||||
installCheckPhase = ''
|
||||
runHook preInstallCheck
|
||||
|
||||
$out/share/duckstation/common-tests
|
||||
|
||||
runHook postInstallCheck
|
||||
'';
|
||||
|
||||
installPhase = ''
|
||||
runHook preInstall
|
||||
|
||||
mkdir -p $out/bin $out/share
|
||||
|
||||
cp -r bin $out/share/duckstation
|
||||
ln -s $out/share/duckstation/duckstation-qt $out/bin/
|
||||
|
||||
install -Dm644 $src/scripts/org.duckstation.DuckStation.desktop $out/share/applications/org.duckstation.DuckStation.desktop
|
||||
install -Dm644 $src/scripts/org.duckstation.DuckStation.png $out/share/pixmaps/org.duckstation.DuckStation.png
|
||||
|
||||
runHook postInstall
|
||||
'';
|
||||
|
||||
qtWrapperArgs =
|
||||
let
|
||||
libPath = lib.makeLibraryPath ([
|
||||
sources.shaderc-patched
|
||||
sources.spirv-cross-patched
|
||||
vulkan-loader
|
||||
]);
|
||||
in
|
||||
[
|
||||
"--prefix LD_LIBRARY_PATH : ${libPath}"
|
||||
];
|
||||
|
||||
# https://github.com/stenzek/duckstation/blob/master/scripts/appimage/apprun-hooks/default-to-x11.sh
|
||||
# Can't avoid the double wrapping, the binary wrapper from qtWrapperArgs doesn't support --run
|
||||
postFixup = ''
|
||||
source "${makeWrapper}/nix-support/setup-hook"
|
||||
wrapProgram $out/bin/duckstation-qt \
|
||||
--run 'if [[ -z $I_WANT_A_BROKEN_WAYLAND_UI ]]; then export QT_QPA_PLATFORM=xcb; fi'
|
||||
'';
|
||||
|
||||
meta = {
|
||||
homepage = "https://github.com/stenzek/duckstation";
|
||||
description = "Fast PlayStation 1 emulator for x86-64/AArch32/AArch64";
|
||||
license = lib.licenses.gpl3Only;
|
||||
mainProgram = "duckstation-qt";
|
||||
maintainers = with lib.maintainers; [
|
||||
guibou
|
||||
];
|
||||
platforms = lib.platforms.linux;
|
||||
};
|
||||
})
|
||||
@@ -0,0 +1,33 @@
|
||||
diff --git a/dep/CMakeLists.txt b/dep/CMakeLists.txt
|
||||
index af35687..8347825 100644
|
||||
--- a/dep/CMakeLists.txt
|
||||
+++ b/dep/CMakeLists.txt
|
||||
@@ -22,9 +22,8 @@ add_subdirectory(rcheevos EXCLUDE_FROM_ALL)
|
||||
disable_compiler_warnings_for_target(rcheevos)
|
||||
add_subdirectory(rapidyaml EXCLUDE_FROM_ALL)
|
||||
disable_compiler_warnings_for_target(rapidyaml)
|
||||
-add_subdirectory(cubeb EXCLUDE_FROM_ALL)
|
||||
-disable_compiler_warnings_for_target(cubeb)
|
||||
-disable_compiler_warnings_for_target(speex)
|
||||
+find_package(cubeb REQUIRED GLOBAL)
|
||||
+add_library(cubeb ALIAS cubeb::cubeb)
|
||||
add_subdirectory(kissfft EXCLUDE_FROM_ALL)
|
||||
disable_compiler_warnings_for_target(kissfft)
|
||||
|
||||
diff --git a/src/util/cubeb_audio_stream.cpp b/src/util/cubeb_audio_stream.cpp
|
||||
index 85579c4..339190a 100644
|
||||
--- a/src/util/cubeb_audio_stream.cpp
|
||||
+++ b/src/util/cubeb_audio_stream.cpp
|
||||
@@ -261,9 +261,9 @@ std::vector<std::pair<std::string, std::string>> AudioStream::GetCubebDriverName
|
||||
std::vector<std::pair<std::string, std::string>> names;
|
||||
names.emplace_back(std::string(), TRANSLATE_STR("AudioStream", "Default"));
|
||||
|
||||
- const char** cubeb_names = cubeb_get_backend_names();
|
||||
- for (u32 i = 0; cubeb_names[i] != nullptr; i++)
|
||||
- names.emplace_back(cubeb_names[i], cubeb_names[i]);
|
||||
+ cubeb_backend_names backends = cubeb_get_backend_names();
|
||||
+ for (u32 i = 0; i < backends.count; i++)
|
||||
+ names.emplace_back(backends.names[i], backends.names[i]);
|
||||
return names;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,20 @@
|
||||
{
|
||||
fetchpatch,
|
||||
duckstation,
|
||||
shaderc,
|
||||
}:
|
||||
|
||||
shaderc.overrideAttrs (old: {
|
||||
pname = "shaderc-patched-for-duckstation";
|
||||
patches = (old.patches or [ ]) ++ [
|
||||
(fetchpatch {
|
||||
url = "file://${duckstation.src}/scripts/shaderc-changes.patch";
|
||||
hash = "sha256-Ps/D+CdSbjVWg3ZGOEcgbpQbCNkI5Nuizm4E5qiM9Wo=";
|
||||
excludes = [
|
||||
"CHANGES"
|
||||
"CMakeLists.txt"
|
||||
"libshaderc/CMakeLists.txt"
|
||||
];
|
||||
})
|
||||
];
|
||||
})
|
||||
@@ -0,0 +1,166 @@
|
||||
{
|
||||
lib,
|
||||
duckstation,
|
||||
fetchFromGitHub,
|
||||
fetchpatch,
|
||||
shaderc,
|
||||
spirv-cross,
|
||||
discord-rpc,
|
||||
stdenv,
|
||||
cmake,
|
||||
ninja,
|
||||
}:
|
||||
|
||||
{
|
||||
duckstation =
|
||||
let
|
||||
self = {
|
||||
pname = "duckstation";
|
||||
version = "0.1-7465";
|
||||
src = fetchFromGitHub {
|
||||
owner = "stenzek";
|
||||
repo = "duckstation";
|
||||
rev = "aa955b8ae28314ae061613f0ddf13183a98aca03";
|
||||
#
|
||||
# Some files are filled by using Git commands; it requires deepClone.
|
||||
# More info at `checkout_ref` function in nix-prefetch-git.
|
||||
# However, `.git` is a bit nondeterministic (and Git itself makes no
|
||||
# guarantees whatsoever).
|
||||
# Then, in order to enhance reproducibility, what we will do here is:
|
||||
#
|
||||
# - Execute the desired Git commands;
|
||||
# - Save the obtained info into files;
|
||||
# - Remove `.git` afterwards.
|
||||
#
|
||||
deepClone = true;
|
||||
postFetch = ''
|
||||
cd $out
|
||||
mkdir -p .nixpkgs-auxfiles/
|
||||
git rev-parse HEAD > .nixpkgs-auxfiles/git_hash
|
||||
git rev-parse --abbrev-ref HEAD | tr -d '\r\n' > .nixpkgs-auxfiles/git_branch
|
||||
git describe --dirty | tr -d '\r\n' > .nixpkgs-auxfiles/git_tag
|
||||
git log -1 --date=iso8601-strict --format=%cd > .nixpkgs-auxfiles/git_date
|
||||
find $out -name .git -print0 | xargs -0 rm -fr
|
||||
'';
|
||||
hash = "sha256-ixrlr7Rm6GZAn/kh2sSeCCiK/qdmQ5+5jbbhAKjTx/E=";
|
||||
};
|
||||
};
|
||||
in
|
||||
self;
|
||||
|
||||
shaderc-patched = shaderc.overrideAttrs (
|
||||
old:
|
||||
let
|
||||
version = "2024.3-unstable-2024-08-24";
|
||||
src = fetchFromGitHub {
|
||||
owner = "stenzek";
|
||||
repo = "shaderc";
|
||||
rev = "f60bb80e255144e71776e2ad570d89b78ea2ab4f";
|
||||
hash = "sha256-puZxkrEVhhUT4UcCtEDmtOMX4ugkB6ooMhKRBlb++lE=";
|
||||
};
|
||||
in
|
||||
{
|
||||
pname = "shaderc-patched-for-duckstation";
|
||||
inherit version src;
|
||||
patches = (old.patches or [ ]);
|
||||
cmakeFlags = (old.cmakeFlags or [ ]) ++ [
|
||||
(lib.cmakeBool "SHADERC_SKIP_EXAMPLES" true)
|
||||
(lib.cmakeBool "SHADERC_SKIP_TESTS" true)
|
||||
];
|
||||
outputs = [
|
||||
"out"
|
||||
"lib"
|
||||
"dev"
|
||||
];
|
||||
postFixup = '''';
|
||||
}
|
||||
);
|
||||
spirv-cross-patched = spirv-cross.overrideAttrs (
|
||||
old:
|
||||
let
|
||||
version = "1.3.290.0";
|
||||
src = fetchFromGitHub {
|
||||
owner = "KhronosGroup";
|
||||
repo = "SPIRV-Cross";
|
||||
rev = "vulkan-sdk-${version}";
|
||||
hash = "sha256-h5My9PbPq1l03xpXQQFolNy7G1RhExtTH6qPg7vVF/8=";
|
||||
};
|
||||
in
|
||||
{
|
||||
pname = "spirv-cross-patched-for-duckstation";
|
||||
inherit version src;
|
||||
patches = (old.patches or [ ]);
|
||||
cmakeFlags = (old.cmakeFlags or [ ]) ++ [
|
||||
(lib.cmakeBool "SPIRV_CROSS_CLI" false)
|
||||
(lib.cmakeBool "SPIRV_CROSS_ENABLE_CPP" false)
|
||||
(lib.cmakeBool "SPIRV_CROSS_ENABLE_C_API" true)
|
||||
(lib.cmakeBool "SPIRV_CROSS_ENABLE_GLSL" true)
|
||||
(lib.cmakeBool "SPIRV_CROSS_ENABLE_HLSL" false)
|
||||
(lib.cmakeBool "SPIRV_CROSS_ENABLE_MSL" false)
|
||||
(lib.cmakeBool "SPIRV_CROSS_ENABLE_REFLECT" false)
|
||||
(lib.cmakeBool "SPIRV_CROSS_ENABLE_TESTS" false)
|
||||
(lib.cmakeBool "SPIRV_CROSS_ENABLE_UTIL" true)
|
||||
(lib.cmakeBool "SPIRV_CROSS_SHARED" true)
|
||||
(lib.cmakeBool "SPIRV_CROSS_STATIC" false)
|
||||
];
|
||||
}
|
||||
);
|
||||
discord-rpc-patched = discord-rpc.overrideAttrs (old: {
|
||||
pname = "discord-rpc-patched-for-duckstation";
|
||||
version = "3.4.0-unstable-2024-08-02";
|
||||
src = fetchFromGitHub {
|
||||
owner = "stenzek";
|
||||
repo = "discord-rpc";
|
||||
rev = "144f3a3f1209994d8d9e8a87964a989cb9911c1e";
|
||||
hash = "sha256-VyL8bEjY001eHWcEoUPIAFDAmaAbwcNb1hqlV2a3cWs=";
|
||||
};
|
||||
patches = (old.patches or [ ]);
|
||||
});
|
||||
|
||||
soundtouch-patched = stdenv.mkDerivation (finalAttrs: {
|
||||
pname = "soundtouch-patched-for-duckstation";
|
||||
version = "2.2.3-unstable-2024-08-02";
|
||||
src = fetchFromGitHub {
|
||||
owner = "stenzek";
|
||||
repo = "soundtouch";
|
||||
rev = "463ade388f3a51da078dc9ed062bf28e4ba29da7";
|
||||
hash = "sha256-hvBW/z+fmh/itNsJnlDBtiI1DZmUMO9TpHEztjo2pA0=";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [
|
||||
cmake
|
||||
ninja
|
||||
];
|
||||
|
||||
meta = {
|
||||
homepage = "https://github.com/stenzek/soundtouch";
|
||||
description = "SoundTouch Audio Processing Library (forked from https://codeberg.org/soundtouch/soundtouch)";
|
||||
license = lib.licenses.lgpl21;
|
||||
platforms = lib.platforms.linux;
|
||||
};
|
||||
|
||||
});
|
||||
|
||||
lunasvg = stdenv.mkDerivation (finalAttrs: {
|
||||
pname = "lunasvg-patched-for-duckstation";
|
||||
version = "2.4.1-unstable-2024-08-24";
|
||||
src = fetchFromGitHub {
|
||||
owner = "stenzek";
|
||||
repo = "lunasvg";
|
||||
rev = "9af1ac7b90658a279b372add52d6f77a4ebb482c";
|
||||
hash = "sha256-ZzOe84ZF5JRrJ9Lev2lwYOccqtEGcf76dyCDBDTvI2o=";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [
|
||||
cmake
|
||||
ninja
|
||||
];
|
||||
|
||||
meta = {
|
||||
homepage = "https://github.com/stenzek/lunasvg";
|
||||
description = "Standalone SVG rendering library in C++";
|
||||
license = lib.licenses.mit;
|
||||
platforms = lib.platforms.linux;
|
||||
};
|
||||
});
|
||||
}
|
||||
@@ -49,6 +49,7 @@ in
|
||||
(
|
||||
final: prev:
|
||||
let
|
||||
modified_package = (pkgs.callPackage ./package/package.nix { });
|
||||
optimizeWithFlags =
|
||||
pkg: flags:
|
||||
pkg.overrideAttrs (old: {
|
||||
@@ -57,12 +58,12 @@ in
|
||||
});
|
||||
original_package =
|
||||
if config.me.optimizations.enable then
|
||||
(optimizeWithFlags prev.shipwright [
|
||||
(optimizeWithFlags modified_package [
|
||||
"-march=znver2"
|
||||
"-mtune=znver2"
|
||||
])
|
||||
else
|
||||
prev.shipwright;
|
||||
modified_package;
|
||||
in
|
||||
{
|
||||
shipwright = pkgs.buildEnv {
|
||||
|
||||
@@ -0,0 +1,26 @@
|
||||
# The files in this folder are imported from nixpkg https://github.com/NixOS/nixpkgs .
|
||||
#
|
||||
# They have slight modifications to fix the package build on my home-manager systems.
|
||||
#
|
||||
# The original license is reproduced below:
|
||||
|
||||
Copyright (c) 2003-2025 Eelco Dolstra and the Nixpkgs/NixOS contributors
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining
|
||||
a copy of this software and associated documentation files (the
|
||||
"Software"), to deal in the Software without restriction, including
|
||||
without limitation the rights to use, copy, modify, merge, publish,
|
||||
distribute, sublicense, and/or sell copies of the Software, and to
|
||||
permit persons to whom the Software is furnished to do so, subject to
|
||||
the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be
|
||||
included in all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
||||
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
||||
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
||||
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
||||
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
@@ -0,0 +1,37 @@
|
||||
diff --git a/CMakeLists.txt b/CMakeLists.txt
|
||||
index 2771ee8c..0702adad 100644
|
||||
--- a/CMakeLists.txt
|
||||
+++ b/CMakeLists.txt
|
||||
@@ -250,17 +250,13 @@ endif()
|
||||
if(CMAKE_SYSTEM_NAME MATCHES "Darwin")
|
||||
add_custom_target(CreateOSXIcons
|
||||
COMMAND mkdir -p ${CMAKE_BINARY_DIR}/macosx/soh.iconset
|
||||
- COMMAND sips -z 16 16 ${CMAKE_SOURCE_DIR}/soh/macosx/sohIcon.png --out ${CMAKE_BINARY_DIR}/macosx/soh.iconset/icon_16x16.png
|
||||
- COMMAND sips -z 32 32 ${CMAKE_SOURCE_DIR}/soh/macosx/sohIcon.png --out ${CMAKE_BINARY_DIR}/macosx/soh.iconset/icon_16x16@2x.png
|
||||
- COMMAND sips -z 32 32 ${CMAKE_SOURCE_DIR}/soh/macosx/sohIcon.png --out ${CMAKE_BINARY_DIR}/macosx/soh.iconset/icon_32x32.png
|
||||
- COMMAND sips -z 64 64 ${CMAKE_SOURCE_DIR}/soh/macosx/sohIcon.png --out ${CMAKE_BINARY_DIR}/macosx/soh.iconset/icon_32x32@2x.png
|
||||
- COMMAND sips -z 128 128 ${CMAKE_SOURCE_DIR}/soh/macosx/sohIcon.png --out ${CMAKE_BINARY_DIR}/macosx/soh.iconset/icon_128x128.png
|
||||
- COMMAND sips -z 256 256 ${CMAKE_SOURCE_DIR}/soh/macosx/sohIcon.png --out ${CMAKE_BINARY_DIR}/macosx/soh.iconset/icon_128x128@2x.png
|
||||
- COMMAND sips -z 256 256 ${CMAKE_SOURCE_DIR}/soh/macosx/sohIcon.png --out ${CMAKE_BINARY_DIR}/macosx/soh.iconset/icon_256x256.png
|
||||
- COMMAND sips -z 512 512 ${CMAKE_SOURCE_DIR}/soh/macosx/sohIcon.png --out ${CMAKE_BINARY_DIR}/macosx/soh.iconset/icon_256x256@2x.png
|
||||
- COMMAND sips -z 512 512 ${CMAKE_SOURCE_DIR}/soh/macosx/sohIcon.png --out ${CMAKE_BINARY_DIR}/macosx/soh.iconset/icon_512x512.png
|
||||
- COMMAND cp ${CMAKE_SOURCE_DIR}/soh/macosx/sohIcon.png ${CMAKE_BINARY_DIR}/macosx/soh.iconset/icon_512x512@2x.png
|
||||
- COMMAND iconutil -c icns -o ${CMAKE_BINARY_DIR}/macosx/soh.icns ${CMAKE_BINARY_DIR}/macosx/soh.iconset
|
||||
+ COMMAND convert ${CMAKE_SOURCE_DIR}/soh/macosx/sohIcon.png -resize 16x16 ${CMAKE_BINARY_DIR}/macosx/soh.iconset/icon_16.png
|
||||
+ COMMAND convert ${CMAKE_SOURCE_DIR}/soh/macosx/sohIcon.png -resize 32x32 ${CMAKE_BINARY_DIR}/macosx/soh.iconset/icon_32.png
|
||||
+ COMMAND convert ${CMAKE_SOURCE_DIR}/soh/macosx/sohIcon.png -resize 64x64 ${CMAKE_BINARY_DIR}/macosx/soh.iconset/icon_64.png
|
||||
+ COMMAND convert ${CMAKE_SOURCE_DIR}/soh/macosx/sohIcon.png -resize 128x128 ${CMAKE_BINARY_DIR}/macosx/soh.iconset/icon_128.png
|
||||
+ COMMAND convert ${CMAKE_SOURCE_DIR}/soh/macosx/sohIcon.png -resize 256x256 ${CMAKE_BINARY_DIR}/macosx/soh.iconset/icon_256.png
|
||||
+ COMMAND convert ${CMAKE_SOURCE_DIR}/soh/macosx/sohIcon.png -resize 512x512 ${CMAKE_BINARY_DIR}/macosx/soh.iconset/icon_512.png
|
||||
+ COMMAND png2icns ${CMAKE_BINARY_DIR}/macosx/soh.icns ${CMAKE_BINARY_DIR}/macosx/soh.iconset/icon_{16,32,64,128,256,512}.png
|
||||
WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}
|
||||
COMMENT "Creating OSX icons ..."
|
||||
)
|
||||
@@ -288,7 +284,6 @@ INSTALL(CODE "FILE(RENAME \${CMAKE_INSTALL_PREFIX}/../MacOS/soh-macos \${CMAKE_I
|
||||
|
||||
install(CODE "
|
||||
include(BundleUtilities)
|
||||
- fixup_bundle(\"\${CMAKE_INSTALL_PREFIX}/../MacOS/soh\" \"\" \"${dirs}\")
|
||||
")
|
||||
|
||||
endif()
|
||||
@@ -0,0 +1,16 @@
|
||||
Submodule libultraship contains modified content
|
||||
diff --git a/libultraship/cmake/dependencies/common.cmake b/libultraship/cmake/dependencies/common.cmake
|
||||
index 596158c..c62d7b2 100644
|
||||
--- a/libultraship/cmake/dependencies/common.cmake
|
||||
+++ b/libultraship/cmake/dependencies/common.cmake
|
||||
@@ -47,10 +47,6 @@ set(stormlib_optimizations_patch git apply ${CMAKE_CURRENT_SOURCE_DIR}/cmake/dep
|
||||
endif()
|
||||
|
||||
#=================== STB ===================
|
||||
-set(STB_DIR ${CMAKE_BINARY_DIR}/_deps/stb)
|
||||
-file(DOWNLOAD "https://github.com/nothings/stb/raw/0bc88af4de5fb022db643c2d8e549a0927749354/stb_image.h" "${STB_DIR}/stb_image.h")
|
||||
-file(WRITE "${STB_DIR}/stb_impl.c" "#define STB_IMAGE_IMPLEMENTATION\n#include \"stb_image.h\"")
|
||||
-
|
||||
add_library(stb STATIC)
|
||||
|
||||
target_sources(stb PRIVATE
|
||||
@@ -0,0 +1,291 @@
|
||||
{
|
||||
apple-sdk_13,
|
||||
stdenv,
|
||||
cmake,
|
||||
lsb-release,
|
||||
ninja,
|
||||
lib,
|
||||
fetchFromGitHub,
|
||||
fetchurl,
|
||||
copyDesktopItems,
|
||||
makeDesktopItem,
|
||||
python3,
|
||||
glew,
|
||||
boost,
|
||||
SDL2,
|
||||
SDL2_net,
|
||||
pkg-config,
|
||||
libpulseaudio,
|
||||
libpng,
|
||||
imagemagick,
|
||||
zenity,
|
||||
makeWrapper,
|
||||
darwin,
|
||||
libicns,
|
||||
libzip,
|
||||
nlohmann_json,
|
||||
tinyxml-2,
|
||||
spdlog,
|
||||
writeTextFile,
|
||||
fixDarwinDylibNames,
|
||||
applyPatches,
|
||||
}:
|
||||
|
||||
let
|
||||
|
||||
# The following would normally get fetched at build time, or a specific version is required
|
||||
|
||||
shipwright_version = "9.0.5";
|
||||
shipwright_src = fetchFromGitHub {
|
||||
owner = "harbourmasters";
|
||||
repo = "shipwright";
|
||||
tag = shipwright_version;
|
||||
hash = "sha256-F5d4u3Nq/+yYiOgkH/bwWPhZDxgBpJ5ktee0Hc5UmEo=";
|
||||
fetchSubmodules = true;
|
||||
deepClone = true;
|
||||
postFetch = ''
|
||||
cd $out
|
||||
git branch --show-current > GIT_BRANCH
|
||||
git rev-parse --short=7 HEAD > GIT_COMMIT_HASH
|
||||
(git describe --tags --abbrev=0 --exact-match HEAD 2>/dev/null || echo "") > GIT_COMMIT_TAG
|
||||
rm -rf .git
|
||||
'';
|
||||
};
|
||||
|
||||
gamecontrollerdb = fetchFromGitHub {
|
||||
owner = "mdqinc";
|
||||
repo = "SDL_GameControllerDB";
|
||||
rev = "a74711e1e87733ccdf02d7020d8fa9e4fa67176e";
|
||||
hash = "sha256-rXC4akz9BaKzr/C2CryZC6RGk6+fGVG7RsQryUFUUk0=";
|
||||
};
|
||||
|
||||
imgui' = applyPatches {
|
||||
src = fetchFromGitHub {
|
||||
owner = "ocornut";
|
||||
repo = "imgui";
|
||||
tag = "v1.91.6-docking";
|
||||
hash = "sha256-28wyzzwXE02W5vbEdRCw2iOF8ONkb3M3Al8XlYBvz1A=";
|
||||
};
|
||||
patches = [
|
||||
"${shipwright_src}/libultraship/cmake/dependencies/patches/imgui-fixes-and-config.patch"
|
||||
];
|
||||
};
|
||||
|
||||
libgfxd = fetchFromGitHub {
|
||||
owner = "glankk";
|
||||
repo = "libgfxd";
|
||||
rev = "008f73dca8ebc9151b205959b17773a19c5bd0da";
|
||||
hash = "sha256-AmHAa3/cQdh7KAMFOtz5TQpcM6FqO9SppmDpKPTjTt8=";
|
||||
};
|
||||
|
||||
prism = fetchFromGitHub {
|
||||
owner = "KiritoDv";
|
||||
repo = "prism-processor";
|
||||
rev = "fb3f8b4a2d14dfcbae654d0f0e59a73b6f6ca850";
|
||||
hash = "sha256-gGdQSpX/TgCNZ0uyIDdnazgVHpAQhl30e+V0aVvTFMM=";
|
||||
};
|
||||
|
||||
stb_impl = writeTextFile {
|
||||
name = "stb_impl.c";
|
||||
text = ''
|
||||
#define STB_IMAGE_IMPLEMENTATION
|
||||
#include "stb_image.h"
|
||||
'';
|
||||
};
|
||||
|
||||
stb' = fetchurl {
|
||||
name = "stb_image.h";
|
||||
url = "https://raw.githubusercontent.com/nothings/stb/0bc88af4de5fb022db643c2d8e549a0927749354/stb_image.h";
|
||||
hash = "sha256-xUsVponmofMsdeLsI6+kQuPg436JS3PBl00IZ5sg3Vw=";
|
||||
};
|
||||
|
||||
stormlib' = applyPatches {
|
||||
src = fetchFromGitHub {
|
||||
owner = "ladislav-zezula";
|
||||
repo = "StormLib";
|
||||
tag = "v9.25";
|
||||
hash = "sha256-HTi2FKzKCbRaP13XERUmHkJgw8IfKaRJvsK3+YxFFdc=";
|
||||
};
|
||||
patches = [
|
||||
"${shipwright_src}/libultraship/cmake/dependencies/patches/stormlib-optimizations.patch"
|
||||
];
|
||||
};
|
||||
|
||||
thread_pool = fetchFromGitHub {
|
||||
owner = "bshoshany";
|
||||
repo = "thread-pool";
|
||||
tag = "v4.1.0";
|
||||
hash = "sha256-zhRFEmPYNFLqQCfvdAaG5VBNle9Qm8FepIIIrT9sh88=";
|
||||
};
|
||||
|
||||
metalcpp = fetchFromGitHub {
|
||||
owner = "briaguya-ai";
|
||||
repo = "single-header-metal-cpp";
|
||||
tag = "macOS13_iOS16";
|
||||
hash = "sha256-CSYIpmq478bla2xoPL/cGYKIWAeiORxyFFZr0+ixd7I";
|
||||
};
|
||||
in
|
||||
stdenv.mkDerivation (finalAttrs: {
|
||||
pname = "shipwright";
|
||||
version = shipwright_version;
|
||||
src = shipwright_src;
|
||||
|
||||
patches = [
|
||||
./darwin-fixes.patch
|
||||
./disable-downloading-stb_image.patch
|
||||
];
|
||||
|
||||
nativeBuildInputs = [
|
||||
cmake
|
||||
ninja
|
||||
pkg-config
|
||||
python3
|
||||
imagemagick
|
||||
makeWrapper
|
||||
]
|
||||
++ lib.optionals stdenv.hostPlatform.isLinux [
|
||||
lsb-release
|
||||
copyDesktopItems
|
||||
]
|
||||
++ lib.optionals stdenv.hostPlatform.isDarwin [
|
||||
libicns
|
||||
darwin.sigtool
|
||||
fixDarwinDylibNames
|
||||
];
|
||||
|
||||
buildInputs = [
|
||||
boost
|
||||
glew
|
||||
SDL2
|
||||
SDL2_net
|
||||
libpng
|
||||
libzip
|
||||
nlohmann_json
|
||||
tinyxml-2
|
||||
spdlog
|
||||
]
|
||||
++ lib.optionals stdenv.hostPlatform.isLinux [
|
||||
libpulseaudio
|
||||
zenity
|
||||
]
|
||||
++ lib.optionals stdenv.hostPlatform.isDarwin [
|
||||
# Metal.hpp requires macOS 13.x min.
|
||||
apple-sdk_13
|
||||
];
|
||||
|
||||
cmakeFlags = [
|
||||
(lib.cmakeBool "BUILD_REMOTE_CONTROL" true)
|
||||
(lib.cmakeBool "NON_PORTABLE" true)
|
||||
(lib.cmakeFeature "CMAKE_INSTALL_PREFIX" "${placeholder "out"}/lib")
|
||||
(lib.cmakeFeature "FETCHCONTENT_SOURCE_DIR_IMGUI" "${imgui'}")
|
||||
(lib.cmakeFeature "FETCHCONTENT_SOURCE_DIR_LIBGFXD" "${libgfxd}")
|
||||
(lib.cmakeFeature "FETCHCONTENT_SOURCE_DIR_PRISM" "${prism}")
|
||||
(lib.cmakeFeature "FETCHCONTENT_SOURCE_DIR_STORMLIB" "${stormlib'}")
|
||||
(lib.cmakeFeature "FETCHCONTENT_SOURCE_DIR_THREADPOOL" "${thread_pool}")
|
||||
]
|
||||
++ lib.optionals stdenv.hostPlatform.isDarwin [
|
||||
(lib.cmakeFeature "FETCHCONTENT_SOURCE_DIR_METALCPP" "${metalcpp}")
|
||||
(lib.cmakeFeature "FETCHCONTENT_SOURCE_DIR_SPDLOG" "${spdlog}")
|
||||
];
|
||||
|
||||
env.NIX_CFLAGS_COMPILE = lib.optionalString stdenv.hostPlatform.isDarwin "-Wno-int-conversion -Wno-implicit-int -Wno-elaborated-enum-base";
|
||||
|
||||
dontAddPrefix = true;
|
||||
|
||||
# Linking fails without this
|
||||
hardeningDisable = [ "format" ];
|
||||
|
||||
preConfigure = ''
|
||||
mkdir stb
|
||||
cp ${stb'} ./stb/${stb'.name}
|
||||
cp ${stb_impl} ./stb/${stb_impl.name}
|
||||
substituteInPlace libultraship/cmake/dependencies/common.cmake \
|
||||
--replace-fail "\''${STB_DIR}" "$(readlink -f ./stb)"
|
||||
'';
|
||||
|
||||
postPatch = ''
|
||||
substituteInPlace soh/src/boot/build.c.in \
|
||||
--replace-fail "@CMAKE_PROJECT_GIT_BRANCH@" "$(cat GIT_BRANCH)" \
|
||||
--replace-fail "@CMAKE_PROJECT_GIT_COMMIT_HASH@" "$(cat GIT_COMMIT_HASH)" \
|
||||
--replace-fail "@CMAKE_PROJECT_GIT_COMMIT_TAG@" "$(cat GIT_COMMIT_TAG)"
|
||||
'';
|
||||
|
||||
postBuild = ''
|
||||
port_ver=$(grep CMAKE_PROJECT_VERSION: "$PWD/CMakeCache.txt" | cut -d= -f2)
|
||||
cp ${gamecontrollerdb}/gamecontrollerdb.txt gamecontrollerdb.txt
|
||||
mv ../libultraship/src/graphic/Fast3D/shaders ../soh/assets/custom
|
||||
pushd ../OTRExporter
|
||||
python3 ./extract_assets.py -z ../build/ZAPD/ZAPD.out --norom --xml-root ../soh/assets/xml --custom-assets-path ../soh/assets/custom --custom-otr-file soh.otr --port-ver $port_ver
|
||||
popd
|
||||
'';
|
||||
|
||||
preInstall = ''
|
||||
# Cmake likes it here for its install paths
|
||||
cp ../OTRExporter/soh.otr soh/soh.otr
|
||||
'';
|
||||
|
||||
postInstall =
|
||||
lib.optionalString stdenv.hostPlatform.isLinux ''
|
||||
mkdir -p $out/bin
|
||||
ln -s $out/lib/soh.elf $out/bin/soh
|
||||
install -Dm644 ../soh/macosx/sohIcon.png $out/share/pixmaps/soh.png
|
||||
''
|
||||
+ lib.optionalString stdenv.hostPlatform.isDarwin ''
|
||||
# Recreate the macOS bundle (without using cpack)
|
||||
# We mirror the structure of the bundle distributed by the project
|
||||
|
||||
mkdir -p $out/Applications/soh.app/Contents
|
||||
cp $src/soh/macosx/Info.plist.in $out/Applications/soh.app/Contents/Info.plist
|
||||
substituteInPlace $out/Applications/soh.app/Contents/Info.plist \
|
||||
--replace-fail "@CMAKE_PROJECT_VERSION@" "${finalAttrs.version}"
|
||||
|
||||
mv $out/MacOS $out/Applications/soh.app/Contents/MacOS
|
||||
|
||||
# "lib" contains all resources that are in "Resources" in the official bundle.
|
||||
# We move them to the right place and symlink them back to $out/lib,
|
||||
# as that's where the game expects them.
|
||||
mv $out/Resources $out/Applications/soh.app/Contents/Resources
|
||||
mv $out/lib/** $out/Applications/soh.app/Contents/Resources
|
||||
rm -rf $out/lib
|
||||
ln -s $out/Applications/soh.app/Contents/Resources $out/lib
|
||||
|
||||
# Copy icons
|
||||
cp -r ../build/macosx/soh.icns $out/Applications/soh.app/Contents/Resources/soh.icns
|
||||
|
||||
# Codesign (ad-hoc)
|
||||
codesign -f -s - $out/Applications/soh.app/Contents/MacOS/soh
|
||||
'';
|
||||
|
||||
fixupPhase = lib.optionalString stdenv.hostPlatform.isLinux ''
|
||||
wrapProgram $out/lib/soh.elf --prefix PATH ":" ${lib.makeBinPath [ zenity ]}
|
||||
'';
|
||||
|
||||
desktopItems = [
|
||||
(makeDesktopItem {
|
||||
name = "soh";
|
||||
icon = "soh";
|
||||
exec = "soh";
|
||||
comment = finalAttrs.meta.description;
|
||||
genericName = "Ship of Harkinian";
|
||||
desktopName = "soh";
|
||||
categories = [ "Game" ];
|
||||
})
|
||||
];
|
||||
|
||||
meta = {
|
||||
homepage = "https://github.com/HarbourMasters/Shipwright";
|
||||
description = "PC port of Ocarina of Time with modern controls, widescreen, high-resolution, and more";
|
||||
mainProgram = "soh";
|
||||
platforms = lib.platforms.linux ++ lib.platforms.darwin;
|
||||
maintainers = with lib.maintainers; [
|
||||
j0lol
|
||||
matteopacini
|
||||
];
|
||||
license = with lib.licenses; [
|
||||
# OTRExporter, OTRGui, ZAPDTR, libultraship
|
||||
mit
|
||||
# Ship of Harkinian itself
|
||||
unfree
|
||||
];
|
||||
};
|
||||
})
|
||||
89
nix/steam_deck/configuration/roles/spaghettikart/default.nix
Normal file
89
nix/steam_deck/configuration/roles/spaghettikart/default.nix
Normal file
@@ -0,0 +1,89 @@
|
||||
{
|
||||
config,
|
||||
lib,
|
||||
pkgs,
|
||||
...
|
||||
}:
|
||||
|
||||
let
|
||||
steam_spaghettikart = pkgs.writeScriptBin "steam_Spaghettify" ''
|
||||
export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:${pkgs.libglvnd}/lib"
|
||||
exec ${pkgs.spaghettikart}/bin/Spaghettify "''${@}"
|
||||
'';
|
||||
in
|
||||
{
|
||||
imports = [ ];
|
||||
|
||||
options.me = {
|
||||
spaghettikart.enable = lib.mkOption {
|
||||
type = lib.types.bool;
|
||||
default = false;
|
||||
example = true;
|
||||
description = "Whether we want to install spaghettikart.";
|
||||
};
|
||||
};
|
||||
|
||||
config = lib.mkIf config.me.spaghettikart.enable (
|
||||
lib.mkMerge [
|
||||
{
|
||||
allowedUnfree = [ "spaghettikart" ];
|
||||
}
|
||||
(lib.mkIf config.me.graphical {
|
||||
home.packages = with pkgs; [
|
||||
spaghettikart
|
||||
steam_spaghettikart
|
||||
];
|
||||
|
||||
home.file.".local/share/spaghettikart/spaghettify.cfg.json" = {
|
||||
source = ./files/spaghettify.cfg.json;
|
||||
};
|
||||
|
||||
home.persistence."/home/deck/.persist" = {
|
||||
files = [
|
||||
".local/share/spaghettikart/default.sav"
|
||||
".local/share/spaghettikart/mk64.o2r"
|
||||
];
|
||||
};
|
||||
|
||||
nixpkgs.overlays = [
|
||||
(
|
||||
final: prev:
|
||||
let
|
||||
modified_package = (pkgs.callPackage ./package/package.nix { });
|
||||
optimizeWithFlags =
|
||||
pkg: flags:
|
||||
pkg.overrideAttrs (old: {
|
||||
NIX_CFLAGS_COMPILE = [ (old.NIX_CFLAGS_COMPILE or "") ] ++ flags;
|
||||
});
|
||||
original_package =
|
||||
if config.me.optimizations.enable then
|
||||
(optimizeWithFlags modified_package [
|
||||
"-march=znver2"
|
||||
"-mtune=znver2"
|
||||
])
|
||||
else
|
||||
modified_package;
|
||||
in
|
||||
{
|
||||
spaghettikart = pkgs.buildEnv {
|
||||
name = prev.spaghettikart.name;
|
||||
paths = [
|
||||
(config.lib.nixGL.wrap original_package)
|
||||
];
|
||||
extraOutputsToInstall = [
|
||||
"man"
|
||||
"doc"
|
||||
"info"
|
||||
];
|
||||
# We have to use 555 instead of the normal 444 here because the .desktop file ends up inside $HOME on steam deck and desktop files must be either not in $HOME or must be executable, otherwise KDE Plasma refuses to execute them.
|
||||
postBuild = ''
|
||||
chmod 0555 $out/share/applications/spaghettikart.desktop
|
||||
'';
|
||||
};
|
||||
}
|
||||
)
|
||||
];
|
||||
})
|
||||
]
|
||||
);
|
||||
}
|
||||
@@ -0,0 +1,14 @@
|
||||
{
|
||||
"CVars": {
|
||||
"gDisableLod": 1,
|
||||
"gMSAAValue": 2,
|
||||
"gShowSpaghettiVersion": 0,
|
||||
"gSkipIntro": 1,
|
||||
"gVsyncEnabled": 1
|
||||
},
|
||||
"Window": {
|
||||
"Fullscreen": {
|
||||
"Enabled": true
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,26 @@
|
||||
# The files in this folder are imported from nixpkg https://github.com/NixOS/nixpkgs .
|
||||
#
|
||||
# They have slight modifications to fix the package build on my home-manager systems.
|
||||
#
|
||||
# The original license is reproduced below:
|
||||
|
||||
Copyright (c) 2003-2025 Eelco Dolstra and the Nixpkgs/NixOS contributors
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining
|
||||
a copy of this software and associated documentation files (the
|
||||
"Software"), to deal in the Software without restriction, including
|
||||
without limitation the rights to use, copy, modify, merge, publish,
|
||||
distribute, sublicense, and/or sell copies of the Software, and to
|
||||
permit persons to whom the Software is furnished to do so, subject to
|
||||
the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be
|
||||
included in all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
||||
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
||||
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
||||
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
||||
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
@@ -0,0 +1,16 @@
|
||||
Submodule libultraship contains modified content
|
||||
diff --git a/libultraship/cmake/dependencies/common.cmake b/libultraship/cmake/dependencies/common.cmake
|
||||
index 596158c..c62d7b2 100644
|
||||
--- a/libultraship/cmake/dependencies/common.cmake
|
||||
+++ b/libultraship/cmake/dependencies/common.cmake
|
||||
@@ -47,10 +47,6 @@ set(stormlib_optimizations_patch git apply ${CMAKE_CURRENT_SOURCE_DIR}/cmake/dep
|
||||
endif()
|
||||
|
||||
#=================== STB ===================
|
||||
-set(STB_DIR ${CMAKE_BINARY_DIR}/_deps/stb)
|
||||
-file(DOWNLOAD "https://github.com/nothings/stb/raw/0bc88af4de5fb022db643c2d8e549a0927749354/stb_image.h" "${STB_DIR}/stb_image.h")
|
||||
-file(WRITE "${STB_DIR}/stb_impl.c" "#define STB_IMAGE_IMPLEMENTATION\n#include \"stb_image.h\"")
|
||||
-
|
||||
add_library(stb STATIC)
|
||||
|
||||
target_sources(stb PRIVATE
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user