Compare commits

...

10 commits

28 changed files with 308 additions and 415 deletions

View file

@ -1,26 +0,0 @@
{ lib, stdenv, fetchurl, perl, libbfd, libusb-compat-0_1, hidapi }:
stdenv.mkDerivation rec {
pname = "avarice";
version = "2.14";
src = fetchurl {
url =
"mirror://sourceforge/project/avarice/avarice/avarice-${version}/avarice-${version}.tar.bz2";
sha256 = "1ab2pxnkbw501iv1i9z9nj7hfzz4y7hid4l4q58cifm3aw17skjb";
};
nativeBuildInputs = [ perl ];
buildInputs = [ libbfd libusb-compat-0_1 hidapi ];
prePatch = ''
find src -type f -name '*.cc' -exec sed -i "s@ __unused@@g" {} \;
'';
meta = with lib; {
homepage = "http://avarice.sourceforge.net/";
description =
"A program to facilitate AVR debugging using an Atmel or AVR ICE";
license = licenses.gpl2;
platforms = platforms.unix;
maintainers = [ maintainers.artemist ];
};
}

View file

@ -1 +0,0 @@
*.cmd

View file

@ -1,26 +0,0 @@
{ stdenv, lib, kernel }:
stdenv.mkDerivation rec {
pname = "dptx-dummy";
version = "0.1";
src = ./src;
nativeBuildInputs = kernel.moduleBuildDependencies;
setSourceRoot = ''
export sourceRoot=$(pwd)/src;
'';
makeFlags = [
"-C"
"${kernel.dev}/lib/modules/${kernel.modDirVersion}/build"
"M=$(sourceRoot)"
];
buildFlags = [ "modules" ];
installFlags = [ "INSTALL_MOD_PATH=${placeholder "out"}" ];
installTargets = [ "modules_install" ];
meta = with lib; {
description = "Dummy module that requires rockchip/dptx.bin";
homepage = "https://artem.ist";
license = licenses.gpl2;
maintainers = [ maintainers.artemist ];
platforms = platforms.linux;
};
}

View file

@ -1 +0,0 @@
obj-m := dptx-dummy.o

View file

@ -1,6 +0,0 @@
#include <linux/module.h>
MODULE_LICENSE("GPL");
MODULE_AUTHOR("Artemis Tosini <me@artem.ist>");
MODULE_DESCRIPTION("Dummy module that requires rockchip/dptx.bin");
MODULE_FIRMWARE("rockchip/dptx.bin");

View file

@ -1,24 +0,0 @@
{ stdenv, lib, fetchFromGitHub, cmake, pkg-config, libusb1, libftdi1 }:
stdenv.mkDerivation rec {
pname = "fujprog";
version = "4.8";
src = fetchFromGitHub {
owner = "kost";
repo = pname;
rev = "v${version}";
sha256 = "08kzkzd5a1wfd1aycywdynxh3qy6n7z9i8lihkahmb4xac3chmz5";
};
nativeBuildInputs = [ cmake pkg-config ];
buildInputs = [ libftdi1 libusb1 ];
meta = with lib; {
description = "FPGA JTAG programmer for ULX2/3S boards";
homepage = "https://github.com/kost/fujprog";
license = licenses.bsd2;
platforms = platforms.linux;
maintainers = with maintainers; [ artemist ];
};
}

View file

