some cleanup and fixes

This commit is contained in:
Dmitriy Kholkin 2021-10-25 00:37:34 +03:00
parent acbd919fb9
commit 17be51f44b
4 changed files with 18 additions and 20 deletions

View File

@ -102,10 +102,12 @@
let let
hosts = builtins.attrNames (builtins.readDir ./machines); hosts = builtins.attrNames (builtins.readDir ./machines);
mkHost = name: mkHost = name:
nixosSystem { let
system = builtins.readFile (./machines + "/${name}/system"); system = builtins.readFile (./machines + "/${name}/system");
in nixosSystem {
system = system;
modules = [ (import (./machines + "/${name}")) { device = name; } ]; modules = [ (import (./machines + "/${name}")) { device = name; } ];
specialArgs = { inherit inputs; }; specialArgs = { inherit inputs system; };
}; };
in genAttrs hosts mkHost; in genAttrs hosts mkHost;

View File

@ -5,7 +5,7 @@ with config.deviceSpecific; {
home-manager.users.alukard.home.packages = with pkgs; [ home-manager.users.alukard.home.packages = with pkgs; [
# cli # cli
curl curl
exa # exa
fd fd
ffmpeg.bin ffmpeg.bin
git-filter-repo git-filter-repo
@ -20,7 +20,7 @@ with config.deviceSpecific; {
p7zip p7zip
# (p7zip.override { enableUnfree = true; }) # (p7zip.override { enableUnfree = true; })
pciutils pciutils
pinfo # pinfo
ripgrep ripgrep
ripgrep-all ripgrep-all
samba samba

View File

@ -1,4 +1,4 @@
{ config, lib, pkgs, inputs, ... }: { { config, lib, pkgs, inputs, system, ... }: {
nix = rec { nix = rec {
nixPath = lib.mkForce [ "self=/etc/self/compat" "nixpkgs=/etc/nixpkgs" ]; nixPath = lib.mkForce [ "self=/etc/self/compat" "nixpkgs=/etc/nixpkgs" ];
binaryCaches = [ binaryCaches = [
@ -20,7 +20,7 @@
autoOptimiseStore = false; autoOptimiseStore = false;
package = inputs.nix.packages.x86_64-linux.nix.overrideAttrs (oa: { package = inputs.nix.packages.${system}.nix.overrideAttrs (oa: {
patches = [ ./nix.patch ] ++ oa.patches or []; patches = [ ./nix.patch ] ++ oa.patches or [];
}); });

View File

@ -46,23 +46,19 @@
# "l" = "ls -lah --group-directories-first"; # "l" = "ls -lah --group-directories-first";
"rede" = "systemctl --user start redshift.service &"; "rede" = "systemctl --user start redshift.service &";
"redd" = "systemctl --user stop redshift.service &"; "redd" = "systemctl --user stop redshift.service &";
"bare" = "systemctl --user start barrier-client.service &";
"bard" = "systemctl --user stop barrier-client.service &";
"wgup" = "_ systemctl start wg-quick-wg0.service";
"wgdown" = "_ systemctl stop wg-quick-wg0.service";
"show-packages" = "_ nix-store -q --references /run/current-system/sw"; "show-packages" = "_ nix-store -q --references /run/current-system/sw";
"cat" = "${pkgs.bat}/bin/bat"; "cat" = "${pkgs.bat}/bin/bat";
"nsp" = "nix-shell --run zsh -p"; "nsp" = "nix-shell --run zsh -p";
"find" = "fd"; # "find" = "fd";
"grep" = "rg"; "grep" = "${pkgs.ripgrep}/bin/rg";
# "mkdir" = "ad"; # "mkdir" = "ad";
"man" = "pinfo"; "man" = "${pkgs.pinfo}/bin/pinfo";
"l" = "exa -lahgF@ --git --group-directories-first"; "l" = "${pkgs.exa}/bin/exa -lahgF@ --git --group-directories-first";
"tree" = "exa -T"; "tree" = "${pkgs.exa}/bin/exa -T";
"ltree" = "exa -lhgFT@ --git"; "ltree" = "${pkgs.exa}/bin/exa -lhgFT@ --git";
"atree" = "exa -aT"; "atree" = "${pkgs.exa}/bin/exa -aT";
"latree" = "exa -lahgFT@ --git"; "latree" = "${pkgs.exa}/bin/exa -lahgFT@ --git";
"gif2webm" = "(){ ${pkgs.ffmpeg.bin}/bin/ffmpeg -i $1 -c:v libvpx-vp9 -crf 20 -b:v 0 $1.webm ;}"; # "gif2webm" = "(){ ${pkgs.ffmpeg.bin}/bin/ffmpeg -i $1 -c:v libvpx-vp9 -crf 20 -b:v 0 $1.webm ;}";
}; };
initExtra = '' initExtra = ''