This commit is contained in:
dusk 2021-06-21 21:15:22 +03:00
parent 2394d9ec50
commit 08e8fe9c28
Signed by: dusk
GPG Key ID: 1D8F8FAF2294D6EA
14 changed files with 143 additions and 274 deletions

View File

@ -2,11 +2,11 @@
"nodes": {
"cachix": {
"locked": {
"lastModified": 1623225763,
"narHash": "sha256-Mo0szTSr3rST1FHqCnrZw7UKNK26NmB9uyI7783LAE8=",
"lastModified": 1624097864,
"narHash": "sha256-TGayVqD42Hze4gg5Eurfd7W4zINdHp81JZAyR8q+Oos=",
"owner": "nixos",
"repo": "nixpkgs",
"rev": "85ed11208f8c7c981071cc6e33a5fc60c396c38f",
"rev": "69f3a9705014ce75b0489404210995fb6f29836e",
"type": "github"
},
"original": {
@ -100,6 +100,21 @@
"type": "github"
}
},
"devshell_2": {
"locked": {
"lastModified": 1622711433,
"narHash": "sha256-rGjXz7FA7HImAT3TtoqwecByLO5yhVPSwPdaYPBFRQw=",
"owner": "numtide",
"repo": "devshell",
"rev": "1f4fb67b662b65fa7cfe696fc003fcc1e8f7cc36",
"type": "github"
},
"original": {
"owner": "numtide",
"repo": "devshell",
"type": "github"
}
},
"digga": {
"inputs": {
"deploy": "deploy",
@ -184,6 +199,45 @@
"type": "github"
}
},
"flakeCompat": {
"flake": false,
"locked": {
"lastModified": 1606424373,
"narHash": "sha256-oq8d4//CJOrVj+EcOaSXvMebvuTkmBJuT5tzlfewUnQ=",
"owner": "edolstra",
"repo": "flake-compat",
"rev": "99f1c2157fba4bfe6211a321fd0ee43199025dbf",
"type": "github"
},
"original": {
"owner": "edolstra",
"repo": "flake-compat",
"type": "github"
}
},
"helix": {
"inputs": {
"flakeCompat": "flakeCompat",
"nixCargoIntegration": "nixCargoIntegration",
"nixpkgs": [
"nixos"
]
},
"locked": {
"lastModified": 1624298636,
"narHash": "sha256-v+ZdsMjHR+YabpgLJD23CXMBTN7rkFRp+yp0oAXczxo=",
"owner": "yusdacra",
"repo": "helix",
"rev": "e9c764809950443baa0689c568ade55bb0ee17db",
"type": "github"
},
"original": {
"owner": "yusdacra",
"ref": "build/nix/lazy-submodules",
"repo": "helix",
"type": "github"
}
},
"home": {
"inputs": {
"nixpkgs": [
@ -191,11 +245,11 @@
]
},
"locked": {
"lastModified": 1623251710,
"narHash": "sha256-eCMquRJXAzzFgNcTO4jQqp8D40N0jSA58+oqhyOrEbU=",
"lastModified": 1624214437,
"narHash": "sha256-BtB6k1mQXG/P8MUlNVcuboQqlxlks2H6i5vj2pbGa3Y=",
"owner": "nix-community",
"repo": "home-manager",
"rev": "42847469b3f65a363dc52b66be09d0ac4edcc55c",
"rev": "cd11c02c286a996ff55010146baecae4c413634f",
"type": "github"
},
"original": {
@ -245,11 +299,11 @@
]
},
"locked": {
"lastModified": 1622810282,
"narHash": "sha256-4wmvM3/xfD0hCdNDIXVzRMfL4yB1J+DjH6Zte2xbAxk=",
"lastModified": 1623927034,
"narHash": "sha256-sGxlmfp5eXL5sAMNqHSb04Zq6gPl+JeltIZ226OYN0w=",
"owner": "nmattia",
"repo": "naersk",
"rev": "e8061169e1495871b56be97c5c51d310fae01374",
"rev": "e09c320446c5c2516d430803f7b19f5833781337",
"type": "github"
},
"original": {
@ -258,6 +312,28 @@
"type": "github"
}
},
"nixCargoIntegration": {
"inputs": {
"devshell": "devshell_2",
"nixpkgs": [
"nixpkgs"
],
"rustOverlay": "rustOverlay"
},
"locked": {
"lastModified": 1624070370,
"narHash": "sha256-sfFqfmerCYvk0jDeP1gfuskz7AaqDsgV8aiQrEUGdsc=",
"owner": "yusdacra",
"repo": "nix-cargo-integration",
"rev": "85e6c1ba4c0e3e6dec5a7d1f65bcc036d2ea6ae3",
"type": "github"
},
"original": {
"owner": "yusdacra",
"repo": "nix-cargo-integration",
"type": "github"
}
},
"nixEvalLsp": {
"inputs": {
"flake-utils": "flake-utils_2",
@ -266,11 +342,11 @@
]
},
"locked": {
"lastModified": 1621045360,
"narHash": "sha256-f9wdwbmX3pe2wVKvPGXVoejsduWeW9KMII0sv2o/8GE=",
"lastModified": 1624068016,
"narHash": "sha256-+LZZ+uwzLL8Lwj2wSuFbbcs9xiw3nLm/GudLnkV0Ubg=",
"owner": "aaronjanse",
"repo": "nix-eval-lsp",
"rev": "0c263b802d83b3988924d6db55a6a0ca60faf578",
"rev": "3e42793fc43cc1a2ebe0f9f857e798ae3cca16e5",
"type": "github"
},
"original": {
@ -296,11 +372,11 @@
},
"nixos": {
"locked": {
"lastModified": 1622966049,
"narHash": "sha256-6g+28v94ISkVk9TBSsITVOnB2slK8plieWPIF2jo/l0=",
"lastModified": 1624024598,
"narHash": "sha256-X++38oH5MKEmPW4/2WdMaHQvwJzO8pJfbnzMD7DbG1E=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "fbfb79400a08bf754e32b4d4fc3f7d8f8055cf94",
"rev": "33d42ad7cf2769ce6364ed4e52afa8e9d1439d58",
"type": "github"
},
"original": {
@ -311,11 +387,11 @@
},
"nixos-hardware": {
"locked": {
"lastModified": 1623143341,
"narHash": "sha256-a8NjpJVvJkb3ehu/KP1OaWwlRexom2D7lQEH5uCO9yA=",
"lastModified": 1623569835,
"narHash": "sha256-Mg+FN1JkEQ91Zff0+ot/ndRgD9BB+uDBLN12AcBYkSA=",
"owner": "nixos",
"repo": "nixos-hardware",
"rev": "fccbee72df707c3fb074854668deee6e1ff02351",
"rev": "7305b276c90cfd3ad0a2452101a49c0b52c784c0",
"type": "github"
},
"original": {
@ -363,11 +439,11 @@
]
},
"locked": {
"lastModified": 1623250365,
"narHash": "sha256-BxWqHdKnfzwe3f55DhJsy3UucT4345ZAkiWdFAezNMo=",
"lastModified": 1624286382,
"narHash": "sha256-AgdOyWI9MGXRoh1hnwm2OAuEj6at7rmV+G7fx9vz84M=",
"owner": "colemickens",
"repo": "nixpkgs-wayland",
"rev": "c72b5baf71ce59316fe34bd59edc92b6a0fdab08",
"rev": "06dae5ae8fd0eb1de6bc7efce69c972362108387",
"type": "github"
},
"original": {
@ -441,6 +517,7 @@
"ci-agent": "ci-agent",
"darwin": "darwin",
"digga": "digga",
"helix": "helix",
"home": "home",
"latest": "latest",
"naersk": "naersk_2",
@ -456,6 +533,22 @@
"pkgs": "pkgs"
}
},
"rustOverlay": {
"flake": false,
"locked": {
"lastModified": 1624069337,
"narHash": "sha256-9mTcx7osE4biF2Hm/GU19s1T3+KvphWj4QaUcJh39lU=",
"owner": "oxalica",
"repo": "rust-overlay",
"rev": "67dc2a9543a7c24591e6cb102ad0121c3a704aab",
"type": "github"
},
"original": {
"owner": "oxalica",
"repo": "rust-overlay",
"type": "github"
}
},
"utils": {
"locked": {
"lastModified": 1610051610,

View File

@ -27,13 +27,17 @@
url = "github:aaronjanse/nix-eval-lsp";
inputs.nixpkgs.follows = "nixos";
};
helix = {
url = "github:yusdacra/helix/build/nix/lazy-submodules";
inputs.nixpkgs.follows = "nixos";
};
nixpkgsWayland = {
url = "github:colemickens/nixpkgs-wayland";
inputs.nixpkgs.follows = "nixos";
};
};
outputs = inputs@{ self, pkgs, digga, nixos, ci-agent, home, nixos-hardware, nur, nixosPersistence, nixpkgsWayland, nixEvalLsp, ... }:
outputs = inputs@{ self, pkgs, digga, nixos, ci-agent, home, nixos-hardware, nur, nixosPersistence, nixpkgsWayland, nixEvalLsp, helix, ... }:
digga.lib.mkFlake {
inherit self inputs;
@ -56,6 +60,7 @@
nixpkgsWayland.overlay
(final: prev: {
inherit (nixEvalLsp.packages.${prev.system}) nix-eval-lsp;
inherit (helix.packages.${prev.system}) helix;
})
];
};