@ -1,72 +0,0 @@
{ stdenv, lib, fetchurl, cups, dpkg, gnused, makeWrapper, ghostscript, file
, a2ps, coreutils, gawk, perl, gnugrep, which }:
let
version = "3.2.0-1";
lprdeb = fetchurl {
url =
"https://download.brother.com/welcome/dlf101900/hll2300dlpr-${version}.i386.deb";
sha256 = "093ya7qykhk8mnbiwz1wy0qly66mmk0ghd1rgla25biask5nnmwv";
};
cupsdeb = fetchurl {
url =
"https://download.brother.com/welcome/dlf101901/hll2300dcupswrapper-${version}.i386.deb";
sha256 = "1fylsbnxbljh517lbdr3324jsi4fwhbfh6gzrdvifg0wl20vfwqr";
};
in stdenv.mkDerivation {
name = "cups-brother-hll2300dw";
nativeBuildInputs = [ makeWrapper ];
buildInputs = [ cups ghostscript dpkg a2ps ];
dontUnpack = true;
installPhase = ''
mkdir -p $out
dpkg-deb -x ${cupsdeb} $out
dpkg-deb -x ${lprdeb} $out
substituteInPlace $out/opt/brother/Printers/HLL2300D/lpd/filter_HLL2300D \
--replace /opt "$out/opt" \
--replace /usr/bin/perl ${perl}/bin/perl \
--replace "BR_PRT_PATH =~" "BR_PRT_PATH = \"$out/opt/brother/Printers/HLL2300D/\"; #" \
--replace "PRINTER =~" "PRINTER = \"HLL2300D\"; #"
patchelf --set-interpreter $(cat $NIX_CC/nix-support/dynamic-linker) \
$out/opt/brother/Printers/HLL2300D/lpd/brprintconflsr3
patchelf --set-interpreter $(cat $NIX_CC/nix-support/dynamic-linker) \
$out/opt/brother/Printers/HLL2300D/lpd/rawtobr3
for f in \
$out/opt/brother/Printers/HLL2300D/cupswrapper/brother_lpdwrapper_HLL2300D \
$out/opt/brother/Printers/HLL2300D/cupswrapper/paperconfigml1 \
; do
wrapProgram $f \
--prefix PATH : ${
lib.makeBinPath [ coreutils ghostscript gnugrep gnused ]
}
done
mkdir -p $out/lib/cups/filter/
ln -s $out/opt/brother/Printers/HLL2300D/lpd/filter_HLL2300D $out/lib/cups/filter/brother_lpdwrapper_HLL2300D
mkdir -p $out/share/cups/model
ln -s $out/opt/brother/Printers/HLL2300D/cupswrapper/brother-HLL2300D-cups-en.ppd $out/share/cups/model/
wrapProgram $out/opt/brother/Printers/HLL2300D/lpd/filter_HLL2300D \
--prefix PATH ":" ${
lib.makeBinPath [ ghostscript a2ps file gnused gnugrep coreutils which ]
}
'';
meta = with lib; {
homepage = "http://www.brother.com/";
description = "Brother hl-l2300dw printer driver";
license = licenses.unfree;
platforms = platforms.linux;
downloadPage =
"https://support.brother.com/g/b/downloadlist.aspx?c=de&lang=de&prod=hll2300d_us_eu_as&os=128&flang=English";
maintainers = [ maintainers.artemist ];
};
}

View file

@ -1 +1 @@
{"x86_64-linux": {"url": "https://www.segger.com/downloads/jlink/JLink_Linux_V792d_x86_64.tgz", "version": "7.92d", "curlOpts": "-d accept_license_agreement=accepted -d submit=Download+software", "hash": "sha256-G46nq135PAp4xYu1BJEtgZ1bF+n2DsaHPMmbOXHdvgY="}, "i686-linux": {"url": "https://www.segger.com/downloads/jlink/JLink_Linux_V792d_i686.tgz", "version": "7.92d", "curlOpts": "-d accept_license_agreement=accepted -d submit=Download+software", "hash": "sha256-Neh1ifv3l3mpmxFvH4FEj5T6bnn5LuafRO9CVtA0fww="}, "armv7l-linux": {"url": "https://www.segger.com/downloads/jlink/JLink_Linux_V792d_arm.tgz", "version": "7.92d", "curlOpts": "-d accept_license_agreement=accepted -d submit=Download+software", "hash": "sha256-Lp3ffshRbB5dzgei4dyxlH5iyDTrDwR/yNq4NigVajg="}, "aarch64-linux": {"url": "https://www.segger.com/downloads/jlink/JLink_Linux_V792d_arm64.tgz", "version": "7.92d", "curlOpts": "-d accept_license_agreement=accepted -d submit=Download+software", "hash": "sha256-XacF5u7LF1a50eYJ5czUIQ+bjbmfZXu3XjxrWZwPPNw="}} {"x86_64-linux": {"url": "https://www.segger.com/downloads/jlink/JLink_Linux_V792m_x86_64.tgz", "version": "7.92m", "curlOpts": "-d accept_license_agreement=accepted -d submit=Download+software", "hash": "sha256-BuLwiszQfdQJdTdMUbOqflYG4zU3HHMDf+JejvIQkps="}, "i686-linux": {"url": "https://www.segger.com/downloads/jlink/JLink_Linux_V792m_i686.tgz", "version": "7.92m", "curlOpts": "-d accept_license_agreement=accepted -d submit=Download+software", "hash": "sha256-QOdjOlBGqKKuOzYpKE2p6P1mBimXzxE2oKB0iWbp440="}, "armv7l-linux": {"url": "https://www.segger.com/downloads/jlink/JLink_Linux_V792m_arm.tgz", "version": "7.92m", "curlOpts": "-d accept_license_agreement=accepted -d submit=Download+software", "hash": "sha256-KUpP6aNh7e3HA/X3Mov3nz3didcKMUaIAaFA5cYd2Kg="}, "aarch64-linux": {"url": "https://www.segger.com/downloads/jlink/JLink_Linux_V792m_arm64.tgz", "version": "7.92m", "curlOpts": "-d accept_license_agreement=accepted -d submit=Download+software", "hash": "sha256-hF3cBCRDRwvVudafOFFdD0pEIjoYWjiJtVz7vgtclx8="}}

View file

