Compare commits

...

11 commits

Author SHA1 Message Date
atagen
0a34c4ad52 add obisidian 2025-07-21 16:43:12 +10:00
atagen
beb1cab9ac create readme 2025-07-21 15:00:39 +10:00
atagen
57f3d78a06 add yazi 2025-07-21 14:36:04 +10:00
atagen
ac928b3d87 update meat 2025-07-21 13:51:49 +10:00
atagen
e3fe2b9f4b fix up fish aliases/abbrs 2025-07-21 13:51:35 +10:00
atagen
3d85727642 split kitty out to graphical 2025-07-21 13:13:20 +10:00
atagen
e4b7d76769 refactor rice into config 2025-07-21 12:32:12 +10:00
atagen
8872a12d20 add arbyd quickshell conf 2025-07-21 00:55:23 +10:00
atagen
63af9f8f3f add fish abbrs and header 2025-07-21 00:55:23 +10:00
atagen
7d4073779f bump meat 2025-07-21 00:55:23 +10:00
atagen
a27b02276d refactor in synaptic style 2025-07-21 00:55:23 +10:00
138 changed files with 2249 additions and 3335 deletions

2
.gitignore vendored
View file

@ -3,4 +3,4 @@ mullvad/inactive
result
*.key
*.pub_key
hosts/
hosts/reflector

3
.gitmodules vendored
View file

@ -1,3 +0,0 @@
[submodule "rhizome-vps"]
path = rhizome-vps
url = https://git.rhizome.tf/rhizome/server-config

19
README.md Normal file
View file