View File

@ -143,7 +143,6 @@ in
vaapiVdpau
libva
vulkan-loader
vulkan-validation-layers
vulkan-extension-layer
pipewire
];
@ -153,7 +152,6 @@ in
vaapiVdpau
libva
vulkan-loader
vulkan-validation-layers
vulkan-extension-layer
pipewire
]

View File

@ -70,7 +70,6 @@ final: prev: rec {
, libdbusmenu
, nodePackages
, vulkan-loader
, vulkan-validation-layers
, vulkan-extension-layer
, libGL
}:
@ -135,7 +134,6 @@ final: prev: rec {
libappindicator-gtk3
libdbusmenu
vulkan-loader
vulkan-validation-layers
vulkan-extension-layer
libGL
];

View File

@ -1,15 +0,0 @@
final: prev: {
grit = prev.grit.overrideAttrs (old:
let version = "0.3.0";
in
{
inherit version;
src = prev.fetchFromGitHub {
owner = "climech";
repo = old.pname;
rev = "v${version}";
sha256 = "sha256-c8wBwmXFjpst6UxL5zmTxMR4bhzpHYljQHiJFKiNDms=";
};
});
}

View File

@ -1,9 +0,0 @@
final: prev: {
hikari = prev.hikari.overrideAttrs (old: {
src = prev.fetchzip {
url = "https://hub.darcs.net/raichoo/hikari/dist/hikari.zip";
sha256 = "sha256-uEtmeQKg5II+Wy10YQCtId/iKnsV1hnz7PV6lOVqXzM=";
};
buildInputs = old.buildInputs ++ [ prev.pandoc ];
});
}