@ -1,33 +0,0 @@
{ stdenv, lib, rustPlatform, fetchFromGitHub, pkg-config, cmake, openssl
, llvmPackages, weechat }:
rustPlatform.buildRustPackage rec {
pname = "weechat-matrix-rs";
version = "20210530";
src = fetchFromGitHub {
owner = "poljar";
repo = pname;
rev = "a846e76b7abf9b70fbcbf955255f99fde185b9cb";
sha256 = "1gx5vxc8391i8cr6d8r6gwywypl0zn3d1xjydg6y6228qcxl3vmm";
};
cargoSha256 = "0ikarh474dmbbmg6nz24fap6dqgxg0hy2kp3jpknaz8rgdvjsvjb";
WEECHAT_PLUGIN_FILE = "${weechat}/include/weechat/weechat-plugin.h";
LIBCLANG_PATH = "${llvmPackages.libclang.lib}/lib";
nativeBuildInputs = [ pkg-config cmake llvmPackages.clang ];
buildInputs = [ openssl ];
preFixup = ''
mkdir -p $out/lib/weechat/plugins
mv $out/lib/libmatrix.so $out/lib/weechat/plugins/matrix.so
'';
meta = with lib; {
description = "Rust rewrite of the python weechat-matrix script.";
homepage = "https://github.com/poljar/weechat-matrix-rs";
license = licenses.mit;
matinainers = [ maintainers.artemist ];
};
}

View file

