diff options
author | Vincent Ambo <mail@tazj.in> | 2021-04-10T16·05+0200 |
---|---|---|
committer | tazjin <mail@tazj.in> | 2021-04-10T21·18+0000 |
commit | 473604f5675c455a65b91e287b125a9e042ae39f (patch) | |
tree | 9d1255ea0a01396136ced032ba3f1fc5a46967cb /users/tazjin/nixos | |
parent | a83abc902456cbdfcf31497c9c788fd9daf66109 (diff) |
refactor: Move nixpkgs attribute to `third_party.nixpkgs` r/2470
Please read b/108 to make sense of this. This gets rid of the explicit list of exposed packages from nixpkgs, and instead makes the entire package set available at `third_party.nixpkgs`. To accommodate this, a LOT of things have to be very slightly shuffled around. Some of this was done in already submitted CLs, but this change is unfortunately still quite noisy. Pay extra attention to: * overlay-like functionality that was partially moved to actual overlays (partially as in, the minimum required to get a green build) * modified uses of the package set path, esp. in NixOS systems Special notes: * xanthous has been disabled in CI because of issues with the Haskell overlay * //third_party/nix has been disabled because of other unclear dependency issues Both of these will be tackled in a followup CL. Change-Id: I2f9c60a4d275fdb5209264be0addfd7e06c53118 Reviewed-on: https://cl.tvl.fyi/c/depot/+/2910 Reviewed-by: glittershark <grfn@gws.fyi> Reviewed-by: sterni <sternenseemann@systemli.org> Tested-by: BuildkiteCI
Diffstat (limited to 'users/tazjin/nixos')
-rw-r--r-- | users/tazjin/nixos/camden/default.nix | 5 | ||||
-rw-r--r-- | users/tazjin/nixos/frog/default.nix | 37 | ||||
-rw-r--r-- | users/tazjin/nixos/tverskoy/default.nix | 12 |
3 files changed, 25 insertions, 29 deletions
diff --git a/users/tazjin/nixos/camden/default.nix b/users/tazjin/nixos/camden/default.nix index d5a9d61bda2f..f334320b381b 100644 --- a/users/tazjin/nixos/camden/default.nix +++ b/users/tazjin/nixos/camden/default.nix @@ -2,7 +2,7 @@ { depot, pkgs, lib, ... }: config: let - nixpkgs = import depot.third_party.nixpkgsSrc { + nixpkgs = import pkgs.path { config.allowUnfree = true; }; @@ -85,7 +85,7 @@ in lib.fix(self: { nixPath = [ "depot=/home/tazjin/depot" - "nixpkgs=${depot.third_party.nixpkgsSrc}" + "nixpkgs=${pkgs.path}" ]; trustedUsers = [ "root" "tazjin" ]; @@ -131,7 +131,6 @@ in lib.fix(self: { (with depot; [ fun.idual.script fun.idual.setAlarm - third_party.pounce ]) ++ # programs from nixpkgs diff --git a/users/tazjin/nixos/frog/default.nix b/users/tazjin/nixos/frog/default.nix index dcc955f96811..35d58147d48f 100644 --- a/users/tazjin/nixos/frog/default.nix +++ b/users/tazjin/nixos/frog/default.nix @@ -1,23 +1,20 @@ -{ depot, lib, ... }: +{ depot, lib, pkgs, ... }: config: let inherit (depot.third_party) lieer; - nixpkgs = import depot.third_party.nixpkgsSrc { - config.allowUnfree = true; - }; # add google-c-style here because other machines get it from, eh, # elsewhere. frogEmacs = (depot.users.tazjin.emacs.overrideEmacs(epkgs: epkgs ++ [ - depot.third_party.emacsPackages.google-c-style + pkgs.emacsPackages.google-c-style ])); - quasselClient = depot.third_party.quassel.override { + quasselClient = pkgs.quassel.override { client = true; enableDaemon = false; monolithic = false; }; -in depot.lib.fix(self: { +in lib.fix(self: { imports = [ "${depot.depotPath}/ops/nixos/v4l2loopback.nix" ]; @@ -37,7 +34,7 @@ in depot.lib.fix(self: { kernelModules = [ "dm-snapshot" ]; }; - kernelPackages = nixpkgs.linuxPackages_latest; + kernelPackages = pkgs.linuxPackages_latest; kernel.sysctl = { "kernel.perf_event_paranoid" = -1; }; @@ -58,7 +55,7 @@ in depot.lib.fix(self: { pulseaudio = { enable = true; - package = nixpkgs.pulseaudioFull; + package = pkgs.pulseaudioFull; }; bluetooth = { @@ -70,14 +67,14 @@ in depot.lib.fix(self: { maxJobs = 48; nixPath = [ "depot=/depot" - "nixpkgs=${depot.third_party.nixpkgsSrc}" + "nixpkgs=${pkgs.path}" ]; binaryCaches = ["ssh://nix-ssh@whitby.tvl.fyi"]; binaryCachePublicKeys = ["cache.tvl.fyi:fd+9d1ceCPvDX/xVhcfv8nAa6njEhAGAEe+oGJDEeoc="]; }; - nixpkgs.pkgs = nixpkgs; + nixpkgs.pkgs = pkgs; networking = { hostName = "frog"; @@ -95,7 +92,7 @@ in depot.lib.fix(self: { # Generate an immutable /etc/resolv.conf from the nameserver settings # above (otherwise DHCP overwrites it): environment.etc."resolv.conf" = with lib; { - source = depot.third_party.writeText "resolv.conf" '' + source = pkgs.writeText "resolv.conf" '' ${concatStringsSep "\n" (map (ns: "nameserver ${ns}") self.networking.nameservers)} options edns0 ''; @@ -114,7 +111,7 @@ in depot.lib.fix(self: { extraGroups = [ "wheel" "audio" "docker" ]; isNormalUser = true; uid = 1000; - shell = nixpkgs.fish; + shell = pkgs.fish; }; security.sudo = { @@ -123,7 +120,7 @@ in depot.lib.fix(self: { }; fonts = { - fonts = with nixpkgs; [ + fonts = with pkgs; [ corefonts dejavu_fonts jetbrains-mono @@ -158,7 +155,7 @@ in depot.lib.fix(self: { # Required for Yubikey usage as smartcard services.pcscd.enable = true; services.udev.packages = [ - nixpkgs.yubikey-personalization + pkgs.yubikey-personalization ]; # Enable Docker for Nixery testing @@ -175,7 +172,7 @@ in depot.lib.fix(self: { videoDrivers = [ "amdgpu" ]; displayManager = { # Give EXWM permission to control the session. - sessionCommands = "${nixpkgs.xorg.xhost}/bin/xhost +SI:localuser:$USER"; + sessionCommands = "${pkgs.xorg.xhost}/bin/xhost +SI:localuser:$USER"; lightdm.enable = true; lightdm.greeters.gtk.clock-format = "%H·%M"; # TODO(tazjin): TZ? @@ -224,15 +221,12 @@ in depot.lib.fix(self: { lieer ops.kontemplate quasselClient - third_party.ffmpeg third_party.git - third_party.lutris - third_party.rr tools.nsfv-setup ]) ++ # programs from nixpkgs - (with nixpkgs; [ + (with pkgs; [ age bat chromium @@ -245,6 +239,7 @@ in depot.lib.fix(self: { emacs27 # mostly for emacsclient exa fd + ffmpeg-full file gdb gnupg @@ -259,6 +254,7 @@ in depot.lib.fix(self: { jq kubectl linuxPackages.perf + # lutris manpages miller msmtp @@ -276,6 +272,7 @@ in depot.lib.fix(self: { pmutils pwgen ripgrep + rr rustup screen scrot diff --git a/users/tazjin/nixos/tverskoy/default.nix b/users/tazjin/nixos/tverskoy/default.nix index 42fd01c30e96..c2694bf5eb03 100644 --- a/users/tazjin/nixos/tverskoy/default.nix +++ b/users/tazjin/nixos/tverskoy/default.nix @@ -1,17 +1,17 @@ -{ depot, lib, ... }: +{ depot, lib, pkgs, ... }: config: let # add google-c-style here because other machines get it from, eh, # elsewhere. emacs = (depot.users.tazjin.emacs.overrideEmacs(epkgs: epkgs ++ [ - depot.third_party.emacsPackages.google-c-style + pkgs.emacsPackages.google-c-style ])); - nixpkgs = import depot.third_party.nixpkgsSrc { + nixpkgs = import pkgs.path { config.allowUnfree = true; }; - quasselClient = depot.third_party.quassel.override { + quasselClient = pkgs.quassel.override { client = true; enableDaemon = false; monolithic = false; @@ -33,8 +33,8 @@ in lib.fix(self: { nix = { nixPath = lib.mkForce [ - "nixpkgs=${depot.third_party.nixpkgsSrc}" - "nixos=${depot.third_party.nixpkgsSrc}" + "nixpkgs=${pkgs.path}" + "nixos=${pkgs.path}" "depot=/depot" ]; |