View File

@ -1,9 +0,0 @@
final: prev: {
kakoune-unwrapped = prev.kakoune-unwrapped.overrideAttrs (old: {
version = "5696ed02";
src = builtins.fetchGit {
url = "https://github.com/mawww/kakoune.git";
rev = "5696ed02e49cb9ba076a9a8ce908597720e7df1c";
};
});
}

View File

@ -1,17 +0,0 @@
final: prev: {
kcr = prev.stdenv.mkDerivation {
pname = "kcr";
version = "nightly";
src = prev.fetchzip {
url = "https://github.com/alexherbo2/kakoune.cr/releases/download/nightly/kakoune.cr-nightly-x86_64-unknown-linux-musl.zip";
stripRoot = false;
sha256 = "sha256-uYn7rjANFcIC+YpWkVm59OdsGf8tIxbPqzaPngT8Jkw=";
};
installPhase = ''
mkdir -p $out/bin
install bin/kcr $out/bin
'';
};
}

View File

@ -1,34 +0,0 @@
final: prev: {
lightcord = prev.discord-canary.overrideAttrs (old:
let binaryName = "lightcord"; in
rec {
pname = "lightcord";
version = "0.1.5";
src = prev.fetchzip {
stripRoot = false;
url = "https://github.com/Lightcord/Lightcord/releases/download/${version}/lightcord-linux-x64.zip";
sha256 = "sha256-lorjKF7RQHLt3e57CrPa4QqpztHQqsF+ijiJD5hJYTY=";
};
autoPatchelfIgnoreMissingDeps = true;
installPhase = ''
mkdir -p $out/{bin,opt/${binaryName},share/pixmaps}
mv * $out/opt/${binaryName}
chmod +x $out/opt/${binaryName}/${binaryName}
patchelf --set-interpreter ${prev.stdenv.cc.bintools.dynamicLinker} \
$out/opt/${binaryName}/${binaryName}
wrapProgram $out/opt/${binaryName}/${binaryName} \
"''${gappsWrapperArgs[@]}" \
--prefix XDG_DATA_DIRS : "${prev.gtk3}/share/gsettings-schemas/${prev.gtk3.name}/" \
--prefix LD_LIBRARY_PATH : "${old.libPath}:${prev.electron_9}/lib/electron:${prev.libdrm}/lib:${prev.libGL_driver.out}/lib"
ln -s $out/opt/${binaryName}/${binaryName} $out/bin/
ln -s $out/opt/${binaryName}/discord.png $out/share/pixmaps/${pname}.png
ln -s "${old.desktopItem}/share/applications" $out/share/
'';
desktopItem = prev.makeDesktopItem {
name = pname;
exec = binaryName;
desktopName = binaryName;
};
meta = { };
});
}

