add overlays (and make them work), update flake
This commit is contained in:
parent
4dfef18b95
commit
9ce574a6e0
13 changed files with 69 additions and 51 deletions
|
@ -27,7 +27,7 @@ in
|
|||
start = "${lib.getExe pkgs.libnotify} 'GameMode started'";
|
||||
end = "${lib.getExe pkgs.libnotify} 'GameMode ended'";
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
services.udev.packages = [ pkgs.wooting-udev-rules ];
|
||||
|
@ -39,7 +39,7 @@ in
|
|||
environment.systemPackages = with pkgs; [
|
||||
heroic
|
||||
prismlauncher
|
||||
mangohud
|
||||
mangohud
|
||||
the-powder-toy
|
||||
(pkgs.symlinkJoin {
|
||||
name = "osu";
|
||||
|
|
|
@ -65,7 +65,7 @@ in
|
|||
core.autocrlf = "input";
|
||||
commit.gpgsign = true;
|
||||
pull.rebase = true;
|
||||
alias.pfusch= "push --force-with-lease";
|
||||
alias.pfusch = "push --force-with-lease";
|
||||
};
|
||||
};
|
||||
|
||||
|
|
|
@ -6,13 +6,16 @@ in
|
|||
config = with cfg; lib.mkIf (enable && tooling.enable) {
|
||||
environment.systemPackages = with pkgs; [
|
||||
python3
|
||||
pypy3
|
||||
] ++ lib.optionals cfg.graphical [
|
||||
jetbrains.pycharm-community
|
||||
];
|
||||
|
||||
programs.xonsh = {
|
||||
enable = true;
|
||||
config = ''
|
||||
aliases[":q"] = "exit"
|
||||
aliases["ls"] = "eza"
|
||||
'';
|
||||
package = pkgs.xonsh.override {
|
||||
extraPackages = ps: with ps; [
|
||||
requests
|
||||
|
|
|
@ -36,7 +36,7 @@ in
|
|||
{
|
||||
config = with cfg; lib.mkIf (enable && portals && graphical) {
|
||||
environment.systemPackages = with pkgs; [
|
||||
(callPackage ../../custom/deskwhich/package.nix { })
|
||||
deskwhich
|
||||
|
||||
zathura
|
||||
alacritty
|
||||
|
|
36
flake.lock
36
flake.lock
|
@ -285,11 +285,11 @@
|
|||
"nixpkgs-lib": "nixpkgs-lib"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1712014858,
|
||||
"narHash": "sha256-sB4SWl2lX95bExY2gMFG5HIzvva5AVMJd4Igm+GpZNw=",
|
||||
"lastModified": 1714641030,
|
||||
"narHash": "sha256-yzcRNDoyVP7+SCNX0wmuDju1NUCt8Dz9+lyUXEI0dbI=",
|
||||
"owner": "hercules-ci",
|
||||
"repo": "flake-parts",
|
||||
"rev": "9126214d0a59633752a136528f5f3b9aa8565b7d",
|
||||
"rev": "e5d10a24b66c3ea8f150e47dfdb0416ab7c3390e",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
@ -504,11 +504,11 @@
|
|||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1714303849,
|
||||
"narHash": "sha256-o/IgiwA0ZS/nMh5YB0bt+ae3Lt+tlbQouY/xL7tB5h0=",
|
||||
"lastModified": 1714872073,
|
||||
"narHash": "sha256-Gybo6MqJ2tva9vMaSxOgie8uVObiP0LxD2FMokiR0X4=",
|
||||
"owner": "fufexan",
|
||||
"repo": "nix-gaming",
|
||||
"rev": "dbb96ae98e723128cf5a612480ba6187113f5e49",
|
||||
"rev": "b85b9c3afa1bfee0150580eb76c52e572a85a6a9",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
@ -563,11 +563,11 @@
|
|||
},
|
||||
"nixpkgs": {
|
||||
"locked": {
|
||||
"lastModified": 1714635257,
|
||||
"narHash": "sha256-4cPymbty65RvF1DWQfc+Bc8B233A1BWxJnNULJKQ1EY=",
|
||||
"lastModified": 1714763106,
|
||||
"narHash": "sha256-DrDHo74uTycfpAF+/qxZAMlP/Cpe04BVioJb6fdI0YY=",
|
||||
"owner": "NixOS",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "63c3a29ca82437c87573e4c6919b09a24ea61b0f",
|
||||
"rev": "e9be42459999a253a9f92559b1f5b72e1b44c13d",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
@ -579,20 +579,14 @@
|
|||
},
|
||||
"nixpkgs-lib": {
|
||||
"locked": {
|
||||
"dir": "lib",
|
||||
"lastModified": 1711703276,
|
||||
"narHash": "sha256-iMUFArF0WCatKK6RzfUJknjem0H9m4KgorO/p3Dopkk=",
|
||||
"owner": "NixOS",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "d8fe5e6c92d0d190646fb9f1056741a229980089",
|
||||
"type": "github"
|
||||
"lastModified": 1714640452,
|
||||
"narHash": "sha256-QBx10+k6JWz6u7VsohfSw8g8hjdBZEf8CFzXH1/1Z94=",
|
||||
"type": "tarball",
|
||||
"url": "https://github.com/NixOS/nixpkgs/archive/50eb7ecf4cd0a5756d7275c8ba36790e5bd53e33.tar.gz"
|
||||
},
|
||||
"original": {
|
||||
"dir": "lib",
|
||||
"owner": "NixOS",
|
||||
"ref": "nixos-unstable",
|
||||
"repo": "nixpkgs",
|
||||
"type": "github"
|
||||
"type": "tarball",
|
||||
"url": "https://github.com/NixOS/nixpkgs/archive/50eb7ecf4cd0a5756d7275c8ba36790e5bd53e33.tar.gz"
|
||||
}
|
||||
},
|
||||
"nixpkgs-stable": {
|
||||
|
|
26
flake.nix
26
flake.nix
|
@ -39,11 +39,6 @@
|
|||
url = "https://patch-diff.githubusercontent.com/raw/NixOS/nixpkgs/pull/305278.patch";
|
||||
hash = "sha256-8RvPI8Id+Ttgv07IMBTAxkSc+K00WhiWgdgrCcULd7o=";
|
||||
}
|
||||
{
|
||||
# cpupower meta.mainProgram
|
||||
url = "https://patch-diff.githubusercontent.com/raw/NixOS/nixpkgs/pull/308476.patch";
|
||||
hash = "sha256-J/Bvz4RUn9lP7H4s/c6bZEX9dfWsxfG/dpXYF99U3Vs=";
|
||||
}
|
||||
{
|
||||
# xdg term
|
||||
url = "https://patch-diff.githubusercontent.com/raw/NixOS/nixpkgs/pull/303225.patch";
|
||||
|
@ -57,22 +52,29 @@
|
|||
inherit system;
|
||||
config.allowUnfree = true;
|
||||
};
|
||||
patched = let unpatched = nixpkgs.legacyPackages.${system}; in
|
||||
unpatched.applyPatches {
|
||||
name = "nixpkgs-patched";
|
||||
src = inputs.nixpkgs;
|
||||
patches = map unpatched.fetchpatch patches;
|
||||
};
|
||||
overlays = if (builtins.hasAttr "overlays" definitions) then definitions.overlays else [ ];
|
||||
unpatched = nixpkgs.legacyPackages.${system};
|
||||
patched = unpatched.applyPatches {
|
||||
name = "nixpkgs-patched";
|
||||
src = inputs.nixpkgs;
|
||||
patches = map unpatched.fetchpatch patches;
|
||||
};
|
||||
nixosSystem = import (patched + "/nixos/lib/eval-config.nix");
|
||||
in
|
||||
nixosSystem ({
|
||||
inherit system;
|
||||
modules = definitions.modules ++ [
|
||||
({ config, lib, ... }: {
|
||||
nixpkgs.overlays = map (f: (final: prev: (import f { inherit final prev lib config; }))) overlays;
|
||||
})
|
||||
];
|
||||
specialArgs = { inherit inputs system stable; };
|
||||
} // definitions);
|
||||
} // builtins.removeAttrs definitions [ "overlays" "modules" ]);
|
||||
in
|
||||
{
|
||||
nixosConfigurations = {
|
||||
grimmauld-nixos = customNixosSystem "x86_64-linux" {
|
||||
overlays = import ./overlays;
|
||||
modules = [
|
||||
agenix.nixosModules.default
|
||||
chaotic.nixosModules.default
|
||||
|
|
|
@ -35,8 +35,7 @@
|
|||
obs-studio
|
||||
element-desktop
|
||||
ghidra
|
||||
rmview
|
||||
arena
|
||||
# rmview
|
||||
];
|
||||
};
|
||||
}
|
||||
|
|
5
overlays/default.nix
Normal file
5
overlays/default.nix
Normal file
|
@ -0,0 +1,5 @@
|
|||
[
|
||||
./deskwhich.nix
|
||||
./mcontrolcenter.nix
|
||||
./the-powder-toy.nix
|
||||
]
|
3
overlays/deskwhich.nix
Normal file
3
overlays/deskwhich.nix
Normal file
|
@ -0,0 +1,3 @@
|
|||
{ final, prev, ... }: {
|
||||
deskwhich = prev.callPackage ../custom/deskwhich/package.nix { };
|
||||
}
|
8
overlays/mcontrolcenter.nix
Normal file
8
overlays/mcontrolcenter.nix
Normal file
|
@ -0,0 +1,8 @@
|
|||
{ final, prev, ... }: {
|
||||
mcontrolcenter = prev.callPackage
|
||||
(prev.fetchurl {
|
||||
url = "https://raw.githubusercontent.com/NixOS/nixpkgs/2efffaa70e6de4cb34fd694798af5d433250f4e8/pkgs/by-name/mc/mcontrolcenter/package.nix";
|
||||
hash = "sha256-WnjSrSAurmN6dWOzjjZMXXxh0lUigyRPlXlg3OC0lu8=";
|
||||
})
|
||||
{ };
|
||||
}
|
8
overlays/the-powder-toy.nix
Normal file
8
overlays/the-powder-toy.nix
Normal file
|
@ -0,0 +1,8 @@
|
|||
{ final, prev, ... }: {
|
||||
the-powder-toy = prev.callPackage
|
||||
(prev.fetchurl {
|
||||
url = "https://raw.githubusercontent.com/NixOS/nixpkgs/9863d8c74a959d73df0c495a55097f804f7b379d/pkgs/by-name/th/the-powder-toy/package.nix";
|
||||
hash = "sha256-po6jhmdV+HNZBq4/vy6uQsDuW6PyvKcvysWNPZn4K7I=";
|
||||
})
|
||||
{ };
|
||||
}
|
|
@ -40,12 +40,7 @@ in
|
|||
};
|
||||
|
||||
environment.systemPackages = with pkgs; [
|
||||
(callPackage
|
||||
(fetchurl {
|
||||
url = "https://raw.githubusercontent.com/NixOS/nixpkgs/2efffaa70e6de4cb34fd694798af5d433250f4e8/pkgs/by-name/mc/mcontrolcenter/package.nix";
|
||||
hash = "sha256-WnjSrSAurmN6dWOzjjZMXXxh0lUigyRPlXlg3OC0lu8=";
|
||||
})
|
||||
{ })
|
||||
mcontrolcenter
|
||||
];
|
||||
|
||||
grimmShared = {
|
||||
|
|
|
@ -1,8 +1,9 @@
|
|||
{ inputs, system, pkgs, config, lib, ... }:
|
||||
let
|
||||
searchclip = pkgs.writeShellScriptBin "searchclip" ''
|
||||
xdg-open https://www.google.com/search?q=$(wl-paste -p | urlencode)
|
||||
searchclip = let inherit (lib) getExe; in with pkgs; writeShellScriptBin "searchclip" ''
|
||||
xdg-open https://www.google.com/search?q=$(wl-paste -p | ${getExe urlencode})
|
||||
browser=$(xdg-settings get default-web-browser | sed "s/\.desktop//")
|
||||
sleep .1
|
||||
swaymsg [app_id="$browser" urgent="newest"] focus
|
||||
'';
|
||||
in
|
||||
|
@ -156,7 +157,7 @@ in
|
|||
let
|
||||
open = pkgs.writeShellScriptBin "open_or_switch_browser" ''
|
||||
browser=$(xdg-settings get default-web-browser | sed "s/\.desktop//")
|
||||
swaymsg [app_id="$browser"] focus || deskwhich $browser | xargs gio launch
|
||||
swaymsg [app_id="$browser"] focus || ${getExe deskwhich} $browser | xargs gio launch
|
||||
'';
|
||||
in
|
||||
"exec ${getExe open}";
|
||||
|
@ -167,7 +168,7 @@ in
|
|||
while IFS= read -r pid; do
|
||||
swaymsg [pid=$pid] focus && exit 0
|
||||
done <<< $(pgrep spotify -u "$(whoami)")
|
||||
deskwhich spotify | xargs gio launch
|
||||
${getExe deskwhich} spotify | xargs gio launch
|
||||
'';
|
||||
in
|
||||
"exec ${getExe open}"; # for some reason tools = audio media on my keyboard??
|
||||
|
@ -175,7 +176,7 @@ in
|
|||
let
|
||||
open = pkgs.writeShellScriptBin "open_or_switch_mail" ''
|
||||
desk=$(xdg-settings get default-url-scheme-handler mailto | sed "s/\.desktop//")
|
||||
swaymsg [app_id="$desk"] focus || deskwhich $desk | xargs gio launch
|
||||
swaymsg [app_id="$desk"] focus || ${getExe deskwhich} $desk | xargs gio launch
|
||||
'';
|
||||
in
|
||||
"exec ${getExe open}";
|
||||
|
|
Loading…
Reference in a new issue