summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDominique Martinet @ odin <asmadeus@codewreck.org>2021-05-25 23:17:55 +0900
committerDominique Martinet @ odin <asmadeus@codewreck.org>2021-05-25 23:17:55 +0900
commit8fdc6828c8253bf6680fdbf3248d7d27a0c4514b (patch)
tree91b32d04fbb8cfcd78280c0f487c0d17888e9f3f
parentf456ebc6bea6ffe03af0a9a8345a671da58163a2 (diff)
flake: remove package overlay
This lets us use the flake for nix shell/develop /etc/nixos#packagename, which was no longer easily available. It should be possible to readd overlay but this is actually clearer to see which packages are local now so keep it like this
-rw-r--r--default.nix7
-rw-r--r--flake-configuration.nix2
-rw-r--r--flake.nix9
-rw-r--r--modules/services/robinhood-v3.nix4
-rw-r--r--overlays.nix3
-rw-r--r--pkgs/ashuffle/default.nix6
-rw-r--r--pkgs/default.nix52
-rw-r--r--pkgs/edbrowse/default.nix13
-rw-r--r--pkgs/linux/default.nix25
-rw-r--r--profiles/ashuffle.nix5
-rw-r--r--profiles/common.nix1
-rw-r--r--profiles/matrirc.nix4
-rw-r--r--profiles/rmfakecloud.nix2
-rw-r--r--profiles/vaderetro.nix4
14 files changed, 76 insertions, 61 deletions
diff --git a/default.nix b/default.nix
deleted file mode 100644
index 963cc40..0000000
--- a/default.nix
+++ /dev/null
@@ -1,7 +0,0 @@
-{ system ? builtins.currentSystem,
- config ? {},
- overlays ? import ./overlays.nix,
- pkgs ? import <nixpkgs> { inherit system config overlays; }
-}:
-
-pkgs
diff --git a/flake-configuration.nix b/flake-configuration.nix
index 699af9e..0abfd06 100644
--- a/flake-configuration.nix
+++ b/flake-configuration.nix
@@ -1,4 +1,4 @@
-{ hostName, inputs, ... }:
+{ hostName, ... }:
{
system = "x86_64-linux";
modules = [
diff --git a/flake.nix b/flake.nix
index 77bd757..96a35b0 100644
--- a/flake.nix
+++ b/flake.nix
@@ -4,19 +4,20 @@
inputs = {
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
# home-manager.url = "github:nix-community/home-manager";
- nixpkgs-wayland = { url = "github:colemickens/nixpkgs-wayland"; };
+ nixpkgs-wayland.url = "github:colemickens/nixpkgs-wayland";
secrets = { type = "path"; path = "./secrets"; flake = false; };
};
#outputs = { home-manager, nixpkgs, ... }: {
outputs = inputs: let
nixpkgs = inputs.nixpkgs;
- in {
+ in rec {
nixosConfigurations = nixpkgs.lib.genAttrs [ "odin" "jormungand" "ullr" "bragi" ] (hostName:
- let cfg = import ./flake-configuration.nix { inherit inputs hostName; };
+ let cfg = import ./flake-configuration.nix { inherit hostName; };
in import (nixpkgs + "/nixos/lib/eval-config.nix") (cfg // {
extraArgs = {
inherit inputs;
+ localpkgs = packages.x86_64-linux;
} // (cfg.extraArgs or {});
modules = cfg.modules ++ [
({pkgs, ...}: {
@@ -24,5 +25,7 @@
})
];
}));
+
+ packages.x86_64-linux = import pkgs/default.nix { pkgs = nixpkgs; };
};
}
diff --git a/modules/services/robinhood-v3.nix b/modules/services/robinhood-v3.nix
index 530d251..2799918 100644
--- a/modules/services/robinhood-v3.nix
+++ b/modules/services/robinhood-v3.nix
@@ -1,4 +1,4 @@
-{ config, lib, pkgs, ... }:
+{ config, lib, localpkgs, pkgs, ... }:
with lib;
@@ -78,7 +78,7 @@ in {
config = mkIf (cfg.configs != {}) {
- environment.systemPackages = [ pkgs.robinhood-v3 ];
+ environment.systemPackages = [ localpkgs.robinhood-v3 ];
systemd.targets.robinhood = {
description = "Convenience target to manage all robinhood instances";
diff --git a/overlays.nix b/overlays.nix
deleted file mode 100644
index 7d968e8..0000000
--- a/overlays.nix
+++ /dev/null
@@ -1,3 +0,0 @@
-[
- ( import ./pkgs/default.nix )
-]
diff --git a/pkgs/ashuffle/default.nix b/pkgs/ashuffle/default.nix
index 24b9cdb..86038fc 100644
--- a/pkgs/ashuffle/default.nix
+++ b/pkgs/ashuffle/default.nix
@@ -2,15 +2,15 @@
stdenv.mkDerivation rec {
pname = "ashuffle";
- version = "v3.1.0";
+ version = "v3.11.1+";
src = fetchFromGitHub {
# note upstream owner is joshkunz
# using my own repo because I kludged playlist trimming in
owner = "martinetd";
repo = "ashuffle";
- rev = "0623d75530b2fe580e066e0dd918b874543964a8";
- sha256 = "1hww4r2643w2mrdmcszp9vzc1lr0lhzsbzyj071n9xqiqhk5mxpi";
+ rev = "ed942518d99a50d10341ae72cd31835f7b619b01";
+ sha256 = "sha256-7ZYneRUAB8Q6nRlrjUMiA2bW0QiVLE9amopk0FX8sHk=";
};
nativeBuildInputs = [ meson git cmake pkgconfig ninja ];
diff --git a/pkgs/default.nix b/pkgs/default.nix
index 2b378ff..09cb49b 100644
--- a/pkgs/default.nix
+++ b/pkgs/default.nix
@@ -1,49 +1,35 @@
-self: super: {
+{ pkgs, ... }:
- ashuffle = super.callPackage ./ashuffle { };
+with import pkgs { system = "x86_64-linux"; }; rec {
+
+ ashuffle = callPackage ./ashuffle { inherit abseil-cpp-17; };
# absl for ashuffle
- abseil-cpp-17 = super.abseil-cpp.overrideAttrs (oldAttrs: rec {
+ abseil-cpp-17 = abseil-cpp.overrideAttrs (oldAttrs: rec {
pname = "abseil-cpp-17";
cmakeFlags = "-DCMAKE_CXX_STANDARD=17";
-
- # version in master, remove once up to date
- date = "20191119";
- rev = "8ba96a8244bbe334d09542e92d566673a65c1f78";
- version = "${date}-${rev}";
- src = super.fetchFromGitHub {
- owner = "abseil";
- repo = "abseil-cpp";
- rev = rev;
- sha256 = "089bvlspgdgi40fham20qy1m97gr1jh5k5czz49dincpd18j6inb";
- };
});
# more up to date package, from master branch
# now up to date, but leave because want to update again
- # cryptpad = super.callPackage ./cryptpad { };
-
- elfutils-old = super.elfutils.overrideAttrs (oldAttrs: rec {
- name = "elfutils";
- version = "0.174";
- NIX_CFLAGS_COMPILE = "-Wno-missing-attributes";
- src = super.fetchurl {
- url = "https://sourceware.org/elfutils/ftp/${version}/${name}-${version}.tar.bz2";
- sha256 = "12nhr8zrw4sjzrvpf38vl55bq5nm05qkd7nq76as443f0xq7xwnd";
- };
- });
+ # cryptpad = callPackage ./cryptpad { };
+
+ ganesha = callPackage ./ganesha { };
+
+ matrirc = callPackage ./matrirc { };
- ganesha = super.callPackage ./ganesha { };
+ robinhood-v3 = callPackage ./robinhood-v3 { };
- matrirc = super.callPackage ./matrirc { };
+ robinhood = callPackage ./robinhood { };
+ rbh-find = callPackage ./rbh-find { };
+ rbh-sync = callPackage ./rbh-sync { };
- robinhood-v3 = super.callPackage ./robinhood-v3 { };
+ rmfakecloud = callPackage ./rmfakecloud { };
- robinhood = super.callPackage ./robinhood { };
- rbh-find = super.callPackage ./rbh-find { };
- rbh-sync = super.callPackage ./rbh-sync { };
+ vaderetro = callPackage ./vaderetro { };
- rmfakecloud = super.callPackage ./rmfakecloud { };
- vaderetro = super.callPackage ./vaderetro { };
+ # below are dev fake-packages for nix develop
+ edbrowse = callPackage ./edbrowse { };
+ linux = callPackage ./linux { };
}
diff --git a/pkgs/edbrowse/default.nix b/pkgs/edbrowse/default.nix
new file mode 100644
index 0000000..8a77425
--- /dev/null
+++ b/pkgs/edbrowse/default.nix
@@ -0,0 +1,13 @@
+{ stdenv,
+perl, pkg-config, curl, html-tidy, pcre, quickjs, readline, openssl,
+}:
+
+stdenv.mkDerivation {
+ name = "edbrowse";
+ src = null;
+
+
+ nativeBuildInputs = [ perl pkg-config ];
+ # + sometimes duktape
+ buildInputs = [ curl html-tidy pcre quickjs readline openssl ];
+}
diff --git a/pkgs/linux/default.nix b/pkgs/linux/default.nix
new file mode 100644
index 0000000..b74f9b5
--- /dev/null
+++ b/pkgs/linux/default.nix
@@ -0,0 +1,25 @@
+{ stdenv,
+perl, gmp, libmpc, mpfr, bison, flex, ncurses, pkg-config, bc,
+gcc, zstd, elfutils, zlib, python3, pahole, lz4, gdb,
+}:
+
+stdenv.mkDerivation {
+ name = "linux";
+ src = null;
+
+ buildInputs = [
+ # linux build itself
+ perl gmp libmpc mpfr bison flex ncurses pkg-config bc
+ gcc zstd elfutils
+ # btf
+ zlib python3 pahole
+ # initrd stuff
+ lz4 # pkgsStatic.busybox dropbear
+ # debug
+ gdb
+ ];
+
+ shellHook = ''
+ export HISTFILE="$HOME/.bash_history.linux"
+ '';
+}
diff --git a/profiles/ashuffle.nix b/profiles/ashuffle.nix
index 7d77502..234ef10 100644
--- a/profiles/ashuffle.nix
+++ b/profiles/ashuffle.nix
@@ -1,13 +1,12 @@
-{ config, pkgs, ... }:
+{ config, localpkgs, ... }:
{
systemd.services.ashuffle = {
description = "Automagically adds songs";
- path = [ pkgs.ashuffle ];
after = [ "mpd.service" ];
serviceConfig = {
Type = "simple";
- ExecStart = "${pkgs.ashuffle}/bin/ashuffle --host 127.0.0.1 --queue-buffer 1 -e album drama -e title instrumental -e title 'off vocal'";
+ ExecStart = "${localpkgs.ashuffle}/bin/ashuffle --host 127.0.0.1 --queue-buffer 1 -e album drama -e title instrumental -e title 'off vocal'";
Restart = "always";
User = "nobody";
};
diff --git a/profiles/common.nix b/profiles/common.nix
index a0a3132..7f4343b 100644
--- a/profiles/common.nix
+++ b/profiles/common.nix
@@ -2,7 +2,6 @@
{
nix.useSandbox = true;
- nixpkgs.overlays = import ../overlays.nix;
nix.nixPath =
options.nix.nixPath.default ++
[ "nixpkgs-overlays=/etc/nixos/overlays.nix" ];
diff --git a/profiles/matrirc.nix b/profiles/matrirc.nix
index 9488a2d..7a8b84b 100644
--- a/profiles/matrirc.nix
+++ b/profiles/matrirc.nix
@@ -1,4 +1,4 @@
-{ config, pkgs, ... }:
+{ config, localpkgs, ... }:
{
users.users.matrirc.isSystemUser = true;
@@ -12,7 +12,7 @@
User = "matrirc";
EnvironmentFile = "/etc/nixos/secrets/matrirc";
StateDirectory = "matrirc";
- ExecStart = "${pkgs.matrirc}/bin/matrirc";
+ ExecStart = "${localpkgs.matrirc}/bin/matrirc";
Restart = "always";
NoNewPrivileges = "yes";
};
diff --git a/profiles/rmfakecloud.nix b/profiles/rmfakecloud.nix
index ef7a455..1643bcb 100644
--- a/profiles/rmfakecloud.nix
+++ b/profiles/rmfakecloud.nix
@@ -18,7 +18,7 @@ in {
"RM_SMTP_INSECURE_TLS=true"
jwt_key
];
- #ExecStart = "${pkgs.rmfakecloud}/bin/rmfakecloud";
+ #ExecStart = "${localpkgs.rmfakecloud}/bin/rmfakecloud";
# dev cycle -- use local binary
ExecStart = "/rmfakecloud";
BindReadOnlyPaths = [ "/home/asmadeus/rmfakecloud/dist/rmfakecloud-x64:/rmfakecloud" "${pkgs.glibc}" ];
diff --git a/profiles/vaderetro.nix b/profiles/vaderetro.nix
index 5da08cc..b6343e5 100644
--- a/profiles/vaderetro.nix
+++ b/profiles/vaderetro.nix
@@ -1,4 +1,4 @@
-{ config, pkgs, ... }:
+{ config, localpkgs, ... }:
{
imports = [ ./tor.nix ];
@@ -14,7 +14,7 @@
Type = "simple";
User = "nobody";
Environment = "RUST_LOG=vr=info";
- ExecStart = "${pkgs.vaderetro}/bin/vr";
+ ExecStart = "${localpkgs.vaderetro}/bin/vr";
Restart = "always";
NoNewPrivileges = "yes";
};