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