flakes fixes

auto-flake-update
Yorick van Pelt 7 months ago
parent 407905d7dc
commit 0bcc8b3c52
Signed by: yorick
GPG Key ID: A36E70F9DC014A15
  1. 6
      config.nix
  2. 72
      flake.nix
  3. 9
      home-manager/home.nix
  4. 1
      nixos/logical/smithers.nix
  5. 3
      nixos/physical/3950x.nix
  6. 2
      nixos/physical/xps9360.nix
  7. 5
      nixos/roles/default.nix
  8. 23
      nr.fish
  9. 2
      pkgs/default.nix
  10. 4
      repl.nix

@ -1,6 +0,0 @@
{
allowUnfree = true;
# chromium.vaapiSupport = true;
android_sdk.accept_license = true;
overlays = import ./overlays.nix;
}

@ -10,36 +10,48 @@
nixpkgs-stable.url = "github:nixos/nixpkgs/nixos-21.05";
nixos-mailserver.url = "gitlab:simple-nixos-mailserver/nixos-mailserver";
nixos-mailserver.inputs.nixpkgs.follows = "nixpkgs";
};
outputs = inputs@{ nixpkgs, home-manager, nixpkgs-mozilla, emacs-overlay, nixpkgs-wayland, nixpkgs-stable, nixos-hardware, self, ... }: {
overlays.default = [
nixpkgs-wayland.overlay
nixpkgs-mozilla.overlay
emacs-overlay.overlay
(import ./fixups.nix)
(import ./pkgs)
(import ./pkgs/mdr.nix)
(import ./nixos/overlay.nix)
(final: prev: {
stable = nixpkgs-stable.legacyPackages.x86_64-linux;
flake-inputs = inputs;
})
];
legacyPackages.x86_64-linux = import nixpkgs {
config = import ./config.nix;
system = "x86_64-linux";
overlays = self.overlays.default;
};
nixosConfigurations = self.legacyPackages.x86_64-linux.yorick.machine;
homeConfigurations.yorick = home-manager.lib.homeManagerConfiguration {
pkgs = self.legacyPackages.x86_64-linux;
configuration = import ./home-manager/home.nix;
system = "x86_64-linux";
username = "yorick";
stateVersion = "20.09";
homeDirectory = "/home/yorick";
};
packages.x86_64-linux.yorick-home = self.homeConfigurations.yorick.activationPackage;
};
outputs = inputs@{ nixpkgs, home-manager, nixpkgs-mozilla, emacs-overlay
, nixpkgs-wayland, nixpkgs-stable, nixos-hardware, self, ... }: {
overlay = nixpkgs.lib.composeManyExtensions [
nixpkgs-wayland.overlay
#nixpkgs-mozilla.overlay
emacs-overlay.overlay
(import ./fixups.nix)
(import ./pkgs)
(import ./pkgs/mdr.nix)
(final: prev: {
nixpkgs-stable = import nixpkgs-stable {
system = prev.stdenv.system;
config = { };
overlays = [ ];
};
flake-inputs = inputs;
})
(import ./nixos/overlay.nix)
];
legacyPackages.x86_64-linux = import nixpkgs {
config = {
allowUnfree = true;
# chromium.vaapiSupport = true;
android_sdk.accept_license = true;
};
system = "x86_64-linux";
overlays = [ self.overlay ];
};
nixosConfigurations = self.legacyPackages.x86_64-linux.yorick.machine;
homeConfigurations.x86_64-linux =
home-manager.lib.homeManagerConfiguration {
pkgs = self.legacyPackages.x86_64-linux;
configuration = import ./home-manager/home.nix;
system = "x86_64-linux";
username = "yorick";
stateVersion = "20.09";
homeDirectory = "/home/yorick";
};
packages.x86_64-linux.yorick-home =
self.homeConfigurations.x86_64-linux.activationPackage;
};
}