View File

@ -1,7 +0,0 @@
final: prev: {
swftools = prev.swftools.overrideAttrs (old: {
meta = old.meta // {
broken = false;
};
});
}

View File

@ -1,5 +1,5 @@
{ pkgs, ... }: {
imports = [ ./kakoune.nix ];
imports = [ ./helix.nix ];
environment.systemPackages = with pkgs; [ nixpkgs-fmt ];
environment.shellAliases = { nixf-all = "nixpkgs-fmt **/**.nix"; };

View File

@ -0,0 +1,15 @@
{ pkgs, ... }:
let
pkg = pkgs.helix;
bin = "${pkg}/bin/hx";
in
{
environment.systemPackages = [ pkg ];
environment.sessionVariables = {
EDITOR = bin;
VISUAL = bin;
};
environment.shellAliases = { e = bin; };
}

View File

@ -95,31 +95,6 @@ in
fontComb = "${font} ${toString fontSize}";
fontPackage = pkgs.iosevka;
kideSrc = fetchGit {
url = "https://gitlab.com/yusdacra/kide.git";
rev = "778d68df0cfcb96d6113bfe6a59e5dfc71ee7d82";
submodules = true;
};
kideFiles =
mapAttrs' (n: _: nameValuePair "kak/${n}" { source = "${kideSrc}/${n}"; })
(readDir kideSrc);
kideDeps = with pkgs; [
fzf
bat
ripgrep
universal-ctags
kak-lsp
wl-clipboard
xclip
shellcheck
perl
socat
gdb
kcr
jq
file
];
chromiumWayland =
let
flags = [
@ -180,7 +155,7 @@ in
'';
fixupPhase = ''
wrapProgram $out/bin/${name} \
--prefix LD_LIBRARY_PATH : ${lib.makeLibraryPath (with pkgs; [ vulkan-loader vulkan-validation-layers vulkan-extension-layer libGL ])}
--prefix LD_LIBRARY_PATH : ${lib.makeLibraryPath (with pkgs; [ vulkan-loader vulkan-extension-layer libGL ])}
'';
};
chromiumWaylandPkg =
@ -206,7 +181,7 @@ in
'';
fixupPhase = ''
wrapProgram $out/bin/${name} \
--prefix LD_LIBRARY_PATH : ${lib.makeLibraryPath (with pkgs; [ vulkan-loader vulkan-validation-layers vulkan-extension-layer libGL ])}
--prefix LD_LIBRARY_PATH : ${lib.makeLibraryPath (with pkgs; [ vulkan-loader vulkan-extension-layer libGL ])}
'';
};
@ -421,7 +396,7 @@ in
phantomstyle
papirus-icon-theme
pcmanfm-qt
] ++ kideDeps;
];
};
wayland.windowManager = {
@ -908,132 +883,5 @@ in
pinentryFlavor = "qt";
};
};
xdg = {
enable = true;
configFile = {
"kak/user/kakrc".text = ''
source "%val{config}/user/color/colorscheme.kak"
'';
"kak/user/color/colorscheme.kak".text = ''
evaluate-commands %sh{
fg="rgb:${colorScheme.primary.normal.foreground}"
bg="rgb:${colorScheme.primary.normal.background}"
br_fg="rgb:${colorScheme.primary.bright.foreground}"
br_bg="rgb:${colorScheme.primary.bright.background}"
red="rgb:${colorScheme.normal.red}"
green="rgb:${colorScheme.normal.green}"
yellow="rgb:${colorScheme.normal.yellow}"
blue="rgb:${colorScheme.normal.blue}"
magenta="rgb:${colorScheme.normal.magenta}"
cyan="rgb:${colorScheme.normal.cyan}"
br_red="rgb:${colorScheme.bright.red}"
br_green="rgb:${colorScheme.bright.green}"
br_yellow="rgb:${colorScheme.bright.yellow}"
br_blue="rgb:${colorScheme.bright.blue}"
br_magenta="rgb:${colorScheme.bright.magenta}"
br_cyan="rgb:${colorScheme.bright.cyan}"
echo "
set-face global value $yellow+b
set-face global type $br_yellow
set-face global variable $magenta
set-face global module $blue
set-face global function $br_cyan
set-face global string $br_green
set-face global keyword $br_red+b
set-face global operator $br_cyan
set-face global attribute $yellow
set-face global comment $fg
set-face global meta $br_yellow
set-face global builtin $br_fg+b
set-face global title $blue+u
set-face global header $br_cyan+u
set-face global bold $br_fg+b
set-face global italic $br_fg+i
set-face global mono $br_green
set-face global block $yellow
set-face global link $blue
set-face global bullet $br_magenta
set-face global list $magenta
set-face global Default $br_fg,$bg
set-face global PrimarySelection $bg,$br_fg
set-face global SecondarySelection $br_fg,$br_bg+i
set-face global PrimaryCursor $bg,$red+b
set-face global SecondaryCursor $bg,$br_cyan+i
set-face global MatchingChar $bg,$blue
set-face global Search $br_fg,$green
set-face global CurrentWord $br_fg,$blue
set-face global MenuForeground $cyan,$br_bg+b
set-face global MenuBackground $br_fg,$bg
set-face global Information $br_yellow,$bg
set-face global Error $br_bg,$br_red
set-face global BufferPadding $bg,$bg
set-face global Whitespace $bg
set-face global StatusLine $br_fg,$bg
set-face global StatusLineInfo $yellow,$bg
set-face global LineNumbers default
set-face global LineNumberCursor default,default+r
"
}
'';
"kak-lsp/kak-lsp.toml".text = ''
snippet_support = true
verbosity = 2
[semantic_scopes]
variable = "variable"
entity_name_function = "function"
entity_name_type = "type"
variable_other_enummember = "variable"
entity_name_namespace = "module"
[semantic_tokens]
type = "type"
variable = "variable"
namespace = "module"
function = "function"
string = "string"
keyword = "keyword"
operator = "operator"
comment = "comment"
[semantic_modifiers]
documentation = "documentation"
readonly = "default+d"
[server]
timeout = 1800
[language.rust]
filetypes = ["rust"]
roots = ["Cargo.toml"]
command = "${pkgBin "rust-analyzer"}"
[language.nix]
filetypes = ["nix"]
roots = ["flake.nix", "shell.nix", ".git"]
command = "${pkgBin "rnix-lsp"}"
'';
# [language.haskell]
# filetypes = ["haskell"]
# roots = ["Setup.hs", "stack.yaml", "*.cabal"]
# command = "${pkgBin "haskell-language-server"}"
"nixpkgs/config.nix".text = ''
{
android_sdk.accept_license = true;
allowUnfree = true;
}
'';
} // kideFiles;
};
};
}

View File

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