Compare commits
53 Commits
starship
...
15c209fdd9
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
15c209fdd9 | ||
|
|
ee181b535e | ||
|
|
4d0fc61e13 | ||
|
|
2b54630053 | ||
|
|
84bd6be8e6 | ||
|
|
dd96520ad1 | ||
|
|
11a1d61581 | ||
|
|
bab2cfdc7b | ||
|
|
fd0c92f3eb | ||
|
|
6ac33d2538 | ||
|
|
8d4b345414 | ||
|
|
8beaf00693 | ||
|
|
181e650094 | ||
|
|
449f288214 | ||
|
|
f6df27d7a9 | ||
|
|
e3a7a410c4 | ||
|
|
345c62a477 | ||
|
|
e7528765a9 | ||
|
|
54860370c0 | ||
|
|
46b21370bd | ||
|
|
381e3fb591 | ||
|
|
5d4ebf90b3 | ||
|
|
7dcdcc906c | ||
|
|
a4abb96de3 | ||
|
|
5859a06c5d | ||
|
|
02223deb64 | ||
|
|
20e247f8ed | ||
|
|
b0186dc85b | ||
|
|
cac15febfa | ||
|
|
48fa3c7436 | ||
|
|
7dd922c2a2 | ||
|
|
ab6f7dbea5 | ||
|
|
fea86b00b4 | ||
|
|
197b8fcced | ||
|
|
0bec3dbe63 | ||
|
|
53caf8bc81 | ||
|
|
c37d0d9b9e | ||
|
|
a663a90ada | ||
|
|
2d976a1cf3 | ||
|
|
d8e8781287 | ||
|
|
502e18fdec | ||
|
|
24d83e95a5 | ||
|
|
3ed43b1b8a | ||
|
|
64e735abbf | ||
|
|
ed11bf1e65 | ||
|
|
c0afe006b8 | ||
|
|
1fe305576b | ||
|
|
fc400a98db | ||
|
|
4a63e1c23e | ||
|
|
379795f6e8 | ||
|
|
edd3c6a266 | ||
|
|
dd785692ce | ||
|
|
c6ff6a1f24 |
@@ -63,6 +63,13 @@
|
|||||||
./roles/shipwright
|
./roles/shipwright
|
||||||
./roles/2ship2harkinian
|
./roles/2ship2harkinian
|
||||||
./roles/nix_index
|
./roles/nix_index
|
||||||
|
./roles/flux
|
||||||
|
./roles/tekton
|
||||||
|
./roles/gnuplot
|
||||||
|
./roles/sops
|
||||||
|
./roles/gcloud
|
||||||
|
./roles/steam_run_free
|
||||||
|
./roles/pcsx2
|
||||||
];
|
];
|
||||||
|
|
||||||
nix.settings.experimental-features = [
|
nix.settings.experimental-features = [
|
||||||
@@ -152,6 +159,10 @@
|
|||||||
ncdu
|
ncdu
|
||||||
nix-tree
|
nix-tree
|
||||||
libarchive # bsdtar
|
libarchive # bsdtar
|
||||||
|
lsof
|
||||||
|
doas-sudo-shim # To support --use-remote-sudo for remote builds
|
||||||
|
dmidecode # Read SMBIOS information.
|
||||||
|
ipcalc
|
||||||
];
|
];
|
||||||
|
|
||||||
services.openssh = {
|
services.openssh = {
|
||||||
|
|||||||
12
nix/configuration/flake.lock
generated
12
nix/configuration/flake.lock
generated
@@ -135,11 +135,11 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1737762889,
|
"lastModified": 1741955947,
|
||||||
"narHash": "sha256-5HGG09bh/Yx0JA8wtBMAzt0HMCL1bYZ93x4IqzVExio=",
|
"narHash": "sha256-2lbURKclgKqBNm7hVRtWh0A7NrdsibD0EaWhahUVhhY=",
|
||||||
"owner": "nix-community",
|
"owner": "nix-community",
|
||||||
"repo": "home-manager",
|
"repo": "home-manager",
|
||||||
"rev": "daf04c5950b676f47a794300657f1d3d14c1a120",
|
"rev": "4e12151c9e014e2449e0beca2c0e9534b96a26b4",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
@@ -191,11 +191,11 @@
|
|||||||
},
|
},
|
||||||
"nixpkgs": {
|
"nixpkgs": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1737885589,
|
"lastModified": 1741851582,
|
||||||
"narHash": "sha256-Zf0hSrtzaM1DEz8//+Xs51k/wdSajticVrATqDrfQjg=",
|
"narHash": "sha256-cPfs8qMccim2RBgtKGF+x9IBCduRvd/N5F4nYpU0TVE=",
|
||||||
"owner": "NixOS",
|
"owner": "NixOS",
|
||||||
"repo": "nixpkgs",
|
"repo": "nixpkgs",
|
||||||
"rev": "852ff1d9e153d8875a83602e03fdef8a63f0ecf8",
|
"rev": "6607cf789e541e7873d40d3a8f7815ea92204f32",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
|||||||
@@ -21,7 +21,7 @@
|
|||||||
boot.initrd.kernelModules = [ "i915" ];
|
boot.initrd.kernelModules = [ "i915" ];
|
||||||
|
|
||||||
# Mount tmpfs at /tmp
|
# Mount tmpfs at /tmp
|
||||||
boot.tmp.useTmpfs = true;
|
# boot.tmp.useTmpfs = true;
|
||||||
|
|
||||||
me.bluetooth.enable = true;
|
me.bluetooth.enable = true;
|
||||||
me.emacs_flavor = "plainmacs";
|
me.emacs_flavor = "plainmacs";
|
||||||
|
|||||||
@@ -1,4 +1,9 @@
|
|||||||
{ config, pkgs, ... }:
|
{
|
||||||
|
config,
|
||||||
|
lib,
|
||||||
|
pkgs,
|
||||||
|
...
|
||||||
|
}:
|
||||||
{
|
{
|
||||||
imports = [
|
imports = [
|
||||||
./hardware-configuration.nix
|
./hardware-configuration.nix
|
||||||
@@ -7,6 +12,7 @@
|
|||||||
./power_management.nix
|
./power_management.nix
|
||||||
./screen_brightness.nix
|
./screen_brightness.nix
|
||||||
./wifi.nix
|
./wifi.nix
|
||||||
|
./framework_module.nix
|
||||||
];
|
];
|
||||||
|
|
||||||
# Generate with `head -c4 /dev/urandom | od -A none -t x4`
|
# Generate with `head -c4 /dev/urandom | od -A none -t x4`
|
||||||
@@ -27,8 +33,15 @@
|
|||||||
|
|
||||||
environment.systemPackages = with pkgs; [
|
environment.systemPackages = with pkgs; [
|
||||||
fw-ectool
|
fw-ectool
|
||||||
|
framework-tool
|
||||||
];
|
];
|
||||||
|
|
||||||
|
# Enable light sensor
|
||||||
|
# hardware.sensor.iio.enable = lib.mkDefault true;
|
||||||
|
|
||||||
|
# Enable TRIM
|
||||||
|
# services.fstrim.enable = lib.mkDefault true;
|
||||||
|
|
||||||
me.alacritty.enable = true;
|
me.alacritty.enable = true;
|
||||||
me.ansible.enable = true;
|
me.ansible.enable = true;
|
||||||
me.ares.enable = true;
|
me.ares.enable = true;
|
||||||
@@ -38,7 +51,10 @@
|
|||||||
me.docker.enable = true;
|
me.docker.enable = true;
|
||||||
me.emacs_flavor = "full";
|
me.emacs_flavor = "full";
|
||||||
me.firefox.enable = true;
|
me.firefox.enable = true;
|
||||||
|
me.flux.enable = true;
|
||||||
|
me.gcloud.enable = true;
|
||||||
me.git.config = ../../roles/git/files/gitconfig_home;
|
me.git.config = ../../roles/git/files/gitconfig_home;
|
||||||
|
me.gnuplot.enable = true;
|
||||||
me.gpg.enable = true;
|
me.gpg.enable = true;
|
||||||
me.graphical = true;
|
me.graphical = true;
|
||||||
me.graphics_card_type = "amd";
|
me.graphics_card_type = "amd";
|
||||||
@@ -49,12 +65,16 @@
|
|||||||
me.lvfs.enable = true;
|
me.lvfs.enable = true;
|
||||||
me.media.enable = true;
|
me.media.enable = true;
|
||||||
me.nix_index.enable = true;
|
me.nix_index.enable = true;
|
||||||
|
me.pcsx2.enable = true;
|
||||||
me.python.enable = true;
|
me.python.enable = true;
|
||||||
me.qemu.enable = true;
|
me.qemu.enable = true;
|
||||||
me.rust.enable = true;
|
me.rust.enable = true;
|
||||||
|
me.sops.enable = true;
|
||||||
me.sound.enable = true;
|
me.sound.enable = true;
|
||||||
me.steam.enable = true;
|
me.steam.enable = true;
|
||||||
|
me.steam_run_free.enable = true;
|
||||||
me.sway.enable = true;
|
me.sway.enable = true;
|
||||||
|
me.tekton.enable = true;
|
||||||
me.terraform.enable = true;
|
me.terraform.enable = true;
|
||||||
me.vnc_client.enable = true;
|
me.vnc_client.enable = true;
|
||||||
me.vscode.enable = true;
|
me.vscode.enable = true;
|
||||||
|
|||||||
23
nix/configuration/hosts/odo/framework_module.nix
Normal file
23
nix/configuration/hosts/odo/framework_module.nix
Normal file
@@ -0,0 +1,23 @@
|
|||||||
|
{
|
||||||
|
config,
|
||||||
|
lib,
|
||||||
|
pkgs,
|
||||||
|
...
|
||||||
|
}:
|
||||||
|
|
||||||
|
{
|
||||||
|
imports = [ ];
|
||||||
|
|
||||||
|
config = lib.mkMerge [
|
||||||
|
{
|
||||||
|
boot.extraModulePackages = with config.boot.kernelPackages; [
|
||||||
|
framework-laptop-kmod
|
||||||
|
];
|
||||||
|
# https://github.com/DHowett/framework-laptop-kmod?tab=readme-ov-file#usage
|
||||||
|
boot.kernelModules = [
|
||||||
|
"cros_ec"
|
||||||
|
"cros_ec_lpcs"
|
||||||
|
];
|
||||||
|
}
|
||||||
|
];
|
||||||
|
}
|
||||||
@@ -22,16 +22,18 @@
|
|||||||
"nixos-test"
|
"nixos-test"
|
||||||
];
|
];
|
||||||
|
|
||||||
|
# Keep ALL dependencies so we can rebuild offline. This DRASTICALLY increase disk usage, but disk space is cheap.
|
||||||
|
# system.includeBuildDependencies = true;
|
||||||
|
|
||||||
# nixpkgs.hostPlatform = {
|
# nixpkgs.hostPlatform = {
|
||||||
# gcc.arch = "znver4";
|
# gcc.arch = "znver4";
|
||||||
# gcc.tune = "znver4";
|
# gcc.tune = "znver4";
|
||||||
# system = "x86_64-linux";
|
# system = "x86_64-linux";
|
||||||
|
|
||||||
# };
|
# };
|
||||||
|
|
||||||
nixpkgs.overlays = [
|
nixpkgs.overlays = [
|
||||||
(
|
(
|
||||||
self: super:
|
final: prev:
|
||||||
let
|
let
|
||||||
optimizeWithFlags =
|
optimizeWithFlags =
|
||||||
pkg: flags:
|
pkg: flags:
|
||||||
@@ -62,11 +64,17 @@
|
|||||||
HZ_1000 = lib.kernel.no;
|
HZ_1000 = lib.kernel.no;
|
||||||
}
|
}
|
||||||
(
|
(
|
||||||
optimizeWithFlags super.linux_6_12 [
|
optimizeWithFlags prev.linux_6_13 [
|
||||||
"-march=znver4"
|
"-march=znver4"
|
||||||
"-mtune=znver4"
|
"-mtune=znver4"
|
||||||
]
|
]
|
||||||
);
|
);
|
||||||
|
# gsl = prev.gsl.overrideAttrs (old: {
|
||||||
|
# # gsl tests fails when optimizations are enabled.
|
||||||
|
# # > FAIL: cholesky_invert unscaled hilbert ( 4, 4)[0,2]: 2.55795384873636067e-13 0
|
||||||
|
# # > (2.55795384873636067e-13 observed vs 0 expected) [28259614]
|
||||||
|
# doCheck = false;
|
||||||
|
# });
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
];
|
];
|
||||||
@@ -74,7 +82,7 @@
|
|||||||
boot.kernelPackages = pkgs.linuxPackagesFor pkgs.linux_znver4;
|
boot.kernelPackages = pkgs.linuxPackagesFor pkgs.linux_znver4;
|
||||||
})
|
})
|
||||||
(lib.mkIf (config.me.buildingIso) {
|
(lib.mkIf (config.me.buildingIso) {
|
||||||
boot.kernelPackages = pkgs.linuxPackagesFor pkgs.linux_6_12;
|
boot.kernelPackages = pkgs.linuxPackagesFor pkgs.linux_6_13;
|
||||||
boot.supportedFilesystems.zfs = true;
|
boot.supportedFilesystems.zfs = true;
|
||||||
})
|
})
|
||||||
];
|
];
|
||||||
|
|||||||
@@ -9,9 +9,10 @@
|
|||||||
imports = [ ];
|
imports = [ ];
|
||||||
|
|
||||||
config = {
|
config = {
|
||||||
environment.loginShellInit = lib.mkIf (!config.me.buildingIso) ''
|
# Doesn't seem necessary starting with 6.13
|
||||||
doas iw dev wlan0 set power_save off
|
# environment.loginShellInit = lib.mkIf (!config.me.buildingIso) ''
|
||||||
'';
|
# doas iw dev wlan0 set power_save off
|
||||||
|
# '';
|
||||||
|
|
||||||
# Enable debug logging for ath12k wifi card.
|
# Enable debug logging for ath12k wifi card.
|
||||||
boot.kernelParams = [
|
boot.kernelParams = [
|
||||||
|
|||||||
@@ -56,6 +56,32 @@
|
|||||||
# };
|
# };
|
||||||
};
|
};
|
||||||
|
|
||||||
|
systemd.services.link-docker-creds = {
|
||||||
|
# Contains credentials so it cannot be added to the nix store
|
||||||
|
enable = true;
|
||||||
|
description = "link-docker-creds";
|
||||||
|
wantedBy = [ "multi-user.target" ];
|
||||||
|
wants = [ "multi-user.target" ];
|
||||||
|
after = [ "multi-user.target" ];
|
||||||
|
# path = with pkgs; [
|
||||||
|
# zfs
|
||||||
|
# ];
|
||||||
|
unitConfig.DefaultDependencies = "no";
|
||||||
|
serviceConfig = {
|
||||||
|
Type = "oneshot";
|
||||||
|
RemainAfterExit = "yes";
|
||||||
|
};
|
||||||
|
script = ''
|
||||||
|
if [ -e /persist/manual/docker/config.json ]; then
|
||||||
|
install --directory --owner talexander --group talexander --mode 0700 /home/talexander/.docker
|
||||||
|
ln -s /persist/manual/docker/config.json /home/talexander/.docker/config.json
|
||||||
|
fi
|
||||||
|
'';
|
||||||
|
preStop = ''
|
||||||
|
rm -f /home/talexander/.docker/config.json
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
|
||||||
# Needed for non-rootless docker
|
# Needed for non-rootless docker
|
||||||
users.users.talexander.extraGroups = [ "docker" ];
|
users.users.talexander.extraGroups = [ "docker" ];
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -89,7 +89,7 @@ in
|
|||||||
(lib.mkIf (config.me.graphical) {
|
(lib.mkIf (config.me.graphical) {
|
||||||
nixpkgs.overlays = [
|
nixpkgs.overlays = [
|
||||||
(final: prev: {
|
(final: prev: {
|
||||||
my_emacs = final.emacs29-pgtk;
|
my_emacs = final.emacs30-pgtk;
|
||||||
})
|
})
|
||||||
];
|
];
|
||||||
})
|
})
|
||||||
@@ -121,6 +121,7 @@ in
|
|||||||
dicts: with dicts; [
|
dicts: with dicts; [
|
||||||
en
|
en
|
||||||
en-computers
|
en-computers
|
||||||
|
# en-science # TODO: Why is en-science non-free?
|
||||||
]
|
]
|
||||||
))
|
))
|
||||||
final.nixd # nix language server
|
final.nixd # nix language server
|
||||||
@@ -129,6 +130,9 @@ in
|
|||||||
final.shellcheck
|
final.shellcheck
|
||||||
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.nodePackages_latest.prettier # Format yaml, json, and JS
|
||||||
|
final.terraform-ls
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
'';
|
'';
|
||||||
|
|||||||
@@ -51,17 +51,27 @@
|
|||||||
;; Persist history over Emacs restarts. Vertico sorts by history position.
|
;; Persist history over Emacs restarts. Vertico sorts by history position.
|
||||||
(use-package savehist
|
(use-package savehist
|
||||||
;; This is an emacs built-in but we're pulling the latest version
|
;; This is an emacs built-in but we're pulling the latest version
|
||||||
|
:pin gnu
|
||||||
:config
|
:config
|
||||||
(savehist-mode))
|
(savehist-mode))
|
||||||
|
|
||||||
(use-package which-key
|
(use-package which-key
|
||||||
|
:pin gnu
|
||||||
:diminish
|
:diminish
|
||||||
:config
|
:config
|
||||||
(which-key-mode))
|
(which-key-mode))
|
||||||
|
|
||||||
(use-package windmove
|
(use-package windmove
|
||||||
:config
|
;; This is an emacs built-in but we're pulling the latest version
|
||||||
(windmove-default-keybindings))
|
:pin gnu
|
||||||
|
:bind
|
||||||
|
(
|
||||||
|
("S-<up>" . windmove-up)
|
||||||
|
("S-<right>" . windmove-right)
|
||||||
|
("S-<down>" . windmove-down)
|
||||||
|
("S-<left>" . windmove-left)
|
||||||
|
)
|
||||||
|
)
|
||||||
|
|
||||||
(setq tramp-default-method "ssh")
|
(setq tramp-default-method "ssh")
|
||||||
|
|
||||||
|
|||||||
@@ -63,6 +63,9 @@
|
|||||||
show-trailing-whitespace t
|
show-trailing-whitespace t
|
||||||
;; Remove the line when killing it with ctrl-k
|
;; Remove the line when killing it with ctrl-k
|
||||||
kill-whole-line t
|
kill-whole-line t
|
||||||
|
|
||||||
|
;; Show the current project in the mode line
|
||||||
|
project-mode-line t
|
||||||
)
|
)
|
||||||
|
|
||||||
;; (setq-default fringes-outside-margins t)
|
;; (setq-default fringes-outside-margins t)
|
||||||
|
|||||||
@@ -1,16 +1,23 @@
|
|||||||
(use-package org
|
(use-package org
|
||||||
:ensure nil
|
:ensure nil
|
||||||
:commands org-mode
|
:commands org-mode
|
||||||
:bind (
|
:bind (:map org-mode-map
|
||||||
("C-c l" . org-store-link)
|
("C-c l" . org-store-link)
|
||||||
("C-c a" . org-agenda)
|
("C-c a" . org-agenda)
|
||||||
("C--" . org-timestamp-down)
|
("S-<up>" . org-shiftup)
|
||||||
("C-=" . org-timestamp-up)
|
("S-<right>" . org-shiftright)
|
||||||
|
("S-<down>" . org-shiftdown)
|
||||||
|
("S-<left>" . org-shiftleft)
|
||||||
)
|
)
|
||||||
:hook (
|
:hook (
|
||||||
(org-mode . (lambda ()
|
(org-mode . (lambda ()
|
||||||
(org-indent-mode +1)
|
(org-indent-mode +1)
|
||||||
))
|
))
|
||||||
|
;; Make windmove work in Org mode:
|
||||||
|
(org-shiftup-final . windmove-up)
|
||||||
|
(org-shiftleft-final . windmove-left)
|
||||||
|
(org-shiftdown-final . windmove-down)
|
||||||
|
(org-shiftright-final . windmove-right)
|
||||||
)
|
)
|
||||||
:config
|
:config
|
||||||
(require 'org-tempo)
|
(require 'org-tempo)
|
||||||
|
|||||||
29
nix/configuration/roles/flux/default.nix
Normal file
29
nix/configuration/roles/flux/default.nix
Normal file
@@ -0,0 +1,29 @@
|
|||||||
|
{
|
||||||
|
config,
|
||||||
|
lib,
|
||||||
|
pkgs,
|
||||||
|
...
|
||||||
|
}:
|
||||||
|
|
||||||
|
{
|
||||||
|
imports = [ ];
|
||||||
|
|
||||||
|
options.me = {
|
||||||
|
flux.enable = lib.mkOption {
|
||||||
|
type = lib.types.bool;
|
||||||
|
default = false;
|
||||||
|
example = true;
|
||||||
|
description = "Whether we want to install flux.";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
config = lib.mkIf config.me.flux.enable (
|
||||||
|
lib.mkMerge [
|
||||||
|
{
|
||||||
|
environment.systemPackages = with pkgs; [
|
||||||
|
fluxcd
|
||||||
|
];
|
||||||
|
}
|
||||||
|
]
|
||||||
|
);
|
||||||
|
}
|
||||||
43
nix/configuration/roles/gcloud/default.nix
Normal file
43
nix/configuration/roles/gcloud/default.nix
Normal file
@@ -0,0 +1,43 @@
|
|||||||
|
{
|
||||||
|
config,
|
||||||
|
lib,
|
||||||
|
pkgs,
|
||||||
|
...
|
||||||
|
}:
|
||||||
|
|
||||||
|
{
|
||||||
|
imports = [ ];
|
||||||
|
|
||||||
|
options.me = {
|
||||||
|
gcloud.enable = lib.mkOption {
|
||||||
|
type = lib.types.bool;
|
||||||
|
default = false;
|
||||||
|
example = true;
|
||||||
|
description = "Whether we want to install gcloud.";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
config = lib.mkIf config.me.gcloud.enable (
|
||||||
|
lib.mkMerge [
|
||||||
|
{
|
||||||
|
environment.systemPackages = with pkgs; [
|
||||||
|
(google-cloud-sdk.withExtraComponents [ google-cloud-sdk.components.gke-gcloud-auth-plugin ])
|
||||||
|
];
|
||||||
|
|
||||||
|
environment.persistence."/state" = lib.mkIf (!config.me.buildingIso) {
|
||||||
|
hideMounts = true;
|
||||||
|
users.talexander = {
|
||||||
|
directories = [
|
||||||
|
{
|
||||||
|
directory = ".config/gcloud";
|
||||||
|
user = "talexander";
|
||||||
|
group = "talexander";
|
||||||
|
mode = "0700";
|
||||||
|
}
|
||||||
|
];
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
|
]
|
||||||
|
);
|
||||||
|
}
|
||||||
@@ -3,7 +3,7 @@
|
|||||||
name = Tom Alexander
|
name = Tom Alexander
|
||||||
signingkey = D3A179C9A53C0EDE
|
signingkey = D3A179C9A53C0EDE
|
||||||
[push]
|
[push]
|
||||||
default = simple
|
default = simple # (default since 2.0)
|
||||||
[alias]
|
[alias]
|
||||||
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
|
||||||
@@ -12,24 +12,42 @@
|
|||||||
excludesfile = ~/.gitignore_global
|
excludesfile = ~/.gitignore_global
|
||||||
[commit]
|
[commit]
|
||||||
gpgsign = true
|
gpgsign = true
|
||||||
|
verbose = true
|
||||||
[pull]
|
[pull]
|
||||||
rebase = true
|
rebase = true
|
||||||
[log]
|
[log]
|
||||||
date = local
|
date = local
|
||||||
[init]
|
[init]
|
||||||
defaultBranch = main
|
defaultBranch = main
|
||||||
|
|
||||||
# Use meld for `git difftool` and `git mergetool`
|
|
||||||
[diff]
|
[diff]
|
||||||
tool = meld
|
tool = meld # Use meld for `git difftool` and `git mergetool`
|
||||||
|
algorithm = histogram
|
||||||
|
colorMoved = plain
|
||||||
|
mnemonicPrefix = true
|
||||||
|
renames = true
|
||||||
[difftool]
|
[difftool]
|
||||||
prompt = false
|
prompt = false
|
||||||
[difftool "meld"]
|
[difftool "meld"]
|
||||||
cmd = meld "$LOCAL" "$REMOTE"
|
cmd = meld "$LOCAL" "$REMOTE"
|
||||||
[merge]
|
[merge]
|
||||||
tool = meld
|
tool = meld
|
||||||
|
conflictStyle = zdiff3
|
||||||
[mergetool "meld"]
|
[mergetool "meld"]
|
||||||
# Make the middle pane start with partially-merged contents:
|
# Make the middle pane start with partially-merged contents:
|
||||||
cmd = meld "$LOCAL" "$MERGED" "$REMOTE" --output "$MERGED"
|
cmd = meld "$LOCAL" "$MERGED" "$REMOTE" --output "$MERGED"
|
||||||
# Make the middle pane start without any merge progress:
|
# Make the middle pane start without any merge progress:
|
||||||
# cmd = meld "$LOCAL" "$BASE" "$REMOTE" --output "$MERGED"
|
# cmd = meld "$LOCAL" "$BASE" "$REMOTE" --output "$MERGED"
|
||||||
|
[column]
|
||||||
|
ui = auto
|
||||||
|
[branch]
|
||||||
|
sort = -committerdate
|
||||||
|
[tag]
|
||||||
|
sort = version:refname
|
||||||
|
[fetch]
|
||||||
|
prune = true
|
||||||
|
pruneTags = true
|
||||||
|
all = true
|
||||||
|
[rebase]
|
||||||
|
autoSquash = true
|
||||||
|
autoStash = true
|
||||||
|
updateRefs = true
|
||||||
|
|||||||
29
nix/configuration/roles/gnuplot/default.nix
Normal file
29
nix/configuration/roles/gnuplot/default.nix
Normal file
@@ -0,0 +1,29 @@
|
|||||||
|
{
|
||||||
|
config,
|
||||||
|
lib,
|
||||||
|
pkgs,
|
||||||
|
...
|
||||||
|
}:
|
||||||
|
|
||||||
|
{
|
||||||
|
imports = [ ];
|
||||||
|
|
||||||
|
options.me = {
|
||||||
|
gnuplot.enable = lib.mkOption {
|
||||||
|
type = lib.types.bool;
|
||||||
|
default = false;
|
||||||
|
example = true;
|
||||||
|
description = "Whether we want to install gnuplot.";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
config = lib.mkIf config.me.gnuplot.enable (
|
||||||
|
lib.mkMerge [
|
||||||
|
{
|
||||||
|
environment.systemPackages = with pkgs; [
|
||||||
|
gnuplot
|
||||||
|
];
|
||||||
|
}
|
||||||
|
]
|
||||||
|
);
|
||||||
|
}
|
||||||
@@ -37,6 +37,11 @@
|
|||||||
xorg.xeyes # to test which windows are using x11
|
xorg.xeyes # to test which windows are using x11
|
||||||
];
|
];
|
||||||
hardware.graphics.enable = true;
|
hardware.graphics.enable = true;
|
||||||
|
# hardware.graphics.enable32Bit = true;
|
||||||
|
|
||||||
|
# Vulkan Support (64-bit is enabled by default, 32-bit is disabled by default)
|
||||||
|
# hardware.opengl.driSupport = true; # This is already enabled by default
|
||||||
|
# hardware.opengl.driSupport32Bit = true; # For 32 bit applications
|
||||||
})
|
})
|
||||||
]
|
]
|
||||||
);
|
);
|
||||||
|
|||||||
@@ -28,6 +28,21 @@ let
|
|||||||
alias_klog = pkgs.writeShellScriptBin "klog" ''
|
alias_klog = pkgs.writeShellScriptBin "klog" ''
|
||||||
exec ${pkgs.kubectl}/bin/kubectl logs --all-containers "$@"
|
exec ${pkgs.kubectl}/bin/kubectl logs --all-containers "$@"
|
||||||
'';
|
'';
|
||||||
|
decrypt_k8s_secret =
|
||||||
|
(pkgs.writeScriptBin "decrypt_k8s_secret" (builtins.readFile ./files/decrypt_k8s_secret.bash))
|
||||||
|
.overrideAttrs
|
||||||
|
(old: {
|
||||||
|
buildCommand = "${old.buildCommand}\n patchShebangs $out";
|
||||||
|
buildInputs = [ pkgs.makeWrapper ];
|
||||||
|
postBuild = ''
|
||||||
|
wrapProgram $out/bin/decrypt_k8s_secret --prefix PATH : ${
|
||||||
|
lib.makeBinPath [
|
||||||
|
pkgs.kubectl
|
||||||
|
pkgs.jq
|
||||||
|
]
|
||||||
|
}
|
||||||
|
'';
|
||||||
|
});
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
imports = [ ];
|
imports = [ ];
|
||||||
@@ -55,6 +70,8 @@ in
|
|||||||
alias_kdel
|
alias_kdel
|
||||||
alias_kd
|
alias_kd
|
||||||
alias_klog
|
alias_klog
|
||||||
|
decrypt_k8s_secret
|
||||||
|
ingress2gateway # Convert ingress yaml to gateway yaml
|
||||||
];
|
];
|
||||||
|
|
||||||
environment.persistence."/persist" = lib.mkIf (!config.me.buildingIso) {
|
environment.persistence."/persist" = lib.mkIf (!config.me.buildingIso) {
|
||||||
|
|||||||
@@ -0,0 +1,7 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
#
|
||||||
|
set -euo pipefail
|
||||||
|
IFS=$'\n\t'
|
||||||
|
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
|
||||||
|
|
||||||
|
kubectl get secret -o json "${@}" | jq '.data[] |= @base64d | .data'
|
||||||
@@ -17,6 +17,8 @@ let
|
|||||||
buildCommand = "${old.buildCommand}\n patchShebangs $out";
|
buildCommand = "${old.buildCommand}\n patchShebangs $out";
|
||||||
|
|
||||||
});
|
});
|
||||||
|
kernel_version_check = lib.versionAtLeast config.boot.kernelPackages.kernel.version "6.12";
|
||||||
|
nixos_version_check = lib.versionAtLeast (lib.versions.majorMinor lib.version) "25.05";
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
imports = [ ];
|
imports = [ ];
|
||||||
@@ -35,6 +37,8 @@ in
|
|||||||
{
|
{
|
||||||
environment.systemPackages = with pkgs; [
|
environment.systemPackages = with pkgs; [
|
||||||
ffmpeg
|
ffmpeg
|
||||||
|
libva-utils # for vainfo
|
||||||
|
vdpauinfo
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
(lib.mkIf config.me.graphical {
|
(lib.mkIf config.me.graphical {
|
||||||
@@ -59,6 +63,21 @@ in
|
|||||||
cast_file_vaapi
|
cast_file_vaapi
|
||||||
];
|
];
|
||||||
})
|
})
|
||||||
|
(lib.mkIf (config.me.graphics_card_type == "amd") {
|
||||||
|
environment.sessionVariables = {
|
||||||
|
VDPAU_DRIVER = "radeonsi";
|
||||||
|
};
|
||||||
|
})
|
||||||
|
(lib.mkIf (config.me.graphics_card_type == "intel") {
|
||||||
|
hardware.graphics.extraPackages = with pkgs; [
|
||||||
|
intel-media-driver
|
||||||
|
libvdpau-va-gl # Support vdpau applications using va-api
|
||||||
|
];
|
||||||
|
|
||||||
|
environment.sessionVariables = {
|
||||||
|
VDPAU_DRIVER = "va_gl";
|
||||||
|
};
|
||||||
|
})
|
||||||
]
|
]
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -61,6 +61,7 @@
|
|||||||
iwd
|
iwd
|
||||||
ldns # for drill
|
ldns # for drill
|
||||||
arp-scan # To find devices on the network
|
arp-scan # To find devices on the network
|
||||||
|
wavemon
|
||||||
];
|
];
|
||||||
|
|
||||||
boot.extraModprobeConfig = ''
|
boot.extraModprobeConfig = ''
|
||||||
|
|||||||
95
nix/configuration/roles/pcsx2/default.nix
Normal file
95
nix/configuration/roles/pcsx2/default.nix
Normal file
@@ -0,0 +1,95 @@
|
|||||||
|
{
|
||||||
|
config,
|
||||||
|
lib,
|
||||||
|
pkgs,
|
||||||
|
...
|
||||||
|
}:
|
||||||
|
|
||||||
|
{
|
||||||
|
imports = [ ];
|
||||||
|
|
||||||
|
options.me = {
|
||||||
|
pcsx2.enable = lib.mkOption {
|
||||||
|
type = lib.types.bool;
|
||||||
|
default = false;
|
||||||
|
example = true;
|
||||||
|
description = "Whether we want to install pcsx2.";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
config = lib.mkIf config.me.pcsx2.enable (
|
||||||
|
lib.mkMerge [
|
||||||
|
(lib.mkIf config.me.graphical {
|
||||||
|
environment.systemPackages = with pkgs; [
|
||||||
|
pcsx2
|
||||||
|
];
|
||||||
|
|
||||||
|
environment.persistence."/state" = lib.mkIf (!config.me.buildingIso) {
|
||||||
|
hideMounts = true;
|
||||||
|
users.talexander = {
|
||||||
|
directories = [
|
||||||
|
{
|
||||||
|
# Shaders, games list, and achievement data.
|
||||||
|
directory = ".config/PCSX2/cache";
|
||||||
|
user = "talexander";
|
||||||
|
group = "talexander";
|
||||||
|
mode = "0755";
|
||||||
|
}
|
||||||
|
{
|
||||||
|
# Save states.
|
||||||
|
directory = ".config/PCSX2/sstates";
|
||||||
|
user = "talexander";
|
||||||
|
group = "talexander";
|
||||||
|
mode = "0755";
|
||||||
|
}
|
||||||
|
{
|
||||||
|
# Screenshots.
|
||||||
|
directory = ".config/PCSX2/snaps";
|
||||||
|
user = "talexander";
|
||||||
|
group = "talexander";
|
||||||
|
mode = "0755";
|
||||||
|
}
|
||||||
|
{
|
||||||
|
# Game covers.
|
||||||
|
directory = ".config/PCSX2/covers";
|
||||||
|
user = "talexander";
|
||||||
|
group = "talexander";
|
||||||
|
mode = "0755";
|
||||||
|
}
|
||||||
|
{
|
||||||
|
# Video recordings.
|
||||||
|
directory = ".config/PCSX2/videos";
|
||||||
|
user = "talexander";
|
||||||
|
group = "talexander";
|
||||||
|
mode = "0755";
|
||||||
|
}
|
||||||
|
];
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
environment.persistence."/persist" = lib.mkIf (!config.me.buildingIso) {
|
||||||
|
hideMounts = true;
|
||||||
|
users.talexander = {
|
||||||
|
directories = [
|
||||||
|
{
|
||||||
|
# Game saves
|
||||||
|
directory = ".config/PCSX2/memcards";
|
||||||
|
user = "talexander";
|
||||||
|
group = "talexander";
|
||||||
|
mode = "0755";
|
||||||
|
}
|
||||||
|
];
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
home-manager.users.talexander =
|
||||||
|
{ pkgs, ... }:
|
||||||
|
{
|
||||||
|
home.file.".config/PCSX2/inis/PCSX2.ini" = {
|
||||||
|
source = ./files/PCSX2.ini;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
})
|
||||||
|
]
|
||||||
|
);
|
||||||
|
}
|
||||||
104
nix/configuration/roles/pcsx2/files/PCSX2.ini
Normal file
104
nix/configuration/roles/pcsx2/files/PCSX2.ini
Normal file
@@ -0,0 +1,104 @@
|
|||||||
|
[UI]
|
||||||
|
SettingsVersion = 1
|
||||||
|
InhibitScreensaver = true
|
||||||
|
ConfirmShutdown = false
|
||||||
|
StartPaused = false
|
||||||
|
PauseOnFocusLoss = true
|
||||||
|
StartFullscreen = true
|
||||||
|
|
||||||
|
|
||||||
|
[Folders]
|
||||||
|
Bios = ../../persist/games/ps2/bios
|
||||||
|
Snapshots = snaps
|
||||||
|
Savestates = sstates
|
||||||
|
MemoryCards = memcards
|
||||||
|
Logs = logs
|
||||||
|
Cheats = cheats
|
||||||
|
Patches = patches
|
||||||
|
UserResources = resources
|
||||||
|
Cache = cache
|
||||||
|
Textures = textures
|
||||||
|
InputProfiles = inputprofiles
|
||||||
|
Videos = videos
|
||||||
|
|
||||||
|
|
||||||
|
[EmuCore/GS]
|
||||||
|
VsyncEnable = true
|
||||||
|
# Internal resolution aspect corrected
|
||||||
|
ScreenshotSize = 1
|
||||||
|
# webp
|
||||||
|
ScreenshotFormat = 2
|
||||||
|
OsdShowFPS = true
|
||||||
|
# Capture video at internal resolution
|
||||||
|
VideoCaptureAutoResolution = true
|
||||||
|
# 2x native resolution
|
||||||
|
upscale_multiplier = 2
|
||||||
|
CaptureContainer = mkv
|
||||||
|
VideoCaptureCodec = av1_vaapi
|
||||||
|
AudioCaptureCodec = flac
|
||||||
|
|
||||||
|
|
||||||
|
[Filenames]
|
||||||
|
BIOS = ps2-0230a-20080220.bin
|
||||||
|
|
||||||
|
[MemoryCards]
|
||||||
|
Slot1_Enable = true
|
||||||
|
Slot1_Filename = Mcd001.ps2
|
||||||
|
Slot2_Enable = true
|
||||||
|
Slot2_Filename = Mcd002.ps2
|
||||||
|
|
||||||
|
|
||||||
|
[InputSources]
|
||||||
|
Keyboard = false
|
||||||
|
Mouse = false
|
||||||
|
SDL = true
|
||||||
|
# Enhanced ps4 and ps5 controller support
|
||||||
|
SDLControllerEnhancedMode = true
|
||||||
|
SDLPS5PlayerLED = true
|
||||||
|
|
||||||
|
|
||||||
|
[Pad1]
|
||||||
|
Type = DualShock2
|
||||||
|
InvertL = 0
|
||||||
|
InvertR = 0
|
||||||
|
Deadzone = 0
|
||||||
|
AxisScale = 1.33
|
||||||
|
LargeMotorScale = 1
|
||||||
|
SmallMotorScale = 1
|
||||||
|
ButtonDeadzone = 0
|
||||||
|
PressureModifier = 0.5
|
||||||
|
Up = SDL-0/DPadUp
|
||||||
|
Right = SDL-0/DPadRight
|
||||||
|
Down = SDL-0/DPadDown
|
||||||
|
Left = SDL-0/DPadLeft
|
||||||
|
Triangle = SDL-0/Y
|
||||||
|
Circle = SDL-0/B
|
||||||
|
Cross = SDL-0/A
|
||||||
|
Square = SDL-0/X
|
||||||
|
Select = SDL-0/Back
|
||||||
|
Start = SDL-0/Start
|
||||||
|
L1 = SDL-0/LeftShoulder
|
||||||
|
L2 = SDL-0/+LeftTrigger
|
||||||
|
R1 = SDL-0/RightShoulder
|
||||||
|
R2 = SDL-0/+RightTrigger
|
||||||
|
L3 = SDL-0/LeftStick
|
||||||
|
R3 = SDL-0/RightStick
|
||||||
|
LUp = SDL-0/-LeftY
|
||||||
|
LRight = SDL-0/+LeftX
|
||||||
|
LDown = SDL-0/+LeftY
|
||||||
|
LLeft = SDL-0/-LeftX
|
||||||
|
RUp = SDL-0/-RightY
|
||||||
|
RRight = SDL-0/+RightX
|
||||||
|
RDown = SDL-0/+RightY
|
||||||
|
RLeft = SDL-0/-RightX
|
||||||
|
Analog = SDL-0/Guide
|
||||||
|
LargeMotor = SDL-0/LargeMotor
|
||||||
|
SmallMotor = SDL-0/SmallMotor
|
||||||
|
|
||||||
|
|
||||||
|
[AutoUpdater]
|
||||||
|
CheckAtStartup = false
|
||||||
|
|
||||||
|
|
||||||
|
[GameList]
|
||||||
|
RecursivePaths = /home/talexander/persist/games/ps2/roms
|
||||||
@@ -1,3 +1,6 @@
|
|||||||
|
# MANUAL: rustup target add x86_64-unknown-linux-musl
|
||||||
|
# MANUAL: rustup target add wasm32-unknown-unknown
|
||||||
|
# MANUAL: rustup component add rustc-codegen-cranelift
|
||||||
{
|
{
|
||||||
config,
|
config,
|
||||||
lib,
|
lib,
|
||||||
@@ -5,6 +8,21 @@
|
|||||||
...
|
...
|
||||||
}:
|
}:
|
||||||
|
|
||||||
|
let
|
||||||
|
cargo_wrapped =
|
||||||
|
package: prog:
|
||||||
|
pkgs.writeShellScriptBin "${prog}" ''
|
||||||
|
export PATH="$PATH:${
|
||||||
|
lib.makeBinPath [
|
||||||
|
pkgs.clang
|
||||||
|
pkgs.pkg-config # Needed for openssl-sys
|
||||||
|
]
|
||||||
|
}"
|
||||||
|
# Needed for openssl-sys
|
||||||
|
export PKG_CONFIG_PATH="$PKG_CONFIG_PATH:${pkgs.openssl.dev}/lib/pkgconfig"
|
||||||
|
exec ${package}/bin/${prog} "''${@}"
|
||||||
|
'';
|
||||||
|
in
|
||||||
{
|
{
|
||||||
imports = [ ];
|
imports = [ ];
|
||||||
|
|
||||||
@@ -24,7 +42,6 @@
|
|||||||
rustup
|
rustup
|
||||||
lldb # for lldb-vscode
|
lldb # for lldb-vscode
|
||||||
musl # for building static binaries
|
musl # for building static binaries
|
||||||
rust-analyzer
|
|
||||||
cargo-semver-checks
|
cargo-semver-checks
|
||||||
# ? cargo-bloat
|
# ? cargo-bloat
|
||||||
# ? cargo-outdated
|
# ? cargo-outdated
|
||||||
@@ -38,17 +55,89 @@
|
|||||||
".cargo/config.toml" = {
|
".cargo/config.toml" = {
|
||||||
source = ./files/cargo_config.toml;
|
source = ./files/cargo_config.toml;
|
||||||
};
|
};
|
||||||
# # TODO: Figure out what to do with credentials.
|
".rustup/settings.toml" = {
|
||||||
# ".cargo/credentials.toml" = {
|
source = ./files/rustup_settings.toml;
|
||||||
# source = ./files/cargo_credentials.toml;
|
};
|
||||||
# };
|
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
environment.persistence."/state" = lib.mkIf (!config.me.buildingIso) {
|
||||||
|
hideMounts = true;
|
||||||
|
users.talexander = {
|
||||||
|
directories = [
|
||||||
|
{
|
||||||
|
directory = ".rustup";
|
||||||
|
user = "talexander";
|
||||||
|
group = "talexander";
|
||||||
|
mode = "0755";
|
||||||
|
}
|
||||||
|
{
|
||||||
|
directory = ".cargo/registry";
|
||||||
|
user = "talexander";
|
||||||
|
group = "talexander";
|
||||||
|
mode = "0755";
|
||||||
|
}
|
||||||
|
];
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
systemd.services.link-rust-creds = {
|
||||||
|
# Contains credentials so it cannot be added to the nix store
|
||||||
|
enable = true;
|
||||||
|
description = "link-rust-creds";
|
||||||
|
wantedBy = [ "multi-user.target" ];
|
||||||
|
wants = [ "multi-user.target" ];
|
||||||
|
after = [ "multi-user.target" ];
|
||||||
|
# path = with pkgs; [
|
||||||
|
# zfs
|
||||||
|
# ];
|
||||||
|
unitConfig.DefaultDependencies = "no";
|
||||||
|
serviceConfig = {
|
||||||
|
Type = "oneshot";
|
||||||
|
RemainAfterExit = "yes";
|
||||||
|
};
|
||||||
|
script = ''
|
||||||
|
if [ -e /persist/manual/rust/cargo_credentials.toml ]; then
|
||||||
|
install --directory --owner talexander --group talexander --mode 0755 /home/talexander/.cargo
|
||||||
|
ln -s /persist/manual/rust/cargo_credentials.toml /home/talexander/.cargo/credentials.toml
|
||||||
|
fi
|
||||||
|
'';
|
||||||
|
preStop = ''
|
||||||
|
rm -f /home/talexander/.cargo/credentials.toml
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
|
||||||
|
nixpkgs.overlays = [
|
||||||
|
(final: prev: {
|
||||||
|
rustup = pkgs.symlinkJoin {
|
||||||
|
name = "rustup";
|
||||||
|
paths =
|
||||||
|
(builtins.map (cargo_wrapped prev.rustup) [
|
||||||
|
"cargo"
|
||||||
|
"cargo-clippy"
|
||||||
|
"cargo-fmt"
|
||||||
|
"cargo-miri"
|
||||||
|
"clippy-driver"
|
||||||
|
"rls"
|
||||||
|
"rust-analyzer"
|
||||||
|
"rust-gdb"
|
||||||
|
"rust-gdbgui"
|
||||||
|
"rust-lldb"
|
||||||
|
"rustc"
|
||||||
|
"rustdoc"
|
||||||
|
"rustfmt"
|
||||||
|
"rustup"
|
||||||
|
])
|
||||||
|
++ [
|
||||||
|
prev.rustup
|
||||||
|
];
|
||||||
|
buildInputs = [ pkgs.makeWrapper ];
|
||||||
|
};
|
||||||
|
})
|
||||||
|
];
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
# TODO: Install clippy, cranelift, rust-src
|
# TODO: Install clippy, cranelift, rust-src
|
||||||
# TODO: Install rust targets x86_64-unknown-linux-musl and wasm32-unknown-unknown
|
|
||||||
|
|||||||
5
nix/configuration/roles/rust/files/rustup_settings.toml
Normal file
5
nix/configuration/roles/rust/files/rustup_settings.toml
Normal file
@@ -0,0 +1,5 @@
|
|||||||
|
default_toolchain = "nightly-x86_64-unknown-linux-gnu"
|
||||||
|
profile = "default"
|
||||||
|
version = "12"
|
||||||
|
|
||||||
|
[overrides]
|
||||||
29
nix/configuration/roles/sops/default.nix
Normal file
29
nix/configuration/roles/sops/default.nix
Normal file
@@ -0,0 +1,29 @@
|
|||||||
|
{
|
||||||
|
config,
|
||||||
|
lib,
|
||||||
|
pkgs,
|
||||||
|
...
|
||||||
|
}:
|
||||||
|
|
||||||
|
{
|
||||||
|
imports = [ ];
|
||||||
|
|
||||||
|
options.me = {
|
||||||
|
sops.enable = lib.mkOption {
|
||||||
|
type = lib.types.bool;
|
||||||
|
default = false;
|
||||||
|
example = true;
|
||||||
|
description = "Whether we want to install sops.";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
config = lib.mkIf config.me.sops.enable (
|
||||||
|
lib.mkMerge [
|
||||||
|
{
|
||||||
|
environment.systemPackages = with pkgs; [
|
||||||
|
sops # For encrypting kubernetes secrets.
|
||||||
|
];
|
||||||
|
}
|
||||||
|
]
|
||||||
|
);
|
||||||
|
}
|
||||||
@@ -20,4 +20,12 @@
|
|||||||
];
|
];
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
home-manager.users.talexander =
|
||||||
|
{ pkgs, ... }:
|
||||||
|
{
|
||||||
|
home.file.".ssh/config" = {
|
||||||
|
source = ./files/ssh_config;
|
||||||
|
};
|
||||||
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
34
nix/configuration/roles/ssh/files/ssh_config
Normal file
34
nix/configuration/roles/ssh/files/ssh_config
Normal file
@@ -0,0 +1,34 @@
|
|||||||
|
Host poudriere
|
||||||
|
ProxyJump talexander@mrmanager
|
||||||
|
HostName 10.215.1.203
|
||||||
|
|
||||||
|
Host controller0
|
||||||
|
ProxyJump talexander@mrmanager
|
||||||
|
HostName 10.215.1.204
|
||||||
|
|
||||||
|
Host controller1
|
||||||
|
ProxyJump talexander@mrmanager
|
||||||
|
HostName 10.215.1.205
|
||||||
|
|
||||||
|
Host controller2
|
||||||
|
ProxyJump talexander@mrmanager
|
||||||
|
HostName 10.215.1.206
|
||||||
|
|
||||||
|
Host worker0
|
||||||
|
ProxyJump talexander@mrmanager
|
||||||
|
HostName 10.215.1.207
|
||||||
|
|
||||||
|
Host worker1
|
||||||
|
ProxyJump talexander@mrmanager
|
||||||
|
HostName 10.215.1.208
|
||||||
|
|
||||||
|
Host worker2
|
||||||
|
ProxyJump talexander@mrmanager
|
||||||
|
HostName 10.215.1.209
|
||||||
|
|
||||||
|
Host brianai
|
||||||
|
ProxyJump talexander@mrmanager
|
||||||
|
HostName 10.215.1.215
|
||||||
|
|
||||||
|
Host *
|
||||||
|
Compression yes
|
||||||
29
nix/configuration/roles/steam_run_free/default.nix
Normal file
29
nix/configuration/roles/steam_run_free/default.nix
Normal file
@@ -0,0 +1,29 @@
|
|||||||
|
{
|
||||||
|
config,
|
||||||
|
lib,
|
||||||
|
pkgs,
|
||||||
|
...
|
||||||
|
}:
|
||||||
|
|
||||||
|
{
|
||||||
|
imports = [ ];
|
||||||
|
|
||||||
|
options.me = {
|
||||||
|
steam_run_free.enable = lib.mkOption {
|
||||||
|
type = lib.types.bool;
|
||||||
|
default = false;
|
||||||
|
example = true;
|
||||||
|
description = "Whether we want to install steam_run_free.";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
config = lib.mkIf config.me.steam_run_free.enable (
|
||||||
|
lib.mkMerge [
|
||||||
|
{
|
||||||
|
environment.systemPackages = with pkgs; [
|
||||||
|
steam-run-free
|
||||||
|
];
|
||||||
|
}
|
||||||
|
]
|
||||||
|
);
|
||||||
|
}
|
||||||
29
nix/configuration/roles/tekton/default.nix
Normal file
29
nix/configuration/roles/tekton/default.nix
Normal file
@@ -0,0 +1,29 @@
|
|||||||
|
{
|
||||||
|
config,
|
||||||
|
lib,
|
||||||
|
pkgs,
|
||||||
|
...
|
||||||
|
}:
|
||||||
|
|
||||||
|
{
|
||||||
|
imports = [ ];
|
||||||
|
|
||||||
|
options.me = {
|
||||||
|
tekton.enable = lib.mkOption {
|
||||||
|
type = lib.types.bool;
|
||||||
|
default = false;
|
||||||
|
example = true;
|
||||||
|
description = "Whether we want to install tekton.";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
config = lib.mkIf config.me.tekton.enable (
|
||||||
|
lib.mkMerge [
|
||||||
|
{
|
||||||
|
environment.systemPackages = with pkgs; [
|
||||||
|
tektoncd-cli
|
||||||
|
];
|
||||||
|
}
|
||||||
|
]
|
||||||
|
);
|
||||||
|
}
|
||||||
@@ -48,6 +48,12 @@ in
|
|||||||
};
|
};
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
(lib.mkIf config.me.kubernetes.enable {
|
||||||
|
environment.systemPackages = with pkgs; [
|
||||||
|
tfk8s # Converts k8s yaml manifests to terraform kubernetes_manifest.
|
||||||
|
k2tf # Converts k8s yaml manifests to terraform real types.
|
||||||
|
];
|
||||||
|
})
|
||||||
]
|
]
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -53,6 +53,7 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
tooltip {
|
tooltip {
|
||||||
|
/* CSS for hover menu */
|
||||||
background-color: #323232;
|
background-color: #323232;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -183,7 +184,23 @@ tooltip {
|
|||||||
}
|
}
|
||||||
|
|
||||||
#tray {
|
#tray {
|
||||||
/* No styles */
|
/* CSS rules for the tray (not the right-click or hover menu) */
|
||||||
|
}
|
||||||
|
|
||||||
|
/* #tray menu menuitem */
|
||||||
|
#tray menu {
|
||||||
|
/* CSS for right click menu */
|
||||||
|
background: #323232;
|
||||||
|
padding: 5px;
|
||||||
|
border: 1px solid white;
|
||||||
|
}
|
||||||
|
#tray menu menuitem {
|
||||||
|
/* CSS for menu items in the right click menu */
|
||||||
|
}
|
||||||
|
|
||||||
|
#tray menu menuitem:hover {
|
||||||
|
/* CSS for hovering over a right-click menu item. */
|
||||||
|
background-color: #434343;
|
||||||
}
|
}
|
||||||
|
|
||||||
#window {
|
#window {
|
||||||
|
|||||||
101
nix/steam_deck/configuration/flake.lock
generated
Normal file
101
nix/steam_deck/configuration/flake.lock
generated
Normal file
@@ -0,0 +1,101 @@
|
|||||||
|
{
|
||||||
|
"nodes": {
|
||||||
|
"flake-utils": {
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1659877975,
|
||||||
|
"narHash": "sha256-zllb8aq3YO3h8B/U0/J1WBgAL8EX5yWf5pMj3G0NAmc=",
|
||||||
|
"owner": "numtide",
|
||||||
|
"repo": "flake-utils",
|
||||||
|
"rev": "c0e246b9b83f637f4681389ecabcb2681b4f3af0",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "numtide",
|
||||||
|
"repo": "flake-utils",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"home-manager": {
|
||||||
|
"inputs": {
|
||||||
|
"nixpkgs": [
|
||||||
|
"nixpkgs"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1739314552,
|
||||||
|
"narHash": "sha256-ggVf2BclyIW3jexc/uvgsgJH4e2cuG6Nyg54NeXgbFI=",
|
||||||
|
"owner": "nix-community",
|
||||||
|
"repo": "home-manager",
|
||||||
|
"rev": "83bd3a26ac0526ae04fa74df46738bb44b89dcdd",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "nix-community",
|
||||||
|
"repo": "home-manager",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"impermanence": {
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1737831083,
|
||||||
|
"narHash": "sha256-LJggUHbpyeDvNagTUrdhe/pRVp4pnS6wVKALS782gRI=",
|
||||||
|
"owner": "nix-community",
|
||||||
|
"repo": "impermanence",
|
||||||
|
"rev": "4b3e914cdf97a5b536a889e939fb2fd2b043a170",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "nix-community",
|
||||||
|
"repo": "impermanence",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"nixgl": {
|
||||||
|
"inputs": {
|
||||||
|
"flake-utils": "flake-utils",
|
||||||
|
"nixpkgs": [
|
||||||
|
"nixpkgs"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1713543440,
|
||||||
|
"narHash": "sha256-lnzZQYG0+EXl/6NkGpyIz+FEOc/DSEG57AP1VsdeNrM=",
|
||||||
|
"owner": "nix-community",
|
||||||
|
"repo": "nixGL",
|
||||||
|
"rev": "310f8e49a149e4c9ea52f1adf70cdc768ec53f8a",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "nix-community",
|
||||||
|
"repo": "nixGL",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"nixpkgs": {
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1739138025,
|
||||||
|
"narHash": "sha256-M4ilIfGxzbBZuURokv24aqJTbdjPA9K+DtKUzrJaES4=",
|
||||||
|
"owner": "nixos",
|
||||||
|
"repo": "nixpkgs",
|
||||||
|
"rev": "b2243f41e860ac85c0b446eadc6930359b294e79",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "nixos",
|
||||||
|
"ref": "nixpkgs-unstable",
|
||||||
|
"repo": "nixpkgs",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"root": {
|
||||||
|
"inputs": {
|
||||||
|
"home-manager": "home-manager",
|
||||||
|
"impermanence": "impermanence",
|
||||||
|
"nixgl": "nixgl",
|
||||||
|
"nixpkgs": "nixpkgs"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"root": "root",
|
||||||
|
"version": 7
|
||||||
|
}
|
||||||
47
nix/steam_deck/configuration/flake.nix
Normal file
47
nix/steam_deck/configuration/flake.nix
Normal file
@@ -0,0 +1,47 @@
|
|||||||
|
{
|
||||||
|
description = "My system configuration";
|
||||||
|
|
||||||
|
inputs = {
|
||||||
|
nixpkgs.url = "github:nixos/nixpkgs/nixpkgs-unstable";
|
||||||
|
nixgl.url = "github:nix-community/nixGL";
|
||||||
|
nixgl.inputs.nixpkgs.follows = "nixpkgs";
|
||||||
|
home-manager = {
|
||||||
|
url = "github:nix-community/home-manager";
|
||||||
|
inputs.nixpkgs.follows = "nixpkgs";
|
||||||
|
};
|
||||||
|
impermanence = {
|
||||||
|
url = "github:nix-community/impermanence";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
outputs =
|
||||||
|
{
|
||||||
|
nixpkgs,
|
||||||
|
nixgl,
|
||||||
|
home-manager,
|
||||||
|
impermanence,
|
||||||
|
...
|
||||||
|
}:
|
||||||
|
let
|
||||||
|
system = "x86_64-linux";
|
||||||
|
pkgs = import nixpkgs {
|
||||||
|
inherit system;
|
||||||
|
overlays = [ nixgl.overlay ];
|
||||||
|
};
|
||||||
|
in
|
||||||
|
# pkgs = nixpkgs.legacyPackages.${system};
|
||||||
|
{
|
||||||
|
defaultPackage.${system} = home-manager.defaultPackage.${system};
|
||||||
|
homeConfigurations."deck" = home-manager.lib.homeManagerConfiguration {
|
||||||
|
inherit pkgs;
|
||||||
|
|
||||||
|
extraSpecialArgs = { inherit nixgl; };
|
||||||
|
|
||||||
|
modules = [
|
||||||
|
{ nixpkgs.overlays = [ nixgl.overlay ]; }
|
||||||
|
impermanence.homeManagerModules.impermanence
|
||||||
|
./hosts/deck
|
||||||
|
./home.nix
|
||||||
|
];
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
53
nix/steam_deck/configuration/home.nix
Normal file
53
nix/steam_deck/configuration/home.nix
Normal file
@@ -0,0 +1,53 @@
|
|||||||
|
# TODO: Optimize for znver2
|
||||||
|
{
|
||||||
|
config,
|
||||||
|
pkgs,
|
||||||
|
nixgl,
|
||||||
|
...
|
||||||
|
}:
|
||||||
|
{
|
||||||
|
imports = [
|
||||||
|
./roles/2ship2harkinian
|
||||||
|
./roles/graphics
|
||||||
|
./roles/pcsx2
|
||||||
|
./roles/shipwright
|
||||||
|
./roles/sm64ex
|
||||||
|
./roles/steam_rom_manager
|
||||||
|
./util/unfree_polyfill
|
||||||
|
];
|
||||||
|
|
||||||
|
home.username = "deck";
|
||||||
|
home.homeDirectory = "/home/deck";
|
||||||
|
home.stateVersion = "24.11";
|
||||||
|
|
||||||
|
programs.home-manager.enable = true;
|
||||||
|
|
||||||
|
# enable flakes
|
||||||
|
nix = {
|
||||||
|
package = pkgs.nix;
|
||||||
|
settings.experimental-features = [
|
||||||
|
"nix-command"
|
||||||
|
"flakes"
|
||||||
|
];
|
||||||
|
};
|
||||||
|
# Automatic garbage collection
|
||||||
|
nix.gc = {
|
||||||
|
# Runs nix-collect-garbage --delete-older-than 30d
|
||||||
|
automatic = true;
|
||||||
|
randomizedDelaySec = "14m";
|
||||||
|
options = "--delete-older-than 30d";
|
||||||
|
};
|
||||||
|
nix.settings.auto-optimise-store = true;
|
||||||
|
|
||||||
|
home.packages = with pkgs; [
|
||||||
|
pkgs.nixgl.nixGLIntel
|
||||||
|
(pkgs.nixgl.nixGLCommon pkgs.nixgl.nixGLIntel)
|
||||||
|
pkgs.nixgl.nixVulkanIntel
|
||||||
|
];
|
||||||
|
|
||||||
|
# This would keep build-time dependencies so I can rebuild while offline.
|
||||||
|
# nix.settings = {
|
||||||
|
# keep-outputs = true;
|
||||||
|
# keep-derivations = true;
|
||||||
|
# };
|
||||||
|
}
|
||||||
19
nix/steam_deck/configuration/hosts/deck/default.nix
Normal file
19
nix/steam_deck/configuration/hosts/deck/default.nix
Normal file
@@ -0,0 +1,19 @@
|
|||||||
|
{
|
||||||
|
config,
|
||||||
|
lib,
|
||||||
|
pkgs,
|
||||||
|
...
|
||||||
|
}:
|
||||||
|
|
||||||
|
{
|
||||||
|
imports = [ ];
|
||||||
|
|
||||||
|
config = {
|
||||||
|
me.graphical = true;
|
||||||
|
me.pcsx2.enable = true;
|
||||||
|
me.ship2harkinian.enable = true;
|
||||||
|
me.shipwright.enable = true;
|
||||||
|
me.sm64ex.enable = true;
|
||||||
|
me.steam_rom_manager.enable = true; # Steam rom manager UI does not render. I think it wants to be in an AppImage.
|
||||||
|
};
|
||||||
|
}
|
||||||
@@ -0,0 +1,78 @@
|
|||||||
|
# MANUAL: mkdir -p ~/.persist/.local/share/2ship/saves
|
||||||
|
{
|
||||||
|
config,
|
||||||
|
lib,
|
||||||
|
pkgs,
|
||||||
|
...
|
||||||
|
}:
|
||||||
|
|
||||||
|
let
|
||||||
|
steam_2s2h = pkgs.writeScriptBin "steam_2s2h" ''
|
||||||
|
export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:${pkgs.libglvnd}/lib"
|
||||||
|
exec ${pkgs._2ship2harkinian}/bin/2s2h
|
||||||
|
'';
|
||||||
|
in
|
||||||
|
{
|
||||||
|
imports = [ ];
|
||||||
|
|
||||||
|
options.me = {
|
||||||
|
ship2harkinian.enable = lib.mkOption {
|
||||||
|
type = lib.types.bool;
|
||||||
|
default = false;
|
||||||
|
example = true;
|
||||||
|
description = "Whether we want to install 2ship2harkinian.";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
config = lib.mkIf config.me.ship2harkinian.enable (
|
||||||
|
lib.mkMerge [
|
||||||
|
{
|
||||||
|
allowedUnfree = [ "2ship2harkinian" ];
|
||||||
|
}
|
||||||
|
(lib.mkIf config.me.graphical {
|
||||||
|
home.packages = with pkgs; [
|
||||||
|
_2ship2harkinian
|
||||||
|
steam_2s2h
|
||||||
|
];
|
||||||
|
|
||||||
|
home.file.".local/share/2ship/2ship2harkinian.json" = {
|
||||||
|
source = ./files/2ship2harkinian.json;
|
||||||
|
};
|
||||||
|
|
||||||
|
home.persistence."/home/deck/.persist" = {
|
||||||
|
directories = [
|
||||||
|
{
|
||||||
|
directory = ".local/share/2ship/saves";
|
||||||
|
method = "symlink";
|
||||||
|
}
|
||||||
|
];
|
||||||
|
};
|
||||||
|
home.persistence."/home/deck/.state" = {
|
||||||
|
files = [
|
||||||
|
".local/share/2ship/mm.o2r"
|
||||||
|
];
|
||||||
|
};
|
||||||
|
|
||||||
|
nixpkgs.overlays = [
|
||||||
|
(final: prev: {
|
||||||
|
_2ship2harkinian = pkgs.buildEnv {
|
||||||
|
name = prev._2ship2harkinian.name;
|
||||||
|
paths = [
|
||||||
|
(config.lib.nixGL.wrap prev._2ship2harkinian)
|
||||||
|
];
|
||||||
|
extraOutputsToInstall = [
|
||||||
|
"man"
|
||||||
|
"doc"
|
||||||
|
"info"
|
||||||
|
];
|
||||||
|
# We have to use 555 instead of the normal 444 here because the .desktop file ends up inside $HOME on steam deck and desktop files must be either not in $HOME or must be executable, otherwise KDE Plasma refuses to execute them.
|
||||||
|
postBuild = ''
|
||||||
|
chmod 0555 $out/share/applications/2s2h.desktop
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
})
|
||||||
|
];
|
||||||
|
})
|
||||||
|
]
|
||||||
|
);
|
||||||
|
}
|
||||||
@@ -0,0 +1,20 @@
|
|||||||
|
{
|
||||||
|
"CVars": {
|
||||||
|
"gInterpolationFPS": 60,
|
||||||
|
"gEnhancements": {
|
||||||
|
"Graphics": {
|
||||||
|
"AuthenticLogo": 1
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"gSettings": {
|
||||||
|
"InternalResolution": 2.0,
|
||||||
|
"MSAAValue": 2,
|
||||||
|
"OpenMenuBar": 0
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"Window": {
|
||||||
|
"Fullscreen": {
|
||||||
|
"Enabled": true
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
30
nix/steam_deck/configuration/roles/blank/default.nix
Normal file
30
nix/steam_deck/configuration/roles/blank/default.nix
Normal file
@@ -0,0 +1,30 @@
|
|||||||
|
{
|
||||||
|
config,
|
||||||
|
lib,
|
||||||
|
pkgs,
|
||||||
|
...
|
||||||
|
}:
|
||||||
|
|
||||||
|
{
|
||||||
|
imports = [ ];
|
||||||
|
|
||||||
|
options.me = {
|
||||||
|
blank.enable = lib.mkOption {
|
||||||
|
type = lib.types.bool;
|
||||||
|
default = false;
|
||||||
|
example = true;
|
||||||
|
description = "Whether we want to install blank.";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
config = lib.mkIf config.me.blank.enable (
|
||||||
|
lib.mkMerge [
|
||||||
|
{
|
||||||
|
home.packages = with pkgs; [
|
||||||
|
];
|
||||||
|
}
|
||||||
|
(lib.mkIf config.me.graphical {
|
||||||
|
})
|
||||||
|
]
|
||||||
|
);
|
||||||
|
}
|
||||||
43
nix/steam_deck/configuration/roles/graphics/default.nix
Normal file
43
nix/steam_deck/configuration/roles/graphics/default.nix
Normal file
@@ -0,0 +1,43 @@
|
|||||||
|
{
|
||||||
|
config,
|
||||||
|
lib,
|
||||||
|
pkgs,
|
||||||
|
nixgl,
|
||||||
|
...
|
||||||
|
}:
|
||||||
|
|
||||||
|
{
|
||||||
|
imports = [ ];
|
||||||
|
|
||||||
|
options.me.graphics_card_type = lib.mkOption {
|
||||||
|
type = lib.types.nullOr (
|
||||||
|
lib.types.enum [
|
||||||
|
"amd"
|
||||||
|
"intel"
|
||||||
|
"nvidia"
|
||||||
|
]
|
||||||
|
);
|
||||||
|
default = null;
|
||||||
|
example = "amd";
|
||||||
|
description = "What graphics card type is in the computer.";
|
||||||
|
};
|
||||||
|
|
||||||
|
options.me.graphical = lib.mkOption {
|
||||||
|
type = lib.types.bool;
|
||||||
|
default = false;
|
||||||
|
example = true;
|
||||||
|
description = "Whether we want to install graphical programs.";
|
||||||
|
};
|
||||||
|
|
||||||
|
config = (
|
||||||
|
lib.mkMerge [
|
||||||
|
(lib.mkIf config.me.graphical {
|
||||||
|
nixGL.packages = nixgl.packages;
|
||||||
|
# home.packages = with pkgs; [
|
||||||
|
# mesa-demos # for glxgears
|
||||||
|
# vulkan-tools # for vkcube
|
||||||
|
# ];
|
||||||
|
})
|
||||||
|
]
|
||||||
|
);
|
||||||
|
}
|
||||||
94
nix/steam_deck/configuration/roles/pcsx2/default.nix
Normal file
94
nix/steam_deck/configuration/roles/pcsx2/default.nix
Normal file
@@ -0,0 +1,94 @@
|
|||||||
|
# MANUAL: mkdir -p ~/.persist/.config/PCSX2/memcards ~/.state/.config/PCSX2/cache ~/.state/.config/PCSX2/sstates ~/.state/.config/PCSX2/snaps ~/.state/.config/PCSX2/covers ~/.state/.config/PCSX2/videos
|
||||||
|
{
|
||||||
|
config,
|
||||||
|
lib,
|
||||||
|
pkgs,
|
||||||
|
...
|
||||||
|
}:
|
||||||
|
|
||||||
|
let
|
||||||
|
steam_pcsx2 = pkgs.writeScriptBin "steam_pcsx2" ''
|
||||||
|
export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:${pkgs.libglvnd}/lib"
|
||||||
|
exec ${pkgs.pcsx2}/bin/pcsx2-qt
|
||||||
|
'';
|
||||||
|
in
|
||||||
|
{
|
||||||
|
imports = [ ];
|
||||||
|
|
||||||
|
options.me = {
|
||||||
|
pcsx2.enable = lib.mkOption {
|
||||||
|
type = lib.types.bool;
|
||||||
|
default = false;
|
||||||
|
example = true;
|
||||||
|
description = "Whether we want to install pcsx2.";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
config = lib.mkIf config.me.pcsx2.enable (
|
||||||
|
lib.mkMerge [
|
||||||
|
(lib.mkIf config.me.graphical {
|
||||||
|
home.packages = with pkgs; [
|
||||||
|
pcsx2
|
||||||
|
steam_pcsx2
|
||||||
|
];
|
||||||
|
|
||||||
|
home.file.".config/PCSX2/inis/PCSX2.ini" = {
|
||||||
|
source = ./files/PCSX2.ini;
|
||||||
|
};
|
||||||
|
|
||||||
|
home.persistence."/home/deck/.persist" = {
|
||||||
|
directories = [
|
||||||
|
{
|
||||||
|
directory = ".config/PCSX2/memcards";
|
||||||
|
method = "symlink";
|
||||||
|
}
|
||||||
|
];
|
||||||
|
};
|
||||||
|
home.persistence."/home/deck/.state" = {
|
||||||
|
directories = [
|
||||||
|
{
|
||||||
|
directory = ".config/PCSX2/cache";
|
||||||
|
method = "symlink";
|
||||||
|
}
|
||||||
|
{
|
||||||
|
directory = ".config/PCSX2/sstates";
|
||||||
|
method = "symlink";
|
||||||
|
}
|
||||||
|
{
|
||||||
|
directory = ".config/PCSX2/snaps";
|
||||||
|
method = "symlink";
|
||||||
|
}
|
||||||
|
{
|
||||||
|
directory = ".config/PCSX2/covers";
|
||||||
|
method = "symlink";
|
||||||
|
}
|
||||||
|
{
|
||||||
|
directory = ".config/PCSX2/videos";
|
||||||
|
method = "symlink";
|
||||||
|
}
|
||||||
|
];
|
||||||
|
};
|
||||||
|
|
||||||
|
nixpkgs.overlays = [
|
||||||
|
(final: prev: {
|
||||||
|
pcsx2 = pkgs.buildEnv {
|
||||||
|
name = prev.pcsx2.name;
|
||||||
|
paths = [
|
||||||
|
(config.lib.nixGL.wrap prev.pcsx2)
|
||||||
|
];
|
||||||
|
extraOutputsToInstall = [
|
||||||
|
"man"
|
||||||
|
"doc"
|
||||||
|
"info"
|
||||||
|
];
|
||||||
|
# We have to use 555 instead of the normal 444 here because the .desktop file ends up inside $HOME on steam deck and desktop files must be either not in $HOME or must be executable, otherwise KDE Plasma refuses to execute them.
|
||||||
|
postBuild = ''
|
||||||
|
chmod 0555 $out/share/applications/PCSX2.desktop
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
})
|
||||||
|
];
|
||||||
|
})
|
||||||
|
]
|
||||||
|
);
|
||||||
|
}
|
||||||
104
nix/steam_deck/configuration/roles/pcsx2/files/PCSX2.ini
Normal file
104
nix/steam_deck/configuration/roles/pcsx2/files/PCSX2.ini
Normal file
@@ -0,0 +1,104 @@
|
|||||||
|
[UI]
|
||||||
|
SettingsVersion = 1
|
||||||
|
InhibitScreensaver = true
|
||||||
|
ConfirmShutdown = false
|
||||||
|
StartPaused = false
|
||||||
|
PauseOnFocusLoss = true
|
||||||
|
StartFullscreen = true
|
||||||
|
|
||||||
|
|
||||||
|
[Folders]
|
||||||
|
Bios = ../../.persist/manual/games/ps2/bios
|
||||||
|
Snapshots = snaps
|
||||||
|
Savestates = sstates
|
||||||
|
MemoryCards = memcards
|
||||||
|
Logs = logs
|
||||||
|
Cheats = cheats
|
||||||
|
Patches = patches
|
||||||
|
UserResources = resources
|
||||||
|
Cache = cache
|
||||||
|
Textures = textures
|
||||||
|
InputProfiles = inputprofiles
|
||||||
|
Videos = videos
|
||||||
|
|
||||||
|
|
||||||
|
[EmuCore/GS]
|
||||||
|
VsyncEnable = true
|
||||||
|
# Internal resolution aspect corrected
|
||||||
|
ScreenshotSize = 1
|
||||||
|
# webp
|
||||||
|
ScreenshotFormat = 2
|
||||||
|
OsdShowFPS = true
|
||||||
|
# Capture video at internal resolution
|
||||||
|
VideoCaptureAutoResolution = true
|
||||||
|
# 2x native resolution
|
||||||
|
upscale_multiplier = 2
|
||||||
|
CaptureContainer = mkv
|
||||||
|
VideoCaptureCodec = av1_vaapi
|
||||||
|
AudioCaptureCodec = flac
|
||||||
|
|
||||||
|
|
||||||
|
[Filenames]
|
||||||
|
BIOS = ps2-0230a-20080220.bin
|
||||||
|
|
||||||
|
[MemoryCards]
|
||||||
|
Slot1_Enable = true
|
||||||
|
Slot1_Filename = Mcd001.ps2
|
||||||
|
Slot2_Enable = true
|
||||||
|
Slot2_Filename = Mcd002.ps2
|
||||||
|
|
||||||
|
|
||||||
|
[InputSources]
|
||||||
|
Keyboard = false
|
||||||
|
Mouse = false
|
||||||
|
SDL = true
|
||||||
|
# Enhanced ps4 and ps5 controller support
|
||||||
|
SDLControllerEnhancedMode = true
|
||||||
|
SDLPS5PlayerLED = true
|
||||||
|
|
||||||
|
|
||||||
|
[Pad1]
|
||||||
|
Type = DualShock2
|
||||||
|
InvertL = 0
|
||||||
|
InvertR = 0
|
||||||
|
Deadzone = 0
|
||||||
|
AxisScale = 1.33
|
||||||
|
LargeMotorScale = 1
|
||||||
|
SmallMotorScale = 1
|
||||||
|
ButtonDeadzone = 0
|
||||||
|
PressureModifier = 0.5
|
||||||
|
Up = SDL-0/DPadUp
|
||||||
|
Right = SDL-0/DPadRight
|
||||||
|
Down = SDL-0/DPadDown
|
||||||
|
Left = SDL-0/DPadLeft
|
||||||
|
Triangle = SDL-0/Y
|
||||||
|
Circle = SDL-0/B
|
||||||
|
Cross = SDL-0/A
|
||||||
|
Square = SDL-0/X
|
||||||
|
Select = SDL-0/Back
|
||||||
|
Start = SDL-0/Start
|
||||||
|
L1 = SDL-0/LeftShoulder
|
||||||
|
L2 = SDL-0/+LeftTrigger
|
||||||
|
R1 = SDL-0/RightShoulder
|
||||||
|
R2 = SDL-0/+RightTrigger
|
||||||
|
L3 = SDL-0/LeftStick
|
||||||
|
R3 = SDL-0/RightStick
|
||||||
|
LUp = SDL-0/-LeftY
|
||||||
|
LRight = SDL-0/+LeftX
|
||||||
|
LDown = SDL-0/+LeftY
|
||||||
|
LLeft = SDL-0/-LeftX
|
||||||
|
RUp = SDL-0/-RightY
|
||||||
|
RRight = SDL-0/+RightX
|
||||||
|
RDown = SDL-0/+RightY
|
||||||
|
RLeft = SDL-0/-RightX
|
||||||
|
Analog = SDL-0/Guide
|
||||||
|
LargeMotor = SDL-0/LargeMotor
|
||||||
|
SmallMotor = SDL-0/SmallMotor
|
||||||
|
|
||||||
|
|
||||||
|
[AutoUpdater]
|
||||||
|
CheckAtStartup = false
|
||||||
|
|
||||||
|
|
||||||
|
[GameList]
|
||||||
|
RecursivePaths = /home/deck/.persist/manual/games/ps2/roms
|
||||||
78
nix/steam_deck/configuration/roles/shipwright/default.nix
Normal file
78
nix/steam_deck/configuration/roles/shipwright/default.nix
Normal file
@@ -0,0 +1,78 @@
|
|||||||
|
# MANUAL: mkdir -p ~/.persist/.local/share/soh/Save
|
||||||
|
{
|
||||||
|
config,
|
||||||
|
lib,
|
||||||
|
pkgs,
|
||||||
|
...
|
||||||
|
}:
|
||||||
|
|
||||||
|
let
|
||||||
|
steam_shipwright = pkgs.writeScriptBin "steam_soh" ''
|
||||||
|
export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:${pkgs.libglvnd}/lib"
|
||||||
|
exec ${pkgs.shipwright}/bin/soh
|
||||||
|
'';
|
||||||
|
in
|
||||||
|
{
|
||||||
|
imports = [ ];
|
||||||
|
|
||||||
|
options.me = {
|
||||||
|
shipwright.enable = lib.mkOption {
|
||||||
|
type = lib.types.bool;
|
||||||
|
default = false;
|
||||||
|
example = true;
|
||||||
|
description = "Whether we want to install shipwright.";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
config = lib.mkIf config.me.shipwright.enable (
|
||||||
|
lib.mkMerge [
|
||||||
|
{
|
||||||
|
allowedUnfree = [ "shipwright" ];
|
||||||
|
}
|
||||||
|
(lib.mkIf config.me.graphical {
|
||||||
|
home.packages = with pkgs; [
|
||||||
|
shipwright
|
||||||
|
steam_shipwright
|
||||||
|
];
|
||||||
|
|
||||||
|
home.file.".local/share/soh/shipofharkinian.json" = {
|
||||||
|
source = ./files/shipofharkinian.json;
|
||||||
|
};
|
||||||
|
|
||||||
|
home.persistence."/home/deck/.persist" = {
|
||||||
|
directories = [
|
||||||
|
{
|
||||||
|
directory = ".local/share/soh/Save";
|
||||||
|
method = "symlink";
|
||||||
|
}
|
||||||
|
];
|
||||||
|
};
|
||||||
|
home.persistence."/home/deck/.state" = {
|
||||||
|
files = [
|
||||||
|
".local/share/soh/oot.otr"
|
||||||
|
];
|
||||||
|
};
|
||||||
|
|
||||||
|
nixpkgs.overlays = [
|
||||||
|
(final: prev: {
|
||||||
|
shipwright = pkgs.buildEnv {
|
||||||
|
name = prev.shipwright.name;
|
||||||
|
paths = [
|
||||||
|
(config.lib.nixGL.wrap prev.shipwright)
|
||||||
|
];
|
||||||
|
extraOutputsToInstall = [
|
||||||
|
"man"
|
||||||
|
"doc"
|
||||||
|
"info"
|
||||||
|
];
|
||||||
|
# We have to use 555 instead of the normal 444 here because the .desktop file ends up inside $HOME on steam deck and desktop files must be either not in $HOME or must be executable, otherwise KDE Plasma refuses to execute them.
|
||||||
|
postBuild = ''
|
||||||
|
chmod 0555 $out/share/applications/soh.desktop
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
})
|
||||||
|
];
|
||||||
|
})
|
||||||
|
]
|
||||||
|
);
|
||||||
|
}
|
||||||
@@ -0,0 +1,20 @@
|
|||||||
|
{
|
||||||
|
"CVars": {
|
||||||
|
"gAuthenticLogo": 1,
|
||||||
|
"gInternalResolution": 2.0,
|
||||||
|
"gInterpolationFPS": 60,
|
||||||
|
"gMSAAValue": 2,
|
||||||
|
"gMatchRefreshRate": 1,
|
||||||
|
"gOnFileSelectNameEntry": 0,
|
||||||
|
"gOpenWindows": {
|
||||||
|
"modalWindowEnabled": 1
|
||||||
|
},
|
||||||
|
"gZFightingMode": 0
|
||||||
|
},
|
||||||
|
"ConfigVersion": 2,
|
||||||
|
"Window": {
|
||||||
|
"Fullscreen": {
|
||||||
|
"Enabled": true
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
91
nix/steam_deck/configuration/roles/sm64ex/default.nix
Normal file
91
nix/steam_deck/configuration/roles/sm64ex/default.nix
Normal file
@@ -0,0 +1,91 @@
|
|||||||
|
{
|
||||||
|
config,
|
||||||
|
lib,
|
||||||
|
pkgs,
|
||||||
|
...
|
||||||
|
}:
|
||||||
|
|
||||||
|
let
|
||||||
|
steam_sm64ex = pkgs.writeScriptBin "steam_sm64ex" ''
|
||||||
|
export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:${pkgs.libglvnd}/lib"
|
||||||
|
exec ${pkgs.sm64ex}/bin/sm64ex
|
||||||
|
'';
|
||||||
|
in
|
||||||
|
{
|
||||||
|
imports = [ ];
|
||||||
|
|
||||||
|
options.me = {
|
||||||
|
sm64ex.enable = lib.mkOption {
|
||||||
|
type = lib.types.bool;
|
||||||
|
default = false;
|
||||||
|
example = true;
|
||||||
|
description = "Whether we want to install sm64ex.";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
config = lib.mkIf config.me.sm64ex.enable (
|
||||||
|
lib.mkMerge [
|
||||||
|
(lib.mkIf config.me.graphical {
|
||||||
|
allowedUnfree = [ "sm64ex" ];
|
||||||
|
|
||||||
|
home.packages = with pkgs; [
|
||||||
|
sm64ex
|
||||||
|
steam_sm64ex
|
||||||
|
];
|
||||||
|
|
||||||
|
# nixpkgs.overlays = [
|
||||||
|
# (final: prev: {
|
||||||
|
# sm4ex = prev.sm64ex.override {
|
||||||
|
# baseRom.name = "SuperMario64.z64";
|
||||||
|
# };
|
||||||
|
# })
|
||||||
|
# ];
|
||||||
|
|
||||||
|
home.file.".local/share/sm64ex/sm64config.txt" = {
|
||||||
|
source = ./files/sm64config.txt;
|
||||||
|
};
|
||||||
|
|
||||||
|
home.persistence."/home/deck/.persist" = {
|
||||||
|
files = [
|
||||||
|
".local/share/sm64ex/sm64_save_file.bin"
|
||||||
|
];
|
||||||
|
};
|
||||||
|
|
||||||
|
nixpkgs.overlays = [
|
||||||
|
(final: prev: {
|
||||||
|
sm64ex =
|
||||||
|
let
|
||||||
|
desktop_item = pkgs.makeDesktopItem {
|
||||||
|
name = "sm64ex";
|
||||||
|
desktopName = "Super Mario 64";
|
||||||
|
comment = "A PC Port of Super Mario 64.";
|
||||||
|
categories = [
|
||||||
|
"Game"
|
||||||
|
];
|
||||||
|
icon = "sm64ex";
|
||||||
|
type = "Application";
|
||||||
|
exec = "sm64ex";
|
||||||
|
};
|
||||||
|
in
|
||||||
|
pkgs.buildEnv {
|
||||||
|
name = prev.sm64ex.name;
|
||||||
|
paths = [
|
||||||
|
(config.lib.nixGL.wrap prev.sm64ex)
|
||||||
|
];
|
||||||
|
extraOutputsToInstall = [
|
||||||
|
"man"
|
||||||
|
"doc"
|
||||||
|
"info"
|
||||||
|
];
|
||||||
|
# We have to use 555 instead of the normal 444 here because the .desktop file ends up inside $HOME on steam deck and desktop files must be either not in $HOME or must be executable, otherwise KDE Plasma refuses to execute them.
|
||||||
|
postBuild = ''
|
||||||
|
install -m 555 -D "${desktop_item}/share/applications/"* -t $out/share/applications/
|
||||||
|
install -m 444 -D "${./files/icon.png}" $out/share/pixmaps/sm64ex.png
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
})
|
||||||
|
];
|
||||||
|
})
|
||||||
|
]
|
||||||
|
);
|
||||||
|
}
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
fullscreen true
|
||||||
@@ -0,0 +1,33 @@
|
|||||||
|
{
|
||||||
|
stdenv,
|
||||||
|
config,
|
||||||
|
lib,
|
||||||
|
pkgs,
|
||||||
|
...
|
||||||
|
}:
|
||||||
|
|
||||||
|
let
|
||||||
|
package = (pkgs.callPackage ./package.nix { });
|
||||||
|
in
|
||||||
|
{
|
||||||
|
imports = [ ];
|
||||||
|
|
||||||
|
options.me = {
|
||||||
|
steam_rom_manager.enable = lib.mkOption {
|
||||||
|
type = lib.types.bool;
|
||||||
|
default = false;
|
||||||
|
example = true;
|
||||||
|
description = "Whether we want to install steam_rom_manager.";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
config = lib.mkIf config.me.steam_rom_manager.enable (
|
||||||
|
lib.mkMerge [
|
||||||
|
(lib.mkIf config.me.graphical {
|
||||||
|
home.packages = with pkgs; [
|
||||||
|
package
|
||||||
|
];
|
||||||
|
})
|
||||||
|
]
|
||||||
|
);
|
||||||
|
}
|
||||||
@@ -0,0 +1,49 @@
|
|||||||
|
{
|
||||||
|
stdenv,
|
||||||
|
lib,
|
||||||
|
pkgs,
|
||||||
|
makeDesktopItem,
|
||||||
|
}:
|
||||||
|
|
||||||
|
let
|
||||||
|
version = "2.5.29";
|
||||||
|
icon = pkgs.fetchurl {
|
||||||
|
url = "https://github.com/SteamGridDB/steam-rom-manager/blob/master/src/assets/icons/512x512.png?raw=true";
|
||||||
|
hash = "sha256-Nx29nJ2+44AYrTLP+CNmDJFAf2sjrH7sfYhg9fJx2qo=";
|
||||||
|
};
|
||||||
|
in
|
||||||
|
stdenv.mkDerivation {
|
||||||
|
name = "steam-rom-manager";
|
||||||
|
src = pkgs.fetchurl {
|
||||||
|
url = "https://github.com/SteamGridDB/steam-rom-manager/releases/download/v${version}/Steam-ROM-Manager-${version}.AppImage";
|
||||||
|
hash = "sha256-6ZJ+MGIgr2osuQuqD6N9NnPiJFNq/HW6ivG8tyXUhvs=";
|
||||||
|
};
|
||||||
|
phases = [
|
||||||
|
"installPhase"
|
||||||
|
];
|
||||||
|
installPhase = ''
|
||||||
|
runHook preInstall
|
||||||
|
mkdir -p $out/bin
|
||||||
|
install --mode=0755 $src $out/bin/steam-rom-manager
|
||||||
|
runHook postInstall
|
||||||
|
'';
|
||||||
|
# We have to use 555 instead of the normal 444 here because the .desktop file ends up inside $HOME on steam deck and desktop files must be either not in $HOME or must be executable, otherwise KDE Plasma refuses to execute them.
|
||||||
|
postInstall = ''
|
||||||
|
mkdir -p $out/share/{applications,pixmaps}
|
||||||
|
install -m 555 -D "$desktopItem/share/applications/"* -t $out/share/applications/
|
||||||
|
install -m 444 -D "${icon}" $out/share/pixmaps/steamrommanager.png
|
||||||
|
'';
|
||||||
|
|
||||||
|
desktopItem = makeDesktopItem {
|
||||||
|
name = "steam-rom-manager";
|
||||||
|
desktopName = "Steam Rom Manager";
|
||||||
|
comment = "Manage additional entries in the Steam launcher.";
|
||||||
|
categories = [
|
||||||
|
"Application"
|
||||||
|
"Utility"
|
||||||
|
];
|
||||||
|
icon = "steamrommanager";
|
||||||
|
type = "Application";
|
||||||
|
exec = "steam-rom-manager";
|
||||||
|
};
|
||||||
|
}
|
||||||
@@ -0,0 +1,15 @@
|
|||||||
|
{ config, lib, ... }:
|
||||||
|
|
||||||
|
let
|
||||||
|
inherit (builtins) elem;
|
||||||
|
inherit (lib) getName mkOption;
|
||||||
|
inherit (lib.types) listOf str;
|
||||||
|
in
|
||||||
|
{
|
||||||
|
# Pending https://github.com/NixOS/nixpkgs/issues/55674
|
||||||
|
options.allowedUnfree = mkOption {
|
||||||
|
type = listOf str;
|
||||||
|
default = [ ];
|
||||||
|
};
|
||||||
|
config.nixpkgs.config.allowUnfreePredicate = p: elem (getName p) config.allowedUnfree;
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user