@ -8,6 +8,7 @@ let
in {
imports = [ ./desktop.nix ./emacs.nix ./lumi.nix ];
programs = {
nix-index.enable = true;
starship = {
enable = true;
settings.nix_shell.disabled = false;
@ -111,7 +112,7 @@ in {
enable = true;
historyControl = [ "erasedups" "ignoredups" "ignorespace" ];
shellAliases = {
nr = ''nix repl "<nixpkgs>"'';
nr = ''nix repl "/home/yorick/dotfiles/repl.nix"'';
nsp = "nix-shell -p";
};
initExtra = ''
@ -125,10 +126,10 @@ in {
};
};
xdg.configFile."nixpkgs/config.nix".text = ''
import "${toString ../config.nix}"
throw "tried to read nixpkgs/config.nix"
'';
xdg.configFile."nixpkgs/overlays.nix".text = ''
import "${toString ../overlays.nix}"
throw "tried to read nixpkgs/overlays.nix"
'';
xdg.configFile."streamlink/config".text = ''
player = mpv --cache 2048
@ -285,6 +286,6 @@ in {
recursive = true;
};
home.sessionVariables = {
FLAKE_CONFIG_URI = "/home/yorick/dotfiles#homeConfigurations.yorick";
FLAKE_CONFIG_URI = "/home/yorick/dotfiles#homeConfigurations.${pkgs.stdenv.system}.activationPackage";
};
}

@ -4,6 +4,7 @@
imports = [ ../physical/x11.nix ../roles/workstation.nix ];
yorick.lumi-vpn.enable = lib.mkForce false;
yorick.lumi-cache.enable = lib.mkForce false;
system.stateVersion = "21.05";
}

@ -2,9 +2,8 @@
{
imports = [
./.
inputs.nixos-hardware.nixosModules.common-cpu-amd;
./3950x-hardware-config.nix
"${sources.nixos-hardware}/common/cpu/amd"
inputs.nixos-hardware.nixosModules.common-cpu-amd
];
boot.loader.systemd-boot.enable = true;

@ -1,7 +1,7 @@
{ config, lib, pkgs, inputs, ... }:
{
imports = [
inputs.nixos-hardware.nixosModules.dell-xps-13-9360;
inputs.nixos-hardware.nixosModules.dell-xps-13-9360
./xps9360-hardware-config.nix
];

@ -1,5 +1,5 @@
let secrets = import ../secrets.nix;
in { config, pkgs, lib, name, ... }:
in { config, pkgs, lib, name, inputs, ... }:
let
machine = name;
vpn = import ../vpn.nix;
@ -13,7 +13,8 @@ in {
../services
];
nix.nixPath = [ "nixpkgs=${pkgs.path}" ];
nix.nixPath = [];# "nixpkgs=${pkgs.path}" ];
nix.registry.nixpkgs.flake = inputs.nixpkgs;
networking.domain = "yori.cc";
networking.hostName = machine;

@ -32,28 +32,7 @@ function :u
end
for arg in $argv
set -l out (nix-instantiate --eval --json --expr '
let
tryImport = f: with builtins; let v = import f; in if isFunction v && (any (a: a) (attrValues (functionArgs v))) then v {} else v;
isImportable = path: with builtins; if pathExists "${path}/" then pathExists "${path}/default.nix" else pathExists "${path}";
pathBits = with builtins; map ({ prefix, path }:
if prefix == "" then
let
contents = readDir path;
names = builtins.filter (a: contents.${a} == "directory" && isImportable "${path}/${a}") (attrNames contents);
in
foldl\' (prev: val: prev // { ${val} = tryImport "${path}/${val}"; }) {} names
else
if isImportable path then
{ ${prefix} = tryImport path; }
else
{ }
) nixPath;
out = builtins.foldl\' (old: new: old // new) {} pathBits;
in with out; builtins.toPath ('"$arg"').outPath' | jq -r .)
[ -e $out ] || nix-store -r $out > /dev/null
nix build -L $argv --no-link && set -l out (nix eval --raw $argv)
__nr_apply $out
end
end

@ -4,7 +4,7 @@
ftb = super.callPackage ./ftb.nix {};
# todo: python 2 -> 3
pyroscope = self.stable.callPackage ./pyroscope {};
pyroscope = self.nixpkgs-stable.callPackage ./pyroscope {};
yscripts = super.callPackage ../bin {};
factorio = super.factorio.override {

@ -0,0 +1,4 @@
let flake = builtins.getFlake (toString ./.);
in {
inherit flake;
} // flake.legacyPackages.${builtins.currentSystem} // flake.nixosConfigurations
Loading…
Cancel
Save