chore: format

This commit is contained in:
Mr Hedgehog 2022-01-29 13:43:43 -05:00
parent c913d70934
commit 3dbe42d360
No known key found for this signature in database
GPG key ID: A5F69F6C161FDA7E
30 changed files with 372 additions and 412 deletions

View file

@ -3,27 +3,20 @@ let
default = (import ./lib/compat).defaultNix;
ciSystems = [
"x86_64-linux"
];
ciSystems = [ "x86_64-linux" ];
filterSystems = lib.filterAttrs
(system: _: lib.elem system ciSystems);
filterSystems = lib.filterAttrs (system: _: lib.elem system ciSystems);
recurseIntoAttrsRecursive = lib.mapAttrs (_: v:
if lib.isAttrs v
then recurseIntoAttrsRecursive (lib.recurseIntoAttrs v)
else v
);
if lib.isAttrs v then
recurseIntoAttrsRecursive (lib.recurseIntoAttrs v)
else
v);
systemOutputs = lib.filterAttrs
(name: set: lib.isAttrs set
&& lib.any
(system: set ? ${system} && name != "legacyPackages")
ciSystems
)
systemOutputs = lib.filterAttrs (name: set:
lib.isAttrs set
&& lib.any (system: set ? ${system} && name != "legacyPackages") ciSystems)
default.outputs;
ciDrvs = lib.mapAttrs (_: system: filterSystems system) systemOutputs;
in
(recurseIntoAttrsRecursive ciDrvs) // { shell = import ./shell.nix; }
in (recurseIntoAttrsRecursive ciDrvs) // { shell = import ./shell.nix; }

269
flake.nix
View file

