Compare commits
5 commits
898b301fbc
...
be2a3c31e5
Author | SHA1 | Date | |
---|---|---|---|
be2a3c31e5 | |||
b5f46c14ee | |||
ed66ca84bc | |||
82bf8ab05f | |||
9abc9c10ba |
4 changed files with 36 additions and 16 deletions
|
@ -21,7 +21,6 @@
|
||||||
networking.hostName = "wroclaw-hp";
|
networking.hostName = "wroclaw-hp";
|
||||||
networking.networkmanager.enable = true;
|
networking.networkmanager.enable = true;
|
||||||
networking.firewall.enable = true;
|
networking.firewall.enable = true;
|
||||||
services.xserver.displayManager.gdm.wayland = lib.mkForce true;
|
|
||||||
hardware.sensor.iio.enable = true;
|
hardware.sensor.iio.enable = true;
|
||||||
|
|
||||||
networking.firewall.allowedTCPPortRanges = [
|
networking.firewall.allowedTCPPortRanges = [
|
||||||
|
|
|
@ -6,23 +6,37 @@
|
||||||
|
|
||||||
let
|
let
|
||||||
/*
|
/*
|
||||||
* pkgs: package - nixpkgs package
|
* pkg: package - nixpkgs package
|
||||||
* exe: string - executable (under bin) in pkgs
|
* exe: string - executable (under bin) in pkgs
|
||||||
* wrapperArgs: string[] - arguments to pass to the wrapper
|
* wrapperArgs: string[] - arguments to pass to the wrapper
|
||||||
*/
|
*/
|
||||||
mkWrappedExecutable = {pkg, exe ? pkg.meta.mainProgram, wrapperArgs}: let inherit (pkgs) lib makeWrapper; in pkgs.stdenv.mkDerivation {
|
mkWrappedExecutable = {pkg, exe ? pkg.meta.mainProgram, wrapperArgs}: let inherit (pkgs) lib makeWrapper; in lib.hiPrio (
|
||||||
|
pkgs.stdenv.mkDerivation {
|
||||||
|
inherit wrapperArgs;
|
||||||
name = "${pkg.name}-wrap-${exe}";
|
name = "${pkg.name}-wrap-${exe}";
|
||||||
nativeBuildInputs = [ makeWrapper ];
|
nativeBuildInputs = [ makeWrapper ];
|
||||||
phases = ["installPhase"];
|
phases = ["installPhase"];
|
||||||
installPhase = ''
|
installPhase = ''
|
||||||
mkdir -p $out/bin
|
mkdir -p $out/bin
|
||||||
makeWrapper ${pkg}/bin/${exe} $out/bin/${exe} ${lib.concatStringsSep " " wrapperArgs}
|
makeWrapper ${pkg}/bin/${exe} $out/bin/${exe} $wrapperArgs
|
||||||
'';
|
'';
|
||||||
};
|
}
|
||||||
wrapedNixPrograms = builtins.map lib.hiPrio [
|
);
|
||||||
(mkWrappedExecutable {pkg = pkgs.nix; exe = "nix-build"; wrapperArgs = ["--add-flags" "\"--log-format\"" "--add-flags" "bar-with-logs"];})
|
|
||||||
|
# bool -> nixpkgs[]
|
||||||
|
wrappedNixExecutables = inEnvironment: assert builtins.isBool inEnvironment; [
|
||||||
|
(mkWrappedExecutable {pkg = pkgs.nix; exe = "nix-build"; wrapperArgs = ["--add-flags" "\"--log-format\"" "--add-flags" "bar${lib.optionalString inEnvironment "-with-logs"}"];})
|
||||||
(mkWrappedExecutable {pkg = pkgs.nix; exe = "nix-shell"; wrapperArgs = ["--add-flags" "\"--log-format\"" "--add-flags" "bar"];})
|
(mkWrappedExecutable {pkg = pkgs.nix; exe = "nix-shell"; wrapperArgs = ["--add-flags" "\"--log-format\"" "--add-flags" "bar"];})
|
||||||
];
|
];
|
||||||
|
wrappedNixosExecutables = [
|
||||||
|
(mkWrappedExecutable {pkg = pkgs.nixos-rebuild; wrapperArgs = ["--add-flags" "\"--log-format\"" "--add-flags" "bar"];})
|
||||||
|
];
|
||||||
|
wrappedNix = (pkgs.buildEnv {
|
||||||
|
name = "wrappedNix-${pkgs.nix.version}";
|
||||||
|
paths = [ pkgs.nix ] ++ wrappedNixExecutables false;
|
||||||
|
}).overrideAttrs {
|
||||||
|
version = pkgs.nix.version;
|
||||||
|
};
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
# kernel
|
# kernel
|
||||||
|
@ -33,6 +47,7 @@ in
|
||||||
|
|
||||||
# Allow unfree packages
|
# Allow unfree packages
|
||||||
nixpkgs.config.allowUnfree = true;
|
nixpkgs.config.allowUnfree = true;
|
||||||
|
nix.package = wrappedNix;
|
||||||
|
|
||||||
# List packages installed in system profile. To search, run:
|
# List packages installed in system profile. To search, run:
|
||||||
# $ nix search wget
|
# $ nix search wget
|
||||||
|
@ -45,7 +60,8 @@ in
|
||||||
fastfetch
|
fastfetch
|
||||||
smartmontools
|
smartmontools
|
||||||
ddrescue
|
ddrescue
|
||||||
] ++ wrapedNixPrograms;
|
] ++ wrappedNixExecutables true
|
||||||
|
++ wrappedNixosExecutables;
|
||||||
|
|
||||||
programs.git.enable = true;
|
programs.git.enable = true;
|
||||||
programs.git.config = {
|
programs.git.config = {
|
||||||
|
|
|
@ -7,7 +7,6 @@
|
||||||
config = {
|
config = {
|
||||||
services.xserver.displayManager.gdm = {
|
services.xserver.displayManager.gdm = {
|
||||||
enable = true;
|
enable = true;
|
||||||
wayland = false;
|
|
||||||
autoSuspend = false;
|
autoSuspend = false;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -12,6 +12,12 @@
|
||||||
powerManagement.enable = true;
|
powerManagement.enable = true;
|
||||||
open = false;
|
open = false;
|
||||||
nvidiaSettings = true;
|
nvidiaSettings = true;
|
||||||
package = config.boot.kernelPackages.nvidiaPackages.stable;
|
package = config.boot.kernelPackages.nvidiaPackages.mkDriver {
|
||||||
|
version = "555.42.02";
|
||||||
|
sha256_64bit = "sha256-k7cI3ZDlKp4mT46jMkLaIrc2YUx1lh1wj/J4SVSHWyk=";
|
||||||
|
settingsSha256 = "sha256-rtDxQjClJ+gyrCLvdZlT56YyHQ4sbaL+d5tL4L4VfkA=";
|
||||||
|
persistencedSha256 = "";
|
||||||
};
|
};
|
||||||
|
};
|
||||||
|
nixpkgs.config.nvidia.acceptLicense = true;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue