Skip to content

Instantly share code, notes, and snippets.

View isabelroses's full-sized avatar
🖤
🐈‍⬛

isabel isabelroses

🖤
🐈‍⬛
View GitHub Profile
{
lib ? import <nixpkgs/lib>,
}:
rec {
parse =
val:
let
isIPv4 = (lib.match "^([0-9]+\\.){3}[0-9]+$" val) != null;
isIpv6Localhost = (lib.match "^::1$" val) != null;
in
# try it yourself with:
# nix eval --file eval.nix config.users.users.alice --show-trace
import <nixpkgs/nixos> {
configuration =
{
lib,
pkgs,
config,
options,
# Edit this configuration file to define what should be installed on
# your system. Help is available in the configuration.nix(5) man page
# and in the NixOS manual (accessible by running ‘nixos-help’).
{ config, pkgs, ... }:
{
config = {
imports =
[ # Include the results of the hardware scan.
let
budgetIsDefined = value: (builtins.tryEval value).success;
in
import <nixpkgs/nixos> {
configuration =
{ config, lib, ... }:
{
imports = [
{
let
lib = import <nixpkgs/lib>;
inherit (builtins)
map
groupBy
substring
elemAt
genList
sort
thefuck> sourcing setup hook '/nix/store/z7xxy35k7620hs6fn6la5fg2lgklv72l-python3-3.12.4/nix-support/setup-hook'
thefuck> sourcing setup hook '/nix/store/1hqa3zqlphgd74c299dnmyz81q0iwkfz-wrap-python-hook/nix-support/setup-hook'
thefuck> sourcing setup hook '/nix/store/dk1q4pj1d824fm7kvpryc4nmikb5hbih-make-shell-wrapper-hook/nix-support/setup-hook'
thefuck> sourcing setup hook '/nix/store/jlcm4q3p5gzc9nfc8fxd8mkhcrv9zcrq-die-hook/nix-support/setup-hook'
thefuck> sourcing setup hook '/nix/store/qiaig6v236qhwwa210bba4lrr64kgxla-ensure-newer-sources-hook/nix-support/setup-hook'
thefuck> sourcing setup hook '/nix/store/3gfb1q8vrr3bxg8ni42lxvd5h30c498z-python-remove-tests-dir-hook/nix-support/setup-hook'
thefuck> Sourcing python-remove-tests-dir-hook
thefuck> sourcing setup hook '/nix/store/l4hjcm9yixhhs38s46xq98swr72sarwa-python-catch-conflicts-hook/nix-support/setup-hook'
thefuck> Sourcing python-catch-conflicts-hook.sh
thefuck> sourcing setup hook '/nix/store/v8zlacllym8pwlj0k8zbx9ink7bpka3g-python-remove-bin-by
@isabelroses
isabelroses / MIT License
Created March 17, 2024 21:00
MIT License raw text
MIT License
Copyright (c) 2024 isabelroses
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

[Verifying my keyoxide cryptographic key: openpgp4fpr:F173F8D158C1734F745CB6947F2F6BD6997FCDF7]