/nix/store/dlwqlnbaj5vfm9aw20r1yxk8y56lmgif-repo/header.tmpl

Compare commits

..

No commits in common. "9e849b95a8e0d6630d576c8794ecfaebff11601b" and "58f0189a6bd01878b1fdd4566d61f1992b84d0a1" have entirely different histories.

20 changed files with 522 additions and 56 deletions

43
flake.nix Normal file
View file

@ -0,0 +1,43 @@
{
description = "My NixOS config flake";
# No inputs, take this flakers
outputs =
_:
let
sources = import ./npins;
nixpkgs =
(import sources.flake-compat {
src = sources.nixpkgs;
copySourceTreeToStore = false;
useBuiltinsFetchTree = true;
}).outputs;
inherit (nixpkgs) lib;
pkgsFor = nixpkgs.legacyPackages;
inputs = sources;
in
{
nixosConfigurations = import ./default.nix;
packages = lib.mapAttrs (_: pkgs: {
inherit
(import ./packages {
inherit inputs pkgs sources;
})
fish
kakoune
;
}) pkgsFor;
devShells = lib.mapAttrs (_: pkgs: {
default = pkgs.mkShellNoCC {
packages = [
(pkgs.callPackage (sources.npins + "/npins.nix") { })
];
env.NPINS_OVERRIDE_nichts = ".";
};
}) pkgsFor;
templates = import ./templates;
};
}

View file

@ -44,7 +44,7 @@
owncloud.enable = true; owncloud.enable = true;
}; };
hardware = { hardware = {
nvidia.enable = true; nvidia.enable = false;
intel.enable = true; intel.enable = true;
bluetooth = { bluetooth = {
enable = true; enable = true;
@ -55,7 +55,6 @@
editors = { editors = {
helix.enable = true; helix.enable = true;
}; };
steam.enable = true;
}; };
sound.enable = true; sound.enable = true;
}; };
@ -75,6 +74,7 @@
}; };
programs = { programs = {
ssh.enable = true; ssh.enable = true;
btop.enable = true;
nh.enable = true; nh.enable = true;
thunar.enable = true; thunar.enable = true;
}; };

View file

@ -14,6 +14,7 @@
calc calc
cargo-info cargo-info
cbonsai cbonsai
cinny-desktop
cmus cmus
difftastic difftastic
dua dua

View file