@ -201,11 +201,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1695550077, "lastModified": 1698250431,
"narHash": "sha256-xoxR/iY69/3lTnnZDP6gf3J46DUKPcf+Y1jH03tfZXE=", "narHash": "sha256-qs2gTeH4wpnWPO6Oi6sOhp2IhG0i0DzcnrJxIY3/CP8=",
"owner": "nix-community", "owner": "nix-community",
"repo": "home-manager", "repo": "home-manager",
"rev": "a88df2fb101778bfd98a17556b3a2618c6c66091", "rev": "09587fbbc6a669f7725613e044c2577dc5d43ab5",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -243,13 +243,33 @@
"type": "github" "type": "github"
} }
}, },
"nix-index-database": {
"inputs": {
"nixpkgs": [
"nixpkgs"
]
},
"locked": {
"lastModified": 1697946153,
"narHash": "sha256-7k7qIwWLaYPgQ4fxmEdew3yCffhK6rM4I4Jo3X/79DA=",
"owner": "nix-community",
"repo": "nix-index-database",
"rev": "5a2006282caaf32663cdcd582c5b18809c7d7d8d",
"type": "github"
},
"original": {
"owner": "nix-community",
"repo": "nix-index-database",
"type": "github"
}
},
"nixos-hardware": { "nixos-hardware": {
"locked": { "locked": {
"lastModified": 1695541019, "lastModified": 1698053470,
"narHash": "sha256-rs++zfk41K9ArWkDAlmBDlGlKO8qeRIRzdjo+9SmNFI=", "narHash": "sha256-sP8D/41UiwC2qn0X40oi+DfuVzNHMROqIWdSdCI/AYA=",
"owner": "nixos", "owner": "nixos",
"repo": "nixos-hardware", "repo": "nixos-hardware",
"rev": "61283b30d11f27d5b76439d43f20d0c0c8ff5296", "rev": "80d98a7d55c6e27954a166cb583a41325e9512d7",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -260,11 +280,11 @@
}, },
"nixpkgs": { "nixpkgs": {
"locked": { "locked": {
"lastModified": 1695360818, "lastModified": 1698134075,
"narHash": "sha256-JlkN3R/SSoMTa+CasbxS1gq+GpGxXQlNZRUh9+LIy/0=", "narHash": "sha256-foCD+nuKzfh49bIoiCBur4+Fx1nozo+4C/6k8BYk4sg=",
"owner": "nixos", "owner": "nixos",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "e35dcc04a3853da485a396bdd332217d0ac9054f", "rev": "8efd5d1e283604f75a808a20e6cde0ef313d07d4",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -318,11 +338,11 @@
"pre-commit-hooks": "pre-commit-hooks" "pre-commit-hooks": "pre-commit-hooks"
}, },
"locked": { "locked": {
"lastModified": 1695300485, "lastModified": 1698386104,
"narHash": "sha256-lPxXM584q9AVdUZxbEJgIPVeg39X6GWIENuENRxyHqo=", "narHash": "sha256-/QwUn8G1ERjl82RFFTTI/2ulOTV9Mbeog97old9tZl0=",
"owner": "nix-community", "owner": "nix-community",
"repo": "nixvim", "repo": "nixvim",
"rev": "32a64af2318beac3c89d4d1fa0b73ce237c5cf1e", "rev": "315bc508ee0bfb62b6608f8f445126158ca2cc35",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -370,11 +390,11 @@
"nixpkgs-stable": "nixpkgs-stable_2" "nixpkgs-stable": "nixpkgs-stable_2"
}, },
"locked": { "locked": {
"lastModified": 1694364351, "lastModified": 1698227354,
"narHash": "sha256-oadhSCqopYXxURwIA6/Anpe5IAG11q2LhvTJNP5zE6o=", "narHash": "sha256-Fi5H9jbaQLmLw9qBi/mkR33CoFjNbobo5xWdX4tKz1Q=",
"owner": "cachix", "owner": "cachix",
"repo": "pre-commit-hooks.nix", "repo": "pre-commit-hooks.nix",
"rev": "4f883a76282bc28eb952570afc3d8a1bf6f481d7", "rev": "bd38df3d508dfcdff52cd243d297f218ed2257bf",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -416,11 +436,11 @@
}, },
"private": { "private": {
"locked": { "locked": {
"lastModified": 1692761801, "lastModified": 1696997284,
"narHash": "sha256-+mYwFUA7H5FG1uAst2CBuj+FFKQ7+u9N4KbBerFvVsA=", "narHash": "sha256-4Gh4M1kKThixZNc8Nm0oxm+tqkpaqM+lslr0UT2SS0o=",
"ref": "unified", "ref": "unified",
"rev": "2e75302ff38830fdebecaa24ee0debebb9fab3d8", "rev": "2dd16f02cfdba921cef8655879a0d59af2a89604",
"revCount": 32, "revCount": 33,
"type": "git", "type": "git",
"url": "ssh://git@github.com/artemist/nixos-config-private" "url": "ssh://git@github.com/artemist/nixos-config-private"
}, },
@ -435,6 +455,7 @@
"fonts": "fonts", "fonts": "fonts",
"home-manager": "home-manager", "home-manager": "home-manager",
"lanzaboote": "lanzaboote", "lanzaboote": "lanzaboote",
"nix-index-database": "nix-index-database",
"nixos-hardware": "nixos-hardware", "nixos-hardware": "nixos-hardware",
"nixpkgs": "nixpkgs", "nixpkgs": "nixpkgs",
"nixvim": "nixvim", "nixvim": "nixvim",
@ -479,11 +500,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1695603143, "lastModified": 1696963281,
"narHash": "sha256-7iR+IWQcKdRwazFQSM5RxfvXihN1jILVN7jx2QObG2g=", "narHash": "sha256-gwLI5QDyw7Jj2d+W5t6UJOuHCTuCmm1B25UlO3eNvUQ=",
"owner": "mildlyfunctionalgays", "owner": "mildlyfunctionalgays",
"repo": "rustybar", "repo": "rustybar",
"rev": "ea274f26c9fc3a1adc88b9b80dd67f35330f65a3", "rev": "73886c37da6d3db8791fb6ed60dd370b5f3c8c5f",
"type": "github" "type": "github"
}, },
"original": { "original": {

View file

@ -22,6 +22,10 @@
inputs.nixpkgs.follows = "nixpkgs"; inputs.nixpkgs.follows = "nixpkgs";
inputs.flake-utils.follows = "utils"; inputs.flake-utils.follows = "utils";
}; };
nix-index-database = {
url = "github:nix-community/nix-index-database";
inputs.nixpkgs.follows = "nixpkgs";
};
rustybar = { rustybar = {
url = "github:mildlyfunctionalgays/rustybar"; url = "github:mildlyfunctionalgays/rustybar";
inputs.nixpkgs.follows = "nixpkgs"; inputs.nixpkgs.follows = "nixpkgs";
@ -67,7 +71,18 @@
modules = [ ./system/mistmane ]; modules = [ ./system/mistmane ];
}; };
} // utils.lib.eachDefaultSystem (system: } // utils.lib.eachDefaultSystem (system:
let pkgs = import nixpkgs { inherit system; }; let
in { formatter = pkgs.nixfmt; }); pkgs = import nixpkgs {
inherit system;
config.allowUnfree = true;
};
in {
formatter = pkgs.nixfmt;
packages = {
jlink = pkgs.callPackage ./externals/packages/jlink { };
nvim = inputs.nixvim.legacyPackages."${system}".makeNixvim
(import ./sets/nvim.nix { inherit pkgs inputs; });
};
});
} }

View file