@ -2,179 +2,156 @@
description = "A highly structured configuration database.";
nixConfig.extra-experimental-features = "nix-command flakes";
nixConfig.extra-substituters = "https://nrdxp.cachix.org https://nix-community.cachix.org";
nixConfig.extra-trusted-public-keys = "nrdxp.cachix.org-1:Fc5PSqY2Jm1TrWfm88l6cvGWwz3s93c6IOifQWnhNW4= nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs=";
nixConfig.extra-substituters =
"https://nrdxp.cachix.org https://nix-community.cachix.org";
nixConfig.extra-trusted-public-keys =
"nrdxp.cachix.org-1:Fc5PSqY2Jm1TrWfm88l6cvGWwz3s93c6IOifQWnhNW4= nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs=";
inputs =
{
nixos.url = "github:nixos/nixpkgs/release-21.11";
latest.url = "github:nixos/nixpkgs/nixos-unstable";
nixpkgs.url = "github:nixos/nixpkgs/nixpkgs-unstable";
nixos-hardware.url = "github:nixos/nixos-hardware";
inputs = {
nixos.url = "github:nixos/nixpkgs/release-21.11";
latest.url = "github:nixos/nixpkgs/nixos-unstable";
nixpkgs.url = "github:nixos/nixpkgs/nixpkgs-unstable";
nixos-hardware.url = "github:nixos/nixos-hardware";
agenix.url = "github:ryantm/agenix";
agenix.inputs.nixpkgs.follows = "nixpkgs";
agenix.url = "github:ryantm/agenix";
agenix.inputs.nixpkgs.follows = "nixpkgs";
alejandra.url = "github:kamadorueda/alejandra";
alejandra.inputs.nixpkgs.follows = "nixpkgs";
alejandra.url = "github:kamadorueda/alejandra";
alejandra.inputs.nixpkgs.follows = "nixpkgs";
bud.url = "github:divnix/bud";
bud.inputs.nixpkgs.follows = "nixpkgs";
bud.inputs.devshell.follows = "digga/devshell";
bud.url = "github:divnix/bud";
bud.inputs.nixpkgs.follows = "nixpkgs";
bud.inputs.devshell.follows = "digga/devshell";
deploy.url = "github:input-output-hk/deploy-rs";
deploy.inputs.nixpkgs.follows = "nixpkgs";
deploy.url = "github:input-output-hk/deploy-rs";
deploy.inputs.nixpkgs.follows = "nixpkgs";
digga.url = "github:divnix/digga";
digga.inputs.nixpkgs.follows = "nixpkgs";
digga.inputs.nixlib.follows = "nixpkgs";
digga.inputs.home-manager.follows = "home";
digga.inputs.deploy.follows = "deploy";
digga.url = "github:divnix/digga";
digga.inputs.nixpkgs.follows = "nixpkgs";
digga.inputs.nixlib.follows = "nixpkgs";
digga.inputs.home-manager.follows = "home";
digga.inputs.deploy.follows = "deploy";
emacs.url = "github:nix-community/emacs-overlay";
emacs.inputs.nixpkgs.follows = "nixpkgs";
emacs.url = "github:nix-community/emacs-overlay";
emacs.inputs.nixpkgs.follows = "nixpkgs";
fenix.url = "github:nix-community/fenix";
fenix.inputs.nixpkgs.follows = "nixpkgs";
fenix.url = "github:nix-community/fenix";
fenix.inputs.nixpkgs.follows = "nixpkgs";
home.url = "github:nix-community/home-manager";
home.inputs.nixpkgs.follows = "nixpkgs";
home.url = "github:nix-community/home-manager";
home.inputs.nixpkgs.follows = "nixpkgs";
naersk.url = "github:nmattia/naersk";
naersk.inputs.nixpkgs.follows = "nixpkgs";
naersk.url = "github:nmattia/naersk";
naersk.inputs.nixpkgs.follows = "nixpkgs";
neovim.url = "github:nix-community/neovim-nightly-overlay";
neovim.inputs.nixpkgs.follows = "nixpkgs";
neovim.url = "github:nix-community/neovim-nightly-overlay";
neovim.inputs.nixpkgs.follows = "nixpkgs";
nur.url = "github:nix-community/NUR";
nur.inputs.nixpkgs.follows = "nixpkgs";
nur.url = "github:nix-community/NUR";
nur.inputs.nixpkgs.follows = "nixpkgs";
nvfetcher.url = "github:berberman/nvfetcher";
nvfetcher.inputs.nixpkgs.follows = "nixpkgs";
nvfetcher.url = "github:berberman/nvfetcher";
nvfetcher.inputs.nixpkgs.follows = "nixpkgs";
statix.url = "github:nerdypepper/statix";
statix.inputs.nixpkgs.follows = "nixpkgs";
statix.url = "github:nerdypepper/statix";
statix.inputs.nixpkgs.follows = "nixpkgs";
wayland.url = "github:nix-community/nixpkgs-wayland";
wayland.inputs.nixpkgs.follows = "nixpkgs";
};
wayland.url = "github:nix-community/nixpkgs-wayland";
wayland.inputs.nixpkgs.follows = "nixpkgs";
};
outputs =
{ self
, nixos
, nixos-hardware
, agenix
, bud
, deploy
, digga
, emacs
, fenix
, home
, neovim
, nur
, nvfetcher
, wayland
, ...
} @ inputs:
digga.lib.mkFlake
{
inherit self inputs;
outputs = { self, nixos, nixos-hardware, agenix, bud, deploy, digga, emacs
, fenix, home, neovim, nur, nvfetcher, wayland, ... }@inputs:
digga.lib.mkFlake {
inherit self inputs;
channelsConfig = { allowUnfree = true; };
channels = {
nixos = {
imports = [ (digga.lib.importOverlays ./overlays) ];
overlays = [
./pkgs/default.nix
];
};
latest = { };
nixpkgs = {
imports = [ (digga.lib.importOverlays ./overlays) ];
overlays = [
./pkgs/default.nix
];
};
};
lib = import ./lib { lib = digga.lib // nixos.lib; };
sharedOverlays = [
(final: prev: {
__dontExport = true;
lib = prev.lib.extend (lfinal: lprev: {
our = self.lib;
});
})
agenix.overlay
emacs.overlay
fenix.overlay
neovim.overlay
nur.overlay
nvfetcher.overlay
];
channelsConfig = { allowUnfree = true; };
channels = {
nixos = {
hostDefaults = {
system = "x86_64-linux";
channelName = "nixpkgs";
imports = [ (digga.lib.importExportableModules ./modules) ];
modules = [
{ lib.our = self.lib; }
digga.nixosModules.bootstrapIso
digga.nixosModules.nixConfig
home.nixosModules.home-manager
agenix.nixosModules.age
bud.nixosModules.bud
];
};
imports = [ (digga.lib.importOverlays ./overlays) ];
overlays = [ ./pkgs/default.nix ];
};
latest = { };
imports = [ (digga.lib.importHosts ./hosts) ];
hosts = {
/* set host specific properties here */
NixOS = { };
};
importables = rec {
profiles = digga.lib.rakeLeaves ./profiles // {
users = digga.lib.rakeLeaves ./users;
};
suites = with profiles; rec {
base = [ core users.mrhedgehog users.root ];
};
};
nixpkgs = {
imports = [ (digga.lib.importOverlays ./overlays) ];
overlays = [ ./pkgs/default.nix ];
};
};
lib = import ./lib { lib = digga.lib // nixos.lib; };
sharedOverlays = [
(final: prev: {
__dontExport = true;
lib = prev.lib.extend (lfinal: lprev: { our = self.lib; });
})
agenix.overlay
emacs.overlay
fenix.overlay
neovim.overlay
nur.overlay
nvfetcher.overlay
];
nixos = {
hostDefaults = {
system = "x86_64-linux";
channelName = "nixpkgs";
imports = [ (digga.lib.importExportableModules ./modules) ];
modules = [
{ lib.our = self.lib; }
digga.nixosModules.bootstrapIso
digga.nixosModules.nixConfig
home.nixosModules.home-manager
agenix.nixosModules.age
bud.nixosModules.bud
];
};
home = {
imports = [ (digga.lib.importExportableModules ./users/modules) ];
modules = [ ];
importables = rec {
profiles = digga.lib.rakeLeaves ./users/profiles;
suites = with profiles; rec {
base = [ direnv fish git gpg home misc ssh starship ];
};
};
users = {
mrhedgehog = { suites, ... }: { imports = suites.base; };
}; # digga.lib.importers.rakeLeaves ./users/hm;
imports = [ (digga.lib.importHosts ./hosts) ];
hosts = {
# set host specific properties here
NixOS = { };
};
importables = rec {
profiles = digga.lib.rakeLeaves ./profiles // {
users = digga.lib.rakeLeaves ./users;
};
suites = with profiles; rec {
base = [ core users.mrhedgehog users.root ];
};
};
};
devshell = ./shell;
home = {
imports = [ (digga.lib.importExportableModules ./users/modules) ];
modules = [ ];
importables = rec {
profiles = digga.lib.rakeLeaves ./users/profiles;
suites = with profiles; rec {
base = [ direnv fish git gpg home misc ssh starship ];
};
};
users = {
mrhedgehog = { suites, ... }: { imports = suites.base; };
}; # digga.lib.importers.rakeLeaves ./users/hm;
};
homeConfigurations = digga.lib.mkHomeConfigurations self.nixosConfigurations;
devshell = ./shell;
deploy.nodes = digga.lib.mkDeployNodes self.nixosConfigurations { };
homeConfigurations =
digga.lib.mkHomeConfigurations self.nixosConfigurations;
defaultTemplate = self.templates.bud;
templates.bud.path = ./.;
templates.bud.description = "bud template";
deploy.nodes = digga.lib.mkDeployNodes self.nixosConfigurations { };
}
//
{
defaultTemplate = self.templates.bud;
templates.bud.path = ./.;
templates.bud.description = "bud template";
} // {
budModules = { devos = import ./shell/bud; };
}
;
};
}