@ -188,6 +188,7 @@ let
rust-analyzer = { rust-analyzer = {
command = getExe pkgs.rust-analyzer; command = getExe pkgs.rust-analyzer;
config.rust-analyzer = { config.rust-analyzer = {
checkOnSave.command = "clippy";
procMacro.enable = true; procMacro.enable = true;
cargo = { cargo = {
loadOutDirsFromCheck = true; loadOutDirsFromCheck = true;

View file

@ -15,13 +15,7 @@ let
in in
{ {
imports = [ imports = [ (sources.hjem + "/modules/nixos") ];
(import sources.flake-compat {
src = sources.hjem;
copySourceTreeToStore = false;
useBuiltinsFetchTree = true;
}).outputs.nixosModules.default
];
config = { config = {
hjem = { hjem = {

View file

@ -9,9 +9,9 @@
}, },
"branch": "master", "branch": "master",
"submodules": false, "submodules": false,
"revision": "531e5219b25c1584461cc4b7fb11729a9b928b2b", "revision": "995b210e86c9d89cdabbdee622681389ce6c95ac",
"url": "https://github.com/nix-community/comma/archive/531e5219b25c1584461cc4b7fb11729a9b928b2b.tar.gz", "url": "https://github.com/nix-community/comma/archive/995b210e86c9d89cdabbdee622681389ce6c95ac.tar.gz",
"hash": "sha256-QmHTqpPugYmv7as7DqbVQLiXKdm73f0EpMg7nZvHQQQ=" "hash": "sha256-dNek1a8Yt3icWc8ZpVe1NGuG+eSoTDOmAAJbkYmMocU="
}, },
"flake-compat": { "flake-compat": {
"type": "Git", "type": "Git",
@ -27,19 +27,6 @@
"url": "https://git.lix.systems/lix-project/flake-compat/archive/549f2762aebeff29a2e5ece7a7dc0f955281a1d1.tar.gz", "url": "https://git.lix.systems/lix-project/flake-compat/archive/549f2762aebeff29a2e5ece7a7dc0f955281a1d1.tar.gz",
"hash": "sha256-NKw96t+BgHIYzHUjkTK95FqYRVKB8DHpVhefWSz/kTw=" "hash": "sha256-NKw96t+BgHIYzHUjkTK95FqYRVKB8DHpVhefWSz/kTw="
}, },
"ghostty": {
"type": "Git",
"repository": {
"type": "GitHub",
"owner": "ghostty-org",
"repo": "ghostty"
},
"branch": "main",
"submodules": false,
"revision": "d3cadf24952a6088affee9f752f75c3db8287801",
"url": "https://github.com/ghostty-org/ghostty/archive/d3cadf24952a6088affee9f752f75c3db8287801.tar.gz",
"hash": "sha256-OKeY9b+enmrLNKV9J2OCWYWNDC6MZuBbObknFCK8Qfs="
},
"hjem": { "hjem": {
"type": "Git", "type": "Git",
"repository": { "repository": {
@ -49,9 +36,9 @@
}, },
"branch": "main", "branch": "main",
"submodules": false, "submodules": false,
"revision": "2426d6ad20e767895e936ed0c9563cc4e2b6c96f", "revision": "3093a74542b30f8155954d585d0ae2401e3adbe5",
"url": "https://github.com/feel-co/hjem/archive/2426d6ad20e767895e936ed0c9563cc4e2b6c96f.tar.gz", "url": "https://github.com/feel-co/hjem/archive/3093a74542b30f8155954d585d0ae2401e3adbe5.tar.gz",
"hash": "sha256-WJ70Dv+tJjIl7mMOqUgcdcz+RrujDRoeKptiU6oh1lI=" "hash": "sha256-LzojKFWAAreWyH56aupj/MLwuPPnnyzplw/xdbavC9c="
}, },
"impermanence": { "impermanence": {
"type": "Git", "type": "Git",
@ -75,9 +62,9 @@
}, },
"branch": "master", "branch": "master",
"submodules": false, "submodules": false,
"revision": "892cbdca865d6b42f9c0d222fe309f7720259855", "revision": "785a5701b22259b85735301b1aad19c2bee15498",
"url": "https://github.com/nix-community/lanzaboote/archive/892cbdca865d6b42f9c0d222fe309f7720259855.tar.gz", "url": "https://github.com/nix-community/lanzaboote/archive/785a5701b22259b85735301b1aad19c2bee15498.tar.gz",
"hash": "sha256-aD6/scLN3L4ZszmNbhhd3JQ9Pzv1ScYFphz14wHinfs=" "hash": "sha256-pZQyCkqIFwGA77np+vqVQZgg2P0qPAI6x6kC3w6+PjE="
}, },
"lix": { "lix": {
"type": "Git", "type": "Git",
@ -89,9 +76,9 @@
}, },
"branch": "main", "branch": "main",
"submodules": false, "submodules": false,
"revision": "fe6395cd4d7aa1ffd415cb2267ff431b5c66152f", "revision": "321807a40e1fdd44d950ff01746c95cb6e2eced3",
"url": "https://git.lix.systems/lix-project/lix/archive/fe6395cd4d7aa1ffd415cb2267ff431b5c66152f.tar.gz", "url": "https://git.lix.systems/lix-project/lix/archive/321807a40e1fdd44d950ff01746c95cb6e2eced3.tar.gz",
"hash": "sha256-AGzXkcbafClvd31K/C/Nb9MByIws+WV0lYKQ1JzvVQA=" "hash": "sha256-2sDX5Nv/DGIzZH+3pIlAUpZfVlMGz7Hl/mqHUaic+p8="
}, },
"lix-module": { "lix-module": {
"type": "Git", "type": "Git",
@ -103,9 +90,9 @@
}, },
"branch": "main", "branch": "main",
"submodules": false, "submodules": false,
"revision": "1c906dd92e032bcb5a27f98cf53833cae889537f", "revision": "4d4c2b8f0a801c91ce5b717c77fe3a17efa1402f",
"url": "https://git.lix.systems/lix-project/nixos-module/archive/1c906dd92e032bcb5a27f98cf53833cae889537f.tar.gz", "url": "https://git.lix.systems/lix-project/nixos-module/archive/4d4c2b8f0a801c91ce5b717c77fe3a17efa1402f.tar.gz",
"hash": "sha256-IgD1JR7scSEwlK/YAbmrcTWpAYT30LPldCUHdzXkaMs=" "hash": "sha256-gbpuESxl/An4GTh7QEbQRYJozVIxWkwVGbWK0/0GoRc="
}, },
"nh": { "nh": {
"type": "Git", "type": "Git",
@ -116,9 +103,9 @@
}, },
"branch": "master", "branch": "master",
"submodules": false, "submodules": false,
"revision": "6cd62b00023932effbf57f21879f4d2deae4b256", "revision": "ec34a659652d98c225e2a97d100830365d7551c3",
"url": "https://github.com/nix-community/nh/archive/6cd62b00023932effbf57f21879f4d2deae4b256.tar.gz", "url": "https://github.com/nix-community/nh/archive/ec34a659652d98c225e2a97d100830365d7551c3.tar.gz",
"hash": "sha256-28NHVSsYAp4vdSApAmbbdkG4bjhBODPDiyx/E4uMGpc=" "hash": "sha256-+MuFPjyJl3JbNVs3Xq9dATJEbEOvwF4LMUNMmmzO7mU="
}, },
"nil": { "nil": {
"type": "Git", "type": "Git",
@ -129,9 +116,9 @@
}, },
"branch": "main", "branch": "main",
"submodules": false, "submodules": false,
"revision": "f80fe365cb441624d1608235e6e793e5dce47fb0", "revision": "cd7a6f6d5dc58484e62a8e85677e06e47cf2bd4d",
"url": "https://github.com/oxalica/nil/archive/f80fe365cb441624d1608235e6e793e5dce47fb0.tar.gz", "url": "https://github.com/oxalica/nil/archive/cd7a6f6d5dc58484e62a8e85677e06e47cf2bd4d.tar.gz",
"hash": "sha256-nFK2XhrDS5igmkDQWmyTcgiJsEr3KOcR31DaSy+Fy9s=" "hash": "sha256-fK4INnIJQNAA8cyjcDRZSPleA+N/STI6I0oBDMZ2r+E="
}, },
"niri": { "niri": {
"type": "GitRelease", "type": "GitRelease",
@ -168,8 +155,8 @@
"nixpkgs": { "nixpkgs": {
"type": "Channel", "type": "Channel",
"name": "nixpkgs-unstable", "name": "nixpkgs-unstable",
"url": "https://releases.nixos.org/nixpkgs/nixpkgs-25.11pre852965.c3e5d9f86b3f/nixexprs.tar.xz", "url": "https://releases.nixos.org/nixpkgs/nixpkgs-25.11pre836767.e44b8dc0882d/nixexprs.tar.xz",
"hash": "sha256-izg2LuZgjCZx+B6J+lYhk1Jo4L0yAHsZTRD8vHRhD9A=" "hash": "sha256-euf3HhNllLzdAjWqfM+sgM8WE8H8sl7O61LpjOxsQN8="
}, },
"npins": { "npins": {
"type": "Git", "type": "Git",
@ -180,9 +167,9 @@
}, },
"branch": "master", "branch": "master",
"submodules": false, "submodules": false,
"revision": "e4683671e145c652c371b6b8ad9b0d757c88853c", "revision": "afa9fe50cb0bff9ba7e9f7796892f71722b2180d",
"url": "https://github.com/andir/npins/archive/e4683671e145c652c371b6b8ad9b0d757c88853c.tar.gz", "url": "https://github.com/andir/npins/archive/afa9fe50cb0bff9ba7e9f7796892f71722b2180d.tar.gz",
"hash": "sha256-Nu86s1xok+1EFM0J9e55hrYPgfoutEZUDBpeXReCOaY=" "hash": "sha256-D6dYAMk9eYpBriE07s8Q7M3WBT7uM9pz3RKIoNk+h7I="
}, },
"quickshell": { "quickshell": {
"type": "Git", "type": "Git",
@ -192,9 +179,9 @@
}, },
"branch": "master", "branch": "master",
"submodules": false, "submodules": false,
"revision": "f7597cdae2d537c5b12843599955856090dc49d5", "revision": "a5431dd02dc23d9ef1680e67777fed00fe5f7cda",
"url": null, "url": null,
"hash": "sha256-UkKaPXTPzT7HAcBOV4NlWx2GAEJaTf0eb5OX6Q6jPqg=" "hash": "sha256-vqkSDvh7hWhPvNjMjEDV4KbSCv2jyl2Arh73ZXe274k="
}, },
"spicetify-nix": { "spicetify-nix": {
"type": "Git", "type": "Git",
@ -205,9 +192,9 @@
}, },
"branch": "master", "branch": "master",
"submodules": false, "submodules": false,
"revision": "2bedaf52261ef2adbe71af70820aeb41dfe9a5ef", "revision": "26c488b60360e15db372483d826cec89ac532980",
"url": "https://github.com/Gerg-L/spicetify-nix/archive/2bedaf52261ef2adbe71af70820aeb41dfe9a5ef.tar.gz", "url": "https://github.com/Gerg-L/spicetify-nix/archive/26c488b60360e15db372483d826cec89ac532980.tar.gz",
"hash": "sha256-lD4Zn37DWEx0X1DqM3npH68b7oh81H8BaaO3c6Ol/DQ=" "hash": "sha256-Ow+qyFckroPS4SQFHcFZ8mKh3HIQ2pQdC6DRjiYF9EE="
}, },
"systems": { "systems": {
"type": "Git", "type": "Git",
@ -231,9 +218,9 @@
}, },
"branch": "main", "branch": "main",
"submodules": false, "submodules": false,
"revision": "f68a9795616699870d213dc9e641dab655aa434a", "revision": "154724c7b1bd49654ea55df719e1eb3219ec2000",
"url": "https://github.com/notashelf/watt/archive/f68a9795616699870d213dc9e641dab655aa434a.tar.gz", "url": "https://github.com/notashelf/watt/archive/154724c7b1bd49654ea55df719e1eb3219ec2000.tar.gz",
"hash": "sha256-pETi/Fs+8FF2ZuE+JyK9+NcFaDPMHx71UdWgmzjxvkQ=" "hash": "sha256-hw3rL4rlIlYJMTeE7DlQ3lRhQDJURAhE+PC/NT4VAAQ="
} }
}, },
"version": 6 "version": 6