@ -0,0 +1,19 @@
# a nixos config
## mission statement
this config attempts to follow the [synaptic standard](https://github.com/llakala/synaptic-standard/), and is built in an effort to achieve **semantic colocation**.
ideally, our modules are categorised by the purpose they hope to fulfil, and contain all the information necessary to achieve that within their context.
this is in contrast to many configuration styles which may be structured in a way that is beholden to mechanical details (ie. programs, interfaces, module systems they use).
here, *we do not build our dreams of concrete*.
## mechanism
recursive imports and module aliasing bend the module system/s to our will.
this allows us to create freeform sets of modules which realise broad purposes while cross-cutting module system concerns, all with a single toplevel import point.
you can see [entry.nix](./entry.nix) and [util/create.nix](util/create.nix) for the explicit details of how this is done.

7
TODO
View file

@ -1,7 +0,0 @@
REPLACE HOME MANAGER WITH
pkgs.writers and HJEM
implement agenix
figure out a way to get firefox policies and plugins set up in webapps

View file

Before

Width:  |  Height:  |  Size: 183 KiB

After

Width:  |  Height:  |  Size: 183 KiB

Before After
Before After

View file

Before

Width:  |  Height:  |  Size: 135 KiB

After

Width:  |  Height:  |  Size: 135 KiB

Before After
Before After

View file

Before

Width:  |  Height:  |  Size: 36 KiB

After

Width:  |  Height:  |  Size: 36 KiB

Before After
Before After

View file

Before

Width:  |  Height:  |  Size: 5.1 KiB

After

Width:  |  Height:  |  Size: 5.1 KiB

Before After
Before After

View file

Before

Width:  |  Height:  |  Size: 152 KiB

After

Width:  |  Height:  |  Size: 152 KiB

Before After
Before After

41
common/cli.nix Normal file
View file

@ -0,0 +1,41 @@
{
pkgs,
userPkgs,
...
}:
{
environment.systemPackages = builtins.attrValues {
inherit (pkgs)
curl
eza
git
;
};
hm.home.packages = builtins.attrValues {
inherit (pkgs)
btop
bat
ripgrep
fd
lazygit
zoxide
zellij
ouch
;
};
programs.yazi = {
enable = true;
plugins = {
inherit (pkgs.yaziPlugins)
lazygit
chmod
diff
mediainfo
smart-enter
full-border
wl-clipboard
;
fr = pkgs.callPackage userPkgs.fr-yazi { };
};
};
}

13
common/debloat.nix Normal file
View file

@ -0,0 +1,13 @@
{ lib, ... }:
{
# misc perl
system.disableInstallerTools = true;
programs.less.lessopen = null;
programs.command-not-found.enable = false;
boot.enableContainers = false;
boot.loader.grub.enable = false;
environment.defaultPackages = lib.mkDefault [ ];
documentation.info.enable = false;
system.tools.nixos-option.enable = false;
}

View file

@ -1,14 +1,15 @@
{
inputs,
pkgs,
rice,
config,
...
}:
let
inherit (config) rice;
pal = rice.palette.hex;
in
{
programs.helix = {
hm.programs.helix = {
enable = true;
package = inputs.helix.packages.${pkgs.system}.helix;
themes = with pal; {

4
common/network.nix Normal file
View file

@ -0,0 +1,4 @@
{ lib, ... }:
{
networking.useDHCP = lib.mkDefault true;
}

27
common/nix/gc.nix Normal file
View file

@ -0,0 +1,27 @@
{ pkgs, inputs, ... }:
{
imports = [
inputs.angrr.nixosModules.angrr
];
nix.gc = {
automatic = true;
dates = "weekly";
persistent = true;
options = "--delete-older-than 14d";
};
hm.nix.gc = {
automatic = true;
frequency = "weekly";
options = "--delete-older-than 14d";
};
services.angrr = {
enable = true;
enableNixGcIntegration = true;
period = "2weeks";
package = inputs.angrr.packages.${pkgs.system}.default;
};
}

22
common/nix/managers.nix Normal file
View file

@ -0,0 +1,22 @@
{ inputs, mainUser, ... }:
{
imports = [
inputs.meat.nixosModules.meat
];
programs.meat = {
enable = true;
flake = "/home/${mainUser}/.nix";
};
# services.smooooth = {
# enable = true;
# path = "/home/${mainUser}/.nix";
# blockers = [
# "hx"
# {
# nix = "die";
# }
# ];
# nixPackage = pkgs.lix;
# };
}

9
common/nix/nixpkgs.nix Normal file
View file

@ -0,0 +1,9 @@
{ ... }:
{
nixpkgs = {
config = {
allowUnfree = true;
allowUnfreePredicate = _: true;
};
};
}

26
common/nix/settings.nix Normal file
View file

@ -0,0 +1,26 @@
{ inputs, ... }:
{
imports = [
inputs.lix-module.nixosModules.default
];
nix = {
settings = {
experimental-features = [
"nix-command"
"flakes"
"pipe-operator"
];
substitute = true;
};
extraOptions = ''
keep-outputs = true
keep-derivations = true
'';
optimise.automatic = true;
};
system.nixos.tags = [ "fatcock-xxl" ];
home-manager.useGlobalPkgs = true;
}

21
common/nix/tools.nix Normal file
View file

@ -0,0 +1,21 @@
{ pkgs, inputs, ... }:
{
environment.systemPackages = builtins.attrValues {
inherit (pkgs)
home-manager
cachix
nixfmt-rfc-style
;
inherit (inputs.nil.packages.${pkgs.system}) nil;
};
hm.imports = [
inputs.nix-index-database.hmModules.nix-index
];
imports = [
inputs.nix-index-database.nixosModules.nix-index
];
programs.nix-index-database.comma.enable = true;
programs.nix-index.enableZshIntegration = false;
programs.nix-index.enableBashIntegration = false;
}

55
common/rice/default.nix Normal file
View file

@ -0,0 +1,55 @@
{
lib,
inputs,
...
}:
let
nix-rice = import "${inputs.nix-rice}/lib.nix" {
inherit lib;
kitty-themes-src = { };
};
inherit (nix-rice) kitty-themes;
inherit (nix-rice.palette) toRGBShortHex toRGBHex;
theme = kitty-themes.parseTheme ./pal.conf;
in
{
options.rice = lib.mkOption {
description = "ricing related variables";
default = { };
type = lib.types.attrsOf lib.types.anything;
};
config.rice = rec {
palette = theme // {
normal = {
black = theme.color0;
red = theme.color1;
green = theme.color2;
yellow = theme.color3;
blue = theme.color4;
magenta = theme.color5;
cyan = theme.color6;
white = theme.color7;
};
bright = {
black = theme.color8;
red = theme.color9;
green = theme.color10;
yellow = theme.color11;
blue = theme.color12;
magenta = theme.color13;
cyan = theme.color14;
white = theme.color15;
};
util = {
fg = theme.foreground;
bg = theme.background;
fg_sel = theme.selection_foreground;
bg_sel = theme.selection_background;
inherit (theme) cursor;
# url = theme.url_color;
};
hex = toRGBHex palette;
shortHex = toRGBShortHex palette;
};
};
}

6
common/systemd.nix Normal file
View file

@ -0,0 +1,6 @@
{ ... }:
{
systemd.services."user@".serviceConfig.Delegate = "memory pids cpu cpuset";
systemd.user.extraConfig = "LogLevel=debug";
hm.systemd.user.startServices = "sd-switch";
}

56
common/terminal.nix Normal file
View file

@ -0,0 +1,56 @@
{
pkgs,
inputs,
...
}:
let
inherit (pkgs) fish;
in
{
imports = [
inputs.culr.nixosModules.culr
];
programs.culr = {
enable = true;
pattern = "rainbow-split";
};
programs.fish = {
enable = true;
shellAbbrs = {
"gco" = "git checkout";
"gcb" = "git checkout -b";
"gp" = "git push";
"gpf" = "git push --force";
"gap" = "git commit -a --amend --no-edit && git push --force";
"gl" = "git pull";
"ga" = "git add";
"gcam" = "git commit -am";
};
shellAliases = {
"l" = "eza -lg --icons=always --colour=always $argv | culr";
"la" = "eza -lg --icons=always --colour=always $argv | culr";
"p" = "ps $argv | culr";
"mnt" = "mount | culr";
};
interactiveShellInit = ''
${./rice/header.sh}
'';
};
programs.zoxide = {
enable = true;
enableFishIntegration = true;
};
environment.systemPackages = [
fish
];
environment.shells = [ fish ];
users.defaultUserShell = fish;
console = {
font = "Lat2-Terminus16";
};
environment.sessionVariables = {
EDITOR = "hx";
};
}

16
common/users.nix Normal file
View file

@ -0,0 +1,16 @@
{ lib, mainUser, ... }:
{
services.userborn.enable = lib.mkDefault true;
nix.settings.trusted-users = [ mainUser ];
users.users.${mainUser} = {
isNormalUser = true;
extraGroups = [
"wheel"
];
};
hm.config.home = {
username = mainUser;
homeDirectory = "/home/${mainUser}";
};
}

View file

@ -1,53 +0,0 @@
{
system,
inputs,
sharedModules,
...
}:
with inputs;
let
nix-rice = import "${inputs.nix-rice}/lib.nix" {
inherit (nixpkgs) lib;
kitty-themes-src = { };
};
rice = import ./rice {
inherit
inputs
system
nix-rice
;
};
in
{
systems =
definitions:
nixpkgs.lib.mapAttrs (
name: info:
nixpkgs.lib.nixosSystem {
inherit system;
specialArgs = {
inherit inputs rice;
mainUser = info.user;
};
modules =
[
./system/${name}.nix
home-manager.nixosModules.home-manager
{
home-manager = {
useGlobalPkgs = true;
extraSpecialArgs = {
inherit inputs rice nix-rice;
mainUser = info.user;
};
users.${info.user}.imports = [
./home/${info.user}.nix
] ++ info.hmImports or [ ];
};
}
]
++ info.imports or [ ]
++ sharedModules;
}
) definitions;
}

View file

@ -1,33 +1,23 @@
let
inputs = import ./inputs.nix;
modules = import ./util/get-modules.nix inputs;
create = import ./create.nix {
system = "x86_64-linux";
inherit inputs;
sharedModules =
with inputs;
(modules [
culr
meat
niri
niri-tag
lix-module
angrr
arbys
# smooooth
])
++ [
nix-index-database.nixosModules.nix-index
./system/substituters.nix
];
};
create = import ./util/create.nix;
in
{
nixosConfigurations = create.systems {
quiver = {
user = "bolt";
imports = with inputs; (modules [ nyx ]);
imports = [
./common
./graphical
./hosts/quiver
];
};
adrift = {
user = "plank";
imports = [
./common
./graphical
./hosts/adrift
];
};
adrift.user = "plank";
};
}

29
flake.lock generated
View file

@ -40,14 +40,17 @@
},
"arbys": {
"locked": {
"lastModified": 1752908944,
"narHash": "sha256-bx+zNhM2rxt55qnlgWfOq97JzxwzWzvynKP5h9uJoZk=",
"path": "/home/bolt/code/arbys",
"type": "path"
"lastModified": 1753022411,
"narHash": "sha256-m4pEYNwUZh64FyRIM1TSmRn1n4A85WEzVu5Gk2VHvAY=",
"ref": "refs/heads/meats",
"rev": "e7fa12d6f3f5b723bce413acdfa5461fbaa3ec97",
"revCount": 1,
"type": "git",
"url": "https://git.atagen.co/atagen/arbys"
},
"original": {
"path": "/home/bolt/code/arbys",
"type": "path"
"type": "git",
"url": "https://git.atagen.co/atagen/arbys"
}
},
"crane": {
@ -459,11 +462,11 @@
"unf": "unf"
},
"locked": {
"lastModified": 1752153625,
"narHash": "sha256-N4N0z0I9rtVgAPnPeHBMB46MongPCUTpZdYxOtt2dVY=",
"lastModified": 1753059450,
"narHash": "sha256-WsGRRQGNnPu0Bv5QPhbnouAWjdsmCuE9VzgZN7U+EQY=",
"ref": "refs/heads/master",
"rev": "51d501a68e2f6c11460733bffb590056edbfec11",
"revCount": 36,
"rev": "de951b227223ee924c37c7aa282bade34686bf83",
"revCount": 38,
"type": "git",
"url": "https://git.atagen.co/atagen/meat"
},
@ -1041,11 +1044,11 @@
},
"nixpkgs_5": {
"locked": {
"lastModified": 1751949589,
"narHash": "sha256-mgFxAPLWw0Kq+C8P3dRrZrOYEQXOtKuYVlo9xvPntt8=",
"lastModified": 1748217807,
"narHash": "sha256-P3u2PXxMlo49PutQLnk2PhI/imC69hFl1yY4aT5Nax8=",
"owner": "nixos",
"repo": "nixpkgs",
"rev": "9b008d60392981ad674e04016d25619281550a9d",
"rev": "3108eaa516ae22c2360928589731a4f1581526ef",
"type": "github"
},
"original": {

View file

@ -2,42 +2,6 @@
description = "nixos config";
outputs = _: { };
# outputs =
# inputs:
# with inputs;
# let
# modules = import ./util/get-modules.nix {
# inherit inputs;
# };
# create = import ./create.nix {
# inherit inputs;
# system = "x86_64-linux";
# sharedModules =
# (modules [
# culr
# meat
# niri
# niri-tag
# lix-module
# angrr
# arbys
# # smooooth
# ])
# ++ [
# nix-index-database.nixosModules.nix-index
# ./system/substituters.nix
# ];
# };
# in
# {
# nixosConfigurations = create.systems {
# quiver = {
# user = "bolt";
# imports = (modules [ nyx ]);
# };
# adrift.user = "plank";
# };
# };
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
@ -71,16 +35,6 @@
culr.url = "git+https://git.atagen.co/atagen/culr";
# comfyui = {
# url = "path:./flakes/comfyui";
# inputs.nixpkgs.follows = "nixpkgs";
# };
# comfyui-plugins = {
# url = "path:./flakes/comfyui-plugins";
# inputs.nixpkgs.follows = "nixpkgs";
# };
niri.url = "github:sodiboo/niri-flake";
hjem = {
@ -103,7 +57,7 @@
angrr.url = "github:linyinfeng/angrr";
arbys.url = "path:/home/bolt/code/arbys";
arbys.url = "git+https://git.atagen.co/atagen/arbys";
__flake-compat = {
url = "git+https://git.lix.systems/lix-project/flake-compat.git";

View file

@ -1,28 +0,0 @@
{
pkgs,
src,
python3Packages,
...
}:
let
inherit (python3Packages)
numba
colour-science
rembg
pixeloe
transparent-background
;
in
pkgs.stdenvNoCC.mkDerivation {
pname = "comfyui-essentials";
version = "dev-${builtins.toString src.lastModified}";
inherit src;
propagatedBuildInputs = [
numba
colour-science
rembg
pixeloe
transparent-background
];
}

View file

@ -1,75 +0,0 @@
{
"nodes": {
"gguf": {
"flake": false,
"locked": {
"lastModified": 1736350217,
"narHash": "sha256-3RqFfvXdn9sCIlctqa14c2fvluSmJCR+llfZo/MV64o=",
"owner": "city96",
"repo": "ComfyUI-GGUF",
"rev": "5875c52f59baca3a9372d68c43a3775e21846fe0",
"type": "github"
},
"original": {
"owner": "city96",
"repo": "ComfyUI-GGUF",
"type": "github"
}
},
"nixpkgs": {
"locked": {
"lastModified": 1738410390,
"narHash": "sha256-xvTo0Aw0+veek7hvEVLzErmJyQkEcRk6PSR4zsRQFEc=",
"path": "/nix/store/hjb1rqv2mfs5ny47amj2gsc8xk05x5g6-source",
"rev": "3a228057f5b619feb3186e986dbe76278d707b6e",
"type": "path"
},
"original": {
"id": "nixpkgs",
"type": "indirect"
}
},
"openpose": {
"flake": false,
"locked": {
"lastModified": 1685841563,
"narHash": "sha256-GUjs8mIUFAbjJEVL+EsT44HG42mAiumKOBlBas1xxrM=",
"owner": "space-nuko",
"repo": "ComfyUI-OpenPose-Editor",
"rev": "4d8fe730acdb11ab2fcd592129d91d338d270adf",
"type": "github"
},
"original": {
"owner": "space-nuko",
"repo": "ComfyUI-OpenPose-Editor",
"type": "github"
}
},
"root": {
"inputs": {
"gguf": "gguf",
"nixpkgs": "nixpkgs",
"openpose": "openpose",
"tensorrt": "tensorrt"
}
},
"tensorrt": {
"flake": false,
"locked": {
"lastModified": 1728519788,
"narHash": "sha256-tqiodF60IVlmvJknYxEwL0U7GIrrfl49k6Tg+8jGRVU=",
"owner": "comfyanonymous",
"repo": "ComfyUI_TensorRT",
"rev": "5bcc3f1e5c2424bb20bcb586e340c25ebe4a954f",
"type": "github"
},
"original": {
"owner": "comfyanonymous",
"repo": "ComfyUI_TensorRT",
"type": "github"
}
}
},
"root": "root",
"version": 7
}

View file

@ -1,49 +0,0 @@
{
inputs = {
gguf = {
url = "github:city96/ComfyUI-GGUF";
flake = false;
};
tensorrt = {
url = "github:comfyanonymous/ComfyUI_TensorRT";
flake = false;
};
# needs some deps packaged
# essentials = {
# url = "github:cubiq/ComfyUI_essentials";
# flake = false;
# };
openpose = {
url = "github:space-nuko/ComfyUI-OpenPose-Editor";
flake = false;
};
};
outputs =
{
self,
nixpkgs,
...
}:
let
pkgs = import nixpkgs {
system = "x86_64-linux";
};
inherit (pkgs) lib callPackage;
inherit (builtins) mapAttrs;
filteredInputs = lib.filterAttrs (n: _v: n != "nixpkgs") self.inputs;
in
{
overlays.comfyui-plugins = final: _prev: {
comfyui-plugins = mapAttrs (
name: value: final.callPackage ./${name}/default.nix { src = value; }
) filteredInputs;
};
packages.x86_64-linux = mapAttrs (
name: value: callPackage ./${name}/default.nix { src = value; }
) filteredInputs;
};
}

View file

@ -1,23 +0,0 @@
{
pkgs,
src,
python3Packages,
...
}:
let
inherit (python3Packages) gguf numpy pyyaml;
in
pkgs.stdenvNoCC.mkDerivation {
pname = "comfyui-gguf";
version = "dev-${builtins.toString src.lastModified}";
inherit src;
propagatedBuildInputs = [
gguf
numpy
pyyaml
];
installPhase = ''
mkdir -p $out
cp -r * $out/
'';
}

View file

@ -1,20 +0,0 @@
{
pkgs,
src,
...
}:
pkgs.stdenvNoCC.mkDerivation {
pname = "comfyui-openpose-editor";
version = "dev-${builtins.toString src.lastModified}";
inherit src;
patches = [
./openpose_no_update.patch
];
installPhase = ''
mkdir -p $out
cp -r * $out/
cp js/* $out/
'';
}

View file

@ -1,12 +0,0 @@
diff --git a/__init__.py b/__init__.py
index e4cf8bb..7d8f894 100644
--- a/__init__.py
+++ b/__init__.py
@@ -35,6 +35,6 @@ def update_javascript():
shutil.copy(src_file, dst_file)
-update_javascript()
+# update_javascript()
print('\033[34mOpenPose Editor: \033[92mLoaded\033[0m')

View file

@ -1,24 +0,0 @@
{
pkgs,
src,
python3Packages,
...
}:
let
inherit (python3Packages) tensorrt onnx;
in
pkgs.stdenvNoCC.mkDerivation {
pname = "comfyui-tensorrt";
version = "dev-${builtins.toString src.lastModified}";
inherit src;
propagatedBuildInputs = [
tensorrt
onnx
];
installPhase = ''
mkdir -p $out
cp -r * $out
'';
}

View file

@ -1,96 +0,0 @@
{
pkgs,
lib,
config,
comfyui,
comfy_dir ? "/run/user/1000/comfyui/",
spandrel,
plugins ? config.comfyui.plugins or [ ],
...
}:
let
inherit (pkgs) python3;
inherit (pkgs.python3Packages)
torch
torchsde
torchvision
torchaudio
einops
transformers
tokenizers
sentencepiece
safetensors
aiohttp
pyyaml
pillow
scipy
tqdm
psutil
kornia
soundfile
;
python = python3.buildEnv.override {
extraLibs = [
torch
torchsde
torchvision
torchaudio
einops
transformers
tokenizers
sentencepiece
safetensors
aiohttp
pyyaml
pillow
scipy
tqdm
psutil
kornia
soundfile
spandrel
] ++ plugins;
};
in
pkgs.stdenvNoCC.mkDerivation {
name = "comfyui";
pname = "comfyui";
version = "dev-${builtins.toString comfyui.lastModified}";
src = comfyui;
nativeBuildInputs =
let
inherit (pkgs) makeWrapper;
in
[
makeWrapper
];
propagatedBuildInputs =
let
inherit (pkgs.cudaPackages) cudatoolkit;
in
[
python
cudatoolkit
];
patches = [ ./folder_paths.patch ];
installPhase =
let
launcher = pkgs.writeShellScript "launch.sh" ''
mkdir -p $COMFY_DIR/custom_nodes
mkdir -p $COMFY_DIR/models/{checkpoints,configs,loras,vae,clip,unet,diffusion_models,clip_vision,style_models,embeddings,diffusers,vae_approx,controlnet,gligen,upscale_models,hypernetworks,photomaker,classifiers}
${python}/bin/python3 $COMFY/comfyui/main.py --output-directory $(mktemp)
'';
in
''
mkdir -p $out/comfyui
cp -r * $out/comfyui
mkdir -p $out/bin
makeWrapper ${launcher} $out/bin/comfyui --prefix PATH : ${lib.makeBinPath [ python ]} \
--set PYTHONPATH ${lib.makeLibraryPath [ python ]} --set COMFY $out --set COMFY_DIR ${comfy_dir}
'';
meta.mainProgram = "comfyui";
}

View file

@ -1,41 +0,0 @@
{
"nodes": {
"comfyui": {
"flake": false,
"locked": {
"lastModified": 1739165060,
"narHash": "sha256-DLiv96ynd+p4lXgvNMqgSklWFciLX+l+nXlu5MYVrg8=",
"owner": "comfyanonymous",
"repo": "ComfyUI",
"rev": "4027466c802d174d76347726d74de73c39acedb3",
"type": "github"
},
"original": {
"owner": "comfyanonymous",
"repo": "ComfyUI",
"type": "github"
}
},
"nixpkgs": {
"locked": {
"lastModified": 1738410390,
"narHash": "sha256-xvTo0Aw0+veek7hvEVLzErmJyQkEcRk6PSR4zsRQFEc=",
"path": "/nix/store/hjb1rqv2mfs5ny47amj2gsc8xk05x5g6-source",
"rev": "3a228057f5b619feb3186e986dbe76278d707b6e",
"type": "path"
},
"original": {
"id": "nixpkgs",
"type": "indirect"
}
},
"root": {
"inputs": {
"comfyui": "comfyui",
"nixpkgs": "nixpkgs"
}
}
},
"root": "root",
"version": 7
}

View file

@ -1,56 +0,0 @@
{
inputs = {
comfyui = {
url = "github:comfyanonymous/ComfyUI";
flake = false;
};
};
nixConfig = {
extra-substituters = [
"https://nix-community.cachix.org"
"https://cuda-maintainers.cachix.org"
];
extra-trusted-public-keys = [
"nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs="
"cuda-maintainers.cachix.org-1:0dq3bujKpuEPMCX6U4WylrUDZ9JyUG0VpVZa7CNfq5E="
];
};
outputs =
{
self,
nixpkgs,
comfyui,
}:
{
homeManagerModules.comfyui = import ./module.nix;
overlays.comfyui = final: _prev: {
comfyui =
let
spandrel = final.callPackage ./spandrel.nix { };
in
final.callPackage ./default.nix {
cudaSupport = true;
inherit comfyui spandrel;
};
};
packages.x86_64-linux =
let
system = "x86_64-linux";
pkgs = import nixpkgs {
config.allowUnfree = true;
config.cudaSupport = true;
inherit system;
};
spandrel = pkgs.callPackage ./spandrel.nix { };
in
{
default = pkgs.callPackage ./default.nix {
inherit comfyui spandrel;
};
};
};
}

View file

@ -1,28 +0,0 @@
diff --git a/folder_paths.py b/folder_paths.py
index 01ae821..27906ac 100644
--- a/folder_paths.py
+++ b/folder_paths.py
@@ -11,7 +11,7 @@ supported_pt_extensions: set[str] = {'.ckpt', '.pt', '.bin', '.pth', '.safetenso
folder_names_and_paths: dict[str, tuple[list[str], set[str]]] = {}
-base_path = os.path.dirname(os.path.realpath(__file__))
+base_path = os.path.dirname(os.environ['COMFY_DIR'])
models_dir = os.path.join(base_path, "models")
folder_names_and_paths["checkpoints"] = ([os.path.join(models_dir, "checkpoints")], supported_pt_extensions)
folder_names_and_paths["configs"] = ([os.path.join(models_dir, "configs")], [".yaml"])
@@ -39,10 +39,10 @@ folder_names_and_paths["photomaker"] = ([os.path.join(models_dir, "photomaker")]
folder_names_and_paths["classifiers"] = ([os.path.join(models_dir, "classifiers")], {""})
-output_directory = os.path.join(os.path.dirname(os.path.realpath(__file__)), "output")
-temp_directory = os.path.join(os.path.dirname(os.path.realpath(__file__)), "temp")
-input_directory = os.path.join(os.path.dirname(os.path.realpath(__file__)), "input")
-user_directory = os.path.join(os.path.dirname(os.path.realpath(__file__)), "user")
+output_directory = os.path.join(base_path, "output")
+temp_directory = os.path.join(base_path, "temp")
+input_directory = os.path.join(base_path, "input")
+user_directory = os.path.join(base_path, "user")
filename_list_cache: dict[str, tuple[list[str], dict[str, float], float]] = {}

View file

@ -1,49 +0,0 @@
{
pkgs,
lib,
config,
...
}:
let
inherit (lib)
mkEnableOption
mkOption
types
hasSuffix
;
cfg = config.programs.comfyui;
# comfyui only understands the path properly with a trailing slash
getStorage = if (hasSuffix "/" cfg.storage) then cfg.storage else cfg.storage + "/";
in
{
options.programs.comfyui = {
enable = mkEnableOption "ComfyUI";
storage = mkOption {
type = types.path;
description = "where to source models and store information";
};
plugins = mkOption {
type = with types; listOf package;
description = "list of comfyui plugins";
default = [ ];
};
};
config = lib.mkIf cfg.enable {
home.packages = [
# pkgs.comfyui
(pkgs.comfyui.override {
comfy_dir = getStorage;
inherit (cfg) plugins;
})
];
home.file = builtins.listToAttrs (
map (pkg: {
name = "${getStorage}/custom_nodes/${pkg.name}";
value = {
recursive = true;
source = "${pkg}";
};
}) cfg.plugins
);
};
}

View file

@ -1,45 +0,0 @@
{
python3Packages,
fetchPypi,
...
}:
python3Packages.buildPythonPackage rec {
pname = "spandrel";
version = "0.4.0";
pyproject = true;
src = fetchPypi {
inherit pname version;
hash = "sha256-9FUmiT+SOhLvN1QsROREsSCJdlk7x8zfpU/QTHw+gMo=";
};
build-system =
let
inherit (python3Packages) setuptools;
in
[
setuptools
];
dependencies =
let
inherit (python3Packages)
torch
torchvision
safetensors
numpy
einops
typing-extensions
;
in
[
torch
torchvision
safetensors
numpy
einops
typing-extensions
];
doCheck = false;
}

View file

@ -1,41 +0,0 @@
{
"nodes": {
"nixpkgs": {
"locked": {
"lastModified": 1749285348,
"narHash": "sha256-frdhQvPbmDYaScPFiCnfdh3B/Vh81Uuoo0w5TkWmmjU=",
"path": "/nix/store/syvnmj3hhckkbncm94kfkbl76qsdqqj3-source",
"rev": "3e3afe5174c561dee0df6f2c2b2236990146329f",
"type": "path"
},
"original": {
"id": "nixpkgs",
"type": "indirect"
}
},
"root": {
"inputs": {
"nixpkgs": "nixpkgs",
"src": "src"
}
},
"src": {
"flake": false,
"locked": {
"lastModified": 1741050520,
"narHash": "sha256-bTOxv5yZh6wgCs7ADUFKdlXGtlIckkSijGV8G7ToVy4=",
"owner": "MTeaHead",
"repo": "niri-session-manager",
"rev": "e8732380991bd629a7e6c3fb5ea50317084fb1eb",
"type": "github"
},
"original": {
"owner": "MTeaHead",
"repo": "niri-session-manager",
"type": "github"
}
}
},
"root": "root",
"version": 7
}

View file

@ -1,66 +0,0 @@
{
inputs = {
src = {
url = "github:MTeaHead/niri-session-manager";
flake = false;
};
};
outputs =
{
nixpkgs,
src,
self,
}:
{
packages.x86_64-linux.default = nixpkgs.legacyPackages.x86_64-linux.rustPlatform.callPackage (
{ pkgs, buildRustPackage }:
buildRustPackage (finalAttrs: {
pname = "niri-session-manager";
version = "git-${src.rev or src.dirtyRev or "dirty"}";
inherit src;
cargoLock = {
lockFile = "${src}/Cargo.lock";
};
meta.mainProgram = "niri-session-manager";
})
) { };
nixosModules.niri-session-manager =
{
config,
lib,
pkgs,
...
}:
{
options = {
services.niri-session-manager = {
enable = lib.mkEnableOption "Niri Session Manager";
};
};
config =
let
cfg = config.services.niri-session-manager;
in
lib.mkIf cfg.enable {
systemd.user.services.niri-session-manager = {
enable = true;
description = "Niri Session Manager";
wantedBy = [ "graphical-session.target" ];
partOf = [ "graphical-session.target" ];
wants = [ "graphical-session.target" ];
after = [ "graphical-session.target" ];
serviceConfig = {
Type = "simple";
Restart = "always";
ExecStart = "${self.packages.${pkgs.system}.default}";
PrivateTmp = true;
};
};
};
};
};
}

View file

@ -0,0 +1,15 @@
{
pkgs,
lib,
...
}:
{
hm.home.packages = builtins.attrValues {
inherit (pkgs)
avizo
playerctl
;
};
hm.quickServices."avizo-service" = "${lib.getExe' pkgs.avizo "avizo-service"}";
}

119
graphical/binds.nix Normal file
View file

@ -0,0 +1,119 @@
{
pkgs,
lib,
config,
inputs,
...
}:
let
inherit (lib)
range
nameValuePair
mapAttrs'
mergeAttrsList
;
inherit (builtins) listToAttrs replaceStrings;
inherit (config.hm.lib.niri) actions;
hBinds = {
H = "left";
L = "right";
};
vBinds = {
J = "down";
K = "up";
};
makeDirBind =
mods: cmd: keys:
mapAttrs' (
key: dir:
nameValuePair "${mods}+${key}" {
action = actions."${replaceStrings [ "$DIR" ] [ "${dir}" ] "${cmd}"}";
}
) keys;
makeWsBind =
mods: cmd:
listToAttrs (
map (num: {
name = "${mods}+${builtins.toString num}";
value = {
action."${cmd}" = num;
};
}) (range 1 6)
);
tagctl = lib.getExe' inputs.niri-tag.packages.${pkgs.system}.unstable "tagctl";
makeTagBind =
mods: cmd:
listToAttrs (
map (num: {
name = "${mods}+${builtins.toString num}";
value = {
action.spawn = [
tagctl
cmd
(builtins.toString num)
];
};
}) (range 1 6)
);
in
{
hm.programs.niri.settings.binds = mergeAttrsList [
{
"Mod+D".action.spawn = [
"qs"
"ipc"
"call"
"launch"
"toggle"
];
"Mod+F".action.spawn = "firefox";
"Mod+E".action.spawn = "nautilus";
"Mod+Return".action.spawn = "kitty";
"Mod+Shift+E".action.spawn = "wlogout";
"Mod+Equal".action.spawn = "bitwarden";
"Mod+Shift+Q".action = actions.close-window;
"Mod+Shift+S".action = actions.screenshot;
"Mod+R".action = actions.switch-preset-column-width;
"Mod+Shift+R".action = actions.maximize-column;
"XF86AudioRaiseVolume".action.spawn = [
"volumectl"
"-u"
"up"
];
"XF86AudioLowerVolume".action.spawn = [
"volumectl"
"-u"
"down"
];
"XF86AudioMute".action.spawn = [
"volumectl"
"toggle-mute"
];
"XF86AudioStop".action.spawn = [
"playerctl"
"stop"
];
"XF86AudioPlay".action.spawn = [
"playerctl"
"play-pause"
];
"XF86AudioNext".action.spawn = [
"playerctl"
"next"
];
"XF86AudioPrev".action.spawn = [
"playerctl"
"previous"
];
"Mod+Space".action = actions.toggle-window-floating;
}
(makeDirBind "Mod" "focus-window-$DIR" vBinds)
(makeDirBind "Mod" "focus-column-or-monitor-$DIR" hBinds)
(makeDirBind "Mod+Shift" "move-column-$DIR-or-to-monitor-$DIR" hBinds)
(makeDirBind "Mod+Ctrl" "consume-or-expel-window-$DIR" hBinds)
(makeDirBind "Mod+Ctrl" "move-window-$DIR" vBinds)
(makeTagBind "Mod" "toggle-tag")
(makeTagBind "Mod+Shift" "toggle")
(makeTagBind "Mod+Ctrl" "exclusive-tag")
];
}

View file

@ -1,8 +1,12 @@
{ config, ... }:
let
inherit (config) rice;
in
{
rice,
...
}:
{
boot.tmp.useTmpfs = true;
boot.initrd.systemd.enable = true;
boot.loader.limine = {
enable = true;
style =
@ -32,10 +36,5 @@
backdrop = pal.util.bg;
};
maxGenerations = 5;
extraEntries = ''
/Windows
protocol: efi
path: boot():/EFI/Microsoft/Boot/bootmgfw.efi
'';
};
}

View file

@ -21,7 +21,7 @@ let
};
in
{
programs.firefox = {
hm.programs.firefox = {
enable = true;
policies = {

18
graphical/chat.nix Normal file
View file

@ -0,0 +1,18 @@
{ config, pkgs, ... }:
{
hm.programs.firefox.webapps = {
"Microsoft-Teams" = {
url = "https://teams.microsoft.com";
extraSettings = config.hm.programs.firefox.profiles.default.settings;
name = "Microsoft Teams";
icon = ../assets/ms_teams.png;
};
"Facebook-Messenger" = {
url = "https://www.messenger.com";
extraSettings = config.hm.programs.firefox.profiles.default.settings;
name = "Facebook Messenger";
icon = ../assets/fb_msg.png;
};
};
hm.home.packages = [ pkgs.cinny-desktop ];
}

View file

@ -1,18 +1,13 @@
{
pkgs,
lib,
rice,
...
}:
let
getPkgs = builtins.attrValues;
in
{
# imports = [
# ../programs/vscode.nix
# ];
home.packages =
hm.home.packages =
getPkgs {
inherit (pkgs)
direnv
@ -65,48 +60,7 @@ in
})
];
programs.zed-editor = {
enable = false;
extensions = [
"nix"
"rust"
"ocaml"
"kanagawa-themes"
];
userSettings = {
features = {
copilot = false;
};
buffer_font_family = rice.fonts.monospace.name;
buffer_font_size = rice.fonts.monospace.size;
theme = {
mode = "dark";
dark = "Kanagawa Dragon";
};
telemetry = {
metrics = false;
diagnostics = false;
};
vim_mode = true;
assistant = {
default_model = {
provider = "ollama";
model = "llama3.2";
};
inline_alternatives = {
provider = "ollama";
model = "starcoder2:3b";
};
};
language_models = {
ollama = {
api_url = "http://localhost:11434";
};
};
};
};
programs.direnv = {
hm.programs.direnv = {
enable = true;
nix-direnv = {
enable = true;
@ -114,13 +68,10 @@ in
enableFishIntegration = true;
};
programs.git = {
hm.programs.git = {
enable = true;
userName = "atagen";
userEmail = "boss@atagen.co";
extraConfig = {
credential.helper = "rbw";
};
};
}

10
graphical/documents.nix Normal file
View file

@ -0,0 +1,10 @@
{ pkgs, ... }:
{
hm.home.packages = builtins.attrValues {
inherit (pkgs)
libreoffice
thunderbird
obsidian
;
};
}

10
graphical/fm.nix Normal file
View file

@ -0,0 +1,10 @@
{ pkgs, ... }:
{
hm.home.packages = builtins.attrValues {
inherit (pkgs)
file-roller
nautilus
;
};
}

14
graphical/gfx-env.nix Normal file
View file

@ -0,0 +1,14 @@
{
...
}:
{
environment.sessionVariables = {
NIXOS_OZONE_WL = "1";
GBM_BACKEND = "nvidia-drm";
NVD_BACKEND = "direct";
__GLX_VENDOR_LIBRARY_NAME = "nvidia";
LIBVA_DRIVER_NAME = "nvidia";
__GL_GSYNC_ALLOWED = "1";
__GL_VRR_ALLOWED = "1";
};
}

5
graphical/hw.nix Normal file
View file

@ -0,0 +1,5 @@
{ ... }:
{
hardware.enableRedistributableFirmware = true;
hardware.enableAllFirmware = true;
}

6
graphical/input.nix Normal file
View file

@ -0,0 +1,6 @@
{ ... }:
{
services.libinput.enable = true;
console.useXkbConfig = true;
services.xserver.xkb.options = "caps:swapescape";
}

View file

@ -0,0 +1,38 @@
{
pkgs,
...
}:
{
xdg.autostart.enable = true;
xdg.portal.enable = true;
hm.xdg = {
enable = true;
portal =
let
gtk = pkgs.xdg-desktop-portal-gtk;
gnome = pkgs.xdg-desktop-portal-gnome;
in
{
enable = true;
config = {
common = {
default = [
"gnome"
];
};
};
extraPortals = [
gnome
gtk
];
};
};
environment.pathsToLink = [
"/share/xdg-desktop-portal"
"/share/applications"
];
security.polkit.enable = true;
}

11
graphical/kernel.nix Normal file
View file

@ -0,0 +1,11 @@
{ pkgs, inputs, ... }:
{
imports = [
inputs.nyx.nixosModules.default
];
services.scx = {
enable = true;
scheduler = "scx_bpfland";
};
boot.kernelPackages = pkgs.linuxPackages_cachyos;
}

45
graphical/logout.nix Normal file
View file

@ -0,0 +1,45 @@
{
pkgs,
config,
...
}:
let
inherit (config) rice;
pal = rice.palette.hex;
in
{
hm.programs.wlogout = {
enable = true;
package = pkgs.wleave;
layout = builtins.fromJSON (builtins.readFile ./logout/layout);
style =
with pal;
(builtins.replaceStrings
[
"/usr/share/wlogout"
"/etc/wlogout"
"#WINBG"
"#BTNCOL"
"#BTNBG"
"#BTNFOCUSBG"
"#WINLOGO"
]
[
"${pkgs.wlogout}/share/wlogout"
"${pkgs.wlogout}/etc/wlogout"
util.bg
bright.yellow
util.bg
normal.black
(builtins.path {
name = "winlogo";
path = ../assets/winlogo.png;
sha256 = "7c1ff96b553c7a7ca3a7b7cf8efe830ab7feea92355aed288a10ee7347c24108";
})
]
(builtins.readFile ./logout/style.css)
);
};
hm.home.packages = [ pkgs.wleave ];
}

View file

@ -0,0 +1,48 @@
* {
background-image: none;
}
window {
background-color: #WINBG;
}
button {
color: #BTNCOL;
background-color: #BTNBG;
border-style: solid;
border-width: 2px;
background-repeat: no-repeat;
background-position: center;
background-size: 25%;
}
button:focus, button:active, button:hover {
background-color: #BTNFOCUSBG;
outline-style: none;
}
#lock {
background-image: image(url("/usr/share/wlogout/assets/lock.png"), url("/usr/local/share/wlogout/assets/lock.png"));
}
#logout {
background-image: image(url("/usr/share/wlogout/assets/logout.png"), url("/usr/local/share/wlogout/assets/logout.png"));
}
#suspend {
background-image: image(url("/usr/share/wlogout/assets/suspend.png"), url("/usr/local/share/wlogout/assets/suspend.png"));
}
#hibernate {
background-image: image(url("/usr/share/wlogout/assets/hibernate.png"), url("/usr/local/share/wlogout/assets/hibernate.png"));
}
#shutdown {
background-image: image(url("/usr/share/wlogout/assets/shutdown.png"), url("/usr/local/share/wlogout/assets/shutdown.png"));
}
#reboot {
background-image: image(url("/usr/share/wlogout/assets/reboot.png"), url("/usr/local/share/wlogout/assets/reboot.png"));
}
#windows {
background-image: image(url("#WINLOGO"))
}

View file

@ -1,12 +1,11 @@
{ pkgs, ... }:
{
home.packages = builtins.attrValues {
hm.home.packages = builtins.attrValues {
inherit (pkgs)
mpv
imv
resonance
zathura
playerctl
feishin
nicotine-plus
;

15
graphical/network.nix Normal file
View file

@ -0,0 +1,15 @@
{ ... }:
{
networking.networkmanager.enable = true;
systemd.services.NetworkManager-wait-online.enable = true;
services.resolved = {
enable = true;
fallbackDns = [
"103.1.206.179"
"168.138.8.38"
"168.138.12.137"
];
dnssec = "false";
};
services.mullvad-vpn.enable = true;
}

View file

@ -1,6 +1,6 @@
{ pkgs, ... }:
{
programs.rbw = {
hm.programs.rbw = {
enable = true;
settings = {
email = "boss@atagen.co";
@ -8,6 +8,7 @@
base_url = "https://v.atagen.co";
};
};
hm.programs.git.extraConfig.credential.helper = "rbw";
home.packages = [ pkgs.bitwarden ];
hm.home.packages = [ pkgs.bitwarden ];
}

View file

@ -1,17 +1,23 @@
{ pkgs, rice, ... }:
{ pkgs, config, ... }:
let
inherit (config) rice;
in
{
home.packages = [
# for quickshell
qt.enable = true;
hm.home.packages = [
pkgs.gtk-engine-murrine
];
fonts.fontconfig.enable = true;
hm.fonts.fontconfig.enable = true;
qt = {
hm.qt = {
enable = true;
style.name = "adwaita-dark";
platformTheme.name = "adwaita";
};
gtk = {
hm.gtk = {
enable = true;
theme = {
inherit (rice.gtk-theme) package name;

View file

@ -4,27 +4,20 @@
...
}:
{
options = {
ezServices =
config.hm.options = {
quickServices =
with lib;
mkOption {
type = with types; attrsOf str;
default = { };
};
ezOneShots =
quickOneShots =
with lib;
mkOption {
type = with types; attrsOf str;
default = { };
};
ezConf =
with lib;
mkOption {
type = with types; attrsOf path;
default = { };
};
# for specifying an additional systemd target
extraTarget =
with lib;
@ -34,21 +27,21 @@
};
};
config = {
config.hm.config = {
systemd.user.services =
builtins.mapAttrs (name: cmd: {
Unit = {
Description = "${name}";
Requires = [ "graphical-session.target" ] ++ config.extraTarget;
After = [ "graphical-session.target" ] ++ config.extraTarget;
Requires = [ "graphical-session.target" ] ++ config.hm.extraTarget;
After = [ "graphical-session.target" ] ++ config.hm.extraTarget;
};
Service = {
ExecStart = cmd;
};
Install = {
WantedBy = [ "graphical-session.target" ] ++ config.extraTarget;
WantedBy = [ "graphical-session.target" ] ++ config.hm.extraTarget;
};
}) config.ezServices
}) config.hm.quickServices
// builtins.mapAttrs (name: cmd: {
Unit = {
Description = "${name}";
@ -61,11 +54,6 @@
Install = {
WantedBy = [ "graphical-session.target" ] ++ config.extraTarget;
};
}) config.ezOneShots;
xdg.configFile = builtins.mapAttrs (_name: value: {
enable = true;
source = value;
}) config.ezConf;
}) config.hm.quickOneShots;
};
}

106
graphical/rice.nix Normal file
View file

@ -0,0 +1,106 @@
{
pkgs,
userPkgs,
config,
inputs,
...
}:
{
hm.home.packages =
let
inherit (config.rice) icons fonts cursor;
in
fonts.pkgs
++ icons.pkgs
++ [
cursor.package
];
rice = {
fonts =
let
sans = {
name = "Inria Sans";
size = 12;
package = pkgs.inriafonts;
};
serif = {
name = "Inria Serif";
size = 12;
package = pkgs.inriafonts;
};
monospace = {
name = "Fira Code";
size = 10;
package = pkgs.fira-code;
};
emoji = {
name = "Twitter Color Emoji";
size = 12;
package = pkgs.twemoji-color-font;
};
in
{
inherit
sans
serif
monospace
emoji
;
pkgs = [
sans.package
serif.package
monospace.package
emoji.package
pkgs.meslo-lgs-nf
];
};
icons =
let
package = pkgs.papirus-icon-theme;
in
{
inherit package;
name = "Papirus-Dark";
pkgs = [
package
];
};
gtk-theme = {
name = "nix-rice";
package = pkgs.callPackage userPkgs.gtk-theme { palette = config.rice.palette.shortHex; };
};
borders = {
thickness = 6;
rounding = 0;
gaps_in = 32;
gaps_out = 72;
};
bg = {
src = builtins.path {
name = "wallpaper.jpg";
path = ./rice/wallpaper.jpg;
sha256 = "2db3f9d0397fbd4746ada297bd14c0c7d3e22c7d4e894968fcfece90bbfb902a";
};
};
cursor = {
package = pkgs.afterglow-cursors-recolored.override {
themeVariants = [ "Dracula" ];
draculaColorVariants = [ "Orange" ];
};
name = "Afterglow-Recolored-Dracula-Orange";
};
plymouth = {
theme = "starship";
font = "${config.rice.fonts.sans.package}/share/fonts/truetype/InriaSans-Regular.ttf";
themePackages = [
inputs.hudcore.packages.${pkgs.system}.default
];
};
};
}

View file

Before

Width:  |  Height:  |  Size: 2.7 MiB

After

Width:  |  Height:  |  Size: 2.7 MiB

Before After
Before After

76
graphical/shell.nix Normal file
View file

@ -0,0 +1,76 @@
{
pkgs,
lib,
inputs,
mainUser,
config,
...
}:
let
inherit (lib) getExe getExe';
inherit (config) rice;
in
{
# quickshell stuff
environment.systemPackages =
builtins.attrValues {
inherit (pkgs.kdePackages) qtbase qtdeclarative;
inherit (pkgs) wl-clipboard;
}
++ [
(inputs.quickshell.packages.${pkgs.system}.default.override {
withHyprland = false;
withI3 = false;
})
];
hm.systemd.user.services.quickshell = {
Unit.PartOf = [ "graphical-session.target" ];
Unit.After = [
"graphical-session.target"
"niri.service"
];
Install.WantedBy = [ "graphical-session.target" ];
Service = {
ExecStart = "${getExe' (inputs.quickshell.packages.${pkgs.system}.default.override {
withHyprland = false;
withI3 = false;
}) "qs"}";
};
};
hm.quickServices = {
"swaync" = "${getExe pkgs.swaynotificationcenter}";
"swaybg" = "${getExe pkgs.swaybg} -m fill -i ${rice.bg.src}";
"swayidle" =
let
niri = inputs.niri.packages.${pkgs.system}.niri-unstable;
systemctl = getExe' pkgs.systemd "systemctl";
in
''
${lib.getExe pkgs.swayidle} -w \
timeout 1800 '${systemctl} suspend' \
timeout 600 '${niri} msg action power-off-monitors'
'';
};
hm.systemd.user.targets.tray = {
Unit = {
Description = "Home Manager System Tray";
Requires = [ "graphical-session.target" ];
};
};
imports = [ inputs.arbys.nixosModules.arbys ];
environment = {
arbys = {
enable = true;
clobber = true;
};
files."/home/${mainUser}/.config/quickshell" = {
source = "/home/${mainUser}/.nix/graphical/shell/quickshell";
uid = 1000;
gid = 100;
};
};
}

View file

@ -0,0 +1,133 @@
pragma ComponentBehavior: Bound
import QtQuick
Rectangle {
id: base
anchors {
fill: parent
margins: 2
}
color: colours[0]
required property string format
required property var colours
property var clock: genClock(format)
property var date: new Date()
property string time: date.toLocaleString(Qt.locale())
property int cols: getColSum(clock)
property real colWidth: (base.width - topgrid.spacing - base.anchors.margins) / cols
property var keys: {
"a": [(date.getHours() > 11) | 0, -1],
"H": [-1].concat(binarise(date.getHours(), 5)),
"h": binarise(date.getHours() % 12, 4),
"m": binarise(date.getMinutes(), 6),
"s": binarise(date.getSeconds(), 6)
}
function genClock(format) {
return format.split('').map(k => keys[k]);
}
function getColSum(clock) {
return clock.map(x => Math.ceil(x.length / 2)).reduce((acc, el) => acc + el);
}
function binarise(n, p) {
return n.toString(2) // to base-2 string
.padStart(p, 0) // zero pad
.split('') // split to array
.slice(-p) // take only desired bits, lsb first
.map(x => parseInt(x)); // map to int
}
Grid {
id: topgrid
rows: 1
columns: base.clock.length
spacing: 2
anchors.fill: parent
Repeater {
model: base.clock.length
Grid {
id: inner
required property int index
property var bits: base.clock[index]
property int cols: bits.length / 2
width: base.colWidth * cols
height: base.height
rows: 2
columns: cols
spacing: 1
function calcBitSize() {
let cell = inner.width - inner.spacing * 2;
let def = (cell / inner.cols);
return (def > inner.height / 2) ? inner.height / 2 : def;
}
Repeater {
model: inner.bits.length
Rectangle {
required property int index
height: inner.calcBitSize()
width: height
color: "transparent"
Rectangle {
property int bit: inner.bits[parent.index]
property string on: base.colours[1]
property string off: base.colours[0]
anchors {
horizontalCenter: parent.horizontalCenter
verticalCenter: parent.verticalCenter
}
height: parent.height
width: parent.width
border.width: 1
border.color: bit == -1 ? off : on
color: (bit == -1 || !bit) ? off : on
Behavior on color {
ColorAnimation {
duration: 150
}
}
radius: height
//
// height: bit ? parent.height / 3 * 2 : parent.height
// Behavior on height {
// NumberAnimation {
// duration: 50
// }
// }
// width: bit ? 1 : height
// Behavior on width {
// NumberAnimation {
// duration: 50
// }
// }
// radius: bit ? 0 : height
// Behavior on radius {
// NumberAnimation {
// duration: 50
// }
// }
}
}
}
}
}
Timer {
interval: 1000
running: true
repeat: true
onTriggered: {
base.date = new Date();
}
}
}
}

View file

@ -0,0 +1,222 @@
pragma ComponentBehavior: Bound
import QtQuick
import QtQuick.Controls
import QtQuick.Layouts
import Quickshell
import Quickshell.Wayland
import Quickshell.Widgets
import Quickshell.Io
Singleton {
id: topLevel
required property real width
Timer {
id: closeTimer
interval: 400
running: false
repeat: false
onTriggered: launcherData.active = false
}
PersistentProperties {
id: launcherData
property bool open: false
property bool active: false
property real curWidth: 0
onOpenChanged: {
if (open) {
curWidth = topLevel.width;
launcherData.active = true;
} else {
curWidth = 0;
closeTimer.start();
}
}
Behavior on curWidth {
NumberAnimation {
duration: 400
easing.type: Easing.InOutQuad
}
}
}
IpcHandler {
target: "launch"
function open(): void {
launcherData.open = true;
}
function close(): void {
launcherData.open = false;
}
function toggle(): void {
launcherData.open = !launcherData.open;
}
}
LazyLoader {
id: loader
activeAsync: launcherData.active
PanelWindow {
id: launcherBase
anchors {
top: true
bottom: true
right: true
}
color: "transparent"
implicitWidth: topLevel.width
WlrLayershell.layer: WlrLayer.Overlay
focusable: true
exclusionMode: ExclusionMode.Ignore
WlrLayershell.namespace: "shell:launcher"
WlrLayershell.keyboardFocus: WlrKeyboardFocus.Exclusive
// launcherData.curWidth
Rectangle {
color: "#ffab5b"
anchors {
fill: parent
topMargin: parent.height / 3
bottomMargin: anchors.topMargin
leftMargin: topLevel.width - launcherData.curWidth
}
bottomLeftRadius: 10
// topLeftRadius: 10
Rectangle {
color: "#272a2a"
anchors {
fill: parent
topMargin: 3
bottomMargin: 3
leftMargin: 3
}
bottomLeftRadius: 10
// topLeftRadius: 10
// implicitWidth: topLevel.width
TextField {
id: searchField
anchors {
top: parent.top
left: parent.left
right: parent.right
topMargin: 10
leftMargin: 10
}
font {
family: "Inria Sans"
pointSize: 12
}
color: "#202e2f"
height: 24
background: Rectangle {
color: "#caccce"
radius: 5
}
focus: true
Keys.forwardTo: [list]
Keys.onEscapePressed: launcherData.open = false
onAccepted: {
if (list.currentItem) {
list.currentItem.clicked(null);
}
}
}
Rectangle {
id: emptyScrollbar
anchors {
left: parent.left
top: searchField.bottom
bottom: list.bottom
topMargin: 6
bottomMargin: 4
leftMargin: 4
}
color: "#3a5299ff"
width: 3
radius: 10
}
ListView {
id: list
anchors {
left: parent.left
right: parent.right
bottom: parent.bottom
top: searchField.bottom
topMargin: 4
leftMargin: 12
bottomMargin: 12
}
clip: true
cacheBuffer: 0
model: ScriptModel {
values: DesktopEntries.applications.values.map(x => x).filter(entry => {
const search = searchField.text.toLowerCase();
const name = entry.name.toLowerCase();
return search.length ? name.indexOf(search) > -1 : true;
})
}
onModelChanged: list.currentIndex = 0
highlight: Rectangle {
anchors {
left: parent.left
right: parent.right
}
color: "#7f5299ff"
border.color: "#928cc9"
border.width: 2
}
spacing: 0
delegate: MouseArea {
id: clickableEntry
required property DesktopEntry modelData
onClicked: {
modelData.execute();
launcherData.open = false;
}
implicitHeight: 24
implicitWidth: ListView.view.width
RowLayout {
id: rowEntry
anchors {
left: parent.left
leftMargin: 4
verticalCenter: parent.verticalCenter
}
IconImage {
asynchronous: true
implicitSize: 18
source: Quickshell.iconPath(clickableEntry.modelData.icon)
}
Text {
font {
family: "Inria Sans"
pointSize: 12
}
color: "#ffab5b"
text: clickableEntry.modelData.name
Layout.alignment: Qt.AlignBottom
}
}
}
}
}
}
}
}
}

View file

@ -0,0 +1,18 @@
pragma Singleton
import Quickshell
import Quickshell.Services.Notifications
Singleton {
NotificationServer {
id: notifications
actionsSupported: true
bodyHyperlinksSupported: true
// bodyImagesSupported: true
bodyMarkupSupported: true
imageSupported: true
onNotification: noti => {
}
}
}

View file

@ -0,0 +1,84 @@
import Quickshell
import QtQuick
import QtQuick.Particles
PanelWindow {
id: particleRoot
anchors {
top: true
bottom: true
left: true
right: true
}
color: "transparent"
exclusionMode: ExclusionMode.Ignore
screen: Quickshell.screens.find(s => s.name == "DP-1")
property var mousePos: [width/2, height/2]
MouseArea {
id: mouse
anchors.fill: parent
hoverEnabled: true
onPositionChanged: {
particleRoot.mousePos = [mouse.x, mouse.y];
}
}
ParticleSystem {
id: sys
running: true
anchors.fill: parent
ItemParticle {
system: sys
delegate: Component {
Rectangle {
color: "black"
width: 7
height: width
radius: width
Rectangle {
color: "white"
width: 5
height: width
radius: width
}
}
}
}
Emitter {
system: sys
// x: particleRoot.mousePos[0]-10
// y: particleRoot.mousePos[1]-10
x: particleRoot.width/2
y: particleRoot.height/2
height: 60
width: 60
emitRate: 200
lifeSpan: 3000
startTime: 0
velocity: CumulativeDirection {
AngleDirection {
angle: 0
angleVariation: 360
magnitude: 10
magnitudeVariation: 0.2
}
}
}
Attractor {
pointX: particleRoot.mousePos[0]
pointY: particleRoot.mousePos[1]
strength: 200
affectedParameter: Attractor.Position
proportionalToDistance: Attractor.InverseLinear
}
}
}

View file

@ -0,0 +1,34 @@
pragma Singleton
import Quickshell
Singleton {
property var c: {
"bg": "#1b2021",
"fg": "#cecbca",
"black": "#272a2a",
"black_b": "#202e2f",
"red": "#c43325",
"red_b": "#c46056",
"green": "#8cc992",
"green_b": "#c2dab0",
"yellow": "#ffb852",
"yellow_b": "#ffab5b",
"blue": "#5299ff",
"blue_b": "#92beff",
"magenta": "#645ac9",
"magenta_b": "#928cc9",
"cyan": "#5abfc9",
"cyan_b": "#8cc4c9",
"white": "#b0c2da",
"white_b": "#caccce",
}
}

View file

@ -0,0 +1,212 @@
// components
import "bink" as Bink
import "launcher" as Launcher
// singletons
import "title"
import "tags"
import "rice"
import Quickshell
import Quickshell.Wayland
import QtQuick
import QtQuick.Controls
ShellRoot {
// rhs main
Variants {
model: Quickshell.screens.filter(s => s.name == "DP-2")
delegate: PanelWindow {
id: bink
property var modelData
anchors {
top: true
right: true
}
implicitHeight: 22
implicitWidth: 115
color: "transparent"
Rectangle {
anchors.fill: parent
bottomLeftRadius: 10
color: Colours.c.black
}
Rectangle {
anchors {
leftMargin: 8
bottomMargin: 3
fill: parent
}
color: Colours.c.black
bottomLeftRadius: 10
Bink.Bink {
format: "ahms"
colours: ["transparent", Colours.c.yellow_b]
}
}
exclusionMode: ExclusionMode.Ignore
WlrLayershell.layer: WlrLayer.Top
screen: modelData
}
}
// centre main
Variants {
model: Quickshell.screens.filter(s => s.name == "DP-2")
delegate: PanelWindow {
id: windowTitle
property var modelData
anchors {
top: true
}
TextMetrics {
id: textInfo
font {
family: "Inria Sans"
pointSize: 12
}
elideWidth: 550
elide: Qt.ElideMiddle
text: Title.currentWindow
}
implicitHeight: textInfo.height + 6
implicitWidth: (textInfo.width > textInfo.elideWidth ? textInfo.elideWidth : textInfo.width) + 24
Behavior on implicitWidth {
NumberAnimation {
duration: 150
easing.type: Easing.InOutQuad
}
}
color: "transparent"
Rectangle {
anchors {
fill: parent
}
color: Colours.c.black
bottomLeftRadius: 10
bottomRightRadius: 10
Rectangle {
anchors {
fill: parent
leftMargin: 12
rightMargin: 12
topMargin: 4
}
color: "transparent"
Text {
font {
family: "Inria Sans"
pointSize: 12
}
color: Colours.c.yellow_b
text: textInfo.elidedText
}
}
}
exclusionMode: ExclusionMode.Ignore
WlrLayershell.layer: WlrLayer.Top
screen: modelData
}
}
// bottom middle main
Variants {
model: Quickshell.screens.filter(s => s.name == "DP-2")
delegate: PanelWindow {
id: tags
property var modelData
anchors {
bottom: true
}
implicitHeight: 22
implicitWidth: Tags.keys.length * 13 + 24
// implicitWidth:.width + 24
color: "transparent"
Rectangle {
anchors {
fill: parent
}
color: Colours.c.black
topLeftRadius: 10
topRightRadius: 10
Rectangle {
anchors {
fill: parent
leftMargin: 12
rightMargin: 12
topMargin: 3
}
Row {
anchors {
fill: parent
}
spacing: 1
Repeater {
model: Tags.keys
delegate: Column {
id: baseCol
required property var modelData
spacing: 3
Rectangle {
property var tag: Tags.tags[baseCol.modelData]
width: 12
height: width
radius: width
color: tag.urgent ? Colours.c.red_b : (tag.enabled) ? Colours.c.yellow_b : Colours.c.black
Behavior on color {
ColorAnimation {
duration: 300
}
}
border {
width: 1
color: tag.urgent ? Colours.c.red_b : Colours.c.yellow_b
Behavior on color {
ColorAnimation {
duration: 300
}
}
}
}
Rectangle {
property var tag: Tags.tags[baseCol.modelData]
anchors.horizontalCenter: parent.horizontalCenter
width: 1
height: 1
color: tag.urgent ? Colours.c.red_b : (tag.occupied) ? Colours.c.yellow_b : Colours.c.black
Behavior on color {
ColorAnimation {
duration: 300
}
}
}
}
}
}
color: "transparent"
} // inner container
}// outer visible rect
exclusionMode: ExclusionMode.Ignore
WlrLayershell.layer: WlrLayer.Top
screen: modelData
}//invisible rect
}
// pops up on current monitor
Launcher.Launcher {
width: 190
}
}

View file

@ -0,0 +1,80 @@
pragma Singleton
import QtQuick
import Quickshell
import Quickshell.Io
Singleton {
id: data
property var tags: {}
property var keys: []
Timer {
id: reconnectTimer
running: false
repeat: true
onTriggered: () => sock.connected = true
interval: 5000
}
Socket {
id: sock
connected: true
onConnectionStateChanged: () => {
reconnectTimer.running = sock.connected ? false : true
if (!sock.connected) {
data.tags = {}
data.keys = []
}
}
path: Quickshell.env("XDG_RUNTIME_DIR") + "/niri-tag-events.sock"
parser: SplitParser {
onRead: tag_data => {
let event = JSON.parse(tag_data);
let ensure = (d, t) => {
if (!d[t]) {
d[t] = {
occupied: false,
urgent: false,
enabled: false,
id: t
};
}
return d;
};
if (event.TagEmpty) {
data.tags = ensure(data.tags, event.TagEmpty);
data.tags[event.TagEmpty].occupied = false;
} else if (event.TagOccupied) {
data.tags = ensure(data.tags, event.TagOccupied);
data.tags[event.TagOccupied].occupied = true;
} else if (event.TagUrgent) {
data.tags = ensure(data.tags, event.TagUrgent);
data.tags[event.TagUrgent].urgent = true;
} else if (event.TagEnabled) {
data.tags = ensure(data.tags, event.TagEnabled);
data.tags[event.TagEnabled].enabled = true;
} else if (event.TagDisabled) {
data.tags = ensure(data.tags, event.TagDisabled);
data.tags[event.TagDisabled].enabled = false;
} else if (event.TagExclusive) {
data.tags = ensure(data.tags, event.TagExclusive);
for (const [k] of Object.keys(data.tags)) {
data.tags[k].enabled = false;
}
data.tags[event.TagExclusive].enabled = true;
} else if (event.TagFullState) {
data["tags"] = event.TagFullState;
for (const [k, v] of Object.entries(data.tags)) {
data.tags[k].id = k;
}
}
data.keys = Object.keys(data.tags);
data.tagsChanged();
data.keysChanged();
}
}
}
}

View file

@ -0,0 +1,52 @@
pragma Singleton
import QtQuick
import Quickshell
import Quickshell.Io
Singleton {
id: data
property var currentWindow: " "
property var currentId: 0
property var windows: {}
Process {
id: proc
command: ["niri", "msg", "-j", "event-stream"]
running: true
stdout: SplitParser {
onRead: niri_data => {
var event = JSON.parse(niri_data);
if (event.WindowsChanged) {
let new_data = event.WindowsChanged.windows.reduce((acc, el) => {
acc[el.id] = el.title == "" ? el.app_id : el.title;
return acc;
}, {});
data.windows = new_data;
let focused = event.WindowsChanged.windows.find(w => w.is_focused);
if (focused === undefined) {
data.currentId = 0;
}
} else if (event.WindowOpenedOrChanged) {
let target = event.WindowOpenedOrChanged.window;
data.windows[target.id] = target.title == "" ? target.app_id : target.title;
if (target.is_focused) {
data.currentId = target.id;
}
} else if (event.WindowClosed) {
delete data[event.WindowClosed.id];
if (Object.keys(data).length == 0) {
data.currentId = 0;
}
} else if (event.WindowFocusChanged) {
if (event.WindowFocusChanged.id === null) {
data.currentId = 0;
} else {
data.currentId = event.WindowFocusChanged.id;
}
}
data.currentWindow = data.currentId == 0 ? " " : data.windows[data.currentId];
}
}
}
}

41
graphical/terminal.nix Normal file
View file

@ -0,0 +1,41 @@
{ config, ... }:
{
hm.programs.kitty =
let
inherit (config) rice;
in
{
enable = true;
font = {
inherit (rice.fonts.monospace) name size;
};
settings = with rice.palette.hex; {
foreground = util.fg;
background = util.bg;
inherit (util) cursor;
cursor_text = util.bg;
selection_foreground = util.fg_sel;
selection_background = util.bg_sel;
color0 = normal.black;
color1 = normal.red;
color2 = normal.green;
color3 = normal.yellow;
color4 = normal.blue;
color5 = normal.magenta;
color6 = normal.cyan;
color7 = normal.white;
color8 = bright.black;
color9 = bright.red;
color10 = bright.green;
color11 = bright.yellow;
color12 = bright.blue;
color13 = bright.magenta;
color14 = bright.cyan;
color15 = bright.white;
sync_to_monitor = "yes";
shell = "fish";
cursor_trail = 100;
};
};
}

17
graphical/udisks.nix Normal file
View file

@ -0,0 +1,17 @@
{ lib, pkgs, ... }:
{
services.udisks2.enable = true;
hm.services.udiskie.enable = true;
# fix reliance on nonexistent graphical-session-pre.target
hm.systemd.user.services.udiskie = lib.mkForce {
Unit = {
Description = "udiskie mount daemon";
After = [ ];
PartOf = [ "graphical-session.target" ];
};
Service.ExecStart = [ "${pkgs.udiskie}/bin/udiskie --appindicator" ];
Install.WantedBy = [ "graphical-session.target" ];
};
}

14
graphical/webapps.nix Normal file
View file

@ -0,0 +1,14 @@
{ config, ... }:
{
imports = [
./webapps/firefox-webapp.nix
];
hm.programs.firefox.webapps = {
"Open-WebUI" = {
url = "http://127.0.0.1:8088";
extraSettings = config.hm.programs.firefox.profiles.default.settings;
name = "Open-WebUI";
icon = ../assets/openwebui.png;
};
};
}

View file

@ -96,7 +96,7 @@ let
) cfg;
in
{
options.programs.firefox.webapps = mkOption {
config.hm.options.programs.firefox.webapps = mkOption {
default = { };
type =
@ -210,8 +210,8 @@ in
description = "Websites to create special site-specific Firefox instances for.";
};
config = {
programs.firefox.profiles = make-app-profiles (enumerate config.programs.firefox.webapps);
config.hm.config = {
programs.firefox.profiles = make-app-profiles (enumerate config.hm.programs.firefox.webapps);
xdg.desktopEntries = mapAttrs (name: cfg: {
inherit (cfg)
@ -235,7 +235,7 @@ in
exec = concatStringsSep " " (
[
"${getExe config.programs.firefox.package}"
"${getExe config.hm.programs.firefox.package}"
"--name"
"${name}"
"--app-id"
@ -243,7 +243,7 @@ in
"--class"
"${name}"
"-P"
"${config.programs.firefox.profiles."home-manager-webapp-${name}".path}"
"${config.hm.programs.firefox.profiles."home-manager-webapp-${name}".path}"
"--no-remote"
]
++ cfg.extraArgs
@ -255,6 +255,6 @@ in
StartupWMClass = "${name}";
NoDisplay = lib.boolToString cfg.hidden;
};
}) config.programs.firefox.webapps;
}) config.hm.programs.firefox.webapps;
};
}

View file

@ -29,7 +29,7 @@ let
nameValuePair "${name}-client" {
inherit (cfg) name;
url = "http://127.0.0.1:${builtins.toString cfg.port}";
extraSettings = config.programs.firefox.profiles.default.settings;
extraSettings = config.hm.programs.firefox.profiles.default.settings;
hidden = true;
}
) cfg;
@ -168,10 +168,10 @@ let
''
}";
}) cfg;
cfg = config.localWebApps;
cfg = config.hm.localWebApps;
in
{
options.localWebApps = mkOption {
config.hm.options.localWebApps = mkOption {
default = { };
type =
with lib.types;
@ -240,7 +240,7 @@ in
});
};
config = {
config.hm.config = {
programs.firefox.webapps = make-firefox cfg;
systemd.user.targets = make-systemd-target cfg;

88
graphical/wm.nix Normal file
View file

@ -0,0 +1,88 @@
{
pkgs,
mainUser,
inputs,
config,
...
}:
let
inherit (config) rice;
in
{
imports = [
inputs.niri.nixosModules.niri
inputs.niri-tag.nixosModules.niri-tag
];
hm.programs.niri.settings = {
input = {
warp-mouse-to-focus.enable = true;
};
cursor = {
hide-after-inactive-ms = 5000;
hide-when-typing = true;
size = 16;
theme = rice.cursor.name;
};
layout = {
always-center-single-column = true;
gaps = 24;
default-column-width.proportion = 0.5;
preset-column-widths = map (p: { proportion = p; }) [
(2.0 / 3.0)
0.5
(1.0 / 3.0)
];
focus-ring =
let
pal = rice.palette.hex;
in
{
active = {
color = pal.bright.yellow;
};
inactive = {
color = pal.normal.black;
};
};
};
prefer-no-csd = true;
hotkey-overlay.skip-at-startup = true;
window-rules =
let
v = 10.0;
in
[
{
geometry-corner-radius = {
bottom-left = v;
bottom-right = 0.0;
top-left = 0.0;
top-right = v;
};
clip-to-geometry = true;
}
];
};
services.greetd = {
enable = true;
restart = false;
settings =
let
session = {
command = "niri-session";
user = "${mainUser}";
};
in
{
default_session = session;
initial_session = session;
};
};
programs.niri = {
enable = true;
package = inputs.niri.packages.${pkgs.system}.niri-unstable;
};
services.niri-tag.enable = true;
}

View file

@ -1,10 +0,0 @@
{
...
}:
{
imports = [
./home.nix
];
}

View file

@ -1,37 +0,0 @@
! special
*.foreground: #d3dae3
*.background: #181b28
*.cursorColor: #d3dae3
! black
*.color0: #2f343f
*.color8: #1e2233
! red
*.color1: #ed244e
*.color9: #da4453
! green
*.color2: #27ae60
*.color10: #71f79f
! yellow
*.color3: #f67400
*.color11: #fdbc4b
! blue
*.color4: #2980b9
*.color12: #1d99f3
! magenta
*.color5: #c50ed2
*.color13: #9b59b6
! cyan
*.color6: #3daee9
*.color14: #5294e2
! white
*.color7: #a1a9b1
*.color15: #656a73

View file

@ -1,48 +0,0 @@
* {
background-image: none;
}
window {
background-color: #WINBG;
}
button {
color: #BTNCOL;
background-color: #BTNBG;
border-style: solid;
border-width: 2px;
background-repeat: no-repeat;
background-position: center;
background-size: 25%;
}
button:focus, button:active, button:hover {
background-color: #BTNFOCUSBG;
outline-style: none;
}
#lock {
background-image: image(url("/usr/share/wlogout/icons/lock.png"), url("/usr/local/share/wlogout/icons/lock.png"));
}
#logout {
background-image: image(url("/usr/share/wlogout/icons/logout.png"), url("/usr/local/share/wlogout/icons/logout.png"));
}
#suspend {
background-image: image(url("/usr/share/wlogout/icons/suspend.png"), url("/usr/local/share/wlogout/icons/suspend.png"));
}
#hibernate {
background-image: image(url("/usr/share/wlogout/icons/hibernate.png"), url("/usr/local/share/wlogout/icons/hibernate.png"));
}
#shutdown {
background-image: image(url("/usr/share/wlogout/icons/shutdown.png"), url("/usr/local/share/wlogout/icons/shutdown.png"));
}
#reboot {
background-image: image(url("/usr/share/wlogout/icons/reboot.png"), url("/usr/local/share/wlogout/icons/reboot.png"));
}
#windows {
background-image: image(url("#WINLOGO"))
}

View file

@ -1,44 +0,0 @@
[[ ! -f ~/.p10k.zsh ]] || source ~/.p10k.zsh
la_culr()
{
eza -lha --group-directories-first --icons --color=always $@ | culr -t 80 -o roygbiv-split
}
ls_culr()
{
eza -lh --group-directories-first --icons --color=always $@ | culr -t 80 -o roygbiv-split
}
ps_culr()
{
ps ww$@ | culr -t 80 -o roygbiv-split
}
alias ...='cd ../..'
alias ....='cd ../../..'
alias .....='cd ../../../..'
alias fresh='clear; echo; ~/.nix/header.sh'
alias icat='kitty +kitten icat'
alias chmox='chmod +x'
alias gs='git status'
alias gcl='git clone'
alias ga='git add'
alias gcb='git checkout -b'
alias gco='git checkout'
alias gl='git pull'
alias gp='git push'
alias gd='git diff'
alias gcam='git commit -am'
alias gcm='git commit -m'
alias gr='git restore'
alias gm='git merge'
alias l='ls_culr'
alias la='la_culr'
alias p='ps_culr'
alias mnt='mount | column -t | culr -t 80 -o roygbiv-split'
alias zz='z $(xplr)'
# alias kaboom='printf "type any input if you wish to update\n\npress enter to continue\n"; read upgrade; if [ -n "$upgrade" ]; then echo upgrading..; sudo nix-channel --update; else echo no upgrade!; fi; sudo nixos-rebuild switch -j9 && rm ~/.gtkrc-2.0; home-manager switch && sudo nix-collect-garbage && nix-store --optimise'
eval "$(zoxide init zsh)"
fresh

View file

@ -1,100 +0,0 @@
{
inputs,
lib,
pkgs,
rice,
...
}:
{
home.stateVersion = "22.11";
imports = [
./modules/cli.nix
./modules/desktop.nix
./modules/dev.nix
./modules/theming.nix
./modules/niri.nix
./util/ez.nix
./util/name.nix
inputs.nix-index-database.hmModules.nix-index
];
nix.gc = {
automatic = true;
frequency = "daily";
options = "--delete-older-than 14d";
};
xdg = {
enable = true;
portal =
let
gtk = pkgs.xdg-desktop-portal-gtk;
gnome = pkgs.xdg-desktop-portal-gnome;
in
{
enable = true;
config = {
common = {
default = [
"gnome"
];
};
};
extraPortals = [
gnome
gtk
];
};
};
home.packages =
let
inherit (rice) icons fonts cursor;
in
fonts.pkgs
++ icons.pkgs
++ [
cursor.package
pkgs.tauon
];
systemd.user.targets.tray = {
Unit = {
Description = "Home Manager System Tray";
Requires = [ "graphical-session.target" ];
};
};
services.syncthing = {
enable = true;
};
services.udiskie.enable = true;
# fix reliance on nonexistent graphical-session-pre.target
systemd.user.services.udiskie = lib.mkForce {
Unit = {
Description = "udiskie mount daemon";
After = [ ];
PartOf = [ "graphical-session.target" ];
};
Service.ExecStart = [ "${pkgs.udiskie}/bin/udiskie --appindicator" ];
Install.WantedBy = [ "graphical-session.target" ];
};
# programs.nix-index-database.comma.enable = true;
# programs.nix-index = {
# enable = true;
# enableZshIntegration = false;
# enableBashIntegration = false;
# };
# programs.command-not-found.enable = false;
# programs.nix-index.enable = true;
systemd.user.startServices = "sd-switch";
ezServices = {
ckb-next = "${lib.getExe pkgs.ckb-next} -c -b";
};
}

View file

@ -1,33 +0,0 @@
{
lib,
fetchFromGitea,
rustPlatform,
libX11,
pkg-config,
}:
rustPlatform.buildRustPackage rec {
pname = "culr";
version = "0.1.0";
src = fetchFromGitea {
domain = "git.atagen.co";
owner = "atagen";
repo = pname;
rev = "8cb1323bdc388ce1fdb0675ade756ea8b59b803d";
sha256 = "sha256-Blo1PyhzKU4LzflmeGrvWOQEon2BCTkF3uQR+7D5/kc=";
};
nativeBuildInputs = [ pkg-config ];
buildInputs = [ libX11 ];
cargoSha256 = "sha256-d8MshgH3EppKR80fULU5kraJzrkG57KApzcJM2muvIE=";
meta = with lib; {
description = "colourise piped input";
homepage = "https://git.atagen.co/atagen/culr";
license = licenses.mit;
maintainers = [ ];
};
}

Binary file not shown.

Before

Width:  |  Height:  |  Size: 86 KiB

View file

@ -1,23 +0,0 @@
{ config, pkgs, ... }:
{
imports = [
../util/firefox-webapp.nix
];
programs.firefox.webapps = {
"Microsoft-Teams" = {
url = "https://teams.microsoft.com";
# id = 1;
extraSettings = config.programs.firefox.profiles.default.settings;
name = "Microsoft Teams";
icon = ../icons/ms_teams.png;
};
"Facebook-Messenger" = {
url = "https://www.messenger.com";
# id = 2;
extraSettings = config.programs.firefox.profiles.default.settings;
name = "Facebook Messenger";
icon = ../icons/fb_msg.png;
};
};
home.packages = [ pkgs.cinny-desktop ];
}

View file

@ -1,22 +0,0 @@
{ pkgs, ... }:
{
imports = [
../programs/kitty.nix
# ../programs/zsh.nix
# ../programs/xresources.nix
../programs/helix.nix
# ../programs/atuin.nix
];
home.packages = builtins.attrValues {
inherit (pkgs)
btop-cuda
bat
ripgrep
fd
lazygit
zoxide
zellij
ouch
;
};
}

View file

@ -1,10 +0,0 @@
_: {
# imports = [
# ../util/flatpak.nix
# ];
# flatpaks = [
# "ar.com.tuxguitar.TuxGuitar"
# "org.inkscape.Inkscape"
# "com.github.PintaProject.Pinta"
# ];
}

View file

@ -1,20 +0,0 @@
{ pkgs, ... }:
{
imports = [
./media-players.nix
./webapps.nix
./documents.nix
# ./creative.nix
./chat.nix
../programs/firefox.nix
../programs/wlogout.nix
../programs/bitwarden.nix
];
home.packages = builtins.attrValues {
inherit (pkgs)
file-roller
nautilus
thunderbird
;
};
}

View file

@ -1,6 +0,0 @@
{ pkgs, ... }:
{
home.packages = [
pkgs.libreoffice
];
}

View file

@ -1,288 +0,0 @@
{
pkgs,
lib,
config,
rice,
inputs,
...
}:
let
services =
let
inherit (pkgs) swaynotificationcenter;
in
[
swaynotificationcenter
];
errata =
let
inherit (pkgs) avizo playerctl;
in
[
avizo
playerctl
];
extraServices =
let
inherit (pkgs)
swayidle
swaybg
systemd
avizo
;
inherit (inputs.niri.packages.x86_64-linux) niri-unstable;
in
[
{
name = "swaybg";
value = "${lib.getExe swaybg} -m fill -i ${rice.bg.src}";
}
{
name = "avizo-service";
value = "${lib.getExe' avizo "avizo-service"}";
}
{
name = "swayidle";
value =
let
niri = lib.getExe niri-unstable;
systemctl = lib.getExe' systemd "systemctl";
in
''
${lib.getExe swayidle} -w \
timeout 1800 '${systemctl} suspend' \
timeout 600 '${niri} msg action power-off-monitors'
'';
}
];
in
{
home.packages = errata;
ezServices = builtins.listToAttrs (
(map (entry: {
name = "${lib.strings.toLower entry.pname}";
value = "${lib.getExe entry}";
}) services)
++ extraServices
);
programs.niri.settings =
let
inherit (lib)
range
nameValuePair
mapAttrs'
mergeAttrsList
;
inherit (builtins) listToAttrs replaceStrings;
inherit (config.lib.niri) actions;
in
{
binds =
let
hBinds = {
H = "left";
L = "right";
};
vBinds = {
J = "down";
K = "up";
};
makeDirBind =
mods: cmd: keys:
mapAttrs' (
key: dir:
nameValuePair "${mods}+${key}" {
action = actions."${replaceStrings [ "$DIR" ] [ "${dir}" ] "${cmd}"}";
}
) keys;
makeWsBind =
mods: cmd:
listToAttrs (
map (num: {
name = "${mods}+${builtins.toString num}";
value = {
action."${cmd}" = num;
};
}) (range 1 6)
);
tagctl = lib.getExe' inputs.niri-tag.packages.${pkgs.system}.unstable "tagctl";
makeTagBind =
mods: cmd:
listToAttrs (
map (num: {
name = "${mods}+${builtins.toString num}";
value = {
action.spawn = [
tagctl
cmd
(builtins.toString num)
];
};
}) (range 1 6)
);
in
mergeAttrsList [
{
"Mod+D".action.spawn = [
"qs"
"ipc"
"call"
"launch"
"toggle"
];
"Mod+F".action.spawn = "firefox";
"Mod+E".action.spawn = "nautilus";
"Mod+Return".action.spawn = "kitty";
"Mod+Shift+E".action.spawn = "wlogout";
"Mod+Equal".action.spawn = "bitwarden";
"Mod+Shift+Q".action = actions.close-window;
"Mod+Shift+S".action = actions.screenshot;
"Mod+R".action = actions.switch-preset-column-width;
"Mod+Shift+R".action = actions.maximize-column;
"XF86AudioRaiseVolume".action.spawn = [
"volumectl"
"-u"
"up"
];
"XF86AudioLowerVolume".action.spawn = [
"volumectl"
"-u"
"down"
];
"XF86AudioMute".action.spawn = [
"volumectl"
"toggle-mute"
];
"XF86AudioStop".action.spawn = [
"playerctl"
"stop"
];
"XF86AudioPlay".action.spawn = [
"playerctl"
"play-pause"
];
"XF86AudioNext".action.spawn = [
"playerctl"
"next"
];
"XF86AudioPrev".action.spawn = [
"playerctl"
"previous"
];
"Mod+Space".action = actions.toggle-window-floating;
}
(makeDirBind "Mod" "focus-window-$DIR" vBinds)
(makeDirBind "Mod" "focus-column-or-monitor-$DIR" hBinds)
(makeDirBind "Mod+Shift" "move-column-$DIR-or-to-monitor-$DIR" hBinds)
(makeDirBind "Mod+Ctrl" "consume-or-expel-window-$DIR" hBinds)
(makeDirBind "Mod+Ctrl" "move-window-$DIR" vBinds)
(makeTagBind "Mod" "toggle-tag")
(makeTagBind "Mod+Shift" "toggle")
(makeTagBind "Mod+Ctrl" "exclusive-tag")
];
outputs = {
# "Unknown-1".enable = false;
"DP-1" = {
transform.rotation = 90;
scale = 1;
};
"DP-2" = {
variable-refresh-rate = true;
scale = 1;
};
};
input = {
warp-mouse-to-focus.enable = true;
};
cursor = {
hide-after-inactive-ms = 5000;
hide-when-typing = true;
size = 16;
theme = rice.cursor.name;
};
layout = {
always-center-single-column = true;
gaps = 24;
default-column-width.proportion = 0.5;
preset-column-widths = map (p: { proportion = p; }) [
(2.0 / 3.0)
0.5
(1.0 / 3.0)
];
focus-ring =
let
pal = rice.palette.hex;
in
{
active = {
color = pal.bright.yellow;
};
inactive = {
color = pal.normal.black;
};
};
};
prefer-no-csd = true;
hotkey-overlay.skip-at-startup = true;
window-rules =
let
v = 10.0;
in
[
{
geometry-corner-radius = {
bottom-left = v;
bottom-right = 0.0;
top-left = 0.0;
top-right = v;
};
clip-to-geometry = true;
}
];
};
# programs.ironbar = {
# enable = true;
# systemd = true;
# config = {
# monitors."DP-1" = {
# position = "top";
# height = 16;
# start = [
# {
# type = "music";
# player_type = "mpris";
# }
# ];
# center = [
# {
# type = "focused";
# icon_size = 16;
# truncate = "middle";
# }
# ];
# end = [
# { type = "clock"; }
# { type = "tray"; }
# ];
# };
# };
# };
systemd.user.services.quickshell = {
Unit.PartOf = [ "graphical-session.target" ];
Unit.After = [
"graphical-session.target"
"niri.service"
];
Install.WantedBy = [ "graphical-session.target" ];
Service = {
ExecStart = "${lib.getExe' (inputs.quickshell.packages.${pkgs.system}.default.override {
withHyprland = false;
withI3 = false;
}) "qs"}";
};
};
}

View file

@ -1,20 +0,0 @@
{ config, ... }:
{
imports = [
../util/firefox-webapp.nix
];
programs.firefox.webapps = {
"Syncthing" = {
url = "http://127.0.0.1:8384";
extraSettings = config.programs.firefox.profiles.default.settings;
name = "Syncthing";
icon = ../icons/syncthing.png;
};
"Open-WebUI" = {
url = "http://127.0.0.1:8088";
extraSettings = config.programs.firefox.profiles.default.settings;
name = "Open-WebUI";
icon = ../icons/openwebui.png;
};
};
}

View file

@ -1,13 +0,0 @@
{
...
}:
{
imports = [
./home.nix
];
home = {
username = "plank";
homeDirectory = "/home/plank";
};
}

View file

@ -1,42 +0,0 @@
{
rice,
...
}:
let
pal = rice.palette.hex;
in
{
programs.kitty = {
enable = true;
font = {
inherit (rice.fonts.monospace) name size;
};
settings = with pal; {
foreground = util.fg;
background = util.bg;
inherit (util) cursor;
cursor_text = util.bg;
selection_foreground = util.fg_sel;
selection_background = util.bg_sel;
color0 = normal.black;
color1 = normal.red;
color2 = normal.green;
color3 = normal.yellow;
color4 = normal.blue;
color5 = normal.magenta;
color6 = normal.cyan;
color7 = normal.white;
color8 = bright.black;
color9 = bright.red;
color10 = bright.green;
color11 = bright.yellow;
color12 = bright.blue;
color13 = bright.magenta;
color14 = bright.cyan;
color15 = bright.white;
sync_to_monitor = "yes";
shell = "fish";
cursor_trail = 100;
};
};
}

Some files were not shown because too many files have changed in this diff Show more