stuff
This commit is contained in:
parent
d29cb12bcf
commit
7395765b09
13
flake.nix
13
flake.nix
@ -13,18 +13,23 @@
|
||||
};
|
||||
|
||||
outputs = inputs: let
|
||||
lib = (import ./lib inputs.nixos.lib).extend (_: lib: rec {
|
||||
lib = inputs.nixos.lib.extend (_: _: builtins);
|
||||
tlib = (import ./lib lib).extend (_: prev: rec {
|
||||
makePkgs = system:
|
||||
import ./pkgs-set {
|
||||
inherit system lib;
|
||||
tlib = prev;
|
||||
stable = inputs.nixos;
|
||||
unstable = inputs.latest;
|
||||
};
|
||||
genPkgs = f: lib.genSystems (system: f (makePkgs system));
|
||||
genPkgs = f: prev.genSystems (system: f (makePkgs system));
|
||||
});
|
||||
in rec {
|
||||
nixosConfigurations = import ./hosts {inherit lib inputs;};
|
||||
devShells = import ./shells {inherit lib inputs;};
|
||||
nixosConfigurations = import ./hosts {inherit lib tlib inputs;};
|
||||
|
||||
packages = tlib.genPkgs (pkgs: pkgs._exported);
|
||||
|
||||
devShells = import ./shells {inherit lib tlib inputs;};
|
||||
devShell = lib.mapAttrs (_: value: value.default) devShells;
|
||||
};
|
||||
}
|
||||
|
@ -1,6 +1,8 @@
|
||||
{
|
||||
inputs,
|
||||
lib,
|
||||
tlib,
|
||||
...
|
||||
}: let
|
||||
baseModules = [
|
||||
../modules
|
||||
@ -10,25 +12,21 @@
|
||||
];
|
||||
|
||||
mkSystem = name: system: let
|
||||
pkgs = lib.makePkgs system;
|
||||
pkgs = tlib.makePkgs system;
|
||||
in
|
||||
lib.nixosSystem {
|
||||
inherit system;
|
||||
modules =
|
||||
baseModules
|
||||
++ [
|
||||
{
|
||||
nixpkgs = {
|
||||
inherit pkgs;
|
||||
};
|
||||
}
|
||||
{nixpkgs.pkgs = pkgs;}
|
||||
(import (./. + "/${name}/default.nix"))
|
||||
];
|
||||
specialArgs = {
|
||||
inherit inputs;
|
||||
tlib = lib;
|
||||
specialArgs = {inherit inputs tlib;};
|
||||
};
|
||||
|
||||
systems = {
|
||||
lungmen = "x86_64-linux";
|
||||
};
|
||||
in {
|
||||
lungmen = mkSystem "lungmen" "x86_64-linux";
|
||||
}
|
||||
in
|
||||
lib.mapAttrs mkSystem systems
|
||||
|
@ -176,7 +176,7 @@ in {
|
||||
};
|
||||
|
||||
environment = {
|
||||
systemPackages = [btrfsDiff];
|
||||
systemPackages = [btrfsDiff pkgs.ntfs3g];
|
||||
pathsToLink = ["/share/zsh"];
|
||||
persistence."/persist" = {
|
||||
directories = ["/etc/nixos"];
|
||||
|
@ -1,7 +1,7 @@
|
||||
lib:
|
||||
(lib.extend (_: _: builtins)).extend (_: lib: rec {
|
||||
lib.makeExtensible (self: {
|
||||
defaultSystems = import ./systems.nix;
|
||||
genSystems = lib.genAttrs defaultSystems;
|
||||
genSystems = lib.genAttrs self.defaultSystems;
|
||||
|
||||
pkgBin = pkgs: id:
|
||||
if lib.isString id
|
||||
|
@ -48,7 +48,6 @@ in {
|
||||
git
|
||||
lm_sensors
|
||||
mkpasswd
|
||||
ntfs3g
|
||||
zoxide
|
||||
bottom
|
||||
amber
|
||||
|
@ -3,6 +3,7 @@
|
||||
unstable,
|
||||
system,
|
||||
lib,
|
||||
...
|
||||
}: let
|
||||
overlays =
|
||||
lib.mapAttrsToList
|
||||
@ -17,5 +18,9 @@
|
||||
config.allowUnfree = true;
|
||||
overlays = [(_: _: import ./from-unstable.nix unstablePkgs)] ++ overlays;
|
||||
};
|
||||
pkgsToExport = import ./pkgs-to-export.nix;
|
||||
in
|
||||
pkgs
|
||||
// {
|
||||
_exported = lib.getAttrs pkgsToExport pkgs;
|
||||
}
|
||||
|
1
pkgs-set/pkgs-to-export.nix
Normal file
1
pkgs-set/pkgs-to-export.nix
Normal file
@ -0,0 +1 @@
|
||||
[]
|
@ -1,9 +1,9 @@
|
||||
{lib, ...}:
|
||||
lib.genPkgs (pkgs: {
|
||||
{tlib, ...}:
|
||||
tlib.genPkgs (pkgs: {
|
||||
default = with pkgs;
|
||||
mkShell {
|
||||
name = "prts";
|
||||
buildInputs = [git git-crypt];
|
||||
buildInputs = [git git-crypt alejandra helix];
|
||||
shellHook = "echo \"$(tput bold)welcome to PRTS, $USER$(tput sgr0)\"";
|
||||
};
|
||||
})
|
||||
|
@ -87,9 +87,8 @@ in {
|
||||
};
|
||||
};
|
||||
};
|
||||
systemd.user.services.gnome-session-restart-dbus.serviceConfig = {Slice = "-.slice";};
|
||||
systemd = {
|
||||
targets = {network-online.enable = false;};
|
||||
targets.network-online.enable = false;
|
||||
services = {
|
||||
systemd-networkd-wait-online.enable = false;
|
||||
NetworkManager-wait-online.enable = false;
|
||||
@ -223,7 +222,7 @@ in {
|
||||
};
|
||||
fonts = [fontComb];
|
||||
extraEnv = ''
|
||||
export SDL_VIDEODRIVER=wayland
|
||||
# export SDL_VIDEODRIVER=wayland
|
||||
# needs qt5.qtwayland in systemPackages
|
||||
export QT_QPA_PLATFORM=wayland
|
||||
#export QT_WAYLAND_DISABLE_WINDOWDECORATION="1"
|
||||
@ -529,11 +528,11 @@ in {
|
||||
export SSH_AUTH_SOCK=$(gpgconf --list-dirs agent-ssh-socket)
|
||||
|
||||
function tomp4 () {
|
||||
${pkgs.ffmpeg}/bin/ffmpeg -i $1 -c:v libx264 -preset slow -crf 30 -c:a aac -b:a 128k "$1.mp4"
|
||||
${pkgBin "ffmpeg"} -i $1 -c:v libx264 -preset slow -crf 30 -c:a aac -b:a 128k "$1.mp4"
|
||||
}
|
||||
|
||||
function topng () {
|
||||
${pkgs.ffmpeg}/bin/ffmpeg -i $1 "$1.png"
|
||||
${pkgBin "ffmpeg"} -i $1 "$1.png"
|
||||
}
|
||||
|
||||
bindkey "$terminfo[kRIT5]" forward-word
|
||||
@ -546,7 +545,7 @@ in {
|
||||
nixosConfig.environment.shellAliases
|
||||
// {
|
||||
harmony-ssh = ''
|
||||
${pkgs.mosh}/bin/mosh root@chat.harmonyapp.io
|
||||
${pkgBin "mosh"} root@chat.harmonyapp.io
|
||||
'';
|
||||
};
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user