16
packages/default.nix Normal file
View file

@ -0,0 +1,16 @@
{
inputs,
pkgs,
sources,
}:
let
inherit (pkgs) lib;
kakoune = pkgs.callPackage ./kakoune.nix { };
fish = pkgs.callPackage ./fish { inherit lib; };
in
{
inherit
kakoune
fish
;
}

26
packages/fish/aliases.nix Normal file
View file

@ -0,0 +1,26 @@
{ pkgs, ... }:
let
inherit (pkgs.lib) getExe;
in
{
ls = "${getExe pkgs.eza} --icons=never";
la = "${getExe pkgs.eza} --icons=never -lha --git";
g = "git";
n = "nix";
k = "kak";
c = "clear";
cc = "cd ~ && clear";
mv = "mv -iv";
rm = "${pkgs.trash-cli}/bin/trash";
lg = "${getExe pkgs.lazygit}";
ytopus = "yt-dlp -x --embed-metadata --audio-quality 0 --audio-format opus --embed-metadata --embed-thumbnail";
cat = "${getExe pkgs.bat}";
kys = "shutdown now";
cd = "z";
}

View file

@ -0,0 +1 @@
set fish_greeting

45
packages/fish/default.nix Normal file
View file

@ -0,0 +1,45 @@
# This shell setup was originally inspired by sioodmy.
# Some further cool tricks, like using vendor_conf.d to avoid having
# to build fish myself, are taken from viperml's setup.
{ pkgs, ... }:
let
inherit (pkgs) lib;
inherit (lib.strings) concatStringsSep;
inherit (lib.attrsets) mapAttrsToList;
toml = pkgs.formats.toml { };
starship-config = import ./starship.nix;
aliases = import ./aliases.nix { inherit pkgs; };
vendorConf = "share/fish/vendor_conf.d";
fishinit = import ./fishinit.nix {
inherit
pkgs
aliasesStr
vendorConf
;
};
aliasesStr = mapAttrsToList (k: v: "alias ${k}=\"${v}\"") aliases |> concatStringsSep "\n";
packages = import ./packages.nix pkgs;
in
(pkgs.symlinkJoin {
name = "fish";
paths = [ pkgs.fish ] ++ packages;
nativeBuildInputs = [ pkgs.makeWrapper ];
postBuild = ''
wrapProgram $out/bin/fish \
--set STARSHIP_CONFIG "${toml.generate "starship.toml" starship-config}" \
--prefix XDG_DATA_DIRS : "${
lib.makeSearchPathOutput "out" "share" [
fishinit
]
}"
'';
}).overrideAttrs
(_: {
passthru = {
shellPath = "/bin/fish";
};
})

