Compare commits
3 Commits
b32635fe71
...
install_fi
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
504f8ecf09 | ||
|
|
7254bc8c7c | ||
|
|
a32f6bf0d1 |
@@ -8,7 +8,6 @@
|
|||||||
lg = log --color --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --abbrev-commit
|
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
|
bh = log --oneline --branches=* --remotes=* --graph --decorate
|
||||||
amend = commit --amend --no-edit
|
amend = commit --amend --no-edit
|
||||||
authorcount = shortlog --summary --numbered --all --no-merges
|
|
||||||
[core]
|
[core]
|
||||||
excludesfile = ~/.gitignore_global
|
excludesfile = ~/.gitignore_global
|
||||||
[commit]
|
[commit]
|
||||||
|
|||||||
@@ -8,7 +8,6 @@
|
|||||||
lg = log --color --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --abbrev-commit
|
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
|
bh = log --oneline --branches=* --remotes=* --graph --decorate
|
||||||
amend = commit --amend --no-edit
|
amend = commit --amend --no-edit
|
||||||
authorcount = shortlog --summary --numbered --all --no-merges
|
|
||||||
[core]
|
[core]
|
||||||
excludesfile = ~/.gitignore_global
|
excludesfile = ~/.gitignore_global
|
||||||
[commit]
|
[commit]
|
||||||
|
|||||||
@@ -2,6 +2,7 @@
|
|||||||
config,
|
config,
|
||||||
lib,
|
lib,
|
||||||
pkgs,
|
pkgs,
|
||||||
|
home-manager,
|
||||||
...
|
...
|
||||||
}:
|
}:
|
||||||
|
|
||||||
@@ -9,15 +10,12 @@
|
|||||||
imports = [
|
imports = [
|
||||||
./roles/2ship2harkinian
|
./roles/2ship2harkinian
|
||||||
./roles/alacritty
|
./roles/alacritty
|
||||||
./roles/amd_s2idle
|
|
||||||
./roles/ansible
|
./roles/ansible
|
||||||
./roles/ares
|
./roles/ares
|
||||||
./roles/bluetooth
|
./roles/bluetooth
|
||||||
./roles/boot
|
./roles/boot
|
||||||
./roles/chromecast
|
./roles/chromecast
|
||||||
./roles/chromium
|
./roles/chromium
|
||||||
./roles/d2
|
|
||||||
./roles/direnv
|
|
||||||
./roles/distributed_build
|
./roles/distributed_build
|
||||||
./roles/docker
|
./roles/docker
|
||||||
./roles/ecc
|
./roles/ecc
|
||||||
@@ -54,7 +52,6 @@
|
|||||||
./roles/reset
|
./roles/reset
|
||||||
./roles/rpcs3
|
./roles/rpcs3
|
||||||
./roles/rust
|
./roles/rust
|
||||||
./roles/shadps4
|
|
||||||
./roles/shikane
|
./roles/shikane
|
||||||
./roles/shipwright
|
./roles/shipwright
|
||||||
./roles/sm64ex
|
./roles/sm64ex
|
||||||
@@ -79,6 +76,10 @@
|
|||||||
./util/unfree_polyfill
|
./util/unfree_polyfill
|
||||||
];
|
];
|
||||||
|
|
||||||
|
me.install.user.talexander.file."/home/talexander/flake.nix" = {
|
||||||
|
source = ./flake.nix;
|
||||||
|
};
|
||||||
|
|
||||||
nix.settings.experimental-features = [
|
nix.settings.experimental-features = [
|
||||||
"nix-command"
|
"nix-command"
|
||||||
"flakes"
|
"flakes"
|
||||||
@@ -124,14 +125,27 @@
|
|||||||
];
|
];
|
||||||
};
|
};
|
||||||
users.groups.talexander.gid = 11235;
|
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
|
# Automatic garbage collection
|
||||||
nix.gc = lib.mkIf (!config.me.buildingIso) {
|
nix.gc = lib.mkIf (!config.me.buildingIso) {
|
||||||
# Runs nix-collect-garbage --delete-older-than 5d
|
# Runs nix-collect-garbage --delete-older-than 5d
|
||||||
automatic = true;
|
automatic = true;
|
||||||
persistent = true;
|
randomizedDelaySec = "14m";
|
||||||
dates = "monthly";
|
|
||||||
# randomizedDelaySec = "14m";
|
|
||||||
options = "--delete-older-than 30d";
|
options = "--delete-older-than 30d";
|
||||||
};
|
};
|
||||||
nix.settings.auto-optimise-store = !config.me.buildingIso;
|
nix.settings.auto-optimise-store = !config.me.buildingIso;
|
||||||
@@ -160,7 +174,7 @@
|
|||||||
pciutils # for lspci
|
pciutils # for lspci
|
||||||
ripgrep
|
ripgrep
|
||||||
strace
|
strace
|
||||||
# ltrace # Disabled because it uses more than 48GB of /tmp space during test phase.
|
ltrace
|
||||||
trace-cmd # ftrace
|
trace-cmd # ftrace
|
||||||
tcpdump
|
tcpdump
|
||||||
git-crypt
|
git-crypt
|
||||||
|
|||||||
69
nix/configuration/flake.lock
generated
69
nix/configuration/flake.lock
generated
@@ -39,11 +39,11 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1756733629,
|
"lastModified": 1746729224,
|
||||||
"narHash": "sha256-dwWGlDhcO5SMIvMSTB4mjQ5Pvo2vtxvpIknhVnSz2I8=",
|
"narHash": "sha256-9R4sOLAK1w3Bq54H3XOJogdc7a6C2bLLmatOQ+5pf5w=",
|
||||||
"owner": "nix-community",
|
"owner": "nix-community",
|
||||||
"repo": "disko",
|
"repo": "disko",
|
||||||
"rev": "a5c4f2ab72e3d1ab43e3e65aa421c6f2bd2e12a1",
|
"rev": "85555d27ded84604ad6657ecca255a03fd878607",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
@@ -147,6 +147,26 @@
|
|||||||
"type": "github"
|
"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": {
|
"impermanence": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1737831083,
|
"lastModified": 1737831083,
|
||||||
@@ -189,22 +209,6 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"nixpkgs": {
|
"nixpkgs": {
|
||||||
"locked": {
|
|
||||||
"lastModified": 1756787288,
|
|
||||||
"narHash": "sha256-rw/PHa1cqiePdBxhF66V7R+WAP8WekQ0mCDG4CFqT8Y=",
|
|
||||||
"owner": "NixOS",
|
|
||||||
"repo": "nixpkgs",
|
|
||||||
"rev": "d0fc30899600b9b3466ddb260fd83deb486c32f1",
|
|
||||||
"type": "github"
|
|
||||||
},
|
|
||||||
"original": {
|
|
||||||
"owner": "NixOS",
|
|
||||||
"ref": "nixos-unstable",
|
|
||||||
"repo": "nixpkgs",
|
|
||||||
"type": "github"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"nixpkgs-dda3dcd3f": {
|
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1746663147,
|
"lastModified": 1746663147,
|
||||||
"narHash": "sha256-Ua0drDHawlzNqJnclTJGf87dBmaO/tn7iZ+TCkTRpRc=",
|
"narHash": "sha256-Ua0drDHawlzNqJnclTJGf87dBmaO/tn7iZ+TCkTRpRc=",
|
||||||
@@ -215,8 +219,24 @@
|
|||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
"owner": "NixOS",
|
"owner": "NixOS",
|
||||||
|
"ref": "nixos-unstable",
|
||||||
"repo": "nixpkgs",
|
"repo": "nixpkgs",
|
||||||
"rev": "dda3dcd3fe03e991015e9a74b22d35950f264a54",
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"nixpkgs-b93b4e9b5": {
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1713721570,
|
||||||
|
"narHash": "sha256-R0s+O5UjTePQRb72XPgtkTmEiOOW8n+1q9Gxt/OJnKU=",
|
||||||
|
"owner": "NixOS",
|
||||||
|
"repo": "nixpkgs",
|
||||||
|
"rev": "b93b4e9b527904aadf52dba6ca35efde2067cbd4",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "NixOS",
|
||||||
|
"repo": "nixpkgs",
|
||||||
|
"rev": "b93b4e9b527904aadf52dba6ca35efde2067cbd4",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@@ -238,11 +258,11 @@
|
|||||||
},
|
},
|
||||||
"nixpkgs-unoptimized": {
|
"nixpkgs-unoptimized": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1756787288,
|
"lastModified": 1746663147,
|
||||||
"narHash": "sha256-rw/PHa1cqiePdBxhF66V7R+WAP8WekQ0mCDG4CFqT8Y=",
|
"narHash": "sha256-Ua0drDHawlzNqJnclTJGf87dBmaO/tn7iZ+TCkTRpRc=",
|
||||||
"owner": "NixOS",
|
"owner": "NixOS",
|
||||||
"repo": "nixpkgs",
|
"repo": "nixpkgs",
|
||||||
"rev": "d0fc30899600b9b3466ddb260fd83deb486c32f1",
|
"rev": "dda3dcd3fe03e991015e9a74b22d35950f264a54",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
@@ -283,10 +303,11 @@
|
|||||||
"inputs": {
|
"inputs": {
|
||||||
"ansible-sshjail": "ansible-sshjail",
|
"ansible-sshjail": "ansible-sshjail",
|
||||||
"disko": "disko",
|
"disko": "disko",
|
||||||
|
"home-manager": "home-manager",
|
||||||
"impermanence": "impermanence",
|
"impermanence": "impermanence",
|
||||||
"lanzaboote": "lanzaboote",
|
"lanzaboote": "lanzaboote",
|
||||||
"nixpkgs": "nixpkgs",
|
"nixpkgs": "nixpkgs",
|
||||||
"nixpkgs-dda3dcd3f": "nixpkgs-dda3dcd3f",
|
"nixpkgs-b93b4e9b5": "nixpkgs-b93b4e9b5",
|
||||||
"nixpkgs-unoptimized": "nixpkgs-unoptimized",
|
"nixpkgs-unoptimized": "nixpkgs-unoptimized",
|
||||||
"zsh-histdb": "zsh-histdb"
|
"zsh-histdb": "zsh-histdb"
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -43,8 +43,10 @@
|
|||||||
inputs = {
|
inputs = {
|
||||||
impermanence.url = "github:nix-community/impermanence";
|
impermanence.url = "github:nix-community/impermanence";
|
||||||
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
|
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
|
||||||
nixpkgs-dda3dcd3f.url = "github:NixOS/nixpkgs/dda3dcd3fe03e991015e9a74b22d35950f264a54";
|
nixpkgs-b93b4e9b5.url = "github:NixOS/nixpkgs/b93b4e9b527904aadf52dba6ca35efde2067cbd4";
|
||||||
nixpkgs-unoptimized.url = "github:NixOS/nixpkgs/nixos-unstable";
|
nixpkgs-unoptimized.url = "github:NixOS/nixpkgs/nixos-unstable";
|
||||||
|
home-manager.url = "github:nix-community/home-manager";
|
||||||
|
home-manager.inputs.nixpkgs.follows = "nixpkgs";
|
||||||
lanzaboote = {
|
lanzaboote = {
|
||||||
url = "github:nix-community/lanzaboote/v0.4.2";
|
url = "github:nix-community/lanzaboote/v0.4.2";
|
||||||
|
|
||||||
@@ -74,8 +76,9 @@
|
|||||||
self,
|
self,
|
||||||
nixpkgs,
|
nixpkgs,
|
||||||
nixpkgs-unoptimized,
|
nixpkgs-unoptimized,
|
||||||
nixpkgs-dda3dcd3f,
|
nixpkgs-b93b4e9b5,
|
||||||
impermanence,
|
impermanence,
|
||||||
|
home-manager,
|
||||||
lanzaboote,
|
lanzaboote,
|
||||||
zsh-histdb,
|
zsh-histdb,
|
||||||
ansible-sshjail,
|
ansible-sshjail,
|
||||||
@@ -85,7 +88,7 @@
|
|||||||
base_x86_64_linux = rec {
|
base_x86_64_linux = rec {
|
||||||
system = "x86_64-linux";
|
system = "x86_64-linux";
|
||||||
specialArgs = {
|
specialArgs = {
|
||||||
pkgs-dda3dcd3f = import nixpkgs-dda3dcd3f {
|
pkgs-b93b4e9b5 = import nixpkgs-b93b4e9b5 {
|
||||||
inherit system;
|
inherit system;
|
||||||
};
|
};
|
||||||
pkgs-unoptimized = import nixpkgs-unoptimized {
|
pkgs-unoptimized = import nixpkgs-unoptimized {
|
||||||
@@ -96,8 +99,13 @@
|
|||||||
};
|
};
|
||||||
modules = [
|
modules = [
|
||||||
impermanence.nixosModules.impermanence
|
impermanence.nixosModules.impermanence
|
||||||
|
home-manager.nixosModules.home-manager
|
||||||
lanzaboote.nixosModules.lanzaboote
|
lanzaboote.nixosModules.lanzaboote
|
||||||
inputs.disko.nixosModules.disko
|
inputs.disko.nixosModules.disko
|
||||||
|
{
|
||||||
|
home-manager.useGlobalPkgs = true;
|
||||||
|
home-manager.useUserPackages = true;
|
||||||
|
}
|
||||||
{
|
{
|
||||||
nixpkgs.overlays = [
|
nixpkgs.overlays = [
|
||||||
zsh-histdb.overlays.default
|
zsh-histdb.overlays.default
|
||||||
|
|||||||
@@ -14,6 +14,6 @@ nix flake update zsh-histdb --flake "$DIR/../../"
|
|||||||
nix flake update ansible-sshjail --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
|
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" --log-format internal-json -v "${@}" |& nom --json
|
nixos-rebuild boot --flake "$DIR/../../#hydra" --target-host "$TARGET" --build-host "$TARGET" --fast --use-remote-sudo --max-jobs "$JOBS" "${@}" |& nom
|
||||||
|
|
||||||
# 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'
|
# 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/../../"
|
nix flake update ansible-sshjail --flake "$DIR/../../"
|
||||||
for f in /persist/manual/manual_add_to_store/*; do nix-store --add-fixed sha256 "$f"; done
|
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" --log-format internal-json -v "${@}" |& nom --json
|
nixos-rebuild switch --flake "$DIR/../../#hydra" --target-host "$TARGET" --build-host "$TARGET" --fast --use-remote-sudo --max-jobs "$JOBS" "${@}" |& nom
|
||||||
|
|
||||||
# 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'
|
# 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 zsh-histdb --flake "$DIR/../../"
|
||||||
nix flake update ansible-sshjail --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
|
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" --log-format internal-json -v "${@}" |& nom --json
|
nix build --extra-experimental-features nix-command --extra-experimental-features flakes "$DIR/../..#iso.hydra" --max-jobs "$JOBS" "${@}" |& nom
|
||||||
|
|||||||
@@ -14,6 +14,6 @@ nix flake update zsh-histdb --flake "$DIR/../../"
|
|||||||
nix flake update ansible-sshjail --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
|
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" --log-format internal-json -v "${@}" |& nom --json
|
nixos-rebuild boot --flake "$DIR/../../#ionlybootzfs" --target-host "$TARGET" --build-host "$TARGET" --fast --use-remote-sudo --max-jobs "$JOBS" "${@}" |& nom
|
||||||
|
|
||||||
# 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'
|
# 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/../../"
|
nix flake update ansible-sshjail --flake "$DIR/../../"
|
||||||
for f in /persist/manual/manual_add_to_store/*; do nix-store --add-fixed sha256 "$f"; done
|
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" --log-format internal-json -v "${@}" |& nom --json
|
nixos-rebuild switch --flake "$DIR/../../#ionlybootzfs" --target-host "$TARGET" --build-host "$TARGET" --fast --use-remote-sudo --max-jobs "$JOBS" "${@}" |& nom
|
||||||
|
|
||||||
# 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'
|
# 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 zsh-histdb --flake "$DIR/../../"
|
||||||
nix flake update ansible-sshjail --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
|
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" --log-format internal-json -v "${@}" |& nom --json
|
nix build --extra-experimental-features nix-command --extra-experimental-features flakes "$DIR/../..#iso.ionlybootzfs" --max-jobs "$JOBS" "${@}" |& nom
|
||||||
|
|||||||
@@ -14,6 +14,6 @@ nix flake update zsh-histdb --flake "$DIR/../../"
|
|||||||
nix flake update ansible-sshjail --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
|
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" --log-format internal-json -v "${@}" |& nom --json
|
nixos-rebuild boot --flake "$DIR/../../#neelix" --target-host "$TARGET" --build-host "$TARGET" --fast --use-remote-sudo --max-jobs "$JOBS" "${@}" |& nom
|
||||||
|
|
||||||
# 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'
|
# 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/../../"
|
nix flake update ansible-sshjail --flake "$DIR/../../"
|
||||||
for f in /persist/manual/manual_add_to_store/*; do nix-store --add-fixed sha256 "$f"; done
|
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" --log-format internal-json -v "${@}" |& nom --json
|
nixos-rebuild switch --flake "$DIR/../../#neelix" --target-host "$TARGET" --build-host "$TARGET" --fast --use-remote-sudo --max-jobs "$JOBS" "${@}" |& nom
|
||||||
|
|
||||||
# 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'
|
# 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/../../"
|
nix flake update ansible-sshjail --flake "$DIR/../../"
|
||||||
for f in /persist/manual/manual_add_to_store/*; do nix-store --add-fixed sha256 "$f"; done
|
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" --log-format internal-json -v "${@}" |& nom --json
|
nixos-rebuild boot --flake "$DIR/../../#odo" --target-host "$TARGET" --build-host "$TARGET" --fast --use-remote-sudo --max-jobs "$JOBS" "${@}" |& nom
|
||||||
|
|
||||||
# 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'
|
# 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/../../"
|
nix flake update ansible-sshjail --flake "$DIR/../../"
|
||||||
for f in /persist/manual/manual_add_to_store/*; do nix-store --add-fixed sha256 "$f"; done
|
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" --log-format internal-json -v "${@}" |& nom --json
|
nixos-rebuild switch --flake "$DIR/../../#odo" --target-host "$TARGET" --build-host "$TARGET" --fast --use-remote-sudo --max-jobs "$JOBS" "${@}" |& nom
|
||||||
|
|
||||||
# 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'
|
# 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 zsh-histdb --flake "$DIR/../../"
|
||||||
nix flake update ansible-sshjail --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
|
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" --log-format internal-json -v "${@}" |& nom --json
|
nix build --extra-experimental-features nix-command --extra-experimental-features flakes "$DIR/../..#iso.odo" --max-jobs "$JOBS" "${@}" |& nom
|
||||||
|
|||||||
@@ -9,4 +9,4 @@ DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
|
|||||||
nix flake update zsh-histdb --flake "$DIR/../../"
|
nix flake update zsh-histdb --flake "$DIR/../../"
|
||||||
nix flake update ansible-sshjail --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
|
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" --log-format internal-json -v "${@}" |& nom --json
|
nixos-rebuild boot --show-trace --use-remote-sudo --max-jobs "$JOBS" --flake "$DIR/../../#odo" "${@}" |& nom
|
||||||
|
|||||||
@@ -9,4 +9,4 @@ DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
|
|||||||
nix flake update zsh-histdb --flake "$DIR/../../"
|
nix flake update zsh-histdb --flake "$DIR/../../"
|
||||||
nix flake update ansible-sshjail --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
|
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" --log-format internal-json -v "${@}" |& nom --json
|
nixos-rebuild build --show-trace --use-remote-sudo --max-jobs "$JOBS" --flake "$DIR/../../#odo" "${@}" |& nom
|
||||||
|
|||||||
@@ -9,4 +9,4 @@ DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
|
|||||||
nix flake update zsh-histdb --flake "$DIR/../../"
|
nix flake update zsh-histdb --flake "$DIR/../../"
|
||||||
nix flake update ansible-sshjail --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
|
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" --log-format internal-json -v "${@}" |& nom --json
|
nixos-rebuild switch --show-trace --use-remote-sudo --max-jobs "$JOBS" --flake "$DIR/../../#odo" "${@}" |& nom
|
||||||
|
|||||||
@@ -59,16 +59,13 @@
|
|||||||
# services.fstrim.enable = lib.mkDefault true;
|
# services.fstrim.enable = lib.mkDefault true;
|
||||||
|
|
||||||
me.alacritty.enable = true;
|
me.alacritty.enable = true;
|
||||||
me.amd_s2idle.enable = true;
|
|
||||||
me.ansible.enable = true;
|
me.ansible.enable = true;
|
||||||
me.ares.enable = true;
|
me.ares.enable = true;
|
||||||
me.bluetooth.enable = true;
|
me.bluetooth.enable = true;
|
||||||
me.chromecast.enable = true;
|
me.chromecast.enable = true;
|
||||||
me.chromium.enable = true;
|
me.chromium.enable = true;
|
||||||
me.d2.enable = true;
|
|
||||||
me.direnv.enable = true;
|
|
||||||
me.docker.enable = true;
|
me.docker.enable = true;
|
||||||
me.ecc.enable = false;
|
me.ecc.enable = true;
|
||||||
me.emacs_flavor = "full";
|
me.emacs_flavor = "full";
|
||||||
me.firefox.enable = true;
|
me.firefox.enable = true;
|
||||||
me.flux.enable = true;
|
me.flux.enable = true;
|
||||||
@@ -91,7 +88,6 @@
|
|||||||
me.qemu.enable = true;
|
me.qemu.enable = true;
|
||||||
me.rpcs3.enable = true;
|
me.rpcs3.enable = true;
|
||||||
me.rust.enable = true;
|
me.rust.enable = true;
|
||||||
me.shadps4.enable = true;
|
|
||||||
me.shikane.enable = true;
|
me.shikane.enable = true;
|
||||||
me.sops.enable = true;
|
me.sops.enable = true;
|
||||||
me.sound.enable = true;
|
me.sound.enable = true;
|
||||||
|
|||||||
@@ -20,7 +20,7 @@
|
|||||||
# amd_pstate=guided :: Same as passive except we can set upper and lower frequency bounds.
|
# 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
|
# amdgpu.dcdebugmask=0x10 :: Allegedly disables Panel Replay from https://community.frame.work/t/tracking-freezing-arch-linux-amd/39495/32
|
||||||
boot.kernelParams = [
|
boot.kernelParams = [
|
||||||
"amdgpu.abmlevel=2"
|
"amdgpu.abmlevel=3"
|
||||||
"pcie_aspm=force"
|
"pcie_aspm=force"
|
||||||
# "pcie_aspm.policy=powersupersave"
|
# "pcie_aspm.policy=powersupersave"
|
||||||
"nowatchdog"
|
"nowatchdog"
|
||||||
@@ -47,22 +47,6 @@
|
|||||||
"w- /sys/devices/system/cpu/cpufreq/policy13/energy_performance_preference - - - - power"
|
"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/policy14/energy_performance_preference - - - - power"
|
||||||
"w- /sys/devices/system/cpu/cpufreq/policy15/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 = ''
|
boot.extraModprobeConfig = ''
|
||||||
|
|||||||
@@ -9,6 +9,6 @@
|
|||||||
imports = [ ];
|
imports = [ ];
|
||||||
|
|
||||||
systemd.tmpfiles.rules = [
|
systemd.tmpfiles.rules = [
|
||||||
"w- /sys/class/backlight/amdgpu_bl1/brightness - - - - 21845"
|
"w- /sys/class/backlight/amdgpu_bl1/brightness - - - - 85"
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -14,6 +14,6 @@ nix flake update zsh-histdb --flake "$DIR/../../"
|
|||||||
nix flake update ansible-sshjail --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
|
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" --log-format internal-json -v "${@}" |& nom --json
|
nixos-rebuild boot --flake "$DIR/../../#quark" --target-host "$TARGET" --build-host "$TARGET" --fast --use-remote-sudo --max-jobs "$JOBS" "${@}" |& nom
|
||||||
|
|
||||||
# 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'
|
# 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/../../"
|
nix flake update ansible-sshjail --flake "$DIR/../../"
|
||||||
for f in /persist/manual/manual_add_to_store/*; do nix-store --add-fixed sha256 "$f"; done
|
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" --log-format internal-json -v "${@}" |& nom --json
|
nixos-rebuild switch --flake "$DIR/../../#quark" --target-host "$TARGET" --build-host "$TARGET" --fast --use-remote-sudo --max-jobs "$JOBS" "${@}" |& nom
|
||||||
|
|
||||||
# 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'
|
# 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 zsh-histdb --flake "$DIR/../../"
|
||||||
nix flake update ansible-sshjail --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
|
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" --log-format internal-json -v "${@}" |& nom --json
|
nix build --extra-experimental-features nix-command --extra-experimental-features flakes "$DIR/../..#iso.quark" --max-jobs "$JOBS" "${@}" |& nom
|
||||||
|
|||||||
@@ -9,4 +9,4 @@ DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
|
|||||||
nix flake update zsh-histdb --flake "$DIR/../../"
|
nix flake update zsh-histdb --flake "$DIR/../../"
|
||||||
nix flake update ansible-sshjail --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
|
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" --log-format internal-json -v "${@}" |& nom --json
|
nixos-rebuild boot --show-trace --use-remote-sudo --max-jobs "$JOBS" --flake "$DIR/../../#quark" "${@}" |& nom
|
||||||
|
|||||||
@@ -9,4 +9,4 @@ DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
|
|||||||
nix flake update zsh-histdb --flake "$DIR/../../"
|
nix flake update zsh-histdb --flake "$DIR/../../"
|
||||||
nix flake update ansible-sshjail --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
|
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" --log-format internal-json -v "${@}" |& nom --json
|
nixos-rebuild build --show-trace --use-remote-sudo --max-jobs "$JOBS" --flake "$DIR/../../#quark" "${@}" |& nom
|
||||||
|
|||||||
@@ -9,4 +9,4 @@ DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
|
|||||||
nix flake update zsh-histdb --flake "$DIR/../../"
|
nix flake update zsh-histdb --flake "$DIR/../../"
|
||||||
nix flake update ansible-sshjail --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
|
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" --log-format internal-json -v "${@}" |& nom --json
|
nixos-rebuild switch --show-trace --use-remote-sudo --max-jobs "$JOBS" --flake "$DIR/../../#quark" "${@}" |& nom
|
||||||
|
|||||||
@@ -54,14 +54,11 @@
|
|||||||
me.rpcs3.config.Core."Use LLVM CPU" = "znver4";
|
me.rpcs3.config.Core."Use LLVM CPU" = "znver4";
|
||||||
|
|
||||||
me.alacritty.enable = true;
|
me.alacritty.enable = true;
|
||||||
me.amd_s2idle.enable = true;
|
|
||||||
me.ansible.enable = true;
|
me.ansible.enable = true;
|
||||||
me.ares.enable = true;
|
me.ares.enable = true;
|
||||||
me.bluetooth.enable = true;
|
me.bluetooth.enable = true;
|
||||||
me.chromecast.enable = true;
|
me.chromecast.enable = true;
|
||||||
me.chromium.enable = true;
|
me.chromium.enable = true;
|
||||||
me.d2.enable = true;
|
|
||||||
me.direnv.enable = true;
|
|
||||||
me.docker.enable = true;
|
me.docker.enable = true;
|
||||||
me.ecc.enable = true;
|
me.ecc.enable = true;
|
||||||
me.emacs_flavor = "full";
|
me.emacs_flavor = "full";
|
||||||
@@ -87,7 +84,6 @@
|
|||||||
me.qemu.enable = true;
|
me.qemu.enable = true;
|
||||||
me.rpcs3.enable = true;
|
me.rpcs3.enable = true;
|
||||||
me.rust.enable = true;
|
me.rust.enable = true;
|
||||||
me.shadps4.enable = true;
|
|
||||||
me.shikane.enable = true;
|
me.shikane.enable = true;
|
||||||
me.sops.enable = true;
|
me.sops.enable = true;
|
||||||
me.sound.enable = true;
|
me.sound.enable = true;
|
||||||
|
|||||||
@@ -24,8 +24,10 @@
|
|||||||
xdg-utils # for xdg-open
|
xdg-utils # for xdg-open
|
||||||
];
|
];
|
||||||
|
|
||||||
me.install.user.talexander.file = {
|
home-manager.users.talexander =
|
||||||
".config/alacritty/alacritty.toml" = {
|
{ pkgs, ... }:
|
||||||
|
{
|
||||||
|
home.file.".config/alacritty/alacritty.toml" = {
|
||||||
source = ./files/alacritty.toml;
|
source = ./files/alacritty.toml;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -1,48 +0,0 @@
|
|||||||
{
|
|
||||||
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;
|
|
||||||
};
|
|
||||||
}
|
|
||||||
@@ -1,47 +0,0 @@
|
|||||||
{
|
|
||||||
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 { });
|
|
||||||
})
|
|
||||||
];
|
|
||||||
})
|
|
||||||
];
|
|
||||||
}
|
|
||||||
]
|
|
||||||
);
|
|
||||||
}
|
|
||||||
@@ -1,58 +0,0 @@
|
|||||||
{
|
|
||||||
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 {
|
(lib.mkIf config.me.graphical {
|
||||||
environment.systemPackages = with pkgs; [
|
environment.systemPackages = with pkgs; [
|
||||||
chromium
|
(chromium.override { enableWideVine = true; })
|
||||||
];
|
];
|
||||||
allowedUnfree = [
|
allowedUnfree = [
|
||||||
"chromium"
|
"chromium"
|
||||||
@@ -57,18 +57,8 @@
|
|||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
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
|
# Enabling vulkan causes video to render as white
|
||||||
# "--enable-features=Vulkan";
|
# nixpkgs.config.chromium.commandLineArgs = "--enable-features=Vulkan";
|
||||||
];
|
|
||||||
};
|
|
||||||
})
|
|
||||||
];
|
|
||||||
})
|
})
|
||||||
]
|
]
|
||||||
);
|
);
|
||||||
|
|||||||
@@ -1,29 +0,0 @@
|
|||||||
{
|
|
||||||
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
|
|
||||||
];
|
|
||||||
}
|
|
||||||
]
|
|
||||||
);
|
|
||||||
}
|
|
||||||
@@ -1,55 +0,0 @@
|
|||||||
{
|
|
||||||
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";
|
|
||||||
}
|
|
||||||
];
|
|
||||||
};
|
|
||||||
};
|
|
||||||
}
|
|
||||||
]
|
|
||||||
);
|
|
||||||
}
|
|
||||||
@@ -131,10 +131,8 @@ in
|
|||||||
final.cmake-language-server
|
final.cmake-language-server
|
||||||
final.cmake # Used by cmake-language-server
|
final.cmake # Used by cmake-language-server
|
||||||
final.rust-analyzer
|
final.rust-analyzer
|
||||||
final.prettier # Format yaml, json, and JS
|
final.nodePackages_latest.prettier # Format yaml, json, and JS
|
||||||
final.terraform-ls
|
final.terraform-ls
|
||||||
final.typescript-language-server
|
|
||||||
final.tex
|
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
'';
|
'';
|
||||||
@@ -142,8 +140,10 @@ in
|
|||||||
})
|
})
|
||||||
];
|
];
|
||||||
|
|
||||||
me.install.user.talexander.file = {
|
home-manager.users.talexander =
|
||||||
".config/emacs" = {
|
{ pkgs, ... }:
|
||||||
|
{
|
||||||
|
home.file.".config/emacs" = {
|
||||||
source = ./files/emacs;
|
source = ./files/emacs;
|
||||||
recursive = true;
|
recursive = true;
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -1,16 +0,0 @@
|
|||||||
(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,12 +1,6 @@
|
|||||||
(require 'common-lsp)
|
(require 'common-lsp)
|
||||||
(require 'util-tree-sitter)
|
(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
|
(use-package json-ts-mode
|
||||||
:ensure nil
|
:ensure nil
|
||||||
:pin manual
|
:pin manual
|
||||||
@@ -119,14 +113,10 @@
|
|||||||
("\\.js\\'" . js-ts-mode)
|
("\\.js\\'" . js-ts-mode)
|
||||||
)
|
)
|
||||||
:commands (js-ts-mode)
|
:commands (js-ts-mode)
|
||||||
:custom (
|
|
||||||
(js-indent-level 2)
|
|
||||||
)
|
|
||||||
:hook (
|
:hook (
|
||||||
(js-ts-mode . (lambda ()
|
(js-ts-mode . (lambda ()
|
||||||
(when-linux
|
(when-linux
|
||||||
(eglot-ensure)
|
(eglot-ensure)
|
||||||
(add-hook 'before-save-hook 'js-format-buffer nil 'local)
|
|
||||||
)
|
)
|
||||||
))
|
))
|
||||||
)
|
)
|
||||||
|
|||||||
@@ -87,8 +87,4 @@
|
|||||||
(use-package gnuplot)
|
(use-package gnuplot)
|
||||||
(use-package graphviz-dot-mode)
|
(use-package graphviz-dot-mode)
|
||||||
|
|
||||||
(use-package htmlize
|
|
||||||
;; For syntax highlighting when exporting to HTML.
|
|
||||||
)
|
|
||||||
|
|
||||||
(provide 'lang-org)
|
(provide 'lang-org)
|
||||||
|
|||||||
@@ -46,7 +46,7 @@
|
|||||||
(when rust-analyzer-command
|
(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)))
|
||||||
(add-to-list 'eglot-server-programs `(rust-ts-mode . (,rust-analyzer-command :initializationOptions (:imports (:granularity (:enforce t :group "item")
|
(add-to-list 'eglot-server-programs `(rust-ts-mode . (,rust-analyzer-command :initializationOptions (:imports (:granularity (:enforce t :group "item")
|
||||||
:merge (:glob :json-false)
|
:merge (:glob nil)
|
||||||
:prefix "self")
|
:prefix "self")
|
||||||
))))
|
))))
|
||||||
)
|
)
|
||||||
|
|||||||
@@ -40,6 +40,4 @@
|
|||||||
|
|
||||||
(require 'lang-cmake)
|
(require 'lang-cmake)
|
||||||
|
|
||||||
(require 'lang-d2)
|
|
||||||
|
|
||||||
(load-directory autoload-directory)
|
(load-directory autoload-directory)
|
||||||
|
|||||||
@@ -70,12 +70,9 @@
|
|||||||
# Allow sending dark mode preference to websites.
|
# Allow sending dark mode preference to websites.
|
||||||
# Allow sending timezone to websites.
|
# Allow sending timezone to websites.
|
||||||
"privacy.fingerprintingProtection.overrides" =
|
"privacy.fingerprintingProtection.overrides" =
|
||||||
"+AllTargets,-CSSPrefersColorScheme,-JSDateTimeUTC,-CanvasExtractionBeforeUserInputIsBlocked,-CanvasImageExtractionPrompt";
|
"+AllTargets,-CSSPrefersColorScheme,-JSDateTimeUTC,-CanvasExtractionBeforeUserInputIsBlocked";
|
||||||
# Disable weather on new tab page
|
# Disable weather on new tab page
|
||||||
"browser.newtabpage.activity-stream.showWeather" = false;
|
"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.
|
# Check about:policies#documentation and https://mozilla.github.io/policy-templates/ for options.
|
||||||
policies = {
|
policies = {
|
||||||
|
|||||||
@@ -5,18 +5,6 @@
|
|||||||
...
|
...
|
||||||
}:
|
}:
|
||||||
|
|
||||||
let
|
|
||||||
git_wrapped =
|
|
||||||
package: prog:
|
|
||||||
pkgs.writeShellScriptBin "${prog}" ''
|
|
||||||
export PATH="${
|
|
||||||
lib.makeBinPath [
|
|
||||||
pkgs.meld
|
|
||||||
]
|
|
||||||
}:$PATH"
|
|
||||||
exec ${package}/bin/${prog} "''${@}"
|
|
||||||
'';
|
|
||||||
in
|
|
||||||
{
|
{
|
||||||
imports = [ ];
|
imports = [ ];
|
||||||
|
|
||||||
@@ -32,48 +20,66 @@ in
|
|||||||
config = lib.mkMerge [
|
config = lib.mkMerge [
|
||||||
{
|
{
|
||||||
environment.systemPackages = with pkgs; [
|
environment.systemPackages = with pkgs; [
|
||||||
my_git
|
git
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
(lib.mkIf (config.me.git.config != null) {
|
(lib.mkIf (config.me.git.config != null) {
|
||||||
me.install.user.talexander.file = {
|
home-manager.users.talexander =
|
||||||
".gitconfig" = {
|
{ pkgs, ... }:
|
||||||
|
{
|
||||||
|
home.file.".gitconfig" = {
|
||||||
source = config.me.git.config;
|
source = config.me.git.config;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
})
|
})
|
||||||
(lib.mkIf (config.me.graphical) {
|
# (lib.mkIf (config.me.graphical) {
|
||||||
nixpkgs.overlays = [
|
# nixpkgs.overlays = [
|
||||||
(final: prev: {
|
# (final: prev: {
|
||||||
my_git = (
|
# git = pkgs.buildEnv {
|
||||||
pkgs.buildEnv {
|
# name = prev.git.name;
|
||||||
name = prev.git.name;
|
# paths = [
|
||||||
version = prev.git.version;
|
# prev.git
|
||||||
paths =
|
# ];
|
||||||
(builtins.map (git_wrapped prev.git) [
|
# extraOutputsToInstall = [
|
||||||
"git"
|
# "man"
|
||||||
])
|
# "doc"
|
||||||
++ [
|
# "info"
|
||||||
prev.git
|
# ];
|
||||||
];
|
# buildInputs = [ final.makeWrapper ];
|
||||||
extraOutputsToInstall = [
|
# postBuild = ''
|
||||||
"man"
|
# wrapProgram $out/bin/git --prefix PATH : ${
|
||||||
"doc"
|
# lib.makeBinPath [
|
||||||
"info"
|
# final.meld
|
||||||
];
|
# ]
|
||||||
nativeBuildInputs = [ final.makeWrapper ];
|
# }
|
||||||
ignoreCollisions = true;
|
# '';
|
||||||
}
|
# };
|
||||||
);
|
# })
|
||||||
})
|
# ];
|
||||||
];
|
# })
|
||||||
})
|
# (lib.mkIf (!config.me.graphical) {
|
||||||
(lib.mkIf (!config.me.graphical) {
|
# nixpkgs.overlays = [
|
||||||
nixpkgs.overlays = [
|
# (final: prev: {
|
||||||
(final: prev: {
|
# git = pkgs.buildEnv {
|
||||||
my_git = prev.git;
|
# name = prev.git.name;
|
||||||
})
|
# paths = [
|
||||||
];
|
# prev.git
|
||||||
})
|
# ];
|
||||||
|
# extraOutputsToInstall = [
|
||||||
|
# "man"
|
||||||
|
# "doc"
|
||||||
|
# "info"
|
||||||
|
# ];
|
||||||
|
# buildInputs = [ final.makeWrapper ];
|
||||||
|
# postBuild = ''
|
||||||
|
# wrapProgram $out/bin/git --prefix PATH : ${
|
||||||
|
# lib.makeBinPath [
|
||||||
|
# ]
|
||||||
|
# }
|
||||||
|
# '';
|
||||||
|
# };
|
||||||
|
# })
|
||||||
|
# ];
|
||||||
|
# })
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -8,7 +8,6 @@
|
|||||||
lg = log --color --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --abbrev-commit
|
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
|
bh = log --oneline --branches=* --remotes=* --graph --decorate
|
||||||
amend = commit --amend --no-edit
|
amend = commit --amend --no-edit
|
||||||
authorcount = shortlog --summary --numbered --all --no-merges
|
|
||||||
[core]
|
[core]
|
||||||
excludesfile = ~/.gitignore_global
|
excludesfile = ~/.gitignore_global
|
||||||
[commit]
|
[commit]
|
||||||
@@ -51,5 +50,4 @@
|
|||||||
[rebase]
|
[rebase]
|
||||||
autoSquash = true
|
autoSquash = true
|
||||||
autoStash = true
|
autoStash = 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 = true
|
||||||
updateRefs = false
|
|
||||||
|
|||||||
@@ -57,8 +57,11 @@ in
|
|||||||
# disable-ccid = true;
|
# disable-ccid = true;
|
||||||
# };
|
# };
|
||||||
|
|
||||||
me.install.user.talexander.file = {
|
# .gnupg/scdaemon.conf
|
||||||
".gnupg/scdaemon.conf" = {
|
home-manager.users.talexander =
|
||||||
|
{ pkgs, ... }:
|
||||||
|
{
|
||||||
|
home.file.".gnupg/scdaemon.conf" = {
|
||||||
source = ./files/scdaemon.conf;
|
source = ./files/scdaemon.conf;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -41,11 +41,15 @@ in
|
|||||||
exec_kanshi
|
exec_kanshi
|
||||||
];
|
];
|
||||||
|
|
||||||
me.install.user.talexander.file = {
|
home-manager.users.talexander =
|
||||||
|
{ pkgs, ... }:
|
||||||
|
{
|
||||||
|
home.file = {
|
||||||
".config/kanshi/config" = {
|
".config/kanshi/config" = {
|
||||||
source = ./files/config_kanshi;
|
source = ./files/config_kanshi;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
};
|
||||||
})
|
})
|
||||||
]
|
]
|
||||||
);
|
);
|
||||||
|
|||||||
@@ -78,6 +78,9 @@
|
|||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
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 =
|
# home.file.".kodi/userdata/addon_data/peripheral.joystick/resources/buttonmaps/xml/linux/DualSense_Wireless_Controller_13b_8a.xml".source =
|
||||||
@@ -85,6 +88,11 @@
|
|||||||
|
|
||||||
# TODO: Maybe .kodi/userdata/sources.xml
|
# TODO: Maybe .kodi/userdata/sources.xml
|
||||||
# TODO: ./userdata/guisettings.xml:303: <setting id="filecache.memorysize">128</setting>
|
# 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";
|
||||||
|
};
|
||||||
})
|
})
|
||||||
]
|
]
|
||||||
);
|
);
|
||||||
|
|||||||
@@ -5,6 +5,22 @@
|
|||||||
...
|
...
|
||||||
}:
|
}:
|
||||||
|
|
||||||
|
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 = [ ];
|
imports = [ ];
|
||||||
|
|
||||||
@@ -24,35 +40,6 @@
|
|||||||
tex
|
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,8 +52,10 @@ in
|
|||||||
imv
|
imv
|
||||||
];
|
];
|
||||||
|
|
||||||
me.install.user.talexander.file = {
|
home-manager.users.talexander =
|
||||||
".config/mpv/mpv.conf" = {
|
{ pkgs, ... }:
|
||||||
|
{
|
||||||
|
home.file.".config/mpv/mpv.conf" = {
|
||||||
source = ./files/mpv.conf;
|
source = ./files/mpv.conf;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -8,14 +8,10 @@
|
|||||||
{
|
{
|
||||||
imports = [ ];
|
imports = [ ];
|
||||||
config = lib.mkMerge [
|
config = lib.mkMerge [
|
||||||
{
|
{ }
|
||||||
environment.systemPackages = with pkgs; [
|
(lib.mkIf (config.me.buildingIso) {
|
||||||
memtest86plus
|
|
||||||
];
|
|
||||||
}
|
|
||||||
# (lib.mkIf (config.me.buildingIso) {
|
|
||||||
# boot.loader.systemd-boot.memtest86.enable = true;
|
# boot.loader.systemd-boot.memtest86.enable = true;
|
||||||
# boot.loader.grub.memtest86.enable = true;
|
boot.loader.grub.memtest86.enable = true;
|
||||||
# })
|
})
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -2,7 +2,6 @@
|
|||||||
config,
|
config,
|
||||||
lib,
|
lib,
|
||||||
pkgs,
|
pkgs,
|
||||||
pkgs-dda3dcd3f,
|
|
||||||
...
|
...
|
||||||
}:
|
}:
|
||||||
|
|
||||||
@@ -65,7 +64,6 @@
|
|||||||
ldns # for drill
|
ldns # for drill
|
||||||
arp-scan # To find devices on the network
|
arp-scan # To find devices on the network
|
||||||
wavemon
|
wavemon
|
||||||
dhcpcd # For Android USB tethering.
|
|
||||||
];
|
];
|
||||||
|
|
||||||
boot.extraModprobeConfig = ''
|
boot.extraModprobeConfig = ''
|
||||||
@@ -93,13 +91,4 @@
|
|||||||
# This is enabled by default in nixos.
|
# This is enabled by default in nixos.
|
||||||
# "net.ipv6.conf.default.use_tempaddr" = 2;
|
# "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.mkIf (!config.me.optimizations.enable) (
|
||||||
lib.mkMerge [
|
lib.mkMerge [
|
||||||
{
|
{
|
||||||
boot.kernelPackages = pkgs.linuxPackagesFor pkgs.linux_6_16;
|
boot.kernelPackages = pkgs.linuxPackagesFor pkgs.linux_6_14;
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
))
|
))
|
||||||
@@ -94,7 +94,7 @@
|
|||||||
HZ = lib.kernel.freeform "300";
|
HZ = lib.kernel.freeform "300";
|
||||||
HZ_300 = lib.kernel.yes;
|
HZ_300 = lib.kernel.yes;
|
||||||
HZ_1000 = lib.kernel.no;
|
HZ_1000 = lib.kernel.no;
|
||||||
} prev.linux_6_16;
|
} prev.linux_6_14;
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
(final: prev: {
|
(final: prev: {
|
||||||
@@ -126,37 +126,12 @@
|
|||||||
}
|
}
|
||||||
);
|
);
|
||||||
})
|
})
|
||||||
# (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: {
|
(final: prev: {
|
||||||
inherit (pkgs-unoptimized)
|
inherit (pkgs-unoptimized)
|
||||||
gsl
|
gsl
|
||||||
redis
|
redis
|
||||||
valkey
|
valkey
|
||||||
nix-serve-ng
|
nix-serve-ng
|
||||||
rapidjson
|
|
||||||
assimp
|
|
||||||
;
|
;
|
||||||
})
|
})
|
||||||
];
|
];
|
||||||
|
|||||||
@@ -82,8 +82,10 @@
|
|||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
me.install.user.talexander.file = {
|
home-manager.users.talexander =
|
||||||
".config/PCSX2/inis/PCSX2.ini" = {
|
{ pkgs, ... }:
|
||||||
|
{
|
||||||
|
home.file.".config/PCSX2/inis/PCSX2.ini" = {
|
||||||
source = ./files/PCSX2.ini;
|
source = ./files/PCSX2.ini;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -32,21 +32,6 @@
|
|||||||
isort
|
isort
|
||||||
black
|
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,25 +70,15 @@ in
|
|||||||
}
|
}
|
||||||
];
|
];
|
||||||
|
|
||||||
me.install.user.talexander.file = {
|
home-manager.users.talexander =
|
||||||
".config/rpcs3/config.yml" = lib.mkIf (config.me.rpcs3.config != null) {
|
{ pkgs, ... }:
|
||||||
|
{
|
||||||
|
home.file.".config/rpcs3/config.yml" = lib.mkIf (config.me.rpcs3.config != null) {
|
||||||
source = rpcs3_config_yaml;
|
source = rpcs3_config_yaml;
|
||||||
};
|
};
|
||||||
".config/rpcs3/GuiConfigs/CurrentSettings.ini" = {
|
home.file.".config/rpcs3/GuiConfigs/CurrentSettings.ini" = {
|
||||||
source = ./files/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) {
|
environment.persistence."/persist" = lib.mkIf (!config.me.buildingIso) {
|
||||||
@@ -156,13 +146,6 @@ in
|
|||||||
mode = "0755";
|
mode = "0755";
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
{
|
|
||||||
# Netplay (RPCN) config and credentials
|
|
||||||
file = ".config/rpcs3/rpcn.yml";
|
|
||||||
parentDirectory = {
|
|
||||||
mode = "0755";
|
|
||||||
};
|
|
||||||
}
|
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
@@ -172,6 +155,7 @@ in
|
|||||||
users.talexander = {
|
users.talexander = {
|
||||||
directories = [
|
directories = [
|
||||||
{
|
{
|
||||||
|
# Game saves
|
||||||
directory = ".cache/rpcs3";
|
directory = ".cache/rpcs3";
|
||||||
user = "talexander";
|
user = "talexander";
|
||||||
group = "talexander";
|
group = "talexander";
|
||||||
|
|||||||
@@ -1,14 +0,0 @@
|
|||||||
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
|
|
||||||
File diff suppressed because it is too large
Load Diff
@@ -1,6 +0,0 @@
|
|||||||
PPU-83681f6110d33442329073b72b8dc88a2f677172:
|
|
||||||
Unlock FPS:
|
|
||||||
Demon's Souls:
|
|
||||||
BLUS30443:
|
|
||||||
01.00:
|
|
||||||
Enabled: true
|
|
||||||
@@ -48,7 +48,10 @@ in
|
|||||||
# ? cargo-public-api
|
# ? cargo-public-api
|
||||||
];
|
];
|
||||||
|
|
||||||
me.install.user.talexander.file = {
|
home-manager.users.talexander =
|
||||||
|
{ pkgs, ... }:
|
||||||
|
{
|
||||||
|
home.file = {
|
||||||
".cargo/config.toml" = {
|
".cargo/config.toml" = {
|
||||||
source = ./files/cargo_config.toml;
|
source = ./files/cargo_config.toml;
|
||||||
};
|
};
|
||||||
@@ -56,6 +59,7 @@ in
|
|||||||
source = ./files/rustup_settings.toml;
|
source = ./files/rustup_settings.toml;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
};
|
||||||
|
|
||||||
environment.persistence."/state" = lib.mkIf (!config.me.buildingIso) {
|
environment.persistence."/state" = lib.mkIf (!config.me.buildingIso) {
|
||||||
hideMounts = true;
|
hideMounts = true;
|
||||||
|
|||||||
@@ -1,12 +1,12 @@
|
|||||||
# [target.x86_64-unknown-linux-gnu]
|
[target.x86_64-unknown-linux-gnu]
|
||||||
# rustflags = ["-C", "target-cpu=native", "-Zthreads=0"]
|
rustflags = ["-C", "target-cpu=native", "-Zthreads=0"]
|
||||||
|
|
||||||
# [unstable]
|
[unstable]
|
||||||
# codegen-backend = true
|
codegen-backend = true
|
||||||
|
|
||||||
# [profile.dev]
|
[profile.dev]
|
||||||
# codegen-backend = "cranelift"
|
codegen-backend = "cranelift"
|
||||||
|
|
||||||
[profile.dev.package."*"]
|
[profile.dev.package."*"]
|
||||||
# codegen-backend = "llvm"
|
codegen-backend = "llvm"
|
||||||
opt-level = 3
|
opt-level = 3
|
||||||
|
|||||||
@@ -1,110 +0,0 @@
|
|||||||
{
|
|
||||||
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;
|
|
||||||
};
|
|
||||||
});
|
|
||||||
})
|
|
||||||
];
|
|
||||||
})
|
|
||||||
]
|
|
||||||
);
|
|
||||||
}
|
|
||||||
@@ -1,15 +0,0 @@
|
|||||||
[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,11 +36,15 @@ in
|
|||||||
exec_shikane
|
exec_shikane
|
||||||
];
|
];
|
||||||
|
|
||||||
me.install.user.talexander.file = {
|
home-manager.users.talexander =
|
||||||
|
{ pkgs, ... }:
|
||||||
|
{
|
||||||
|
home.file = {
|
||||||
".config/shikane/config.toml" = {
|
".config/shikane/config.toml" = {
|
||||||
source = ./files/config.toml;
|
source = ./files/config.toml;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
};
|
||||||
})
|
})
|
||||||
]
|
]
|
||||||
);
|
);
|
||||||
|
|||||||
@@ -1,15 +1,3 @@
|
|||||||
[[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]]
|
[[profile]]
|
||||||
name = "homedesk"
|
name = "homedesk"
|
||||||
exec = ["notify-send shikane \"Profile $SHIKANE_PROFILE_NAME has been applied\""]
|
exec = ["notify-send shikane \"Profile $SHIKANE_PROFILE_NAME has been applied\""]
|
||||||
|
|||||||
@@ -27,14 +27,19 @@
|
|||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
me.install.user.root.file = {
|
home-manager.users.talexander =
|
||||||
".ssh/config" = {
|
{ pkgs, ... }:
|
||||||
source = ./files/ssh_config_root;
|
{
|
||||||
};
|
home.file.".ssh/config" = {
|
||||||
};
|
|
||||||
me.install.user.talexander.file = {
|
|
||||||
".ssh/config" = {
|
|
||||||
source = ./files/ssh_config;
|
source = ./files/ssh_config;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
home-manager.users.root =
|
||||||
|
{ pkgs, ... }:
|
||||||
|
{
|
||||||
|
home.file.".ssh/config" = {
|
||||||
|
source = ./files/ssh_config_root;
|
||||||
|
};
|
||||||
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -376,18 +376,26 @@ in
|
|||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
me.install.user.talexander.file = {
|
home-manager.users.talexander =
|
||||||
".config/mimeapps.list" = {
|
{ pkgs, ... }:
|
||||||
|
{
|
||||||
|
home.file = {
|
||||||
# Configure default programs (for example, default browser)
|
# Configure default programs (for example, default browser)
|
||||||
|
".config/mimeapps.list" = {
|
||||||
source = ./files/mimeapps.list;
|
source = ./files/mimeapps.list;
|
||||||
};
|
};
|
||||||
|
};
|
||||||
|
home.file = {
|
||||||
".config/gtk-3.0/settings.ini" = {
|
".config/gtk-3.0/settings.ini" = {
|
||||||
source = ./files/settings.ini;
|
source = ./files/settings.ini;
|
||||||
};
|
};
|
||||||
|
};
|
||||||
|
home.file = {
|
||||||
".icons/default" = {
|
".icons/default" = {
|
||||||
source = "${pkgs.adwaita-icon-theme}/share/icons/Adwaita";
|
source = "${pkgs.adwaita-icon-theme}/share/icons/Adwaita";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
};
|
||||||
|
|
||||||
# For mounting drives in pcmanfm
|
# For mounting drives in pcmanfm
|
||||||
services.gvfs.enable = true;
|
services.gvfs.enable = true;
|
||||||
|
|||||||
@@ -48,11 +48,13 @@
|
|||||||
})
|
})
|
||||||
];
|
];
|
||||||
|
|
||||||
me.install.user.talexander.file = {
|
home-manager.users.talexander =
|
||||||
".config/Code/User/settings.json" = {
|
{ pkgs, ... }:
|
||||||
|
{
|
||||||
|
home.file.".config/Code/User/settings.json" = {
|
||||||
source = ./files/settings.json;
|
source = ./files/settings.json;
|
||||||
};
|
};
|
||||||
".config/Code/User/keybindings.json" = {
|
home.file.".config/Code/User/keybindings.json" = {
|
||||||
source = ./files/keybindings.json;
|
source = ./files/keybindings.json;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -20,12 +20,6 @@
|
|||||||
"command": "-workbench.action.navigateBack",
|
"command": "-workbench.action.navigateBack",
|
||||||
"when": "canNavigateBack"
|
"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+/",
|
"key": "shift+alt+/",
|
||||||
"command": "editor.action.goToReferences",
|
"command": "editor.action.goToReferences",
|
||||||
|
|||||||
@@ -18,7 +18,6 @@
|
|||||||
"workbench.editor.showTabs": "none",
|
"workbench.editor.showTabs": "none",
|
||||||
"workbench.activityBar.location": "hidden",
|
"workbench.activityBar.location": "hidden",
|
||||||
"window.menuBarVisibility": "toggle",
|
"window.menuBarVisibility": "toggle",
|
||||||
"window.commandCenter": false,
|
|
||||||
"explorer.autoReveal": false,
|
"explorer.autoReveal": false,
|
||||||
"[python]": {
|
"[python]": {
|
||||||
"editor.defaultFormatter": "ms-python.black-formatter",
|
"editor.defaultFormatter": "ms-python.black-formatter",
|
||||||
@@ -36,21 +35,11 @@
|
|||||||
"editor.defaultFormatter": "esbenp.prettier-vscode",
|
"editor.defaultFormatter": "esbenp.prettier-vscode",
|
||||||
"editor.formatOnSave": true
|
"editor.formatOnSave": true
|
||||||
},
|
},
|
||||||
"[typescriptreact]": {
|
|
||||||
"editor.defaultFormatter": "esbenp.prettier-vscode",
|
|
||||||
"editor.formatOnSave": true
|
|
||||||
},
|
|
||||||
"javascript.autoClosingTags": false,
|
|
||||||
"typescript.autoClosingTags": false,
|
|
||||||
"black-formatter.importStrategy": "fromEnvironment",
|
"black-formatter.importStrategy": "fromEnvironment",
|
||||||
"workbench.statusBar.visible": false,
|
"workbench.statusBar.visible": false,
|
||||||
"git.openRepositoryInParentFolders": "never",
|
"git.openRepositoryInParentFolders": "never",
|
||||||
"files.autoSave": "afterDelay",
|
"files.autoSave": "afterDelay",
|
||||||
"editor.rulers": [
|
"editor.rulers": [
|
||||||
100
|
100
|
||||||
],
|
]
|
||||||
"workbench.secondarySideBar.defaultVisibility": "hidden",
|
|
||||||
"editor.autoClosingBrackets": "never",
|
|
||||||
"editor.autoSurround": "never",
|
|
||||||
"workbench.editor.navigationScope": "editorGroup"
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -113,7 +113,10 @@ in
|
|||||||
|
|
||||||
services.upower.enable = true; # for battery
|
services.upower.enable = true; # for battery
|
||||||
|
|
||||||
me.install.user.talexander.file = {
|
home-manager.users.talexander =
|
||||||
|
{ pkgs, ... }:
|
||||||
|
{
|
||||||
|
home.file = {
|
||||||
".config/waybar/config" = {
|
".config/waybar/config" = {
|
||||||
source = ./files/waybar_config.json;
|
source = ./files/waybar_config.json;
|
||||||
};
|
};
|
||||||
@@ -121,6 +124,7 @@ in
|
|||||||
source = ./files/style.css;
|
source = ./files/style.css;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
};
|
||||||
})
|
})
|
||||||
]
|
]
|
||||||
);
|
);
|
||||||
|
|||||||
@@ -49,8 +49,6 @@ let
|
|||||||
|
|
||||||
source ${pkgs.zsh-histdb}/share/zsh/plugins/zsh-histdb/histdb-interactive.zsh
|
source ${pkgs.zsh-histdb}/share/zsh/plugins/zsh-histdb/histdb-interactive.zsh
|
||||||
bindkey '^r' _histdb-isearch
|
bindkey '^r' _histdb-isearch
|
||||||
|
|
||||||
${lib.concatMapStringsSep "\n" (item: "source ${item}") config.me.zsh.includes}
|
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
in
|
in
|
||||||
@@ -64,16 +62,6 @@ in
|
|||||||
example = true;
|
example = true;
|
||||||
description = "Whether we want to install zsh.";
|
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 (
|
config = lib.mkIf config.me.zsh.enable (
|
||||||
@@ -90,8 +78,10 @@ in
|
|||||||
enable = true;
|
enable = true;
|
||||||
};
|
};
|
||||||
|
|
||||||
me.install.user.talexander.file = {
|
home-manager.users.talexander =
|
||||||
".zshrc" = {
|
{ pkgs, ... }:
|
||||||
|
{
|
||||||
|
home.file.".zshrc" = {
|
||||||
source = "${zshrc}";
|
source = "${zshrc}";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -2,178 +2,86 @@
|
|||||||
config,
|
config,
|
||||||
lib,
|
lib,
|
||||||
pkgs,
|
pkgs,
|
||||||
|
home-manager,
|
||||||
...
|
...
|
||||||
}:
|
}:
|
||||||
|
|
||||||
let
|
let
|
||||||
cfg = config.me.install;
|
|
||||||
inherit (lib)
|
inherit (lib)
|
||||||
filter
|
|
||||||
attrNames
|
attrNames
|
||||||
|
filter
|
||||||
|
flatten
|
||||||
;
|
;
|
||||||
|
makeFileOption =
|
||||||
get_shell_values =
|
prefix:
|
||||||
target:
|
lib.mkOption {
|
||||||
let
|
type = lib.types.attrsOf (
|
||||||
homedir = config.users.users."${target.username}".home;
|
lib.types.submodule (
|
||||||
group = config.users.users."${target.username}".group;
|
{ name, config, ... }:
|
||||||
in
|
|
||||||
{
|
{
|
||||||
source = lib.strings.escapeShellArg "${target.source}";
|
options = {
|
||||||
destination = lib.strings.escapeShellArg "${homedir}/${target.target}";
|
enable = lib.mkOption {
|
||||||
mode = lib.strings.escapeShellArg "${target.mode}";
|
type = lib.types.bool;
|
||||||
dir_mode = lib.strings.escapeShellArg "${target.dir_mode}";
|
default = true;
|
||||||
username = lib.strings.escapeShellArg "${target.username}";
|
defaultText = "${prefix}.‹path›.enable";
|
||||||
group = lib.strings.escapeShellArg "${group}";
|
example = false;
|
||||||
|
description = "Whether we want to install this file.";
|
||||||
};
|
};
|
||||||
install_user_file =
|
method = lib.mkOption {
|
||||||
let
|
type = lib.types.enum [
|
||||||
constructors = {
|
"symlink"
|
||||||
"overwrite" = install_user_file_overwrite;
|
"overwrite"
|
||||||
"symlink" = install_user_file_symlink;
|
"initialize"
|
||||||
|
# "bind_mount" TODO: for directories?
|
||||||
|
];
|
||||||
|
default = "symlink";
|
||||||
|
defaultText = "${prefix}.‹path›.method";
|
||||||
|
example = "overwrite";
|
||||||
|
description = "The way in which the file should be installed.";
|
||||||
};
|
};
|
||||||
in
|
mode = lib.mkOption {
|
||||||
stage: target: (constructors."${target.method}"."${stage}" target);
|
type = lib.types.str;
|
||||||
install_user_file_overwrite = {
|
default = "0444";
|
||||||
"check" = (target: "");
|
defaultText = "${prefix}.‹path›.mode";
|
||||||
"install" = (
|
example = "0750";
|
||||||
target:
|
description = "The read, write, execute permission flags.";
|
||||||
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 = {
|
source = lib.mkOption {
|
||||||
"check" = (target: "");
|
type = lib.types.path;
|
||||||
"install" = (
|
defaultText = "${prefix}.‹path›.source";
|
||||||
target:
|
example = ./files/foo.txt;
|
||||||
let
|
description = "The source file to install into the destination.";
|
||||||
inherit (get_shell_values target)
|
};
|
||||||
source
|
target = lib.mkOption {
|
||||||
destination
|
type = lib.types.str;
|
||||||
mode
|
defaultText = "${prefix}.‹path›.target";
|
||||||
dir_mode
|
example = ".local/share/foo/bar.txt";
|
||||||
username
|
description = "The path where the file should be written.";
|
||||||
group
|
};
|
||||||
;
|
group = lib.mkOption {
|
||||||
owner = lib.strings.concatStringsSep ":" (
|
type = lib.types.nullOr lib.types.str;
|
||||||
filter (val: val != "") [
|
default = null;
|
||||||
username
|
defaultText = "${prefix}.‹path›.group";
|
||||||
group
|
example = ".local/share/foo/bar.txt";
|
||||||
]
|
description = "The group that should own the file.";
|
||||||
);
|
};
|
||||||
dir_flags = lib.strings.concatStringsSep " " [
|
};
|
||||||
(if dir_mode != "" then "-m ${dir_mode}" else "")
|
|
||||||
(if username != "" then "-o ${username}" else "")
|
config = {
|
||||||
(if group != "" then "-g ${group}" else "")
|
target = lib.mkDefault name;
|
||||||
];
|
};
|
||||||
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}
|
|
||||||
''
|
|
||||||
]
|
|
||||||
);
|
);
|
||||||
|
defaultText = "${prefix}.‹path›";
|
||||||
|
default = { };
|
||||||
|
example = lib.literalExpression ''
|
||||||
|
{
|
||||||
|
".config/foo/bar.txt" = {
|
||||||
|
source = ./files/bar.txt
|
||||||
|
};
|
||||||
|
}
|
||||||
|
'';
|
||||||
};
|
};
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
@@ -184,150 +92,88 @@ in
|
|||||||
type = lib.types.attrsOf (
|
type = lib.types.attrsOf (
|
||||||
lib.types.submodule (
|
lib.types.submodule (
|
||||||
{ name, config, ... }:
|
{ name, config, ... }:
|
||||||
let
|
|
||||||
username = name;
|
|
||||||
in
|
|
||||||
{
|
{
|
||||||
options = {
|
options = {
|
||||||
enable = lib.mkOption {
|
enable = lib.mkOption {
|
||||||
type = lib.types.bool;
|
type = lib.types.bool;
|
||||||
default = true;
|
default = true;
|
||||||
defaultText = "enable";
|
defaultText = "me.install.user.‹username›.enable";
|
||||||
example = lib.literalExpression false;
|
example = false;
|
||||||
description = "Whether we want to install files in this user's home directory.";
|
description = "Whether we want to install files in this user's home directory.";
|
||||||
};
|
};
|
||||||
|
target_username = lib.mkOption {
|
||||||
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;
|
type = lib.types.str;
|
||||||
defaultText = "username";
|
defaultText = "me.install.file.‹username›.target_username";
|
||||||
example = "root";
|
example = "root";
|
||||||
description = "The username for the user whose home directory will contain the file.";
|
description = "The username for the user whose home directory will contain the file.";
|
||||||
};
|
};
|
||||||
target = lib.mkOption {
|
file = makeFileOption "me.install.user.‹username›.file";
|
||||||
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 = {
|
config = {
|
||||||
username = lib.mkDefault username;
|
target_username = lib.mkDefault name;
|
||||||
target = lib.mkDefault path;
|
|
||||||
};
|
|
||||||
}
|
|
||||||
)
|
|
||||||
);
|
|
||||||
};
|
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
|
|
||||||
|
defaultText = "me.install.user.‹username›";
|
||||||
|
default = { };
|
||||||
|
# TODO: example
|
||||||
};
|
};
|
||||||
|
# TODO: Global option owned by root?
|
||||||
|
# file = makeFileOption "me.install.file";
|
||||||
};
|
};
|
||||||
|
|
||||||
config =
|
config =
|
||||||
let
|
let
|
||||||
all_users = builtins.map (username: cfg.user."${username}") (attrNames cfg.user);
|
cfg = config.me.install;
|
||||||
enabled_users = filter (user: user.enable) all_users;
|
active_install_users = filter (username: cfg.user."${username}".enable) (attrNames cfg.user);
|
||||||
all_file_targets = lib.flatten (
|
install_commands = flatten (
|
||||||
builtins.map (user: (builtins.map (path: user.file."${path}") (attrNames user.file))) enabled_users
|
builtins.map (
|
||||||
);
|
username:
|
||||||
enabled_file_targets = filter (target: target.enable) all_file_targets;
|
let
|
||||||
check_commands = lib.flatten (builtins.map (install_user_file "check") enabled_file_targets);
|
active_install_file_targets = filter (target: cfg.user."${username}".file."${target}".enable) (
|
||||||
install_commands = lib.flatten (builtins.map (install_user_file "install") enabled_file_targets);
|
attrNames cfg.user."${username}".file
|
||||||
uninstall_commands = lib.flatten (
|
|
||||||
builtins.map (install_user_file "uninstall") enabled_file_targets
|
|
||||||
);
|
);
|
||||||
in
|
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
|
||||||
|
);
|
||||||
|
|
||||||
|
in
|
||||||
|
lib.mkMerge [
|
||||||
|
(lib.mkIf (install_commands != [ ]) ({
|
||||||
systemd.services.me-install-file = {
|
systemd.services.me-install-file = {
|
||||||
enable = true;
|
enable = true;
|
||||||
description = "me-install-file";
|
description = "me-install-file";
|
||||||
wantedBy = [ "multi-user.target" ];
|
wantedBy = [ "multi-user.target" ];
|
||||||
wants = [ "multi-user.target" ];
|
wants = [ "multi-user.target" ];
|
||||||
before = [ "multi-user.target" ];
|
after = [ "multi-user.target" ];
|
||||||
# path = with pkgs; [
|
|
||||||
# zfs
|
|
||||||
# ];
|
|
||||||
unitConfig.DefaultDependencies = "no";
|
unitConfig.DefaultDependencies = "no";
|
||||||
serviceConfig = {
|
serviceConfig = {
|
||||||
Type = "oneshot";
|
Type = "oneshot";
|
||||||
RemainAfterExit = "yes";
|
RemainAfterExit = "yes";
|
||||||
};
|
};
|
||||||
script =
|
script = (lib.strings.concatStringsSep "\n" install_commands);
|
||||||
''
|
|
||||||
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);
|
|
||||||
};
|
|
||||||
};
|
};
|
||||||
|
}))
|
||||||
|
];
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,38 +0,0 @@
|
|||||||
#!/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
|
|
||||||
|
|
||||||
}
|
|
||||||
Reference in New Issue
Block a user