···11# May lord have mercy on my soul
22-final: prev: {
33- jujutsu = prev.jujutsu.overrideAttrs {
44- patches = (prev.patches or [ ]) ++ [
55- # HACK: I am so sick and tired of not being able to push to Nixpkgs
66- # because some edgy fucking idiot thought that it's a good idea to not
77- # specify an email address in a commit
88- #
99- # See https://github.com/NixOS/nixpkgs/pull/453871
1010- # See https://github.com/jj-vcs/jj/issues/5723
1111- (prev.fetchpatch2 {
1212- url = "https://github.com/pluiedev/jj/commit/daa88d4dd485ed0c188023d2af8f811fd4db4a14.patch";
1313- hash = "sha256-F8fp+LXQwuFVVVnYHJAEaQ9dFr6z9tdCkmcKDC39mM8=";
1414- })
1515- ];
1616- doCheck = false;
1717- };
22+{
33+ self,
44+ ...
55+}:
66+{
77+ flake.overlays.default =
88+ final: prev:
99+ let
1010+ inherit (prev.stdenv.hostPlatform) system;
18111919- # TODO: Remove when nixpkgs#473189 is available in unstable
2020- vicinae = final.runCommand "vicinae-patched" { } ''
2121- mkdir -p $out
2222- cp -r ${prev.vicinae}/* $out
2323- substituteInPlace $out/share/systemd/user/vicinae.service \
2424- --replace-fail "/bin/kill" "${final.lib.getExe' final.coreutils "kill"}" \
2525- --replace-fail "vicinae" "$out/bin/vicinae"
2626- '';
1212+ myPkgs = prev.lib.optionalAttrs (builtins.hasAttr system self.packages) self.packages.${system};
1313+ in
1414+ myPkgs
1515+ // {
1616+ jujutsu = prev.jujutsu.overrideAttrs {
1717+ patches = (prev.patches or [ ]) ++ [
1818+ # HACK: I am so sick and tired of not being able to push to Nixpkgs
1919+ # because some edgy fucking idiot thought that it's a good idea to not
2020+ # specify an email address in a commit
2121+ #
2222+ # See https://github.com/NixOS/nixpkgs/pull/453871
2323+ # See https://github.com/jj-vcs/jj/issues/5723
2424+ (prev.fetchpatch2 {
2525+ url = "https://github.com/pluiedev/jj/commit/daa88d4dd485ed0c188023d2af8f811fd4db4a14.patch";
2626+ hash = "sha256-F8fp+LXQwuFVVVnYHJAEaQ9dFr6z9tdCkmcKDC39mM8=";
2727+ })
2828+ ];
2929+ doCheck = false;
3030+ };
3131+3232+ # TODO: Remove when nixpkgs#473189 is available in unstable
3333+ vicinae = final.runCommand "vicinae-patched" { } ''
3434+ mkdir -p $out
3535+ cp -r ${prev.vicinae}/* $out
3636+ substituteInPlace $out/share/systemd/user/vicinae.service \
3737+ --replace-fail "/bin/kill" "${final.lib.getExe' final.coreutils "kill"}" \
3838+ --replace-fail "vicinae" "$out/bin/vicinae"
3939+ '';
4040+ };
2741}
+43
systems/fettuccine/configuration.nix
···11+{
22+ config,
33+ lib,
44+ inputs,
55+ ...
66+}:
77+{
88+ imports = with inputs.nixos-hardware.nixosModules; [
99+ ../laptop.nix
1010+ ./hardware-configuration.nix
1111+ asus-zephyrus-gu603h
1212+ ];
1313+1414+ networking.hostName = "fettuccine";
1515+1616+ users.users.leah.enable = true;
1717+1818+ # Disable Nvidia's HDMI audio
1919+ boot.blacklistedKernelModules = [ "snd_hda_codec_hdmi" ];
2020+2121+ # Allow CUDA
2222+ nixpkgs.config.cudaSupport = true;
2323+2424+ hardware = {
2525+ bluetooth.enable = true;
2626+2727+ nvidia = {
2828+ # PCI bus IDs are already conveniently set by nixos-hardware
2929+ prime.offload.enable = lib.mkForce true;
3030+3131+ # Beta can sometimes be more stable than, well, stable
3232+ package = config.boot.kernelPackages.nvidiaPackages.beta;
3333+ };
3434+ };
3535+3636+ # Nix can sometimes overload my poor, poor laptop CPU
3737+ # so much that it can freeze my entire system. Amazing.
3838+ # Please don't do that.
3939+ nix.daemonCPUSchedPolicy = "idle";
4040+4141+ # This is an ASUS computer after all
4242+ services.asusd.enable = true;
4343+}
+4-36
systems/fettuccine/default.nix
···11{
22- config,
22+ inputs,
33 lib,
44- inputs,
54 ...
65}:
76{
88- imports = with inputs.nixos-hardware.nixosModules; [
99- ../laptop.nix
1010- ./hardware-configuration.nix
1111- asus-zephyrus-gu603h
1212- ];
1313-1414- networking.hostName = "fettuccine";
1515-1616- users.users.leah.enable = true;
1717-1818- # Disable Nvidia's HDMI audio
1919- boot.blacklistedKernelModules = [ "snd_hda_codec_hdmi" ];
2020-2121- # Allow CUDA
2222- nixpkgs.config.cudaSupport = true;
2323-2424- hardware = {
2525- bluetooth.enable = true;
2626-2727- nvidia = {
2828- # PCI bus IDs are already conveniently set by nixos-hardware
2929- prime.offload.enable = lib.mkForce true;
3030-3131- # Beta can sometimes be more stable than, well, stable
3232- package = config.boot.kernelPackages.nvidiaPackages.beta;
3333- };
77+ flake.nixosConfigurations.fettuccine = lib.nixosSystem {
88+ modules = [ ./configuration.nix ];
99+ specialArgs = { inherit inputs; };
3410 };
3535-3636- # Nix can sometimes overload my poor, poor laptop CPU
3737- # so much that it can freeze my entire system. Amazing.
3838- # Please don't do that.
3939- nix.daemonCPUSchedPolicy = "idle";
4040-4141- # This is an ASUS computer after all
4242- services.asusd.enable = true;
4311}