View file

@ -0,0 +1,34 @@
{
pkgs,
aliasesStr,
vendorConf,
}:
pkgs.writeTextDir "${vendorConf}/blox_config.fish"
# fish
''
# source ${pkgs.fishPlugins.sponge}/share/zsh-defer/zsh-defer.plugin.zsh
${pkgs.atuin}/bin/atuin init fish | source
bind up _atuin_bind_up
${pkgs.zoxide}/bin/zoxide init fish | source
# abbr --erase cd &>/dev/null
# alias cd=__zoxide_z
# abbr --erase ci &>/dev/null
# alias ci=__zoxide_zi
${pkgs.starship}/bin/starship init fish | source
${pkgs.direnv}/bin/direnv hook fish | source
${pkgs.pay-respects}/bin/pay-respects fish --alias f --nocnf | source
# I need to source /etc/profile using foreign-env, to get stuff set by nixos, e.g. environment.systemVariables.
# set -p fish_function_path ${pkgs.fishPlugins.foreign-env}/share/fish/vendor_functions.d
# fenv source /etc/profile
source ${./config.fish}
${aliasesStr}
''

View file

@ -0,0 +1,67 @@
pkgs:
builtins.attrValues {
inherit (pkgs)
# better cd
zoxide
# pipe viewer
pv
# hex editor
bvi
#better ls
eza
atuin
# better cat
bat
# clipboard
# yazi
serpl
diff-so-fancy
tig
direnv
sesh
mprocs
curlie
entr
procs
sd
# mult
glow
# dua-cli
dust
kondo
# better grep
ripgrep
# IP stuff
dig
# simply the best fetch tool out there
microfetch
fzf
element
difftastic
hexyl
yazi
gnumake
asciinema
inetutils
tokei
starship
wget
cpufetch
watchman
# yt-dlp # borked check phase
tealdeer
hyperfine
imagemagick
ffmpeg-full
# catimg
timg
nmap
fd
jq
rsync
figlet
unzip
zip
trash-cli
;
}

