this repo has no description

ft: big update for a lot of stuff

hauleth.dev a7b8255f d2d3e9a1

verified
+1 -1
Makefile
···
-
TARGETS ?= vim wm misc
+
TARGETS ?= vim
all: nix $(TARGETS)
-6
certs/.gitignore
···
-
*.key
-
*.csr
-
*.crt
-
*.pem
-
*.srl
-
*.conf
-62
certs/Makefile
···
-
DOMAIN ?= localhost
-
NAME ?= ${DOMAIN}
-
-
CAKEY ?= CAkey.key
-
CACERT ?= CAcert.pem
-
-
SIGN_REQ ?= ${NAME}.csr
-
CERT ?= ${NAME}.crt
-
PEM ?= ${NAME}.pem
-
KEY ?= ${NAME}.key
-
-
CA = "/C=PL/ST=Wlkp/O=/localityName=Poznan/CN=Hauleth/emailAddress=lukasz@niemier.pl"
-
-
SUBJECT = "/CN=*.${DOMAIN}"
-
-
VERIFY_OPTS = -purpose sslserver -CAfile ${CACERT}
-
-
verify: ${PEM} ${CACERT}
-
openssl version
-
openssl x509 -noout -text -in "$<"
-
openssl verify ${VERIFY_OPTS} -verify_hostname ${DOMAIN} $<
-
openssl verify ${VERIFY_OPTS} -verify_hostname test.${DOMAIN} $<
-
-
clean:
-
$(RM) -f "${CERT}" "${SIGN_REQ}" "${PEM}" "${KEY}"
-
-
${CAKEY}:
-
openssl genrsa -out "$@" 2048
-
-
${CACERT}: ${CAKEY}
-
openssl req -new -key "$<" -out "$@" \
-
-subj ${CA} -x509 -nodes -sha256 -days 1825
-
-
installCA: ${CACERT}
-
security import "$<"
-
security add-trusted-cert "$<"
-
-
cleanCA:
-
security remove-trusted-cert "${CACERT}"
-
$(RM) -f "${CACERT}" "${CAKEY}"
-
-
config.conf:
-
echo 'subjectAltName=$${ENV::SAN}' > "$@"
-
-
${KEY}:
-
openssl genrsa -out "$@" 2048
-
-
${SIGN_REQ}: ${KEY}
-
openssl req -new -sha256 -subj $(SUBJECT) -key "$<" -out "$@" \
-
-addext "subjectAltName=DNS:${DOMAIN},DNS:*.${DOMAIN}"
-
-
${CERT}: ${SIGN_REQ} ${CACERT} ${CAKEY} config.conf
-
SAN="DNS:${DOMAIN},DNS:*.${DOMAIN}" \
-
openssl x509 -req -out "$@" -in ${SIGN_REQ} \
-
-CA ${CACERT} -CAkey ${CAKEY} -CAcreateserial \
-
-days 365 -sha256 \
-
-extfile config.conf
-
-
${PEM}: ${CERT} ${KEY}
-
cat ${CERT} ${KEY} > "$@"
-
-
.PHONY: clean verify install installCA cleanCA
+4 -2
dev_shells.nix
···
lib,
stdenv,
darwin,
+
lexical,
+
livebook,
}: {
livebook = pkgs.mkShell {
-
packages = with beam.packages.erlang; [
+
packages = [
livebook
];
···
packages =
[
elixir
-
elixir-ls
+
lexical
]
++ lib.optionals stdenv.isDarwin [
darwin.apple_sdk.frameworks.CoreFoundation
+392 -32
flake.lock
···
"nodes": {
"agnoster": {
"inputs": {
-
"flake-utils": [
-
"flake-utils"
-
],
+
"flake-utils": "flake-utils",
"nixpkgs": [
"nixpkgs"
]
},
"locked": {
-
"lastModified": 1625824140,
-
"narHash": "sha256-0/FgJlQULIXKhQIt3z3ugAGubgMlwFZa/cjGjiq7BcA=",
+
"lastModified": 1703255311,
+
"narHash": "sha256-M3qjuDNwApF/YgHOIoOm2tE7XMnfwYXqGXfYRBVGvEA=",
"owner": "hauleth",
"repo": "agnoster",
-
"rev": "7312ebb59769d5ff503fd06b174103f0f7ba368a",
+
"rev": "11e25b851f3087b8e64285e07cc6498cb2d6b6ff",
"type": "github"
},
"original": {
···
"type": "github"
}
},
+
"beam": {
+
"inputs": {
+
"flake-parts": "flake-parts",
+
"nixpkgs": "nixpkgs"
+
},
+
"locked": {
+
"lastModified": 1705850239,
+
"narHash": "sha256-Mvnu0c+Hoahju/hI/2EdhrZCdU3r7Yhnp/wyEiVZFcU=",
+
"owner": "shanesveller",
+
"repo": "nix-beam-flakes",
+
"rev": "842337993cb8f7c52c723b3d4cb0bfa1b71a4299",
+
"type": "github"
+
},
+
"original": {
+
"owner": "shanesveller",
+
"repo": "nix-beam-flakes",
+
"type": "github"
+
}
+
},
"darwin": {
"inputs": {
"nixpkgs": [
···
]
},
"locked": {
-
"lastModified": 1684148371,
-
"narHash": "sha256-CEVaArsziqantqU418XXruNDjPZN/HC3x1rqr2D4g+o=",
+
"lastModified": 1705915768,
+
"narHash": "sha256-+Jlz8OAqkOwJlioac9wtpsCnjgGYUhvLpgJR/5tP9po=",
"owner": "lnl7",
"repo": "nix-darwin",
-
"rev": "0dbf1c2fb1a5a0372a324eff1ba44f9da66febd2",
+
"rev": "1e706ef323de76236eb183d7784f3bd57255ec0b",
"type": "github"
},
"original": {
···
"type": "github"
}
},
-
"flake-utils": {
+
"flake-compat": {
+
"flake": false,
+
"locked": {
+
"lastModified": 1696426674,
+
"narHash": "sha256-kvjfFW7WAETZlt09AgDn1MrtKzP7t90Vf7vypd3OL1U=",
+
"owner": "edolstra",
+
"repo": "flake-compat",
+
"rev": "0f9255e01c2351cc7d116c072cb317785dd33b33",
+
"type": "github"
+
},
+
"original": {
+
"owner": "edolstra",
+
"repo": "flake-compat",
+
"type": "github"
+
}
+
},
+
"flake-parts": {
"inputs": {
-
"systems": "systems"
+
"nixpkgs-lib": "nixpkgs-lib"
+
},
+
"locked": {
+
"lastModified": 1704982712,
+
"narHash": "sha256-2Ptt+9h8dczgle2Oo6z5ni5rt/uLMG47UFTR1ry/wgg=",
+
"owner": "hercules-ci",
+
"repo": "flake-parts",
+
"rev": "07f6395285469419cf9d078f59b5b49993198c00",
+
"type": "github"
+
},
+
"original": {
+
"owner": "hercules-ci",
+
"repo": "flake-parts",
+
"type": "github"
+
}
+
},
+
"flake-parts_2": {
+
"inputs": {
+
"nixpkgs-lib": "nixpkgs-lib_2"
+
},
+
"locked": {
+
"lastModified": 1704982712,
+
"narHash": "sha256-2Ptt+9h8dczgle2Oo6z5ni5rt/uLMG47UFTR1ry/wgg=",
+
"owner": "hercules-ci",
+
"repo": "flake-parts",
+
"rev": "07f6395285469419cf9d078f59b5b49993198c00",
+
"type": "github"
+
},
+
"original": {
+
"id": "flake-parts",
+
"type": "indirect"
+
}
+
},
+
"flake-parts_3": {
+
"inputs": {
+
"nixpkgs-lib": "nixpkgs-lib_3"
},
"locked": {
-
"lastModified": 1681202837,
-
"narHash": "sha256-H+Rh19JDwRtpVPAWp64F+rlEtxUWBAQW28eAi3SRSzg=",
+
"lastModified": 1701473968,
+
"narHash": "sha256-YcVE5emp1qQ8ieHUnxt1wCZCC3ZfAS+SRRWZ2TMda7E=",
+
"owner": "hercules-ci",
+
"repo": "flake-parts",
+
"rev": "34fed993f1674c8d06d58b37ce1e0fe5eebcb9f5",
+
"type": "github"
+
},
+
"original": {
+
"owner": "hercules-ci",
+
"repo": "flake-parts",
+
"type": "github"
+
}
+
},
+
"flake-parts_4": {
+
"inputs": {
+
"nixpkgs-lib": [
+
"nixvim",
+
"nixpkgs"
+
]
+
},
+
"locked": {
+
"lastModified": 1704982712,
+
"narHash": "sha256-2Ptt+9h8dczgle2Oo6z5ni5rt/uLMG47UFTR1ry/wgg=",
+
"owner": "hercules-ci",
+
"repo": "flake-parts",
+
"rev": "07f6395285469419cf9d078f59b5b49993198c00",
+
"type": "github"
+
},
+
"original": {
+
"owner": "hercules-ci",
+
"repo": "flake-parts",
+
"type": "github"
+
}
+
},
+
"flake-utils": {
+
"locked": {
+
"lastModified": 1634851050,
+
"narHash": "sha256-N83GlSGPJJdcqhUxSCS/WwW5pksYf3VP1M13cDRTSVA=",
"owner": "numtide",
"repo": "flake-utils",
-
"rev": "cfacdce06f30d2b68473a46042957675eebb3401",
+
"rev": "c91f3de5adaf1de973b797ef7485e441a65b8935",
"type": "github"
},
"original": {
-
"id": "flake-utils",
-
"type": "indirect"
+
"owner": "numtide",
+
"repo": "flake-utils",
+
"type": "github"
}
},
"flake-utils_2": {
···
"type": "github"
}
},
+
"flake-utils_3": {
+
"inputs": {
+
"systems": "systems_2"
+
},
+
"locked": {
+
"lastModified": 1701680307,
+
"narHash": "sha256-kAuep2h5ajznlPMD9rnQyffWG8EM/C73lejGofXvdM8=",
+
"owner": "numtide",
+
"repo": "flake-utils",
+
"rev": "4022d587cbbfd70fe950c1e2083a02621806a725",
+
"type": "github"
+
},
+
"original": {
+
"owner": "numtide",
+
"repo": "flake-utils",
+
"type": "github"
+
}
+
},
+
"gitignore": {
+
"inputs": {
+
"nixpkgs": [
+
"nixvim",
+
"pre-commit-hooks",
+
"nixpkgs"
+
]
+
},
+
"locked": {
+
"lastModified": 1703887061,
+
"narHash": "sha256-gGPa9qWNc6eCXT/+Z5/zMkyYOuRZqeFZBDbopNZQkuY=",
+
"owner": "hercules-ci",
+
"repo": "gitignore.nix",
+
"rev": "43e1aa1308018f37118e34d3a9cb4f5e75dc11d5",
+
"type": "github"
+
},
+
"original": {
+
"owner": "hercules-ci",
+
"repo": "gitignore.nix",
+
"type": "github"
+
}
+
},
"home-manager": {
"inputs": {
"nixpkgs": [
···
]
},
"locked": {
-
"lastModified": 1684061181,
-
"narHash": "sha256-EJpZ+Drpt3aHpowddpsQFBWsqLSJHyP6dnremTVMdWw=",
+
"lastModified": 1706221476,
+
"narHash": "sha256-T4b8YafVjHXvtDY8ARec1WrXO8uyyNZOpNgv9yoQy2M=",
"owner": "nix-community",
"repo": "home-manager",
-
"rev": "e4272987f785a8848205263abb4911b922c21e1b",
+
"rev": "c7ce343d9bf1a329056a4dd5b32ea8cc43b55e15",
"type": "github"
},
"original": {
···
"type": "indirect"
}
},
+
"home-manager_2": {
+
"inputs": {
+
"nixpkgs": [
+
"nixvim",
+
"nixpkgs"
+
]
+
},
+
"locked": {
+
"lastModified": 1705879479,
+
"narHash": "sha256-ZIohbyly1KOe+8I3gdyNKgVN/oifKdmeI0DzMfytbtg=",
+
"owner": "nix-community",
+
"repo": "home-manager",
+
"rev": "2d47379ad591bcb14ca95a90b6964b8305f6c913",
+
"type": "github"
+
},
+
"original": {
+
"owner": "nix-community",
+
"repo": "home-manager",
+
"type": "github"
+
}
+
},
+
"lexical": {
+
"inputs": {
+
"flake-parts": "flake-parts_3",
+
"nixpkgs": "nixpkgs_2",
+
"systems": "systems"
+
},
+
"locked": {
+
"lastModified": 1705938621,
+
"narHash": "sha256-GV9nJu+D2OacTSubXrGyTU8m2XDyMC13wKLd9i7DQcw=",
+
"owner": "lexical-lsp",
+
"repo": "lexical",
+
"rev": "556958bc67ed8417425a0fb3cde9ea5d5bb49877",
+
"type": "github"
+
},
+
"original": {
+
"owner": "lexical-lsp",
+
"repo": "lexical",
+
"type": "github"
+
}
+
},
+
"nix-darwin": {
+
"inputs": {
+
"nixpkgs": [
+
"nixvim",
+
"nixpkgs"
+
]
+
},
+
"locked": {
+
"lastModified": 1705915768,
+
"narHash": "sha256-+Jlz8OAqkOwJlioac9wtpsCnjgGYUhvLpgJR/5tP9po=",
+
"owner": "lnl7",
+
"repo": "nix-darwin",
+
"rev": "1e706ef323de76236eb183d7784f3bd57255ec0b",
+
"type": "github"
+
},
+
"original": {
+
"owner": "lnl7",
+
"repo": "nix-darwin",
+
"type": "github"
+
}
+
},
"nix-elixir": {
"inputs": {
"flake-utils": "flake-utils_2",
-
"nixpkgs": "nixpkgs"
+
"nixpkgs": "nixpkgs_3"
},
"locked": {
-
"lastModified": 1672929845,
-
"narHash": "sha256-wLd7006LmsVZJcok8QMzeHjFFS7bOivsKP52QNeR5UU=",
+
"lastModified": 1704300128,
+
"narHash": "sha256-G5qMIxeoKvcXjsBOP32E9UCh0Atjvc/mcatG8MH8QZ4=",
"owner": "hauleth",
"repo": "nix-elixir",
-
"rev": "b461d4d95a8797efc96c375bc82e88d849efabe6",
+
"rev": "fcdeded8314bed0ef21b7d9b25a17b2d290f2bc3",
"type": "github"
},
"original": {
···
},
"nixpkgs": {
"locked": {
-
"lastModified": 1669867399,
-
"narHash": "sha256-Z8RXSFYOsIsTG96ROKtV0eZ8Q7u4irFWm6ELqfw7mT8=",
+
"lastModified": 1705677747,
+
"narHash": "sha256-eyM3okYtMgYDgmYukoUzrmuoY4xl4FUujnsv/P6I/zI=",
+
"owner": "nixos",
+
"repo": "nixpkgs",
+
"rev": "bbe7d8f876fbbe7c959c90ba2ae2852220573261",
+
"type": "github"
+
},
+
"original": {
"owner": "NixOS",
+
"ref": "nixpkgs-unstable",
"repo": "nixpkgs",
-
"rev": "38e591dd05ffc8bdf79dc752ba78b05e370416fa",
+
"type": "github"
+
}
+
},
+
"nixpkgs-lib": {
+
"locked": {
+
"dir": "lib",
+
"lastModified": 1703961334,
+
"narHash": "sha256-M1mV/Cq+pgjk0rt6VxoyyD+O8cOUiai8t9Q6Yyq4noY=",
+
"owner": "NixOS",
+
"repo": "nixpkgs",
+
"rev": "b0d36bd0a420ecee3bc916c91886caca87c894e9",
"type": "github"
},
"original": {
+
"dir": "lib",
+
"owner": "NixOS",
+
"ref": "nixos-unstable",
+
"repo": "nixpkgs",
+
"type": "github"
+
}
+
},
+
"nixpkgs-lib_2": {
+
"locked": {
+
"dir": "lib",
+
"lastModified": 1703961334,
+
"narHash": "sha256-M1mV/Cq+pgjk0rt6VxoyyD+O8cOUiai8t9Q6Yyq4noY=",
+
"owner": "NixOS",
+
"repo": "nixpkgs",
+
"rev": "b0d36bd0a420ecee3bc916c91886caca87c894e9",
+
"type": "github"
+
},
+
"original": {
+
"dir": "lib",
+
"owner": "NixOS",
+
"ref": "nixos-unstable",
+
"repo": "nixpkgs",
+
"type": "github"
+
}
+
},
+
"nixpkgs-lib_3": {
+
"locked": {
+
"dir": "lib",
+
"lastModified": 1701253981,
+
"narHash": "sha256-ztaDIyZ7HrTAfEEUt9AtTDNoCYxUdSd6NrRHaYOIxtk=",
+
"owner": "NixOS",
+
"repo": "nixpkgs",
+
"rev": "e92039b55bcd58469325ded85d4f58dd5a4eaf58",
+
"type": "github"
+
},
+
"original": {
+
"dir": "lib",
+
"owner": "NixOS",
+
"ref": "nixos-unstable",
+
"repo": "nixpkgs",
+
"type": "github"
+
}
+
},
+
"nixpkgs_2": {
+
"locked": {
+
"lastModified": 1699725108,
+
"narHash": "sha256-NTiPW4jRC+9puakU4Vi8WpFEirhp92kTOSThuZke+FA=",
+
"path": "/nix/store/1ryprai4bllkrna60cmcygxc4qyn79s1-source",
+
"rev": "911ad1e67f458b6bcf0278fa85e33bb9924fed7e",
+
"type": "path"
+
},
+
"original": {
"id": "nixpkgs",
"type": "indirect"
}
},
-
"nixpkgs_2": {
+
"nixpkgs_3": {
+
"locked": {
+
"lastModified": 1704008649,
+
"narHash": "sha256-rGPSWjXTXTurQN9beuHdyJhB8O761w1Zc5BqSSmHvoM=",
+
"owner": "NixOS",
+
"repo": "nixpkgs",
+
"rev": "d44d59d2b5bd694cd9d996fd8c51d03e3e9ba7f7",
+
"type": "github"
+
},
+
"original": {
+
"id": "nixpkgs",
+
"type": "indirect"
+
}
+
},
+
"nixpkgs_4": {
"locked": {
-
"lastModified": 1684120848,
-
"narHash": "sha256-gIwJ5ac1FwZEkCRwjY+gLwgD4G1Bw3Xtr2jr2XihMPo=",
+
"lastModified": 1706173671,
+
"narHash": "sha256-lciR7kQUK2FCAYuszyd7zyRRmTaXVeoZsCyK6QFpGdk=",
"owner": "NixOS",
"repo": "nixpkgs",
-
"rev": "0cb867999eec4085e1c9ca61c09b72261fa63bb4",
+
"rev": "4fddc9be4eaf195d631333908f2a454b03628ee5",
"type": "github"
},
"original": {
···
"type": "indirect"
}
},
+
"nixvim": {
+
"inputs": {
+
"flake-parts": "flake-parts_4",
+
"home-manager": "home-manager_2",
+
"nix-darwin": "nix-darwin",
+
"nixpkgs": [
+
"nixpkgs"
+
],
+
"pre-commit-hooks": "pre-commit-hooks"
+
},
+
"locked": {
+
"lastModified": 1706281253,
+
"narHash": "sha256-MH9HOZCjeCGP5ZPiqYlO3X/HO+qLC/TqlL6+lPxJiV4=",
+
"owner": "nix-community",
+
"repo": "nixvim",
+
"rev": "d13755597173dacd2023f48ac7724498402f2521",
+
"type": "github"
+
},
+
"original": {
+
"owner": "nix-community",
+
"repo": "nixvim",
+
"type": "github"
+
}
+
},
+
"pre-commit-hooks": {
+
"inputs": {
+
"flake-compat": "flake-compat",
+
"flake-utils": "flake-utils_3",
+
"gitignore": "gitignore",
+
"nixpkgs": [
+
"nixvim",
+
"nixpkgs"
+
],
+
"nixpkgs-stable": [
+
"nixvim",
+
"nixpkgs"
+
]
+
},
+
"locked": {
+
"lastModified": 1705757126,
+
"narHash": "sha256-Eksr+n4Q8EYZKAN0Scef5JK4H6FcHc+TKNHb95CWm+c=",
+
"owner": "cachix",
+
"repo": "pre-commit-hooks.nix",
+
"rev": "f56597d53fd174f796b5a7d3ee0b494f9e2285cc",
+
"type": "github"
+
},
+
"original": {
+
"owner": "cachix",
+
"repo": "pre-commit-hooks.nix",
+
"type": "github"
+
}
+
},
"root": {
"inputs": {
"agnoster": "agnoster",
+
"beam": "beam",
"darwin": "darwin",
-
"flake-utils": "flake-utils",
+
"flake-parts": "flake-parts_2",
"home-manager": "home-manager",
+
"lexical": "lexical",
"nix-elixir": "nix-elixir",
-
"nixpkgs": "nixpkgs_2"
+
"nixpkgs": "nixpkgs_4",
+
"nixvim": "nixvim"
}
},
"systems": {
+
"locked": {
+
"lastModified": 1681028828,
+
"narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=",
+
"owner": "nix-systems",
+
"repo": "default",
+
"rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e",
+
"type": "github"
+
},
+
"original": {
+
"owner": "nix-systems",
+
"repo": "default",
+
"type": "github"
+
}
+
},
+
"systems_2": {
"locked": {
"lastModified": 1681028828,
"narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=",
+79 -87
flake.nix
···
inputs = {
nixpkgs.url = "nixpkgs/nixpkgs-unstable";
-
flake-utils.url = "flake:flake-utils";
+
flake-parts.url = "flake:flake-parts";
+
home-manager = {
url = "flake:home-manager";
inputs.nixpkgs.follows = "nixpkgs";
···
agnoster = {
url = "github:hauleth/agnoster";
inputs.nixpkgs.follows = "nixpkgs";
-
inputs.flake-utils.follows = "flake-utils";
};
nix-elixir.url = "github:hauleth/nix-elixir";
# nix-elixir.url = "flake:nix-elixir";
···
url = "github:lnl7/nix-darwin";
inputs.nixpkgs.follows = "nixpkgs";
};
+
+
lexical.url = "github:lexical-lsp/lexical";
+
+
beam.url = "github:shanesveller/nix-beam-flakes";
+
+
nixvim = {
+
url = "github:nix-community/nixvim";
+
inputs.nixpkgs.follows = "nixpkgs";
+
};
};
outputs = {
self,
-
darwin,
-
nixpkgs,
-
home-manager,
-
agnoster,
-
flake-utils,
-
nix-elixir,
+
flake-parts,
...
-
} @ inputs: let
-
overlays = [
-
agnoster.overlay
-
nix-elixir.overlay
-
(import ./pkgs)
-
];
-
in
-
flake-utils.lib.eachDefaultSystem
-
(system: let
-
pkgs = import nixpkgs {inherit system overlays;};
-
in {
-
formatter = pkgs.alejandra;
+
} @ inputs:
+
flake-parts.lib.mkFlake {inherit inputs;} {
+
flake = {
+
lib = {
+
readFileWithComments = path: let
+
lib = inputs.nixpkgs.lib;
+
content = lib.strings.fileContents path;
+
notComment = line: !lib.strings.hasPrefix "#" line;
+
in
+
builtins.filter notComment (lib.strings.splitString "\n" content);
+
};
-
packages = {
-
home = pkgs.writeScriptBin "activate-home" ''
-
${home-manager.packages.${system}.default}/bin/home-manager --flake "${self}" "$@"
-
'';
+
# TODO: Automatically discover and build that
+
darwinConfigurations."NiunioBook" =
+
(import ./hosts/niuniobook.nix {inherit inputs;})
+
.system;
+
darwinConfigurations."MacBook-Pro" =
+
(import ./hosts/niuniobook.nix {inherit inputs;})
+
.system;
-
system = let
-
emptyConfiguration = darwin.lib.darwinSystem {
-
inherit system;
+
homeConfigurations."hauleth" =
+
(import ./users/hauleth.nix {inherit inputs;})
+
.home;
-
modules = [];
+
templates = {
+
elixir = {
+
path = ./templates/elixir;
+
description = "Basic requirements for Elixir applications";
};
-
builder =
-
if pkgs.stdenv.isDarwin
-
then "${emptyConfiguration.system}/sw/bin/darwin-rebuild"
-
else pkgs.lib.getExe pkgs.nixos-rebuid;
-
in pkgs.writeScriptBin "activate-system" ''
-
${builder} --flake "${self}#''$(hostname -s)" "$@"
-
'';
+
};
};
-
devShells =
-
(pkgs.callPackage ./dev_shells.nix {})
-
// {
+
systems = ["x86_64-darwin" "aarch64-darwin"];
+
+
perSystem = {
+
self',
+
pkgs,
+
system,
+
inputs',
+
...
+
}: {
+
formatter = pkgs.alejandra;
+
+
packages = (pkgs.callPackage ./pkgs {}) // {
+
default = pkgs.writeScriptBin "activate" ''
+
echo ========= System =========
+
${pkgs.lib.getExe self'.packages.system} switch
+
echo
+
echo ========= Home =========
+
${pkgs.lib.getExe self'.packages.home} switch
+
'';
+
+
home = pkgs.writeScriptBin "activate-home" ''
+
${pkgs.lib.getExe inputs'.home-manager.packages.default} --flake "${self}" "$@"
+
'';
+
+
system = let
+
builder =
+
if pkgs.stdenv.isDarwin
+
then pkgs.lib.getExe' inputs'.darwin.packages.darwin-rebuild "darwin-rebuild"
+
else pkgs.lib.getExe pkgs.nixos-rebuid;
+
in
+
pkgs.writeScriptBin "activate-system" ''
+
${builder} --flake "${self}" "$@"
+
'';
+
};
+
+
devShells = let
+
globalShells = pkgs.callPackage ./dev_shells.nix {
+
inherit (inputs'.lexical.packages) lexical;
+
inherit (inputs'.beam.packages) livebook;
+
};
default = pkgs.mkShell {
packages = [
pkgs.fnlfmt
···
pkgs.stow
];
};
-
};
-
})
-
// {
-
lib = {
-
readFileWithComments = path: let
-
lib = nixpkgs.lib;
-
content = lib.strings.fileContents path;
-
notComment = line: !lib.strings.hasPrefix "#" line;
in
-
builtins.filter notComment (lib.strings.splitString "\n" content);
-
};
-
-
# TODO: Automatically discover and build that
-
darwinConfigurations."NiunioBook" =
-
(import ./hosts/niuniobook.nix {
-
inherit inputs overlays;
-
})
-
.system;
-
-
homeConfigurations."hauleth" = home-manager.lib.homeManagerConfiguration {
-
pkgs = import nixpkgs {
-
system = "x86_64-darwin";
-
inherit overlays;
-
};
-
-
extraSpecialArgs = {
-
inherit inputs;
-
};
-
-
modules = [
-
{
-
home.username = "hauleth";
-
home.homeDirectory = "/Users/hauleth/";
-
}
-
./modules/fish.nix
-
./modules/direnv.nix
-
./modules/git.nix
-
./modules/plan.nix
-
./modules/ctags.nix
-
./modules/curl.nix
-
{ home.stateVersion = "22.11"; }
-
];
-
};
-
-
-
templates = {
-
elixir = {
-
path = ./templates/elixir;
-
description = "Basic requirements for Elixir applications";
-
};
+
globalShells // {inherit default;};
};
};
}
-30
git/.config/git/attributes
···
-
# Elixir
-
*.ex diff=elixir
-
*.exs diff=elixir
-
mix.lock merge=binary
-
-
# Erlang
-
*.erl diff=erlang
-
*.hrl diff=erlang
-
rebar.lock merge=binary
-
-
# TeX
-
*.tex diff=tex
-
-
# Rust
-
*.rs diff=rust
-
Cargo.lock merge=binary
-
-
# CSS
-
*.css diff=css
-
-
# Ruby
-
*.rb diff=ruby
-
-
# Python
-
*.py diff=python
-
-
# Markdown
-
*.md diff=markdown
-
*.mdown diff=markdown
-
*.markdown diff=markdown
-132
git/.config/git/config
···
-
[core]
-
commitGraph = true
-
-
[pager]
-
difftool = true
-
diff = "diff-so-fancy | less --tabs=4 -RFX"
-
-
[init]
-
defaultBranch = master
-
-
[user]
-
useConfigOnly = true
-
-
[feature]
-
experimental = true
-
manyFiles = true
-
-
[alias]
-
ai = add -i
-
b = branch
-
ca = commit --amend
-
ci = commit
-
co = checkout
-
cob = checkout -b
-
lg = log --color --graph --abbrev-commit --pretty=simple-oneline
-
rci = commit --amend --reuse-message HEAD
-
squash = rebase --interactive --autosquash @{upstream}
-
rbase = "!git rebase --interactive --autosquash $(git merge-base $(git default-branch))"
-
st = status -sb
-
todo = grep -Ee '\\bTODO:?\\b'
-
fixme = grep -Ee '\\bFIX(ME)?:?\\b'
-
com = "!git checkout $(git default-branch)"
-
skip = update-index --skip-worktree
-
unskip = update-index --no-skip-worktree
-
default-branch = "!git symbolic-ref --short refs/remotes/origin/HEAD | sed 's|^origin/||'"
-
update = "!git rebase -i \"$(git merge-base HEAD \"$(git default-branch)\")\""
-
cleanup = "!git branch --format=\"%(if:notequals=*)%(HEAD)%(then)%(if:notequals=${1:-$(git default-branch)})%(refname:lstrip=2)%(then)%(refname:lstrip=2)%(end)%(end)\" --merged "$(git default-branch)" | xargs -rpxL1 git branch -d"
-
-
[pretty]
-
simple-oneline = "%C(yellow)%h%C(auto)%d %s [%C(green)%aN <%aE>%C(reset)] (%C(blue)%ar%C(reset))"
-
simple-oneline-sign = "%C(yellow)%h%C(auto)%d %s [%C(green)%aN <%aE>%C(reset)] (%C(blue)%ar%C(reset)) %G?"
-
-
[merge]
-
conflictstyle = diff3
-
-
[branch]
-
autoSetupRebase = always
-
[push]
-
default = simple
-
autoSetupRemote = true
-
followTags = true
-
gpgSign = if-asked
-
[pull]
-
rebase = true
-
twohead = ort
-
[merge]
-
ff = false
-
[rebase]
-
autostash = true
-
autosquash = true
-
updateRefs = true
-
[fetch]
-
prune = true
-
[help]
-
autocorrect = 5
-
-
# Automatically sign all tags and commits
-
[tag]
-
forceSignAnnotated = true
-
sort = version:refname
-
[versionsort]
-
suffix = ""
-
suffix = "-rc"
-
suffix = "-pre"
-
[commit]
-
gpgSign = true
-
verbose = true
-
cleanup = scissors
-
-
[filter "lfs"]
-
clean = git-lfs clean -- %f
-
smudge = git-lfs smudge -- %f
-
process = git-lfs filter-process
-
required = true
-
-
[rerere]
-
enabled = false
-
-
[diff]
-
indentHeuristic = true
-
algorithm = histogram
-
mnemonicPrefix = true
-
tool = difftastic
-
-
[diff "markdown"]
-
xfuncname = "^(#+\\s+.*)$"
-
-
[difftool]
-
prompt = false
-
-
[difftool "difftastic"]
-
cmd = difft "$LOCAL" "$REMOTE"
-
-
[color]
-
ui = true
-
-
[color.diff]
-
old = magenta
-
new = blue
-
-
[color.diff-highlight]
-
oldNormal = "blue"
-
oldHighlight = "blue reverse"
-
newNormal = "yellow"
-
newHighlight = "yellow reverse"
-
-
[pack]
-
useSparse = true
-
-
[sendemail]
-
annotate = true
-
confirm = always
-
thread = true
-
supersscc = self
-
-
[gpg]
-
; format = ssh
-
-
[gpg.ssh]
-
defaultKeyCommand = "ssh-add -L"
-
-
# vim: ft=gitconfig noexpandtab sw=8
-12
git/.config/git/hooks.d/email/pre-commit
···
-
#!/bin/bash
-
-
if ! git config --get user.email >/dev/null
-
then
-
printf "No identity set, set one using 'git identity <name>'" \
-
| cowsay -f dragon-and-cow -W 60
-
echo ""
-
-
git identity --list
-
-
exit 1
-
fi
-3
git/.config/git/hooks.d/lfs/post-checkout
···
-
#!/bin/sh
-
command -v git-lfs >/dev/null 2>&1 || { echo >&2 "\nThis repository is configured for Git LFS but 'git-lfs' was not found on your path. If you no longer wish to use Git LFS, remove this hook by deleting .git/hooks/post-merge.\n"; exit 2; }
-
git lfs post-checkout "$@"
-3
git/.config/git/hooks.d/lfs/post-commit
···
-
#!/bin/sh
-
command -v git-lfs >/dev/null 2>&1 || { echo >&2 "\nThis repository is configured for Git LFS but 'git-lfs' was not found on your path. If you no longer wish to use Git LFS, remove this hook by deleting .git/hooks/post-merge.\n"; exit 2; }
-
git lfs post-commit "$@"
-3
git/.config/git/hooks.d/lfs/post-merge
···
-
#!/bin/sh
-
command -v git-lfs >/dev/null 2>&1 || { echo >&2 "\nThis repository is configured for Git LFS but 'git-lfs' was not found on your path. If you no longer wish to use Git LFS, remove this hook by deleting .git/hooks/post-merge.\n"; exit 2; }
-
git lfs post-merge "$@"
-3
git/.config/git/hooks.d/lfs/pre-push
···
-
#!/bin/sh
-
command -v git-lfs >/dev/null 2>&1 || { echo >&2 "\nThis repository is configured for Git LFS but 'git-lfs' was not found on your path. If you no longer wish to use Git LFS, remove this hook by deleting .git/hooks/post-merge.\n"; exit 2; }
-
git lfs pre-push "$@"
-5
git/.config/git/hooks.d/swears/pre-commit
···
-
#!/bin/bash
-
-
SWEAR_DIR="$(dirname "${BASH_SOURCE[0]}")/swears"
-
-
! find "${SWEAR_DIR}" -type f -print0 2> /dev/null | xargs -0 -n1 sh -c 'git diff --diff-filter=AR --cached | grep -wFf "$1"' --
-377
git/.config/git/hooks.d/swears/swears/en
···
-
2g1c
-
2 girls 1 cup
-
acrotomophilia
-
alabama hot pocket
-
alaskan pipeline
-
anal
-
anilingus
-
anus
-
apeshit
-
arsehole
-
ass
-
asshole
-
assmunch
-
auto erotic
-
autoerotic
-
babeland
-
baby batter
-
baby juice
-
ball gag
-
ball gravy
-
ball kicking
-
ball licking
-
ball sack
-
ball sucking
-
bangbros
-
bareback
-
barely legal
-
barenaked
-
bastard
-
bastardo
-
bastinado
-
bbw
-
bdsm
-
beaner
-
beaners
-
beaver cleaver
-
beaver lips
-
bestiality
-
big black
-
big breasts
-
big knockers
-
big tits
-
bimbos
-
birdlock
-
bitch
-
bitches
-
black cock
-
blonde action
-
blonde on blonde action
-
blowjob
-
blow job
-
blow your load
-
blue waffle
-
blumpkin
-
bollocks
-
bondage
-
boner
-
boob
-
boobs
-
booty call
-
brown showers
-
brunette action
-
bukkake
-
bulldyke
-
bullet vibe
-
bullshit
-
bung hole
-
bunghole
-
busty
-
butt
-
buttcheeks
-
butthole
-
camel toe
-
camgirl
-
camslut
-
camwhore
-
carpet muncher
-
carpetmuncher
-
chocolate rosebuds
-
circlejerk
-
cleveland steamer
-
clit
-
clitoris
-
clover clamps
-
clusterfuck
-
cock
-
cocks
-
coprolagnia
-
coprophilia
-
cornhole
-
coon
-
coons
-
creampie
-
cum
-
cumming
-
cunnilingus
-
cunt
-
darkie
-
date rape
-
daterape
-
deep throat
-
deepthroat
-
dendrophilia
-
dick
-
dildo
-
dingleberry
-
dingleberries
-
dirty pillows
-
dirty sanchez
-
doggie style
-
doggiestyle
-
doggy style
-
doggystyle
-
dog style
-
dolcett
-
domination
-
dominatrix
-
dommes
-
donkey punch
-
double dong
-
double penetration
-
dp action
-
dry hump
-
dvda
-
eat my ass
-
ecchi
-
ejaculation
-
erotic
-
erotism
-
escort
-
eunuch
-
faggot
-
fecal
-
felch
-
fellatio
-
feltch
-
female squirting
-
femdom
-
figging
-
fingerbang
-
fingering
-
fisting
-
foot fetish
-
footjob
-
frotting
-
fuck
-
fuck buttons
-
fuckin
-
fucking
-
fucktards
-
fudge packer
-
fudgepacker
-
futanari
-
gang bang
-
gay sex
-
genitals
-
giant cock
-
girl on
-
girl on top
-
girls gone wild
-
goatcx
-
goatse
-
god damn
-
gokkun
-
golden shower
-
goodpoop
-
goo girl
-
goregasm
-
grope
-
group sex
-
g-spot
-
guro
-
hand job
-
handjob
-
hard core
-
hardcore
-
hentai
-
homoerotic
-
honkey
-
hooker
-
hot carl
-
hot chick
-
how to kill
-
how to murder
-
huge fat
-
humping
-
incest
-
intercourse
-
jack off
-
jail bait
-
jailbait
-
jelly donut
-
jerk off
-
jigaboo
-
jiggaboo
-
jiggerboo
-
jizz
-
juggs
-
kike
-
kinbaku
-
kinkster
-
kinky
-
knobbing
-
leather restraint
-
leather straight jacket
-
lemon party
-
lolita
-
lovemaking
-
make me come
-
male squirting
-
masturbate
-
menage a trois
-
milf
-
missionary position
-
motherfucker
-
mound of venus
-
mr hands
-
muff diver
-
muffdiving
-
nambla
-
nawashi
-
negro
-
neonazi
-
nigga
-
nigger
-
nig nog
-
nimphomania
-
nipple
-
nipples
-
nsfw images
-
nude
-
nudity
-
nympho
-
nymphomania
-
octopussy
-
omorashi
-
one cup two girls
-
one guy one jar
-
orgasm
-
orgy
-
paedophile
-
paki
-
panties
-
panty
-
pedobear
-
pedophile
-
pegging
-
penis
-
phone sex
-
piece of shit
-
pissing
-
piss pig
-
pisspig
-
playboy
-
pleasure chest
-
pole smoker
-
ponyplay
-
poof
-
poon
-
poontang
-
punany
-
poop chute
-
poopchute
-
porn
-
porno
-
pornography
-
prince albert piercing
-
pthc
-
pubes
-
pussy
-
queaf
-
queef
-
quim
-
raghead
-
raging boner
-
rape
-
raping
-
rapist
-
rectum
-
reverse cowgirl
-
rimjob
-
rimming
-
rosy palm
-
rosy palm and her 5 sisters
-
rusty trombone
-
sadism
-
santorum
-
scat
-
schlong
-
scissoring
-
semen
-
sex
-
sexo
-
sexy
-
shaved beaver
-
shaved pussy
-
shemale
-
shibari
-
shit
-
shitblimp
-
shitty
-
shota
-
shrimping
-
skeet
-
slanteye
-
slut
-
s&m
-
smut
-
snatch
-
snowballing
-
sodomize
-
sodomy
-
spic
-
splooge
-
splooge moose
-
spooge
-
spread legs
-
spunk
-
strap on
-
strapon
-
strappado
-
strip club
-
style doggy
-
suck
-
sucks
-
suicide girls
-
sultry women
-
swastika
-
swinger
-
tainted love
-
taste my
-
tea bagging
-
threesome
-
throating
-
tied up
-
tight white
-
tit
-
tits
-
titties
-
titty
-
tongue in a
-
topless
-
tosser
-
towelhead
-
tranny
-
tribadism
-
tub girl
-
tubgirl
-
tushy
-
twat
-
twink
-
twinkie
-
two girls one cup
-
undressing
-
upskirt
-
urethra play
-
urophilia
-
vagina
-
venus mound
-
vibrator
-
violet wand
-
vorarephilia
-
voyeur
-
vulva
-
wank
-
wetback
-
wet dream
-
white power
-
wrapping men
-
wrinkled starfish
-
xx
-
xxx
-
yaoi
-
yellow showers
-
yiffy
-
zoophilia
-
🖕
-53
git/.config/git/hooks.d/swears/swears/pl
···
-
burdel
-
burdelmama
-
chuj
-
chujnia
-
ciota
-
cipa
-
cyc
-
debil
-
dmuchać
-
do kurwy nędzy
-
dupa
-
dupek
-
duperele
-
dziwka
-
fiut
-
gówno
-
gówno prawda
-
huj
-
jajco
-
jajeczko
-
jajko
-
jajo
-
ja pierdolę
-
jebać
-
jebany
-
kurwa
-
kurwy
-
kutafon
-
kutas
-
lizać pałę
-
obciągać chuja
-
obciągać fiuta
-
obciągać loda
-
pieprzyć
-
pierdolec
-
pierdolić
-
pierdolnięty
-
pierdoła
-
pierdzieć
-
pizda
-
pojeb
-
popierdolony
-
robic loda
-
robić loda
-
ruchać
-
rzygać
-
skurwysyn
-
sraczka
-
srać
-
suka
-
syf
-
wkurwiać
-
zajebisty
-25
git/.config/git/hooks.d/trailing-whitespaces/pre-commit
···
-
#!/bin/sh
-
#
-
# A git hook script to find and fix trailing whitespace
-
# in your commits. Bypass it with the --no-verify option
-
# to git-commit
-
# Ref - http://is.gd/PerowD
-
#
-
-
if git rev-parse --verify HEAD >/dev/null 2>&1
-
then
-
against=HEAD
-
else
-
# Initial commit: diff against an empty tree object
-
against=4b825dc642cb6eb9a060e54bf8d69288fbee4904
-
fi
-
-
# Find files with trailing whitespace
-
for FILE in $(exec git diff-index --check $against -- | sed '/^[+-]/d' | (sed -r 's/:[0-9]+:.*//' > /dev/null 2>&1 || sed -E 's/:[0-9]+:.*//') | uniq) ; do
-
# Fix them!
-
(sed -i 's/[[:space:]]*$//' "$FILE" > /dev/null 2>&1 || sed -i '' -E 's/[[:space:]]*$//' "$FILE")
-
git add "$FILE"
-
echo "NOTE: removed trailing whitespace from $FILE"
-
done
-
-
exit
-10
git/.config/git/hooks.d/unresolved-merge/pre-commit
···
-
#!/bin/sh
-
-
conflicts="$(git diff --cached --name-only -S'<<<<<<')"
-
-
if [ -n "$conflicts" ]
-
then
-
echo "Unresolved merge conflicts in this commit:"
-
echo "$conflicts"
-
exit 1
-
fi
-58
git/.config/git/hooks.d/wip-check/pre-push
···
-
#!/bin/sh
-
-
# An example hook script to verify what is about to be pushed. Called by "git
-
# push" after it has checked the remote status, but before anything has been
-
# pushed. If this script exits with a non-zero status nothing will be pushed.
-
#
-
# This hook is called with the following parameters:
-
#
-
# $1 -- Name of the remote to which the push is being done
-
# $2 -- URL to which the push is being done
-
#
-
# If pushing without using a named remote those arguments will be equal.
-
#
-
# Information about the commits which are being pushed is supplied as lines to
-
# the standard input in the form:
-
#
-
# <local ref> <local sha1> <remote ref> <remote sha1>
-
#
-
# This sample shows how to prevent push of commits where the log message starts
-
# with "WIP" (work in progress).
-
-
-
z40=0000000000000000000000000000000000000000
-
-
IFS=' '
-
while read local_ref local_sha remote_ref remote_sha
-
do
-
if [ "$local_sha" = "$z40" ]
-
then
-
# Handle delete
-
:
-
else
-
if [ "$remote_sha" = "$z40" ]
-
then
-
master_branch="$(git config --get riff.wip.master)"
-
# New branch, examine all commits
-
if [ -z "$master_branch" ]
-
then
-
range="$local_sha"
-
else
-
range="$local_sha...$master_branch"
-
fi
-
else
-
# Update to existing branch, examine new commits
-
range="$remote_sha..$local_sha"
-
fi
-
-
# Check for WIP commit
-
commit="$(git rev-list --count -i --grep '^WIP' "$range")"
-
if [ "$commit" -ne "0" ]
-
then
-
echo "Found WIP $commit commit(s) in $local_ref, not pushing"
-
exit 1
-
fi
-
fi
-
done
-
-
exit 0
-88
git/.config/git/hooks/hook.sh
···
-
#!/bin/bash
-
-
hooks=(post-checkout post-commit post-merge pre-commit pre-push prepare-commit-msg)
-
-
usage() {
-
echo "$0 [install|help]"
-
echo 'Version 0.1.0'
-
echo 'Copyright (c) Łukasz Niemier <opensource@niemier.pl>'
-
echo
-
echo 'Simple git hooks management system'
-
echo
-
echo 'install [hook_dir]'
-
echo ' Installs hooks for given repo.'
-
echo
-
echo ' [hook_dir] - directory where install hooks, defaults to .git/hooks'
-
echo ' in current Git working directory'
-
echo 'help'
-
echo ' display this message'
-
echo
-
echo 'To use this as default set of hooks when creating new repo then:'
-
echo
-
echo " 1. Run '$0 ~/.githooks'"
-
echo ' 2. Run 'git config --global core.hooksPath ~/.githooks''
-
echo
-
}
-
-
install() {
-
source="${BASH_SOURCE[0]}"
-
HOOK_DIR="${1:-"$(git rev-parse --show-toplevel)/.git/hooks"}"
-
-
echo "Install handler"
-
echo
-
-
mkdir -p "$HOOK_DIR"
-
cp -i "$source" "$HOOK_DIR/hook.sh"
-
-
echo "Installing hooks"
-
echo
-
-
for hook in "${hooks[@]}"
-
do
-
echo "Installing $hook"
-
ln -si "hook.sh" "$HOOK_DIR/$hook"
-
done
-
}
-
-
hook() {
-
git_dir=$(git rev-parse --git-dir)
-
script="$(basename "$0")"
-
PLUG_DIRS=("$(command git config --global --get hooks.path)" "$git_dir/hooks/hooks.d" "$(command git config --worktree --get hooks.path)")
-
-
test -d "$git_dir"/rebase-merge -o -d "$git_dir"/rebase-apply && exit 0
-
-
input="$(mktemp)"
-
touch "$input"
-
trap '{ rm -f "$input"; }' EXIT
-
cat - > "$input"
-
-
for dir in "${PLUG_DIRS[@]}"
-
do
-
if [ -d "$dir" ]
-
then
-
find "$dir" -maxdepth 2 -and -name "$script" -print0 2>/dev/null \
-
| xargs -0 -n1 -I% sh -c 'input="$1"; shift; if [ -x "$1" ]; then printf "\n## $(basename "$(dirname "$1")")\n" && "$@" < "$input" && echo ok; fi' -- "$input" % "$@"
-
retval="$?"
-
-
if [ ! "$retval" -eq 0 ]
-
then
-
return "$retval"
-
fi
-
fi
-
done
-
}
-
-
case "$1" in
-
install)
-
shift
-
install "$@"
-
exit
-
;;
-
help|-h|--help|version|-v|-V|--version)
-
shift
-
usage
-
exit
-
;;
-
*)
-
hook "$@"
-
esac
-1
git/.config/git/hooks/post-checkout
···
-
hook.sh
-1
git/.config/git/hooks/post-commit
···
-
hook.sh
-1
git/.config/git/hooks/post-merge
···
-
hook.sh
-1
git/.config/git/hooks/pre-commit
···
-
hook.sh
-1
git/.config/git/hooks/pre-push
···
-
hook.sh
-1
git/.config/git/hooks/prepare-commit-msg
···
-
hook.sh
-82
git/.config/git/ignore
···
-
# Compiled sources {{{
-
*.com
-
*.class
-
*.dll
-
*.exe
-
*.o
-
*.so
-
# }}}
-
# Packages {{{
-
*.7z
-
*.dmg
-
*.gz
-
*.iso
-
*.jar
-
*.rar
-
*.tar
-
*.xz
-
*.zip
-
# }}}
-
# Logs and databases {{{
-
*.log
-
*.sqlite
-
# }}}
-
# OS generated files {{{
-
.DS_Store
-
.DS_Store?
-
._*
-
.Trashes
-
ehthumbs.db
-
Thumbs.db
-
# }}}
-
# Codekits {{{
-
.sass-cache/
-
.codekit-config.json
-
config.codekit
-
# }}}
-
# Configs {{{
-
.envrc
-
.direnv
-
.devenv
-
# }}}
-
# Editors {{{
-
# VIM
-
Session.vim
-
.*.swo
-
.*.swp
-
*~
-
-
# Idea
-
.idea/
-
-
# Sublime
-
*.sublime-project
-
-
# Atom
-
.tern-project
-
# }}}
-
# Temporary files {{{
-
tmp/
-
*.tmp
-
# }}}
-
# Other {{{
-
.rake_tasks
-
.meteor/
-
tags
-
tags.*
-
.gdb_history
-
perf.data*
-
oprofile_data
-
.tool-versions-e
-
# }}}
-
-
# Tooling {{{
-
.elixir_ls
-
.vagrant/
-
# }}}
-
-
# Stack {{{
-
.stack-work
-
# }}}
-
-
erl_crash.dump
+6 -9
hosts/niuniobook.nix
···
-
{ inputs
-
, overlays
-
, ...
+
{
+
inputs,
+
...
}: {
type = "darwin";
hostname = "NiunioBook";
system = inputs.darwin.lib.darwinSystem {
-
system = "x86_64-darwin";
+
system = "aarch64-darwin";
modules = [
-
{ nixpkgs = { inherit overlays; }; }
{
# You should generally set this to the total number of logical cores in your system.
# $ sysctl -n hw.ncpu
···
../modules/common.nix
../modules/darwin.nix
../modules/iosevka.nix
-
../nix/environment.nix
+
./modules/environment.nix
../modules/nvim.nix
{
system.stateVersion = 4;
···
}
];
-
inputs = {
-
dotfiles = inputs.self;
-
};
+
inherit inputs;
};
}
misc/.dir_colors users/modules/dircolors
+14 -7
modules/common.nix
···
-
{ pkgs, inputs, ... }:
{
+
pkgs,
+
inputs,
+
...
+
}: {
nixpkgs.config.allowUnfree = true;
nix.useDaemon = true;
···
pkgs.cachix
];
-
nix.registry = {
-
nixpkgs.flake = inputs.nixpkgs;
-
dotfiles.flake = inputs.dotfiles;
-
} // pkgs.lib.optionals pkgs.stdenv.isDarwin {
-
darwin.flake = inputs.darwin;
-
};
+
nix.registry =
+
{
+
nixpkgs.flake = inputs.nixpkgs;
+
dotfiles.flake = inputs.self;
+
}
+
// pkgs.lib.optionals pkgs.stdenv.isDarwin {
+
darwin.flake = inputs.darwin;
+
};
nix.package = pkgs.nixFlakes;
nix.extraOptions = ''
···
keep-derivations = true
experimental-features = nix-command flakes
+
+
extra-trusted-users = hauleth
'';
}
+9 -6
modules/ctags.nix
···
-
{ config, lib, pkgs, ... }:
-
let
+
{
+
config,
+
lib,
+
pkgs,
+
...
+
}: let
toArg = k: v: "--${k}=${v}";
listToArgs = k: vs: map (toArg k) vs;
attrsetToArgs = attr: lib.strings.concatStringsSep "\n" (lib.lists.flatten (lib.attrsets.mapAttrsToList listToArgs attr));
-
in
-
{
+
in {
options.programs.ctags = {
enable = lib.mkEnableOption "ctags";
···
flags = lib.mkOption {
type = lib.types.attrsOf lib.types.anything;
-
default = { };
+
default = {};
};
};
···
};
};
-
home.packages = [ config.programs.ctags.package ];
+
home.packages = [config.programs.ctags.package];
xdg.configFile.ctags = {
target = "ctags/config.ctags";
+1 -1
modules/curl.nix
···
-
{ pkgs, ... }: {
+
{pkgs, ...}: {
home.packages = [
pkgs.curl
pkgs.curlie
+1 -2
modules/darwin.nix
···
-
{ pkgs, ... }:
-
{
+
{pkgs, ...}: {
nix.settings.extra-sandbox-paths = [
"/System/Library/Frameworks"
"/System/Library/PrivateFrameworks"
+1 -1
modules/direnv.nix
···
-
{ ... }: {
+
{...}: {
programs.direnv = {
enable = true;
+33
modules/email.nix
···
+
{pkgs, ...}: {
+
# programs.himalaya.enable = true;
+
programs.mbsync.enable = true;
+
programs.notmuch.enable = true;
+
programs.aerc.enable = true;
+
programs.aerc.extraConfig.general.unsafe-accounts-conf = true;
+
+
accounts.email.accounts."hauleth" = {
+
realName = "Łukasz Niemier";
+
userName = "hauleth";
+
address = "~@hauleth.dev";
+
primary = true;
+
+
passwordCommand = "op item get i6gyiq3aro4lp2ys5xygfb7uwu --field password";
+
+
mbsync.enable = true;
+
notmuch.enable = true;
+
aerc.enable = true;
+
# himalaya.enable = true;
+
+
imap = {
+
host = "mail.hauleth.dev";
+
port = 993;
+
# tls = true;
+
};
+
+
smtp = {
+
host = "mail.hauleth.dev";
+
port = 465;
+
# tls = true;
+
};
+
};
+
}
+33 -10
modules/fish.nix
···
-
{ config, pkgs, ... }: {
+
{
+
config,
+
pkgs,
+
inputs,
+
...
+
}: {
+
home.packages = [
+
pkgs.eza
+
];
+
+
programs.atuin = {
+
enable = true;
+
flags = ["--disable-up-arrow"];
+
settings = {
+
style = "compact";
+
inline_height = 15;
+
};
+
};
+
+
# Disable home-manager provided man binary as it breaks on macOS
+
programs.man.enable = false;
+
+
home.sessionVariables = {
+
PAGER = "${pkgs.less}/bin/less";
+
LESS = "-SRFXi";
+
ERL_FLAGS = "-kernel shell_history enabled";
+
};
+
programs.fish = {
enable = true;
plugins = [
{
name = "agnoster";
-
src = pkgs.fetchFromGitHub {
-
owner = "hauleth";
-
repo = "agnoster";
-
rev = "master";
-
sha256 = "0/FgJlQULIXKhQIt3z3ugAGubgMlwFZa/cjGjiq7BcA=";
-
};
+
src = inputs.agnoster;
}
];
shellAliases = {
git = "LC_CTYPE=UTF-8 LANG=C command git";
g = "git";
+
ls = "eza";
};
functions = {
···
if test (count $argv) -gt 0 && test -f $argv[1] || not isatty
bat $argv
else
-
ls -Alh $argv
+
eza -Alh --git $argv
end
'';
-
ix = "curl --netrc-optional -F 'f:1=@-' ix.io | pbcopy";
};
loginShellInit = ''
···
set -g fish_greeting
function e --wraps nvim --description 'Run $EDITOR'
-
$EDITOR $argv
+
set -l cmd (string split ' ' $EDITOR)
+
eval $cmd[1] $cmd[2..] $argv
end
ulimit -n 10480
+62 -18
modules/git.nix
···
-
{ pkgs, inputs, ... }: {
+
{
+
pkgs,
+
lib,
+
inputs,
+
...
+
}: {
programs.gh = {
enable = true;
···
];
settings.aliases.co = "pr checkout";
+
settings.version = "1";
};
-
home.packages =
-
let
-
git-branchless-man = pkgs.runCommand "git-branchless-man" { } ''
-
mkdir -p $out/share/man
-
${pkgs.git-branchless}/bin/git-branchless install-man-pages $out/share/man
-
'';
-
in
-
[
-
pkgs.git-absorb
-
pkgs.git-branchless
-
git-branchless-man
-
pkgs.git-gone
-
pkgs.git-revise
-
pkgs.gitAndTools.git-imerge
-
pkgs.gitAndTools.tig
-
];
+
# manual.manpages.enable = true;
+
+
home.packages = let
+
git-branchless-man = pkgs.runCommand "git-branchless-man" {} ''
+
mkdir -p $out/share/man
+
${pkgs.git-branchless}/bin/git-branchless install-man-pages $out/share/man
+
'';
+
git-cliff = pkgs.rustPlatform.buildRustPackage {
+
pname = "git-cliff";
+
version = "2.0.0-pre";
+
+
src = pkgs.fetchFromGitHub {
+
owner = "orhun";
+
repo = "git-cliff";
+
rev = "d408e6377a5157f6d285b2733e6640d36316cfd4";
+
hash = "sha256-DqfcSSG/XmeFHckP9Mmv560WA9VJjhDhpYSkYT9YW9I=";
+
};
+
+
cargoHash = "sha256-Qw7ZHLWPgIKqCmjhHwJ4QEz/WQMxrR8eG3tAgAKN7v0=";
+
+
buildNoDefaultFeatures = true;
+
buildFeatures = [ "github" ];
+
+
# attempts to run the program on .git in src which is not deterministic
+
doCheck = false;
+
+
buildInputs = lib.optionals pkgs.stdenv.isDarwin [
+
pkgs.darwin.apple_sdk.frameworks.CoreFoundation
+
pkgs.darwin.apple_sdk.frameworks.Security
+
pkgs.darwin.apple_sdk.frameworks.SystemConfiguration
+
];
+
};
+
in [
+
pkgs.git-absorb
+
pkgs.git-branchless
+
git-branchless-man
+
pkgs.git-gone
+
pkgs.git-chglog
+
git-cliff
+
pkgs.git-revise
+
pkgs.gitAndTools.git-imerge
+
pkgs.prr
+
pkgs.hut
+
inputs.self.packages.${pkgs.stdenv.hostPlatform.system}.imbox
+
];
programs.git = {
enable = true;
···
"*.md diff=markdown"
"flake.lock merge=binary"
+
+
"yarn.lock merge=binary"
+
+
"*.lockb diff=lockb"
];
ignores = inputs.self.lib.readFileWithComments ./git/ignore;
···
tool = "difftastic";
markdown.xfuncname = "^(#+\\s+.*)$";
+
+
lockb = {
+
textconv = "${pkgs.bun}/bin/bun";
+
binary = true;
+
};
};
difftool = {
···
sort = "version:refname";
};
-
versionsort.suffix = [ "" "-rc" "-pre" ];
+
versionsort.suffix = ["" "-rc" "-pre"];
push = {
default = "simple";
+1
modules/git/ignore
···
# Tooling {{{
.elixir_ls
+
.lexical
.vagrant/
# }}}
+20 -21
modules/iosevka.nix
···
-
{ pkgs, ... }:
-
let
+
{pkgs, ...}: let
variants = {
design = {
i = "hooky";
l = "zshaped";
g = "single-storey-serifless";
-
y = "straight";
+
# y = "straight";
zero = "slashed";
dollar = "open";
percent = "dots";
···
};
};
buildIosevka = pkgs.iosevka.override;
-
iosevka-ss09 = buildIosevka {
+
hosevka-ss09 = buildIosevka {
set = "ss09";
privateBuildPlan = {
-
family = "Iosevka";
+
family = "Hosevka";
inherit variants weights slopes;
};
};
-
iosevka-ss09-term = buildIosevka {
+
hosevka-ss09-term = buildIosevka {
set = "ss09-term";
privateBuildPlan = {
-
family = "Iosevka Term";
+
family = "Hosevka Term";
spacing = "term";
inherit variants weights slopes;
};
};
-
nf-patch = font: pkgs.stdenvNoCC.mkDerivation {
-
pname = "${font.pname}-nerd-font-patched";
-
version = font.version;
+
nf-patch = font:
+
pkgs.stdenvNoCC.mkDerivation {
+
pname = "${font.pname}-nerd-font-patched";
+
version = font.version;
-
src = font;
+
src = font;
-
nativeBuildInputs = [ pkgs.nerd-font-patcher ];
+
nativeBuildInputs = [pkgs.nerd-font-patcher];
-
buildPhase = ''
-
mkdir -p $out
-
find -name \*.ttf -exec nerd-font-patcher -o $out/share/fonts/truetype/ -c {} \;
-
'';
-
installPhase = "";
-
};
-
in
-
{
+
buildPhase = ''
+
mkdir -p $out
+
find -name \*.ttf -exec nerd-font-patcher -o $out/share/fonts/truetype/ -c {} \;
+
'';
+
installPhase = "";
+
};
+
in {
fonts = {
fontDir.enable = true;
fonts = [
pkgs.lato
-
(nf-patch iosevka-ss09-term)
+
(nf-patch hosevka-ss09-term)
];
};
}
+5
modules/nixd.nix
···
+
{pkgs, ...}: {
+
home.packages = [
+
pkgs.nixd
+
];
+
}
+1
modules/nvim.nix
···
{
config,
pkgs,
+
inputs,
...
}: let
nvim = pkgs.neovim.override {
+1 -1
modules/plan.nix
···
-
{ pkgs, ... }: {
+
{pkgs, ...}: {
launchd.agents.plan-sync = {
enable = pkgs.stdenv.isDarwin;
config = {
+11
modules/swiftbar.nix
···
+
{pkgs, ...}: {
+
home.packages = with pkgs; [
+
swiftbar
+
];
+
+
targets.darwin.defaults = {
+
"com.ameba.SwiftBar" = {
+
PluginDirectory = "/Users/hauleth/.config/swift-bar/plugins/";
+
};
+
};
+
}
+10
modules/tools.nix
···
+
{pkgs, inputs, config, ...}: {
+
home.packages = with pkgs; [
+
# bfs
+
comby
+
senpai
+
jaq
+
jo
+
inputs.self.packages.${pkgs.stdenv.hostPlatform.system}.ubin-client
+
];
+
}
-9
nix/environment.nix hosts/modules/environment.nix
···
# _1password
asciinema
bat
-
comby
coreutils
entr
findutils
fswatch
fzy
gnupg
-
jq
lima
lnav
neovim-remote
···
# qmk
rage
ripgrep
-
rnix-lsp
-
senpai
];
environment.shells = [pkgs.fish pkgs.zsh];
-
-
environment.variables = {
-
LESS = "-SRFXi";
-
ERL_FLAGS = "-kernel shell_history enabled";
-
};
programs.nix-index.enable = true;
programs.fish.enable = true;
+6 -24
pkgs/default.nix
···
-
final: prev: {
-
beam =
-
prev.beam
-
// {
-
defaultVersion = "erlangR25";
-
-
packages =
-
prev.beam.packages
-
// {
-
erlangR25 = prev.beam.packages.erlangR25.extend (efinal: eprev: {
-
elixir = eprev.elixir_1_14;
-
rebar3 = eprev.rebar3.overrideAttrs (_: { doCheck = false; });
-
});
-
};
-
-
packagesWith = erlang:
-
(prev.beam.packagesWith erlang).extend (efinal: eprev: {
-
livebook = eprev.livebook.override { elixir = efinal.elixir_1_14; };
-
});
-
};
+
{callPackage, entr, ripgrep, writeShellApplication}: {
+
prr = callPackage ./prr.nix {};
+
imbox = callPackage ./imbox.nix {};
+
ubin-client = callPackage ./ubin-client.nix {};
-
livebook = final.beam.packages.livebook;
-
-
fswatch = prev.writeShellApplication {
+
fswatch = writeShellApplication {
name = "fswatch";
-
runtimeInputs = [ final.entr final.ripgrep ];
+
runtimeInputs = [entr ripgrep];
text = ''
rg -l -t "$1" "" | entr -p echo /_
+14
pkgs/imbox.nix
···
+
{ libressl, stdenv, fetchgit, lib, pkg-config }: stdenv.mkDerivation (self: {
+
pname = "imbox";
+
version = "1.4";
+
+
src = fetchgit {
+
url = "https://git.causal.agency/imbox";
+
rev = self.version;
+
hash = "sha256-y5GCH3miimOWSCvS+Kh/nOpNrIEpcoc9p8jlQqYuh7Q=";
+
};
+
+
nativeBuildInputs = [ pkg-config ];
+
+
buildInputs = [ libressl ];
+
})
+35
pkgs/prr.nix
···
+
{ stdenv, rustPlatform, openssl, darwin, fetchFromGitHub, lib, pkg-config }:
+
+
rustPlatform.buildRustPackage rec {
+
pname = "prr";
+
version = "0.16.0";
+
+
nativeBuildInputs = [
+
pkg-config
+
];
+
+
buildInputs =
+
[
+
openssl
+
]
+
++ lib.optional stdenv.isDarwin (with darwin.apple_sdk; [
+
frameworks.Security
+
frameworks.SystemConfiguration
+
]);
+
+
src = fetchFromGitHub {
+
owner = "danobi";
+
repo = pname;
+
rev = "v${version}";
+
hash = lib.fakeHash;
+
};
+
+
cargoHash = lib.fakeHash;
+
+
meta = with lib; {
+
description = "Mailing list style code reviews for GitHub";
+
homepage = "https://github.com/danobi/prr";
+
license = licenses.gpl2;
+
maintainers = [];
+
};
+
}
+17
pkgs/ubin-client.nix
···
+
{writeShellApplication, curl}: writeShellApplication {
+
name = "ubin";
+
+
runtimeInputs = [curl];
+
+
text = ''
+
URL="https://bin.hauleth.dev/"
+
+
if [[ $# -eq 1 ]]; then
+
FILEPATH="$1"
+
fi
+
+
PASTELINK=$(curl --netrc-optional --data-binary "@''${FILEPATH:-/dev/stdin}" --url "$URL")
+
+
echo "$PASTELINK"
+
'';
+
}
+35
users/hauleth.nix
···
+
{
+
inputs,
+
...
+
}: {
+
username = "hauleth";
+
+
home = inputs.home-manager.lib.homeManagerConfiguration {
+
pkgs = import inputs.nixpkgs {
+
system = "aarch64-darwin";
+
};
+
+
extraSpecialArgs = {
+
inherit inputs;
+
};
+
+
modules = [
+
{
+
home.username = "hauleth";
+
home.homeDirectory = "/Users/hauleth/";
+
}
+
../modules/fish.nix
+
../modules/direnv.nix
+
../modules/git.nix
+
../modules/plan.nix
+
../modules/ctags.nix
+
../modules/curl.nix
+
../modules/tools.nix
+
../modules/nixd.nix
+
../modules/swiftbar.nix
+
../modules/email.nix
+
./modules/dircolors.nix
+
{home.stateVersion = "23.05";}
+
];
+
};
+
}
+7
users/modules/dircolors.nix
···
+
{...}: {
+
programs.dircolors = {
+
enable = true;
+
+
extraConfig = builtins.readFile ./dircolors;
+
};
+
}
+3
vim/.config/nvim/after/ftplugin/prr.vim
···
+
setlocal foldmethod=syntax
+
+
let b:undo_ftplugin = 'setl fdm&'
+3 -6
vim/.config/nvim/fnl/langclient.fnl
···
(on LspAttach "*"
(let [bufnr args.buf
client (vim.lsp.get_client_by_id args.data.client_id)]
-
(cmd.packadd! :fidget.nvim)
((. (require :fidget) :setup) {})
(logger.inspect client)
(local capable?
···
(setup :rust_analyzer
{:settings {:rust-analyzer {:files {:excludeDirs [".direnv"]}}}})
-
; (setup :elixirls
-
; {:cmd [:elixir-ls]
-
; :settings {:elixirLS {:dialyzerEnabled false}}})
(setup :lexical
{:cmd [:lexical :start]})
(setup :erlangls
{:cmd [:erlang_ls]})
-
; (setup :rnix
-
; {:autostart true})
+
(setup :zls {})
+
+
(setup :nixd {:autostart true})
(augroup lsp-direnv (on User :DirenvLoaded (cmd.LspStart)))
+1 -2
vim/.config/nvim/fnl/plugins.fnl
···
(pkg :nvim-treesitter/playground
{:cmd [:TSPlaygroundToggle
:TSHighlightCaputresUnderCursor]})
-
(pkg :j-hui/fidget.nvim {:opt true})
+
(pkg :j-hui/fidget.nvim {:tag :legacy})
; Code manipulation
(pkg :AndrewRadev/splitjoin.vim
···
(pkg :hauleth/vim-backscratch {:cmd [:Scratch]})
(pkg "https://gitlab.com/hauleth/qfx.vim.git")
(pkg "https://gitlab.com/hauleth/smart.vim.git")
-
(pkg :sgur/vim-editorconfig)
(pkg :mbbill/undotree
{:cmd [:UndotreeShow :UndotreeToggle]})
(pkg :tpope/vim-characterize {:keys [:ga]})
+1
vim/.config/nvim/ftdetect/custom.vim
···
au BufRead,BufNewFile *.dhall setf dhall
au BufRead,BufNewFile PULLREQ_EDITMSG setf gitcommit
au BufRead,BufNewFile *.livemd setf markdown
+
au BufRead,BufNewFile *.prr setf prr
+2 -2
vim/.config/nvim/init.fnl
···
(set vim.g.loaded_matchit true)
(set vim.g.matchup_surround_enabled true))
-
(set vim.g.choosewin_label :QWERTYUIOP)
+
(set vim.g.choosewin_label :QWERTASDF)
(do ; Colors
(cmd.colorscheme :blame)
···
(setup :nvim-treesitter.configs
{:highlight {:enable true
; Currently disable as it do not work as expected
-
:disable [:erlang :make]}
+
:disable [:erlang :make :diff]}
:matchup {:enable true}
:indent {:enable true}
:incremental_selection {:enable true}})))
+2 -2
vim/.config/nvim/plugin/pastebin.vim
···
function s:pastebin(line1, line2) abort
let l:filename = expand("%:p:t")
let l:lines = getline(a:line1, a:line2)
-
let l:url = trim(system("curl --netrc-optional -F 'f:1=@-;filename=\"".l:filename."\"' ix.io", l:lines))
+
let l:url = trim(system("ubin", l:lines))
let @+ = l:url
echom "URL: ".l:url
endfunction
-
command! -range=% IX call <SID>pastebin(<line1>, <line2>)
+
command! -range=% Ubin call <SID>pastebin(<line1>, <line2>)
+41
vim/.config/nvim/syntax/prr.vim
···
+
" Vim syntax file
+
" Language: prr
+
" Maintainer: Daniel Xu <dxu@dxuuu.xyz>
+
" Last Change: 2022 Mar 25
+
" Credits: Bram Moolenaar <Bram@vim.org>
+
"
+
" This version is copied and edited from diff.vim
+
+
" Check whether an earlier file has defined a syntax already
+
if exists("b:current_syntax")
+
finish
+
endif
+
+
syn region prrFile start=/^> diff/ end=/^> diff/ms=s-1,me=s-1 transparent fold keepend contains=prrHeader,prrIndex,prrChunk
+
+
syn region prrChunk start=/^> @@/ start=/^\n> /rs=e-2 end=/^> @@/ms=s-1,me=s-1 end=/^> diff/ms=s-1,me=s-1 end=/^$/ transparent fold keepend contains=CONTAINED,prrTag
+
+
syn match prrAdded contained "^> +.*"
+
syn match prrRemoved contained "^> -.*"
+
+
syn match prrHeader contained "^> diff.*"
+
syn match prrIndex contained "^> index.*"
+
syn match prrChunkH contained "^> @@.*"
+
+
syn match prrTag "^@.*" contains=prrTagName,prrResult transparent
+
+
syn match prrTagName contained "@prr" nextgroup=prrResult
+
syn keyword prrResult contained approve reject comment
+
+
" Define the default highlighting.
+
" Only used when an item doesn't have highlighting yet
+
hi def link prrAdded Identifier
+
hi def link prrRemoved Special
+
+
hi def link prrTagName Keyword
+
hi def link prrResult String
+
hi def link prrHeader Include
+
hi def link prrIndex Comment
+
hi def link prrChunkH Function
+
+
let b:current_syntax = "prr"