Initial commit
This commit is contained in:
commit
8ef534a3c6
2
.gitattributes
vendored
Normal file
2
.gitattributes
vendored
Normal file
|
@ -0,0 +1,2 @@
|
||||||
|
*.jpg filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.png filter=lfs diff=lfs merge=lfs -text
|
41
custom-pkgs/adwaita-for-steam.nix
Normal file
41
custom-pkgs/adwaita-for-steam.nix
Normal file
|
@ -0,0 +1,41 @@
|
||||||
|
{ customCss ? null, extraOptions ? [ ], fetchFromGitHub, lib, python3, stdenvNoCC, ... }:
|
||||||
|
|
||||||
|
let
|
||||||
|
customCssFlag = if customCss != null then "--custom-css" else "";
|
||||||
|
extras = builtins.concatStringsSep " " (map (s: "-e ${s}") extraOptions);
|
||||||
|
importCustomCSS = if customCss != null then "cp -rf ${customCss} ./custom/custom.css" else "rm ./custom/custom.css";
|
||||||
|
in
|
||||||
|
stdenvNoCC.mkDerivation rec {
|
||||||
|
name = "adwaita-for-steam";
|
||||||
|
version = "2.3";
|
||||||
|
|
||||||
|
src = fetchFromGitHub {
|
||||||
|
owner = "tkashkin";
|
||||||
|
repo = "Adwaita-for-Steam";
|
||||||
|
rev = "v${version}";
|
||||||
|
sha256 = "os02kpQ5ZkIWu+VZPgQ82wN2LWkbp3+GvGM3gI6/tGw=";
|
||||||
|
};
|
||||||
|
|
||||||
|
preferLocalBuild = true;
|
||||||
|
|
||||||
|
nativeBuildInputs = [ python3 ];
|
||||||
|
|
||||||
|
buildPhase = ''
|
||||||
|
mkdir build
|
||||||
|
${importCustomCSS}
|
||||||
|
python install.py --target ./build ${customCssFlag} ${extras}
|
||||||
|
find ./build -type f \( -name "README.md" -o -name ".gitignore" \) -delete # Remove unnecessary files
|
||||||
|
'';
|
||||||
|
|
||||||
|
installPhase = ''
|
||||||
|
mv build $out
|
||||||
|
'';
|
||||||
|
|
||||||
|
meta = with lib; {
|
||||||
|
description = "A skin to make Steam look like a native GTK application";
|
||||||
|
homepage = "https://github.com/tkashkin/Adwaita-for-Steam";
|
||||||
|
license = licenses.mit;
|
||||||
|
maintainers = with maintainers; [ jdigi78 ];
|
||||||
|
mainProgram = "adwaita-for-steam";
|
||||||
|
};
|
||||||
|
}
|
40
custom-pkgs/default.nix
Normal file
40
custom-pkgs/default.nix
Normal file
|
@ -0,0 +1,40 @@
|
||||||
|
{ inputs, pkgs, system, ... }:
|
||||||
|
|
||||||
|
let
|
||||||
|
customPkgs = final: prev: {
|
||||||
|
adwaita-for-steam = pkgs.callPackage ./adwaita-for-steam.nix { };
|
||||||
|
|
||||||
|
gnomeExtensions = prev.gnomeExtensions // {
|
||||||
|
rounded-window-corners-reborn = pkgs.callPackage ./gnomeExtensions/rounded-window-corners-reborn.nix { };
|
||||||
|
};
|
||||||
|
|
||||||
|
gpu-screen-recorder = final.unstable.gpu-screen-recorder;
|
||||||
|
mkvextract-gtk = pkgs.callPackage ./mkvextract-gtk.nix { };
|
||||||
|
};
|
||||||
|
|
||||||
|
unstableOverlay = final: prev: {
|
||||||
|
gdtoolkit_4 = final.unstable.gdtoolkit_4;
|
||||||
|
|
||||||
|
gnomeExtensions = prev.gnomeExtensions // {
|
||||||
|
fullscreen-to-empty-workspace = final.unstable.gnomeExtensions.fullscreen-to-empty-workspace; # TODO: Remove when version 7 is in stable
|
||||||
|
hide-top-bar = final.unstable.gnomeExtensions.hide-top-bar; # TODO: Remove when version 117 is in stable
|
||||||
|
};
|
||||||
|
|
||||||
|
godot_4 = final.unstable.godot_4;
|
||||||
|
icoextract = final.unstable.icoextract; #TODO: remove in next release
|
||||||
|
proton-ge-bin = final.unstable.proton-ge-bin;
|
||||||
|
|
||||||
|
unstable = import inputs.nixpkgs-unstable {
|
||||||
|
inherit (final) config system;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
in
|
||||||
|
import inputs.nixpkgs {
|
||||||
|
config.allowUnfree = true;
|
||||||
|
inherit system;
|
||||||
|
overlays = [
|
||||||
|
customPkgs
|
||||||
|
inputs.nix-vscode-extensions.overlays.default
|
||||||
|
unstableOverlay
|
||||||
|
];
|
||||||
|
}
|
|
@ -0,0 +1,43 @@
|
||||||
|
{ fetchgit, lib, nodejs, gettext, just, zip, unzip, libarchive, buildNpmPackage, glib }:
|
||||||
|
|
||||||
|
buildNpmPackage {
|
||||||
|
pname = "rounded-window-corners-reborn";
|
||||||
|
version = "latest";
|
||||||
|
|
||||||
|
src = fetchgit {
|
||||||
|
url = "https://github.com/flexagoon/rounded-window-corners";
|
||||||
|
rev = "354fa8a97d7679e88df6bbb1aafef9255429abdf";
|
||||||
|
hash = "sha256-HiN5xxdlzSLg+0muXeqt2beiHcF9A9P5WI4c6lzo0Ck=";
|
||||||
|
};
|
||||||
|
|
||||||
|
npmDepsHash = "sha256-2brE1GlzyHN9G/161aKiuHVVbjrpnN/0FBwuBDg/8W0=";
|
||||||
|
|
||||||
|
nativeBuildInputs = [
|
||||||
|
nodejs
|
||||||
|
gettext
|
||||||
|
just
|
||||||
|
zip
|
||||||
|
unzip
|
||||||
|
libarchive
|
||||||
|
glib
|
||||||
|
];
|
||||||
|
|
||||||
|
buildPhase = ''
|
||||||
|
just pack
|
||||||
|
'';
|
||||||
|
|
||||||
|
installPhase = ''
|
||||||
|
mkdir -p $out/share/gnome-shell/extensions
|
||||||
|
install -d $out/share/gnome-shell/extensions/rounded-window-corners@fxgn
|
||||||
|
bsdtar -xvf "rounded-window-corners@fxgn.shell-extension.zip" -C "$out/share/gnome-shell/extensions/rounded-window-corners@fxgn" --no-same-owner
|
||||||
|
mv $out/share/gnome-shell/extensions/rounded-window-corners@fxgn/locale $out/share/
|
||||||
|
install -Dm644 "$out/share/gnome-shell/extensions/rounded-window-corners@fxgn/schemas/org.gnome.shell.extensions.rounded-window-corners-reborn.gschema.xml" -t "$out/share/glib-2.0/schemas/"
|
||||||
|
'';
|
||||||
|
|
||||||
|
meta = with lib; {
|
||||||
|
description = "Rounded window corners reborn";
|
||||||
|
license = with licenses; [ gpl3 ];
|
||||||
|
maintainers = with maintainers; [ jdigi78 ];
|
||||||
|
homepage = "https://github.com/flexagoon/rounded-window-corners";
|
||||||
|
};
|
||||||
|
}
|
43
custom-pkgs/mkvextract-gtk.nix
Normal file
43
custom-pkgs/mkvextract-gtk.nix
Normal file
|
@ -0,0 +1,43 @@
|
||||||
|
{ boost, cmake, fetchgit, gtkmm3, lib, makeWrapper, mkvtoolnix-cli, pkg-config, stdenv }:
|
||||||
|
|
||||||
|
stdenv.mkDerivation rec {
|
||||||
|
pname = "mkvextract-gtk";
|
||||||
|
version = "0.9.6";
|
||||||
|
|
||||||
|
src = fetchgit {
|
||||||
|
url = "https://github.com/Joseph-DiGiovanni/mkvextract-gtk";
|
||||||
|
rev = "refs/tags/${version}";
|
||||||
|
hash = "sha256-rpCua6VQ2zOCvCMj9QUMhuq2nKYWJ81+U8KT1XTdnNA=";
|
||||||
|
};
|
||||||
|
|
||||||
|
nativeBuildInputs = [
|
||||||
|
boost
|
||||||
|
cmake
|
||||||
|
gtkmm3
|
||||||
|
makeWrapper
|
||||||
|
pkg-config
|
||||||
|
];
|
||||||
|
|
||||||
|
configurePhase = ''
|
||||||
|
cmake .
|
||||||
|
'';
|
||||||
|
|
||||||
|
installPhase = ''
|
||||||
|
install -Dm755 mkvextract-gtk $out/bin/mkvextract-gtk
|
||||||
|
install -Dm644 desktop/mkvextract-gtk.desktop $out/share/applications/mkvextract-gtk.desktop
|
||||||
|
install -Dm644 desktop/mkvextract-gtk.png $out/share/icons/hicolor/256x256/apps/mkvextract-gtk.png
|
||||||
|
'';
|
||||||
|
|
||||||
|
postFixup = ''
|
||||||
|
wrapProgram $out/bin/mkvextract-gtk --set PATH ${lib.makeBinPath [ mkvtoolnix-cli ]}
|
||||||
|
'';
|
||||||
|
|
||||||
|
meta = with lib; {
|
||||||
|
description = "Extract tracks from matroska (mkv) files";
|
||||||
|
homepage = "https://github.com/Joseph-DiGiovanni/mkvextract-gtk/";
|
||||||
|
license = with licenses; [ gpl2 ];
|
||||||
|
maintainers = with maintainers; [ jdigi78 ];
|
||||||
|
platforms = platforms.unix;
|
||||||
|
mainProgram = "mkvextract-gtk";
|
||||||
|
};
|
||||||
|
}
|
425
flake.lock
Normal file
425
flake.lock
Normal file
|
@ -0,0 +1,425 @@
|
||||||
|
{
|
||||||
|
"nodes": {
|
||||||
|
"crane": {
|
||||||
|
"inputs": {
|
||||||
|
"nixpkgs": [
|
||||||
|
"lanzaboote",
|
||||||
|
"nixpkgs"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1717535930,
|
||||||
|
"narHash": "sha256-1hZ/txnbd/RmiBPNUs7i8UQw2N89uAK3UzrGAWdnFfU=",
|
||||||
|
"owner": "ipetkov",
|
||||||
|
"repo": "crane",
|
||||||
|
"rev": "55e7754ec31dac78980c8be45f8a28e80e370946",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "ipetkov",
|
||||||
|
"repo": "crane",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"firefox-gnome-theme": {
|
||||||
|
"flake": false,
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1721276923,
|
||||||
|
"narHash": "sha256-HJKuwVvi+yGv+8n9Ez4EwaJA0B79JRss9J30vpgy/GI=",
|
||||||
|
"owner": "rafaelmardojai",
|
||||||
|
"repo": "firefox-gnome-theme",
|
||||||
|
"rev": "cc70ec20e2775df7cd2bccdd20dcdecc3e0a733b",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "rafaelmardojai",
|
||||||
|
"repo": "firefox-gnome-theme",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"flake-compat": {
|
||||||
|
"flake": false,
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1696426674,
|
||||||
|
"narHash": "sha256-kvjfFW7WAETZlt09AgDn1MrtKzP7t90Vf7vypd3OL1U=",
|
||||||
|
"owner": "edolstra",
|
||||||
|
"repo": "flake-compat",
|
||||||
|
"rev": "0f9255e01c2351cc7d116c072cb317785dd33b33",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "edolstra",
|
||||||
|
"repo": "flake-compat",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"flake-compat_2": {
|
||||||
|
"flake": false,
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1696426674,
|
||||||
|
"narHash": "sha256-kvjfFW7WAETZlt09AgDn1MrtKzP7t90Vf7vypd3OL1U=",
|
||||||
|
"owner": "edolstra",
|
||||||
|
"repo": "flake-compat",
|
||||||
|
"rev": "0f9255e01c2351cc7d116c072cb317785dd33b33",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "edolstra",
|
||||||
|
"repo": "flake-compat",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"flake-parts": {
|
||||||
|
"inputs": {
|
||||||
|
"nixpkgs-lib": [
|
||||||
|
"lanzaboote",
|
||||||
|
"nixpkgs"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1717285511,
|
||||||
|
"narHash": "sha256-iKzJcpdXih14qYVcZ9QC9XuZYnPc6T8YImb6dX166kw=",
|
||||||
|
"owner": "hercules-ci",
|
||||||
|
"repo": "flake-parts",
|
||||||
|
"rev": "2a55567fcf15b1b1c7ed712a2c6fadaec7412ea8",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "hercules-ci",
|
||||||
|
"repo": "flake-parts",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"flake-utils": {
|
||||||
|
"inputs": {
|
||||||
|
"systems": "systems"
|
||||||
|
},
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1710146030,
|
||||||
|
"narHash": "sha256-SZ5L6eA7HJ/nmkzGG7/ISclqe6oZdOZTNoesiInkXPQ=",
|
||||||
|
"owner": "numtide",
|
||||||
|
"repo": "flake-utils",
|
||||||
|
"rev": "b1d9ab70662946ef0850d488da1c9019f3a9752a",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "numtide",
|
||||||
|
"repo": "flake-utils",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"flake-utils_2": {
|
||||||
|
"inputs": {
|
||||||
|
"systems": "systems_2"
|
||||||
|
},
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1710146030,
|
||||||
|
"narHash": "sha256-SZ5L6eA7HJ/nmkzGG7/ISclqe6oZdOZTNoesiInkXPQ=",
|
||||||
|
"owner": "numtide",
|
||||||
|
"repo": "flake-utils",
|
||||||
|
"rev": "b1d9ab70662946ef0850d488da1c9019f3a9752a",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "numtide",
|
||||||
|
"repo": "flake-utils",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"gitignore": {
|
||||||
|
"inputs": {
|
||||||
|
"nixpkgs": [
|
||||||
|
"lanzaboote",
|
||||||
|
"pre-commit-hooks-nix",
|
||||||
|
"nixpkgs"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1709087332,
|
||||||
|
"narHash": "sha256-HG2cCnktfHsKV0s4XW83gU3F57gaTljL9KNSuG6bnQs=",
|
||||||
|
"owner": "hercules-ci",
|
||||||
|
"repo": "gitignore.nix",
|
||||||
|
"rev": "637db329424fd7e46cf4185293b9cc8c88c95394",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "hercules-ci",
|
||||||
|
"repo": "gitignore.nix",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"home-manager": {
|
||||||
|
"inputs": {
|
||||||
|
"nixpkgs": [
|
||||||
|
"nixpkgs"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1720042825,
|
||||||
|
"narHash": "sha256-A0vrUB6x82/jvf17qPCpxaM+ulJnD8YZwH9Ci0BsAzE=",
|
||||||
|
"owner": "nix-community",
|
||||||
|
"repo": "home-manager",
|
||||||
|
"rev": "e1391fb22e18a36f57e6999c7a9f966dc80ac073",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "nix-community",
|
||||||
|
"ref": "release-24.05",
|
||||||
|
"repo": "home-manager",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"impermanence": {
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1719091691,
|
||||||
|
"narHash": "sha256-AxaLX5cBEcGtE02PeGsfscSb/fWMnyS7zMWBXQWDKbE=",
|
||||||
|
"owner": "nix-community",
|
||||||
|
"repo": "impermanence",
|
||||||
|
"rev": "23c1f06316b67cb5dabdfe2973da3785cfe9c34a",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "nix-community",
|
||||||
|
"repo": "impermanence",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"lanzaboote": {
|
||||||
|
"inputs": {
|
||||||
|
"crane": "crane",
|
||||||
|
"flake-compat": "flake-compat",
|
||||||
|
"flake-parts": "flake-parts",
|
||||||
|
"flake-utils": "flake-utils",
|
||||||
|
"nixpkgs": "nixpkgs",
|
||||||
|
"pre-commit-hooks-nix": "pre-commit-hooks-nix",
|
||||||
|
"rust-overlay": "rust-overlay"
|
||||||
|
},
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1718178907,
|
||||||
|
"narHash": "sha256-eSZyrQ9uoPB9iPQ8Y5H7gAmAgAvCw3InStmU3oEjqsE=",
|
||||||
|
"owner": "nix-community",
|
||||||
|
"repo": "lanzaboote",
|
||||||
|
"rev": "b627ccd97d0159214cee5c7db1412b75e4be6086",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "nix-community",
|
||||||
|
"ref": "v0.4.1",
|
||||||
|
"repo": "lanzaboote",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"nix-flatpak": {
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1711997201,
|
||||||
|
"narHash": "sha256-J71xzQlVYsjagA4AsVwRazhBh2rZrPpKvxTgs6UzL7c=",
|
||||||
|
"owner": "gmodena",
|
||||||
|
"repo": "nix-flatpak",
|
||||||
|
"rev": "b76fa31346db7fc958a9898f3c594696ca71c4fd",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "gmodena",
|
||||||
|
"ref": "v0.4.1",
|
||||||
|
"repo": "nix-flatpak",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"nix-vscode-extensions": {
|
||||||
|
"inputs": {
|
||||||
|
"flake-compat": "flake-compat_2",
|
||||||
|
"flake-utils": "flake-utils_2",
|
||||||
|
"nixpkgs": "nixpkgs_2"
|
||||||
|
},
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1721698116,
|
||||||
|
"narHash": "sha256-JdgX4TIroHxE4lBzZSyxxSvWGi8zveV34KfHuS9by2w=",
|
||||||
|
"owner": "nix-community",
|
||||||
|
"repo": "nix-vscode-extensions",
|
||||||
|
"rev": "7beca30ffc495e5e3980495e1179939abf0ab8a6",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "nix-community",
|
||||||
|
"repo": "nix-vscode-extensions",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"nixpkgs": {
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1717794163,
|
||||||
|
"narHash": "sha256-Ch6ZpFPVvi7Bb6gmmuufpTEFkXqa43pC94XMfU5FEt0=",
|
||||||
|
"owner": "NixOS",
|
||||||
|
"repo": "nixpkgs",
|
||||||
|
"rev": "121f68ed7c6c32de5a8ce91a08ef25713d1c4755",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "NixOS",
|
||||||
|
"ref": "nixos-unstable-small",
|
||||||
|
"repo": "nixpkgs",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"nixpkgs-stable": {
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1710695816,
|
||||||
|
"narHash": "sha256-3Eh7fhEID17pv9ZxrPwCLfqXnYP006RKzSs0JptsN84=",
|
||||||
|
"owner": "NixOS",
|
||||||
|
"repo": "nixpkgs",
|
||||||
|
"rev": "614b4613980a522ba49f0d194531beddbb7220d3",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "NixOS",
|
||||||
|
"ref": "nixos-23.11",
|
||||||
|
"repo": "nixpkgs",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"nixpkgs-unstable": {
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1721562059,
|
||||||
|
"narHash": "sha256-Tybxt65eyOARf285hMHIJ2uul8SULjFZbT9ZaEeUnP8=",
|
||||||
|
"owner": "nixos",
|
||||||
|
"repo": "nixpkgs",
|
||||||
|
"rev": "68c9ed8bbed9dfce253cc91560bf9043297ef2fe",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "nixos",
|
||||||
|
"ref": "nixos-unstable",
|
||||||
|
"repo": "nixpkgs",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"nixpkgs_2": {
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1713805509,
|
||||||
|
"narHash": "sha256-YgSEan4CcrjivCNO5ZNzhg7/8ViLkZ4CB/GrGBVSudo=",
|
||||||
|
"owner": "NixOS",
|
||||||
|
"repo": "nixpkgs",
|
||||||
|
"rev": "1e1dc66fe68972a76679644a5577828b6a7e8be4",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "NixOS",
|
||||||
|
"ref": "nixpkgs-unstable",
|
||||||
|
"repo": "nixpkgs",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"nixpkgs_3": {
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1721548954,
|
||||||
|
"narHash": "sha256-7cCC8+Tdq1+3OPyc3+gVo9dzUNkNIQfwSDJ2HSi2u3o=",
|
||||||
|
"owner": "nixos",
|
||||||
|
"repo": "nixpkgs",
|
||||||
|
"rev": "63d37ccd2d178d54e7fb691d7ec76000740ea24a",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "nixos",
|
||||||
|
"ref": "nixos-24.05",
|
||||||
|
"repo": "nixpkgs",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"pre-commit-hooks-nix": {
|
||||||
|
"inputs": {
|
||||||
|
"flake-compat": [
|
||||||
|
"lanzaboote",
|
||||||
|
"flake-compat"
|
||||||
|
],
|
||||||
|
"gitignore": "gitignore",
|
||||||
|
"nixpkgs": [
|
||||||
|
"lanzaboote",
|
||||||
|
"nixpkgs"
|
||||||
|
],
|
||||||
|
"nixpkgs-stable": "nixpkgs-stable"
|
||||||
|
},
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1717664902,
|
||||||
|
"narHash": "sha256-7XfBuLULizXjXfBYy/VV+SpYMHreNRHk9nKMsm1bgb4=",
|
||||||
|
"owner": "cachix",
|
||||||
|
"repo": "pre-commit-hooks.nix",
|
||||||
|
"rev": "cc4d466cb1254af050ff7bdf47f6d404a7c646d1",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "cachix",
|
||||||
|
"repo": "pre-commit-hooks.nix",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"root": {
|
||||||
|
"inputs": {
|
||||||
|
"firefox-gnome-theme": "firefox-gnome-theme",
|
||||||
|
"home-manager": "home-manager",
|
||||||
|
"impermanence": "impermanence",
|
||||||
|
"lanzaboote": "lanzaboote",
|
||||||
|
"nix-flatpak": "nix-flatpak",
|
||||||
|
"nix-vscode-extensions": "nix-vscode-extensions",
|
||||||
|
"nixpkgs": "nixpkgs_3",
|
||||||
|
"nixpkgs-unstable": "nixpkgs-unstable"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"rust-overlay": {
|
||||||
|
"inputs": {
|
||||||
|
"flake-utils": [
|
||||||
|
"lanzaboote",
|
||||||
|
"flake-utils"
|
||||||
|
],
|
||||||
|
"nixpkgs": [
|
||||||
|
"lanzaboote",
|
||||||
|
"nixpkgs"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1717813066,
|
||||||
|
"narHash": "sha256-wqbRwq3i7g5EHIui0bIi84mdqZ/It1AXBSLJ5tafD28=",
|
||||||
|
"owner": "oxalica",
|
||||||
|
"repo": "rust-overlay",
|
||||||
|
"rev": "6dc3e45fe4aee36efeed24d64fc68b1f989d5465",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "oxalica",
|
||||||
|
"repo": "rust-overlay",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"systems": {
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1681028828,
|
||||||
|
"narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=",
|
||||||
|
"owner": "nix-systems",
|
||||||
|
"repo": "default",
|
||||||
|
"rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "nix-systems",
|
||||||
|
"repo": "default",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"systems_2": {
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1681028828,
|
||||||
|
"narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=",
|
||||||
|
"owner": "nix-systems",
|
||||||
|
"repo": "default",
|
||||||
|
"rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "nix-systems",
|
||||||
|
"repo": "default",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"root": "root",
|
||||||
|
"version": 7
|
||||||
|
}
|
52
flake.nix
Normal file
52
flake.nix
Normal file
|
@ -0,0 +1,52 @@
|
||||||
|
{
|
||||||
|
description = "Joey's NixOS configuration";
|
||||||
|
|
||||||
|
inputs = {
|
||||||
|
firefox-gnome-theme = {
|
||||||
|
flake = false;
|
||||||
|
url = "github:rafaelmardojai/firefox-gnome-theme";
|
||||||
|
};
|
||||||
|
|
||||||
|
home-manager = {
|
||||||
|
inputs.nixpkgs.follows = "nixpkgs";
|
||||||
|
url = "github:nix-community/home-manager/release-24.05";
|
||||||
|
};
|
||||||
|
|
||||||
|
impermanence.url = "github:nix-community/impermanence";
|
||||||
|
lanzaboote.url = "github:nix-community/lanzaboote/v0.4.1";
|
||||||
|
nix-flatpak.url = "github:gmodena/nix-flatpak/v0.4.1";
|
||||||
|
nix-vscode-extensions.url = "github:nix-community/nix-vscode-extensions";
|
||||||
|
nixpkgs.url = "github:nixos/nixpkgs/nixos-24.05";
|
||||||
|
nixpkgs-unstable.url = "github:nixos/nixpkgs/nixos-unstable";
|
||||||
|
};
|
||||||
|
|
||||||
|
outputs = inputs @ { self, ... }:
|
||||||
|
let
|
||||||
|
directories = rec {
|
||||||
|
commonHomeModule = homeModules + "/common";
|
||||||
|
commonHostModule = hostModules + "/common";
|
||||||
|
customModules = self + "/modules";
|
||||||
|
customOptions = customModules + "/options";
|
||||||
|
homeModules = self + "/home";
|
||||||
|
hostModules = self + "/hosts";
|
||||||
|
userModules = customModules + "/users";
|
||||||
|
};
|
||||||
|
|
||||||
|
eachSystem = # Replacement for flake-utils.eachDefaultSystem
|
||||||
|
with inputs.nixpkgs.lib;
|
||||||
|
f: foldAttrs mergeAttrs { } (
|
||||||
|
map (s: mapAttrs (_: v: { ${s} = v; }) (f s)) systems.flakeExposed
|
||||||
|
);
|
||||||
|
in
|
||||||
|
eachSystem (system:
|
||||||
|
let
|
||||||
|
outputs = self.outputs // directories;
|
||||||
|
pkgs = import ./custom-pkgs { inherit inputs pkgs system; };
|
||||||
|
in
|
||||||
|
{
|
||||||
|
packages = {
|
||||||
|
homeConfigurations = import ./home.nix { inherit inputs outputs pkgs; };
|
||||||
|
nixosConfigurations = import ./nixos.nix { inherit inputs outputs pkgs system; };
|
||||||
|
};
|
||||||
|
});
|
||||||
|
}
|
22
home.nix
Normal file
22
home.nix
Normal file
|
@ -0,0 +1,22 @@
|
||||||
|
{ inputs, outputs, pkgs, ... }:
|
||||||
|
|
||||||
|
with inputs.home-manager.lib;
|
||||||
|
|
||||||
|
let
|
||||||
|
mkHome = builtins.mapAttrs (host: extraModules:
|
||||||
|
homeManagerConfiguration {
|
||||||
|
inherit pkgs;
|
||||||
|
|
||||||
|
extraSpecialArgs = { inherit inputs outputs; };
|
||||||
|
|
||||||
|
modules = [
|
||||||
|
(outputs.homeModules + "/" + username)
|
||||||
|
outputs.commonHomeModule
|
||||||
|
inputs.nix-flatpak.homeManagerModules.nix-flatpak
|
||||||
|
] ++ extraModules;
|
||||||
|
});
|
||||||
|
in
|
||||||
|
mkHome {
|
||||||
|
"jdigi" = [ ];
|
||||||
|
"jdigi@Joe-Desktop" = [ (outputs.hostModules + "Joe-Desktop/home-manager") ];
|
||||||
|
}
|
16
home/common/bash.nix
Normal file
16
home/common/bash.nix
Normal file
|
@ -0,0 +1,16 @@
|
||||||
|
{ lib, osConfig ? null, ... }:
|
||||||
|
|
||||||
|
let
|
||||||
|
isNixOS = osConfig != null;
|
||||||
|
in
|
||||||
|
{
|
||||||
|
programs.bash = {
|
||||||
|
enable = true;
|
||||||
|
|
||||||
|
shellAliases = {
|
||||||
|
home-update = lib.mkIf (!isNixOS) "home-manager switch --flake $HOME/Nix/";
|
||||||
|
update = lib.mkIf isNixOS "sudo nixos-rebuild switch --flake $HOME/Nix/";
|
||||||
|
update-boot = lib.mkIf isNixOS "sudo nixos-rebuild boot --flake $HOME/Nix/";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
22
home/common/default.nix
Normal file
22
home/common/default.nix
Normal file
|
@ -0,0 +1,22 @@
|
||||||
|
{ ... }:
|
||||||
|
|
||||||
|
{
|
||||||
|
imports = [
|
||||||
|
./bash.nix
|
||||||
|
./firefox.nix
|
||||||
|
./git.nix
|
||||||
|
./gnome
|
||||||
|
./packages.nix
|
||||||
|
];
|
||||||
|
|
||||||
|
home = {
|
||||||
|
file."Pictures/Wallpapers" = {
|
||||||
|
recursive = true;
|
||||||
|
source = ./wallpapers;
|
||||||
|
};
|
||||||
|
stateVersion = "23.11"; # DO NOT CHANGE AFTER INSTALL
|
||||||
|
};
|
||||||
|
|
||||||
|
programs.home-manager.enable = true; # Let Home Manager install and manage itself.
|
||||||
|
}
|
||||||
|
|
103
home/common/firefox.nix
Normal file
103
home/common/firefox.nix
Normal file
|
@ -0,0 +1,103 @@
|
||||||
|
{ config, pkgs, ... }:
|
||||||
|
|
||||||
|
let
|
||||||
|
generateLatestSourceURL = name: "https://addons.mozilla.org/firefox/downloads/latest/${name}/latest.xpi";
|
||||||
|
in
|
||||||
|
{
|
||||||
|
programs.firefox = {
|
||||||
|
enable = true;
|
||||||
|
|
||||||
|
policies = {
|
||||||
|
DisableAccounts = true;
|
||||||
|
DisableFirefoxAccounts = true;
|
||||||
|
DisableFirefoxScreenshots = true;
|
||||||
|
DisableFirefoxStudies = true;
|
||||||
|
DisablePocket = true;
|
||||||
|
DisableTelemetry = true;
|
||||||
|
DisplayBookmarksToolbar = "never";
|
||||||
|
EnableTrackingProtection = {
|
||||||
|
Cryptomining = true;
|
||||||
|
Fingerprinting = true;
|
||||||
|
Locked = true;
|
||||||
|
Value = true;
|
||||||
|
};
|
||||||
|
ExtensionSettings = {
|
||||||
|
"{446900e4-71c2-419f-a6a7-df9c091e268b}" = {
|
||||||
|
default_area = "navbar";
|
||||||
|
install_url = generateLatestSourceURL "bitwarden-password-manager";
|
||||||
|
installation_mode = "force_installed";
|
||||||
|
};
|
||||||
|
"simple-tab-groups@drive4ik" = {
|
||||||
|
default_area = "navbar";
|
||||||
|
install_url = generateLatestSourceURL "simple-tab-groups";
|
||||||
|
installation_mode = "force_installed";
|
||||||
|
};
|
||||||
|
"uBlock0@raymondhill.net" = {
|
||||||
|
default_area = "menupanel";
|
||||||
|
install_url = generateLatestSourceURL "ublock-origin";
|
||||||
|
installation_mode = "force_installed";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
Homepage = {
|
||||||
|
StartPage = "previous-session";
|
||||||
|
};
|
||||||
|
NoDefaultBookmarks = true;
|
||||||
|
OfferToSaveLogins = false;
|
||||||
|
OverrideFirstRunPage = "";
|
||||||
|
OverridePostUpdatePage = "";
|
||||||
|
Preferences = {
|
||||||
|
"browser.newtabpage.activity-stream.showSponsored" = false;
|
||||||
|
"browser.newtabpage.activity-stream.showSponsoredTopSites" = false;
|
||||||
|
"browser.newtabpage.activity-stream.system.showSponsored" = false;
|
||||||
|
"browser.newtabpage.pinned" = "";
|
||||||
|
"browser.topsites.contile.enabled" = false;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
profiles.${config.home.username} = {
|
||||||
|
id = 0;
|
||||||
|
isDefault = true;
|
||||||
|
search = {
|
||||||
|
default = "PrivateSearch";
|
||||||
|
engines = {
|
||||||
|
"NixOS Options" = {
|
||||||
|
urls = [{
|
||||||
|
template = "https://search.nixos.org/options?query={searchTerms}";
|
||||||
|
}];
|
||||||
|
|
||||||
|
icon = "${pkgs.nixos-icons}/share/icons/hicolor/scalable/apps/nix-snowflake.svg";
|
||||||
|
definedAliases = [ "@nixos" ];
|
||||||
|
};
|
||||||
|
|
||||||
|
"Nix Packages" = {
|
||||||
|
urls = [{
|
||||||
|
template = "https://search.nixos.org/packages?query={searchTerms}";
|
||||||
|
}];
|
||||||
|
|
||||||
|
icon = "${pkgs.nixos-icons}/share/icons/hicolor/scalable/apps/nix-snowflake.svg";
|
||||||
|
definedAliases = [ "@nixpkgs" ];
|
||||||
|
};
|
||||||
|
|
||||||
|
"OpenStreetMap" = {
|
||||||
|
urls = [{
|
||||||
|
template = "https://www.openstreetmap.org/search?query={searchTerms}";
|
||||||
|
}];
|
||||||
|
|
||||||
|
iconUpdateURL = "https://www.openstreetmap.org/favicon.ico";
|
||||||
|
definedAliases = [ "@openstreetmap" "@osm" ];
|
||||||
|
};
|
||||||
|
|
||||||
|
"PrivateSearch" = {
|
||||||
|
urls = [{
|
||||||
|
template = "https://privatesearch.app/search?q={searchTerms}";
|
||||||
|
}];
|
||||||
|
|
||||||
|
iconUpdateURL = "https://privatesearch.app/static/themes/simple/img/favicon.svg";
|
||||||
|
definedAliases = [ "@privatesearch" ];
|
||||||
|
};
|
||||||
|
};
|
||||||
|
force = true; # Required to prevent search engine symlink being overwritten. See https://github.com/nix-community/home-manager/issues/3698
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
13
home/common/git.nix
Normal file
13
home/common/git.nix
Normal file
|
@ -0,0 +1,13 @@
|
||||||
|
{ ... }:
|
||||||
|
|
||||||
|
{
|
||||||
|
programs.git = {
|
||||||
|
enable = true;
|
||||||
|
|
||||||
|
extraConfig = {
|
||||||
|
init.defaultBranch = "main";
|
||||||
|
};
|
||||||
|
|
||||||
|
lfs.enable = true;
|
||||||
|
};
|
||||||
|
}
|
66
home/common/gnome/default.nix
Normal file
66
home/common/gnome/default.nix
Normal file
|
@ -0,0 +1,66 @@
|
||||||
|
{ config, lib, ... }:
|
||||||
|
|
||||||
|
{
|
||||||
|
imports = [
|
||||||
|
./outline-theme
|
||||||
|
./extensions
|
||||||
|
./firefox-gnome-theme.nix
|
||||||
|
./steam-adwaita-theme.nix
|
||||||
|
];
|
||||||
|
|
||||||
|
dconf.settings = {
|
||||||
|
"org/gnome/Console".theme = "auto";
|
||||||
|
|
||||||
|
"org/gnome/desktop/background" = {
|
||||||
|
picture-uri = "file:///home/${config.home.username}/Pictures/Wallpapers/Light.jpg";
|
||||||
|
picture-uri-dark = "file:///home/${config.home.username}/Pictures/Wallpapers/Dark.jpg";
|
||||||
|
};
|
||||||
|
|
||||||
|
"org/gnome/desktop/datetime".automatic-timezone = false; # TODO: Auto timezone not working since mozilla location service shutdown
|
||||||
|
|
||||||
|
"org/gnome/desktop/interface" = {
|
||||||
|
clock-format = "12h";
|
||||||
|
show-battery-percentage = true;
|
||||||
|
enable-hot-corners = false;
|
||||||
|
};
|
||||||
|
|
||||||
|
"org/gnome/desktop/peripherals/mouse".accel-profile = "flat";
|
||||||
|
|
||||||
|
"org/gnome/mutter" = {
|
||||||
|
dynamic-workspaces = true;
|
||||||
|
edge-tiling = true;
|
||||||
|
experimental-features = [
|
||||||
|
"scale-monitor-framebuffer"
|
||||||
|
"variable-refresh-rate" # TODO: May not be needed in gnome 47
|
||||||
|
];
|
||||||
|
};
|
||||||
|
|
||||||
|
"org/gnome/settings-daemon/plugins/color" = {
|
||||||
|
night-light-enabled = true;
|
||||||
|
night-light-schedule-automatic = false;
|
||||||
|
night-light-schedule-from = 22.0;
|
||||||
|
night-light-schedule-to = 6.0;
|
||||||
|
night-light-temperature = lib.hm.gvariant.mkUint32 4500;
|
||||||
|
};
|
||||||
|
|
||||||
|
"org/gnome/settings-daemon/plugins/power" = {
|
||||||
|
sleep-inactive-ac-timeout = 1800;
|
||||||
|
sleep-inactive-ac-type = "suspend";
|
||||||
|
sleep-inactive-battery-timeout = 900;
|
||||||
|
sleep-inactive-battery-timeout-ac = 1800;
|
||||||
|
sleep-inactive-battery-type = "suspend";
|
||||||
|
};
|
||||||
|
|
||||||
|
"org/gnome/shell" = {
|
||||||
|
favorite-apps = [
|
||||||
|
"firefox.desktop"
|
||||||
|
"org.gnome.Nautilus.desktop"
|
||||||
|
"org.gnome.Console.desktop"
|
||||||
|
];
|
||||||
|
};
|
||||||
|
|
||||||
|
"org/gnome/shell/weather".automatic-location = true;
|
||||||
|
"org/gnome/system/location".enabled = true;
|
||||||
|
"org/gtk/settings/file-chooser".clock-format = "12h";
|
||||||
|
};
|
||||||
|
}
|
9
home/common/gnome/extensions/alphabetical-app-grid.nix
Normal file
9
home/common/gnome/extensions/alphabetical-app-grid.nix
Normal file
|
@ -0,0 +1,9 @@
|
||||||
|
{ pkgs, ... }:
|
||||||
|
|
||||||
|
{
|
||||||
|
dconf.settings = {
|
||||||
|
"org/gnome/shell".enabled-extensions = [ "AlphabeticalAppGrid@stuarthayhurst" ];
|
||||||
|
};
|
||||||
|
|
||||||
|
home.packages = with pkgs; [ gnomeExtensions.alphabetical-app-grid ];
|
||||||
|
}
|
10
home/common/gnome/extensions/bluetooth-battery-meter.nix
Normal file
10
home/common/gnome/extensions/bluetooth-battery-meter.nix
Normal file
|
@ -0,0 +1,10 @@
|
||||||
|
{ pkgs, ... }:
|
||||||
|
|
||||||
|
{
|
||||||
|
dconf.settings = {
|
||||||
|
"org/gnome/shell".enabled-extensions = [ "Bluetooth-Battery-Meter@maniacx.github.com" ];
|
||||||
|
"org/gnome/shell/extensions/Bluetooth-Battery-Meter".enable-battery-level-text = true;
|
||||||
|
};
|
||||||
|
|
||||||
|
home.packages = with pkgs; [ gnomeExtensions.bluetooth-battery-meter ];
|
||||||
|
}
|
9
home/common/gnome/extensions/bottom-overview.nix
Normal file
9
home/common/gnome/extensions/bottom-overview.nix
Normal file
|
@ -0,0 +1,9 @@
|
||||||
|
{ pkgs, ... }:
|
||||||
|
|
||||||
|
{
|
||||||
|
dconf.settings = {
|
||||||
|
"org/gnome/shell".enabled-extensions = [ "bottom-overview@fthx" ];
|
||||||
|
};
|
||||||
|
|
||||||
|
home.packages = with pkgs; [ gnomeExtensions.bottom-overview ];
|
||||||
|
}
|
18
home/common/gnome/extensions/compiz-windows-effect.nix
Normal file
18
home/common/gnome/extensions/compiz-windows-effect.nix
Normal file
|
@ -0,0 +1,18 @@
|
||||||
|
{ pkgs, ... }:
|
||||||
|
|
||||||
|
{
|
||||||
|
dconf.settings = {
|
||||||
|
"org/gnome/shell".enabled-extensions = [ "compiz-windows-effect@hermes83.github.com" ];
|
||||||
|
|
||||||
|
"org/gnome/shell/extensions/com/github/hermes83/compiz-windows-effect" = {
|
||||||
|
friction = 3.5;
|
||||||
|
mass = 80.0;
|
||||||
|
maximize-effect = false;
|
||||||
|
resize-effect = false;
|
||||||
|
speedup-factor-divider = 7.0;
|
||||||
|
spring-k = 10.0;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
home.packages = with pkgs; [ gnomeExtensions.compiz-windows-effect ];
|
||||||
|
}
|
18
home/common/gnome/extensions/dash-to-dock.nix
Normal file
18
home/common/gnome/extensions/dash-to-dock.nix
Normal file
|
@ -0,0 +1,18 @@
|
||||||
|
{ pkgs, ... }:
|
||||||
|
|
||||||
|
{
|
||||||
|
dconf.settings = {
|
||||||
|
"org/gnome/shell".enabled-extensions = [ "dash-to-dock@micxgx.gmail.com" ];
|
||||||
|
|
||||||
|
"org/gnome/shell/extensions/dash-to-dock" = {
|
||||||
|
dash-max-icon-size = 64;
|
||||||
|
disable-overview-on-startup = true;
|
||||||
|
running-indicator-style = "DOTS";
|
||||||
|
scroll-action = "cycle-windows";
|
||||||
|
show-trash = false;
|
||||||
|
transparency-mode = "DYNAMIC";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
home.packages = with pkgs; [ gnomeExtensions.dash-to-dock ];
|
||||||
|
}
|
26
home/common/gnome/extensions/default.nix
Normal file
26
home/common/gnome/extensions/default.nix
Normal file
|
@ -0,0 +1,26 @@
|
||||||
|
{ ... }:
|
||||||
|
|
||||||
|
{
|
||||||
|
imports = [
|
||||||
|
./alphabetical-app-grid.nix
|
||||||
|
./bluetooth-battery-meter.nix
|
||||||
|
./bottom-overview.nix
|
||||||
|
#./compiz-windows-effect.nix # Conflicts with outline theme
|
||||||
|
#./dash-to-dock.nix # Replaced by bottom-overview
|
||||||
|
./fullscreen-to-empty-workspace.nix
|
||||||
|
./gnome-rounded-corners.nix
|
||||||
|
./grand-theft-focus.nix
|
||||||
|
./gsconnect.nix
|
||||||
|
./night-theme-switcher.nix
|
||||||
|
./quick-settings-audio-devices-hider.nix
|
||||||
|
./quick-settings-audio-devices-renamer.nix
|
||||||
|
];
|
||||||
|
|
||||||
|
dconf.settings = {
|
||||||
|
"org/gnome/shell" = {
|
||||||
|
disable-user-extensions = false;
|
||||||
|
disabled-extensions = [ ];
|
||||||
|
enabled-extensions = [ "light-style@gnome-shell-extensions.gcampax.github.com" ];
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
|
@ -0,0 +1,9 @@
|
||||||
|
{ pkgs, ... }:
|
||||||
|
|
||||||
|
{
|
||||||
|
dconf.settings = {
|
||||||
|
"org/gnome/shell".enabled-extensions = [ "fullscreen-to-empty-workspace@aiono.dev" ];
|
||||||
|
};
|
||||||
|
|
||||||
|
home.packages = with pkgs; [ gnomeExtensions.fullscreen-to-empty-workspace ];
|
||||||
|
}
|
9
home/common/gnome/extensions/gnome-rounded-corners.nix
Normal file
9
home/common/gnome/extensions/gnome-rounded-corners.nix
Normal file
|
@ -0,0 +1,9 @@
|
||||||
|
{ pkgs, ... }:
|
||||||
|
|
||||||
|
{
|
||||||
|
dconf.settings = {
|
||||||
|
"org/gnome/shell".enabled-extensions = [ "Rounded_Corners@lennart-k" ];
|
||||||
|
};
|
||||||
|
|
||||||
|
home.packages = with pkgs; [ gnomeExtensions.rounded-corners ];
|
||||||
|
}
|
9
home/common/gnome/extensions/grand-theft-focus.nix
Normal file
9
home/common/gnome/extensions/grand-theft-focus.nix
Normal file
|
@ -0,0 +1,9 @@
|
||||||
|
{ pkgs, ... }:
|
||||||
|
|
||||||
|
{
|
||||||
|
dconf.settings = {
|
||||||
|
"org/gnome/shell".enabled-extensions = [ "grand-theft-focus@zalckos.github.com" ];
|
||||||
|
};
|
||||||
|
|
||||||
|
home.packages = with pkgs; [ gnomeExtensions.grand-theft-focus ];
|
||||||
|
}
|
9
home/common/gnome/extensions/gsconnect.nix
Normal file
9
home/common/gnome/extensions/gsconnect.nix
Normal file
|
@ -0,0 +1,9 @@
|
||||||
|
{ pkgs, ... }:
|
||||||
|
|
||||||
|
{
|
||||||
|
dconf.settings = {
|
||||||
|
"org/gnome/shell".enabled-extensions = [ "gsconnect@andyholmes.github.io" ];
|
||||||
|
};
|
||||||
|
|
||||||
|
home.packages = with pkgs; [ gnomeExtensions.gsconnect ];
|
||||||
|
}
|
24
home/common/gnome/extensions/night-theme-switcher.nix
Normal file
24
home/common/gnome/extensions/night-theme-switcher.nix
Normal file
|
@ -0,0 +1,24 @@
|
||||||
|
{ pkgs, ... }:
|
||||||
|
|
||||||
|
{
|
||||||
|
dconf.settings = {
|
||||||
|
"org/gnome/shell".enabled-extensions = [ "nightthemeswitcher@romainvigier.fr" ];
|
||||||
|
|
||||||
|
"org/gnome/shell/extensions/nightthemeswitcher/commands" = {
|
||||||
|
enabled = true;
|
||||||
|
sunrise = "gsettings set org.gnome.desktop.interface gtk-theme Adwaita";
|
||||||
|
sunset = "gsettings set org.gnome.desktop.interface gtk-theme Adwaita-dark";
|
||||||
|
};
|
||||||
|
|
||||||
|
"org/gnome/shell/extensions/nightthemeswitcher/time" = {
|
||||||
|
sunrise = 7;
|
||||||
|
sunset = 19;
|
||||||
|
manual-schedule = true;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
home.packages = with pkgs; [
|
||||||
|
gnome.gnome-themes-extra # For Adwaita-dark
|
||||||
|
gnomeExtensions.night-theme-switcher
|
||||||
|
];
|
||||||
|
}
|
|
@ -0,0 +1,22 @@
|
||||||
|
{ pkgs, ... }:
|
||||||
|
|
||||||
|
{
|
||||||
|
dconf.settings = {
|
||||||
|
"org/gnome/shell".enabled-extensions = [ "quicksettings-audio-devices-hider@marcinjahn.com" ];
|
||||||
|
|
||||||
|
"org/gnome/shell/extensions/quicksettings-audio-devices-hider" = {
|
||||||
|
excluded-input-names = [
|
||||||
|
"Digital Input (S/PDIF) – AC511 Sound Bar"
|
||||||
|
"Digital Input (S/PDIF) – CMU-BC1 Multifunction Device"
|
||||||
|
"Line In – AC511 Sound Bar"
|
||||||
|
];
|
||||||
|
|
||||||
|
excluded-output-names = [
|
||||||
|
"Digital Output (S/PDIF) – AC511 Sound Bar"
|
||||||
|
"Digital Output (S/PDIF) – Qudelix-5K USB DAC 96KHz"
|
||||||
|
];
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
home.packages = with pkgs; [ gnomeExtensions.quick-settings-audio-devices-hider ];
|
||||||
|
}
|
|
@ -0,0 +1,44 @@
|
||||||
|
{ lib, pkgs, ... }:
|
||||||
|
|
||||||
|
{
|
||||||
|
dconf.settings = {
|
||||||
|
"org/gnome/shell".enabled-extensions = [ "quicksettings-audio-devices-renamer@marcinjahn.com" ];
|
||||||
|
|
||||||
|
"org/gnome/shell/extensions/quicksettings-audio-devices-renamer" = with lib.hm.gvariant; {
|
||||||
|
input-names-map = [
|
||||||
|
(mkDictionaryEntry [
|
||||||
|
"Handsfree – Joseph's Pixel Buds Pro"
|
||||||
|
"Joseph's Pixel Buds Pro"
|
||||||
|
])
|
||||||
|
|
||||||
|
(mkDictionaryEntry [
|
||||||
|
"Microphone – Antlion Wireless Microphone"
|
||||||
|
"ModMic Wireless"
|
||||||
|
])
|
||||||
|
|
||||||
|
(mkDictionaryEntry [
|
||||||
|
"Analog Input – CMU-BC1 Multifunction Device"
|
||||||
|
"Sony Webcam"
|
||||||
|
])
|
||||||
|
];
|
||||||
|
output-names-map = [
|
||||||
|
(mkDictionaryEntry [
|
||||||
|
"Analog Output – AC511 Sound Bar"
|
||||||
|
"Sound Bar"
|
||||||
|
])
|
||||||
|
|
||||||
|
(mkDictionaryEntry [
|
||||||
|
"Analog Output – Qudelix-5K USB DAC 96KHz"
|
||||||
|
"Qudelix-5K USB DAC"
|
||||||
|
])
|
||||||
|
|
||||||
|
(mkDictionaryEntry [
|
||||||
|
"Headset – Joseph's Pixel Buds Pro"
|
||||||
|
"Joseph's Pixel Buds Pro"
|
||||||
|
])
|
||||||
|
];
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
home.packages = with pkgs; [ gnomeExtensions.quick-settings-audio-devices-renamer ];
|
||||||
|
}
|
32
home/common/gnome/firefox-gnome-theme.nix
Normal file
32
home/common/gnome/firefox-gnome-theme.nix
Normal file
|
@ -0,0 +1,32 @@
|
||||||
|
{ config, inputs, ... }:
|
||||||
|
|
||||||
|
{
|
||||||
|
home.file."firefox-gnome-theme" = {
|
||||||
|
source = inputs.firefox-gnome-theme;
|
||||||
|
target = ".mozilla/firefox/${config.home.username}/chrome/firefox-gnome-theme";
|
||||||
|
};
|
||||||
|
|
||||||
|
programs.firefox = {
|
||||||
|
enable = true;
|
||||||
|
|
||||||
|
profiles.${config.home.username} = {
|
||||||
|
|
||||||
|
settings = {
|
||||||
|
"browser.tabs.drawInTitlebar" = true;
|
||||||
|
"browser.theme.dark-private-windows" = false;
|
||||||
|
"browser.uidensity" = 0;
|
||||||
|
"browser.uiCustomization.state" = ''
|
||||||
|
{"placements":{"widget-overflow-fixed-list":[],"nav-bar":["back-button","forward-button","stop-reload-button","new-tab-button","customizableui-special-spring1","urlbar-container","customizableui-special-spring2","save-to-pocket-button","downloads-button","fxa-toolbar-menu-button","unified-extensions-button","_446900e4-71c2-419f-a6a7-df9c091e268b_-browser-action","simple-tab-groups_drive4ik-browser-action"],"toolbar-menubar":["menubar-items"],"TabsToolbar":["tabbrowser-tabs","alltabs-button"],"PersonalToolbar":["import-button","personal-bookmarks"]},"seen":["addon_darkreader_org-browser-action","developer-button","_446900e4-71c2-419f-a6a7-df9c091e268b_-browser-action","simple-tab-groups_drive4ik-browser-action","ublock0_raymondhill_net-browser-action"],"dirtyAreaCache":["nav-bar","unified-extensions-area","PersonalToolbar","TabsToolbar","toolbar-menubar"],"currentVersion":20,"newElementCount":4}
|
||||||
|
'';
|
||||||
|
"svg.context-properties.content.enabled" = true;
|
||||||
|
"toolkit.legacyUserProfileCustomizations.stylesheets" = true;
|
||||||
|
};
|
||||||
|
userChrome = ''
|
||||||
|
@import "firefox-gnome-theme/userChrome.css";
|
||||||
|
'';
|
||||||
|
userContent = ''
|
||||||
|
@import "firefox-gnome-theme/userContent.css";
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
18
home/common/gnome/outline-theme/default.nix
Normal file
18
home/common/gnome/outline-theme/default.nix
Normal file
|
@ -0,0 +1,18 @@
|
||||||
|
{ ... }:
|
||||||
|
|
||||||
|
{
|
||||||
|
imports = [
|
||||||
|
./rounded-window-corners-reborn.nix
|
||||||
|
];
|
||||||
|
|
||||||
|
dconf.settings = {
|
||||||
|
"org/gnome/shell".enabled-extensions = [ "user-theme@gnome-shell-extensions.gcampax.github.com" ];
|
||||||
|
|
||||||
|
"org/gnome/shell/extensions/user-theme".name = "Outline Theme";
|
||||||
|
};
|
||||||
|
|
||||||
|
home.file.".local/share/themes/Outline Theme" = {
|
||||||
|
recursive = true;
|
||||||
|
source = ./theme-files;
|
||||||
|
};
|
||||||
|
}
|
|
@ -0,0 +1,16 @@
|
||||||
|
{ lib, pkgs, ... }:
|
||||||
|
|
||||||
|
{
|
||||||
|
dconf.settings = {
|
||||||
|
"org/gnome/shell".enabled-extensions = [ "rounded-window-corners@fxgn" ];
|
||||||
|
|
||||||
|
"org/gnome/shell/extensions/rounded-window-corners-reborn" = with lib.hm.gvariant; {
|
||||||
|
border-color = mkTuple [ 0.0 0.0 0.0 1.0 ];
|
||||||
|
border-width = 3;
|
||||||
|
skip-libadwaita-app = false;
|
||||||
|
skip-libhandy-app = false;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
home.packages = with pkgs; [ gnomeExtensions.rounded-window-corners-reborn ];
|
||||||
|
}
|
|
@ -0,0 +1,7 @@
|
||||||
|
#panel {
|
||||||
|
outline: 3px solid black;
|
||||||
|
}
|
||||||
|
|
||||||
|
.quick-settings, .quick-toggle-menu, .quick-toggle-menu, .search-entry, .dash-background, .osd-window, .search-section-content, .tile-preview, #keyboard, .keyboard-key, .window-close, .notification-banner, .app-folder:selected:active , .screenshot-ui-close-button, .screenshot-ui-panel, .prompt-dialog, .modal-dialog, .popup-menu-content {
|
||||||
|
border: 3px solid black;
|
||||||
|
}
|
68
home/common/gnome/steam-adwaita-theme.nix
Normal file
68
home/common/gnome/steam-adwaita-theme.nix
Normal file
|
@ -0,0 +1,68 @@
|
||||||
|
{ pkgs, ... }:
|
||||||
|
|
||||||
|
{
|
||||||
|
home.file.".local/share/Steam" = {
|
||||||
|
source = pkgs.adwaita-for-steam.override {
|
||||||
|
extraOptions = [
|
||||||
|
"library/hide_whats_new"
|
||||||
|
];
|
||||||
|
};
|
||||||
|
recursive = true;
|
||||||
|
};
|
||||||
|
|
||||||
|
systemd.user.services = {
|
||||||
|
"adwaita-for-steam-install" = {
|
||||||
|
Unit = {
|
||||||
|
Description = "Install Adwaita for Steam";
|
||||||
|
};
|
||||||
|
Install = {
|
||||||
|
WantedBy = [ "default.target" ];
|
||||||
|
};
|
||||||
|
Service = {
|
||||||
|
ExecStart = pkgs.writeShellScript "adwaita-for-steam-css-patcher" ''
|
||||||
|
cd ~/.local/share/Steam/steamui/css/
|
||||||
|
|
||||||
|
if ! test -f "library.css"; then
|
||||||
|
echo "Steam library.css not found, make sure that you have succesfully executed Steam once!"
|
||||||
|
exit 1;
|
||||||
|
fi
|
||||||
|
|
||||||
|
if ! ${pkgs.gnugrep}/bin/grep -Fxq "/*patched*/" library.css; then
|
||||||
|
echo "Patching steam library..."
|
||||||
|
${pkgs.coreutils}/bin/mv library.css library.original.css
|
||||||
|
${pkgs.coreutils}/bin/touch library.css
|
||||||
|
echo "/*patched*/
|
||||||
|
@import url("https://steamloopback.host/css/library.original.css");
|
||||||
|
@import url("https://steamloopback.host/libraryroot.custom.css");" >> library.css
|
||||||
|
|
||||||
|
# Pad new library file until it has the same size as the original
|
||||||
|
${pkgs.coreutils}/bin/truncate -r library.original.css library.css
|
||||||
|
echo "Done."
|
||||||
|
else
|
||||||
|
echo "Steam library is already patched, nothing to do."
|
||||||
|
fi
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
"adwaita-for-steam-uninstall" = {
|
||||||
|
Unit = {
|
||||||
|
Description = "Uninstall Adwaita for Steam";
|
||||||
|
};
|
||||||
|
Service = {
|
||||||
|
ExecStart = pkgs.writeShellScript "adwaita-for-steam-uninstaller" ''
|
||||||
|
cd ~/.local/share/Steam/steamui/css/
|
||||||
|
|
||||||
|
if ! test -f "library.original.css"; then
|
||||||
|
echo "Original library.css not found, nothing to undo."
|
||||||
|
exit 0
|
||||||
|
fi
|
||||||
|
|
||||||
|
echo "Restoring original Steam library.css..."
|
||||||
|
${pkgs.coreutils}/bin/mv library.original.css library.css
|
||||||
|
echo "Done."
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
10
home/common/packages.nix
Normal file
10
home/common/packages.nix
Normal file
|
@ -0,0 +1,10 @@
|
||||||
|
{ pkgs, ... }:
|
||||||
|
|
||||||
|
{
|
||||||
|
home.packages = with pkgs; [
|
||||||
|
f3d # 3D model thumbnailer and viewer
|
||||||
|
localsend
|
||||||
|
nufraw-thumbnailer # RAW image thumbnailer
|
||||||
|
icoextract # Windows executable thumbnailer
|
||||||
|
];
|
||||||
|
}
|
BIN
home/common/wallpapers/Dark.jpg
(Stored with Git LFS)
Normal file
BIN
home/common/wallpapers/Dark.jpg
(Stored with Git LFS)
Normal file
Binary file not shown.
BIN
home/common/wallpapers/Light.jpg
(Stored with Git LFS)
Normal file
BIN
home/common/wallpapers/Light.jpg
(Stored with Git LFS)
Normal file
Binary file not shown.
15
home/jdigi/default.nix
Normal file
15
home/jdigi/default.nix
Normal file
|
@ -0,0 +1,15 @@
|
||||||
|
{ ... }:
|
||||||
|
|
||||||
|
{
|
||||||
|
imports = [
|
||||||
|
./firefox.nix
|
||||||
|
./gnome
|
||||||
|
./packages.nix
|
||||||
|
./vscode
|
||||||
|
];
|
||||||
|
|
||||||
|
programs.git = {
|
||||||
|
userName = "Joseph DiGiovanni";
|
||||||
|
userEmail = "jdigiovanni78@gmail.com";
|
||||||
|
};
|
||||||
|
}
|
14
home/jdigi/firefox.nix
Normal file
14
home/jdigi/firefox.nix
Normal file
|
@ -0,0 +1,14 @@
|
||||||
|
{ ... }:
|
||||||
|
|
||||||
|
let
|
||||||
|
latestSourceURL = name: "https://addons.mozilla.org/firefox/downloads/latest/${name}/latest.xpi";
|
||||||
|
in
|
||||||
|
{
|
||||||
|
programs.firefox.policies.ExtensionSettings = {
|
||||||
|
"addon@darkreader.org" = {
|
||||||
|
default_area = "menupanel";
|
||||||
|
install_url = latestSourceURL "darkreader";
|
||||||
|
installation_mode = "force_installed";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
40
home/jdigi/gnome/default.nix
Normal file
40
home/jdigi/gnome/default.nix
Normal file
|
@ -0,0 +1,40 @@
|
||||||
|
{ lib, ... }:
|
||||||
|
|
||||||
|
{
|
||||||
|
imports = [
|
||||||
|
./extensions
|
||||||
|
./keyboard-shortcuts.nix
|
||||||
|
];
|
||||||
|
|
||||||
|
dconf.settings = {
|
||||||
|
"org/gnome/desktop/peripherals/mouse".natural-scroll = true;
|
||||||
|
|
||||||
|
"org/gnome/desktop/privacy" = {
|
||||||
|
old-files-age = lib.hm.gvariant.mkUint32 30;
|
||||||
|
remember-recent-files = false;
|
||||||
|
remove-old-temp-files = true;
|
||||||
|
remove-old-trash-files = true;
|
||||||
|
};
|
||||||
|
|
||||||
|
"org/gnome/nautilus/preferences".click-policy = "single";
|
||||||
|
|
||||||
|
"org/gnome/shell" = {
|
||||||
|
favorite-apps = lib.mkForce [
|
||||||
|
"firefox.desktop"
|
||||||
|
"youtube-music.desktop"
|
||||||
|
"code.desktop"
|
||||||
|
"org.godotengine.Godot4.desktop"
|
||||||
|
"steam.desktop"
|
||||||
|
"element-desktop.desktop"
|
||||||
|
"discord.desktop"
|
||||||
|
"org.gnome.Nautilus.desktop"
|
||||||
|
"org.gnome.Console.desktop"
|
||||||
|
];
|
||||||
|
};
|
||||||
|
|
||||||
|
"org/gnome/TextEditor".restore-session = false;
|
||||||
|
|
||||||
|
"org/gtk/gtk4/settings/file-chooser".show-hidden = true;
|
||||||
|
"org/gtk/settings/file-chooser".show-hidden = false;
|
||||||
|
};
|
||||||
|
}
|
7
home/jdigi/gnome/extensions/default.nix
Normal file
7
home/jdigi/gnome/extensions/default.nix
Normal file
|
@ -0,0 +1,7 @@
|
||||||
|
{ ... }:
|
||||||
|
|
||||||
|
{
|
||||||
|
imports = [
|
||||||
|
./memento-mori.nix
|
||||||
|
];
|
||||||
|
}
|
18
home/jdigi/gnome/extensions/memento-mori.nix
Normal file
18
home/jdigi/gnome/extensions/memento-mori.nix
Normal file
|
@ -0,0 +1,18 @@
|
||||||
|
{ pkgs, ... }:
|
||||||
|
|
||||||
|
{
|
||||||
|
dconf.settings = {
|
||||||
|
"org/gnome/shell".enabled-extensions = [ "memento-mori@paveloom" ];
|
||||||
|
|
||||||
|
"org/gnome/shell/extensions/memento-mori" = {
|
||||||
|
birth-day = 3;
|
||||||
|
birth-month = 11;
|
||||||
|
birth-year = 1995;
|
||||||
|
extension-index = 1;
|
||||||
|
extension-position = "left";
|
||||||
|
life-expectancy = 80;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
home.packages = with pkgs; [ gnomeExtensions.memento-mori ];
|
||||||
|
}
|
10
home/jdigi/gnome/keyboard-shortcuts.nix
Normal file
10
home/jdigi/gnome/keyboard-shortcuts.nix
Normal file
|
@ -0,0 +1,10 @@
|
||||||
|
{ ... }:
|
||||||
|
|
||||||
|
{
|
||||||
|
dconf.settings = {
|
||||||
|
"org/gnome/desktop/wm/keybindings".move-to-workspace-left = [ "<Alt><Super>Left" ];
|
||||||
|
"org/gnome/desktop/wm/keybindings".move-to-workspace-right = [ "<Alt><Super>Right" ];
|
||||||
|
"org/gnome/desktop/wm/keybindings".switch-to-workspace-left = [ "<Control><Super>Left" ];
|
||||||
|
"org/gnome/desktop/wm/keybindings".switch-to-workspace-right = [ "<Control><Super>Right" ];
|
||||||
|
};
|
||||||
|
}
|
23
home/jdigi/packages.nix
Normal file
23
home/jdigi/packages.nix
Normal file
|
@ -0,0 +1,23 @@
|
||||||
|
{ pkgs, ... }:
|
||||||
|
|
||||||
|
{
|
||||||
|
home.packages = with pkgs; [
|
||||||
|
blender
|
||||||
|
btrfs-assistant
|
||||||
|
bottles
|
||||||
|
darktable
|
||||||
|
discord
|
||||||
|
element-desktop
|
||||||
|
gimp
|
||||||
|
neovim
|
||||||
|
obs-studio
|
||||||
|
onlyoffice-bin
|
||||||
|
openspades
|
||||||
|
steam
|
||||||
|
transmission-gtk
|
||||||
|
github-desktop
|
||||||
|
godot_4
|
||||||
|
youtube-music
|
||||||
|
via
|
||||||
|
];
|
||||||
|
}
|
24
home/jdigi/vscode/default.nix
Normal file
24
home/jdigi/vscode/default.nix
Normal file
|
@ -0,0 +1,24 @@
|
||||||
|
{ pkgs, ... }:
|
||||||
|
|
||||||
|
{
|
||||||
|
imports = [ ./extensions ];
|
||||||
|
|
||||||
|
programs.vscode = {
|
||||||
|
enable = true;
|
||||||
|
enableExtensionUpdateCheck = false;
|
||||||
|
enableUpdateCheck = false;
|
||||||
|
mutableExtensionsDir = false;
|
||||||
|
package = pkgs.vscode.override {
|
||||||
|
commandLineArgs = [
|
||||||
|
#"--ozone-platform=wayland" #TODO: app_id is wrong on wayland https://github.com/microsoft/vscode/issues/154693
|
||||||
|
"--touch-events"
|
||||||
|
"-d" # hack needed to open files with commandLineArgs
|
||||||
|
];
|
||||||
|
};
|
||||||
|
userSettings = {
|
||||||
|
"editor.formatOnSave" = true;
|
||||||
|
"window.autoDetectColorScheme" = true;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
9
home/jdigi/vscode/extensions/default.nix
Normal file
9
home/jdigi/vscode/extensions/default.nix
Normal file
|
@ -0,0 +1,9 @@
|
||||||
|
{ ... }:
|
||||||
|
|
||||||
|
{
|
||||||
|
imports = [
|
||||||
|
./github-copilot.nix
|
||||||
|
./godot
|
||||||
|
./nix-ide.nix
|
||||||
|
];
|
||||||
|
}
|
14
home/jdigi/vscode/extensions/github-copilot.nix
Normal file
14
home/jdigi/vscode/extensions/github-copilot.nix
Normal file
|
@ -0,0 +1,14 @@
|
||||||
|
{ pkgs, ... }:
|
||||||
|
|
||||||
|
{
|
||||||
|
programs.vscode = {
|
||||||
|
extensions = with pkgs.vscode-marketplace-release; [
|
||||||
|
github.copilot
|
||||||
|
github.copilot-chat
|
||||||
|
];
|
||||||
|
|
||||||
|
userSettings = {
|
||||||
|
"github.copilot.editor.enableAutoCompletions" = true;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
8
home/jdigi/vscode/extensions/godot/default.nix
Normal file
8
home/jdigi/vscode/extensions/godot/default.nix
Normal file
|
@ -0,0 +1,8 @@
|
||||||
|
{ ... }:
|
||||||
|
|
||||||
|
{
|
||||||
|
imports = [
|
||||||
|
./gdscript-formatter-linter.nix
|
||||||
|
./godot-tools.nix
|
||||||
|
];
|
||||||
|
}
|
|
@ -0,0 +1,15 @@
|
||||||
|
{ pkgs, ... }:
|
||||||
|
|
||||||
|
{
|
||||||
|
home.packages = with pkgs; [ gdtoolkit_4 ];
|
||||||
|
|
||||||
|
programs.vscode = {
|
||||||
|
extensions = with pkgs.vscode-marketplace; [
|
||||||
|
eddiedover.gdscript-formatter-linter
|
||||||
|
];
|
||||||
|
|
||||||
|
userSettings."[gdscript]" = {
|
||||||
|
"editor.defaultFormatter" = "EddieDover.gdscript-formatter-linter";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
7
home/jdigi/vscode/extensions/godot/godot-tools.nix
Normal file
7
home/jdigi/vscode/extensions/godot/godot-tools.nix
Normal file
|
@ -0,0 +1,7 @@
|
||||||
|
{ pkgs, ... }:
|
||||||
|
|
||||||
|
{
|
||||||
|
programs.vscode.extensions = with pkgs.vscode-marketplace; [
|
||||||
|
geequlim.godot-tools
|
||||||
|
];
|
||||||
|
}
|
26
home/jdigi/vscode/extensions/nix-ide.nix
Normal file
26
home/jdigi/vscode/extensions/nix-ide.nix
Normal file
|
@ -0,0 +1,26 @@
|
||||||
|
{ pkgs, ... }:
|
||||||
|
|
||||||
|
{
|
||||||
|
home.packages = with pkgs; [
|
||||||
|
nil
|
||||||
|
nixpkgs-fmt
|
||||||
|
];
|
||||||
|
|
||||||
|
programs.vscode = {
|
||||||
|
extensions = with pkgs.vscode-marketplace; [ jnoortheen.nix-ide ];
|
||||||
|
|
||||||
|
userSettings = {
|
||||||
|
nix = {
|
||||||
|
enableLanguageServer = true;
|
||||||
|
serverPath = "${pkgs.nil}/bin/nil";
|
||||||
|
serverSettings = {
|
||||||
|
nil = {
|
||||||
|
formatting = {
|
||||||
|
command = [ "${pkgs.nixpkgs-fmt}/bin/nixpkgs-fmt" ];
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
16
hosts/GPD-WinMax2/default.nix
Normal file
16
hosts/GPD-WinMax2/default.nix
Normal file
|
@ -0,0 +1,16 @@
|
||||||
|
{ pkgs, ... }:
|
||||||
|
|
||||||
|
{
|
||||||
|
imports = [
|
||||||
|
./hardware
|
||||||
|
./home-manager
|
||||||
|
];
|
||||||
|
|
||||||
|
programs = {
|
||||||
|
adb.enable = true;
|
||||||
|
gsconnect.enable = true;
|
||||||
|
steam.enable = true;
|
||||||
|
};
|
||||||
|
|
||||||
|
services.udev.packages = [ pkgs.qFlipper ];
|
||||||
|
}
|
25
hosts/GPD-WinMax2/hardware/default.nix
Normal file
25
hosts/GPD-WinMax2/hardware/default.nix
Normal file
|
@ -0,0 +1,25 @@
|
||||||
|
{ pkgs, ... }:
|
||||||
|
|
||||||
|
{
|
||||||
|
imports = [
|
||||||
|
./file-systems.nix
|
||||||
|
./gdm/monitors
|
||||||
|
];
|
||||||
|
|
||||||
|
boot = {
|
||||||
|
initrd.availableKernelModules = [
|
||||||
|
"nvme"
|
||||||
|
"sd_mod"
|
||||||
|
"thunderbolt"
|
||||||
|
"usb_storage"
|
||||||
|
"usbhid"
|
||||||
|
"xhci_pci"
|
||||||
|
];
|
||||||
|
|
||||||
|
kernelPackages = pkgs.linuxPackages_latest; # TODO: See if this fixes sleep issues
|
||||||
|
};
|
||||||
|
|
||||||
|
hardware.amd-graphics.enable = true;
|
||||||
|
|
||||||
|
services.logind.lidSwitchExternalPower = "ignore";
|
||||||
|
}
|
78
hosts/GPD-WinMax2/hardware/file-systems.nix
Normal file
78
hosts/GPD-WinMax2/hardware/file-systems.nix
Normal file
|
@ -0,0 +1,78 @@
|
||||||
|
{ ... }:
|
||||||
|
|
||||||
|
{
|
||||||
|
boot.initrd.luks.devices = {
|
||||||
|
"home".device = "/dev/disk/by-uuid/9f2d5272-46ca-403f-ae36-7a60e51fc284";
|
||||||
|
"root".device = "/dev/disk/by-uuid/07df5dda-8e3d-4d1c-b652-d3d3b03003fc";
|
||||||
|
};
|
||||||
|
|
||||||
|
fileSystems =
|
||||||
|
let
|
||||||
|
btrfsSubvol = subvol: [ "subvol=${subvol}" "compress=zstd" ];
|
||||||
|
ssdOptions = [ "discard=async" "noatime" ];
|
||||||
|
homeDevice = "/dev/mapper/home";
|
||||||
|
rootDevice = "/dev/mapper/root";
|
||||||
|
in
|
||||||
|
{
|
||||||
|
"/" = {
|
||||||
|
# TODO: Switch to tmpfs
|
||||||
|
device = rootDevice;
|
||||||
|
fsType = "btrfs";
|
||||||
|
options = btrfsSubvol "root" ++ ssdOptions;
|
||||||
|
};
|
||||||
|
|
||||||
|
"/boot" = {
|
||||||
|
device = "/dev/disk/by-uuid/14BC-77E5";
|
||||||
|
fsType = "vfat";
|
||||||
|
options = [ "umask=0077" ]; # Restrict access to random seed
|
||||||
|
};
|
||||||
|
|
||||||
|
"/home" = {
|
||||||
|
device = homeDevice;
|
||||||
|
fsType = "btrfs";
|
||||||
|
options = btrfsSubvol "home" ++ ssdOptions;
|
||||||
|
};
|
||||||
|
|
||||||
|
"/nix" = {
|
||||||
|
device = rootDevice;
|
||||||
|
fsType = "btrfs";
|
||||||
|
options = btrfsSubvol "nix" ++ ssdOptions;
|
||||||
|
};
|
||||||
|
|
||||||
|
"/persist" = {
|
||||||
|
device = rootDevice;
|
||||||
|
fsType = "btrfs";
|
||||||
|
neededForBoot = true;
|
||||||
|
options = btrfsSubvol "persist" ++ ssdOptions;
|
||||||
|
};
|
||||||
|
|
||||||
|
"/swap" = {
|
||||||
|
device = rootDevice;
|
||||||
|
fsType = "btrfs";
|
||||||
|
options = btrfsSubvol "swap" ++ ssdOptions;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
services.snapper.configs = {
|
||||||
|
home = {
|
||||||
|
SUBVOLUME = "/home";
|
||||||
|
TIMELINE_CLEANUP = true;
|
||||||
|
TIMELINE_CREATE = true;
|
||||||
|
TIMELINE_LIMIT_DAILY = "7";
|
||||||
|
TIMELINE_LIMIT_HOURLY = "6";
|
||||||
|
TIMELINE_LIMIT_MONTHLY = "3";
|
||||||
|
TIMELINE_LIMIT_WEEKLY = "4";
|
||||||
|
};
|
||||||
|
persist = {
|
||||||
|
SUBVOLUME = "/persist";
|
||||||
|
TIMELINE_CLEANUP = true;
|
||||||
|
TIMELINE_CREATE = true;
|
||||||
|
TIMELINE_LIMIT_WEEKLY = "4";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
swapDevices = [{
|
||||||
|
device = "/swap/swapfile";
|
||||||
|
size = 8 * 1024;
|
||||||
|
}];
|
||||||
|
}
|
8
hosts/GPD-WinMax2/hardware/gdm/monitors/default.nix
Normal file
8
hosts/GPD-WinMax2/hardware/gdm/monitors/default.nix
Normal file
|
@ -0,0 +1,8 @@
|
||||||
|
{ pkgs, ... }:
|
||||||
|
|
||||||
|
{
|
||||||
|
systemd.tmpfiles.rules = [
|
||||||
|
''L+ /run/gdm/.config/monitors.xml - gdm gdm - ${pkgs.writeText "gdm_monitors.xml" (builtins.readFile ./monitors.xml)}''
|
||||||
|
];
|
||||||
|
}
|
||||||
|
|
23
hosts/GPD-WinMax2/hardware/gdm/monitors/monitors.xml
Normal file
23
hosts/GPD-WinMax2/hardware/gdm/monitors/monitors.xml
Normal file
|
@ -0,0 +1,23 @@
|
||||||
|
<monitors version="2">
|
||||||
|
<configuration>
|
||||||
|
<logicalmonitor>
|
||||||
|
<x>0</x>
|
||||||
|
<y>0</y>
|
||||||
|
<scale>1.748633861541748</scale>
|
||||||
|
<primary>yes</primary>
|
||||||
|
<monitor>
|
||||||
|
<monitorspec>
|
||||||
|
<connector>eDP-1</connector>
|
||||||
|
<vendor>JDI</vendor>
|
||||||
|
<product>GPD1001H</product>
|
||||||
|
<serial>0x00000001</serial>
|
||||||
|
</monitorspec>
|
||||||
|
<mode>
|
||||||
|
<width>2560</width>
|
||||||
|
<height>1600</height>
|
||||||
|
<rate>60.009</rate>
|
||||||
|
</mode>
|
||||||
|
</monitor>
|
||||||
|
</logicalmonitor>
|
||||||
|
</configuration>
|
||||||
|
</monitors>
|
7
hosts/GPD-WinMax2/home-manager/common/default.nix
Normal file
7
hosts/GPD-WinMax2/home-manager/common/default.nix
Normal file
|
@ -0,0 +1,7 @@
|
||||||
|
{ ... }:
|
||||||
|
|
||||||
|
{
|
||||||
|
imports = [
|
||||||
|
./gnome
|
||||||
|
];
|
||||||
|
}
|
7
hosts/GPD-WinMax2/home-manager/common/gnome/default.nix
Normal file
7
hosts/GPD-WinMax2/home-manager/common/gnome/default.nix
Normal file
|
@ -0,0 +1,7 @@
|
||||||
|
{ ... }:
|
||||||
|
|
||||||
|
{
|
||||||
|
imports = [
|
||||||
|
./extensions
|
||||||
|
];
|
||||||
|
}
|
|
@ -0,0 +1,7 @@
|
||||||
|
{ ... }:
|
||||||
|
|
||||||
|
{
|
||||||
|
imports = [
|
||||||
|
./quick-settings-audio-devices-renamer.nix
|
||||||
|
];
|
||||||
|
}
|
|
@ -0,0 +1,23 @@
|
||||||
|
{ lib, pkgs, ... }:
|
||||||
|
|
||||||
|
{
|
||||||
|
dconf.settings = {
|
||||||
|
"org/gnome/shell".enabled-extensions = [ "quicksettings-audio-devices-renamer@marcinjahn.com" ];
|
||||||
|
|
||||||
|
"org/gnome/shell/extensions/quicksettings-audio-devices-renamer" = with lib.hm.gvariant; {
|
||||||
|
output-names-map = [
|
||||||
|
(mkDictionaryEntry [
|
||||||
|
"Internal Microphone – Family 17h/19h HD Audio Controller"
|
||||||
|
"Internal Microphone"
|
||||||
|
])
|
||||||
|
|
||||||
|
(mkDictionaryEntry [
|
||||||
|
"Speakers – Family 17h/19h HD Audio Controller"
|
||||||
|
"Speakers"
|
||||||
|
])
|
||||||
|
];
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
home.packages = with pkgs; [ gnomeExtensions.quick-settings-audio-devices-renamer ];
|
||||||
|
}
|
7
hosts/GPD-WinMax2/home-manager/default.nix
Normal file
7
hosts/GPD-WinMax2/home-manager/default.nix
Normal file
|
@ -0,0 +1,7 @@
|
||||||
|
{ ... }:
|
||||||
|
|
||||||
|
{
|
||||||
|
home-manager.sharedModules = [
|
||||||
|
./common
|
||||||
|
];
|
||||||
|
}
|
33
hosts/Joe-Desktop/default.nix
Normal file
33
hosts/Joe-Desktop/default.nix
Normal file
|
@ -0,0 +1,33 @@
|
||||||
|
{ pkgs, ... }:
|
||||||
|
|
||||||
|
{
|
||||||
|
imports = [
|
||||||
|
./hardware
|
||||||
|
./home-manager
|
||||||
|
];
|
||||||
|
|
||||||
|
programs = {
|
||||||
|
adb.enable = true;
|
||||||
|
|
||||||
|
alvr = {
|
||||||
|
enable = true;
|
||||||
|
openFirewall = true;
|
||||||
|
};
|
||||||
|
|
||||||
|
gsconnect.enable = true;
|
||||||
|
|
||||||
|
sidequest = {
|
||||||
|
enable = true;
|
||||||
|
openFirewall = true;
|
||||||
|
};
|
||||||
|
|
||||||
|
steam.enable = true;
|
||||||
|
via.enable = true;
|
||||||
|
};
|
||||||
|
|
||||||
|
services = {
|
||||||
|
fprintd.enable = true;
|
||||||
|
udev.packages = [ pkgs.qFlipper ];
|
||||||
|
virtual-webcam.enable = true;
|
||||||
|
};
|
||||||
|
}
|
23
hosts/Joe-Desktop/hardware/default.nix
Normal file
23
hosts/Joe-Desktop/hardware/default.nix
Normal file
|
@ -0,0 +1,23 @@
|
||||||
|
{ ... }:
|
||||||
|
|
||||||
|
{
|
||||||
|
imports = [
|
||||||
|
./file-systems.nix
|
||||||
|
./gdm/monitors
|
||||||
|
];
|
||||||
|
|
||||||
|
boot.initrd.availableKernelModules = [
|
||||||
|
"ahci"
|
||||||
|
"nvme"
|
||||||
|
"sd_mod"
|
||||||
|
"sr_mod"
|
||||||
|
"usb_storage"
|
||||||
|
"usbhid"
|
||||||
|
"xhci_pci"
|
||||||
|
];
|
||||||
|
|
||||||
|
hardware = {
|
||||||
|
amd-graphics.enable = true;
|
||||||
|
monitor-control.enable = true;
|
||||||
|
};
|
||||||
|
}
|
79
hosts/Joe-Desktop/hardware/file-systems.nix
Normal file
79
hosts/Joe-Desktop/hardware/file-systems.nix
Normal file
|
@ -0,0 +1,79 @@
|
||||||
|
{ ... }:
|
||||||
|
|
||||||
|
{
|
||||||
|
boot.initrd.luks.devices = {
|
||||||
|
"home".device = "/dev/disk/by-uuid/a5ee5a56-f4b5-4997-a082-e1efc52aca7b";
|
||||||
|
"root".device = "/dev/disk/by-uuid/a3b3787b-6a86-49cc-bad2-cfd31414a9e3";
|
||||||
|
};
|
||||||
|
|
||||||
|
fileSystems =
|
||||||
|
let
|
||||||
|
btrfsSubvol = subvol: [ "subvol=${subvol}" "compress=zstd" ];
|
||||||
|
ssdOptions = [ "discard=async" "noatime" ];
|
||||||
|
homeDevice = "/dev/mapper/home";
|
||||||
|
rootDevice = "/dev/mapper/root";
|
||||||
|
|
||||||
|
in
|
||||||
|
{
|
||||||
|
"/" = {
|
||||||
|
# TODO: Switch to tmpfs
|
||||||
|
device = rootDevice;
|
||||||
|
fsType = "btrfs";
|
||||||
|
options = btrfsSubvol "root" ++ ssdOptions;
|
||||||
|
};
|
||||||
|
|
||||||
|
"/boot" = {
|
||||||
|
device = "/dev/disk/by-uuid/4304-7632";
|
||||||
|
fsType = "vfat";
|
||||||
|
options = [ "umask=0077" ]; # Restrict access to random seed
|
||||||
|
};
|
||||||
|
|
||||||
|
"/home" = {
|
||||||
|
device = homeDevice;
|
||||||
|
fsType = "btrfs";
|
||||||
|
options = btrfsSubvol "home" ++ ssdOptions;
|
||||||
|
};
|
||||||
|
|
||||||
|
"/nix" = {
|
||||||
|
device = rootDevice;
|
||||||
|
fsType = "btrfs";
|
||||||
|
options = btrfsSubvol "nix" ++ ssdOptions;
|
||||||
|
};
|
||||||
|
|
||||||
|
"/persist" = {
|
||||||
|
device = rootDevice;
|
||||||
|
fsType = "btrfs";
|
||||||
|
neededForBoot = true;
|
||||||
|
options = btrfsSubvol "persist" ++ ssdOptions;
|
||||||
|
};
|
||||||
|
|
||||||
|
"/swap" = {
|
||||||
|
device = rootDevice;
|
||||||
|
fsType = "btrfs";
|
||||||
|
options = btrfsSubvol "swap" ++ ssdOptions;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
services.snapper.configs = {
|
||||||
|
home = {
|
||||||
|
SUBVOLUME = "/home";
|
||||||
|
TIMELINE_CLEANUP = true;
|
||||||
|
TIMELINE_CREATE = true;
|
||||||
|
TIMELINE_LIMIT_DAILY = 7;
|
||||||
|
TIMELINE_LIMIT_HOURLY = 6;
|
||||||
|
TIMELINE_LIMIT_MONTHLY = 3;
|
||||||
|
TIMELINE_LIMIT_WEEKLY = 4;
|
||||||
|
};
|
||||||
|
persist = {
|
||||||
|
SUBVOLUME = "/persist";
|
||||||
|
TIMELINE_CLEANUP = true;
|
||||||
|
TIMELINE_CREATE = true;
|
||||||
|
TIMELINE_LIMIT_WEEKLY = 4;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
swapDevices = [{
|
||||||
|
device = "/swap/swapfile";
|
||||||
|
size = 8 * 1024;
|
||||||
|
}];
|
||||||
|
}
|
7
hosts/Joe-Desktop/hardware/gdm/monitors/default.nix
Normal file
7
hosts/Joe-Desktop/hardware/gdm/monitors/default.nix
Normal file
|
@ -0,0 +1,7 @@
|
||||||
|
{ pkgs, ... }:
|
||||||
|
|
||||||
|
{
|
||||||
|
systemd.tmpfiles.rules = [
|
||||||
|
''L+ /run/gdm/.config/monitors.xml - gdm gdm - ${pkgs.writeText "gdm_monitors.xml" (builtins.readFile ./monitors.xml)}''
|
||||||
|
];
|
||||||
|
}
|
46
hosts/Joe-Desktop/hardware/gdm/monitors/monitors.xml
Normal file
46
hosts/Joe-Desktop/hardware/gdm/monitors/monitors.xml
Normal file
|
@ -0,0 +1,46 @@
|
||||||
|
<monitors version="2">
|
||||||
|
<configuration>
|
||||||
|
<logicalmonitor>
|
||||||
|
<x>0</x>
|
||||||
|
<y>0</y>
|
||||||
|
<scale>1</scale>
|
||||||
|
<primary>yes</primary>
|
||||||
|
<monitor>
|
||||||
|
<monitorspec>
|
||||||
|
<connector>DP-3</connector>
|
||||||
|
<vendor>DEL</vendor>
|
||||||
|
<product>AW3423DWF</product>
|
||||||
|
<serial>20K32S3</serial>
|
||||||
|
</monitorspec>
|
||||||
|
<mode>
|
||||||
|
<width>3440</width>
|
||||||
|
<height>1440</height>
|
||||||
|
<rate>164.900</rate>
|
||||||
|
<ratemode>variable</ratemode>
|
||||||
|
</mode>
|
||||||
|
</monitor>
|
||||||
|
</logicalmonitor>
|
||||||
|
</configuration>
|
||||||
|
<configuration>
|
||||||
|
<logicalmonitor>
|
||||||
|
<x>0</x>
|
||||||
|
<y>0</y>
|
||||||
|
<scale>2</scale>
|
||||||
|
<primary>yes</primary>
|
||||||
|
<monitor>
|
||||||
|
<monitorspec>
|
||||||
|
<connector>HDMI-1</connector>
|
||||||
|
<vendor>SNY</vendor>
|
||||||
|
<product>SONY TV *30</product>
|
||||||
|
<serial>0x01010101</serial>
|
||||||
|
</monitorspec>
|
||||||
|
<mode>
|
||||||
|
<width>3840</width>
|
||||||
|
<height>2160</height>
|
||||||
|
<rate>120.000</rate>
|
||||||
|
<ratemode>variable</ratemode>
|
||||||
|
</mode>
|
||||||
|
</monitor>
|
||||||
|
</logicalmonitor>
|
||||||
|
</configuration>
|
||||||
|
</monitors>
|
10
hosts/Joe-Desktop/home-manager/common/default.nix
Normal file
10
hosts/Joe-Desktop/home-manager/common/default.nix
Normal file
|
@ -0,0 +1,10 @@
|
||||||
|
{ ... }:
|
||||||
|
|
||||||
|
{
|
||||||
|
imports = [
|
||||||
|
./gnome
|
||||||
|
./vr-packages.nix
|
||||||
|
];
|
||||||
|
|
||||||
|
xdg.configFile."monitors.xml".source = ./monitors.xml;
|
||||||
|
}
|
|
@ -0,0 +1,8 @@
|
||||||
|
{ lib, ... }:
|
||||||
|
|
||||||
|
{
|
||||||
|
home.file."Pictures/Wallpapers" = lib.mkForce {
|
||||||
|
recursive = true;
|
||||||
|
source = ./wallpapers;
|
||||||
|
};
|
||||||
|
}
|
BIN
hosts/Joe-Desktop/home-manager/common/gnome/custom-wallpaper/wallpapers/Dark.jpg
(Stored with Git LFS)
Normal file
BIN
hosts/Joe-Desktop/home-manager/common/gnome/custom-wallpaper/wallpapers/Dark.jpg
(Stored with Git LFS)
Normal file
Binary file not shown.
BIN
hosts/Joe-Desktop/home-manager/common/gnome/custom-wallpaper/wallpapers/Light.jpg
(Stored with Git LFS)
Normal file
BIN
hosts/Joe-Desktop/home-manager/common/gnome/custom-wallpaper/wallpapers/Light.jpg
(Stored with Git LFS)
Normal file
Binary file not shown.
7
hosts/Joe-Desktop/home-manager/common/gnome/default.nix
Normal file
7
hosts/Joe-Desktop/home-manager/common/gnome/default.nix
Normal file
|
@ -0,0 +1,7 @@
|
||||||
|
{ ... }:
|
||||||
|
|
||||||
|
{
|
||||||
|
imports = [
|
||||||
|
./custom-wallpaper
|
||||||
|
];
|
||||||
|
}
|
46
hosts/Joe-Desktop/home-manager/common/monitors.xml
Normal file
46
hosts/Joe-Desktop/home-manager/common/monitors.xml
Normal file
|
@ -0,0 +1,46 @@
|
||||||
|
<monitors version="2">
|
||||||
|
<configuration>
|
||||||
|
<logicalmonitor>
|
||||||
|
<x>0</x>
|
||||||
|
<y>0</y>
|
||||||
|
<scale>1</scale>
|
||||||
|
<primary>yes</primary>
|
||||||
|
<monitor>
|
||||||
|
<monitorspec>
|
||||||
|
<connector>DP-3</connector>
|
||||||
|
<vendor>DEL</vendor>
|
||||||
|
<product>AW3423DWF</product>
|
||||||
|
<serial>20K32S3</serial>
|
||||||
|
</monitorspec>
|
||||||
|
<mode>
|
||||||
|
<width>3440</width>
|
||||||
|
<height>1440</height>
|
||||||
|
<rate>164.900</rate>
|
||||||
|
<ratemode>variable</ratemode>
|
||||||
|
</mode>
|
||||||
|
</monitor>
|
||||||
|
</logicalmonitor>
|
||||||
|
</configuration>
|
||||||
|
<configuration>
|
||||||
|
<logicalmonitor>
|
||||||
|
<x>0</x>
|
||||||
|
<y>0</y>
|
||||||
|
<scale>2</scale>
|
||||||
|
<primary>yes</primary>
|
||||||
|
<monitor>
|
||||||
|
<monitorspec>
|
||||||
|
<connector>HDMI-1</connector>
|
||||||
|
<vendor>SNY</vendor>
|
||||||
|
<product>SONY TV *30</product>
|
||||||
|
<serial>0x01010101</serial>
|
||||||
|
</monitorspec>
|
||||||
|
<mode>
|
||||||
|
<width>3840</width>
|
||||||
|
<height>2160</height>
|
||||||
|
<rate>120.000</rate>
|
||||||
|
<ratemode>variable</ratemode>
|
||||||
|
</mode>
|
||||||
|
</monitor>
|
||||||
|
</logicalmonitor>
|
||||||
|
</configuration>
|
||||||
|
</monitors>
|
8
hosts/Joe-Desktop/home-manager/common/vr-packages.nix
Normal file
8
hosts/Joe-Desktop/home-manager/common/vr-packages.nix
Normal file
|
@ -0,0 +1,8 @@
|
||||||
|
{ pkgs, ... }:
|
||||||
|
|
||||||
|
{
|
||||||
|
home.packages = with pkgs; [
|
||||||
|
unstable.alvr
|
||||||
|
unstable.sidequest
|
||||||
|
];
|
||||||
|
}
|
7
hosts/Joe-Desktop/home-manager/default.nix
Normal file
7
hosts/Joe-Desktop/home-manager/default.nix
Normal file
|
@ -0,0 +1,7 @@
|
||||||
|
{ ... }:
|
||||||
|
|
||||||
|
{
|
||||||
|
home-manager.sharedModules = [
|
||||||
|
./common
|
||||||
|
];
|
||||||
|
}
|
10
hosts/Livingroom-PC/default.nix
Normal file
10
hosts/Livingroom-PC/default.nix
Normal file
|
@ -0,0 +1,10 @@
|
||||||
|
{ ... }:
|
||||||
|
|
||||||
|
{
|
||||||
|
imports = [
|
||||||
|
./home-manager
|
||||||
|
./shared-wallpapers
|
||||||
|
];
|
||||||
|
|
||||||
|
programs.steam.enable = true;
|
||||||
|
}
|
18
hosts/Livingroom-PC/hardware/default.nix
Normal file
18
hosts/Livingroom-PC/hardware/default.nix
Normal file
|
@ -0,0 +1,18 @@
|
||||||
|
{ ... }:
|
||||||
|
|
||||||
|
{
|
||||||
|
imports = [
|
||||||
|
./file-systems.nix
|
||||||
|
./gdm/monitors
|
||||||
|
];
|
||||||
|
|
||||||
|
boot = {
|
||||||
|
initrd.availableKernelModules = [ "nvme" "xhci_pci" "ahci" "usbhid" "usb_storage" "sd_mod" ];
|
||||||
|
kernelModules = [ "kvm-amd" ];
|
||||||
|
};
|
||||||
|
|
||||||
|
hardware = {
|
||||||
|
intel-graphics.enable = true;
|
||||||
|
scsi-generic.enable = true;
|
||||||
|
};
|
||||||
|
}
|
78
hosts/Livingroom-PC/hardware/file-systems.nix
Normal file
78
hosts/Livingroom-PC/hardware/file-systems.nix
Normal file
|
@ -0,0 +1,78 @@
|
||||||
|
{ ... }:
|
||||||
|
|
||||||
|
{
|
||||||
|
boot.initrd.luks.devices = {
|
||||||
|
"home".device = "/dev/disk/by-uuid/02645fc2-9eb4-4758-9979-f66de2baf061";
|
||||||
|
"root".device = "/dev/disk/by-uuid/b7e8e5d3-bbd0-40d1-aef2-9d3a9fd34f0b";
|
||||||
|
};
|
||||||
|
|
||||||
|
fileSystems =
|
||||||
|
let
|
||||||
|
btrfsSubvol = subvol: [ "subvol=${subvol}" "compress=zstd" ];
|
||||||
|
ssdOptions = [ "discard=async" "noatime" ];
|
||||||
|
homeDevice = "/dev/mapper/home";
|
||||||
|
rootDevice = "/dev/mapper/root";
|
||||||
|
in
|
||||||
|
{
|
||||||
|
"/" = {
|
||||||
|
# TODO: Switch to tmpfs
|
||||||
|
device = rootDevice;
|
||||||
|
fsType = "btrfs";
|
||||||
|
options = btrfsSubvol "root" ++ ssdOptions;
|
||||||
|
};
|
||||||
|
|
||||||
|
"/boot" = {
|
||||||
|
device = "/dev/disk/by-uuid/4B37-F0CB";
|
||||||
|
fsType = "vfat";
|
||||||
|
options = [ "umask=0077" ]; # Restrict access to random seed
|
||||||
|
};
|
||||||
|
|
||||||
|
"/home" = {
|
||||||
|
device = homeDevice;
|
||||||
|
fsType = "btrfs";
|
||||||
|
options = btrfsSubvol "home" ++ ssdOptions;
|
||||||
|
};
|
||||||
|
|
||||||
|
"/nix" = {
|
||||||
|
device = rootDevice;
|
||||||
|
fsType = "btrfs";
|
||||||
|
options = btrfsSubvol "nix" ++ ssdOptions;
|
||||||
|
};
|
||||||
|
|
||||||
|
"/persist" = {
|
||||||
|
device = rootDevice;
|
||||||
|
fsType = "btrfs";
|
||||||
|
neededForBoot = true;
|
||||||
|
options = btrfsSubvol "persist" ++ ssdOptions;
|
||||||
|
};
|
||||||
|
|
||||||
|
"/swap" = {
|
||||||
|
device = rootDevice;
|
||||||
|
fsType = "btrfs";
|
||||||
|
options = btrfsSubvol "swap" ++ ssdOptions;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
services.snapper.configs = {
|
||||||
|
home = {
|
||||||
|
SUBVOLUME = "/home";
|
||||||
|
TIMELINE_CLEANUP = true;
|
||||||
|
TIMELINE_CREATE = true;
|
||||||
|
TIMELINE_LIMIT_DAILY = 7;
|
||||||
|
TIMELINE_LIMIT_HOURLY = 6;
|
||||||
|
TIMELINE_LIMIT_MONTHLY = 3;
|
||||||
|
TIMELINE_LIMIT_WEEKLY = 4;
|
||||||
|
};
|
||||||
|
persist = {
|
||||||
|
SUBVOLUME = "/persist";
|
||||||
|
TIMELINE_CLEANUP = true;
|
||||||
|
TIMELINE_CREATE = true;
|
||||||
|
TIMELINE_LIMIT_WEEKLY = 4;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
swapDevices = [{
|
||||||
|
device = "/swap/swapfile";
|
||||||
|
size = 8 * 1024;
|
||||||
|
}];
|
||||||
|
}
|
7
hosts/Livingroom-PC/hardware/gdm/monitors/default.nix
Normal file
7
hosts/Livingroom-PC/hardware/gdm/monitors/default.nix
Normal file
|
@ -0,0 +1,7 @@
|
||||||
|
{ pkgs, ... }:
|
||||||
|
|
||||||
|
{
|
||||||
|
systemd.tmpfiles.rules = [
|
||||||
|
''L+ /run/gdm/.config/monitors.xml - gdm gdm - ${pkgs.writeText "gdm_monitors.xml" (builtins.readFile ./monitors.xml)}''
|
||||||
|
];
|
||||||
|
}
|
23
hosts/Livingroom-PC/hardware/gdm/monitors/monitors.xml
Normal file
23
hosts/Livingroom-PC/hardware/gdm/monitors/monitors.xml
Normal file
|
@ -0,0 +1,23 @@
|
||||||
|
<monitors version="2">
|
||||||
|
<configuration>
|
||||||
|
<logicalmonitor>
|
||||||
|
<x>0</x>
|
||||||
|
<y>0</y>
|
||||||
|
<scale>1</scale>
|
||||||
|
<primary>yes</primary>
|
||||||
|
<monitor>
|
||||||
|
<monitorspec>
|
||||||
|
<connector>HDMI-1</connector>
|
||||||
|
<vendor>SNY</vendor>
|
||||||
|
<product>SONY TV *30</product>
|
||||||
|
<serial>0x01010101</serial>
|
||||||
|
</monitorspec>
|
||||||
|
<mode>
|
||||||
|
<width>1920</width>
|
||||||
|
<height>1080</height>
|
||||||
|
<rate>120.000</rate>
|
||||||
|
</mode>
|
||||||
|
</monitor>
|
||||||
|
</logicalmonitor>
|
||||||
|
</configuration>
|
||||||
|
</monitors>
|
13
hosts/Livingroom-PC/home-manager/common/default.nix
Normal file
13
hosts/Livingroom-PC/home-manager/common/default.nix
Normal file
|
@ -0,0 +1,13 @@
|
||||||
|
{ lib, ... }:
|
||||||
|
|
||||||
|
{
|
||||||
|
imports = [
|
||||||
|
./gnome
|
||||||
|
./makemkv.nix
|
||||||
|
./monitors
|
||||||
|
./packages.nix
|
||||||
|
];
|
||||||
|
|
||||||
|
home.file."Pictures/Wallpapers".enable = lib.mkForce false;
|
||||||
|
}
|
||||||
|
|
26
hosts/Livingroom-PC/home-manager/common/gnome/default.nix
Normal file
26
hosts/Livingroom-PC/home-manager/common/gnome/default.nix
Normal file
|
@ -0,0 +1,26 @@
|
||||||
|
{ lib, ... }:
|
||||||
|
|
||||||
|
{
|
||||||
|
imports = [
|
||||||
|
./extensions
|
||||||
|
];
|
||||||
|
|
||||||
|
dconf.settings = {
|
||||||
|
"org/gnome/desktop/background" = lib.mkForce {
|
||||||
|
picture-uri = "file:///etc/wallpapers/Light.jpg";
|
||||||
|
picture-uri-dark = "file:///etc/wallpapers/Dark.jpg";
|
||||||
|
};
|
||||||
|
|
||||||
|
"org/gnome/shell" = {
|
||||||
|
favorite-apps = lib.mkForce [
|
||||||
|
"firefox.desktop"
|
||||||
|
"youtube-music.desktop"
|
||||||
|
"steam.desktop"
|
||||||
|
"discord.desktop"
|
||||||
|
"org.gnome.Nautilus.desktop"
|
||||||
|
];
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
}
|
|
@ -0,0 +1,7 @@
|
||||||
|
{ ... }:
|
||||||
|
|
||||||
|
{
|
||||||
|
imports = [
|
||||||
|
./hide-top-bar.nix
|
||||||
|
];
|
||||||
|
}
|
|
@ -0,0 +1,9 @@
|
||||||
|
{ pkgs, ... }:
|
||||||
|
|
||||||
|
{
|
||||||
|
dconf.settings = {
|
||||||
|
"org/gnome/shell".enabled-extensions = [ "hidetopbar@mathieu.bidon.ca" ];
|
||||||
|
};
|
||||||
|
|
||||||
|
home.packages = with pkgs; [ gnomeExtensions.hide-top-bar ];
|
||||||
|
}
|
12
hosts/Livingroom-PC/home-manager/common/makemkv.nix
Normal file
12
hosts/Livingroom-PC/home-manager/common/makemkv.nix
Normal file
|
@ -0,0 +1,12 @@
|
||||||
|
{ ... }:
|
||||||
|
|
||||||
|
{
|
||||||
|
home.file.".MakeMKV/settings.conf" = {
|
||||||
|
# TODO: encrypt app_Key
|
||||||
|
text = ''
|
||||||
|
app_Java = "pkgs.jre8_headless"
|
||||||
|
app_Key = "M-eo6vY4Bo0z6tnPGyjl7QKofQ1PAeW3@3jhqra90NVhJDaE9qmILnsmej8Azu1G3R0a"
|
||||||
|
app_PreferredLanguage = "eng"
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
}
|
|
@ -0,0 +1,8 @@
|
||||||
|
{ ... }:
|
||||||
|
|
||||||
|
{
|
||||||
|
# TODO: move to hardware module
|
||||||
|
home.file.configFile."monitors.xml" = {
|
||||||
|
source = ./monitors.xml;
|
||||||
|
};
|
||||||
|
}
|
|
@ -0,0 +1,23 @@
|
||||||
|
<monitors version="2">
|
||||||
|
<configuration>
|
||||||
|
<logicalmonitor>
|
||||||
|
<x>0</x>
|
||||||
|
<y>0</y>
|
||||||
|
<scale>1</scale>
|
||||||
|
<primary>yes</primary>
|
||||||
|
<monitor>
|
||||||
|
<monitorspec>
|
||||||
|
<connector>HDMI-1</connector>
|
||||||
|
<vendor>SNY</vendor>
|
||||||
|
<product>SONY TV *30</product>
|
||||||
|
<serial>0x01010101</serial>
|
||||||
|
</monitorspec>
|
||||||
|
<mode>
|
||||||
|
<width>1920</width>
|
||||||
|
<height>1080</height>
|
||||||
|
<rate>120.000</rate>
|
||||||
|
</mode>
|
||||||
|
</monitor>
|
||||||
|
</logicalmonitor>
|
||||||
|
</configuration>
|
||||||
|
</monitors>
|
12
hosts/Livingroom-PC/home-manager/common/packages.nix
Normal file
12
hosts/Livingroom-PC/home-manager/common/packages.nix
Normal file
|
@ -0,0 +1,12 @@
|
||||||
|
{ pkgs, ... }:
|
||||||
|
|
||||||
|
{
|
||||||
|
home.packages = with pkgs; [
|
||||||
|
discord
|
||||||
|
localsend
|
||||||
|
makemkv
|
||||||
|
steam
|
||||||
|
youtube-music
|
||||||
|
vlc
|
||||||
|
];
|
||||||
|
}
|
11
hosts/Livingroom-PC/home-manager/default.nix
Normal file
11
hosts/Livingroom-PC/home-manager/default.nix
Normal file
|
@ -0,0 +1,11 @@
|
||||||
|
{ inputs, outputs, pkgs, ... }:
|
||||||
|
|
||||||
|
{
|
||||||
|
home-manager = {
|
||||||
|
extraSpecialArgs = { inherit inputs pkgs; };
|
||||||
|
sharedModules = [
|
||||||
|
./common
|
||||||
|
outputs.commonHomeModule
|
||||||
|
];
|
||||||
|
};
|
||||||
|
}
|
7
hosts/Livingroom-PC/shared-wallpapers/default.nix
Normal file
7
hosts/Livingroom-PC/shared-wallpapers/default.nix
Normal file
|
@ -0,0 +1,7 @@
|
||||||
|
{ ... }:
|
||||||
|
|
||||||
|
{
|
||||||
|
environment.etc = {
|
||||||
|
wallpapers.source = ./wallpapers;
|
||||||
|
};
|
||||||
|
}
|
BIN
hosts/Livingroom-PC/shared-wallpapers/wallpapers/Dark.jpg
(Stored with Git LFS)
Normal file
BIN
hosts/Livingroom-PC/shared-wallpapers/wallpapers/Dark.jpg
(Stored with Git LFS)
Normal file
Binary file not shown.
BIN
hosts/Livingroom-PC/shared-wallpapers/wallpapers/Light.jpg
(Stored with Git LFS)
Normal file
BIN
hosts/Livingroom-PC/shared-wallpapers/wallpapers/Light.jpg
(Stored with Git LFS)
Normal file
Binary file not shown.
121
hosts/common/default.nix
Normal file
121
hosts/common/default.nix
Normal file
|
@ -0,0 +1,121 @@
|
||||||
|
{ inputs, outputs, ... }:
|
||||||
|
|
||||||
|
{
|
||||||
|
imports = [
|
||||||
|
./gpu-screen-recorder.nix
|
||||||
|
./ssh-agent.nix
|
||||||
|
];
|
||||||
|
|
||||||
|
boot = {
|
||||||
|
loader = {
|
||||||
|
efi.canTouchEfiVariables = true;
|
||||||
|
|
||||||
|
systemd-boot = {
|
||||||
|
enable = true;
|
||||||
|
configurationLimit = 5;
|
||||||
|
consoleMode = "auto";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
plymouth.enable = true;
|
||||||
|
secureboot.enable = true;
|
||||||
|
};
|
||||||
|
|
||||||
|
hardware = {
|
||||||
|
bluetooth.settings.General.Experimental = true; # TODO: Needed to get battery levels from some devices
|
||||||
|
enableRedistributableFirmware = true;
|
||||||
|
xbox-one-controller.enable = true;
|
||||||
|
};
|
||||||
|
|
||||||
|
networking = {
|
||||||
|
firewall.enable = true;
|
||||||
|
networkmanager = {
|
||||||
|
enable = true;
|
||||||
|
wifi.macAddress = "random";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
nix = {
|
||||||
|
gc.automatic = true;
|
||||||
|
optimise.automatic = true;
|
||||||
|
settings = {
|
||||||
|
auto-optimise-store = true;
|
||||||
|
experimental-features = [
|
||||||
|
"flakes"
|
||||||
|
"nix-command"
|
||||||
|
];
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
home-manager = {
|
||||||
|
backupFileExtension = "hmbackup";
|
||||||
|
extraSpecialArgs = { inherit inputs; };
|
||||||
|
sharedModules = [
|
||||||
|
outputs.commonHomeModule
|
||||||
|
];
|
||||||
|
useGlobalPkgs = true;
|
||||||
|
useUserPackages = true;
|
||||||
|
};
|
||||||
|
|
||||||
|
nixpkgs.config.allowUnfree = true;
|
||||||
|
|
||||||
|
programs = {
|
||||||
|
dconf = {
|
||||||
|
enable = true;
|
||||||
|
profiles.gdm.databases = [{
|
||||||
|
settings = {
|
||||||
|
# TODO: Find a better way to set defaults in gnome, maybe extraGSettingsOverrides?
|
||||||
|
"org/gnome/desktop/interface" = {
|
||||||
|
clock-format = "12h";
|
||||||
|
show-battery-percentage = true;
|
||||||
|
};
|
||||||
|
|
||||||
|
"org/gnome/desktop/peripherals/mouse".accel-profile = "flat";
|
||||||
|
|
||||||
|
"org/gnome/mutter".experimental-features = [
|
||||||
|
"scale-monitor-framebuffer"
|
||||||
|
"variable-refresh-rate" # TODO: May not be needed in gnome 47
|
||||||
|
];
|
||||||
|
|
||||||
|
"org/gnome/settings-daemon/plugins/color" = {
|
||||||
|
night-light-enabled = true;
|
||||||
|
night-light-schedule-automatic = true;
|
||||||
|
night-light-temperature = inputs.home-manager.lib.hm.gvariant.mkUint32 4500;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}];
|
||||||
|
};
|
||||||
|
|
||||||
|
git = {
|
||||||
|
enable = true;
|
||||||
|
lfs.enable = true;
|
||||||
|
};
|
||||||
|
|
||||||
|
localsend.openFirewall = true;
|
||||||
|
};
|
||||||
|
|
||||||
|
services = {
|
||||||
|
avahi = {
|
||||||
|
enable = true;
|
||||||
|
nssmdns4 = true;
|
||||||
|
openFirewall = true;
|
||||||
|
};
|
||||||
|
|
||||||
|
flatpak = {
|
||||||
|
enable = true;
|
||||||
|
remotes = [{
|
||||||
|
name = "flathub";
|
||||||
|
location = "https://dl.flathub.org/repo/flathub.flatpakrepo";
|
||||||
|
}];
|
||||||
|
};
|
||||||
|
|
||||||
|
gnome-desktop.enable = true;
|
||||||
|
ntp.enable = true;
|
||||||
|
pipewire.enable = true;
|
||||||
|
printing.enable = true;
|
||||||
|
};
|
||||||
|
|
||||||
|
system.stateVersion = "23.11"; # DO NOT CHANGE AFTER INSTALL. More info: https://nixos.org/manual/nixos/stable/options#opt-system.stateVersion
|
||||||
|
systemd.services.NetworkManager-wait-online.enable = false;
|
||||||
|
time.timeZone = "America/New_York";
|
||||||
|
}
|
88
hosts/common/gpu-screen-recorder.nix
Normal file
88
hosts/common/gpu-screen-recorder.nix
Normal file
|
@ -0,0 +1,88 @@
|
||||||
|
{ pkgs, ... }:
|
||||||
|
|
||||||
|
let
|
||||||
|
gsr-save-replay = pkgs.writeShellScriptBin "gsr-save-replay" ''
|
||||||
|
${pkgs.killall}/bin/killall -SIGUSR1 gpu-screen-recorder
|
||||||
|
OUTPUT_DIR="$HOME/${outputDir}"
|
||||||
|
VIDEO_FILE=$(ls -t $OUTPUT_DIR | head -n1)
|
||||||
|
ACTION=$(${pkgs.libnotify}/bin/notify-send -a 'GPU Screen Recorder' --action 'file=Watch Replay' --action 'dir=View All Replays' -i com.dec05eba.gpu_screen_recorder -t 3000 -u low 'Replay Saved' "$VIDEO_FILE")
|
||||||
|
if [ "$ACTION" == "dir" ]; then
|
||||||
|
xdg-open $OUTPUT_DIR
|
||||||
|
elif [ "$ACTION" == "file" ]; then
|
||||||
|
xdg-open $OUTPUT_DIR/$VIDEO_FILE
|
||||||
|
fi
|
||||||
|
'';
|
||||||
|
|
||||||
|
outputDir = "Videos/Replays";
|
||||||
|
in
|
||||||
|
{
|
||||||
|
environment.systemPackages = [
|
||||||
|
gsr-save-replay
|
||||||
|
];
|
||||||
|
|
||||||
|
security.wrappers."gsr-kms-server" = {
|
||||||
|
# Required to start recording without password prompt
|
||||||
|
capabilities = "cap_sys_admin+ep";
|
||||||
|
group = "root";
|
||||||
|
owner = "root";
|
||||||
|
source = "${pkgs.gpu-screen-recorder}/bin/gsr-kms-server";
|
||||||
|
};
|
||||||
|
|
||||||
|
services.xserver.desktopManager.gnome = {
|
||||||
|
# TODO: Figure out how to properly add custom keyboard shortcuts to GNOME, this doesn't seem to work for some reason
|
||||||
|
extraGSettingsOverrides = ''
|
||||||
|
[org/gnome/settings-daemon/plugins/media-keys]
|
||||||
|
custom-keybindings=['/org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/gsr-save-replay/']
|
||||||
|
|
||||||
|
[org.gnome.settings-daemon.plugins.media-keys.custom-keybindings.gsr-save-replay]
|
||||||
|
binding='<Alt>F12'
|
||||||
|
command='gsr-save-replay'
|
||||||
|
name='GPU Screen Recorder - Save Replay'
|
||||||
|
'';
|
||||||
|
|
||||||
|
extraGSettingsOverridePackages = with pkgs; [ gnome.gnome-settings-daemon ];
|
||||||
|
};
|
||||||
|
|
||||||
|
systemd.user.services."gsr-replay" = {
|
||||||
|
after = [ "graphical-session.target" ];
|
||||||
|
description = "GPU Screen Recorder replay service";
|
||||||
|
serviceConfig = {
|
||||||
|
Environment = [
|
||||||
|
"AUDIO_CODEC=opus"
|
||||||
|
"CODEC=auto"
|
||||||
|
"CONTAINER=mkv"
|
||||||
|
"FRAMERATE=60"
|
||||||
|
"MAKEFOLDERS=no"
|
||||||
|
"QUALITY=very_high"
|
||||||
|
"REPLAYDURATION=300"
|
||||||
|
"WINDOW=screen"
|
||||||
|
];
|
||||||
|
ExecStart = pkgs.writeShellScript "start-gpu-screen-recorder-replay" ''
|
||||||
|
${pkgs.gpu-screen-recorder}/bin/gpu-screen-recorder -a "$(${pkgs.pulseaudio}/bin/pactl get-default-sink).monitor" -a "$(${pkgs.pulseaudio}/bin/pactl get-default-source)" -ac "$AUDIO_CODEC" -c "$CONTAINER" -f "$FRAMERATE" -k "$CODEC" -mf "$MAKEFOLDERS" -o "${outputDir}" -q "$QUALITY" -r "$REPLAYDURATION" -v no -w "$WINDOW" $ADDITIONAL_ARGS
|
||||||
|
'';
|
||||||
|
Restart = "on-failure";
|
||||||
|
RestartSec = "5s";
|
||||||
|
Type = "simple";
|
||||||
|
};
|
||||||
|
wantedBy = [ "graphical-session.target" ];
|
||||||
|
};
|
||||||
|
|
||||||
|
systemd.user.services."gsr-audio-device-changer" = {
|
||||||
|
after = [ "gsr-replay.service" ];
|
||||||
|
description = "Restart GPU Screen Recorder replay service on audio device change";
|
||||||
|
requires = [ "gsr-replay.service" ];
|
||||||
|
serviceConfig = {
|
||||||
|
ExecStart = pkgs.writeShellScript "gsr-restart-on-audio-device-change" ''
|
||||||
|
${pkgs.pulseaudio}/bin/pactl subscribe | while read -r event; do
|
||||||
|
if [[ $event == *"Event 'change' on server"* ]]; then
|
||||||
|
systemctl --user restart gsr-replay.service
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
'';
|
||||||
|
Restart = "always";
|
||||||
|
RestartSec = "5s";
|
||||||
|
Type = "simple";
|
||||||
|
};
|
||||||
|
wantedBy = [ "gsr-replay.service" ];
|
||||||
|
};
|
||||||
|
}
|
17
hosts/common/ssh-agent.nix
Normal file
17
hosts/common/ssh-agent.nix
Normal file
|
@ -0,0 +1,17 @@
|
||||||
|
{ ... }:
|
||||||
|
|
||||||
|
{
|
||||||
|
programs.ssh = {
|
||||||
|
extraConfig = ''
|
||||||
|
AddKeysToAgent yes
|
||||||
|
'';
|
||||||
|
|
||||||
|
startAgent = true;
|
||||||
|
};
|
||||||
|
|
||||||
|
services = {
|
||||||
|
gnome.gnome-keyring = {
|
||||||
|
enable = true;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
9
modules/options/boot/default.nix
Normal file
9
modules/options/boot/default.nix
Normal file
|
@ -0,0 +1,9 @@
|
||||||
|
{ ... }:
|
||||||
|
|
||||||
|
{
|
||||||
|
imports = [
|
||||||
|
./impermanence-btrfs.nix
|
||||||
|
./plymouth.nix
|
||||||
|
./secureboot.nix
|
||||||
|
];
|
||||||
|
}
|
69
modules/options/boot/impermanence-btrfs.nix
Normal file
69
modules/options/boot/impermanence-btrfs.nix
Normal file
|
@ -0,0 +1,69 @@
|
||||||
|
{ config, lib, ... }:
|
||||||
|
|
||||||
|
# TODO: Switch to tmpfs
|
||||||
|
let
|
||||||
|
cleanRootScript = ''
|
||||||
|
mkdir -p /btrfs_tmp
|
||||||
|
mount ${rootConfig.device} /btrfs_tmp
|
||||||
|
if [[ -e /btrfs_tmp/root ]]; then
|
||||||
|
mkdir -p /btrfs_tmp/old_roots
|
||||||
|
timestamp=$(date --date="@$(stat -c %Y /btrfs_tmp/root)" "+%Y-%m-%-d_%H:%M:%S")
|
||||||
|
mv /btrfs_tmp/root "/btrfs_tmp/old_roots/$timestamp"
|
||||||
|
fi
|
||||||
|
|
||||||
|
delete_subvolume_recursively() {
|
||||||
|
IFS=$'\n'
|
||||||
|
for i in $(btrfs subvolume list -o "$1" | cut -f 9- -d ' '); do
|
||||||
|
delete_subvolume_recursively "/btrfs_tmp/$i"
|
||||||
|
done
|
||||||
|
btrfs subvolume delete "$1"
|
||||||
|
}
|
||||||
|
|
||||||
|
for i in $(find /btrfs_tmp/old_roots/ -maxdepth 1 -mtime +30); do
|
||||||
|
delete_subvolume_recursively "$i"
|
||||||
|
done
|
||||||
|
|
||||||
|
btrfs subvolume create /btrfs_tmp/root
|
||||||
|
umount /btrfs_tmp
|
||||||
|
rmdir /btrfs_tmp
|
||||||
|
'';
|
||||||
|
|
||||||
|
rootConfig = config.fileSystems."/";
|
||||||
|
in
|
||||||
|
{
|
||||||
|
boot.initrd = lib.mkIf (rootConfig.fsType == "btrfs") {
|
||||||
|
postDeviceCommands = lib.mkIf (!config.boot.initrd.systemd.enable) cleanRootScript;
|
||||||
|
|
||||||
|
systemd.services = lib.mkIf config.boot.initrd.systemd.enable {
|
||||||
|
"clean-root-btrfs" = {
|
||||||
|
after = [ "initrd-root-device.target" ];
|
||||||
|
before = [ "sysroot.mount" ];
|
||||||
|
description = "Reset BTRFS root subvolume to a blank state";
|
||||||
|
script = cleanRootScript;
|
||||||
|
serviceConfig.Type = "oneshot";
|
||||||
|
unitConfig.DefaultDependencies = "no";
|
||||||
|
wantedBy = [ "initrd.target" ];
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
environment.persistence."/persist" = {
|
||||||
|
directories = [
|
||||||
|
{ directory = "/var/lib/colord"; user = "colord"; group = "colord"; mode = "u=rwx,g=rx,o="; }
|
||||||
|
"/etc/NetworkManager/system-connections"
|
||||||
|
"/etc/secureboot"
|
||||||
|
"/var/lib/bluetooth"
|
||||||
|
"/var/lib/flatpak"
|
||||||
|
"/var/lib/fprint"
|
||||||
|
"/var/lib/nixos"
|
||||||
|
"/var/lib/systemd/coredump"
|
||||||
|
"/var/log/"
|
||||||
|
];
|
||||||
|
|
||||||
|
files = [
|
||||||
|
"/etc/machine-id"
|
||||||
|
];
|
||||||
|
|
||||||
|
hideMounts = true;
|
||||||
|
};
|
||||||
|
}
|
17
modules/options/boot/plymouth.nix
Normal file
17
modules/options/boot/plymouth.nix
Normal file
|
@ -0,0 +1,17 @@
|
||||||
|
{ config, lib, ... }:
|
||||||
|
|
||||||
|
{
|
||||||
|
config = lib.mkIf config.boot.plymouth.enable {
|
||||||
|
boot = lib.mkDefault {
|
||||||
|
consoleLogLevel = 0;
|
||||||
|
initrd = {
|
||||||
|
#TODO make this auto detect encrypted drives
|
||||||
|
systemd.enable = lib.mkForce true; # Systemd is required for graphic LUKS password prompt
|
||||||
|
verbose = false;
|
||||||
|
};
|
||||||
|
|
||||||
|
kernelParams = [ "quiet" "splash" ];
|
||||||
|
plymouth.extraConfig = "DeviceScale=2";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
15
modules/options/boot/secureboot.nix
Normal file
15
modules/options/boot/secureboot.nix
Normal file
|
@ -0,0 +1,15 @@
|
||||||
|
{ config, lib, ... }:
|
||||||
|
|
||||||
|
{
|
||||||
|
config = lib.mkIf config.boot.secureboot.enable {
|
||||||
|
boot = {
|
||||||
|
lanzaboote = {
|
||||||
|
enable = true;
|
||||||
|
pkiBundle = "/etc/secureboot";
|
||||||
|
};
|
||||||
|
loader.systemd-boot.enable = lib.mkForce false; # Lanzaboote replaces the systemd-boot module.
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
options.boot.secureboot.enable = lib.mkEnableOption "enable secure boot support.";
|
||||||
|
}
|
11
modules/options/default.nix
Normal file
11
modules/options/default.nix
Normal file
|
@ -0,0 +1,11 @@
|
||||||
|
{ ... }:
|
||||||
|
|
||||||
|
{
|
||||||
|
imports = [
|
||||||
|
./boot
|
||||||
|
./hardware
|
||||||
|
./networking
|
||||||
|
./programs
|
||||||
|
./services
|
||||||
|
];
|
||||||
|
}
|
8
modules/options/hardware/amd-graphics.nix
Normal file
8
modules/options/hardware/amd-graphics.nix
Normal file
|
@ -0,0 +1,8 @@
|
||||||
|
{ config, lib, ... }:
|
||||||
|
{
|
||||||
|
config = lib.mkIf config.hardware.amd-graphics.enable {
|
||||||
|
boot.initrd.availableKernelModules = [ "amdgpu" ];
|
||||||
|
};
|
||||||
|
|
||||||
|
options.hardware.amd-graphics.enable = lib.mkEnableOption "enable support for AMD graphics.";
|
||||||
|
}
|
12
modules/options/hardware/default.nix
Normal file
12
modules/options/hardware/default.nix
Normal file
|
@ -0,0 +1,12 @@
|
||||||
|
{ ... }:
|
||||||
|
|
||||||
|
{
|
||||||
|
imports = [
|
||||||
|
./amd-graphics.nix
|
||||||
|
./intel-graphics.nix
|
||||||
|
./monitor-control.nix
|
||||||
|
./nvidia.nix
|
||||||
|
./scsi-generic.nix
|
||||||
|
./xbox-one-controller.nix
|
||||||
|
];
|
||||||
|
}
|
9
modules/options/hardware/intel-graphics.nix
Normal file
9
modules/options/hardware/intel-graphics.nix
Normal file
|
@ -0,0 +1,9 @@
|
||||||
|
{ config, lib, ... }:
|
||||||
|
|
||||||
|
{
|
||||||
|
config = lib.mkIf config.hardware.intel-graphics.enable {
|
||||||
|
boot.initrd.availableKernelModules = [ "i915" ];
|
||||||
|
};
|
||||||
|
|
||||||
|
options.hardware.intel-graphics.enable = lib.mkEnableOption "enable support for Intel graphics.";
|
||||||
|
}
|
13
modules/options/hardware/monitor-control.nix
Normal file
13
modules/options/hardware/monitor-control.nix
Normal file
|
@ -0,0 +1,13 @@
|
||||||
|
{ config, lib, pkgs, ... }:
|
||||||
|
|
||||||
|
{
|
||||||
|
config = lib.mkIf config.hardware.monitor-control.enable {
|
||||||
|
environment.systemPackages = with pkgs; [
|
||||||
|
ddcutil
|
||||||
|
];
|
||||||
|
|
||||||
|
boot.kernelModules = [ "i2c-dev" ];
|
||||||
|
};
|
||||||
|
|
||||||
|
options.hardware.monitor-control.enable = lib.mkEnableOption "enable support for controlling monitor settings.";
|
||||||
|
}
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Reference in a new issue