123
packages/fish/starship.nix Normal file
View file

@ -0,0 +1,123 @@
{
add_newline = false;
aws.symbol = " ";
buf.symbol = " ";
bun.symbol = " ";
c.symbol = " ";
cmake.symbol = " ";
conda.symbol = " ";
cpp.symbol = " ";
crystal.symbol = " ";
dart.symbol = " ";
deno.symbol = " ";
directory.read_only = " 󰌾";
docker_context.symbol = " ";
elixir.symbol = " ";
elm.symbol = " ";
fennel = {
symbol = " ";
};
fossil_branch = {
symbol = " ";
};
gcloud = {
symbol = " ";
};
git_branch = {
symbol = " ";
};
git_commit = {
tag_symbol = " ";
};
golang.symbol = " ";
gradle = {
symbol = " ";
};
guix_shell = {
symbol = " ";
};
haskell = {
symbol = " ";
};
haxe = {
symbol = " ";
};
hg_branch = {
symbol = " ";
};
hostname = {
ssh_symbol = " ";
};
java = {
symbol = " ";
};
julia = {
symbol = " ";
};
kotlin = {
symbol = " ";
};
lua = {
symbol = " ";
};
memory_usage = {
symbol = "󰍛 ";
};
meson = {
symbol = "󰔷 ";
};
nim = {
symbol = "󰆥 ";
};
nix_shell = {
symbol = " ";
};
nodejs = {
symbol = " ";
};
ocaml = {
symbol = " ";
};
os = {
symbols = {
Linux = " ";
NixOS = " ";
};
};
package = {
symbol = "󰏗 ";
};
perl = {
symbol = " ";
};
php = {
symbol = " ";
};
pijul_channel = {
symbol = " ";
};
pixi = {
symbol = "󰏗 ";
};
python = {
symbol = " ";
};
rlang = {
symbol = "󰟔 ";
};
ruby = {
symbol = " ";
};
rust = {
symbol = "󱘗 ";
};
scala = {
symbol = " ";
};
swift = {
symbol = " ";
};
zig = {
symbol = " ";
};
}

