Compare commits

..

No commits in common. "a3777bd73a1e70f8ab7379ad17aa4e2dde0b6f5a" and "d425621e013ea7be8c0d1e426e7c2f04dd09197d" have entirely different histories.

15 changed files with 55 additions and 249 deletions

87
Cargo.lock generated
View file

@ -127,12 +127,6 @@ version = "3.16.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "79296716171880943b8470b5f8d03aa55eb2e645a4874bdbb28adb49162e012c"
[[package]]
name = "byteorder"
version = "1.5.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "1fd0f2584146f6f2ef48085050886acf353beff7305ebd1ae69500e27c67f64b"
[[package]]
name = "cassowary"
version = "0.3.0"
@ -239,22 +233,6 @@ version = "0.8.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "06ea2b9bc92be3c2baa9334a323ebca2d6f074ff852cd1d7b11064035cd3868f"
[[package]]
name = "crossterm"
version = "0.25.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "e64e6c0fbe2c17357405f7c758c1ef960fce08bdfb2c03d88d2a18d7e09c4b67"
dependencies = [
"bitflags 1.3.2",
"crossterm_winapi",
"libc",
"mio",
"parking_lot",
"signal-hook",
"signal-hook-mio",
"winapi 0.3.9",
]
[[package]]
name = "crossterm"
version = "0.27.0"
@ -301,12 +279,6 @@ dependencies = [
"windows-sys 0.48.0",
]
[[package]]
name = "dyn-clone"
version = "1.0.17"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "0d6ef0072f8a535281e4876be788938b528e9a1d43900b82c2569af7da799125"
[[package]]
name = "ego-tree"
version = "0.6.2"
@ -331,24 +303,6 @@ version = "0.4.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "0ce7134b9999ecaf8bcd65542e436736ef32ddca1b3e06094cb6ec5755203b80"
[[package]]
name = "fuzzy-matcher"
version = "0.3.7"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "54614a3312934d066701a80f20f15fa3b56d67ac7722b39eea5b4c9dd1d66c94"
dependencies = [
"thread_local",
]
[[package]]
name = "fxhash"
version = "0.2.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "c31b6d751ae2c7f11320402d34e41349dd1016f8d5d45e48c4312bc8625af50c"
dependencies = [
"byteorder",
]
[[package]]
name = "getrandom"
version = "0.2.14"
@ -430,23 +384,6 @@ version = "2.0.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "b248f5224d1d606005e02c97f5aa4e88eeb230488bcc03bc9ca4d7991399f2b5"
[[package]]
name = "inquire"
version = "0.7.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "0fddf93031af70e75410a2511ec04d49e758ed2f26dad3404a934e0fb45cc12a"
dependencies = [
"bitflags 2.5.0",
"crossterm 0.25.0",
"dyn-clone",
"fuzzy-matcher",
"fxhash",
"newline-converter",
"once_cell",
"unicode-segmentation",
"unicode-width",
]
[[package]]
name = "itertools"
version = "0.12.1"
@ -463,7 +400,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "49f1f14873335454500d59611f1cf4a4b0f786f9ac11f4312a78e4cf2566695b"
[[package]]
name = "j"
name = "jrnl"
version = "0.1.0"
dependencies = [
"chrono",
@ -471,7 +408,6 @@ dependencies = [
"dirs",
"ego-tree",
"indexmap",
"inquire",
"markdown",
"owo-colors",
"petgraph",
@ -575,15 +511,6 @@ dependencies = [
"windows-sys 0.48.0",
]
[[package]]
name = "newline-converter"
version = "0.3.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "47b6b097ecb1cbfed438542d16e84fd7ad9b0c76c8a65b7f9039212a3d14dc7f"
dependencies = [
"unicode-segmentation",
]
[[package]]
name = "num-traits"
version = "0.2.18"
@ -689,7 +616,7 @@ dependencies = [
"bitflags 2.5.0",
"cassowary",
"compact_str",
"crossterm 0.27.0",
"crossterm",
"indoc",
"itertools",
"lru",
@ -924,16 +851,6 @@ dependencies = [
"syn",
]
[[package]]
name = "thread_local"
version = "1.1.8"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "8b9ef9bad013ada3808854ceac7b46812a6465ba368859a37e2100283d2d719c"
dependencies = [
"cfg-if",
"once_cell",
]
[[package]]
name = "unicode-ident"
version = "1.0.12"

View file

@ -5,23 +5,13 @@
config,
pkgs,
lib,
lix-module,
rs-programs,
...
}:
with lib;
with builtins; {
imports = [lix-module.nixosModules.default];
nix = {
package = pkgs.nixVersions.stable;
settings = {
extra-substituters = [
"https://cache.lix.systems"
];
trusted-public-keys = [
"cache.lix.systems:aBnZUw8zA7H35Cz2RyKFVs3H4PlGTLawyY5KRbvJR8o="
];
};
extraOptions = ''
experimental-features = nix-command flakes
keep-outputs = true

View file

@ -7,11 +7,11 @@
]
},
"locked": {
"lastModified": 1714864355,
"narHash": "sha256-uXNW6bapWFfkYIkK1EagydSrFMqycOYEDSq75GmUpjk=",
"lastModified": 1713459701,
"narHash": "sha256-LjQ11ASxnv/FXfb8QnrIyMkyqSqcBPX+lFK8gu0jSQE=",
"owner": "ipetkov",
"repo": "crane",
"rev": "442a7a6152f49b907e73206dc8e1f46a61e8e873",
"rev": "45ea0059fb325132fdc3c39faffb0941d25d08d3",
"type": "github"
},
"original": {
@ -28,11 +28,11 @@
"rust-analyzer-src": "rust-analyzer-src"
},
"locked": {
"lastModified": 1714976745,
"narHash": "sha256-SAYU6uaVcUmckp/RFxkndz7u7eX1D69piTIMmAAop6Y=",
"lastModified": 1713594079,
"narHash": "sha256-lYWehi0cqBdsL1W4xeUnUcXw4U4aBKKCmmQrR01yqE0=",
"owner": "nix-community",
"repo": "fenix",
"rev": "a291b6ad30f4ec949e6c98dde43d73d2946515c3",
"rev": "3247290e1bba55878a2c62d43894d0309d29c918",
"type": "github"
},
"original": {
@ -41,39 +41,6 @@
"type": "github"
}
},
"flake-utils": {
"inputs": {
"systems": "systems"
},
"locked": {
"lastModified": 1710146030,
"narHash": "sha256-SZ5L6eA7HJ/nmkzGG7/ISclqe6oZdOZTNoesiInkXPQ=",
"owner": "numtide",
"repo": "flake-utils",
"rev": "b1d9ab70662946ef0850d488da1c9019f3a9752a",
"type": "github"
},
"original": {
"owner": "numtide",
"repo": "flake-utils",
"type": "github"
}
},
"flakey-profile": {
"locked": {
"lastModified": 1712898590,
"narHash": "sha256-FhGIEU93VHAChKEXx905TSiPZKga69bWl1VB37FK//I=",
"owner": "lf-",
"repo": "flakey-profile",
"rev": "243c903fd8eadc0f63d205665a92d4df91d42d9d",
"type": "github"
},
"original": {
"owner": "lf-",
"repo": "flakey-profile",
"type": "github"
}
},
"home-manager": {
"inputs": {
"nixpkgs": [
@ -81,11 +48,11 @@
]
},
"locked": {
"lastModified": 1714981474,
"narHash": "sha256-b3/U21CJjCjJKmA9WqUbZGZgCvospO3ArOUTgJugkOY=",
"lastModified": 1713566308,
"narHash": "sha256-7Y91t8pheIzjJveUMAPyeh5NOq5F49Nq4Hl2532QpJs=",
"owner": "nix-community",
"repo": "home-manager",
"rev": "6ebe7be2e67be7b9b54d61ce5704f6fb466c536f",
"rev": "057117a401a34259c9615ce62218aea7afdee4d3",
"type": "github"
},
"original": {
@ -94,48 +61,6 @@
"type": "github"
}
},
"lix": {
"flake": false,
"locked": {
"lastModified": 1714955862,
"narHash": "sha256-REWlo2RYHfJkxnmZTEJu3Cd/2VM+wjjpPy7Xi4BdDTQ=",
"ref": "refs/tags/2.90-beta.1",
"rev": "b6799ab0374a8e1907a48915d3187e07da41d88c",
"revCount": 15501,
"type": "git",
"url": "https://git@git.lix.systems/lix-project/lix"
},
"original": {
"ref": "refs/tags/2.90-beta.1",
"type": "git",
"url": "https://git@git.lix.systems/lix-project/lix"
}
},
"lix-module": {
"inputs": {
"flake-utils": "flake-utils",
"flakey-profile": "flakey-profile",
"lix": [
"lix"
],
"nixpkgs": [
"nixpkgs"
]
},
"locked": {
"lastModified": 1714868057,
"narHash": "sha256-Q9vGkxmuarySjPKO6yixjZ0tkaVIQS2wU9FpCpDA7+I=",
"ref": "refs/heads/main",
"rev": "e31baf57680bab449ab5b40179cc4a08a99f5314",
"revCount": 62,
"type": "git",
"url": "https://git.lix.systems/lix-project/nixos-module"
},
"original": {
"type": "git",
"url": "https://git.lix.systems/lix-project/nixos-module"
}
},
"mac-brcm-fw": {
"flake": false,
"locked": {
@ -167,11 +92,11 @@
},
"nixpkgs": {
"locked": {
"lastModified": 1714906307,
"narHash": "sha256-UlRZtrCnhPFSJlDQE7M0eyhgvuuHBTe1eJ9N9AQlJQ0=",
"lastModified": 1713537308,
"narHash": "sha256-XtTSSIB2DA6tOv+l0FhvfDMiyCmhoRbNB+0SeInZkbk=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "25865a40d14b3f9cf19f19b924e2ab4069b09588",
"rev": "5c24cf2f0a12ad855f444c30b2421d044120c66f",
"type": "github"
},
"original": {
@ -182,11 +107,11 @@
},
"nixpkgs-stable": {
"locked": {
"lastModified": 1714782413,
"narHash": "sha256-tbg0MEuKaPcUrnmGCu4xiY5F+7LW2+ECPKVAJd2HLwM=",
"lastModified": 1713344939,
"narHash": "sha256-jpHkAt0sG2/J7ueKnG7VvLLkBYUMQbXQ2L8OBpVG53s=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "651b4702e27a388f0f18e1b970534162dec09aff",
"rev": "e402c3eb6d88384ca6c52ef1c53e61bdc9b84ddd",
"type": "github"
},
"original": {
@ -197,11 +122,11 @@
},
"nixpkgs-unstable-small": {
"locked": {
"lastModified": 1715010189,
"narHash": "sha256-VG/ax2TLmsF0G8M3Q/lE0P7U/pzky8NScim8ZGmIfAY=",
"lastModified": 1713597487,
"narHash": "sha256-bD+FqUZidTjHblGjK+2LpIaHBmo1THF1HW3o4ZBqmrw=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "95269ee8dbc9daacad586e8ad87567369a7e1042",
"rev": "c0f9060ec3937d5a7cf3ce6c698e14d989b453e5",
"type": "github"
},
"original": {
@ -215,8 +140,6 @@
"crane": "crane",
"fenix": "fenix",
"home-manager": "home-manager",
"lix": "lix",
"lix-module": "lix-module",
"mac-brcm-fw": "mac-brcm-fw",
"nixos-hardware": "nixos-hardware",
"nixpkgs": "nixpkgs",
@ -227,11 +150,11 @@
"rust-analyzer-src": {
"flake": false,
"locked": {
"lastModified": 1714936835,
"narHash": "sha256-M+PpgfRMBfHo8Jb2ou/s3maAZbps0XnuHXQU9Hv9vL0=",
"lastModified": 1713559870,
"narHash": "sha256-HsVa+QM2vMra80OjnjH7JhdvLeJuMdR4sxBNHJveMe4=",
"owner": "rust-lang",
"repo": "rust-analyzer",
"rev": "c4618fe14d39992fbbb85c2d6cad028a232c13d2",
"rev": "c83d8cf5844fff3d6e243ab408669222059af1c6",
"type": "github"
},
"original": {
@ -240,21 +163,6 @@
"repo": "rust-analyzer",
"type": "github"
}
},
"systems": {
"locked": {
"lastModified": 1681028828,
"narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=",
"owner": "nix-systems",
"repo": "default",
"rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e",
"type": "github"
},
"original": {
"owner": "nix-systems",
"repo": "default",
"type": "github"
}
}
},
"root": "root",

View file

@ -5,15 +5,6 @@
nixpkgs.url = "nixpkgs/nixos-unstable";
nixpkgs-stable.url = "nixpkgs/nixos-23.11";
nixpkgs-unstable-small.url = "nixpkgs/nixos-unstable-small";
lix = {
url = "git+https://git@git.lix.systems/lix-project/lix?ref=refs/tags/2.90-beta.1";
flake = false;
};
lix-module = {
url = "git+https://git.lix.systems/lix-project/nixos-module";
inputs.lix.follows = "lix";
inputs.nixpkgs.follows = "nixpkgs";
};
home-manager = {
url = "github:nix-community/home-manager";
inputs.nixpkgs.follows = "nixpkgs";
@ -26,6 +17,7 @@
crane = {
url = "github:ipetkov/crane";
inputs = {
flake-utils.follows = "flake-utils";
nixpkgs.follows = "nixpkgs";
};
};
@ -40,7 +32,6 @@
nixpkgs,
nixpkgs-stable,
nixpkgs-unstable-small,
lix-module,
home-manager,
nixos-hardware,
mac-brcm-fw,
@ -91,7 +82,7 @@
nixosConfigurations = {
monosodium-glutamate-g = nixpkgs.lib.nixosSystem {
specialArgs = {
inherit inputs pkgs-unstable-small pkgs-stable rs-programs lix-module;
inherit inputs pkgs-unstable-small pkgs-stable rs-programs;
};
system = "x86_64-linux";
modules = [
@ -116,7 +107,7 @@
};
catbook-j = nixpkgs.lib.nixosSystem {
specialArgs = {
inherit inputs pkgs-unstable-small pkgs-stable rs-programs lix-module;
inherit inputs pkgs-unstable-small pkgs-stable rs-programs;
};
system = "x86_64-linux";
modules = [
@ -141,7 +132,7 @@
};
potatobook-g = nixpkgs.lib.nixosSystem {
specialArgs = {
inherit inputs pkgs-unstable-small rs-programs lix-module;
inherit inputs pkgs-unstable-small rs-programs;
};
system = "x86_64-linux";
modules = [

View file

@ -78,7 +78,7 @@
};
boot.kernelPackages = pkgs.linuxPackages_zen;
services.displayManager.autoLogin = {
services.xserver.displayManager.autoLogin = {
enable = true;
user = "jade";
};

View file

@ -23,5 +23,5 @@
sensitivity = 256;
};
services.libinput.touchpad.tapping = false;
services.xserver.libinput.touchpad.tapping = false;
}

View file

@ -65,10 +65,9 @@
boot.loader.systemd-boot.enable = true;
boot.loader.efi.canTouchEfiVariables = true;
services.libinput.touchpad = {
disableWhileTyping = true;
tapping = false;
};
services.xserver.libinput.touchpad.disableWhileTyping = true;
services.xserver.libinput.touchpad.tapping = false;
networking.networkmanager.enable = true;
networking.hostName = "potatobook-g";

View file

@ -1,8 +1,4 @@
{
pkgs,
pkgs-stable,
...
}: {
{pkgs, ...}: {
home-manager.users.jade = {pkgs, ...}: {
home.packages = with pkgs; [
audacity
@ -22,7 +18,6 @@
openscad-unstable
openscad-lsp
pkgs-stable.font-manager
fontforge-gtk
onlyoffice-bin_latest

View file

@ -67,7 +67,7 @@ in
services.illum.enable = true;
services.avahi = {
enable = true;
nssmdns4 = true;
nssmdns = true;
openFirewall = true;
};
services.smartd = {
@ -124,6 +124,7 @@ in
jellyfin-media-player
# from environment.systemPackages cleanup
font-manager
xdotool
xorg.xwininfo
gparted

View file

@ -37,7 +37,7 @@
};
qt = {
enable = true;
platformTheme.name = "gtk";
platformTheme = "gtk";
};
};
};

View file

@ -7,6 +7,7 @@
};
displayManager = {
defaultSession = "none+xmonad";
gdm.enable = true;
};
@ -14,6 +15,4 @@
enable = true;
};
};
services.displayManager.defaultSession = "none+xmonad";
}

View file

@ -2,15 +2,14 @@
imports = [
./evremap.nix
];
services = {
libinput = {
enable = true;
};
xserver = {
services.xserver = {
xkb = {
layout = "us";
variant = "altgr-intl";
};
libinput = {
enable = true;
};
};
}

View file

@ -48,7 +48,7 @@
"file-encoding"
"file-type"
];
idle-timeout = 200;
idle-timeout = 30;
indent-guides = {
render = true;
character = "";

View file

@ -1,5 +1,5 @@
[package]
name = "j"
name = "jrnl"
version = "0.1.0"
edition = "2021"
@ -15,4 +15,3 @@ petgraph = "0.6.4"
ratatui = "0.26.2"
temp-file = "0.1.8"
termsize = "0.1.6"
inquire = "0.7.5"

View file

@ -6,7 +6,6 @@ use std::{
process::Command,
};
use inquire::Text;
use temp_file::{TempFile, TempFileBuilder};
use crate::md::{Entry, ToMd};
@ -18,7 +17,7 @@ pub fn add_entry(path: PathBuf, title: Option<String>) -> io::Result<()> {
std::process::exit(1);
}
let title = Text::new("Title").prompt().unwrap();
let title = prompt("Title")?;
let tmp = TempFileBuilder::new()
.suffix(".jrnl-entry.md")
@ -58,3 +57,12 @@ pub fn add_entry(path: PathBuf, title: Option<String>) -> io::Result<()> {
Ok(())
}
fn prompt(title: &str) -> io::Result<String> {
print!("{}: ", title);
let _ = io::stdout().flush();
let mut buf = String::new();
let stdin = io::stdin();
stdin.read_line(&mut buf)?;
Ok(buf)
}