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
hosts = builtins.attrNames (builtins.readDir ./machines);
mkHost = name:
nixosSystem {
system = builtins.readFile (./machines + "/${name}/system");
let
system = builtins.readFile (./machines + "/${name}/system");
in nixosSystem {
system = system;
modules = [ (import (./machines + "/${name}")) { device = name; } ];
specialArgs = { inherit inputs; };
specialArgs = { inherit inputs system; };
};
in genAttrs hosts mkHost;

View File

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

View File

@ -1,4 +1,4 @@
{ config, lib, pkgs, inputs, ... }: {
{ config, lib, pkgs, inputs, system, ... }: {
nix = rec {
nixPath = lib.mkForce [ "self=/etc/self/compat" "nixpkgs=/etc/nixpkgs" ];
binaryCaches = [
@ -20,7 +20,7 @@
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 [];
});

View File

@ -46,23 +46,19 @@
# "l" = "ls -lah --group-directories-first";
"rede" = "systemctl --user start 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";
"cat" = "${pkgs.bat}/bin/bat";
"nsp" = "nix-shell --run zsh -p";
"find" = "fd";
"grep" = "rg";
# "find" = "fd";
"grep" = "${pkgs.ripgrep}/bin/rg";
# "mkdir" = "ad";
"man" = "pinfo";
"l" = "exa -lahgF@ --git --group-directories-first";
"tree" = "exa -T";
"ltree" = "exa -lhgFT@ --git";
"atree" = "exa -aT";
"latree" = "exa -lahgFT@ --git";
"gif2webm" = "(){ ${pkgs.ffmpeg.bin}/bin/ffmpeg -i $1 -c:v libvpx-vp9 -crf 20 -b:v 0 $1.webm ;}";
"man" = "${pkgs.pinfo}/bin/pinfo";
"l" = "${pkgs.exa}/bin/exa -lahgF@ --git --group-directories-first";
"tree" = "${pkgs.exa}/bin/exa -T";
"ltree" = "${pkgs.exa}/bin/exa -lhgFT@ --git";
"atree" = "${pkgs.exa}/bin/exa -aT";
"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 ;}";
};
initExtra = ''