@ -6,8 +6,16 @@
useGlobalPkgs = true; useGlobalPkgs = true;
}; };
home-manager.users.artemis = { home-manager.users.artemis = {
imports = imports = [
[ ./fish.nix ./gtk.nix ./git.nix ./mpv.nix ./kitty.nix ./ssh ./gpg.nix ]; ./fish.nix
./gtk.nix
./git.nix
./mpv.nix
./kitty.nix
./ssh
./gpg.nix
./dirs.nix
];
home.stateVersion = config.system.stateVersion; home.stateVersion = config.system.stateVersion;

10
home/dirs.nix Normal file
View file

@ -0,0 +1,10 @@
{ config, lib, ... }:
{
xdg.userDirs = with lib; {
enable = true;
documents = mkDefault "${config.home.homeDirectory}/Dokumente";
music = mkDefault "${config.home.homeDirectory}/Musik";
pictures = mkDefault "${config.home.homeDirectory}/Bilder";
};
}

View file

@ -3,7 +3,7 @@ scrolling:
font: font:
normal: normal:
family: FiraCode Nerd Font family: Fira Code
size: 8 size: 8
shell: shell:

View file

@ -4,6 +4,7 @@
nix = { nix = {
buildMachines = [{ buildMachines = [{
hostName = "starlight.manehattan.artem.ist"; hostName = "starlight.manehattan.artem.ist";
protocol = "ssh-ng";
sshUser = "build"; sshUser = "build";
supportedFeatures = [ "kvm" "big-parallel" "benchmark" "nixos-text" ]; supportedFeatures = [ "kvm" "big-parallel" "benchmark" "nixos-text" ];
system = "x86_64-linux"; system = "x86_64-linux";

View file

@ -18,6 +18,5 @@
tinyprog tinyprog
wishbone-tool wishbone-tool
openfpgaloader openfpgaloader
(callPackage ../externals/packages/fujproj { })
]; ];
} }

View file

@ -1,4 +1,4 @@
{ config, pkgs, ... }: { pkgs, ... }:
{ {
programs = { programs = {
@ -10,13 +10,11 @@
}; };
environment.systemPackages = with pkgs; [ environment.systemPackages = with pkgs; [
apktool apktool
aircrack-ng
nmap nmap
pwndbg pwndbg
python3Packages.binwalk-full python3Packages.binwalk-full
fusee-launcher fusee-launcher
hactool
]; ];
users.users.artemis.extraGroups = [ "adbusers" "wireshark" ]; users.users.artemis.extraGroups = [ "adbusers" "wireshark" ];

View file

@ -4,12 +4,14 @@ in {
services.udev.packages = [ services.udev.packages = [
(pkgs.callPackage ../externals/rules/adafruit.nix { }) (pkgs.callPackage ../externals/rules/adafruit.nix { })
(pkgs.callPackage ../externals/rules/limesuite.nix { }) (pkgs.callPackage ../externals/rules/limesuite.nix { })
pkgs.glasgow
pkgs.libsigrok pkgs.libsigrok
pkgs.openocd pkgs.openocd
pkgs.platformio pkgs.platformio
]; ];
environment.systemPackages = with pkgs; [ environment.systemPackages = with pkgs; [
glasgow
jlink jlink
kicad kicad
openocd openocd

6
sets/nix-index.nix Normal file
View file

@ -0,0 +1,6 @@
{ inputs, ... }: {
imports = [ inputs.nix-index-database.nixosModules.nix-index ];
programs.command-not-found.enable = false;
programs.nix-index-database.comma.enable = true;
}

View file

@ -1,180 +1,171 @@
{ pkgs, inputs, ... }: { pkgs, ... }:
{ {
imports = [ inputs.nixvim.nixosModules.nixvim ]; vimAlias = true;
environment.sessionVariables = { # Basic editing / QoL
EDITOR = "nvim"; editorconfig.enable = true;
VISUAL = "nvim"; colorschemes.kanagawa.enable = true;
}; plugins = {
programs.nixvim = { nix.enable = true;
enable = true; fugitive.enable = true;
vimAlias = true; gitgutter.enable = true;
lualine.enable = true;
# Basic editing / QoL typst-vim.enable = true;
editorconfig.enable = true; telescope = {
colorschemes.kanagawa.enable = true;
plugins = {
nix.enable = true;
fugitive.enable = true;
gitgutter.enable = true;
lualine.enable = true;
typst-vim.enable = true;
telescope = {
enable = true;
keymaps = {
"<leader>tgf" = "git_files";
"<leader>tb" = "buffers";
"<leader>tl" = "live_grep";
"<leader>ts" = "grep_string";
"<leader>tf" = "find_files";
"<leader>tt" = "builtin";
gd = "lsp_definitions";
gt = "lsp_type_definitions";
gr = "lsp_references";
gi = "lsp_implementations";
gcd = "diagnostics";
gsd = "lsp_document_symbols";
gsw = "lsp_workspace_symbols";
gci = "lsp_incoming_calls";
gco = "lsp_outgoing_calls";
"<leader>tgs" = "git_status";
"<leader>tgb" = "git_branches";
"<leader>tgc" = "git_commits";
};
};
};
extraPlugins = with pkgs.vimPlugins; [
vim-fetch
vim-fish
vim-flatbuffers
vim-nftables
vim-protobuf
vim-toml
];
options = {
hidden = true;
backup = false;
writebackup = false;
cmdheight = 2;
shortmess = "filnxtToOFc";
signcolumn = "yes";
number = true;
};
# LSP
plugins.rust-tools = {
enable = true; enable = true;
server.standalone = false;
};
plugins.clangd-extensions.enable = true;
plugins.lsp = {
enable = true;
servers = {
clangd.enable = true;
java-language-server.enable = true;
jsonls.enable = true;
nil_ls.enable = true;
pylsp.enable = true;
texlab.enable = true;
tsserver.enable = true;
typst-lsp.enable = true;
};
keymaps = { keymaps = {
silent = true; "<leader>tgf" = "git_files";
diagnostic = { "<leader>tb" = "buffers";
"<leader>rk" = "goto_prev"; "<leader>tl" = "live_grep";
"<leader>rj" = "goto_next"; "<leader>ts" = "grep_string";
}; "<leader>tf" = "find_files";
lspBuf = { "<leader>tt" = "builtin";
K = "hover";
gD = "declaration";
"<leader>ra" = "code_action"; gd = "lsp_definitions";
"<leader>rn" = "rename"; gt = "lsp_type_definitions";
"<leader>rs" = "signature_help"; gr = "lsp_references";
"<leader>f" = "format"; gi = "lsp_implementations";
}; gcd = "diagnostics";
gsd = "lsp_document_symbols";
gsw = "lsp_workspace_symbols";
gci = "lsp_incoming_calls";
gco = "lsp_outgoing_calls";
"<leader>tgs" = "git_status";
"<leader>tgb" = "git_branches";
"<leader>tgc" = "git_commits";
}; };
};
};
extraPlugins = with pkgs.vimPlugins; [
vim-fetch
vim-fish
vim-flatbuffers
vim-nftables
vim-protobuf
vim-toml
];
options = {
hidden = true;
backup = false;
writebackup = false;
cmdheight = 2;
shortmess = "filnxtToOFc";
signcolumn = "yes";
number = true;
};
onAttach = '' # LSP
if client.server_capabilities.documentHighlightProvider then plugins.rust-tools = {
vim.api.nvim_create_augroup("lsp_document_highlight", { clear = true }) enable = true;
vim.api.nvim_clear_autocmds { buffer = bufnr, group = "lsp_document_highlight" } server.standalone = false;
vim.api.nvim_create_autocmd("CursorHold", { };
callback = vim.lsp.buf.document_highlight, plugins.clangd-extensions.enable = true;
buffer = bufnr, plugins.lsp = {
group = "lsp_document_highlight", enable = true;
desc = "Document Highlight", servers = {
}) clangd.enable = true;
vim.api.nvim_create_autocmd("CursorMoved", { java-language-server.enable = true;
callback = vim.lsp.buf.clear_references, jsonls.enable = true;
buffer = bufnr, nil_ls.enable = true;
group = "lsp_document_highlight", pylsp.enable = true;
desc = "Clear All the References", texlab.enable = true;
}) tsserver.enable = true;
end typst-lsp.enable = true;
'';
}; };
# Autocomplete keymaps = {
plugins = { silent = true;
luasnip.enable = true; diagnostic = {
cmp-cmdline.enable = true; "<leader>rk" = "goto_prev";
cmp-git.enable = true; "<leader>rj" = "goto_next";
cmp-buffer.enable = true; };
nvim-cmp = { lspBuf = {
enable = true; K = "hover";
snippet.expand = "luasnip"; gD = "declaration";
sources = [
{ name = "luasnip"; } "<leader>ra" = "code_action";
{ name = "nvim_lsp"; } "<leader>rn" = "rename";
{ name = "path"; } "<leader>rs" = "signature_help";
{ name = "calc"; } "<leader>f" = "format";
{ name = "emoji"; }
];
mappingPresets = [ "insert" "cmdline" ];
mapping = {
"<CR>" = "cmp.mapping.confirm({ select = true })";
"<C-b>" = "cmp.mapping.scroll_docs(-4)";
"<C-f>" = "cmp.mapping.scroll_docs(4)";
"<C-Space>" = "cmp.mapping.complete()";
"<C-e>" = "cmp.mapping.abort()";
};
}; };
}; };
# For some reason you can't do this directly in nix? onAttach = ''
extraConfigLuaPost = '' if client.server_capabilities.documentHighlightProvider then
do vim.api.nvim_create_augroup("lsp_document_highlight", { clear = true })
local cmp = require('cmp') vim.api.nvim_clear_autocmds { buffer = bufnr, group = "lsp_document_highlight" }
cmp.setup.filetype('gitcommit', { vim.api.nvim_create_autocmd("CursorHold", {
sources = cmp.config.sources({ callback = vim.lsp.buf.document_highlight,
{ name = 'git' }, buffer = bufnr,
}, { group = "lsp_document_highlight",
{ name = 'buffer' }, desc = "Document Highlight",
}) })
}) vim.api.nvim_create_autocmd("CursorMoved", {
callback = vim.lsp.buf.clear_references,
cmp.setup.cmdline({ '/', '?' }, { buffer = bufnr,
mapping = cmp.mapping.preset.cmdline(), group = "lsp_document_highlight",
sources = { desc = "Clear All the References",
{ name = 'buffer' }
}
})
cmp.setup.cmdline(':', {
mapping = cmp.mapping.preset.cmdline(),
sources = cmp.config.sources({
{ name = 'path' }
}, {
{ name = 'cmdline' }
}) })
})
end end
''; '';
}; };
# Autocomplete
plugins = {
luasnip.enable = true;
cmp-cmdline.enable = true;
cmp-git.enable = true;
cmp-buffer.enable = true;
nvim-cmp = {
enable = true;
snippet.expand = "luasnip";
sources = [
{ name = "luasnip"; }
{ name = "nvim_lsp"; }
{ name = "path"; }
{ name = "calc"; }
{ name = "emoji"; }
];
mappingPresets = [ "insert" "cmdline" ];
mapping = {
"<CR>" = "cmp.mapping.confirm({ select = true })";
"<C-b>" = "cmp.mapping.scroll_docs(-4)";
"<C-f>" = "cmp.mapping.scroll_docs(4)";
"<C-Space>" = "cmp.mapping.complete()";
"<C-e>" = "cmp.mapping.abort()";
};
};
};
# For some reason you can't do this directly in nix?
extraConfigLuaPost = ''
do
local cmp = require('cmp')
cmp.setup.filetype('gitcommit', {
sources = cmp.config.sources({
{ name = 'git' },
}, {
{ name = 'buffer' },
})
})
cmp.setup.cmdline({ '/', '?' }, {
mapping = cmp.mapping.preset.cmdline(),
sources = {
{ name = 'buffer' }
}
})
cmp.setup.cmdline(':', {
mapping = cmp.mapping.preset.cmdline(),
sources = cmp.config.sources({
{ name = 'path' }
}, {
{ name = 'cmdline' }
})
})
end
'';
} }

View file

@ -34,8 +34,9 @@
# Filesystems # Filesystems
cifs-utils cifs-utils
exfatprogs
nfs-utils nfs-utils
ntfs3g ntfsprogs
udftools udftools
# Useful CLI tools # Useful CLI tools
@ -91,10 +92,9 @@
rustup rustup
# Security # Security
(pass.withExtensions (exts: [ exts.pass-otp ])) pass
wireguard-tools wireguard-tools
yubikey-manager yubikey-manager
yubioath-flutter
# GUI tools # GUI tools
alacritty alacritty
@ -102,6 +102,7 @@
gnome3.eog gnome3.eog
gnome3.gnome-system-monitor gnome3.gnome-system-monitor
libreoffice-fresh libreoffice-fresh
nheko
qalculate-gtk qalculate-gtk
libqalculate libqalculate

View file

@ -20,16 +20,17 @@
mako mako
polkit_gnome polkit_gnome
slurp slurp
swayidle
swaylock
waypipe waypipe
wf-recorder wf-recorder
wl-clipboard wl-clipboard
wofi wofi
wofi-emoji wofi-emoji
wtype
xdg-user-dirs xdg-user-dirs
xdg_utils xdg_utils
xsettingsd xsettingsd
swaylock
swayidle
]; ];
hardware.opengl.enable = true; hardware.opengl.enable = true;

View file

@ -1,24 +1,35 @@
{ config, pkgs, ... }: { pkgs, inputs, ... }@args:
{ {
imports = imports = [
[ ./sway.nix ./packages.nix ./pipewire.nix ./base.nix ./nvim.nix ../home ]; ./sway.nix
./packages.nix
./pipewire.nix
./base.nix
../home
./nix-index.nix
inputs.nixvim.nixosModules.nixvim
];
i18n.defaultLocale = "de_DE.UTF-8"; i18n.defaultLocale = "de_DE.UTF-8";
i18n.supportedLocales = [ "all" ]; i18n.supportedLocales = [ "all" ];
environment = { environment = {
variables.EDITOR = "nvim"; variables.EDITOR = "nvim";
variables.VISUAL = "nvim";
variables.TERMINAL = "kitty"; variables.TERMINAL = "kitty";
enableDebugInfo = true; enableDebugInfo = true;
}; };
programs.nixvim = import ./nvim.nix args // { enable = true; };
services = { services = {
avahi = { avahi = {
enable = true; enable = true;
nssmdns = true; nssmdns = true;
}; };
flatpak.enable = true; flatpak.enable = true;
fwupd.enable = true;
pcscd.enable = true; pcscd.enable = true;
printing.enable = true; printing.enable = true;
udev.packages = [ (pkgs.callPackage ../externals/rules/uhk.nix { }) ]; udev.packages = [ (pkgs.callPackage ../externals/rules/uhk.nix { }) ];
@ -26,6 +37,8 @@
programs.ssh.startAgent = true; programs.ssh.startAgent = true;
programs.nix-ld.enable = true;
hardware = { hardware = {
bluetooth.enable = true; bluetooth.enable = true;
opengl.driSupport32Bit = (pkgs.system == "x86_64-linux"); opengl.driSupport32Bit = (pkgs.system == "x86_64-linux");

View file

@ -8,7 +8,6 @@
../../sets/buildMachines.nix ../../sets/buildMachines.nix
../../sets/hacking.nix ../../sets/hacking.nix
../../sets/hardware.nix ../../sets/hardware.nix
../../sets/ime.nix
../../sets/krb5.nix ../../sets/krb5.nix
../../sets/laptop.nix ../../sets/laptop.nix
../../sets/secureBoot.nix ../../sets/secureBoot.nix

View file

@ -14,4 +14,9 @@
allowDiscards = true; allowDiscards = true;
}; };
}]; }];
# This has to go in crypttab because we won't have the keyfile in the initrd
environment.etc.crypttab.text = ''
microsd /dev/disk/by-uuid/51ed9e97-06cf-4c54-a71a-c182bb0ced9e /var/lib/private/µsd_key
'';
} }

View file

@ -4,11 +4,12 @@
imports = [ imports = [
./boot-config.nix ./boot-config.nix
./hardware-configuration.nix ./hardware-configuration.nix
../../sets/1password.nix
../../sets/buildMachines.nix
../../sets/hacking.nix ../../sets/hacking.nix
../../sets/laptop.nix ../../sets/laptop.nix
../../sets/secureBoot.nix ../../sets/secureBoot.nix
../../sets/sshd.nix ../../sets/sshd.nix
../../sets/buildMachines.nix
../../sets/workstation.nix ../../sets/workstation.nix
inputs.nixos-hardware.nixosModules.gpd-micropc inputs.nixos-hardware.nixosModules.gpd-micropc
]; ];
@ -16,29 +17,32 @@
networking.hostName = "spike"; networking.hostName = "spike";
system.stateVersion = "23.11"; system.stateVersion = "23.11";
home-manager.users.artemis.xdg.configFile."rustybar/config.toml".text = '' home-manager.users.artemis = {
[[tile]] xdg.configFile."rustybar/config.toml".text = ''
type = "load" [[tile]]
[[tile]] type = "load"
type = "memory" [[tile]]
[[tile]] type = "memory"
type = "hostname" [[tile]]
[[tile]] type = "hostname"
type = "battery" [[tile]]
[[tile]] type = "battery"
type = "time" [[tile]]
format = "%Y-%m-%dT%H:%M:%S" type = "time"
''; format = "%Y-%m-%dT%H:%M:%S"
'';
home-manager.users.artemis.wayland.windowManager.sway.config = { wayland.windowManager.sway.config = {
output."DSI-1" = { output."DSI-1" = {
pos = "0 0"; pos = "0 0";
mode = "720x1280@60.083Hz"; mode = "720x1280@60.083Hz";
transform = "90"; transform = "90";
}; };
input."24704:32865:AMR-4630-XXX-0-_0-1023_USB_KEYBOARD_Mouse" = { input."24704:32865:AMR-4630-XXX-0-_0-1023_USB_KEYBOARD_Mouse" = {
scroll_method = "on_button_down"; scroll_method = "on_button_down";
scroll_button = "BTN_MIDDLE"; scroll_button = "BTN_MIDDLE";
};
}; };
xdg.userDirs.music = "/media/µsd/Musik";
}; };
} }

View file

@ -22,6 +22,11 @@
fsType = "vfat"; fsType = "vfat";
}; };
fileSystems."/media/µsd" = {
device = "/dev/disk/by-uuid/9fc168c9-849d-4897-8f0c-564f0b74b3ef";
fsType = "ext4";
};
swapDevices = [ ]; swapDevices = [ ];
# Enables DHCP on each ethernet and wireless interface. In case of scripted networking # Enables DHCP on each ethernet and wireless interface. In case of scripted networking

View file

@ -11,7 +11,6 @@
../../sets/fpga.nix ../../sets/fpga.nix
../../sets/hacking.nix ../../sets/hacking.nix
../../sets/hardware.nix ../../sets/hardware.nix
../../sets/ime.nix
../../sets/krb5.nix ../../sets/krb5.nix
../../sets/music.nix ../../sets/music.nix
../../sets/radio.nix ../../sets/radio.nix
@ -136,6 +135,10 @@
type = "time" type = "time"
format = "%Y-%m-%dT%H:%M:%S" format = "%Y-%m-%dT%H:%M:%S"
''; '';
xdg.userDirs = {
music = "/media/data/Musik";
pictures = "/media/luna/photos";
};
}; };
# NixOS # NixOS
system.stateVersion = "21.11"; system.stateVersion = "21.11";