View file

@ -1,5 +1,4 @@
{ suites, ... }:
{
{ suites, ... }: {
### root password is empty by default ###
imports = suites.base;

View file

@ -1,5 +1,4 @@
{ profiles, ... }:
{
{ profiles, ... }: {
# build with: `bud build bootstrap bootstrapIso`
# reachable on the local link via ssh root@fe80::47%eno1
# where 'eno1' is replaced by your own machine's network

View file

@ -1,7 +1,5 @@
{ suites, ... }:
{
imports = [
] ++ suites.base;
{ suites, ... }: {
imports = [ ] ++ suites.base;
bud.enable = true;
bud.localFlakeClone = "/home/mrhedgehog/nix";
@ -23,9 +21,7 @@
networking = {
hostName = "zaphod";
enableIPv6 = true;
networkmanager = {
enable = true;
};
networkmanager = { enable = true; };
};
fileSystems = {
@ -38,9 +34,5 @@
device = "/dev/disk/by-label/nixos";
};
};
swapDevices = [
{
device = "/dev/disk/by-label/swap";
}
];
swapDevices = [{ device = "/dev/disk/by-label/swap"; }];
}

View file

@ -1,14 +1,7 @@
let
rev = "e7e5d481a0e15dcd459396e55327749989e04ce0";
flake = (import
(
fetchTarball {
url = "https://github.com/edolstra/flake-compat/archive/${rev}.tar.gz";
sha256 = "0zd3x46fswh5n6faq4x2kkpy6p3c6j593xbdlbsl40ppkclwc80x";
}
)
{
src = ../../.;
});
in
flake
flake = (import (fetchTarball {
url = "https://github.com/edolstra/flake-compat/archive/${rev}.tar.gz";
sha256 = "0zd3x46fswh5n6faq4x2kkpy6p3c6j593xbdlbsl40ppkclwc80x";
}) { src = ../../.; });
in flake

View file

@ -6,5 +6,4 @@ let
configs = default.nixosConfigurations;
default = (import ../.).defaultNix;
hostname = lib.fileContents /etc/hostname;
in
host
in host

View file

@ -1,2 +1 @@
{ lib }:
lib.makeExtensible (self: { })
{ lib }: lib.makeExtensible (self: { })

View file

@ -1,11 +1,9 @@
{ config, ... }: {
home-manager.sharedModules = [
{
home.sessionVariables = {
inherit (config.environment.sessionVariables) NIX_PATH;
};
xdg.configFile."nix/registry.json".text =
config.environment.etc."nix/registry.json".text;
}
];
home-manager.sharedModules = [{
home.sessionVariables = {
inherit (config.environment.sessionVariables) NIX_PATH;
};
xdg.configFile."nix/registry.json".text =
config.environment.etc."nix/registry.json".text;
}];
}

View file

@ -1,5 +1,4 @@
final: prev: {
manix = prev.manix.overrideAttrs (o: rec{
inherit (prev.sources.manix) pname version src;
});
manix = prev.manix.overrideAttrs
(o: rec { inherit (prev.sources.manix) pname version src; });
}

View file

@ -3,15 +3,6 @@ channels: final: prev: {
__dontExport = true; # overrides clutter up actual creations
inherit (channels.latest)
cachix
dhall
discord
element-desktop
rage
nixpkgs-fmt
qutebrowser
signal-desktop
starship
deploy-rs
;
cachix dhall discord element-desktop rage nixpkgs-fmt qutebrowser
signal-desktop starship deploy-rs;
}

View file

@ -1,6 +1,5 @@
# This file was generated by nvfetcher, please do not modify it manually.
{ fetchgit, fetchurl }:
{
{ fetchgit, fetchurl }: {
manix = {
pname = "manix";
version = "d08e7ca185445b929f097f8bfb1243a8ef3e10e4";

View file

@ -2,10 +2,11 @@
let
folder = ./.;
toImport = name: value: folder + ("/" + name);
filterCaches = key: value: value == "regular" && lib.hasSuffix ".nix" key && key != "default.nix";
imports = lib.mapAttrsToList toImport (lib.filterAttrs filterCaches (builtins.readDir folder));
in
{
filterCaches = key: value:
value == "regular" && lib.hasSuffix ".nix" key && key != "default.nix";
imports = lib.mapAttrsToList toImport
(lib.filterAttrs filterCaches (builtins.readDir folder));
in {
inherit imports;
nix.binaryCaches = [ "https://cache.nixos.org/" ];
}

View file

@ -1,6 +1,8 @@
{
nix = {
binaryCaches = [ "https://nix-community.cachix.org" ];
binaryCachePublicKeys = [ "nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs=" ];
binaryCachePublicKeys = [
"nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs="
];
};
}

View file

@ -1,6 +1,8 @@
{
nix = {
binaryCaches = [ "https://nixpkgs-wayland.cachix.org" ];
binaryCachePublicKeys = [ "nixpkgs-wayland.cachix.org-1:3lwxaILxMRkVhehr5StQprHdEo4IrE8sRho9R9HOLYA=" ];
binaryCachePublicKeys = [
"nixpkgs-wayland.cachix.org-1:3lwxaILxMRkVhehr5StQprHdEo4IrE8sRho9R9HOLYA="
];
};
}

View file

@ -1,6 +1,7 @@
{
nix = {
binaryCaches = [ "https://nrdxp.cachix.org" ];
binaryCachePublicKeys = [ "nrdxp.cachix.org-1:Fc5PSqY2Jm1TrWfm88l6cvGWwz3s93c6IOifQWnhNW4=" ];
binaryCachePublicKeys =
[ "nrdxp.cachix.org-1:Fc5PSqY2Jm1TrWfm88l6cvGWwz3s93c6IOifQWnhNW4=" ];
};
}

View file

@ -1,6 +1,7 @@
{
nix = {
binaryCaches = [ "https://statix.cachix.org" ];
binaryCachePublicKeys = [ "statix.cachix.org-1:Z9E/g1YjCjU117QOOt07OjhljCoRZddiAm4VVESvais=" ];
binaryCachePublicKeys =
[ "statix.cachix.org-1:Z9E/g1YjCjU117QOOt07OjhljCoRZddiAm4VVESvais=" ];
};
}

View file

@ -1,7 +1,6 @@
{ self, config, lib, pkgs, ... }:
let inherit (lib) fileContents;
in
{
in {
imports = [ ../cachix ];
nix.systemFeatures = [ "nixos-test" "benchmark" "big-parallel" "kvm" ];
@ -33,60 +32,58 @@ in
whois
];
shellAliases =
let ifSudo = lib.mkIf config.security.sudo.enable;
in
{
# quick cd
".." = "cd ..";
"..." = "cd ../..";
"...." = "cd ../../..";
"....." = "cd ../../../..";
shellAliases = let ifSudo = lib.mkIf config.security.sudo.enable;
in {
# quick cd
".." = "cd ..";
"..." = "cd ../..";
"...." = "cd ../../..";
"....." = "cd ../../../..";
# git
g = "git";
# git
g = "git";
# grep
grep = "rg";
gi = "grep -i";
# grep
grep = "rg";
gi = "grep -i";
# nix
n = "nix";
np = "n profile";
ni = "np install";
nr = "np remove";
ns = "n search --no-update-lock-file";
nf = "n flake";
nepl = "n repl '<nixpkgs>'";
srch = "ns nixos";
orch = "ns override";
nrb = ifSudo "sudo nixos-rebuild";
mn = ''
manix "" | grep '^# ' | sed 's/^# \(.*\) (.*/\1/;s/ (.*//;s/^# //' | sk --preview="manix '{}'" | xargs manix
'';
# nix
n = "nix";
np = "n profile";
ni = "np install";
nr = "np remove";
ns = "n search --no-update-lock-file";
nf = "n flake";
nepl = "n repl '<nixpkgs>'";
srch = "ns nixos";
orch = "ns override";
nrb = ifSudo "sudo nixos-rebuild";
mn = ''
manix "" | grep '^# ' | sed 's/^# \(.*\) (.*/\1/;s/ (.*//;s/^# //' | sk --preview="manix '{}'" | xargs manix
'';
# fix nixos-option
nixos-option = "nixos-option -I nixpkgs=${self}/lib/compat";
# fix nixos-option
nixos-option = "nixos-option -I nixpkgs=${self}/lib/compat";
# sudo
s = ifSudo "sudo -E ";
si = ifSudo "sudo -i";
se = ifSudo "sudoedit";
# sudo
s = ifSudo "sudo -E ";
si = ifSudo "sudo -i";
se = ifSudo "sudoedit";
# top
top = "btm";
# top
top = "btm";
# systemd
ctl = "systemctl";
stl = ifSudo "s systemctl";
utl = "systemctl --user";
ut = "systemctl --user start";
un = "systemctl --user stop";
up = ifSudo "s systemctl start";
dn = ifSudo "s systemctl stop";
jtl = "journalctl";
# systemd
ctl = "systemctl";
stl = ifSudo "s systemctl";
utl = "systemctl --user";
ut = "systemctl --user start";
un = "systemctl --user stop";
up = ifSudo "s systemctl start";
dn = ifSudo "s systemctl stop";
jtl = "journalctl";
};
};
};
fonts = {

View file

@ -3,7 +3,4 @@ let
system = "";
user = "";
allKeys = [ system user ];
in
{
"secret.age".publicKeys = allKeys;
}
in { "secret.age".publicKeys = allKeys; }

View file

@ -1,10 +1,5 @@
{ self, inputs, ... }:
{
modules = with inputs; [
bud.devshellModules.bud
];
exportedModules = [
./devos.nix
];
{ self, inputs, ... }: {
modules = with inputs; [ bud.devshellModules.bud ];
exportedModules = [ ./devos.nix ];
}

View file

@ -8,8 +8,7 @@ let
docs = pkgWithCategory "docs";
devos = pkgWithCategory "devos";
in
{
in {
_file = toString ./.;
imports = [ "${extraModulesPath}/git/hooks.nix" ];
@ -30,25 +29,25 @@ in
unset _PATH
'');
commands = with pkgs; [
(devos nixUnstable)
(devos agenix)
{
category = "devos";
name = pkgs.nvfetcher-bin.pname;
help = pkgs.nvfetcher-bin.meta.description;
command = "cd $PRJ_ROOT/pkgs; ${pkgs.nvfetcher-bin}/bin/nvfetcher -c ./sources.toml $@";
}
(linter nixpkgs-fmt)
(linter editorconfig-checker)
# (docs python3Packages.grip) too many deps
(docs mdbook)
(devos inputs.deploy.packages.${pkgs.system}.deploy-rs)
]
commands = with pkgs;
[
(devos nixUnstable)
(devos agenix)
{
category = "devos";
name = pkgs.nvfetcher-bin.pname;
help = pkgs.nvfetcher-bin.meta.description;
command =
"cd $PRJ_ROOT/pkgs; ${pkgs.nvfetcher-bin}/bin/nvfetcher -c ./sources.toml $@";
}
(linter nixpkgs-fmt)
(linter editorconfig-checker)
# (docs python3Packages.grip) too many deps
(docs mdbook)
(devos inputs.deploy.packages.${pkgs.system}.deploy-rs)
]
++ lib.optional
(system != "i686-linux")
(devos cachix)
++ lib.optional (system != "i686-linux") (devos cachix)
;
}

View file

@ -1,19 +1,16 @@
{ hmUsers, pkgs, ... }:
{
{ hmUsers, pkgs, ... }: {
home-manager.users = { inherit (hmUsers) mrhedgehog; };
users.users.mrhedgehog = {
description = "Mr Hedgehog";
isNormalUser = true;
extraGroups = [ "wheel" "networkmanager" ];
hashedPassword = "$6$6EtuZhVOJdfI9DYP$1Qnd7R8qdN.E5yE2kDQCNg2zgJ5cIjNBKsIW/qJgb8wcKlUpIoVg/fEKvBkAgCiLyojVG2kzfu4J9LR8rA8a2/";
hashedPassword =
"$6$6EtuZhVOJdfI9DYP$1Qnd7R8qdN.E5yE2kDQCNg2zgJ5cIjNBKsIW/qJgb8wcKlUpIoVg/fEKvBkAgCiLyojVG2kzfu4J9LR8rA8a2/";
shell = pkgs.fish;
openssh = {
authorizedKeys = {
keyFiles = [
../../ssh/yubikey.pub
../../ssh/backup.pub
];
keyFiles = [ ../../ssh/yubikey.pub ../../ssh/backup.pub ];
};
};
};

View file

@ -1 +1,6 @@
{ programs.direnv = { enable = true; nix-direnv = { enable = true; }; }; }
{
programs.direnv = {
enable = true;
nix-direnv = { enable = true; };
};
}

View file

@ -2,20 +2,19 @@
programs.fish = {
enable = true;
shellAliases = {
"lg" = "${ pkgs.lazygit }/bin/lazygit";
"cat" = "${ pkgs.bat }/bin/bat";
"gls" = "${ pkgs.exa }/bin/exa -lah@ --icons --git --git-ignore --no-user";
"ls" = "${ pkgs.exa }/bin/exa --icons -a";
"ll" = "${ pkgs.exa }/bin/exa --icons -lah@";
"lt" = "${ pkgs.exa }/bin/exa --icons --tree -a";
"lg" = "${pkgs.lazygit}/bin/lazygit";
"cat" = "${pkgs.bat}/bin/bat";
"gls" = "${pkgs.exa}/bin/exa -lah@ --icons --git --git-ignore --no-user";
"ls" = "${pkgs.exa}/bin/exa --icons -a";
"ll" = "${pkgs.exa}/bin/exa --icons -lah@";
"lt" = "${pkgs.exa}/bin/exa --icons --tree -a";
"hmr" =
"${ pkgs.home-manager }/bin/home-manager build --flake ~/nix && ${ pkgs.home-manager }/bin/home-manager switch --flake ~/nix";
"${pkgs.home-manager}/bin/home-manager build --flake ~/nix && ${pkgs.home-manager}/bin/home-manager switch --flake ~/nix";
};
shellInit =
''
shellInit = ''
set -x GPG_TTY (tty)
set -x SSH_AUTH_SOCK (gpgconf --list-dirs agent-ssh-socket)
gpgconf --launch gpg-agent
'';
'';
};
}

View file

@ -36,8 +36,10 @@
# logging
lg =
"log --color --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --abbrev-commit";
plog = "log --graph --pretty='format:%C(red)%d%C(reset) %C(yellow)%h%C(reset) %ar %C(green)%aN%C(reset) %s'";
tlog = "log --stat --since='1 Day Ago' --graph --pretty=oneline --abbrev-commit --date=relative";
plog =
"log --graph --pretty='format:%C(red)%d%C(reset) %C(yellow)%h%C(reset) %ar %C(green)%aN%C(reset) %s'";
tlog =
"log --stat --since='1 Day Ago' --graph --pretty=oneline --abbrev-commit --date=relative";
rank = "shortlog -sn --no-merges";
# delete merged branches
bdm = "!git branch --merged | grep -v '*' | xargs -n 1 git branch -d";

View file

@ -1,12 +1,16 @@
{
programs.gpg = {
enable = true;
publicKeys = [{ source = ./key.pub; trust = 5; }];
publicKeys = [{
source = ./key.pub;
trust = 5;
}];
settings = {
personal-cipher-preferences = "AES256 AES192 AES";
personal-digest-preferences = "SHA512 SHA384 SHA256";
personal-compress-preferences = "ZLIB BZIP2 ZIP Uncompressed";
default-preference-list = "SHA512 SHA384 SHA256 AES256 AES192 AES ZLIB BZIP2 ZIP Uncompressed";
default-preference-list =
"SHA512 SHA384 SHA256 AES256 AES192 AES ZLIB BZIP2 ZIP Uncompressed";
cert-digest-algo = "SHA512";
s2k-digest-algo = "SHA512";
s2k-cipher-algo = "AES256";
@ -28,6 +32,10 @@
trusted-key = "0x7D5107866B1C6752";
keyserver = "hkps://keys.openpgp.org";
};
scdaemonSettings = { card-timeout = "5"; pcsc-shared = true; shared-access = true; };
scdaemonSettings = {
card-timeout = "5";
pcsc-shared = true;
shared-access = true;
};
};
}

View file

@ -1,67 +1,67 @@
{ config
, lib
, pkgs
, ...
}:
let
nvimconf = import ./config/nvim.nix;
in
{
{ config, lib, pkgs, ... }:
let nvimconf = import ./config/nvim.nix;
in {
home = {
homeDirectory = "/home/mrhedgehog/";
stateVersion = "22.05";
username = "mrhedgehog";
packages =
with pkgs;
[
atomicparsley
# buku
cargo-audit
cargo-bloat
cargo-crev
cargo-edit
cargo-outdated
cargo-tarpaulin
cargo-watch
cmus
darktable
dracula-theme
discord
ffmpeg
fossil
# freetube
hyperfine
josm
md-tangle
nvchecker-bin
rnix-lsp
senpai
shellcheck
stylua
taskell
taskwarrior-tui
tokei
wdisplays
wget
yt-dlp
ytfzf
zk
zulip-term
zulip
];
packages = with pkgs; [
atomicparsley
# buku
cargo-audit
cargo-bloat
cargo-crev
cargo-edit
cargo-outdated
cargo-tarpaulin
cargo-watch
cmus
darktable
dracula-theme
discord
ffmpeg
fossil
# freetube
hyperfine
josm
md-tangle
nvchecker-bin
rnix-lsp
senpai
shellcheck
stylua
taskell
taskwarrior-tui
tokei
wdisplays
wget
yt-dlp
ytfzf
zk
zulip-term
zulip
];
file = {
".config/senpai/senpai.scfg" = { source = ./config/senpai.scfg; };
".config/kanshi/config" = { source = ./config/kanshi.cfg; };
};
};
programs = {
home-manager = { enable = true; path = "./home-manager"; };
home-manager = {
enable = true;
path = "./home-manager";
};
atuin = {
enable = true;
enableBashIntegration = true;
enableZshIntegration = true;
enableFishIntegration = true;
settings = { auto_sync = true; sync_address = "https://api.atuin.sh"; sync_frequency = "15m"; search_mode = "prefix"; };
settings = {
auto_sync = true;
sync_address = "https://api.atuin.sh";
sync_frequency = "15m";
search_mode = "prefix";
};
};
himalaya = { enable = true; };
neovim = nvimconf pkgs lib;

View file

@ -2,20 +2,14 @@
programs = {
bat = {
enable = true;
config = {
theme = "Dracula";
};
config = { theme = "Dracula"; };
};
exa = {
enable = true;
enableAliases = false;
};
lazygit = {
enable = true;
};
pandoc = {
enable = true;
};
lazygit = { enable = true; };
pandoc = { enable = true; };
zoxide = {
enable = true;
enableBashIntegration = true;

View file

@ -10,6 +10,8 @@
extraOptions = { "PreferredAuthentications" = "publickey"; };
};
};
extraOptionOverrides = { "Match" = "host * exec \"gpg-connect-agent UPDATESTARTUPTTY /bye\""; };
extraOptionOverrides = {
"Match" = ''host * exec "gpg-connect-agent UPDATESTARTUPTTY /bye"'';
};
};
}

View file

@ -5,32 +5,52 @@
enableBashIntegration = true;
enableZshIntegration = true;
settings = {
format =
lib.concatStrings
[
"$directory"
"$rust"
"$python"
"$golang"
"$nodejs"
"$lua"
"$git_branch"
"$git_status"
"$battery"
"$shlvl"
"$character"
];
format = lib.concatStrings [
"$directory"
"$rust"
"$python"
"$golang"
"$nodejs"
"$lua"
"$git_branch"
"$git_status"
"$battery"
"$shlvl"
"$character"
];
directory = { read_only = " "; };
git_branch = { symbol = " "; format = "\\[[$symbol$branch]($style)\\]"; };
git_branch = {
symbol = " ";
format = "\\[[$symbol$branch]($style)\\]";
};
git_status = { format = "([\\[$all_status$ahead_behind\\]]($style))"; };
golang = { symbol = " "; format = "\\[[$symbol($version)]($style)\\]"; };
golang = {
symbol = " ";
format = "\\[[$symbol($version)]($style)\\]";
};
nodejs = { format = "\\[[$symbol($version)]($style)\\]"; };
lua = { symbol = " "; format = "\\[[\${symbol}\${version}]($style)\\]"; };
package = { symbol = " "; format = "\\[[$symbol$version]($style)\\]"; };
python = { symbol = " "; format = "\\[[\${symbol}\${pyenv_prefix}(\${version})(\\($virtualenv\\))]($style)\\]"; };
rust = { symbol = " "; format = "\\[[$symbol($version)]($style)\\]"; };
lua = {
symbol = " ";
format = "\\[[\${symbol}\${version}]($style)\\]";
};
package = {
symbol = " ";
format = "\\[[$symbol$version]($style)\\]";
};
python = {
symbol = " ";
format =
"\\[[\${symbol}\${pyenv_prefix}(\${version})(\\($virtualenv\\))]($style)\\]";
};
rust = {
symbol = " ";
format = "\\[[$symbol($version)]($style)\\]";
};
shlvl = { symbol = " "; };
nix_shell = { symbol = " "; format = "\\[[$symbol($version)]($style)\\]"; };
nix_shell = {
symbol = " ";
format = "\\[[$symbol($version)]($style)\\]";
};
aws.disabled = true;
conda.disabled = true;
crystal.disabled = true;