Compare commits
No commits in common. "main" and "push-ryvwvsovxzpu" have entirely different histories.
main
...
push-ryvwv
105 changed files with 1271 additions and 6018 deletions
3
.gitignore
vendored
3
.gitignore
vendored
|
@ -1,5 +1,2 @@
|
|||
result
|
||||
.direnv/
|
||||
programs/*/target
|
||||
target
|
||||
*openapi.json
|
||||
|
|
2056
Cargo.lock
generated
2056
Cargo.lock
generated
File diff suppressed because it is too large
Load diff
|
@ -1,5 +0,0 @@
|
|||
[workspace]
|
||||
resolver = "2"
|
||||
members = [ "programs/bar-pinger", "programs/bar-ws-monitor",
|
||||
"programs/jrnl"
|
||||
, "programs/traveldings"]
|
84
common.nix
84
common.nix
|
@ -5,23 +5,12 @@
|
|||
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
|
||||
|
@ -33,22 +22,20 @@ with builtins; {
|
|||
config = {
|
||||
allowUnfree = true;
|
||||
permittedInsecurePackages = [
|
||||
"electron-27.3.11"
|
||||
"nodejs-16.20.0"
|
||||
];
|
||||
};
|
||||
overlays = [rs-programs];
|
||||
};
|
||||
|
||||
environment = {
|
||||
systemPackages = with pkgs; [
|
||||
overskride
|
||||
pulsemixer
|
||||
# pynitrokey
|
||||
# nitrokey-app2
|
||||
|
||||
veracrypt
|
||||
|
||||
htmlq
|
||||
|
||||
prusa-slicer
|
||||
zed-editor
|
||||
wget
|
||||
git
|
||||
neofetch
|
||||
|
@ -59,38 +46,33 @@ with builtins; {
|
|||
iw
|
||||
btop
|
||||
nodejs
|
||||
|
||||
maven
|
||||
jetbrains.idea-ultimate
|
||||
jetbrains.rust-rover
|
||||
jdk8
|
||||
jdk11
|
||||
jdk
|
||||
|
||||
libsecret
|
||||
gh
|
||||
nix-prefetch-scripts
|
||||
fzf
|
||||
glab
|
||||
ripgrep
|
||||
sl
|
||||
lolcat
|
||||
appimage-run
|
||||
git-crypt
|
||||
file
|
||||
whois
|
||||
p7zip
|
||||
file
|
||||
nmap
|
||||
cmatrix
|
||||
tree
|
||||
socat
|
||||
smartmontools
|
||||
mprocs
|
||||
dig
|
||||
aria2
|
||||
cyme
|
||||
usbutils
|
||||
numbat
|
||||
devd
|
||||
|
||||
libjxl
|
||||
|
||||
s10e-jrnl
|
||||
|
||||
ungoogled-chromium
|
||||
scc
|
||||
speedtest-rs
|
||||
];
|
||||
};
|
||||
|
||||
|
@ -101,7 +83,6 @@ with builtins; {
|
|||
};
|
||||
|
||||
services = {
|
||||
systemd-lock-handler.enable = true;
|
||||
openssh = {
|
||||
enable = true;
|
||||
# settings.PasswordAuthentication = false;
|
||||
|
@ -109,6 +90,29 @@ with builtins; {
|
|||
};
|
||||
};
|
||||
|
||||
console.colors = [
|
||||
"282828"
|
||||
"cc241d"
|
||||
"98971a"
|
||||
"d79921"
|
||||
"458588"
|
||||
"b16286"
|
||||
"689d6a"
|
||||
"a89984"
|
||||
"928374"
|
||||
"fb4934"
|
||||
"b8bb26"
|
||||
"fabd2f"
|
||||
"83a598"
|
||||
"d3869b"
|
||||
"8ec07c"
|
||||
"ebdbb2"
|
||||
];
|
||||
|
||||
# nitrokey
|
||||
services.udev.packages = [pkgs.nitrokey-udev-rules];
|
||||
services.pcscd.enable = true;
|
||||
|
||||
programs = {
|
||||
ssh.startAgent = false;
|
||||
gnupg.agent = {
|
||||
|
@ -120,8 +124,6 @@ with builtins; {
|
|||
mtr.enable = true;
|
||||
};
|
||||
|
||||
hardware.gpgSmartcards.enable = true;
|
||||
|
||||
time.timeZone = "Europe/Berlin";
|
||||
|
||||
home-manager.users.jade = {
|
||||
|
@ -140,6 +142,7 @@ with builtins; {
|
|||
boot.kernel.sysctl."vm.max_map_count" = 2147483642;
|
||||
|
||||
hardware = {
|
||||
opengl.enable = true;
|
||||
uinput.enable = true;
|
||||
bluetooth.enable = true;
|
||||
# keyboard.uhk.enable = true;
|
||||
|
@ -154,6 +157,9 @@ with builtins; {
|
|||
users.users.jade = {
|
||||
isNormalUser = true;
|
||||
extraGroups = ["wheel" "input" "uinput" "libvirtd" "adbusers" "dialout" "plugdev" "wireshark"];
|
||||
openssh.authorizedKeys.keys = [
|
||||
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIOaE8TFsIazpn4OnHvHcRpOFr9FfvMaWOiEjmHsmnAoE cardno:000F_70CD7D05"
|
||||
];
|
||||
};
|
||||
|
||||
zramSwap = {
|
||||
|
@ -161,11 +167,5 @@ with builtins; {
|
|||
algorithm = "zstd";
|
||||
};
|
||||
|
||||
users.defaultUserShell = pkgs.nushell;
|
||||
|
||||
nix.gc = {
|
||||
automatic = true;
|
||||
dates = "weekly";
|
||||
options = "--delete-older-than 60d";
|
||||
};
|
||||
users.defaultUserShell = pkgs.nushellFull;
|
||||
}
|
||||
|
|
557
flake.lock
557
flake.lock
|
@ -1,51 +1,95 @@
|
|||
{
|
||||
"nodes": {
|
||||
"crane": {
|
||||
"arion": {
|
||||
"inputs": {
|
||||
"flake-parts": "flake-parts",
|
||||
"haskell-flake": "haskell-flake",
|
||||
"hercules-ci-effects": "hercules-ci-effects",
|
||||
"nixpkgs": "nixpkgs"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1731098351,
|
||||
"narHash": "sha256-HQkYvKvaLQqNa10KEFGgWHfMAbWBfFp+4cAgkut+NNE=",
|
||||
"owner": "ipetkov",
|
||||
"repo": "crane",
|
||||
"rev": "ef80ead953c1b28316cc3f8613904edc2eb90c28",
|
||||
"lastModified": 1707923576,
|
||||
"narHash": "sha256-vch1hvgoB2TEl1+0J9h5uPkTrL4zNFUxE/razagkqQQ=",
|
||||
"owner": "hercules-ci",
|
||||
"repo": "arion",
|
||||
"rev": "2b1fa9a8e9e40bb8e65a677c6fdd66dae4f4676e",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "ipetkov",
|
||||
"repo": "crane",
|
||||
"owner": "hercules-ci",
|
||||
"repo": "arion",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"fenix": {
|
||||
"easymacros": {
|
||||
"inputs": {
|
||||
"nixpkgs": [
|
||||
"nixpkgs"
|
||||
],
|
||||
"rust-analyzer-src": "rust-analyzer-src"
|
||||
"flake-utils": "flake-utils",
|
||||
"naersk": "naersk",
|
||||
"nixpkgs": "nixpkgs_3"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1731133750,
|
||||
"narHash": "sha256-gZ3m8e176ai+akwiayg7Mve73rcUCD0+l6OMMFhGEYI=",
|
||||
"owner": "nix-community",
|
||||
"repo": "fenix",
|
||||
"rev": "87e4581cdfecbac602220fe76c67b37d2d1ee995",
|
||||
"lastModified": 1662552013,
|
||||
"narHash": "sha256-ENoDCKs6gKcGYa06LhCVhro0FVntcy5GBvShS+TPvMY=",
|
||||
"ref": "refs/heads/main",
|
||||
"rev": "43405b3bcf786513adc6534ed0e6618c458ba2cb",
|
||||
"revCount": 38,
|
||||
"type": "git",
|
||||
"url": "https://gitlab.com/obsidianical/easymacros.git"
|
||||
},
|
||||
"original": {
|
||||
"type": "git",
|
||||
"url": "https://gitlab.com/obsidianical/easymacros.git"
|
||||
}
|
||||
},
|
||||
"flake-parts": {
|
||||
"inputs": {
|
||||
"nixpkgs-lib": [
|
||||
"arion",
|
||||
"nixpkgs"
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1706830856,
|
||||
"narHash": "sha256-a0NYyp+h9hlb7ddVz4LUn1vT/PLwqfrWYcHMvFB1xYg=",
|
||||
"owner": "hercules-ci",
|
||||
"repo": "flake-parts",
|
||||
"rev": "b253292d9c0a5ead9bc98c4e9a26c6312e27d69f",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "nix-community",
|
||||
"repo": "fenix",
|
||||
"owner": "hercules-ci",
|
||||
"repo": "flake-parts",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"flake-parts_2": {
|
||||
"inputs": {
|
||||
"nixpkgs-lib": [
|
||||
"arion",
|
||||
"hercules-ci-effects",
|
||||
"nixpkgs"
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1701473968,
|
||||
"narHash": "sha256-YcVE5emp1qQ8ieHUnxt1wCZCC3ZfAS+SRRWZ2TMda7E=",
|
||||
"owner": "hercules-ci",
|
||||
"repo": "flake-parts",
|
||||
"rev": "34fed993f1674c8d06d58b37ce1e0fe5eebcb9f5",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"id": "flake-parts",
|
||||
"type": "indirect"
|
||||
}
|
||||
},
|
||||
"flake-utils": {
|
||||
"inputs": {
|
||||
"systems": "systems"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1726560853,
|
||||
"narHash": "sha256-X6rJYSESBVr3hBoH0WbKE5KvhPU5bloyZ2L4K60/fPQ=",
|
||||
"lastModified": 1656065134,
|
||||
"narHash": "sha256-oc6E6ByIw3oJaIyc67maaFcnjYOz1mMcOtHxbEf9NwQ=",
|
||||
"owner": "numtide",
|
||||
"repo": "flake-utils",
|
||||
"rev": "c1dfcf08411b08f6b8615f7d8971a2bfa81d5e8a",
|
||||
"rev": "bee6a7250dd1b01844a2de7e02e4df7d8a0a206c",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
@ -55,60 +99,87 @@
|
|||
}
|
||||
},
|
||||
"flake-utils_2": {
|
||||
"inputs": {
|
||||
"systems": "systems_2"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1726560853,
|
||||
"narHash": "sha256-X6rJYSESBVr3hBoH0WbKE5KvhPU5bloyZ2L4K60/fPQ=",
|
||||
"lastModified": 1678901627,
|
||||
"narHash": "sha256-U02riOqrKKzwjsxc/400XnElV+UtPUQWpANPlyazjH0=",
|
||||
"owner": "numtide",
|
||||
"repo": "flake-utils",
|
||||
"rev": "c1dfcf08411b08f6b8615f7d8971a2bfa81d5e8a",
|
||||
"rev": "93a2b84fc4b70d9e089d029deacc3583435c2ed6",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "numtide",
|
||||
"repo": "flake-utils",
|
||||
"type": "github"
|
||||
"id": "flake-utils",
|
||||
"type": "indirect"
|
||||
}
|
||||
},
|
||||
"flakey-profile": {
|
||||
"flake-utils_3": {
|
||||
"locked": {
|
||||
"lastModified": 1712898590,
|
||||
"narHash": "sha256-FhGIEU93VHAChKEXx905TSiPZKga69bWl1VB37FK//I=",
|
||||
"owner": "lf-",
|
||||
"repo": "flakey-profile",
|
||||
"rev": "243c903fd8eadc0f63d205665a92d4df91d42d9d",
|
||||
"lastModified": 1667395993,
|
||||
"narHash": "sha256-nuEHfE/LcWyuSWnS8t12N1wc105Qtau+/OdUAjtQ0rA=",
|
||||
"owner": "numtide",
|
||||
"repo": "flake-utils",
|
||||
"rev": "5aed5285a952e0b949eb3ba02c12fa4fcfef535f",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "lf-",
|
||||
"repo": "flakey-profile",
|
||||
"id": "flake-utils",
|
||||
"type": "indirect"
|
||||
}
|
||||
},
|
||||
"gumseite": {
|
||||
"inputs": {
|
||||
"flake-utils": "flake-utils_2",
|
||||
"nixpkgs": "nixpkgs_4"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1680175611,
|
||||
"narHash": "sha256-0VevgW7qjE3rDSudFr/XIQrMmPowDgLO9jkM4AFkR/o=",
|
||||
"ref": "refs/heads/master",
|
||||
"rev": "57f43b774151e34bbf3de5f159924aca93750561",
|
||||
"revCount": 2,
|
||||
"type": "git",
|
||||
"url": "https://gitlab.com/schrottkatze/gum-schulsachen.git"
|
||||
},
|
||||
"original": {
|
||||
"type": "git",
|
||||
"url": "https://gitlab.com/schrottkatze/gum-schulsachen.git"
|
||||
}
|
||||
},
|
||||
"haskell-flake": {
|
||||
"locked": {
|
||||
"lastModified": 1675296942,
|
||||
"narHash": "sha256-u1X1sblozi5qYEcLp1hxcyo8FfDHnRUVX3dJ/tW19jY=",
|
||||
"owner": "srid",
|
||||
"repo": "haskell-flake",
|
||||
"rev": "c2cafce9d57bfca41794dc3b99c593155006c71e",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "srid",
|
||||
"ref": "0.1.0",
|
||||
"repo": "haskell-flake",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"helix-inline-diags": {
|
||||
"hercules-ci-effects": {
|
||||
"inputs": {
|
||||
"crane": [
|
||||
"crane"
|
||||
],
|
||||
"flake-utils": "flake-utils",
|
||||
"flake-parts": "flake-parts_2",
|
||||
"nixpkgs": [
|
||||
"arion",
|
||||
"nixpkgs"
|
||||
],
|
||||
"rust-overlay": "rust-overlay"
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1730790589,
|
||||
"narHash": "sha256-xJ6bQ4VmdTB7A+dMbmOMaZ8a6erB6rkZkB+yzqD7gd4=",
|
||||
"owner": "helix-editor",
|
||||
"repo": "helix",
|
||||
"rev": "b53dafe326d51b7f64a1c52379e3d4150cd2991e",
|
||||
"lastModified": 1704029560,
|
||||
"narHash": "sha256-a4Iu7x1OP+uSYpqadOu8VCPY+MPF3+f6KIi+MAxlgyw=",
|
||||
"owner": "hercules-ci",
|
||||
"repo": "hercules-ci-effects",
|
||||
"rev": "d5cbf433a6ae9cae05400189a8dbc6412a03ba16",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "helix-editor",
|
||||
"repo": "helix",
|
||||
"owner": "hercules-ci",
|
||||
"repo": "hercules-ci-effects",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
|
@ -119,11 +190,11 @@
|
|||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1730837930,
|
||||
"narHash": "sha256-0kZL4m+bKBJUBQse0HanewWO0g8hDdCvBhudzxgehqc=",
|
||||
"lastModified": 1708988456,
|
||||
"narHash": "sha256-RCz7Xe64tN2zgWk+MVHkzg224znwqknJ1RnB7rVqUWw=",
|
||||
"owner": "nix-community",
|
||||
"repo": "home-manager",
|
||||
"rev": "2f607e07f3ac7e53541120536708e824acccfaa8",
|
||||
"rev": "1d085ea4444d26aa52297758b333b449b2aa6fca",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
@ -132,47 +203,30 @@
|
|||
"type": "github"
|
||||
}
|
||||
},
|
||||
"lix": {
|
||||
"flake": false,
|
||||
"locked": {
|
||||
"lastModified": 1731164513,
|
||||
"narHash": "sha256-WnT6MpgrMKgqV2Rs+MfU88+KO+/njELPOtGoNhoX2oA=",
|
||||
"rev": "b967f1d5fe9d1bf58e6159e9b426c5b341489397",
|
||||
"type": "tarball",
|
||||
"url": "https://git.lix.systems/api/v1/repos/lix-project/lix/archive/b967f1d5fe9d1bf58e6159e9b426c5b341489397.tar.gz?rev=b967f1d5fe9d1bf58e6159e9b426c5b341489397"
|
||||
},
|
||||
"original": {
|
||||
"type": "tarball",
|
||||
"url": "https://git.lix.systems/lix-project/lix/archive/main.tar.gz"
|
||||
}
|
||||
},
|
||||
"lix-module": {
|
||||
"karton": {
|
||||
"inputs": {
|
||||
"flake-utils": "flake-utils_2",
|
||||
"flakey-profile": "flakey-profile",
|
||||
"lix": "lix",
|
||||
"nixpkgs": [
|
||||
"nixpkgs"
|
||||
]
|
||||
"naersk": "naersk_2",
|
||||
"nixpkgs": "nixpkgs_6",
|
||||
"utils": "utils"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1731185731,
|
||||
"narHash": "sha256-RNaIu43b9PoXEhW4OqXUNZKY/jezQyCYWwdv1M0VjsA=",
|
||||
"ref": "refs/heads/main",
|
||||
"rev": "691193879d96bdfd1e6ab5ebcca2fadc7604cf34",
|
||||
"revCount": 117,
|
||||
"lastModified": 1683146576,
|
||||
"narHash": "sha256-ZaXE/mmVWgZkfnlY56PFuuCMDyUhNtkKuLzkle6Lg8s=",
|
||||
"ref": "refs/heads/master",
|
||||
"rev": "5002f11bf360e4508fc73c28fa0aa0f80bf0713d",
|
||||
"revCount": 188,
|
||||
"type": "git",
|
||||
"url": "https://git.lix.systems/lix-project/nixos-module"
|
||||
"url": "https://gitlab.com/obsidianical/microbin.git"
|
||||
},
|
||||
"original": {
|
||||
"type": "git",
|
||||
"url": "https://git.lix.systems/lix-project/nixos-module"
|
||||
"url": "https://gitlab.com/obsidianical/microbin.git"
|
||||
}
|
||||
},
|
||||
"mac-brcm-fw": {
|
||||
"flake": false,
|
||||
"locked": {
|
||||
"lastModified": 1727366922,
|
||||
"lastModified": 1701034142,
|
||||
"narHash": "sha256-+kW8ogc6DykjMVlrr+3vWKs9ZUdJ9EW72LbY7k/Qvh4=",
|
||||
"path": "/home/jade/nix-configs/mac-brcm-fw",
|
||||
"type": "path"
|
||||
|
@ -182,6 +236,81 @@
|
|||
"type": "path"
|
||||
}
|
||||
},
|
||||
"meowsite": {
|
||||
"inputs": {
|
||||
"flake-utils": "flake-utils_3",
|
||||
"nixpkgs": "nixpkgs_7"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1678920998,
|
||||
"narHash": "sha256-YM7MdYYoL/Wgmg8nmMVnAm33WwzdA2JFwMHKfOxNBXs=",
|
||||
"ref": "refs/heads/master",
|
||||
"rev": "f40a32b22bc96b07cb78fb5751cf92d5f30b1c24",
|
||||
"revCount": 11,
|
||||
"type": "git",
|
||||
"url": "https://gitlab.com/obsidianical/meowsite.git"
|
||||
},
|
||||
"original": {
|
||||
"type": "git",
|
||||
"url": "https://gitlab.com/obsidianical/meowsite.git"
|
||||
}
|
||||
},
|
||||
"naersk": {
|
||||
"inputs": {
|
||||
"nixpkgs": "nixpkgs_2"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1655042882,
|
||||
"narHash": "sha256-9BX8Fuez5YJlN7cdPO63InoyBy7dm3VlJkkmTt6fS1A=",
|
||||
"owner": "nix-community",
|
||||
"repo": "naersk",
|
||||
"rev": "cddffb5aa211f50c4b8750adbec0bbbdfb26bb9f",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "nix-community",
|
||||
"repo": "naersk",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"naersk_2": {
|
||||
"inputs": {
|
||||
"nixpkgs": "nixpkgs_5"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1671096816,
|
||||
"narHash": "sha256-ezQCsNgmpUHdZANDCILm3RvtO1xH8uujk/+EqNvzIOg=",
|
||||
"owner": "nix-community",
|
||||
"repo": "naersk",
|
||||
"rev": "d998160d6a076cfe8f9741e56aeec7e267e3e114",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "nix-community",
|
||||
"ref": "master",
|
||||
"repo": "naersk",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"naersk_3": {
|
||||
"inputs": {
|
||||
"nixpkgs": "nixpkgs_9"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1671096816,
|
||||
"narHash": "sha256-ezQCsNgmpUHdZANDCILm3RvtO1xH8uujk/+EqNvzIOg=",
|
||||
"owner": "nix-community",
|
||||
"repo": "naersk",
|
||||
"rev": "d998160d6a076cfe8f9741e56aeec7e267e3e114",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "nix-community",
|
||||
"ref": "master",
|
||||
"repo": "naersk",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"nixos-hardware": {
|
||||
"locked": {
|
||||
"lastModified": 1687903496,
|
||||
|
@ -200,26 +329,27 @@
|
|||
},
|
||||
"nixpkgs": {
|
||||
"locked": {
|
||||
"lastModified": 1730785428,
|
||||
"narHash": "sha256-Zwl8YgTVJTEum+L+0zVAWvXAGbWAuXHax3KzuejaDyo=",
|
||||
"lastModified": 1707689078,
|
||||
"narHash": "sha256-UUGmRa84ZJHpGZ1WZEBEUOzaPOWG8LZ0yPg1pdDF/yM=",
|
||||
"owner": "NixOS",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "4aa36568d413aca0ea84a1684d2d46f55dbabad7",
|
||||
"rev": "f9d39fb9aff0efee4a3d5f4a6d7c17701d38a1d8",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"id": "nixpkgs",
|
||||
"owner": "NixOS",
|
||||
"ref": "nixos-unstable",
|
||||
"type": "indirect"
|
||||
"repo": "nixpkgs",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"nixpkgs-stable": {
|
||||
"locked": {
|
||||
"lastModified": 1720535198,
|
||||
"narHash": "sha256-zwVvxrdIzralnSbcpghA92tWu2DV2lwv89xZc8MTrbg=",
|
||||
"lastModified": 1708831307,
|
||||
"narHash": "sha256-0iL/DuGjiUeck1zEaL+aIe2WvA3/cVhp/SlmTcOZXH4=",
|
||||
"owner": "NixOS",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "205fd4226592cc83fd4c0885a3e4c9c400efabb5",
|
||||
"rev": "5bf1cadb72ab4e77cb0b700dab76bcdaf88f706b",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
@ -228,101 +358,204 @@
|
|||
"type": "indirect"
|
||||
}
|
||||
},
|
||||
"nixpkgs-unstable-small": {
|
||||
"nixpkgs_10": {
|
||||
"locked": {
|
||||
"lastModified": 1731136819,
|
||||
"narHash": "sha256-qGmBFnq3/9AiiLZUOVxDsU5j6ysL3PXA8KRp7muJWMs=",
|
||||
"lastModified": 1675614288,
|
||||
"narHash": "sha256-i3Rc/ENnz62BcrSloeVmAyPicEh4WsrEEYR+INs9TYw=",
|
||||
"owner": "NixOS",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "4a2c7def574d031cbf3d7110969f2ca5f38f8ed7",
|
||||
"rev": "d25de6654a34d99dceb02e71e6db516b3b545be6",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "NixOS",
|
||||
"ref": "nixpkgs-unstable",
|
||||
"repo": "nixpkgs",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"nixpkgs_2": {
|
||||
"locked": {
|
||||
"lastModified": 1656755932,
|
||||
"narHash": "sha256-TGThfOxr+HjFK464+UoUE6rClp2cwxjiKvHcBVdIGSQ=",
|
||||
"owner": "NixOS",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "660ac43ff9ab1f12e28bfb31d4719795777fe152",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"id": "nixpkgs",
|
||||
"type": "indirect"
|
||||
}
|
||||
},
|
||||
"nixpkgs_3": {
|
||||
"locked": {
|
||||
"lastModified": 1656755932,
|
||||
"narHash": "sha256-TGThfOxr+HjFK464+UoUE6rClp2cwxjiKvHcBVdIGSQ=",
|
||||
"owner": "NixOS",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "660ac43ff9ab1f12e28bfb31d4719795777fe152",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"id": "nixpkgs",
|
||||
"type": "indirect"
|
||||
}
|
||||
},
|
||||
"nixpkgs_4": {
|
||||
"locked": {
|
||||
"lastModified": 1679966490,
|
||||
"narHash": "sha256-k0jV+y1jawE6w4ZvKgXDNg4+O9NNtcaWwzw8gufv0b4=",
|
||||
"owner": "NixOS",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "5b7cd5c39befee629be284970415b6eb3b0ff000",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "NixOS",
|
||||
"ref": "nixos-22.11",
|
||||
"repo": "nixpkgs",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"nixpkgs_5": {
|
||||
"locked": {
|
||||
"lastModified": 1677852945,
|
||||
"narHash": "sha256-liiVJjkBTuBTAkRW3hrI8MbPD2ImYzwUpa7kvteiKhM=",
|
||||
"owner": "NixOS",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "f5ffd5787786dde3a8bf648c7a1b5f78c4e01abb",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"id": "nixpkgs",
|
||||
"type": "indirect"
|
||||
}
|
||||
},
|
||||
"nixpkgs_6": {
|
||||
"locked": {
|
||||
"lastModified": 1677852945,
|
||||
"narHash": "sha256-liiVJjkBTuBTAkRW3hrI8MbPD2ImYzwUpa7kvteiKhM=",
|
||||
"owner": "NixOS",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "f5ffd5787786dde3a8bf648c7a1b5f78c4e01abb",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "NixOS",
|
||||
"ref": "nixpkgs-unstable",
|
||||
"repo": "nixpkgs",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"nixpkgs_7": {
|
||||
"locked": {
|
||||
"lastModified": 1674407282,
|
||||
"narHash": "sha256-2qwc8mrPINSFdWffPK+ji6nQ9aGnnZyHSItVcYDZDlk=",
|
||||
"owner": "NixOS",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "ab1254087f4cdf4af74b552d7fc95175d9bdbb49",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "NixOS",
|
||||
"ref": "nixos-22.11",
|
||||
"repo": "nixpkgs",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"nixpkgs_8": {
|
||||
"locked": {
|
||||
"lastModified": 1708807242,
|
||||
"narHash": "sha256-sRTRkhMD4delO/hPxxi+XwLqPn8BuUq6nnj4JqLwOu0=",
|
||||
"owner": "NixOS",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "73de017ef2d18a04ac4bfd0c02650007ccb31c2a",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"id": "nixpkgs",
|
||||
"ref": "nixos-unstable",
|
||||
"type": "indirect"
|
||||
}
|
||||
},
|
||||
"nixpkgs_9": {
|
||||
"locked": {
|
||||
"lastModified": 1675614288,
|
||||
"narHash": "sha256-i3Rc/ENnz62BcrSloeVmAyPicEh4WsrEEYR+INs9TYw=",
|
||||
"owner": "NixOS",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "d25de6654a34d99dceb02e71e6db516b3b545be6",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"id": "nixpkgs",
|
||||
"ref": "nixos-unstable-small",
|
||||
"type": "indirect"
|
||||
}
|
||||
},
|
||||
"root": {
|
||||
"inputs": {
|
||||
"crane": "crane",
|
||||
"fenix": "fenix",
|
||||
"helix-inline-diags": "helix-inline-diags",
|
||||
"arion": "arion",
|
||||
"easymacros": "easymacros",
|
||||
"gumseite": "gumseite",
|
||||
"home-manager": "home-manager",
|
||||
"lix-module": "lix-module",
|
||||
"karton": "karton",
|
||||
"mac-brcm-fw": "mac-brcm-fw",
|
||||
"meowsite": "meowsite",
|
||||
"nixos-hardware": "nixos-hardware",
|
||||
"nixpkgs": "nixpkgs",
|
||||
"nixpkgs": "nixpkgs_8",
|
||||
"nixpkgs-stable": "nixpkgs-stable",
|
||||
"nixpkgs-unstable-small": "nixpkgs-unstable-small"
|
||||
"wordsofgod": "wordsofgod"
|
||||
}
|
||||
},
|
||||
"rust-analyzer-src": {
|
||||
"flake": false,
|
||||
"utils": {
|
||||
"locked": {
|
||||
"lastModified": 1731056261,
|
||||
"narHash": "sha256-TPeXChHVcaCBAoE349K7OZH4We5/2ys1GgG4IiwjwOs=",
|
||||
"owner": "rust-lang",
|
||||
"repo": "rust-analyzer",
|
||||
"rev": "dd9cd22514cb1001a0a2374b36a85eb75245f27b",
|
||||
"lastModified": 1676283394,
|
||||
"narHash": "sha256-XX2f9c3iySLCw54rJ/CZs+ZK6IQy7GXNY4nSOyu2QG4=",
|
||||
"owner": "numtide",
|
||||
"repo": "flake-utils",
|
||||
"rev": "3db36a8b464d0c4532ba1c7dda728f4576d6d073",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "rust-lang",
|
||||
"ref": "nightly",
|
||||
"repo": "rust-analyzer",
|
||||
"owner": "numtide",
|
||||
"repo": "flake-utils",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"rust-overlay": {
|
||||
"utils_2": {
|
||||
"locked": {
|
||||
"lastModified": 1667395993,
|
||||
"narHash": "sha256-nuEHfE/LcWyuSWnS8t12N1wc105Qtau+/OdUAjtQ0rA=",
|
||||
"owner": "numtide",
|
||||
"repo": "flake-utils",
|
||||
"rev": "5aed5285a952e0b949eb3ba02c12fa4fcfef535f",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "numtide",
|
||||
"repo": "flake-utils",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"wordsofgod": {
|
||||
"inputs": {
|
||||
"nixpkgs": [
|
||||
"helix-inline-diags",
|
||||
"nixpkgs"
|
||||
]
|
||||
"naersk": "naersk_3",
|
||||
"nixpkgs": "nixpkgs_10",
|
||||
"utils": "utils_2"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1728268235,
|
||||
"narHash": "sha256-lJMFnMO4maJuNO6PQ5fZesrTmglze3UFTTBuKGwR1Nw=",
|
||||
"owner": "oxalica",
|
||||
"repo": "rust-overlay",
|
||||
"rev": "25685cc2c7054efc31351c172ae77b21814f2d42",
|
||||
"type": "github"
|
||||
"lastModified": 1675936524,
|
||||
"narHash": "sha256-cr6lknWz+2N4mq6csfdYLUBNTxB2MbaEGH8yQyk3XbA=",
|
||||
"ref": "refs/heads/master",
|
||||
"rev": "93c03cbe6f7bac22c7c5023d4bcba3af837ce43b",
|
||||
"revCount": 8,
|
||||
"type": "git",
|
||||
"url": "https://gitlab.com/obsidianical/wordsofgod.git"
|
||||
},
|
||||
"original": {
|
||||
"owner": "oxalica",
|
||||
"repo": "rust-overlay",
|
||||
"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"
|
||||
}
|
||||
},
|
||||
"systems_2": {
|
||||
"locked": {
|
||||
"lastModified": 1681028828,
|
||||
"narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=",
|
||||
"owner": "nix-systems",
|
||||
"repo": "default",
|
||||
"rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "nix-systems",
|
||||
"repo": "default",
|
||||
"type": "github"
|
||||
"type": "git",
|
||||
"url": "https://gitlab.com/obsidianical/wordsofgod.git"
|
||||
}
|
||||
}
|
||||
},
|
||||
|
|
76
flake.nix
76
flake.nix
|
@ -4,18 +4,6 @@
|
|||
inputs = {
|
||||
nixpkgs.url = "nixpkgs/nixos-unstable";
|
||||
nixpkgs-stable.url = "nixpkgs/nixos-23.11";
|
||||
nixpkgs-unstable-small.url = "nixpkgs/nixos-unstable-small";
|
||||
helix-inline-diags = {
|
||||
url = "github:helix-editor/helix";
|
||||
inputs = {
|
||||
crane.follows = "crane";
|
||||
nixpkgs.follows = "nixpkgs";
|
||||
};
|
||||
};
|
||||
lix-module = {
|
||||
url = "git+https://git.lix.systems/lix-project/nixos-module";
|
||||
inputs.nixpkgs.follows = "nixpkgs";
|
||||
};
|
||||
home-manager = {
|
||||
url = "github:nix-community/home-manager";
|
||||
inputs.nixpkgs.follows = "nixpkgs";
|
||||
|
@ -25,55 +13,25 @@
|
|||
url = "path:/home/jade/nix-configs/mac-brcm-fw";
|
||||
flake = false;
|
||||
};
|
||||
crane = {
|
||||
url = "github:ipetkov/crane";
|
||||
};
|
||||
fenix = {
|
||||
url = "github:nix-community/fenix";
|
||||
inputs.nixpkgs.follows = "nixpkgs";
|
||||
};
|
||||
#mms.url = "github:mkaito/nixos-modded-minecraft-servers";
|
||||
easymacros.url = "git+https://gitlab.com/obsidianical/easymacros.git";
|
||||
meowsite.url = "git+https://gitlab.com/obsidianical/meowsite.git";
|
||||
wordsofgod.url = "git+https://gitlab.com/obsidianical/wordsofgod.git";
|
||||
karton.url = "git+https://gitlab.com/obsidianical/microbin.git";
|
||||
arion.url = "github:hercules-ci/arion";
|
||||
gumseite.url = "git+https://gitlab.com/schrottkatze/gum-schulsachen.git";
|
||||
};
|
||||
|
||||
outputs = {
|
||||
self,
|
||||
nixpkgs,
|
||||
nixpkgs-stable,
|
||||
nixpkgs-unstable-small,
|
||||
helix-inline-diags,
|
||||
lix-module,
|
||||
home-manager,
|
||||
nixos-hardware,
|
||||
mac-brcm-fw,
|
||||
fenix,
|
||||
crane,
|
||||
...
|
||||
} @ inputs: let
|
||||
system = "x86_64-linux";
|
||||
pkgs = nixpkgs.legacyPackages.${system};
|
||||
pkgs-stable = nixpkgs-stable.legacyPackages.${system};
|
||||
pkgs-unstable-small = nixpkgs-unstable-small.legacyPackages.${system};
|
||||
crane-lib = crane.mkLib nixpkgs.legacyPackages.${system};
|
||||
rs-toolchain = with fenix.packages.${system};
|
||||
combine [
|
||||
complete.toolchain
|
||||
];
|
||||
# rs-platform = pkgs.makeRustPlatform {
|
||||
# cargo = rs-toolchain;
|
||||
# rustc = rs-toolchain;
|
||||
# };
|
||||
rs-programs = final: prev: {
|
||||
# s10e-jrnl = rs-platform.buildRustPackage {
|
||||
# pname = "jrnl";
|
||||
# version = "0.0.1";
|
||||
# src = ./programs/jrnl;
|
||||
# cargoLock.lockFile = ./programs/jrnl/Cargo.lock;
|
||||
# };
|
||||
s10e-jrnl = crane-lib.buildPackage {
|
||||
pname = "s10e-bs";
|
||||
version = "0.0.1";
|
||||
src = crane-lib.cleanCargoSource (crane-lib.path ./.);
|
||||
};
|
||||
};
|
||||
pkgs = nixpkgs.legacyPackages."x86_64-linux";
|
||||
in {
|
||||
devShells."x86_64-linux".default = pkgs.mkShell {
|
||||
buildInputs = [
|
||||
|
@ -85,16 +43,13 @@
|
|||
xmobar
|
||||
statgrab
|
||||
]))
|
||||
rs-toolchain
|
||||
pkgs.haskell-language-server
|
||||
pkgs.pkg-config
|
||||
pkgs.openssl
|
||||
];
|
||||
};
|
||||
nixosConfigurations = {
|
||||
monosodium-glutamate-g = nixpkgs.lib.nixosSystem {
|
||||
specialArgs = {
|
||||
inherit inputs pkgs-unstable-small pkgs-stable rs-programs lix-module helix-inline-diags;
|
||||
inherit inputs;
|
||||
};
|
||||
system = "x86_64-linux";
|
||||
modules = [
|
||||
|
@ -103,9 +58,6 @@
|
|||
{
|
||||
home-manager.useGlobalPkgs = true;
|
||||
home-manager.useUserPackages = true;
|
||||
home-manager.extraSpecialArgs = {
|
||||
inherit pkgs-unstable-small pkgs-stable;
|
||||
};
|
||||
home-manager.users.jade = {
|
||||
nixosConfig,
|
||||
pkgs,
|
||||
|
@ -119,7 +71,7 @@
|
|||
};
|
||||
catbook-j = nixpkgs.lib.nixosSystem {
|
||||
specialArgs = {
|
||||
inherit inputs pkgs-unstable-small pkgs-stable rs-programs lix-module helix-inline-diags;
|
||||
inherit inputs;
|
||||
};
|
||||
system = "x86_64-linux";
|
||||
modules = [
|
||||
|
@ -128,9 +80,6 @@
|
|||
{
|
||||
home-manager.useGlobalPkgs = true;
|
||||
home-manager.useUserPackages = true;
|
||||
home-manager.extraSpecialArgs = {
|
||||
inherit pkgs-unstable-small pkgs-stable;
|
||||
};
|
||||
home-manager.users.jade = {
|
||||
nixosConfig,
|
||||
pkgs,
|
||||
|
@ -144,7 +93,7 @@
|
|||
};
|
||||
potatobook-g = nixpkgs.lib.nixosSystem {
|
||||
specialArgs = {
|
||||
inherit inputs pkgs-unstable-small rs-programs lix-module helix-inline-diags;
|
||||
inherit inputs;
|
||||
};
|
||||
system = "x86_64-linux";
|
||||
modules = [
|
||||
|
@ -154,9 +103,6 @@
|
|||
{
|
||||
home-manager.useGlobalPkgs = true;
|
||||
home-manager.useUserPackages = true;
|
||||
home-manager.extraSpecialArgs = {
|
||||
inherit pkgs-unstable-small pkgs-stable;
|
||||
};
|
||||
home-manager.users.jade = {
|
||||
nixosConfig,
|
||||
pkgs,
|
||||
|
|
|
@ -68,10 +68,7 @@ myKeys conf@(XConfig {XMonad.modMask = modm}) =
|
|||
-- TODO: other media keys
|
||||
((0, xF86XK_AudioRaiseVolume), spawn "amixer -D pulse sset Master 10%+"),
|
||||
((0, xF86XK_AudioLowerVolume), spawn "amixer -D pulse sset Master 10%-"),
|
||||
((0, xF86XK_AudioMute), spawn "amixer -D pulse sset Master toggle"),
|
||||
((0, xF86XK_AudioNext), spawn "playerctl next"),
|
||||
((0, xF86XK_AudioPrev), spawn "playerctl previous"),
|
||||
((0, xF86XK_AudioPause), spawn "playerctl play-pause")
|
||||
((0, xF86XK_AudioMute), spawn "amixer -D pulse sset Master toggle")
|
||||
]
|
||||
++ [ ((m .|. modm, k), windows $ f i)
|
||||
| (i, k) <- zip (XMonad.workspaces conf) [xK_1 .. xK_9],
|
|
@ -9,32 +9,34 @@
|
|||
}: {
|
||||
nixpkgs.config.permittedInsecurePackages = [
|
||||
"electron-25.9.0"
|
||||
"electron-27.3.11"
|
||||
];
|
||||
imports = [
|
||||
# Include the results of the hardware scan.
|
||||
./hardware-configuration.nix
|
||||
../../common.nix
|
||||
../../modules
|
||||
./modules
|
||||
];
|
||||
jade = {
|
||||
hwKey.pamAuth.enable = true;
|
||||
flatpak.enable = true;
|
||||
desktop = {
|
||||
dm.autoLogin = {
|
||||
enable = true;
|
||||
delay = 5;
|
||||
};
|
||||
compositing.enable = true;
|
||||
syncthing.enable = true;
|
||||
kdeconnect.enable = true;
|
||||
cloud.enable = true;
|
||||
social.enable = true;
|
||||
mail.enable = true;
|
||||
gaming.enable = true;
|
||||
evremap.enable = true;
|
||||
};
|
||||
terminal.enable = true;
|
||||
};
|
||||
|
||||
security.pam.services.swaylock = {};
|
||||
hardware.trackpoint = {
|
||||
enable = true;
|
||||
# device = "MELF0410:00 1FD2:7007";
|
||||
device = "DELL081C:00 044E:121F Mouse";
|
||||
sensitivity = 255;
|
||||
};
|
||||
|
||||
hardware.usb-modeswitch.enable = true;
|
||||
systemd.services."ModemManager".enable = true;
|
||||
|
@ -42,7 +44,19 @@
|
|||
systemd.services."ModemManager".wantedBy = ["multi-user.target"];
|
||||
|
||||
environment.variables = {
|
||||
VDPAU_DRIVER = lib.mkIf config.hardware.graphics.enable (lib.mkDefault "va_gl");
|
||||
VDPAU_DRIVER = lib.mkIf config.hardware.opengl.enable (lib.mkDefault "va_gl");
|
||||
};
|
||||
|
||||
hardware.opengl = {
|
||||
enable = true;
|
||||
extraPackages = with pkgs; [
|
||||
intel-ocl
|
||||
intel-media-driver
|
||||
intel-vaapi-driver
|
||||
intel-compute-runtime
|
||||
libvdpau-va-gl
|
||||
mesa.drivers
|
||||
];
|
||||
};
|
||||
|
||||
programs.wireshark.enable = true;
|
||||
|
@ -55,6 +69,8 @@
|
|||
hardware.bluetooth.enable = true;
|
||||
services.blueman.enable = true;
|
||||
|
||||
services.xserver.libinput.touchpad.tapping = false;
|
||||
|
||||
environment.systemPackages = [
|
||||
pkgs.plantuml
|
||||
pkgs.mqttui
|
||||
|
@ -72,11 +88,55 @@
|
|||
"/crypto_keyfile.bin" = null;
|
||||
};
|
||||
|
||||
boot.kernelPackages = pkgs.linuxPackages_zen;
|
||||
# nixpkgs = {
|
||||
# overlays = [
|
||||
# (self: super: {
|
||||
# linux_zen_xeniafied = pkgs.linuxPackagesFor (pkgs.linuxKernel.kernels.linux_zen.override {
|
||||
# structuredExtraConfig = with lib.kernel; {
|
||||
# "FB" = yes;
|
||||
# "FRAMEBUFFER_CONSOLE" = yes;
|
||||
# "VGA_CONSOLE" = yes;
|
||||
# "VIDEO_SELECT" = yes;
|
||||
# LOGO = lib.mkForce yes;
|
||||
# LOGO_LINUX_CLUT224 = yes;
|
||||
# };
|
||||
# ignoreConfigErrors = true;
|
||||
# });
|
||||
# })
|
||||
# ];
|
||||
# };
|
||||
|
||||
# networking
|
||||
boot.kernelPackages = pkgs.linuxPackages_zen;
|
||||
# boot.kernelPatches = [
|
||||
# {
|
||||
# name = "fomx";
|
||||
# patch = ../../other/0001-fomx.patch;
|
||||
# }
|
||||
# ];
|
||||
|
||||
services.xserver.displayManager.autoLogin = {
|
||||
enable = true;
|
||||
user = "jade";
|
||||
};
|
||||
|
||||
networking.hostName = "catbook-j"; # Define your hostname.
|
||||
# networking.wireless.enable = true; # Enables wireless support via wpa_supplicant.
|
||||
|
||||
# Configure network proxy if necessary
|
||||
# networking.proxy.default = "http://user:password@proxy:port/";
|
||||
# networking.proxy.noProxy = "127.0.0.1,localhost,internal.domain";
|
||||
|
||||
# Enable networking
|
||||
networking.networkmanager.enable = true;
|
||||
networking.hostName = "catbook-j";
|
||||
|
||||
security.pam.services.jade.u2fAuth = true;
|
||||
programs.i3lock.u2fSupport = true;
|
||||
security.pam.u2f = {
|
||||
enable = true;
|
||||
cue = true;
|
||||
control = "sufficient";
|
||||
authFile = "/home/jade/.ssh/u2f_keys";
|
||||
};
|
||||
|
||||
i18n.extraLocaleSettings = {
|
||||
LC_ADDRESS = "de_DE.UTF-8";
|
||||
|
|
|
@ -1,6 +0,0 @@
|
|||
{...}: {
|
||||
imports = [
|
||||
./input.nix
|
||||
./graphics.nix
|
||||
];
|
||||
}
|
|
@ -1,12 +0,0 @@
|
|||
{pkgs, ...}: {
|
||||
hardware.graphics = {
|
||||
extraPackages = with pkgs; [
|
||||
intel-ocl
|
||||
intel-media-driver
|
||||
intel-vaapi-driver
|
||||
intel-compute-runtime
|
||||
libvdpau-va-gl
|
||||
mesa.drivers
|
||||
];
|
||||
};
|
||||
}
|
|
@ -1,27 +0,0 @@
|
|||
{...}: {
|
||||
# key remapping
|
||||
jade.input.remapping = {
|
||||
enable = true;
|
||||
devices."AT Translated Set 2 keyboard" = {
|
||||
swapKeys = [
|
||||
["KEY_Y" "KEY_Z"]
|
||||
["KEY_LEFTALT" "KEY_LEFTMETA"]
|
||||
];
|
||||
dual_role = [
|
||||
{
|
||||
input = "KEY_CAPSLOCK";
|
||||
hold = ["KEY_LEFTCTRL"];
|
||||
tap = ["KEY_ESC"];
|
||||
}
|
||||
];
|
||||
};
|
||||
};
|
||||
|
||||
hardware.trackpoint = {
|
||||
enable = true;
|
||||
device = "TPPS/2 IBM TrackPoint";
|
||||
sensitivity = 256;
|
||||
};
|
||||
|
||||
services.libinput.touchpad.tapping = true;
|
||||
}
|
|
@ -6,19 +6,39 @@
|
|||
./hardware-configuration.nix
|
||||
../../common.nix
|
||||
../../modules
|
||||
./modules
|
||||
];
|
||||
|
||||
# nixpkgs = {
|
||||
# overlays = [
|
||||
# (self: super: {
|
||||
# linux_zen_xeniafied = pkgs.linuxPackagesFor (pkgs.linuxKernel.kernels.linux_zen.override {
|
||||
# structuredExtraConfig = with lib.kernel; {
|
||||
# "FB" = yes;
|
||||
# "FRAMEBUFFER_CONSOLE" = yes;
|
||||
# "VGA_CONSOLE" = yes;
|
||||
# "VIDEO_SELECT" = yes;
|
||||
# LOGO = lib.mkForce yes;
|
||||
# LOGO_LINUX_CLUT224 = yes;
|
||||
# };
|
||||
# ignoreConfigErrors = true;
|
||||
# });
|
||||
# })
|
||||
# ];
|
||||
# };
|
||||
|
||||
jade = {
|
||||
hwKey.pamAuth.enable = true;
|
||||
flatpak.enable = true;
|
||||
desktop = {
|
||||
compositing.enable = true;
|
||||
syncthing.enable = true;
|
||||
kdeconnect.enable = true;
|
||||
cloud.enable = true;
|
||||
social.enable = true;
|
||||
gaming.enable = true;
|
||||
mail.enable = true;
|
||||
evremap.enable = false;
|
||||
};
|
||||
terminal.enable = true;
|
||||
};
|
||||
boot = {
|
||||
loader = {
|
||||
|
@ -26,8 +46,16 @@
|
|||
systemd-boot.enable = true;
|
||||
efi.canTouchEfiVariables = true;
|
||||
};
|
||||
|
||||
# latest linux kernel
|
||||
#boot.kernelPackages = pkgs.linuxPackages_latest;
|
||||
#boot.kernelPackages = pkgs.linux_zen_xeniafied;
|
||||
kernelPackages = pkgs.linuxPackages_zen;
|
||||
# boot.kernelPatches = [
|
||||
# {
|
||||
# name = "fomx";
|
||||
# patch = ../other/0001-fomx.patch;
|
||||
# }
|
||||
# ];
|
||||
|
||||
binfmt.emulatedSystems = ["aarch64-linux"];
|
||||
};
|
||||
|
@ -54,15 +82,31 @@
|
|||
enableRedistributableFirmware = true;
|
||||
};
|
||||
|
||||
security.pam.services.jade.u2fAuth = true;
|
||||
programs.i3lock.u2fSupport = true;
|
||||
|
||||
security.pam.u2f = {
|
||||
enable = true;
|
||||
cue = true;
|
||||
control = "sufficient";
|
||||
authFile = "/home/jade/.ssh/u2f_keys";
|
||||
};
|
||||
|
||||
# missing: menu-qalc picom-jonaburg
|
||||
environment.systemPackages = with pkgs; [
|
||||
# TODO: clean up.
|
||||
libGL
|
||||
libreoffice-fresh
|
||||
wireshark
|
||||
awesomebump
|
||||
|
||||
zenstates
|
||||
zenmonitor
|
||||
nvtop-amd
|
||||
radeontop
|
||||
rgp
|
||||
tea
|
||||
blender-hip
|
||||
jdk8
|
||||
jdk11
|
||||
];
|
||||
programs = {
|
||||
wireshark.enable = true;
|
||||
|
@ -82,7 +126,23 @@
|
|||
# networking.firewall.allowedTCPPorts = [ 4713 ];
|
||||
systemd.services."NetworkManager-wait-online".enable = false;
|
||||
|
||||
swapDevices = [{device = "/swap/swapfile";}];
|
||||
systemd.services = {
|
||||
create-swapfile = {
|
||||
serviceConfig.Type = "oneshot";
|
||||
wantedBy = ["swap-swapfile.swap"];
|
||||
script = ''
|
||||
swapfile="/swap/swapfile"
|
||||
if [[ -f "$swapfile" ]]; then
|
||||
echo "Swap file $swapfile already exists, taking no action"
|
||||
else
|
||||
echo "Setting up swap file $swapfile"
|
||||
${pkgs.coreutils}/bin/truncate -s 0 "$swapfile"
|
||||
${pkgs.e2fsprogs}/bin/chattr +C "$swapfile"
|
||||
fi
|
||||
'';
|
||||
};
|
||||
};
|
||||
|
||||
system.stateVersion = "24.05"; # Did you read the comment?
|
||||
# release channel
|
||||
system.stateVersion = "22.05"; # Did you read the comment?
|
||||
}
|
||||
|
|
|
@ -12,32 +12,34 @@
|
|||
(modulesPath + "/installer/scan/not-detected.nix")
|
||||
];
|
||||
|
||||
boot.initrd.availableKernelModules = ["nvme" "xhci_pci" "ahci" "uas" "usbhid" "sd_mod"];
|
||||
boot.initrd.availableKernelModules = ["nvme" "xhci_pci" "ahci" "usbhid" "usb_storage" "sd_mod"];
|
||||
boot.initrd.kernelModules = [];
|
||||
boot.kernelModules = ["kvm-amd"];
|
||||
boot.extraModulePackages = [];
|
||||
|
||||
fileSystems."/" = {
|
||||
device = "/dev/disk/by-uuid/efb8f256-5b14-4b52-a2d9-ae4b91ecb711";
|
||||
device = "/dev/disk/by-uuid/72ffbc9d-a319-42d7-8d26-13c921a679db";
|
||||
fsType = "btrfs";
|
||||
options = ["subvol=@"];
|
||||
options = ["subvol=@root" "compress=zstd:3"];
|
||||
};
|
||||
|
||||
boot.initrd.luks.devices."luks-919f9b8b-2804-447a-97e0-f7f515d0be56".device = "/dev/disk/by-uuid/919f9b8b-2804-447a-97e0-f7f515d0be56";
|
||||
fileSystems."/home" = {
|
||||
device = "/dev/disk/by-uuid/72ffbc9d-a319-42d7-8d26-13c921a679db";
|
||||
fsType = "btrfs";
|
||||
options = ["subvol=@home" "compress=zstd:3"];
|
||||
};
|
||||
|
||||
fileSystems."/boot" = {
|
||||
device = "/dev/disk/by-uuid/3FAD-A6B4";
|
||||
device = "/dev/disk/by-uuid/D63E-18C9";
|
||||
fsType = "vfat";
|
||||
options = ["fmask=0077" "dmask=0077"];
|
||||
};
|
||||
|
||||
fileSystems."/swap" = {
|
||||
device = "/dev/disk/by-uuid/efb8f256-5b14-4b52-a2d9-ae4b91ecb711";
|
||||
fsType = "btrfs";
|
||||
options = ["subvol=swap"];
|
||||
};
|
||||
|
||||
swapDevices = [];
|
||||
swapDevices = [
|
||||
{
|
||||
device = "/swap/swapfile";
|
||||
size = (1024 * 64) + (1024 * 8); # 72G
|
||||
}
|
||||
];
|
||||
|
||||
# Enables DHCP on each ethernet and wireless interface. In case of scripted networking
|
||||
# (the default) this is the recommended approach. When using systemd-networkd it's
|
||||
|
@ -45,9 +47,7 @@
|
|||
# with explicit per-interface declarations with `networking.interfaces.<interface>.useDHCP`.
|
||||
networking.useDHCP = lib.mkDefault true;
|
||||
# networking.interfaces.eno1.useDHCP = lib.mkDefault true;
|
||||
# networking.interfaces.wg0-mullvad.useDHCP = lib.mkDefault true;
|
||||
# networking.interfaces.wlp6s0.useDHCP = lib.mkDefault true;
|
||||
# networking.interfaces.wlp9s0.useDHCP = lib.mkDefault true;
|
||||
|
||||
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
|
||||
hardware.cpu.amd.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
|
||||
}
|
||||
|
|
|
@ -1,5 +0,0 @@
|
|||
{...}: {
|
||||
imports = [
|
||||
./graphics.nix
|
||||
];
|
||||
}
|
|
@ -1,7 +0,0 @@
|
|||
{pkgs, ...}: {
|
||||
environment.systemPackages = [
|
||||
pkgs.nvtop-amd
|
||||
pkgs.radeontop
|
||||
pkgs.rgp
|
||||
];
|
||||
}
|
|
@ -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";
|
||||
|
@ -117,8 +116,17 @@
|
|||
services.gnome.gnome-keyring.enable = true;
|
||||
programs.seahorse.enable = true;
|
||||
security.pam.services.jade.enableGnomeKeyring = true;
|
||||
security.pam.services.jade.u2fAuth = true;
|
||||
|
||||
systemd.services."NetworkManager-wait-online".enable = false;
|
||||
programs.i3lock.u2fSupport = true;
|
||||
|
||||
security.pam.u2f = {
|
||||
enable = true;
|
||||
cue = true;
|
||||
control = "sufficient";
|
||||
authFile = "/home/jade/.ssh/u2f_keys";
|
||||
};
|
||||
|
||||
# services.pixiecore =
|
||||
# let
|
||||
|
|
8
justfile
8
justfile
|
@ -1,13 +1,13 @@
|
|||
upgrade: update build
|
||||
|
||||
test:
|
||||
sudo nixos-rebuild test --flake . --impure --log-format multiline
|
||||
sudo nixos-rebuild test --flake . --impure
|
||||
|
||||
build:
|
||||
sudo nixos-rebuild switch --flake . --impure --fast --log-format multiline
|
||||
sudo nixos-rebuild switch --flake . --impure --fast
|
||||
|
||||
update:
|
||||
nix flake update --commit-lock-file --log-format multiline
|
||||
nix flake update --commit-lock-file
|
||||
|
||||
build-mac:
|
||||
sudo nixos-rebuild switch --flake . --impure --override-input mac-brcm-fw path:/home/jade/mac-brcm-fw --fast --log-format multiline
|
||||
sudo nixos-rebuild switch --flake . --impure --override-input mac-brcm-fw path:/home/jade/mac-brcm-fw --fast
|
||||
|
|
|
@ -2,10 +2,10 @@
|
|||
imports = [
|
||||
./shell
|
||||
./desktop
|
||||
./hardware
|
||||
./terminal.nix
|
||||
./flatpak.nix
|
||||
./firewall.nix
|
||||
./desktop-environment
|
||||
./input
|
||||
./graphics.nix
|
||||
./git.nix
|
||||
./kmscon.nix
|
||||
];
|
||||
}
|
||||
|
|
|
@ -1,24 +0,0 @@
|
|||
{pkgs, ...}: {
|
||||
programs = {
|
||||
noisetorch.enable = true;
|
||||
};
|
||||
services = {
|
||||
pipewire = {
|
||||
enable = true;
|
||||
alsa.enable = true;
|
||||
pulse.enable = true;
|
||||
jack.enable = true;
|
||||
};
|
||||
};
|
||||
environment.systemPackages = with pkgs; [
|
||||
pavucontrol
|
||||
volumeicon
|
||||
playerctl
|
||||
|
||||
pulseaudioFull
|
||||
cava
|
||||
helvum
|
||||
];
|
||||
hardware.pulseaudio.enable = pkgs.lib.mkForce false;
|
||||
# sound.mediaKeys.enable = true;
|
||||
}
|
|
@ -1,12 +0,0 @@
|
|||
{...}: {
|
||||
imports = [
|
||||
./audio.nix
|
||||
./eduroam.nix
|
||||
./flatpak.nix
|
||||
./home
|
||||
./dm.nix
|
||||
];
|
||||
services.upower = {
|
||||
enable = true;
|
||||
};
|
||||
}
|
|
@ -1,36 +0,0 @@
|
|||
{
|
||||
pkgs,
|
||||
config,
|
||||
lib,
|
||||
...
|
||||
}: let
|
||||
cfg = config.jade.desktop.dm;
|
||||
in
|
||||
with lib; {
|
||||
options.jade.desktop.dm.autoLogin = {
|
||||
enable = mkEnableOption "Enable Autologin";
|
||||
delay = mkOption {
|
||||
type = types.int;
|
||||
default = 0;
|
||||
};
|
||||
};
|
||||
config.services = {
|
||||
displayManager = {
|
||||
autoLogin = {
|
||||
enable = cfg.autoLogin.enable;
|
||||
user = "jade";
|
||||
};
|
||||
defaultSession = "sway";
|
||||
sessionPackages = [
|
||||
pkgs.sway
|
||||
];
|
||||
};
|
||||
xserver.displayManager.gdm = {
|
||||
enable = true;
|
||||
banner = "Meow :3";
|
||||
autoLogin = {
|
||||
delay = cfg.autoLogin.delay;
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
|
@ -1,56 +0,0 @@
|
|||
# Thanks @ kloenk (@kloenk@catcatnya.com) for making this for me at MRMCD 2024 :33
|
||||
{pkgs, ...}: let
|
||||
caDir = "/var/lib/easyroam";
|
||||
uuid = "821ad781-76a3-447f-a2e8-c7f18a1df3bc";
|
||||
in {
|
||||
systemd.services.easyroam = {
|
||||
requires = ["NetworkManager.service"];
|
||||
after = ["NetworkManager.service"];
|
||||
requiredBy = ["network-online.target"];
|
||||
path = with pkgs; [networkmanager openssl gnused];
|
||||
script = ''
|
||||
set -x
|
||||
openssl pkcs12 -password pass: -in ${caDir}/my_easyroam_cert.p12 -legacy -nokeys | openssl x509 > ${caDir}/easyroam_client_cert.pem
|
||||
cn=$(openssl x509 -noout -subject -in ${caDir}/easyroam_client_cert.pem -legacy | sed 's/.*CN = \(.*\), C.*/\1/')
|
||||
openssl pkcs12 -legacy -password pass: -in ${caDir}/my_easyroam_cert.p12 -nodes -nocerts | openssl rsa -aes256 -passin pass: -passout pass:meow -out ${caDir}/easyroam_client_key.pem
|
||||
openssl pkcs12 -password pass: -in ${caDir}/my_easyroam_cert.p12 -legacy -cacerts -nokeys > ${caDir}/easyroam_root_ca.pem
|
||||
|
||||
nmcli connection modify --temporary uuid ${uuid} 802-1x.identity "$cn"
|
||||
'';
|
||||
serviceConfig = {
|
||||
Type = "oneshot";
|
||||
};
|
||||
};
|
||||
|
||||
networking.networkmanager.ensureProfiles.profiles.eduroam = {
|
||||
"802-1x" = {
|
||||
ca-cert = "${caDir}/easyroam_root_ca.pem";
|
||||
client-cert = "${caDir}/easyroam_client_cert.pem";
|
||||
domain-suffix-match = "easyroam.eduroam.de";
|
||||
eap = "tls;";
|
||||
identity = "meow";
|
||||
private-key = "${caDir}/easyroam_client_key.pem";
|
||||
private-key-password = "meow";
|
||||
};
|
||||
connection = {
|
||||
id = "eduroam";
|
||||
type = "wifi";
|
||||
inherit uuid;
|
||||
};
|
||||
ipv4 = {
|
||||
method = "auto";
|
||||
};
|
||||
ipv6 = {
|
||||
addr-gen-mode = "default";
|
||||
method = "auto";
|
||||
};
|
||||
proxy = {};
|
||||
wifi = {
|
||||
mode = "infrastructure";
|
||||
ssid = "eduroam";
|
||||
};
|
||||
wifi-security = {
|
||||
key-mgmt = "wpa-eap";
|
||||
};
|
||||
};
|
||||
}
|
|
@ -1,16 +0,0 @@
|
|||
{
|
||||
config,
|
||||
lib,
|
||||
pkgs,
|
||||
...
|
||||
}: {
|
||||
services.flatpak.enable = true;
|
||||
xdg.portal = {
|
||||
enable = true;
|
||||
# TODO
|
||||
config.common.default = "*";
|
||||
extraPortals = [
|
||||
pkgs.xdg-desktop-portal-gtk
|
||||
];
|
||||
};
|
||||
}
|
|
@ -1,28 +0,0 @@
|
|||
{...}: {
|
||||
services.picom = {
|
||||
enable = true;
|
||||
backend = "glx";
|
||||
|
||||
shadow = true;
|
||||
shadowOffsets = [(-40) (-30)];
|
||||
shadowOpacity = 0.2;
|
||||
shadowExclude = [
|
||||
"class_g ?= 'Notify-osd'"
|
||||
"_GTK_FRAME_EXTENTS@:c"
|
||||
"!(class_g = 'Rofi' || class_g = 'Dunst')"
|
||||
];
|
||||
|
||||
vSync = true;
|
||||
settings = {
|
||||
"shadow-radius" = 40;
|
||||
# fading rofi
|
||||
"fading" = true;
|
||||
"fade-in-step" = 0.25;
|
||||
"fade-out-step" = 0.2;
|
||||
"fade-delta" = 20;
|
||||
"fade-exclude" = ["class_g != 'Rofi'"];
|
||||
# use damage information
|
||||
"use-damage" = true;
|
||||
};
|
||||
};
|
||||
}
|
|
@ -1,27 +0,0 @@
|
|||
{...}: {
|
||||
home-manager.users.jade = {...}: {
|
||||
imports = [
|
||||
./notifications.nix
|
||||
./terminal.nix
|
||||
./compositing.nix
|
||||
./panels
|
||||
./xmonad
|
||||
./sway
|
||||
];
|
||||
|
||||
services.gpg-agent = {
|
||||
enable = true;
|
||||
enableNushellIntegration = true;
|
||||
enableSshSupport = true;
|
||||
};
|
||||
fonts.fontconfig = {
|
||||
enable = true;
|
||||
defaultFonts = {
|
||||
emoji = [];
|
||||
monospace = [];
|
||||
sansSerif = ["Atkinson Hyperlegible"];
|
||||
serif = [];
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
|
@ -1,17 +0,0 @@
|
|||
{pkgs, ...}: {
|
||||
services.dunst = {
|
||||
enable = true;
|
||||
settings = {
|
||||
global = {
|
||||
dmenu = "${pkgs.rofi}/bin/rofi -theme gruvbox-dark -dmenu -p dunst";
|
||||
browser = "${pkgs.firefox}/bin/firefox";
|
||||
mouse_left_click = "context";
|
||||
mouse_middle_click = "close_current";
|
||||
background = "#282828";
|
||||
foreground = "#ebdbb2";
|
||||
frame_color = "#504945";
|
||||
frame_width = 2;
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
|
@ -1,7 +0,0 @@
|
|||
{...}: {
|
||||
imports = [
|
||||
./xmobar
|
||||
./polybar.nix
|
||||
./eww
|
||||
];
|
||||
}
|
|
@ -1,65 +0,0 @@
|
|||
(include "bottomBar/workspaces.yuck")
|
||||
(include "bottomBar/traveldings.yuck")
|
||||
|
||||
(defwindow bottomBar
|
||||
:monitor 0
|
||||
:stacking "fg"
|
||||
:wm-ignore true
|
||||
:exclusive true
|
||||
:geometry (geometry
|
||||
:width "100%"
|
||||
:height "32px"
|
||||
:anchor "bottom center")
|
||||
(bottomBar))
|
||||
|
||||
(defwidget bottomBar []
|
||||
(overlay
|
||||
:class "bottomBar"
|
||||
(transform
|
||||
:translate-y "1.5px"
|
||||
(centerbox
|
||||
(box
|
||||
:halign "start"
|
||||
(workspaceWidget)
|
||||
)
|
||||
(box
|
||||
:halign "center"
|
||||
(traveldings)
|
||||
)
|
||||
(box
|
||||
:halign "end"
|
||||
; (label :text "${iceData.speed}km/h")
|
||||
(iceTacho)
|
||||
)
|
||||
)
|
||||
)
|
||||
(box
|
||||
:class "lesbianFlag"
|
||||
:height 1
|
||||
( flagEl :flipped true :color "#D52D00")
|
||||
( flagEl :flipped true :color "#EF7627")
|
||||
( flagEl :flipped true :color "#FF9A56")
|
||||
( flagEl :flipped true :color "#FFFFFF")
|
||||
( flagEl :flipped true :color "#D162A4")
|
||||
( flagEl :flipped true :color "#B55690")
|
||||
( flagEl :flipped true :color "#A30262")
|
||||
)
|
||||
)
|
||||
)
|
||||
|
||||
(defwidget iceTacho []
|
||||
(box
|
||||
:class "iceTacho"
|
||||
:tooltip "Tz${iceTachoData.tzn} (BR ${iceTachoData.br})"
|
||||
(circular-progress
|
||||
:value { iceTachoData.frac * 60 + 20 }
|
||||
:thickness 3
|
||||
)
|
||||
(label :text "${iceTachoData.speed} km/h")
|
||||
)
|
||||
)
|
||||
|
||||
(deflisten iceTachoData
|
||||
:initial "null"
|
||||
{ "~/.config/eww/scripts/iceTacho.nu" }
|
||||
)
|
|
@ -1,37 +0,0 @@
|
|||
(defwidget traveldings []
|
||||
(revealer
|
||||
:class "traveldings"
|
||||
:transition "crossfade"
|
||||
:reveal { traveldings_data != "null" }
|
||||
(traveldingsBarWidget)
|
||||
)
|
||||
)
|
||||
|
||||
(defwidget traveldingsBarWidget []
|
||||
(overlay
|
||||
(box
|
||||
:width 640
|
||||
(label
|
||||
:halign "start"
|
||||
:text "${traveldings_data.line} -> ${strlength(traveldings_data.arrival_station) > 24 ? "${substring(traveldings_data.arrival_station, 0, 24)}…" : traveldings_data.arrival_station}${traveldings_data.arrival_platform_data_available ? " (Gl. ${traveldings_data.arrival_platform_real})" : ""}"
|
||||
)
|
||||
(label
|
||||
:halign "end"
|
||||
:text { traveldings_data.time_left >= 3600 ? formattime(traveldings_data.time_left, "noch %-Hh %-Mmin", "Etc/UTC") : formattime(traveldings_data.time_left, "noch %-Mmin", "Etc/UTC") }
|
||||
)
|
||||
)
|
||||
(box
|
||||
(progress
|
||||
:class { traveldings_data.live ? "traveldings_live" : "traveldings_disconnected" }
|
||||
:value {traveldings_data.progress * 100}
|
||||
:orientation "horizontal"
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
(deflisten traveldings_data
|
||||
:initial "null"
|
||||
"traveldings current"
|
||||
)
|
|
@ -1,17 +0,0 @@
|
|||
(defwidget workspaceWidget []
|
||||
(box
|
||||
:class "workspaces"
|
||||
(for workspace in workspaces
|
||||
(button
|
||||
:class "${workspace.urgent ? "urgent" : ""} ${workspace.focused ? "focused" : 0}"
|
||||
:onclick "swaymsg workspace ${workspace.name}"
|
||||
(label :text "${workspace.name}")
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
|
||||
(deflisten workspaces
|
||||
:initial "[]"
|
||||
"bar-ws-monitor"
|
||||
)
|
|
@ -1,37 +0,0 @@
|
|||
label {
|
||||
font: 14pt "FiraCode Nerd Font";
|
||||
}
|
||||
|
||||
.workspaces button {
|
||||
border: 0px;
|
||||
background-color: #282828;
|
||||
}
|
||||
|
||||
.workspaces button.urgent {
|
||||
background-color: #cc241d;
|
||||
}
|
||||
|
||||
.workspaces button.focused {
|
||||
background-color: #504935;
|
||||
}
|
||||
|
||||
.traveldings progressbar trough {
|
||||
border: none;
|
||||
background-color: #3c3836;
|
||||
border-bottom-right-radius: 0;
|
||||
border-bottom-left-radius: 0;
|
||||
}
|
||||
|
||||
.traveldings progressbar.traveldings_live progress {
|
||||
background-color: #79740e;
|
||||
border-bottom-left-radius: 0;
|
||||
}
|
||||
|
||||
.traveldings progressbar.traveldings_disconnected progress {
|
||||
background-color: #cc241d;
|
||||
}
|
||||
|
||||
|
||||
.traveldingsWindow {
|
||||
border-radius: 15px;
|
||||
}
|
|
@ -1,2 +0,0 @@
|
|||
(include "topBar/topBar.yuck")
|
||||
(include "bottomBar/bottomBar.yuck")
|
|
@ -1,55 +0,0 @@
|
|||
#!/usr/bin/env nu
|
||||
|
||||
const ICONS = [
|
||||
[ normal charging];
|
||||
[ ]
|
||||
[ ]
|
||||
[ ]
|
||||
[ ]
|
||||
[ ]
|
||||
[ ]
|
||||
[ ]
|
||||
[ ]
|
||||
[ ]
|
||||
[ ]
|
||||
[ ]
|
||||
];
|
||||
|
||||
def main [ path: string ] {
|
||||
loop {
|
||||
let fract = get_bat_charge_fraction $path;
|
||||
let is_charging = get_bat_charging_status $path;
|
||||
let percent = ($fract * 100) | math round;
|
||||
|
||||
print $"<span foreground=\"#d65d0e\">(get_bat_icon $fract $is_charging)</span> ($percent)<span foreground=\"#7c6f64\">%</span>";
|
||||
sleep 2sec;
|
||||
}
|
||||
}
|
||||
|
||||
def get_bat_charge_fraction [
|
||||
path: string
|
||||
] {
|
||||
let energy_full = open $"/sys/class/power_supply/($path)/energy_full" | into float;
|
||||
let energy_now = open $"/sys/class/power_supply/($path)/energy_now" | into float;
|
||||
|
||||
$energy_now / $energy_full
|
||||
}
|
||||
|
||||
def get_bat_charging_status [
|
||||
path: string
|
||||
] {
|
||||
let status = open $"/sys/class/power_supply/($path)/status";
|
||||
|
||||
if ($status == Charging) {
|
||||
true
|
||||
} else {
|
||||
false
|
||||
}
|
||||
}
|
||||
|
||||
def get_bat_icon [
|
||||
frac: float
|
||||
is_charging = false
|
||||
] {
|
||||
$ICONS | get (($frac * 10) | math round) | get (if ($is_charging) { "charging" } else { "normal" })
|
||||
}
|
|
@ -1,38 +0,0 @@
|
|||
#!/usr/bin/env nu
|
||||
|
||||
const TABLE = {
|
||||
401: 280
|
||||
402: 280
|
||||
403: 330
|
||||
406: 330
|
||||
407: 320
|
||||
408: 320
|
||||
411: 230
|
||||
415: 230
|
||||
412: 265
|
||||
605: 200
|
||||
};
|
||||
|
||||
def main [ ] {
|
||||
loop {
|
||||
if ((iw dev wlp4s0 link | lines | filter {|it| $it =~ "WIFIonICE" } | length) == 1) {
|
||||
let iceData = http get https://iceportal.de/api1/rs/status;
|
||||
let tzn = $iceData.tzn;
|
||||
let br = $iceData.series;
|
||||
let speed = $iceData.speed;
|
||||
let speedfrac = $speed / ($TABLE | get $br);
|
||||
|
||||
print ({
|
||||
tzn: $tzn,
|
||||
br: $br,
|
||||
speed: $speed,
|
||||
frac: $speedfrac
|
||||
} | to json -r);
|
||||
|
||||
sleep 2sec;
|
||||
} else {
|
||||
print "null";
|
||||
sleep 5sec;
|
||||
}
|
||||
}
|
||||
}
|
|
@ -1,27 +0,0 @@
|
|||
(deflisten bat0
|
||||
:initial "<span foreground=\"#cc241d\">BAT0 ERR</span>"
|
||||
{ "~/.config/eww/scripts/bat.nu BAT0"}
|
||||
)
|
||||
(deflisten bat1
|
||||
:initial "<span foreground=\"#cc241d\">BAT1 ERR</span>"
|
||||
{ "~/.config/eww/scripts/bat.nu BAT1"}
|
||||
)
|
||||
|
||||
(defwidget cpu []
|
||||
(box
|
||||
:class "cpuIndicator"
|
||||
(label
|
||||
:markup "<span foreground=\"#d65d0e\"></span> ${strlength(round(EWW_CPU.avg, 0)) == 1 ? " ${round(EWW_CPU.avg, 0)}" : round(EWW_CPU.avg, 0)}<span foreground=\"#7c6f64\">%</span>"
|
||||
)
|
||||
)
|
||||
)
|
||||
|
||||
(defwidget mem []
|
||||
(box
|
||||
:class "memIndicator"
|
||||
(label
|
||||
:markup "<span foreground=\"#d65d0e\"> </span> ${round(EWW_RAM.used_mem_perc, 0)}<span foreground=\"#7c6f64\">%</span>"
|
||||
)
|
||||
)
|
||||
)
|
||||
|
|
@ -1,10 +0,0 @@
|
|||
(defwidget time []
|
||||
(label
|
||||
:markup {
|
||||
formattime(
|
||||
EWW_TIME,
|
||||
"<span foreground=\"#d65d0e\"></span> %Y<span foreground=\"#7c6f64\">-</span>%m<span foreground=\"#7c6f64\">-</span>%d <span foreground=\"#d65d0e\"></span> %H<span foreground=\"#7c6f64\">:</span>%M<span foreground=\"#7c6f64\">:</span>%S "
|
||||
)
|
||||
}
|
||||
)
|
||||
)
|
|
@ -1,58 +0,0 @@
|
|||
(include "topBar/time.yuck")
|
||||
(include "topBar/sysinfo.yuck")
|
||||
(include "util.yuck")
|
||||
|
||||
(defwindow topBar
|
||||
:monitor 0
|
||||
:stacking "fg"
|
||||
:wm-ignore true
|
||||
:exclusive true
|
||||
:geometry (geometry
|
||||
:width "100%"
|
||||
:height "32px"
|
||||
:anchor "top center")
|
||||
(topBar))
|
||||
|
||||
(defwidget topBar []
|
||||
(overlay
|
||||
:class "topBar"
|
||||
(transform
|
||||
:translate-y "-1.5px"
|
||||
(centerbox
|
||||
(box
|
||||
:halign "start"
|
||||
:spacing 12
|
||||
:space-evenly false
|
||||
(label :text " ")
|
||||
(cpu)
|
||||
(sep)
|
||||
(mem)
|
||||
(sep)
|
||||
(label :markup bat0)
|
||||
(sep)
|
||||
(label :markup bat1)
|
||||
)
|
||||
(box
|
||||
:halign "center"
|
||||
(systray
|
||||
:icon-size 18
|
||||
:spacing 3
|
||||
)
|
||||
)
|
||||
(box
|
||||
:halign "end"
|
||||
(time)
|
||||
)
|
||||
)
|
||||
)
|
||||
(box
|
||||
:class "transFlag"
|
||||
:height 1
|
||||
( flagEl :flipped false :color "#5BCEFA")
|
||||
( flagEl :flipped false :color "#F5A9B8")
|
||||
( flagEl :flipped false :color "#FFFFFF")
|
||||
( flagEl :flipped false :color "#F5A9B8")
|
||||
( flagEl :flipped false :color "#5BCEFA")
|
||||
)
|
||||
)
|
||||
)
|
|
@ -1,11 +0,0 @@
|
|||
(defwidget flagEl [color ?flipped]
|
||||
(box
|
||||
:style "border-${flipped ? "top" : "bottom"}: 3px solid ${color}"
|
||||
:halign "fill"
|
||||
)
|
||||
)
|
||||
|
||||
(defwidget sep []
|
||||
(label :text "|")
|
||||
)
|
||||
|
|
@ -1,6 +0,0 @@
|
|||
{ ... }: {
|
||||
programs.eww = {
|
||||
enable = true;
|
||||
configDir = ./configDir;
|
||||
};
|
||||
}
|
|
@ -1,146 +0,0 @@
|
|||
{
|
||||
config,
|
||||
lib,
|
||||
pkgs,
|
||||
...
|
||||
}: {
|
||||
services.polybar = {
|
||||
enable = true;
|
||||
package = pkgs.polybarFull;
|
||||
|
||||
script = "";
|
||||
settings = {
|
||||
colors = {
|
||||
background = "#282828";
|
||||
background-alt = "#3c3836";
|
||||
foreground = "#ebdbb2";
|
||||
primary = "#d65d0e";
|
||||
secondary = "#fe8019";
|
||||
alert = "#cc241d";
|
||||
disabled = "#504945";
|
||||
};
|
||||
"bar/status" = {
|
||||
# Style
|
||||
bottom = true;
|
||||
width = "100%";
|
||||
height = "24px";
|
||||
radius = 0;
|
||||
tray-position = "center";
|
||||
background = "\${colors.background}";
|
||||
foreground = "\${colors.foreground}";
|
||||
line-size = "4px";
|
||||
border-color = "#00000000";
|
||||
padding-left = 0;
|
||||
padding-right = 1;
|
||||
module-margin = 1;
|
||||
separator = "|";
|
||||
separator-foreground = "\${colors.disabled}";
|
||||
font-0 = "FiraCode Nerd Font";
|
||||
modules-left = "xworkspaces xwindow";
|
||||
modules-right = "memory cpu wlan bat0 bat1";
|
||||
cursor-click = "pointer";
|
||||
cursor-scroll = "ns-resize";
|
||||
enable-ipc = true;
|
||||
wm-restack = "generic";
|
||||
override-redirect = false;
|
||||
};
|
||||
|
||||
"module/xworkspaces" = {
|
||||
type = "internal/xworkspaces";
|
||||
label-active = "";
|
||||
label-active-padding = 1;
|
||||
label-occupied = "";
|
||||
label-occupied-padding = 1;
|
||||
label-urgent = "";
|
||||
label-urgent-foreground = "\${colors.alert}";
|
||||
label-urgent-padding = 1;
|
||||
label-empty = "";
|
||||
label-empty-foreground = "\${colors.disabled}";
|
||||
label-empty-padding = 1;
|
||||
};
|
||||
|
||||
"module/xwindow" = {
|
||||
type = "internal/xwindow";
|
||||
label = "%title:0:60:...%";
|
||||
};
|
||||
|
||||
"module/memory" = {
|
||||
type = "internal/memory";
|
||||
interval = 2;
|
||||
format-prefix = " ";
|
||||
format-prefix-foreground = "\${colors.primary}";
|
||||
label = "%percentage_used:2%%";
|
||||
};
|
||||
|
||||
"module/cpu" = {
|
||||
type = "internal/cpu";
|
||||
interval = "2";
|
||||
format-prefix = " ";
|
||||
format-prefix-foreground = "\${colors.primary}";
|
||||
label = "%percentage:2%%";
|
||||
};
|
||||
|
||||
"network-base" = {
|
||||
type = "internal/network";
|
||||
interval = 5;
|
||||
format-connected = "<ramp-signal> <label-connected>";
|
||||
format-disconnected = "<label-disconnected>";
|
||||
label-disconnected = "";
|
||||
label-disconnected-foreground = "#d65d0e";
|
||||
ramp.signal = [
|
||||
"%{F#cc241d}"
|
||||
"%{F#d79921}"
|
||||
"%{F#98971a}"
|
||||
"%{F#98971a}"
|
||||
"%{F#98971a}"
|
||||
];
|
||||
};
|
||||
|
||||
"module/wlan" = {
|
||||
"inherit" = "network-base";
|
||||
interface-type = "wireless";
|
||||
label-connected = "%{F#F0C674}%{F-} %local_ip%";
|
||||
};
|
||||
"battery-base" = {
|
||||
type = "internal/battery";
|
||||
poll-interval = 1;
|
||||
time-format = "%H%{F#7c6f64}:%{F#d5c4a1}%M";
|
||||
label-charging = "%{F#98971a} %{F#ebdbb2}%percentage%%%{F#d5c4a1} %time%";
|
||||
format-charging = "<ramp-capacity> <label-charging>";
|
||||
label-discharging = "%{F#ebdbb2}%percentage%%%{F#bdae93} %time%";
|
||||
format-discharging = "<ramp-capacity> <label-discharging>";
|
||||
label-full = "%{F#98971a}%{F#ebdbb2} %percentage%%";
|
||||
format-full = "<label-full>";
|
||||
label-low = "%{F#cc241d}%{F#ebdbb2} %percentage%%";
|
||||
format-low = "<label-low>";
|
||||
ramp.capacity = [
|
||||
"%{F#cc241d}"
|
||||
"%{F#d79921}"
|
||||
"%{F#98971a}"
|
||||
"%{F#98971a}"
|
||||
"%{F#98971a}"
|
||||
"%{F#98971a}"
|
||||
"%{F#98971a}"
|
||||
"%{F#98971a}"
|
||||
"%{F#98971a}"
|
||||
"%{F#98971a}"
|
||||
];
|
||||
};
|
||||
"module/bat0" = {
|
||||
"inherit" = "battery-base";
|
||||
battery = "BAT0";
|
||||
adapter = "ADP1";
|
||||
};
|
||||
"module/bat1" = {
|
||||
"inherit" = "battery-base";
|
||||
battery = "BAT1";
|
||||
adapter = "ADP1";
|
||||
};
|
||||
|
||||
"settings" = {
|
||||
screenchange-reload = true;
|
||||
pseudo-transparency = true;
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
|
@ -1,27 +0,0 @@
|
|||
{
|
||||
lib,
|
||||
pkgs,
|
||||
...
|
||||
}: let
|
||||
xmobarGhc = pkgs.haskellPackages.ghcWithPackages (pkgs:
|
||||
with pkgs; [
|
||||
xmobar
|
||||
statgrab
|
||||
]);
|
||||
in {
|
||||
home = {
|
||||
packages = [xmobarGhc];
|
||||
file."xmobar.hs" = rec {
|
||||
source = ./xmobar.hs;
|
||||
target = ".config/xmobar/xmobar.hs";
|
||||
onChange = ''
|
||||
${xmobarGhc}/bin/ghc -threaded ${target}
|
||||
${pkgs.busybox}/bin/pkill xmobar
|
||||
${pkgs.haskellPackages.xmonad}/bin/xmonad --restart
|
||||
'';
|
||||
};
|
||||
};
|
||||
programs.xmobar = {
|
||||
enable = true;
|
||||
};
|
||||
}
|
|
@ -1,206 +0,0 @@
|
|||
{
|
||||
pkgs,
|
||||
lib,
|
||||
config,
|
||||
...
|
||||
}: {
|
||||
programs.wofi.enable = true;
|
||||
programs.swaylock.enable = true;
|
||||
services.network-manager-applet.enable = true;
|
||||
|
||||
xdg.portal = {
|
||||
enable = true;
|
||||
extraPortals = [pkgs.xdg-desktop-portal-wlr];
|
||||
# sway = {
|
||||
# default = ["wlr"];
|
||||
# };
|
||||
config.common.default = "*";
|
||||
};
|
||||
|
||||
services.swayidle = {
|
||||
enable = true;
|
||||
events = [
|
||||
{
|
||||
event = "before-sleep";
|
||||
command = "${pkgs.swaylock}/bin/swaylock -fF -c 442244";
|
||||
}
|
||||
{
|
||||
event = "lock";
|
||||
command = "swaylock -c 441144";
|
||||
}
|
||||
];
|
||||
};
|
||||
|
||||
wayland.windowManager.sway = {
|
||||
enable = true;
|
||||
systemd = {
|
||||
enable = true;
|
||||
};
|
||||
wrapperFeatures = {
|
||||
base = true;
|
||||
gtk = true;
|
||||
};
|
||||
config = {
|
||||
modes = {
|
||||
resize = {
|
||||
Down = "resize grow height 10 px";
|
||||
Escape = "mode default";
|
||||
Left = "resize shrink width 10 px";
|
||||
Return = "mode default";
|
||||
Right = "resize grow width 10 px";
|
||||
Up = "resize shrink height 10 px";
|
||||
h = "resize shrink width 10 px";
|
||||
j = "resize grow height 10 px";
|
||||
k = "resize shrink height 10 px";
|
||||
l = "resize grow width 10 px";
|
||||
};
|
||||
};
|
||||
terminal = "kitty";
|
||||
output = {
|
||||
"*" = {
|
||||
bg = "${../xmonad/wallpaper/wallpaper.jpg} fill";
|
||||
};
|
||||
};
|
||||
input = {
|
||||
"*" = {
|
||||
xkb_layout = "us";
|
||||
xkb_variant = "altgr-intl";
|
||||
};
|
||||
};
|
||||
startup = [
|
||||
{
|
||||
command = "eww open-many topBar bottomBar";
|
||||
}
|
||||
{
|
||||
command = "sleep 1 && mullvad-gui";
|
||||
}
|
||||
];
|
||||
bars = [];
|
||||
menu = "wofi -d";
|
||||
modifier = "Mod4";
|
||||
assigns = {
|
||||
"1" = [
|
||||
{class = "^Signal$";}
|
||||
{class = "^Element$";}
|
||||
{class = "^Evolution$";}
|
||||
{class = "^teams-for-linux$";}
|
||||
];
|
||||
"2" = [
|
||||
{app_id = "^firefox$";}
|
||||
];
|
||||
};
|
||||
keybindings = with {
|
||||
#mod = config.xsession.windowManager.i3.config.modifier;
|
||||
# mod = "Mod1";
|
||||
mod = config.wayland.windowManager.sway.config.modifier;
|
||||
};
|
||||
lib.mkOptionDefault {
|
||||
# switch window focus
|
||||
"${mod}+h" = "focus left";
|
||||
"${mod}+j" = "focus down";
|
||||
"${mod}+k" = "focus up";
|
||||
"${mod}+l" = "focus right";
|
||||
# move windows
|
||||
"${mod}+Shift+h" = "move left";
|
||||
"${mod}+Shift+j" = "move down";
|
||||
"${mod}+Shift+k" = "move up";
|
||||
"${mod}+Shift+l" = "move right";
|
||||
# layout shit
|
||||
"${mod}+shift+semicolon" = "split h";
|
||||
"${mod}+semicolon" = "split v";
|
||||
"${mod}+f" = "fullscreen toggle";
|
||||
"${mod}+Shift+w" = "layout tabbed";
|
||||
"${mod}+e" = "layout toggle split";
|
||||
"${mod}+Shift+space" = "floating toggle";
|
||||
# focus parents/children
|
||||
# "${mod}+Shift+a" = "focus parent";
|
||||
# "${mod}+Shift+c" = "focus child";
|
||||
# screenshot
|
||||
# "${mod}+w" = "exec window-screenshot.sh";
|
||||
"${mod}+s" = "exec gscreenshot -csf $HOME/Pictures/screenshots";
|
||||
"${mod}+a" = "exec gscreenshot -cf $HOME/Pictures/screenshots";
|
||||
# "${mod}+t" = "exec ocr-screenshot.sh";
|
||||
|
||||
# rofi fuckery
|
||||
"${mod}+d" = "exec wofi -S drun --allow-images";
|
||||
"${mod}+i" = "exec rofimoji --selector wofi -f alchemical_symbols anatolian_hieroglyphs emojis braille_patterns box_drawing chess_symbols emoticons geometric_shapes gothic greek_extended math mathematical_alphanumeric_symbols mathematical_operators miscellaneous_symbols miscellaneous_mathematical_symbols-a miscellaneous_mathematical_symbols-b miscellaneous_symbols_and_arrows miscellaneous_symbols_and_pictographs miscellaneous_technical modi modifier_tone_letters musical_symbols nerd_font number_forms shorthand_format_controls specials variation_selectors vertical_forms -a copy";
|
||||
|
||||
# audio
|
||||
"XF86AudioRaiseVolume" = "exec --no-startup-id pactl set-sink-volume @DEFAULT_SINK@ +10% && $refresh_i3status";
|
||||
"XF86AudioLowerVolume" = "exec --no-startup-id pactl set-sink-volume @DEFAULT_SINK@ -10% && $refresh_i3status";
|
||||
"XF86AudioMute" = "exec --no-startup-id pactl set-sink-mute @DEFAULT_SINK@ toggle && $refresh_i3status";
|
||||
"XF86AudioMicMute" = "exec --no-startup-id pactl set-source-mute @DEFAULT_SOURCE@ toggle && $refresh_i3status";
|
||||
|
||||
"XF86AudioNext" = "exec playerctl next";
|
||||
"XF86AudioPrev" = "exec playerctl previous";
|
||||
"XF86AudioPause" = "exec playerctl pause";
|
||||
"XF86AudioPlay" = "exec playerctl play";
|
||||
"XF86AudioStop" = "exec playerctl stop";
|
||||
|
||||
"XF86MonBrightnessUp" = "exec brightnessctl set 5%+";
|
||||
"XF86MonBrightnessDown" = "exec brightnessctl set 5%-";
|
||||
|
||||
"XF86KbdBrightnessUp" = "exec brillo -kA 10.0";
|
||||
"XF86KbdBrightnessDown" = "exec brillo -kU 10.0";
|
||||
};
|
||||
focus = {
|
||||
wrapping = "yes";
|
||||
};
|
||||
fonts = {
|
||||
names = ["Atkinson Hyperlegible"];
|
||||
style = "Regular";
|
||||
size = 9.0;
|
||||
};
|
||||
gaps = {
|
||||
#top = 24;
|
||||
inner = 15;
|
||||
outer = 0;
|
||||
smartGaps = true;
|
||||
smartBorders = "on";
|
||||
};
|
||||
colors = {
|
||||
background = "#1d2021";
|
||||
focused = {
|
||||
background = "#282828";
|
||||
border = "#504945";
|
||||
childBorder = "#7c6f64";
|
||||
indicator = "#504945";
|
||||
text = "#ebdbb2";
|
||||
};
|
||||
focusedInactive = {
|
||||
background = "#1d2021";
|
||||
border = "#504945";
|
||||
childBorder = "#665c54";
|
||||
indicator = "#664c54";
|
||||
text = "#d5c4a1";
|
||||
};
|
||||
placeholder = {
|
||||
background = "#1d2021";
|
||||
border = "#00ff00";
|
||||
childBorder = "#504945";
|
||||
indicator = "#504945";
|
||||
text = "#928374";
|
||||
};
|
||||
unfocused = {
|
||||
background = "#1d2021";
|
||||
border = "#3c3836";
|
||||
childBorder = "#504945";
|
||||
indicator = "#504945";
|
||||
text = "#bdae93";
|
||||
};
|
||||
urgent = {
|
||||
background = "#9d0006";
|
||||
border = "#cc241d";
|
||||
childBorder = "#3c3836";
|
||||
indicator = "#fb4943";
|
||||
text = "#ebdbb2";
|
||||
};
|
||||
};
|
||||
|
||||
window = {
|
||||
border = 2;
|
||||
titlebar = false;
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
|
@ -1,37 +0,0 @@
|
|||
{...}: {
|
||||
programs.kitty = {
|
||||
enable = true;
|
||||
font = {
|
||||
name = "FiraCode Nerd Font";
|
||||
size = 11;
|
||||
};
|
||||
keybindings = {
|
||||
"ctrl+shift+n" = "new_os_window_with_cwd";
|
||||
};
|
||||
settings = {
|
||||
#adjust_column_width = "70%";
|
||||
color0 = "#282828";
|
||||
color8 = "#928374";
|
||||
color1 = "#cc241d";
|
||||
color9 = "#fb4934";
|
||||
color2 = "#98971a";
|
||||
color10 = "#b8bb26";
|
||||
color3 = "#d79921";
|
||||
color11 = "#fabd2f";
|
||||
color4 = "#458588";
|
||||
color12 = "#83a598";
|
||||
color5 = "#b16286";
|
||||
color13 = "#d3869b";
|
||||
color6 = "#689d6a";
|
||||
color14 = "#8ec07c";
|
||||
color7 = "#a89984";
|
||||
color15 = "#ebdbb2";
|
||||
foreground = "#ebdbb2";
|
||||
background = "#282828";
|
||||
confirm_os_window_close = 0;
|
||||
};
|
||||
};
|
||||
home.sessionVariables = {
|
||||
TERMINAL = "kitty";
|
||||
};
|
||||
}
|
|
@ -1,9 +0,0 @@
|
|||
{pkgs, ...}: {
|
||||
imports = [./wallpaper];
|
||||
home.packages = [pkgs.xmonadctl];
|
||||
xsession.windowManager.xmonad = {
|
||||
enable = true;
|
||||
enableContribAndExtras = true;
|
||||
config = ./xmonad.hs;
|
||||
};
|
||||
}
|
|
@ -1,9 +0,0 @@
|
|||
{...}: {
|
||||
home.file.wallpaper = {
|
||||
target = "Pictures/wallpaper.jpg";
|
||||
source = ./wallpaper.jpg;
|
||||
onChange = ''
|
||||
feh --bg-fill ~/Pictures/wallpaper.jpg;
|
||||
'';
|
||||
};
|
||||
}
|
39
modules/desktop/audio.nix
Normal file
39
modules/desktop/audio.nix
Normal file
|
@ -0,0 +1,39 @@
|
|||
{
|
||||
config,
|
||||
lib,
|
||||
pkgs,
|
||||
...
|
||||
}: {
|
||||
config = {
|
||||
programs = {
|
||||
noisetorch.enable = true;
|
||||
};
|
||||
services = {
|
||||
pipewire = {
|
||||
enable = true;
|
||||
alsa.enable = true;
|
||||
pulse.enable = true;
|
||||
jack.enable = true;
|
||||
};
|
||||
};
|
||||
hardware.pulseaudio.enable = pkgs.lib.mkForce false;
|
||||
sound.mediaKeys.enable = true;
|
||||
home-manager.users.jade = {pkgs, ...}: {
|
||||
home.packages = with pkgs; [
|
||||
pavucontrol
|
||||
pulseaudioFull
|
||||
easyeffects
|
||||
cava
|
||||
volumeicon
|
||||
playerctl
|
||||
helvum
|
||||
];
|
||||
xsession.windowManager.i3.config.startup = [
|
||||
{
|
||||
command = "pkill volumeicon; volumeicon";
|
||||
always = true;
|
||||
}
|
||||
];
|
||||
};
|
||||
};
|
||||
}
|
|
@ -2,7 +2,6 @@
|
|||
config,
|
||||
lib,
|
||||
pkgs,
|
||||
pkgs-stable,
|
||||
...
|
||||
}: let
|
||||
cfg = config.jade.desktop.cloud;
|
||||
|
@ -15,7 +14,7 @@ in
|
|||
home-manager.users.jade = {pkgs, ...}: {
|
||||
home.packages = with pkgs; [
|
||||
fluent-reader
|
||||
pkgs-stable.bitwarden
|
||||
bitwarden
|
||||
rofi-rbw
|
||||
];
|
||||
};
|
||||
|
|
42
modules/desktop/compositing.nix
Normal file
42
modules/desktop/compositing.nix
Normal file
|
@ -0,0 +1,42 @@
|
|||
{
|
||||
config,
|
||||
lib,
|
||||
pkgs,
|
||||
...
|
||||
}: let
|
||||
cfg = config.jade.desktop.compositing;
|
||||
in
|
||||
with lib; {
|
||||
options.jade.desktop.compositing = {
|
||||
enable = mkEnableOption "Enable compositing with picom";
|
||||
};
|
||||
config = mkIf cfg.enable {
|
||||
services.picom = {
|
||||
enable = true;
|
||||
backend = "glx";
|
||||
|
||||
shadow = true;
|
||||
shadowOffsets = [(-40) (-30)];
|
||||
shadowOpacity = 0.2;
|
||||
shadowExclude = [
|
||||
"class_g ?= 'Notify-osd'"
|
||||
"_GTK_FRAME_EXTENTS@:c"
|
||||
"!(class_g = 'Rofi' || class_g = 'Dunst')"
|
||||
];
|
||||
|
||||
vSync = true;
|
||||
settings = {
|
||||
"shadow-radius" = 40;
|
||||
# fading rofi
|
||||
"fading" = true;
|
||||
"fade-in-step" = 0.25;
|
||||
"fade-out-step" = 0.2;
|
||||
"fade-delta" = 20;
|
||||
"fade-exclude" = ["class_g != 'Rofi'"];
|
||||
# use damage information
|
||||
"use-damage" = true;
|
||||
};
|
||||
};
|
||||
# }}}
|
||||
};
|
||||
}
|
|
@ -1,31 +1,32 @@
|
|||
{
|
||||
pkgs,
|
||||
pkgs-stable,
|
||||
...
|
||||
}: {
|
||||
{pkgs, ...}: {
|
||||
fonts.packages = with pkgs; [
|
||||
(nerdfonts.override {fonts = ["FiraCode"];})
|
||||
montserrat
|
||||
noto-fonts
|
||||
atkinson-hyperlegible
|
||||
arkpandora_ttf
|
||||
liberation_ttf
|
||||
caladea
|
||||
carlito
|
||||
garamond-libre
|
||||
ocr-a
|
||||
amiri
|
||||
];
|
||||
fonts.fontDir.enable = true;
|
||||
home-manager.users.jade = {pkgs, ...}: {
|
||||
home.packages = with pkgs; [
|
||||
audacity
|
||||
krita
|
||||
# gimp-with-plugins
|
||||
gimp
|
||||
gimp-with-plugins
|
||||
inkscape-with-extensions
|
||||
obs-studio
|
||||
kdenlive
|
||||
|
||||
fspy
|
||||
scribus
|
||||
lilypond
|
||||
gnuplot
|
||||
graphviz
|
||||
povray
|
||||
|
||||
openscad-unstable
|
||||
openscad-lsp
|
||||
|
||||
pkgs-stable.font-manager
|
||||
fontforge-gtk
|
||||
|
||||
onlyoffice-bin_latest
|
||||
libreoffice
|
||||
typst
|
||||
|
||||
rawtherapee
|
||||
|
|
|
@ -15,41 +15,68 @@
|
|||
in
|
||||
with lib; {
|
||||
imports = [
|
||||
./audio.nix
|
||||
./gaming.nix
|
||||
./creative.nix # TODO: more fine grained choices, not every setup needs fspy or rawtherapee
|
||||
./dunst.nix
|
||||
./compositing.nix
|
||||
./ios-compat.nix
|
||||
./syncthing.nix
|
||||
./kdeconnect.nix
|
||||
./themeing.nix
|
||||
./cloud.nix
|
||||
./networking.nix
|
||||
./polybar.nix
|
||||
./social.nix
|
||||
./mail.nix
|
||||
./fonts.nix
|
||||
./specific-hardware
|
||||
./evremap.nix
|
||||
./xmonad.nix
|
||||
./firefox.nix
|
||||
./x.nix
|
||||
./obs.nix
|
||||
];
|
||||
|
||||
i18n.inputMethod = {
|
||||
enabled = "fcitx5";
|
||||
fcitx5.addons = with pkgs; [
|
||||
fcitx5-mozc
|
||||
fcitx5-gtk
|
||||
];
|
||||
};
|
||||
|
||||
programs.seahorse.enable = true;
|
||||
security.pam.services.jade.enableGnomeKeyring = true;
|
||||
|
||||
virtualisation.libvirtd.enable = true;
|
||||
|
||||
services = {
|
||||
printing = {
|
||||
enable = true;
|
||||
drivers = [
|
||||
pkgs.gutenprint
|
||||
pkgs.gutenprintBin
|
||||
pkgs.hplip
|
||||
pkgs.brlaser
|
||||
pkgs.brgenml1lpr
|
||||
pkgs.brgenml1cupswrapper
|
||||
pkgs.ptouch-driver
|
||||
];
|
||||
};
|
||||
printing.enable = true;
|
||||
gnome.gnome-keyring.enable = true;
|
||||
|
||||
xserver = {
|
||||
enable = true;
|
||||
|
||||
xkb = {
|
||||
layout = "us";
|
||||
variant = "altgr-intl";
|
||||
};
|
||||
|
||||
libinput = {
|
||||
enable = true;
|
||||
};
|
||||
|
||||
desktopManager = {
|
||||
xterm.enable = false;
|
||||
};
|
||||
|
||||
displayManager = {
|
||||
defaultSession = "none+xmonad";
|
||||
gdm.enable = true;
|
||||
};
|
||||
|
||||
windowManager.xmonad = {
|
||||
enable = true;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
programs.xss-lock = {
|
||||
|
@ -58,11 +85,8 @@ in
|
|||
};
|
||||
|
||||
services.illum.enable = true;
|
||||
services.avahi = {
|
||||
enable = true;
|
||||
nssmdns4 = true;
|
||||
openFirewall = true;
|
||||
};
|
||||
services.avahi.enable = true;
|
||||
|
||||
services.smartd = {
|
||||
enable = true;
|
||||
notifications.x11.enable = true;
|
||||
|
@ -70,9 +94,6 @@ in
|
|||
};
|
||||
|
||||
home-manager.users.jade = {pkgs, ...}: {
|
||||
home.sessionVariables = {
|
||||
"S10E_JRNL_FILE_LOC" = "/home/jade/Docs/jrnl.md";
|
||||
};
|
||||
programs.ssh = {
|
||||
controlMaster = "yes";
|
||||
};
|
||||
|
@ -104,7 +125,6 @@ in
|
|||
xclip
|
||||
xmacro
|
||||
xorg.xev
|
||||
gscreenshot
|
||||
|
||||
syncplay
|
||||
|
||||
|
@ -112,16 +132,20 @@ in
|
|||
xfce.thunar
|
||||
xfce.tumbler
|
||||
xfce.thunar-archive-plugin
|
||||
file-roller
|
||||
gnome.file-roller
|
||||
# media/file viewers
|
||||
vlc
|
||||
mpv
|
||||
evince
|
||||
nomacs
|
||||
jellyfin-media-player
|
||||
|
||||
# from environment.systemPackages cleanup
|
||||
font-manager
|
||||
xdotool
|
||||
xorg.xwininfo
|
||||
gparted
|
||||
# uhk-agent
|
||||
cool-retro-term
|
||||
xdg-desktop-portal-gtk
|
||||
virt-manager
|
||||
ddccontrol-db
|
||||
|
@ -129,7 +153,7 @@ in
|
|||
gitg
|
||||
gpick
|
||||
qdirstat
|
||||
ffmpeg_7-full
|
||||
ffmpeg_5
|
||||
|
||||
# external
|
||||
libnotify
|
||||
|
@ -159,11 +183,6 @@ in
|
|||
oneko
|
||||
|
||||
plover.dev
|
||||
|
||||
mupdf
|
||||
inotify-tools
|
||||
|
||||
logseq
|
||||
];
|
||||
xsession = {
|
||||
enable = true;
|
||||
|
|
19
modules/desktop/dunst.nix
Normal file
19
modules/desktop/dunst.nix
Normal file
|
@ -0,0 +1,19 @@
|
|||
{...}: {
|
||||
home-manager.users.jade = {pkgs, ...}: {
|
||||
services.dunst = {
|
||||
enable = true;
|
||||
settings = {
|
||||
global = {
|
||||
dmenu = "${pkgs.rofi}/bin/rofi -theme gruvbox-dark -dmenu -p dunst";
|
||||
browser = "${pkgs.librewolf}/bin/librewolf";
|
||||
mouse_left_click = "context";
|
||||
mouse_middle_click = "close_current";
|
||||
background = "#282828";
|
||||
foreground = "#ebdbb2";
|
||||
frame_color = "#504945";
|
||||
frame_width = 2;
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
39
modules/desktop/evremap.nix
Normal file
39
modules/desktop/evremap.nix
Normal file
|
@ -0,0 +1,39 @@
|
|||
{
|
||||
pkgs,
|
||||
config,
|
||||
lib,
|
||||
...
|
||||
}: let
|
||||
cfg = config.jade.desktop.evremap;
|
||||
evremap = pkgs.rustPlatform.buildRustPackage {
|
||||
pname = "evremap";
|
||||
version = "0.1.0";
|
||||
src = pkgs.fetchFromGitHub {
|
||||
owner = "wez";
|
||||
repo = "evremap";
|
||||
rev = "4480c4eda223b98899b0fbd926bc34f7bd0e1a18";
|
||||
sha256 = "sha256-BxSrphgW1n465FX6bKVkq6O0XE2JqanfSYlsGwWUWkQ=";
|
||||
};
|
||||
cargoHash = "";
|
||||
cargoLock.lockFile = ../../other/evremap.Cargo.lock;
|
||||
postPatch = ''
|
||||
cp ${../../other/evremap.Cargo.lock} Cargo.lock
|
||||
'';
|
||||
nativeBuildInputs = [pkgs.pkg-config];
|
||||
buildInputs = [pkgs.libevdev];
|
||||
};
|
||||
in
|
||||
with lib; {
|
||||
options.jade.desktop.evremap = {
|
||||
enable = mkEnableOption "Enable evremap";
|
||||
};
|
||||
config = mkIf cfg.enable {
|
||||
systemd.services.evremap = {
|
||||
script = "${evremap}/bin/evremap remap ${../../other/remaps-${config.networking.hostName}.toml}";
|
||||
wantedBy = ["multi-user.target"];
|
||||
unitConfig = {
|
||||
Restart = "on-failure";
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
|
@ -31,7 +31,6 @@
|
|||
"youtube-mrbeastify"
|
||||
"return-youtube-dislikes"
|
||||
"multi-account-containers"
|
||||
"tabby-cat-friend"
|
||||
];
|
||||
Extensions.Uninstall = [
|
||||
"google@search.mozilla.org"
|
||||
|
@ -83,16 +82,12 @@
|
|||
"Home manager Options" = {
|
||||
urls = [
|
||||
{
|
||||
template = "https://home-manager-options.extranix.com/";
|
||||
template = "https://mipmip.github.io/home-manager-option-search/";
|
||||
params = [
|
||||
{
|
||||
name = "query";
|
||||
value = "{searchTerms}";
|
||||
}
|
||||
{
|
||||
name = "release";
|
||||
value = "master";
|
||||
}
|
||||
];
|
||||
}
|
||||
];
|
||||
|
@ -102,13 +97,7 @@
|
|||
"NixOS Wiki" = {
|
||||
urls = [
|
||||
{
|
||||
template = "https://nixos.wiki/index.php";
|
||||
params = [
|
||||
{
|
||||
name = "search";
|
||||
value = "{searchTerms}";
|
||||
}
|
||||
];
|
||||
template = "https://nixos.wiki/index.php?title=Special:Search&search={searchTerms}&namespace=0";
|
||||
}
|
||||
];
|
||||
icon = "${pkgs.nixos-icons}/share/icons/hicolor/scalable/apps/nix-snowflake.svg";
|
||||
|
@ -117,16 +106,15 @@
|
|||
"Noogle" = {
|
||||
urls = [
|
||||
{
|
||||
template = "https://noogle.dev/q";
|
||||
template = "https://noogle.dev/q?term={searchTerms}";
|
||||
params = [
|
||||
{
|
||||
name = "term";
|
||||
name = "q";
|
||||
value = "{searchTerms}";
|
||||
}
|
||||
];
|
||||
}
|
||||
];
|
||||
definedAliases = ["ngl"];
|
||||
};
|
||||
"lib.rs" = {
|
||||
urls = [
|
||||
|
@ -158,14 +146,6 @@
|
|||
icon = "https://docs.rs/-/static/favicon.ico";
|
||||
definedAliases = ["docs"];
|
||||
};
|
||||
"rust docs direct open" = {
|
||||
urls = [
|
||||
{
|
||||
template = "https://docs.rs/{searchTerms}";
|
||||
}
|
||||
];
|
||||
definedAliases = ["doc" "docd"];
|
||||
};
|
||||
"rust std docs" = {
|
||||
urls = [
|
||||
{
|
||||
|
@ -181,19 +161,6 @@
|
|||
icon = "https://doc.rust-lang.org/favicon.ico";
|
||||
definedAliases = ["std"];
|
||||
};
|
||||
"MDN" = {
|
||||
urls = [
|
||||
{
|
||||
template = "https://developer.mozilla.org/search";
|
||||
params = [
|
||||
{
|
||||
name = "q";
|
||||
value = "{searchTerms}";
|
||||
}
|
||||
];
|
||||
}
|
||||
];
|
||||
};
|
||||
"Bing".metaData.hidden = true;
|
||||
"Google".metaData.hidden = true;
|
||||
"Amazon.de".metaData.hidden = true;
|
||||
|
@ -216,8 +183,6 @@
|
|||
"browser.aboutwelcome.enabled" = false;
|
||||
"browser.preferences.moreFromMozilla" = false;
|
||||
"browser.menu.showViewImageInfo" = true;
|
||||
"browser.shopping.experience2023.active" = false;
|
||||
"browser.shopping.experience2023.survey.enabled" = false;
|
||||
|
||||
"identity.fxaccounts.enabled" = true;
|
||||
"browser.tabs.firefox-view" = true;
|
||||
|
@ -229,19 +194,6 @@
|
|||
"privacy.trackingprotection.enabled" = true;
|
||||
"privacy.trackingprotection.socialtracking.enabled" = true;
|
||||
|
||||
"browser.ml.chat.enabled" = false;
|
||||
"browser.ml.chat.hideLocalhost" = false;
|
||||
"browser.ml.chat.prompt.prefix" = "";
|
||||
"browser.ml.chat.prompts.0" = "";
|
||||
"browser.ml.chat.prompts.1" = "";
|
||||
"browser.ml.chat.prompts.2" = "";
|
||||
"browser.ml.chat.prompts.3" = "";
|
||||
"browser.ml.chat.provider" = "";
|
||||
"browser.ml.chat.shortcuts" = false;
|
||||
"browser.ml.chat.shortcuts.custom" = false;
|
||||
"browser.ml.chat.shortcuts.longPress" = "";
|
||||
"browser.ml.chat.sidebar" = false;
|
||||
|
||||
"geo.provider.network.logging.enabled" = true;
|
||||
"extensions.getAddons.showPane" = false;
|
||||
"extensions.htmlaboutaddons.recommendations.enabled" = false;
|
||||
|
@ -267,9 +219,6 @@
|
|||
"app.shield.optoutstudies.enabled" = false;
|
||||
"app.normandy.enabled" = false;
|
||||
"app.normandy.api_url" = "";
|
||||
"dom.private-attribution.submission.enabled" = false;
|
||||
"browser.newtabpage.activity-stream.feeds.showWeather" = false;
|
||||
"browser.newtabpage.activity-stream.feeds.weatherfeed" = false;
|
||||
|
||||
"browser.safebrowsing.malware.enabled" = false;
|
||||
"browser.safebrowsing.phishing.enabled" = false;
|
||||
|
@ -335,7 +284,8 @@
|
|||
"privacy.window.maxInnerWidth" = 1600;
|
||||
"privacy.window.maxInnerHeight" = 900;
|
||||
"privacy.resistFingerprinting.block_mozAddonManager" = true;
|
||||
"privacy.resistFingerprinting.letterboxing" = false;
|
||||
"privacy.resistFingerprinting.letterboxing" = true;
|
||||
"privacy.resistFingerprinting.letterboxing.dimensions" = "";
|
||||
"widget.non-native-theme.enabled" = true;
|
||||
"browser.link.open_newwindow" = 3;
|
||||
"browser.link.open_newwindow.restriction" = 0;
|
||||
|
|
|
@ -1,20 +0,0 @@
|
|||
{pkgs, ...}: {
|
||||
fonts.packages = with pkgs; [
|
||||
(nerdfonts.override {fonts = ["FiraCode" "AnonymousPro"];})
|
||||
montserrat
|
||||
noto-fonts
|
||||
atkinson-hyperlegible
|
||||
arkpandora_ttf
|
||||
liberation_ttf
|
||||
caladea
|
||||
carlito
|
||||
garamond-libre
|
||||
ocr-a
|
||||
amiri
|
||||
libertine
|
||||
inter
|
||||
b612
|
||||
departure-mono
|
||||
];
|
||||
fonts.fontDir.enable = true;
|
||||
}
|
|
@ -16,10 +16,6 @@ in
|
|||
home.packages = with pkgs; [
|
||||
lutris
|
||||
prismlauncher
|
||||
legendary-gl
|
||||
wineWowPackages.stable
|
||||
dxvk_2
|
||||
vkd3d-proton
|
||||
];
|
||||
};
|
||||
};
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
{
|
||||
config,
|
||||
lib,
|
||||
pkgs-stable,
|
||||
pkgs,
|
||||
...
|
||||
}: let
|
||||
cfg = config.jade.desktop.mail;
|
||||
|
@ -20,7 +20,7 @@ in
|
|||
enable = mkEnableOption "Enable thunderbird mail stuff";
|
||||
};
|
||||
config = mkIf cfg.enable {
|
||||
home-manager.users.jade = {pkgs-stable, ...}: {
|
||||
home-manager.users.jade = {pkgs, ...}: {
|
||||
accounts.email.accounts = {
|
||||
"Jade" = rec {
|
||||
inherit imap smtp;
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
}: let
|
||||
addNuShebang = path:
|
||||
builtins.concatStringsSep "\n\n" [
|
||||
"#!${pkgs.nushell}/bin/nu"
|
||||
"#!${pkgs.nushellFull}/bin/nu"
|
||||
(builtins.readFile path)
|
||||
];
|
||||
in {
|
||||
|
@ -63,7 +63,6 @@ in {
|
|||
networkmanagerapplet
|
||||
mullvad-vpn
|
||||
speedtest-cli
|
||||
macchanger
|
||||
];
|
||||
};
|
||||
};
|
||||
|
|
|
@ -1,23 +0,0 @@
|
|||
{
|
||||
pkgs,
|
||||
config,
|
||||
...
|
||||
}: {
|
||||
environment.systemPackages = [
|
||||
(pkgs.wrapOBS {
|
||||
plugins = with pkgs.obs-studio-plugins; [
|
||||
wlrobs
|
||||
obs-backgroundremoval
|
||||
obs-pipewire-audio-capture
|
||||
];
|
||||
})
|
||||
];
|
||||
|
||||
boot.extraModulePackages = with config.boot.kernelPackages; [
|
||||
v4l2loopback
|
||||
];
|
||||
boot.extraModprobeConfig = ''
|
||||
options v4l2loopback devices=1 video_nr=1 card_label="OBS Cam" exclusive_caps=1
|
||||
'';
|
||||
security.polkit.enable = true;
|
||||
}
|
150
modules/desktop/polybar.nix
Normal file
150
modules/desktop/polybar.nix
Normal file
|
@ -0,0 +1,150 @@
|
|||
{
|
||||
config,
|
||||
lib,
|
||||
pkgs,
|
||||
...
|
||||
}: {
|
||||
config = {
|
||||
home-manager.users.jade = {pkgs, ...}: {
|
||||
services.polybar = {
|
||||
enable = true;
|
||||
package = pkgs.polybarFull;
|
||||
|
||||
script = "";
|
||||
settings = {
|
||||
colors = {
|
||||
background = "#282828";
|
||||
background-alt = "#3c3836";
|
||||
foreground = "#ebdbb2";
|
||||
primary = "#d65d0e";
|
||||
secondary = "#fe8019";
|
||||
alert = "#cc241d";
|
||||
disabled = "#504945";
|
||||
};
|
||||
"bar/status" = {
|
||||
# Style
|
||||
bottom = true;
|
||||
width = "100%";
|
||||
height = "24px";
|
||||
radius = 0;
|
||||
tray-position = "center";
|
||||
background = "\${colors.background}";
|
||||
foreground = "\${colors.foreground}";
|
||||
line-size = "4px";
|
||||
border-color = "#00000000";
|
||||
padding-left = 0;
|
||||
padding-right = 1;
|
||||
module-margin = 1;
|
||||
separator = "|";
|
||||
separator-foreground = "\${colors.disabled}";
|
||||
font-0 = "FiraCode Nerd Font";
|
||||
modules-left = "xworkspaces xwindow";
|
||||
modules-right = "memory cpu wlan bat0 bat1";
|
||||
cursor-click = "pointer";
|
||||
cursor-scroll = "ns-resize";
|
||||
enable-ipc = true;
|
||||
wm-restack = "generic";
|
||||
override-redirect = false;
|
||||
};
|
||||
|
||||
"module/xworkspaces" = {
|
||||
type = "internal/xworkspaces";
|
||||
label-active = "";
|
||||
label-active-padding = 1;
|
||||
label-occupied = "";
|
||||
label-occupied-padding = 1;
|
||||
label-urgent = "";
|
||||
label-urgent-foreground = "\${colors.alert}";
|
||||
label-urgent-padding = 1;
|
||||
label-empty = "";
|
||||
label-empty-foreground = "\${colors.disabled}";
|
||||
label-empty-padding = 1;
|
||||
};
|
||||
|
||||
"module/xwindow" = {
|
||||
type = "internal/xwindow";
|
||||
label = "%title:0:60:...%";
|
||||
};
|
||||
|
||||
"module/memory" = {
|
||||
type = "internal/memory";
|
||||
interval = 2;
|
||||
format-prefix = " ";
|
||||
format-prefix-foreground = "\${colors.primary}";
|
||||
label = "%percentage_used:2%%";
|
||||
};
|
||||
|
||||
"module/cpu" = {
|
||||
type = "internal/cpu";
|
||||
interval = "2";
|
||||
format-prefix = " ";
|
||||
format-prefix-foreground = "\${colors.primary}";
|
||||
label = "%percentage:2%%";
|
||||
};
|
||||
|
||||
"network-base" = {
|
||||
type = "internal/network";
|
||||
interval = 5;
|
||||
format-connected = "<ramp-signal> <label-connected>";
|
||||
format-disconnected = "<label-disconnected>";
|
||||
label-disconnected = "";
|
||||
label-disconnected-foreground = "#d65d0e";
|
||||
ramp.signal = [
|
||||
"%{F#cc241d}"
|
||||
"%{F#d79921}"
|
||||
"%{F#98971a}"
|
||||
"%{F#98971a}"
|
||||
"%{F#98971a}"
|
||||
];
|
||||
};
|
||||
|
||||
"module/wlan" = {
|
||||
"inherit" = "network-base";
|
||||
interface-type = "wireless";
|
||||
label-connected = "%{F#F0C674}%{F-} %local_ip%";
|
||||
};
|
||||
"battery-base" = {
|
||||
type = "internal/battery";
|
||||
poll-interval = 1;
|
||||
time-format = "%H%{F#7c6f64}:%{F#d5c4a1}%M";
|
||||
label-charging = "%{F#98971a} %{F#ebdbb2}%percentage%%%{F#d5c4a1} %time%";
|
||||
format-charging = "<ramp-capacity> <label-charging>";
|
||||
label-discharging = "%{F#ebdbb2}%percentage%%%{F#bdae93} %time%";
|
||||
format-discharging = "<ramp-capacity> <label-discharging>";
|
||||
label-full = "%{F#98971a}%{F#ebdbb2} %percentage%%";
|
||||
format-full = "<label-full>";
|
||||
label-low = "%{F#cc241d}%{F#ebdbb2} %percentage%%";
|
||||
format-low = "<label-low>";
|
||||
ramp.capacity = [
|
||||
"%{F#cc241d}"
|
||||
"%{F#d79921}"
|
||||
"%{F#98971a}"
|
||||
"%{F#98971a}"
|
||||
"%{F#98971a}"
|
||||
"%{F#98971a}"
|
||||
"%{F#98971a}"
|
||||
"%{F#98971a}"
|
||||
"%{F#98971a}"
|
||||
"%{F#98971a}"
|
||||
];
|
||||
};
|
||||
"module/bat0" = {
|
||||
"inherit" = "battery-base";
|
||||
battery = "BAT0";
|
||||
adapter = "ADP1";
|
||||
};
|
||||
"module/bat1" = {
|
||||
"inherit" = "battery-base";
|
||||
battery = "BAT1";
|
||||
adapter = "ADP1";
|
||||
};
|
||||
|
||||
"settings" = {
|
||||
screenchange-reload = true;
|
||||
pseudo-transparency = true;
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
|
@ -11,23 +11,13 @@ in
|
|||
enable = mkEnableOption "Enable social apps";
|
||||
};
|
||||
config = mkIf cfg.enable {
|
||||
home-manager.users.jade = {
|
||||
pkgs,
|
||||
pkgs-stable,
|
||||
...
|
||||
}: {
|
||||
home-manager.users.jade = {pkgs, ...}: {
|
||||
home.packages = with pkgs; [
|
||||
evolutionWithPlugins
|
||||
signal-desktop
|
||||
mumble
|
||||
element-desktop
|
||||
pkgs.evolution-data-server-gtk4
|
||||
];
|
||||
};
|
||||
programs.evolution = {
|
||||
enable = true;
|
||||
plugins = [pkgs.evolution-ews];
|
||||
};
|
||||
services.gnome.evolution-data-server.enable = true;
|
||||
services.gnome.evolution-data-server.plugins = [];
|
||||
};
|
||||
}
|
||||
|
|
|
@ -7,6 +7,5 @@
|
|||
imports = [
|
||||
./spacenav.nix
|
||||
./wacom.nix
|
||||
./hardware_key.nix
|
||||
];
|
||||
}
|
|
@ -37,7 +37,7 @@
|
|||
};
|
||||
qt = {
|
||||
enable = true;
|
||||
platformTheme.name = "gtk";
|
||||
platformTheme = "gtk";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
|
|
@ -1,16 +0,0 @@
|
|||
{pkgs, ...}: {
|
||||
services.xserver = {
|
||||
enable = true;
|
||||
|
||||
desktopManager = {
|
||||
xterm.enable = false;
|
||||
};
|
||||
|
||||
windowManager.xmonad = {
|
||||
enable = true;
|
||||
};
|
||||
};
|
||||
|
||||
security.polkit.enable = true;
|
||||
programs.sway.enable = true;
|
||||
}
|
43
modules/desktop/xmonad.nix
Normal file
43
modules/desktop/xmonad.nix
Normal file
|
@ -0,0 +1,43 @@
|
|||
{
|
||||
lib,
|
||||
pkgs,
|
||||
...
|
||||
}: {
|
||||
home-manager.users.jade = {
|
||||
config,
|
||||
pkgs,
|
||||
...
|
||||
}: let
|
||||
xmobarGhc = pkgs.haskellPackages.ghcWithPackages (pkgs:
|
||||
with pkgs; [
|
||||
xmobar
|
||||
statgrab
|
||||
]);
|
||||
in {
|
||||
home.packages = [xmobarGhc pkgs.xmonadctl];
|
||||
programs.xmobar = {
|
||||
enable = true;
|
||||
};
|
||||
home.file."xmobar.hs" = rec {
|
||||
source = ../../haskell/xmobar/xmobar.hs;
|
||||
target = ".config/xmobar/xmobar.hs";
|
||||
onChange = ''
|
||||
${xmobarGhc}/bin/ghc -threaded ${target}
|
||||
${pkgs.busybox}/bin/pkill xmobar
|
||||
${pkgs.haskellPackages.xmonad}/bin/xmonad --restart
|
||||
'';
|
||||
};
|
||||
xsession.windowManager.xmonad = {
|
||||
enable = true;
|
||||
enableContribAndExtras = true;
|
||||
config = ../../haskell/xmonad/xmonad.hs;
|
||||
};
|
||||
home.file.wallpaper = {
|
||||
target = "Pictures/wallpaper.jpg";
|
||||
source = ../../other/wallpaper.jpg;
|
||||
onChange = ''
|
||||
feh --bg-fill ~/Pictures/wallpaper.jpg;
|
||||
'';
|
||||
};
|
||||
};
|
||||
}
|
24
modules/flatpak.nix
Normal file
24
modules/flatpak.nix
Normal file
|
@ -0,0 +1,24 @@
|
|||
{
|
||||
config,
|
||||
lib,
|
||||
pkgs,
|
||||
...
|
||||
}: let
|
||||
cfg = config.jade.flatpak;
|
||||
in
|
||||
with lib; {
|
||||
options.jade.flatpak = {
|
||||
enable = mkEnableOption "Enable flatpak";
|
||||
};
|
||||
config = mkIf cfg.enable {
|
||||
services.flatpak.enable = true;
|
||||
xdg.portal = {
|
||||
enable = true;
|
||||
# TODO
|
||||
config.common.default = "*";
|
||||
extraPortals = [
|
||||
pkgs.xdg-desktop-portal-gtk
|
||||
];
|
||||
};
|
||||
};
|
||||
}
|
67
modules/git.nix
Normal file
67
modules/git.nix
Normal file
|
@ -0,0 +1,67 @@
|
|||
{
|
||||
config,
|
||||
lib,
|
||||
pkgs,
|
||||
...
|
||||
}: {
|
||||
home-manager.users.jade = {pkgs, ...}: {
|
||||
programs.git = {
|
||||
enable = true;
|
||||
userName = "Schrottkatze";
|
||||
userEmail = "git@schrottkatze.de";
|
||||
aliases = {
|
||||
a = "add";
|
||||
c = "commit";
|
||||
ca = "commit --all";
|
||||
p = "push";
|
||||
pl = "pull";
|
||||
s = "status";
|
||||
};
|
||||
signing = {
|
||||
key = "${pkgs.writeText "red_nk3.pub" "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIOaE8TFsIazpn4OnHvHcRpOFr9FfvMaWOiEjmHsmnAoE cardno:000F_70CD7D05"}";
|
||||
signByDefault = true;
|
||||
};
|
||||
extraConfig = {
|
||||
gpg = {
|
||||
format = "ssh";
|
||||
};
|
||||
};
|
||||
};
|
||||
programs.gitui = {
|
||||
enable = true;
|
||||
keyConfig = ''
|
||||
(
|
||||
open_help: Some(( code: F(1), modifiers: ( bits: 0,),)),
|
||||
|
||||
move_left: Some(( code: Char('h'), modifiers: ( bits: 0,),)),
|
||||
move_right: Some(( code: Char('l'), modifiers: ( bits: 0,),)),
|
||||
move_up: Some(( code: Char('k'), modifiers: ( bits: 0,),)),
|
||||
move_down: Some(( code: Char('j'), modifiers: ( bits: 0,),)),
|
||||
|
||||
popup_up: Some(( code: Char('p'), modifiers: ( bits: 2,),)),
|
||||
popup_down: Some(( code: Char('n'), modifiers: ( bits: 2,),)),
|
||||
page_up: Some(( code: Char('b'), modifiers: ( bits: 2,),)),
|
||||
page_down: Some(( code: Char('f'), modifiers: ( bits: 2,),)),
|
||||
home: Some(( code: Char('g'), modifiers: ( bits: 0,),)),
|
||||
end: Some(( code: Char('G'), modifiers: ( bits: 1,),)),
|
||||
shift_up: Some(( code: Char('K'), modifiers: ( bits: 1,),)),
|
||||
shift_down: Some(( code: Char('J'), modifiers: ( bits: 1,),)),
|
||||
|
||||
edit_file: Some(( code: Char('I'), modifiers: ( bits: 1,),)),
|
||||
|
||||
status_reset_item: Some(( code: Char('U'), modifiers: ( bits: 1,),)),
|
||||
|
||||
diff_reset_lines: Some(( code: Char('u'), modifiers: ( bits: 0,),)),
|
||||
diff_stage_lines: Some(( code: Char('s'), modifiers: ( bits: 0,),)),
|
||||
|
||||
stashing_save: Some(( code: Char('w'), modifiers: ( bits: 0,),)),
|
||||
stashing_toggle_index: Some(( code: Char('m'), modifiers: ( bits: 0,),)),
|
||||
|
||||
stash_open: Some(( code: Char('l'), modifiers: ( bits: 0,),)),
|
||||
|
||||
abort_merge: Some(( code: Char('M'), modifiers: ( bits: 1,),)),
|
||||
)
|
||||
'';
|
||||
};
|
||||
};
|
||||
}
|
|
@ -1,3 +0,0 @@
|
|||
{...}: {
|
||||
hardware.graphics.enable = true;
|
||||
}
|
|
@ -1,35 +0,0 @@
|
|||
{
|
||||
pkgs,
|
||||
config,
|
||||
lib,
|
||||
...
|
||||
}: let
|
||||
cfg = config.jade.hwKey;
|
||||
in
|
||||
with lib; {
|
||||
options.jade.hwKey = {
|
||||
pamAuth.enable = mkEnableOption "Enable PAM authentication with hardware keys";
|
||||
};
|
||||
config = {
|
||||
# nitrokey
|
||||
services.udev.packages = [pkgs.nitrokey-udev-rules];
|
||||
|
||||
# smartcard daemon
|
||||
services.pcscd.enable = true;
|
||||
|
||||
# authenticate using hw key
|
||||
security.pam = {
|
||||
services.jade.u2fAuth = cfg.pamAuth.enable;
|
||||
u2f = {
|
||||
enable = true;
|
||||
control = "sufficient";
|
||||
settings = {
|
||||
cue = true;
|
||||
authFile = "/home/jade/.ssh/u2f_keys";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
programs.i3lock.u2fSupport = true;
|
||||
};
|
||||
}
|
|
@ -1,16 +0,0 @@
|
|||
{...}: {
|
||||
imports = [
|
||||
./evremap.nix
|
||||
];
|
||||
services = {
|
||||
libinput = {
|
||||
enable = true;
|
||||
};
|
||||
xserver = {
|
||||
xkb = {
|
||||
layout = "us";
|
||||
variant = "altgr-intl";
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
|
@ -1,110 +0,0 @@
|
|||
{
|
||||
pkgs,
|
||||
config,
|
||||
lib,
|
||||
utils,
|
||||
...
|
||||
}: let
|
||||
cfg = config.jade.input.remapping;
|
||||
evremap = pkgs.rustPlatform.buildRustPackage {
|
||||
pname = "evremap";
|
||||
version = "0.1.0";
|
||||
src = pkgs.fetchFromGitHub {
|
||||
owner = "wez";
|
||||
repo = "evremap";
|
||||
rev = "4480c4eda223b98899b0fbd926bc34f7bd0e1a18";
|
||||
sha256 = "sha256-BxSrphgW1n465FX6bKVkq6O0XE2JqanfSYlsGwWUWkQ=";
|
||||
};
|
||||
cargoHash = "";
|
||||
cargoLock.lockFile = ../../other/evremap.Cargo.lock;
|
||||
postPatch = ''
|
||||
cp ${../../other/evremap.Cargo.lock} Cargo.lock
|
||||
'';
|
||||
nativeBuildInputs = [pkgs.pkg-config];
|
||||
buildInputs = [pkgs.libevdev];
|
||||
};
|
||||
toml = pkgs.formats.toml {};
|
||||
in
|
||||
with lib; {
|
||||
options.jade.input.remapping = {
|
||||
enable = mkEnableOption "Enable evremap";
|
||||
devices = mkOption {
|
||||
type = types.attrsOf (types.submodule ({name, ...}: {
|
||||
options = {
|
||||
device_name = mkOption {
|
||||
type = types.str;
|
||||
description = "The device name";
|
||||
default = name;
|
||||
};
|
||||
remap = mkOption {
|
||||
type = types.listOf (types.submodule ({...}: {
|
||||
options.input = mkOption {type = types.listOf types.str;};
|
||||
options.output = mkOption {type = types.listOf types.str;};
|
||||
}));
|
||||
default = [];
|
||||
};
|
||||
swapKeys = mkOption {
|
||||
description = "Lists with two keys to be swapped on the keyboard layout.";
|
||||
type = types.listOf (
|
||||
# verify that each key swapping list contains two elements
|
||||
types.addCheck (types.listOf types.str) (v: builtins.length v == 2)
|
||||
);
|
||||
default = [];
|
||||
};
|
||||
dual_role = mkOption {
|
||||
type = types.listOf (types.submodule ({...}: {
|
||||
options.input = mkOption {type = types.str;};
|
||||
options.hold = mkOption {type = types.listOf types.str;};
|
||||
options.tap = mkOption {type = types.listOf types.str;};
|
||||
}));
|
||||
default = [];
|
||||
};
|
||||
};
|
||||
}));
|
||||
};
|
||||
};
|
||||
config = mkIf cfg.enable (
|
||||
with builtins; let
|
||||
devs = map ({
|
||||
device_name,
|
||||
remap,
|
||||
swapKeys,
|
||||
dual_role,
|
||||
}: {
|
||||
inherit device_name dual_role;
|
||||
|
||||
# expand swapKeys to normal remaps
|
||||
remap = concatLists [
|
||||
remap
|
||||
(lib.lists.flatten (map (keys: [
|
||||
{
|
||||
input = [(head keys)];
|
||||
output = [(lib.lists.last keys)];
|
||||
}
|
||||
{
|
||||
input = [(lib.lists.last keys)];
|
||||
output = [(head keys)];
|
||||
}
|
||||
])
|
||||
swapKeys))
|
||||
];
|
||||
}) (attrValues cfg.devices);
|
||||
in {
|
||||
# generate numbered systemd services for each device to be remapped
|
||||
# https://github.com/wez/evremap/issues/17
|
||||
systemd.services = listToAttrs (genList (i: {
|
||||
name = "evremap${toString i}";
|
||||
value = let
|
||||
cfgFile = toml.generate "remaps-${toString i}.toml" (elemAt devs i);
|
||||
in {
|
||||
script = "${evremap}/bin/evremap remap ${cfgFile}";
|
||||
wantedBy = ["multi-user.target"];
|
||||
unitConfig = {
|
||||
Restart = "on-failure";
|
||||
};
|
||||
};
|
||||
}) (length devs));
|
||||
environment.systemPackages = [evremap];
|
||||
}
|
||||
);
|
||||
}
|
|
@ -34,26 +34,6 @@
|
|||
(getAttr (substring 5 2 (toUpper color)) hexLookupTable)
|
||||
]);
|
||||
in {
|
||||
# TODO: global colorscheme vars for everything
|
||||
console.colors = [
|
||||
"282828"
|
||||
"cc241d"
|
||||
"98971a"
|
||||
"d79921"
|
||||
"458588"
|
||||
"b16286"
|
||||
"689d6a"
|
||||
"a89984"
|
||||
"928374"
|
||||
"fb4934"
|
||||
"b8bb26"
|
||||
"fabd2f"
|
||||
"83a598"
|
||||
"d3869b"
|
||||
"8ec07c"
|
||||
"ebdbb2"
|
||||
];
|
||||
|
||||
services.kmscon = {
|
||||
enable = true;
|
||||
fonts = [
|
|
@ -6,9 +6,6 @@
|
|||
./zellij.nix
|
||||
./carapace.nix
|
||||
./direnv.nix
|
||||
./tty.nix
|
||||
./git.nix
|
||||
./mprocs.nix
|
||||
];
|
||||
programs.mosh.enable = true;
|
||||
}
|
||||
|
|
|
@ -1,60 +0,0 @@
|
|||
{
|
||||
config,
|
||||
lib,
|
||||
pkgs,
|
||||
...
|
||||
}: {
|
||||
home-manager.users.jade = {
|
||||
pkgs,
|
||||
config,
|
||||
...
|
||||
}: {
|
||||
programs.git = {
|
||||
enable = true;
|
||||
userName = "Schrottkatze";
|
||||
userEmail = "git@schrottkatze.de";
|
||||
aliases = {
|
||||
a = "add";
|
||||
c = "commit";
|
||||
ca = "commit --all";
|
||||
p = "push";
|
||||
pl = "pull";
|
||||
s = "status";
|
||||
};
|
||||
signing = {
|
||||
key = "${pkgs.writeText "red_nk3.pub" "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIOaE8TFsIazpn4OnHvHcRpOFr9FfvMaWOiEjmHsmnAoE cardno:000F_70CD7D05"}";
|
||||
signByDefault = true;
|
||||
};
|
||||
extraConfig = {
|
||||
gpg = {
|
||||
format = "ssh";
|
||||
};
|
||||
};
|
||||
};
|
||||
programs.jujutsu = {
|
||||
enable = true;
|
||||
settings = {
|
||||
user = {
|
||||
name = config.programs.git.userName;
|
||||
email = config.programs.git.userEmail;
|
||||
};
|
||||
};
|
||||
};
|
||||
programs.gitui = {
|
||||
enable = true;
|
||||
keyConfig = ''
|
||||
(
|
||||
move_left: Some(( code: Char('h'), modifiers: "")),
|
||||
move_right: Some(( code: Char('l'), modifiers: "")),
|
||||
move_up: Some(( code: Char('k'), modifiers: "")),
|
||||
move_down: Some(( code: Char('j'), modifiers: "")),
|
||||
|
||||
stash_open: Some(( code: Char('l'), modifiers: "")),
|
||||
open_help: Some(( code: F(1), modifiers: "")),
|
||||
|
||||
status_reset_item: Some(( code: Char('U'), modifiers: "SHIFT")),
|
||||
)
|
||||
'';
|
||||
};
|
||||
};
|
||||
}
|
|
@ -1,13 +1,5 @@
|
|||
{
|
||||
config,
|
||||
helix-inline-diags,
|
||||
...
|
||||
}: {
|
||||
home-manager.users.jade = {
|
||||
pkgs,
|
||||
pkgs-stable,
|
||||
...
|
||||
}: {
|
||||
{config, ...}: {
|
||||
home-manager.users.jade = {pkgs, ...}: {
|
||||
home = {
|
||||
sessionVariables.EDITOR = "hx";
|
||||
packages = [
|
||||
|
@ -15,55 +7,15 @@
|
|||
pkgs.vscode-langservers-extracted
|
||||
pkgs.nodePackages.typescript-language-server
|
||||
pkgs.emmet-language-server
|
||||
pkgs-stable.typst-lsp
|
||||
pkgs.jdt-language-server
|
||||
];
|
||||
};
|
||||
programs.helix = {
|
||||
enable = true;
|
||||
defaultEditor = true;
|
||||
package = helix-inline-diags.outputs.packages."x86_64-linux".default;
|
||||
settings = {
|
||||
theme = "gruvbox";
|
||||
editor = {
|
||||
line-number = "relative";
|
||||
bufferline = "multiple";
|
||||
color-modes = true;
|
||||
cursorline = true;
|
||||
auto-save = true;
|
||||
auto-format = true;
|
||||
end-of-line-diagnostics = "hint";
|
||||
inline-diagnostics = {
|
||||
cursor-line = "hint";
|
||||
other-lines = "error";
|
||||
};
|
||||
lsp = {
|
||||
display-messages = true;
|
||||
display-inlay-hints = true;
|
||||
};
|
||||
popup-border = "popup";
|
||||
shell = ["nu" "-c"];
|
||||
statusline.left = [
|
||||
"mode"
|
||||
"spinner"
|
||||
"spacer"
|
||||
"version-control"
|
||||
"file-name"
|
||||
"diagnostics"
|
||||
"read-only-indicator"
|
||||
"file-modification-indicator"
|
||||
"spacer"
|
||||
];
|
||||
|
||||
statusline.right = [
|
||||
"workspace-diagnostics"
|
||||
"register"
|
||||
"position"
|
||||
"selections"
|
||||
"file-encoding"
|
||||
"file-type"
|
||||
];
|
||||
idle-timeout = 50;
|
||||
lsp.display-messages = true;
|
||||
indent-guides = {
|
||||
render = true;
|
||||
character = "│";
|
||||
|
@ -81,88 +33,37 @@
|
|||
};
|
||||
};
|
||||
};
|
||||
keys = {
|
||||
normal = {
|
||||
space."=" = ":fmt";
|
||||
};
|
||||
insert = {
|
||||
up = "no_op";
|
||||
down = "no_op";
|
||||
left = "no_op";
|
||||
right = "no_op";
|
||||
pageup = "no_op";
|
||||
pagedown = "no_op";
|
||||
home = "no_op";
|
||||
end = "no_op";
|
||||
};
|
||||
keys.normal = {
|
||||
space."=" = ":fmt";
|
||||
};
|
||||
};
|
||||
languages = {
|
||||
language-server = {
|
||||
"nu-builtin-lsp" = {
|
||||
command = "${config.users.defaultUserShell}/bin/nu";
|
||||
args = ["--lsp"];
|
||||
};
|
||||
"rust-analyzer" = {
|
||||
config = {
|
||||
check.command = "check";
|
||||
completion.snippets.custom = {
|
||||
"pub fn" = {
|
||||
prefix = ["pfn" "pubfn"];
|
||||
postfix = ["pfn"];
|
||||
body = [
|
||||
"pub fn $\{receiver\}() {"
|
||||
"\\t$1"
|
||||
"}"
|
||||
];
|
||||
scope = "type";
|
||||
};
|
||||
};
|
||||
completion.termSearch.enable = true;
|
||||
diagnostics.enable = true;
|
||||
inlayHints = {
|
||||
bindingModeHints.enable = true;
|
||||
closureCaptureHints.enable = true;
|
||||
closureReturnTypeHints.enable = true;
|
||||
discriminantHints.enable = true;
|
||||
expressionAdjustmentHints = {
|
||||
hideOutsideUnsafe = true;
|
||||
};
|
||||
lifetimeElisionHints.enable = "skip_trivial";
|
||||
};
|
||||
interpret.tests = true;
|
||||
lens = {
|
||||
references = {
|
||||
adt.enable = true;
|
||||
trait.enable = true;
|
||||
};
|
||||
};
|
||||
typing.autoClosingAngleBrackets.enable = true;
|
||||
};
|
||||
};
|
||||
"emmet-language-server" = {
|
||||
command = "emmet-language-server";
|
||||
args = ["--stdio"];
|
||||
};
|
||||
"psalm" = {
|
||||
command = "psalm";
|
||||
args = ["--language-server"];
|
||||
};
|
||||
"typst-lsp" = {
|
||||
config = {
|
||||
exportPdf = "onType";
|
||||
};
|
||||
language-server."nu-builtin-lsp" = {
|
||||
command = "${config.users.defaultUserShell}/bin/nu";
|
||||
args = ["--lsp"];
|
||||
};
|
||||
language-server."rust-analyzer" = {
|
||||
config = {
|
||||
check.command = "clippy";
|
||||
};
|
||||
};
|
||||
language-server."emmet-language-server" = {
|
||||
command = "emmet-language-server";
|
||||
args = ["--stdio"];
|
||||
};
|
||||
# "php" = {
|
||||
# name = "php";
|
||||
# file-types = [ "php" ];
|
||||
# language-server = {
|
||||
# command = "psalm";
|
||||
# args = ["--language-server"];
|
||||
# };
|
||||
# };
|
||||
language = [
|
||||
{
|
||||
name = "nu";
|
||||
language-servers = ["nu-builtin-lsp"];
|
||||
}
|
||||
{
|
||||
name = "php";
|
||||
language-servers = ["psalm"];
|
||||
}
|
||||
{
|
||||
name = "nix";
|
||||
formatter = {
|
||||
|
|
|
@ -1,24 +0,0 @@
|
|||
{...}: {
|
||||
home-manager.users.jade = {
|
||||
pkgs,
|
||||
lib,
|
||||
...
|
||||
}: {
|
||||
home = {
|
||||
packages = [pkgs.mprocs];
|
||||
};
|
||||
xdg.configFile."mprocs/mprocs.yaml" = {
|
||||
text = builtins.toJSON {
|
||||
proc_list_width = 15;
|
||||
keymap_procs = {
|
||||
"<l>" = {c = "toggle-focus";};
|
||||
};
|
||||
keymap_term = {
|
||||
"<C-a>" = null;
|
||||
# Ctrl-m so it doesnt overlap with zellij or helix
|
||||
"<C-M>" = {c = "toggle-focus";};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
|
@ -12,30 +12,17 @@
|
|||
home.packages = [
|
||||
pkgs.pueue
|
||||
];
|
||||
home.file."shell-startup" = {
|
||||
source = ../../other/scripts/desktop/shell-startup.nu;
|
||||
target = ".config/nushell/shell-startup.nu";
|
||||
};
|
||||
programs.nushell = {
|
||||
enable = true;
|
||||
package = config.users.defaultUserShell;
|
||||
configFile.source = ../../other/config.nu;
|
||||
envFile.source = ../../other/env.nu;
|
||||
extraConfig = ''
|
||||
plugin add ${pkgs.nushellPlugins.query}/bin/nu_plugin_query;
|
||||
plugin add ${pkgs.nushellPlugins.polars}/bin/nu_plugin_polars;
|
||||
plugin add ${pkgs.nushellPlugins.formats}/bin/nu_plugin_formats;
|
||||
|
||||
plugin use query;
|
||||
plugin use polars;
|
||||
plugin use formats;
|
||||
|
||||
nu ${../../other/scripts/desktop/shell-startup.nu};
|
||||
'';
|
||||
extraEnv = ''
|
||||
'';
|
||||
# extraConfig = ''
|
||||
# source ${pkgs.nu_scripts}/share/nu_scripts/modules/nix/nix.nu;
|
||||
# use ${pkgs.nu_scripts}/share/nu_scripts/modules/background_task/job.nu;
|
||||
# '';
|
||||
};
|
||||
# programs.starship.enableNushellIntegration = true;
|
||||
programs.starship.enableNushellIntegration = true;
|
||||
programs.carapace.enableNushellIntegration = true;
|
||||
programs.direnv.enableNushellIntegration = true;
|
||||
};
|
||||
|
|
|
@ -2,7 +2,6 @@
|
|||
home-manager.users.jade = {pkgs, ...}: {
|
||||
programs.starship = {
|
||||
enable = true;
|
||||
enableNushellIntegration = false;
|
||||
settings = {
|
||||
format = "$all$directory$character";
|
||||
character = {
|
||||
|
|
49
modules/terminal.nix
Normal file
49
modules/terminal.nix
Normal file
|
@ -0,0 +1,49 @@
|
|||
{
|
||||
config,
|
||||
lib,
|
||||
pkgs,
|
||||
...
|
||||
}: let
|
||||
cfg = config.jade.terminal;
|
||||
in
|
||||
with lib; {
|
||||
options.jade.terminal = {
|
||||
enable = mkEnableOption "Enable Kitty";
|
||||
};
|
||||
config = mkIf cfg.enable {
|
||||
environment.sessionVariables = rec {
|
||||
TERMINAL = "kitty";
|
||||
};
|
||||
home-manager.users.jade = {pkgs, ...}: {
|
||||
programs.kitty = {
|
||||
enable = true;
|
||||
font = {
|
||||
name = "FiraCode Nerd Font";
|
||||
size = 11;
|
||||
};
|
||||
settings = {
|
||||
#adjust_column_width = "70%";
|
||||
color0 = "#282828";
|
||||
color8 = "#928374";
|
||||
color1 = "#cc241d";
|
||||
color9 = "#fb4934";
|
||||
color2 = "#98971a";
|
||||
color10 = "#b8bb26";
|
||||
color3 = "#d79921";
|
||||
color11 = "#fabd2f";
|
||||
color4 = "#458588";
|
||||
color12 = "#83a598";
|
||||
color5 = "#b16286";
|
||||
color13 = "#d3869b";
|
||||
color6 = "#689d6a";
|
||||
color14 = "#8ec07c";
|
||||
color7 = "#a89984";
|
||||
color15 = "#ebdbb2";
|
||||
foreground = "#ebdbb2";
|
||||
background = "#282828";
|
||||
confirm_os_window_close = 0;
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
101
other/config.nu
101
other/config.nu
|
@ -42,7 +42,6 @@ let dark_theme = {
|
|||
shape_directory: cyan
|
||||
shape_external: cyan
|
||||
shape_externalarg: green_bold
|
||||
shape_external_resolved: light_cyan_bold
|
||||
shape_filepath: cyan
|
||||
shape_flag: blue_bold
|
||||
shape_float: purple_bold
|
||||
|
@ -232,47 +231,18 @@ $env.config = {
|
|||
}
|
||||
|
||||
color_config: $dark_theme # if you want a more interesting theme, you can replace the empty record with `$dark_theme`, `$light_theme` or another custom record
|
||||
use_grid_icons: true
|
||||
footer_mode: "25" # always, never, number_of_rows, auto
|
||||
float_precision: 2 # the precision for displaying floats in tables
|
||||
buffer_editor: "" # command that will be used to edit the current line buffer with ctrl+o, if unset fallback to $env.EDITOR and $env.VISUAL
|
||||
use_ansi_coloring: true
|
||||
bracketed_paste: true # enable bracketed paste, currently useless on windows
|
||||
edit_mode: vi # emacs, vi
|
||||
shell_integration: {
|
||||
# osc2 abbreviates the path if in the home_dir, sets the tab/window title, shows the running command in the tab/window title
|
||||
osc2: true
|
||||
# osc7 is a way to communicate the path to the terminal, this is helpful for spawning new tabs in the same directory
|
||||
osc7: true
|
||||
# osc8 is also implemented as the deprecated setting ls.show_clickable_links, it shows clickable links in ls output if your terminal supports it. show_clickable_links is deprecated in favor of osc8
|
||||
osc8: true
|
||||
# osc9_9 is from ConEmu and is starting to get wider support. It's similar to osc7 in that it communicates the path to the terminal
|
||||
osc9_9: false
|
||||
# osc133 is several escapes invented by Final Term which include the supported ones below.
|
||||
# 133;A - Mark prompt start
|
||||
# 133;B - Mark prompt end
|
||||
# 133;C - Mark pre-execution
|
||||
# 133;D;exit - Mark execution finished with exit code
|
||||
# This is used to enable terminals to know where the prompt is, the command is, where the command finishes, and where the output of the command is
|
||||
osc133: true
|
||||
# osc633 is closely related to osc133 but only exists in visual studio code (vscode) and supports their shell integration features
|
||||
# 633;A - Mark prompt start
|
||||
# 633;B - Mark prompt end
|
||||
# 633;C - Mark pre-execution
|
||||
# 633;D;exit - Mark execution finished with exit code
|
||||
# 633;E - NOT IMPLEMENTED - Explicitly set the command line with an optional nonce
|
||||
# 633;P;Cwd=<path> - Mark the current working directory and communicate it to the terminal
|
||||
# and also helps with the run recent menu in vscode
|
||||
osc633: false
|
||||
# reset_application_mode is escape \x1b[?1l and was added to help ssh work better
|
||||
reset_application_mode: true
|
||||
}
|
||||
use_kitty_protocol: false
|
||||
highlight_resolved_externals: true
|
||||
shell_integration: true # enables terminal shell integration. Off by default, as some terminals have issues with this.
|
||||
render_right_prompt_on_last_line: false # true or false to enable or disable right prompt to be rendered on last line of the prompt.
|
||||
|
||||
hooks: {
|
||||
pre_prompt: { null }
|
||||
pre_execution: [{ $env.CMD_COUNT = $env.CMD_COUNT + 1; }] # run before the repl input is run
|
||||
pre_execution: [{ null }] # run before the repl input is run
|
||||
env_change: {
|
||||
PWD: [{|before, after| null }] # run if the PWD environment is different since the last repl input
|
||||
}
|
||||
|
@ -334,27 +304,6 @@ $env.config = {
|
|||
]
|
||||
|
||||
keybindings: [
|
||||
################################################################################
|
||||
# Custom keybinds #
|
||||
################################################################################
|
||||
{
|
||||
name: undo_change
|
||||
modifier: control
|
||||
keycode: char_z
|
||||
mode: [vi_normal, vi_insert]
|
||||
event: [
|
||||
{ edit: Clear }
|
||||
{
|
||||
edit: InsertString
|
||||
value: "zellij attach main -c"
|
||||
}
|
||||
{ send: Enter }
|
||||
]
|
||||
}
|
||||
|
||||
################################################################################
|
||||
# Default keybinds #
|
||||
################################################################################
|
||||
{
|
||||
name: completion_menu
|
||||
modifier: none
|
||||
|
@ -830,7 +779,7 @@ def start_zellij [] {
|
|||
}
|
||||
}
|
||||
|
||||
# start_zellij
|
||||
start_zellij
|
||||
|
||||
def nsp [
|
||||
...programs: string
|
||||
|
@ -838,18 +787,11 @@ def nsp [
|
|||
nix shell ...($programs | each {|it| $"nixpkgs#($it)" })
|
||||
}
|
||||
|
||||
def nr [
|
||||
program: string
|
||||
] {
|
||||
nix run $"nixpkgs#($program)"
|
||||
}
|
||||
|
||||
def lcr [
|
||||
file_extension: string
|
||||
] {
|
||||
ls **/*
|
||||
| where name ends-with $".($file_extension)"
|
||||
| par-each {|file|
|
||||
ls $"**/*.($file_extension)"
|
||||
| each {|file|
|
||||
open $file.name
|
||||
| lines --skip-empty
|
||||
| length }
|
||||
|
@ -864,22 +806,15 @@ def glog [
|
|||
| split column "»¦«" commit subject name email date
|
||||
}
|
||||
|
||||
def typed [
|
||||
name: string
|
||||
def ed [
|
||||
file: path
|
||||
...cmdargs: string
|
||||
] {
|
||||
touch $"($name).typ"
|
||||
typst compile $"($name).typ"
|
||||
mprocs --names Editor,Viewer,Notify $"hx '($name).typ'" $"while true; do mupdf-x11 '($name).pdf' && break; done" $"while inotifywait -e modify '($name).pdf' ; do pkill -HUP mupdf; done"
|
||||
}
|
||||
|
||||
def nev [ unit = day ] {
|
||||
( ( open Docs/dates.csv
|
||||
| update datetime {|it| $it.datetime | into datetime }
|
||||
| first
|
||||
).datetime - (date now)
|
||||
)
|
||||
| into duration
|
||||
| format duration $unit
|
||||
let ext = $file | path parse | get extension;
|
||||
match $ext {
|
||||
"typ" => {|| zellij run --direction down -- typst watch $file ($cmdargs | prepend '--open' | str join ' ') }
|
||||
};
|
||||
hx $file
|
||||
}
|
||||
|
||||
alias gnix = cd ~/nix-configs;
|
||||
|
@ -899,11 +834,3 @@ alias cr = cargo run;
|
|||
alias cl = cargo clippy;
|
||||
alias cb = cargo build;
|
||||
alias cch = cargo check;
|
||||
|
||||
alias togglecaps = xdotool key Caps_Lock;
|
||||
alias TOGGLECAPS = togglecaps;
|
||||
|
||||
alias bash = echo $"(ansi red)no, fuck that shit!";
|
||||
alias sh = echo $"(ansi red)no, fuck that shit!";
|
||||
alias zsh = echo $"(ansi red)no, fuck that shit!";
|
||||
alias fish = echo $"(ansi red)no, fuck that shit!";
|
||||
|
|
54
other/env.nu
54
other/env.nu
|
@ -2,18 +2,36 @@
|
|||
#
|
||||
# version = "0.84.0"
|
||||
|
||||
source /home/jade/.config/nushell/shell-startup.nu;
|
||||
$env.STARSHIP_SHELL = "nu";
|
||||
$env.CMD_COUNT = 0;
|
||||
def create_left_prompt [] {
|
||||
mut home = ""
|
||||
try {
|
||||
if $nu.os-info.name == "windows" {
|
||||
$home = $env.USERPROFILE
|
||||
} else {
|
||||
$home = $env.HOME
|
||||
}
|
||||
}
|
||||
|
||||
let dir = ([
|
||||
($env.PWD | str substring 0..($home | str length) | str replace $home "~"),
|
||||
($env.PWD | str substring ($home | str length)..)
|
||||
] | str join)
|
||||
|
||||
let path_color = (if (is-admin) { ansi red_bold } else { ansi green_bold })
|
||||
let separator_color = (if (is-admin) { ansi light_red_bold } else { ansi light_green_bold })
|
||||
let path_segment = $"($path_color)($dir)"
|
||||
|
||||
$path_segment | str replace --all (char path_sep) $"($separator_color)/($path_color)"
|
||||
}
|
||||
|
||||
def create_right_prompt [] {
|
||||
# create a right prompt in magenta with green separators and am/pm underlined
|
||||
|
||||
let time_segment = ([
|
||||
(ansi reset)
|
||||
(ansi purple)
|
||||
(date now | format date '%Y/%m/%d %R')
|
||||
]) | str join;
|
||||
(ansi magenta)
|
||||
(date now | format date '%Y/%m/%d %r')
|
||||
] | str join | str replace --regex --all "([/:])" $"(ansi green)${1}(ansi magenta)" |
|
||||
str replace --regex --all "([AP]M)" $"(ansi magenta_underline)${1}")
|
||||
|
||||
let last_exit_code = if ($env.LAST_EXIT_CODE != 0) {([
|
||||
(ansi rb)
|
||||
|
@ -25,26 +43,8 @@ def create_right_prompt [] {
|
|||
}
|
||||
|
||||
# Use nushell functions to define your right and left prompt
|
||||
$env.PROMPT_COMMAND = {||
|
||||
starship prompt --cmd-duration $env.CMD_DURATION_MS $'--status=($env.LAST_EXIT_CODE)'
|
||||
| lines
|
||||
| filter { is-not-empty }
|
||||
| update 0 {|item|
|
||||
let len = (term size | get columns) - ($item | ansi strip | str length --grapheme-clusters) - (create_right_prompt | ansi strip | str length --grapheme-clusters);
|
||||
# $item | append (flag $TRANS "-" $len) | str join
|
||||
let deco = if ($env.CMD_COUNT == 0) {
|
||||
flag $TRANS "=" $len
|
||||
} else if ($env.CMD_COUNT | is even) {
|
||||
flag $LESBIAN "-" $len
|
||||
} else {
|
||||
flag $TRANS "-" $len
|
||||
};
|
||||
|
||||
$item | append $deco | str join
|
||||
}
|
||||
| str join "\n"
|
||||
}
|
||||
$env.PROMPT_COMMAND_RIGHT = {|| create_right_prompt }
|
||||
$env.PROMPT_COMMAND = {|| create_left_prompt }
|
||||
# $env.PROMPT_COMMAND_RIGHT = {|| create_right_prompt }
|
||||
|
||||
# The prompt indicators are environmental variables that represent
|
||||
# the state of the prompt
|
||||
|
|
22
other/remaps-catbook-j.toml
Normal file
22
other/remaps-catbook-j.toml
Normal file
|
@ -0,0 +1,22 @@
|
|||
device_name = "AT Translated Set 2 keyboard"
|
||||
|
||||
[[remap]]
|
||||
input = [ "KEY_Y" ]
|
||||
output = [ "KEY_Z" ]
|
||||
|
||||
[[remap]]
|
||||
input = [ "KEY_Z" ]
|
||||
output = [ "KEY_Y" ]
|
||||
|
||||
[[remap]]
|
||||
input = [ "KEY_LEFTALT" ]
|
||||
output = [ "KEY_LEFTMETA" ]
|
||||
|
||||
[[remap]]
|
||||
input = [ "KEY_LEFTMETA" ]
|
||||
output = [ "KEY_LEFTALT" ]
|
||||
|
||||
[[dual_role]]
|
||||
input = "KEY_CAPSLOCK"
|
||||
hold = ["KEY_LEFTCTRL"]
|
||||
tap = ["KEY_ESC"]
|
|
@ -1,68 +0,0 @@
|
|||
def "is even" [] {
|
||||
$in mod 2 == 0
|
||||
}
|
||||
|
||||
# TODO: flag stuff as module to be used in other stuff in shell
|
||||
|
||||
const TRANS = [ 5BCEFA F5A9B8 FFFFFF F5A9B8 5BCEFA ];
|
||||
const LESBIAN = [ D52D00 EF7627 FF9A56 FFFFFF D162A4 B55690 A30262 ];
|
||||
const ENBY = [ FCF434 FFFFFF 9C59D1 2C2C2C ];
|
||||
|
||||
def flag [
|
||||
colors: list<string>
|
||||
character = "="
|
||||
width = -1,
|
||||
] {
|
||||
use std;
|
||||
|
||||
let out_size = if ($width == -1) {
|
||||
term size | get columns
|
||||
} else { $width };
|
||||
|
||||
let col_size = $out_size / ($colors | length) | math floor;
|
||||
mut rest = $out_size - ($col_size * ($colors | length));
|
||||
|
||||
mut cols = $colors | wrap color | insert width $col_size | flatten;
|
||||
let last = ($colors | length) - 1;
|
||||
|
||||
if not ($rest | is even) {
|
||||
$rest = $rest - 1;
|
||||
|
||||
$cols = (if not ($colors | length | is even) {
|
||||
$cols | update (($colors | length) / 2 | math floor) { $in | update width {|w| ($w.width + 1)}}
|
||||
} else {
|
||||
$cols | update $last { $in | update width {|w| ($w.width + 1)}}
|
||||
});
|
||||
};
|
||||
|
||||
std assert ($rest | is even);
|
||||
|
||||
let amount = $rest / 2;
|
||||
|
||||
$cols = ($cols | update 0 { $in | update width {|w| ($w.width + $amount) } } | update $last { $in | update width {|w| ($w.width + $amount) } });
|
||||
|
||||
$cols | each {|col|
|
||||
$character | std repeat $col.width | prepend (ansi {fg: $"#($col.color)" }) | str join
|
||||
} | prepend (ansi attr_bold) | append (ansi reset) | str join
|
||||
}
|
||||
|
||||
def main [] {
|
||||
print (flag $LESBIAN);
|
||||
let next_events = open ~/Docs/dates.csv
|
||||
| update datetime {|ev| $ev.datetime | into datetime }
|
||||
| sort-by datetime
|
||||
| filter {|ev| ($ev.datetime > (date now))}
|
||||
| first
|
||||
| each {|ev| $"(ansi attr_bold)($ev.event)(ansi reset) in (ansi attr_bold)(tfmt ($ev.datetime - (date now)))s(ansi reset)" };
|
||||
print $"Hi jade, you're on HRT for (ansi reset)(ansi attr_bold)((date now) - ('2024-02-18T20:53' | into datetime) | format duration month)s(ansi reset) now! | Next Event: ($next_events)";
|
||||
}
|
||||
|
||||
def tfmt [dur: duration] {
|
||||
if ($dur < 1hr) {
|
||||
return ($dur | format duration min);
|
||||
} else if ($dur < 1day) {
|
||||
return ($dur | format duration hr);
|
||||
} else {
|
||||
return ($dur | format duration day);
|
||||
}
|
||||
}
|
|
@ -14,8 +14,6 @@ def main [
|
|||
systemd-cat echo $"($currentnet) \(($interface)): ($type)";
|
||||
|
||||
if $interface starts-with 'wlp' {
|
||||
let p = $"/etc/networkhooks/($currentnet).nu";
|
||||
systemd-cat echo $p;
|
||||
^$p $interface $type
|
||||
^$"/etc/networkhooks/($currentnet).nu" $interface $type
|
||||
}
|
||||
}
|
||||
|
|
Before Width: | Height: | Size: 8.4 MiB After Width: | Height: | Size: 8.4 MiB |
|
@ -1,6 +0,0 @@
|
|||
[package]
|
||||
name = "bar-pinger"
|
||||
version = "0.1.0"
|
||||
edition = "2021"
|
||||
|
||||
[dependencies]
|
|
@ -1,5 +0,0 @@
|
|||
// const ADDRS: [&str] = ["katzen.cafe", "fucktorio.s10e.de", "9.9.9.9"];
|
||||
|
||||
fn main() {
|
||||
// let pingers = ADDRS.iter.map(|addr| Command::new("ping").args([addr]));
|
||||
}
|
|
@ -1,9 +0,0 @@
|
|||
[package]
|
||||
name = "bar-ws-monitor"
|
||||
version = "0.1.0"
|
||||
edition = "2021"
|
||||
|
||||
[dependencies]
|
||||
serde = { version = "1.0.209", features = [ "derive" ] }
|
||||
serde_json = "1.0.127"
|
||||
swayipc = "3.0.2"
|
|
@ -1,53 +0,0 @@
|
|||
use core::panic;
|
||||
|
||||
use serde::Serialize;
|
||||
use swayipc::{Connection, Event, EventType, Fallible, Workspace, WorkspaceChange};
|
||||
|
||||
fn main() -> Fallible<()> {
|
||||
let mut con = Connection::new()?;
|
||||
let mut workspaces: Vec<WsData> = con
|
||||
.get_workspaces()?
|
||||
.into_iter()
|
||||
.map(|ws| ws.into())
|
||||
.collect();
|
||||
println!("{}", serde_json::ser::to_string(&workspaces).unwrap());
|
||||
|
||||
for ev in con.subscribe([EventType::Workspace])? {
|
||||
// the lazy/ugly solution!
|
||||
// we create a new connection and request workspaces again and again and again
|
||||
// TODO: properly handle events one by one
|
||||
let mut con = Connection::new()?;
|
||||
workspaces = con
|
||||
.get_workspaces()?
|
||||
.into_iter()
|
||||
.map(|ws| ws.into())
|
||||
.collect();
|
||||
println!("{}", serde_json::ser::to_string(&workspaces).unwrap());
|
||||
}
|
||||
|
||||
Ok(())
|
||||
}
|
||||
|
||||
#[derive(Debug, Serialize)]
|
||||
struct WsData {
|
||||
name: String,
|
||||
focused: bool,
|
||||
urgent: bool,
|
||||
}
|
||||
|
||||
impl From<Workspace> for WsData {
|
||||
fn from(
|
||||
Workspace {
|
||||
name,
|
||||
focused,
|
||||
urgent,
|
||||
..
|
||||
}: Workspace,
|
||||
) -> Self {
|
||||
WsData {
|
||||
name,
|
||||
focused,
|
||||
urgent,
|
||||
}
|
||||
}
|
||||
}
|
1041
programs/jrnl/Cargo.lock
generated
1041
programs/jrnl/Cargo.lock
generated
File diff suppressed because it is too large
Load diff
|
@ -1,18 +0,0 @@
|
|||
[package]
|
||||
name = "j"
|
||||
version = "0.1.0"
|
||||
edition = "2021"
|
||||
|
||||
[dependencies]
|
||||
chrono = "0.4.38"
|
||||
clap = { version = "4.5.4", features = ["derive", "env"] }
|
||||
dirs = "5.0.1"
|
||||
ego-tree = "0.6.2"
|
||||
indexmap = "2.2.6"
|
||||
markdown = "0.3.0"
|
||||
owo-colors = "4.0.0"
|
||||
petgraph = "0.6.4"
|
||||
ratatui = "0.26.2"
|
||||
temp-file = "0.1.8"
|
||||
termsize = "0.1.9"
|
||||
inquire = "0.7.5"
|
|
@ -1,2 +0,0 @@
|
|||
pub mod add_entry;
|
||||
pub mod list_entries;
|
|
@ -1,60 +0,0 @@
|
|||
use std::{
|
||||
env,
|
||||
fs::{self, OpenOptions},
|
||||
io::{self, Write},
|
||||
path::PathBuf,
|
||||
process::Command,
|
||||
};
|
||||
|
||||
use inquire::Text;
|
||||
use temp_file::{TempFile, TempFileBuilder};
|
||||
|
||||
use crate::md::{Entry, ToMd};
|
||||
|
||||
// TODO: the usual (better error handling)
|
||||
pub fn add_entry(path: PathBuf, title: Option<String>) -> io::Result<()> {
|
||||
if !path.exists() {
|
||||
eprintln!("Journal file does not exist at {path:?}, exiting...");
|
||||
std::process::exit(1);
|
||||
}
|
||||
|
||||
let title = Text::new("Title").prompt().unwrap();
|
||||
|
||||
let tmp = TempFileBuilder::new()
|
||||
.suffix(".jrnl-entry.md")
|
||||
.build()
|
||||
.unwrap();
|
||||
|
||||
let editor = match env::var("EDITOR") {
|
||||
Ok(val) => val,
|
||||
Err(env::VarError::NotPresent) => {
|
||||
eprintln!("EDITOR not set, exiting...");
|
||||
std::process::exit(1);
|
||||
}
|
||||
_ => unreachable!(),
|
||||
};
|
||||
|
||||
let mut editor_cmd = Command::new(&editor);
|
||||
editor_cmd.arg(tmp.path());
|
||||
editor_cmd.status().unwrap();
|
||||
|
||||
let content = fs::read_to_string(tmp.path()).unwrap();
|
||||
|
||||
let now = chrono::offset::Local::now();
|
||||
|
||||
let entry = Entry {
|
||||
timestamp: now.fixed_offset(),
|
||||
title: &title,
|
||||
content: &content,
|
||||
};
|
||||
|
||||
let mut file = OpenOptions::new()
|
||||
.write(true)
|
||||
.append(true)
|
||||
.open(path)
|
||||
.unwrap();
|
||||
|
||||
write!(file, "{}", entry.to_md())?;
|
||||
|
||||
Ok(())
|
||||
}
|
|
@ -1,31 +0,0 @@
|
|||
use owo_colors::OwoColorize;
|
||||
use std::{fs, io, path::PathBuf};
|
||||
|
||||
use crate::md::Doc;
|
||||
|
||||
pub fn list_entries(path: PathBuf) -> io::Result<()> {
|
||||
let file = fs::read_to_string(path)?;
|
||||
|
||||
if let Some(doc) = Doc::new(&file) {
|
||||
// TODO: testing, so this shit doesn't blow the fuck up in our face anymore
|
||||
let termsize::Size { cols, .. } = termsize::get().unwrap();
|
||||
assert!(cols > 0, "we don't have a terminal width.");
|
||||
|
||||
for (i, entry) in doc.entries.into_iter().enumerate() {
|
||||
let n = format!("{:>2}", i + 1);
|
||||
let r = format!(". {}", entry.title,);
|
||||
let l = format!(" {} ", crate::utils::format_datetime(entry.timestamp));
|
||||
|
||||
let fuck_you_debugging = cols as usize - (n.len() + r.chars().count() + l.len());
|
||||
dbg!(fuck_you_debugging);
|
||||
let padding = " ".repeat(fuck_you_debugging);
|
||||
|
||||
println!("{}{r}{padding}{}", n.cyan(), l.white())
|
||||
}
|
||||
println!("d");
|
||||
Ok(())
|
||||
} else {
|
||||
eprintln!("Parsing error...");
|
||||
std::process::exit(1);
|
||||
}
|
||||
}
|
|
@ -1,47 +0,0 @@
|
|||
use clap::{Parser, Subcommand};
|
||||
use std::{fs, io, path::PathBuf};
|
||||
|
||||
use crate::{
|
||||
commands::add_entry::add_entry,
|
||||
commands::list_entries::list_entries,
|
||||
md::{Doc, ToMd},
|
||||
};
|
||||
|
||||
mod commands;
|
||||
mod md;
|
||||
mod utils;
|
||||
|
||||
#[derive(Debug, Parser)]
|
||||
struct Cli {
|
||||
#[arg(env)]
|
||||
s10e_jrnl_file_loc: PathBuf,
|
||||
#[command(subcommand)]
|
||||
command: Option<Command>,
|
||||
}
|
||||
|
||||
#[derive(Debug, Subcommand)]
|
||||
enum Command {
|
||||
#[command(aliases = ["l", "ls", "list"])]
|
||||
ListEntries,
|
||||
#[command(aliases = ["a", "add-entry"])]
|
||||
Add { title: Option<String> },
|
||||
}
|
||||
|
||||
fn main() -> io::Result<()> {
|
||||
let cli = Cli::parse();
|
||||
println!("Hello, world!");
|
||||
println!("cli: {cli:#?}");
|
||||
|
||||
match cli.command {
|
||||
Some(Command::ListEntries) => list_entries(cli.s10e_jrnl_file_loc.clone()),
|
||||
Some(Command::Add { title }) => add_entry(cli.s10e_jrnl_file_loc.clone(), title),
|
||||
None => {
|
||||
// TODO: handle btter
|
||||
let file = fs::read_to_string(cli.s10e_jrnl_file_loc)?;
|
||||
|
||||
let doc = Doc::new(&file).unwrap();
|
||||
println!("{}", doc.to_md());
|
||||
Ok(())
|
||||
}
|
||||
}
|
||||
}
|
|
@ -1,67 +0,0 @@
|
|||
use chrono::{DateTime, FixedOffset};
|
||||
use std::convert::identity;
|
||||
|
||||
pub trait ToMd {
|
||||
fn to_md(&self) -> String;
|
||||
}
|
||||
|
||||
#[derive(Debug)]
|
||||
pub struct Doc<'src> {
|
||||
pub entries: Vec<Entry<'src>>,
|
||||
}
|
||||
|
||||
impl<'src> Doc<'src> {
|
||||
// TODO: better parsing errors?
|
||||
pub fn new(f: &'src str) -> Option<Self> {
|
||||
let entries = f
|
||||
.split("\n## ")
|
||||
.map(|s| s.split_once("\n"))
|
||||
.skip(1)
|
||||
.filter_map(identity)
|
||||
.map(|(title, content)| (title.split_once(": "), content))
|
||||
.map(|(title, content)| {
|
||||
if let Some((ts, title)) = title {
|
||||
Some(Entry {
|
||||
timestamp: DateTime::parse_from_rfc3339(ts).unwrap(),
|
||||
title,
|
||||
content: content.trim_matches('\n'),
|
||||
})
|
||||
} else {
|
||||
None
|
||||
}
|
||||
})
|
||||
.collect::<Vec<_>>();
|
||||
|
||||
entries.iter().all(|it| it.is_some()).then_some(Self {
|
||||
entries: entries.into_iter().filter_map(identity).collect(),
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
impl ToMd for Doc<'_> {
|
||||
fn to_md(&self) -> String {
|
||||
let mut r = "# Journal\n\n".to_owned();
|
||||
|
||||
self.entries.iter().fold(r, |mut r, it| r + &it.to_md())
|
||||
}
|
||||
}
|
||||
|
||||
#[derive(Debug, Clone)]
|
||||
pub struct Entry<'src> {
|
||||
pub timestamp: DateTime<FixedOffset>,
|
||||
pub title: &'src str,
|
||||
pub content: &'src str,
|
||||
}
|
||||
|
||||
impl ToMd for Entry<'_> {
|
||||
fn to_md(&self) -> String {
|
||||
format!(
|
||||
"## {}: {}\n\n{}\n\n",
|
||||
self.timestamp
|
||||
.fixed_offset()
|
||||
.to_rfc3339_opts(chrono::SecondsFormat::Secs, false),
|
||||
self.title,
|
||||
self.content
|
||||
)
|
||||
}
|
||||
}
|
|
@ -1,15 +0,0 @@
|
|||
use chrono::{DateTime, FixedOffset};
|
||||
|
||||
pub fn format_datetime(ts: DateTime<FixedOffset>) -> String {
|
||||
ts.format("%A, %-d. %B %Y %R").to_string()
|
||||
}
|
||||
|
||||
pub fn format_datetime_padded(ts: DateTime<FixedOffset>) -> String {
|
||||
format!(
|
||||
"{:>9}{}{:<9}{}",
|
||||
ts.format("%A, "),
|
||||
ts.format("%d. "),
|
||||
ts.format("%B"),
|
||||
ts.format(" %Y %R"),
|
||||
)
|
||||
}
|
|
@ -1,14 +0,0 @@
|
|||
[package]
|
||||
name = "traveldings"
|
||||
version = "0.1.0"
|
||||
edition = "2021"
|
||||
|
||||
[dependencies]
|
||||
serde = { version = "1.0.209", features = ["derive"] }
|
||||
serde_json = "1.0.128"
|
||||
reqwest = {version = "0.12.7", default-features = false, features = ["rustls-tls", "charset", "http2"]}
|
||||
tokio = { version = "1", features = ["full"] }
|
||||
thiserror = "1"
|
||||
anyhow = "1"
|
||||
chrono = { version = "0.4", features = ["serde"]}
|
||||
clap = { version = "4.5", features = ["derive"]}
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Reference in a new issue