69
packages/kakoune.nix Normal file
View file

@ -0,0 +1,69 @@
{
fetchFromGitHub,
makeWrapper,
stdenv,
symlinkJoin,
kakounePlugins,
...
}:
let
custom-kakoune = stdenv.mkDerivation {
name = "custom-kakoune";
src = fetchFromGitHub {
owner = "mawww";
repo = "kakoune";
rev = "da5e5bc635fa6a3def21d3d59906b9ee0f1d1831";
hash = "sha256-+xqJrJr6nnmEpQaizQ3JMDEISCD8IMB84NJZiXJ74kY=";
};
makeFlags = [
"debug=no"
"PREFIX=${placeholder "out"}"
];
enableParallellBuilding = true;
doInstallCheck = false;
installCheckPhase = ''
$out/bin/kak -ui json -e "kill 0"
'';
postInstall = ''
cd "$out/share/kak"
autoload_target=$(readlink autoload)
rm autoload
mkdir autoload
ln -s --relative "$autoload_target" autoload
'';
};
plugins = builtins.attrValues {
inherit (kakounePlugins) ;
};
kakoune-wrapped = symlinkJoin {
name = "kakoune-wrapped";
nativeBuildInputs = [ makeWrapper ];
paths = [ custom-kakoune ] ++ plugins;
postBuild = ''
# create a directory for bins that kakoune needs
# access to, without polluting the users path by adding
# that binary nested with this symlinkJoin.
mkdir -p $out/share/kak/bin
# location of kak binary is used to find ../share/kak/autoload,
# unless explicitly overriden with KAKOUNE_RUNTIME
rm "$out/bin/kak"
makeWrapper "${custom-kakoune}/bin/kak" "$out/bin/kak" \
--set KAKOUNE_RUNTIME "$out/share/kak" \
--suffix PATH : "$out/share/kak/bin"
# currently kakoune ignores doc files if they are symlinks, so workaround by
# copying doc files over, so they become regular files...
mkdir "$out/DELETE_ME"
mv "$out/share/kak/doc" "$out/DELETE_ME"
cp -r --dereference "$out/DELETE_ME/doc" "$out/share/kak"
rm -Rf "$out/DELETE_ME"
'';
};
in
kakoune-wrapped

6
templates/default.nix Normal file
View file

@ -0,0 +1,6 @@
{
rust = {
path = ./rust;
description = "Rust project template";
};
}

1
templates/rust/.envrc Normal file
View file

@ -0,0 +1 @@
use flake

View file

@ -0,0 +1,5 @@
[package]
name = "sample-rust"
version = "0.0.1"
license = "GPL-3.0-only"
edition = "2024"

View file

@ -0,0 +1,8 @@
{ rustPlatform }:
rustPlatform.buildRustPackage {
pname = "some-rust-package";
version = "0.0.1";
src = ./.;
cargoLock.lockFile = ./Cargo.lock;
}

36
templates/rust/flake.nix Normal file
View file

@ -0,0 +1,36 @@
{
description = "Rust project template";
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
systems.url = "github:nix-systems/default-linux";
};
outputs =
inputs:
let
inherit (inputs.nixpkgs) lib;
inherit (lib.attrsets) genAttrs mapAttrs;
eachSystem = genAttrs (import inputs.systems);
pkgsFor = inputs.nixpkgs.legacyPackages;
in
{
packages = eachSystem (system: {
default = inputs.self.packages.${system}.ralc;
ralc = pkgsFor.${system}.callPackage ./nix/package.nix { };
});
devShells = mapAttrs (_: pkgs: {
default = pkgs.mkShell {
packages = with pkgs; [
cargo
rustc
rustfmt
bacon
rust-analyzer
rustPackages.clippy
];
};
}) pkgsFor;
};
}

View file

@ -0,0 +1,3 @@
fn main() {
println!("Hello World!");
}