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" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "79296716171880943b8470b5f8d03aa55eb2e645a4874bdbb28adb49162e012c" checksum = "79296716171880943b8470b5f8d03aa55eb2e645a4874bdbb28adb49162e012c"
[[package]]
name = "byteorder"
version = "1.5.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "1fd0f2584146f6f2ef48085050886acf353beff7305ebd1ae69500e27c67f64b"
[[package]] [[package]]
name = "cassowary" name = "cassowary"
version = "0.3.0" version = "0.3.0"
@ -239,22 +233,6 @@ version = "0.8.6"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "06ea2b9bc92be3c2baa9334a323ebca2d6f074ff852cd1d7b11064035cd3868f" 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]] [[package]]
name = "crossterm" name = "crossterm"
version = "0.27.0" version = "0.27.0"
@ -301,12 +279,6 @@ dependencies = [
"windows-sys 0.48.0", "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]] [[package]]
name = "ego-tree" name = "ego-tree"
version = "0.6.2" version = "0.6.2"
@ -331,24 +303,6 @@ version = "0.4.2"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "0ce7134b9999ecaf8bcd65542e436736ef32ddca1b3e06094cb6ec5755203b80" 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]] [[package]]
name = "getrandom" name = "getrandom"
version = "0.2.14" version = "0.2.14"
@ -430,23 +384,6 @@ version = "2.0.5"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "b248f5224d1d606005e02c97f5aa4e88eeb230488bcc03bc9ca4d7991399f2b5" 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]] [[package]]
name = "itertools" name = "itertools"
version = "0.12.1" version = "0.12.1"
@ -463,7 +400,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "49f1f14873335454500d59611f1cf4a4b0f786f9ac11f4312a78e4cf2566695b" checksum = "49f1f14873335454500d59611f1cf4a4b0f786f9ac11f4312a78e4cf2566695b"
[[package]] [[package]]
name = "j" name = "jrnl"
version = "0.1.0" version = "0.1.0"
dependencies = [ dependencies = [
"chrono", "chrono",
@ -471,7 +408,6 @@ dependencies = [
"dirs", "dirs",
"ego-tree", "ego-tree",
"indexmap", "indexmap",
"inquire",
"markdown", "markdown",
"owo-colors", "owo-colors",
"petgraph", "petgraph",
@ -575,15 +511,6 @@ dependencies = [
"windows-sys 0.48.0", "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]] [[package]]
name = "num-traits" name = "num-traits"
version = "0.2.18" version = "0.2.18"
@ -689,7 +616,7 @@ dependencies = [
"bitflags 2.5.0", "bitflags 2.5.0",
"cassowary", "cassowary",
"compact_str", "compact_str",
"crossterm 0.27.0", "crossterm",
"indoc", "indoc",
"itertools", "itertools",
"lru", "lru",
@ -924,16 +851,6 @@ dependencies = [
"syn", "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]] [[package]]
name = "unicode-ident" name = "unicode-ident"
version = "1.0.12" version = "1.0.12"

View file

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

View file

@ -7,11 +7,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1714864355, "lastModified": 1713459701,
"narHash": "sha256-uXNW6bapWFfkYIkK1EagydSrFMqycOYEDSq75GmUpjk=", "narHash": "sha256-LjQ11ASxnv/FXfb8QnrIyMkyqSqcBPX+lFK8gu0jSQE=",
"owner": "ipetkov", "owner": "ipetkov",
"repo": "crane", "repo": "crane",
"rev": "442a7a6152f49b907e73206dc8e1f46a61e8e873", "rev": "45ea0059fb325132fdc3c39faffb0941d25d08d3",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -28,11 +28,11 @@
"rust-analyzer-src": "rust-analyzer-src" "rust-analyzer-src": "rust-analyzer-src"
}, },
"locked": { "locked": {
"lastModified": 1714976745, "lastModified": 1713594079,
"narHash": "sha256-SAYU6uaVcUmckp/RFxkndz7u7eX1D69piTIMmAAop6Y=", "narHash": "sha256-lYWehi0cqBdsL1W4xeUnUcXw4U4aBKKCmmQrR01yqE0=",
"owner": "nix-community", "owner": "nix-community",
"repo": "fenix", "repo": "fenix",
"rev": "a291b6ad30f4ec949e6c98dde43d73d2946515c3", "rev": "3247290e1bba55878a2c62d43894d0309d29c918",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -41,39 +41,6 @@
"type": "github" "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": { "home-manager": {
"inputs": { "inputs": {
"nixpkgs": [ "nixpkgs": [
@ -81,11 +48,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1714981474, "lastModified": 1713566308,
"narHash": "sha256-b3/U21CJjCjJKmA9WqUbZGZgCvospO3ArOUTgJugkOY=", "narHash": "sha256-7Y91t8pheIzjJveUMAPyeh5NOq5F49Nq4Hl2532QpJs=",
"owner": "nix-community", "owner": "nix-community",
"repo": "home-manager", "repo": "home-manager",
"rev": "6ebe7be2e67be7b9b54d61ce5704f6fb466c536f", "rev": "057117a401a34259c9615ce62218aea7afdee4d3",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -94,48 +61,6 @@
"type": "github" "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": { "mac-brcm-fw": {
"flake": false, "flake": false,
"locked": { "locked": {
@ -167,11 +92,11 @@
}, },
"nixpkgs": { "nixpkgs": {
"locked": { "locked": {
"lastModified": 1714906307, "lastModified": 1713537308,
"narHash": "sha256-UlRZtrCnhPFSJlDQE7M0eyhgvuuHBTe1eJ9N9AQlJQ0=", "narHash": "sha256-XtTSSIB2DA6tOv+l0FhvfDMiyCmhoRbNB+0SeInZkbk=",
"owner": "NixOS", "owner": "NixOS",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "25865a40d14b3f9cf19f19b924e2ab4069b09588", "rev": "5c24cf2f0a12ad855f444c30b2421d044120c66f",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -182,11 +107,11 @@
}, },
"nixpkgs-stable": { "nixpkgs-stable": {
"locked": { "locked": {
"lastModified": 1714782413, "lastModified": 1713344939,
"narHash": "sha256-tbg0MEuKaPcUrnmGCu4xiY5F+7LW2+ECPKVAJd2HLwM=", "narHash": "sha256-jpHkAt0sG2/J7ueKnG7VvLLkBYUMQbXQ2L8OBpVG53s=",
"owner": "NixOS", "owner": "NixOS",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "651b4702e27a388f0f18e1b970534162dec09aff", "rev": "e402c3eb6d88384ca6c52ef1c53e61bdc9b84ddd",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -197,11 +122,11 @@
}, },
"nixpkgs-unstable-small": { "nixpkgs-unstable-small": {
"locked": { "locked": {
"lastModified": 1715010189, "lastModified": 1713597487,
"narHash": "sha256-VG/ax2TLmsF0G8M3Q/lE0P7U/pzky8NScim8ZGmIfAY=", "narHash": "sha256-bD+FqUZidTjHblGjK+2LpIaHBmo1THF1HW3o4ZBqmrw=",
"owner": "NixOS", "owner": "NixOS",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "95269ee8dbc9daacad586e8ad87567369a7e1042", "rev": "c0f9060ec3937d5a7cf3ce6c698e14d989b453e5",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -215,8 +140,6 @@
"crane": "crane", "crane": "crane",
"fenix": "fenix", "fenix": "fenix",
"home-manager": "home-manager", "home-manager": "home-manager",
"lix": "lix",
"lix-module": "lix-module",
"mac-brcm-fw": "mac-brcm-fw", "mac-brcm-fw": "mac-brcm-fw",
"nixos-hardware": "nixos-hardware", "nixos-hardware": "nixos-hardware",
"nixpkgs": "nixpkgs", "nixpkgs": "nixpkgs",
@ -227,11 +150,11 @@
"rust-analyzer-src": { "rust-analyzer-src": {
"flake": false, "flake": false,
"locked": { "locked": {
"lastModified": 1714936835, "lastModified": 1713559870,
"narHash": "sha256-M+PpgfRMBfHo8Jb2ou/s3maAZbps0XnuHXQU9Hv9vL0=", "narHash": "sha256-HsVa+QM2vMra80OjnjH7JhdvLeJuMdR4sxBNHJveMe4=",
"owner": "rust-lang", "owner": "rust-lang",
"repo": "rust-analyzer", "repo": "rust-analyzer",
"rev": "c4618fe14d39992fbbb85c2d6cad028a232c13d2", "rev": "c83d8cf5844fff3d6e243ab408669222059af1c6",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -240,21 +163,6 @@
"repo": "rust-analyzer", "repo": "rust-analyzer",
"type": "github" "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", "root": "root",

View file

@ -5,15 +5,6 @@
nixpkgs.url = "nixpkgs/nixos-unstable"; nixpkgs.url = "nixpkgs/nixos-unstable";
nixpkgs-stable.url = "nixpkgs/nixos-23.11"; nixpkgs-stable.url = "nixpkgs/nixos-23.11";
nixpkgs-unstable-small.url = "nixpkgs/nixos-unstable-small"; 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 = { home-manager = {
url = "github:nix-community/home-manager"; url = "github:nix-community/home-manager";
inputs.nixpkgs.follows = "nixpkgs"; inputs.nixpkgs.follows = "nixpkgs";
@ -26,6 +17,7 @@
crane = { crane = {
url = "github:ipetkov/crane"; url = "github:ipetkov/crane";
inputs = { inputs = {
flake-utils.follows = "flake-utils";
nixpkgs.follows = "nixpkgs"; nixpkgs.follows = "nixpkgs";
}; };
}; };
@ -40,7 +32,6 @@
nixpkgs, nixpkgs,
nixpkgs-stable, nixpkgs-stable,
nixpkgs-unstable-small, nixpkgs-unstable-small,
lix-module,
home-manager, home-manager,
nixos-hardware, nixos-hardware,
mac-brcm-fw, mac-brcm-fw,
@ -91,7 +82,7 @@
nixosConfigurations = { nixosConfigurations = {
monosodium-glutamate-g = nixpkgs.lib.nixosSystem { monosodium-glutamate-g = nixpkgs.lib.nixosSystem {
specialArgs = { 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"; system = "x86_64-linux";
modules = [ modules = [
@ -116,7 +107,7 @@
}; };
catbook-j = nixpkgs.lib.nixosSystem { catbook-j = nixpkgs.lib.nixosSystem {
specialArgs = { 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"; system = "x86_64-linux";
modules = [ modules = [
@ -141,7 +132,7 @@
}; };
potatobook-g = nixpkgs.lib.nixosSystem { potatobook-g = nixpkgs.lib.nixosSystem {
specialArgs = { specialArgs = {
inherit inputs pkgs-unstable-small rs-programs lix-module; inherit inputs pkgs-unstable-small rs-programs;
}; };
system = "x86_64-linux"; system = "x86_64-linux";
modules = [ modules = [

View file

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

View file

@ -23,5 +23,5 @@
sensitivity = 256; 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.systemd-boot.enable = true;
boot.loader.efi.canTouchEfiVariables = true; boot.loader.efi.canTouchEfiVariables = true;
services.libinput.touchpad = { services.xserver.libinput.touchpad.disableWhileTyping = true;
disableWhileTyping = true; services.xserver.libinput.touchpad.tapping = false;
tapping = false;
};
networking.networkmanager.enable = true; networking.networkmanager.enable = true;
networking.hostName = "potatobook-g"; networking.hostName = "potatobook-g";

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

@ -6,7 +6,6 @@ use std::{
process::Command, process::Command,
}; };
use inquire::Text;
use temp_file::{TempFile, TempFileBuilder}; use temp_file::{TempFile, TempFileBuilder};
use crate::md::{Entry, ToMd}; use crate::md::{Entry, ToMd};
@ -18,7 +17,7 @@ pub fn add_entry(path: PathBuf, title: Option<String>) -> io::Result<()> {
std::process::exit(1); std::process::exit(1);
} }
let title = Text::new("Title").prompt().unwrap(); let title = prompt("Title")?;
let tmp = TempFileBuilder::new() let tmp = TempFileBuilder::new()
.suffix(".jrnl-entry.md") .suffix(".jrnl-entry.md")
@ -58,3 +57,12 @@ pub fn add_entry(path: PathBuf, title: Option<String>) -> io::Result<()> {
Ok(()) 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)
}