refactor in synaptic style
2
.gitignore
vendored
|
@ -3,4 +3,4 @@ mullvad/inactive
|
|||
result
|
||||
*.key
|
||||
*.pub_key
|
||||
hosts/
|
||||
hosts/reflector
|
||||
|
|
3
.gitmodules
vendored
|
@ -1,3 +0,0 @@
|
|||
[submodule "rhizome-vps"]
|
||||
path = rhizome-vps
|
||||
url = https://git.rhizome.tf/rhizome/server-config
|
7
TODO
|
@ -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
|
||||
|
Before Width: | Height: | Size: 183 KiB After Width: | Height: | Size: 183 KiB |
Before Width: | Height: | Size: 135 KiB After Width: | Height: | Size: 135 KiB |
Before Width: | Height: | Size: 36 KiB After Width: | Height: | Size: 36 KiB |
Before Width: | Height: | Size: 5.1 KiB After Width: | Height: | Size: 5.1 KiB |
Before Width: | Height: | Size: 152 KiB After Width: | Height: | Size: 152 KiB |
25
base/cli.nix
Normal file
|
@ -0,0 +1,25 @@
|
|||
{
|
||||
pkgs,
|
||||
...
|
||||
}:
|
||||
{
|
||||
environment.systemPackages = builtins.attrValues {
|
||||
inherit (pkgs)
|
||||
curl
|
||||
eza
|
||||
git
|
||||
;
|
||||
};
|
||||
hm.home.packages = builtins.attrValues {
|
||||
inherit (pkgs)
|
||||
btop
|
||||
bat
|
||||
ripgrep
|
||||
fd
|
||||
lazygit
|
||||
zoxide
|
||||
zellij
|
||||
ouch
|
||||
;
|
||||
};
|
||||
}
|
13
base/debloat.nix
Normal 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;
|
||||
}
|
|
@ -8,7 +8,7 @@ let
|
|||
pal = rice.palette.hex;
|
||||
in
|
||||
{
|
||||
programs.helix = {
|
||||
hm.programs.helix = {
|
||||
enable = true;
|
||||
package = inputs.helix.packages.${pkgs.system}.helix;
|
||||
themes = with pal; {
|
4
base/network.nix
Normal file
|
@ -0,0 +1,4 @@
|
|||
{ lib, ... }:
|
||||
{
|
||||
networking.useDHCP = lib.mkDefault true;
|
||||
}
|
27
base/nix/gc.nix
Normal 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;
|
||||
};
|
||||
|
||||
}
|
19
base/nix/managers.nix
Normal file
|
@ -0,0 +1,19 @@
|
|||
{ mainUser, ... }:
|
||||
{
|
||||
programs.meat = {
|
||||
enable = true;
|
||||
flake = "/home/${mainUser}/.nix";
|
||||
};
|
||||
|
||||
# services.smooooth = {
|
||||
# enable = true;
|
||||
# path = "/home/${mainUser}/.nix";
|
||||
# blockers = [
|
||||
# "hx"
|
||||
# {
|
||||
# nix = "die";
|
||||
# }
|
||||
# ];
|
||||
# nixPackage = pkgs.lix;
|
||||
# };
|
||||
}
|
10
base/nix/meat.nix
Normal file
|
@ -0,0 +1,10 @@
|
|||
{ inputs, mainUser, ... }:
|
||||
{
|
||||
imports = [
|
||||
inputs.meat.nixosModules.meat
|
||||
];
|
||||
programs.meat = {
|
||||
enable = true;
|
||||
flake = "/home/${mainUser}/.nix";
|
||||
};
|
||||
}
|
9
base/nix/nixpkgs.nix
Normal file
|
@ -0,0 +1,9 @@
|
|||
{ ... }:
|
||||
{
|
||||
nixpkgs = {
|
||||
config = {
|
||||
allowUnfree = true;
|
||||
allowUnfreePredicate = _: true;
|
||||
};
|
||||
};
|
||||
}
|
26
base/nix/settings.nix
Normal 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
base/nix/tools.nix
Normal 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;
|
||||
}
|
6
base/systemd.nix
Normal 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";
|
||||
}
|
|
@ -1,17 +1,46 @@
|
|||
{
|
||||
pkgs,
|
||||
rice,
|
||||
inputs,
|
||||
...
|
||||
}:
|
||||
let
|
||||
pal = rice.palette.hex;
|
||||
inherit (pkgs) fish;
|
||||
in
|
||||
{
|
||||
programs.kitty = {
|
||||
imports = [
|
||||
inputs.culr.nixosModules.culr
|
||||
];
|
||||
programs.culr = {
|
||||
enable = true;
|
||||
pattern = "rainbow-split";
|
||||
};
|
||||
programs.fish = {
|
||||
enable = true;
|
||||
};
|
||||
programs.zoxide = {
|
||||
enable = true;
|
||||
enableFishIntegration = true;
|
||||
};
|
||||
environment.systemPackages = [
|
||||
fish
|
||||
];
|
||||
environment.shells = [ fish ];
|
||||
users.defaultUserShell = fish;
|
||||
console = {
|
||||
font = "Lat2-Terminus16";
|
||||
};
|
||||
|
||||
environment.sessionVariables = {
|
||||
EDITOR = "hx";
|
||||
};
|
||||
|
||||
hm.programs.kitty = {
|
||||
enable = true;
|
||||
font = {
|
||||
inherit (rice.fonts.monospace) name size;
|
||||
};
|
||||
settings = with pal; {
|
||||
settings = with rice.palette.hex; {
|
||||
foreground = util.fg;
|
||||
background = util.bg;
|
||||
inherit (util) cursor;
|
16
base/users.nix
Normal 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}";
|
||||
};
|
||||
}
|
53
create.nix
|
@ -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;
|
||||
}
|
15
desktop/audio-control.nix
Normal 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
desktop/binds.nix
Normal 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")
|
||||
];
|
||||
}
|
|
@ -1,8 +1,9 @@
|
|||
{ rice, ... }:
|
||||
{
|
||||
rice,
|
||||
...
|
||||
}:
|
||||
{
|
||||
boot.tmp.useTmpfs = true;
|
||||
|
||||
boot.initrd.systemd.enable = true;
|
||||
|
||||
boot.loader.limine = {
|
||||
enable = true;
|
||||
style =
|
||||
|
@ -32,10 +33,5 @@
|
|||
backdrop = pal.util.bg;
|
||||
};
|
||||
maxGenerations = 5;
|
||||
extraEntries = ''
|
||||
/Windows
|
||||
protocol: efi
|
||||
path: boot():/EFI/Microsoft/Boot/bootmgfw.efi
|
||||
'';
|
||||
};
|
||||
}
|
|
@ -21,7 +21,7 @@ let
|
|||
};
|
||||
in
|
||||
{
|
||||
programs.firefox = {
|
||||
hm.programs.firefox = {
|
||||
enable = true;
|
||||
|
||||
policies = {
|
18
desktop/chat.nix
Normal 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 ];
|
||||
}
|
|
@ -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";
|
||||
};
|
||||
};
|
||||
|
||||
}
|
9
desktop/documents.nix
Normal file
|
@ -0,0 +1,9 @@
|
|||
{ pkgs, ... }:
|
||||
{
|
||||
hm.home.packages = builtins.attrValues {
|
||||
inherit (pkgs)
|
||||
libreoffice
|
||||
thunderbird
|
||||
;
|
||||
};
|
||||
}
|
10
desktop/fm.nix
Normal file
|
@ -0,0 +1,10 @@
|
|||
{ pkgs, ... }:
|
||||
{
|
||||
hm.home.packages = builtins.attrValues {
|
||||
inherit (pkgs)
|
||||
file-roller
|
||||
nautilus
|
||||
;
|
||||
};
|
||||
|
||||
}
|
14
desktop/gfx-env.nix
Normal 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
desktop/hw.nix
Normal file
|
@ -0,0 +1,5 @@
|
|||
{ ... }:
|
||||
{
|
||||
hardware.enableRedistributableFirmware = true;
|
||||
hardware.enableAllFirmware = true;
|
||||
}
|
6
desktop/input.nix
Normal file
|
@ -0,0 +1,6 @@
|
|||
{ ... }:
|
||||
{
|
||||
services.libinput.enable = true;
|
||||
console.useXkbConfig = true;
|
||||
services.xserver.xkb.options = "caps:swapescape";
|
||||
}
|
38
desktop/integrations.nix
Normal 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
desktop/kernel.nix
Normal file
|
@ -0,0 +1,11 @@
|
|||
{ pkgs, inputs, ... }:
|
||||
{
|
||||
imports = [
|
||||
inputs.nyx.nixosModules.default
|
||||
];
|
||||
services.scx = {
|
||||
enable = true;
|
||||
scheduler = "scx_bpfland";
|
||||
};
|
||||
boot.kernelPackages = pkgs.linuxPackages_cachyos;
|
||||
}
|
44
desktop/logout.nix
Normal file
|
@ -0,0 +1,44 @@
|
|||
{
|
||||
rice,
|
||||
pkgs,
|
||||
...
|
||||
}:
|
||||
let
|
||||
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 ];
|
||||
}
|
48
desktop/logout/style.css
Normal 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"))
|
||||
}
|
|
@ -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
desktop/network.nix
Normal 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;
|
||||
}
|
|
@ -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 ];
|
||||
}
|
|
@ -1,17 +1,20 @@
|
|||
{ pkgs, rice, ... }:
|
||||
{
|
||||
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;
|
|
@ -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;
|
||||
};
|
||||
}
|
25
desktop/rice.nix
Normal file
|
@ -0,0 +1,25 @@
|
|||
{
|
||||
pkgs,
|
||||
lib,
|
||||
inputs,
|
||||
rice,
|
||||
...
|
||||
}:
|
||||
{
|
||||
hm.home.packages =
|
||||
let
|
||||
inherit (rice) icons fonts cursor;
|
||||
in
|
||||
fonts.pkgs
|
||||
++ icons.pkgs
|
||||
++ [
|
||||
cursor.package
|
||||
];
|
||||
_module.args.rice = import ../rice {
|
||||
inherit
|
||||
inputs
|
||||
lib
|
||||
pkgs
|
||||
;
|
||||
};
|
||||
}
|
61
desktop/shell.nix
Normal file
|
@ -0,0 +1,61 @@
|
|||
{
|
||||
pkgs,
|
||||
lib,
|
||||
inputs,
|
||||
rice,
|
||||
...
|
||||
}:
|
||||
let
|
||||
inherit (lib) getExe getExe';
|
||||
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" ];
|
||||
};
|
||||
};
|
||||
}
|
17
desktop/udisks.nix
Normal 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
desktop/webapps.nix
Normal 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;
|
||||
};
|
||||
};
|
||||
}
|
|
@ -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;
|
||||
};
|
||||
}
|
|
@ -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;
|
85
desktop/wm.nix
Normal file
|
@ -0,0 +1,85 @@
|
|||
{
|
||||
pkgs,
|
||||
mainUser,
|
||||
rice,
|
||||
inputs,
|
||||
...
|
||||
}:
|
||||
{
|
||||
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;
|
||||
|
||||
}
|
38
entry.nix
|
@ -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 = [
|
||||
./base
|
||||
./desktop
|
||||
./hosts/quiver
|
||||
];
|
||||
};
|
||||
adrift = {
|
||||
user = "plank";
|
||||
imports = [
|
||||
./base
|
||||
./desktop
|
||||
./hosts/adrift
|
||||
];
|
||||
};
|
||||
adrift.user = "plank";
|
||||
};
|
||||
}
|
||||
|
|
48
flake.nix
|
@ -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,8 +57,6 @@
|
|||
|
||||
angrr.url = "github:linyinfeng/angrr";
|
||||
|
||||
arbys.url = "path:/home/bolt/code/arbys";
|
||||
|
||||
__flake-compat = {
|
||||
url = "git+https://git.lix.systems/lix-project/flake-compat.git";
|
||||
flake = false;
|
||||
|
|
|
@ -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
|
||||
];
|
||||
}
|
75
flakes/comfyui-plugins/flake.lock
generated
|
@ -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
|
||||
}
|
|
@ -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;
|
||||
};
|
||||
}
|
|
@ -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/
|
||||
'';
|
||||
}
|
|
@ -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/
|
||||
'';
|
||||
}
|
|
@ -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')
|
|
@ -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
|
||||
'';
|
||||
}
|
|
@ -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";
|
||||
}
|
41
flakes/comfyui/flake.lock
generated
|
@ -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
|
||||
}
|
|
@ -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;
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
|
@ -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]] = {}
|
||||
|
|
@ -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
|
||||
);
|
||||
};
|
||||
}
|
|
@ -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;
|
||||
}
|
41
flakes/niri-session-manager/flake.lock
generated
|
@ -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
|
||||
}
|
|
@ -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;
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
|
@ -1,10 +0,0 @@
|
|||
{
|
||||
...
|
||||
}:
|
||||
{
|
||||
|
||||
imports = [
|
||||
./home.nix
|
||||
];
|
||||
|
||||
}
|
|
@ -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
|
|
@ -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"))
|
||||
}
|
|
@ -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
|
100
home/home.nix
|
@ -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";
|
||||
};
|
||||
}
|
|
@ -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 = [ ];
|
||||
};
|
||||
|
||||
}
|
Before Width: | Height: | Size: 86 KiB |
|
@ -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 ];
|
||||
}
|
|
@ -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
|
||||
;
|
||||
};
|
||||
}
|
|
@ -1,10 +0,0 @@
|
|||
_: {
|
||||
# imports = [
|
||||
# ../util/flatpak.nix
|
||||
# ];
|
||||
# flatpaks = [
|
||||
# "ar.com.tuxguitar.TuxGuitar"
|
||||
# "org.inkscape.Inkscape"
|
||||
# "com.github.PintaProject.Pinta"
|
||||
# ];
|
||||
}
|
|
@ -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
|
||||
;
|
||||
};
|
||||
}
|
|
@ -1,6 +0,0 @@
|
|||
{ pkgs, ... }:
|
||||
{
|
||||
home.packages = [
|
||||
pkgs.libreoffice
|
||||
];
|
||||
}
|
|
@ -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"}";
|
||||
};
|
||||
};
|
||||
|
||||
}
|
|
@ -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;
|
||||
};
|
||||
};
|
||||
}
|
|
@ -1,13 +0,0 @@
|
|||
{
|
||||
...
|
||||
}:
|
||||
{
|
||||
imports = [
|
||||
./home.nix
|
||||
];
|
||||
|
||||
home = {
|
||||
username = "plank";
|
||||
homeDirectory = "/home/plank";
|
||||
};
|
||||
}
|
|
@ -1,71 +0,0 @@
|
|||
{
|
||||
rice,
|
||||
pkgs,
|
||||
...
|
||||
}:
|
||||
let
|
||||
pal = rice.palette.hex;
|
||||
in
|
||||
{
|
||||
programs.wlogout = {
|
||||
enable = true;
|
||||
package = pkgs.wleave;
|
||||
layout = builtins.fromJSON (builtins.readFile ../dots/wlogout/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 = ../icons/winlogo.png;
|
||||
sha256 = "7c1ff96b553c7a7ca3a7b7cf8efe830ab7feea92355aed288a10ee7347c24108";
|
||||
})
|
||||
]
|
||||
(builtins.readFile ../dots/wlogout/style.css)
|
||||
);
|
||||
};
|
||||
# xdg.configFile = {
|
||||
# "wleave/layout".text = builtins.readFile ../dots/wlogout/layout;
|
||||
# "wleave/style.css".text = with palette-hex; (builtins.replaceStrings
|
||||
# [
|
||||
# "/usr/share/wlogout"
|
||||
# "/etc/wlogout"
|
||||
# "#WINBG"
|
||||
# "#BTNCOL"
|
||||
# "#BTNBG"
|
||||
# "#BTNFOCUSBG"
|
||||
# "#WINLOGO"
|
||||
# ]
|
||||
# [
|
||||
# "${pkgs.wleave}/share/wleave"
|
||||
# "${pkgs.wleave}/etc/wleave"
|
||||
# util.bg
|
||||
# bright.yellow
|
||||
# util.bg
|
||||
# normal.black
|
||||
# (builtins.path {
|
||||
# name = "winlogo";
|
||||
# path = ../icons/winlogo.png;
|
||||
# sha256 = "7c1ff96b553c7a7ca3a7b7cf8efe830ab7feea92355aed288a10ee7347c24108";
|
||||
# })
|
||||
# ]
|
||||
# (builtins.readFile ../dots/wlogout/style.css));
|
||||
# };
|
||||
|
||||
home.packages = [ pkgs.wlogout ];
|
||||
}
|
|
@ -1,10 +0,0 @@
|
|||
{
|
||||
mainUser,
|
||||
...
|
||||
}:
|
||||
{
|
||||
config.home = {
|
||||
username = mainUser;
|
||||
homeDirectory = "/home/${mainUser}";
|
||||
};
|
||||
}
|
25
hosts/adrift/boot.nix
Normal file
|
@ -0,0 +1,25 @@
|
|||
{ ... }:
|
||||
{
|
||||
boot.kernelParams = [
|
||||
"mitigations=off"
|
||||
"quiet"
|
||||
"loglevel=3"
|
||||
"systemd.show_status=auto"
|
||||
"rd.udev.log_level=3"
|
||||
"vt.global_cursor_default=0"
|
||||
];
|
||||
boot.initrd.availableKernelModules = [
|
||||
"xhci_pci"
|
||||
"nvme"
|
||||
"usb_storage"
|
||||
"sd_mod"
|
||||
"rtsx_pci_sdmmc"
|
||||
];
|
||||
boot.initrd.kernelModules = [ "dm-snapshot" ];
|
||||
boot.kernelModules = [
|
||||
"iwlwifi"
|
||||
"kvm-intel"
|
||||
];
|
||||
boot.loader.systemd-boot.configurationLimit = 2;
|
||||
boot.loader.efi.canTouchEfiVariables = true;
|
||||
}
|
18
hosts/adrift/fs.nix
Normal file
|
@ -0,0 +1,18 @@
|
|||
{ ... }:
|
||||
{
|
||||
|
||||
fileSystems."/boot" = {
|
||||
device = "/dev/disk/by-uuid/1C5C-8FF4";
|
||||
fsType = "vfat";
|
||||
};
|
||||
|
||||
fileSystems."/" = {
|
||||
device = "/dev/disk/by-uuid/26389642-cf51-4c58-98e9-1fe491a11bb9";
|
||||
fsType = "ext4";
|
||||
};
|
||||
|
||||
swapDevices = [
|
||||
{ device = "/dev/disk/by-uuid/a732641d-1233-45a7-8614-53caed60f11b"; }
|
||||
];
|
||||
|
||||
}
|
5
hosts/adrift/hw.nix
Normal file
|
@ -0,0 +1,5 @@
|
|||
{ lib, config, ... }:
|
||||
{
|
||||
hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
|
||||
services.xserver.videoDrivers = [ "i915" ];
|
||||
}
|
9
hosts/adrift/id.nix
Normal file
|
@ -0,0 +1,9 @@
|
|||
{ ... }:
|
||||
{
|
||||
networking.hostName = "adrift"; # Define your hostname.
|
||||
time.timeZone = "Australia/Sydney";
|
||||
time.hardwareClockInLocalTime = false;
|
||||
i18n.defaultLocale = "en_AU.UTF-8";
|
||||
i18n.supportedLocales = [ "en_AU.UTF-8/UTF-8" ];
|
||||
nixpkgs.system = "x86_64-linux";
|
||||
}
|
6
hosts/adrift/power.nix
Normal file
|
@ -0,0 +1,6 @@
|
|||
{ lib, ... }:
|
||||
{
|
||||
powerManagement.cpuFreqGovernor = lib.mkDefault "powersave";
|
||||
services.power-profiles-daemon.enable = false;
|
||||
services.tlp.enable = true;
|
||||
}
|
40
hosts/quiver/boot.nix
Normal file
|
@ -0,0 +1,40 @@
|
|||
{ pkgs, ... }:
|
||||
{
|
||||
boot.initrd.availableKernelModules = [
|
||||
"xhci_pci"
|
||||
"ahci"
|
||||
"usbcore"
|
||||
"sd_mod"
|
||||
];
|
||||
boot.initrd.kernelModules = [ ];
|
||||
boot.initrd.verbose = false;
|
||||
boot.kernelModules = [
|
||||
"kvm-amd"
|
||||
"i2c-dev"
|
||||
];
|
||||
boot.consoleLogLevel = 0;
|
||||
boot.kernelParams = [
|
||||
"mitigations=off"
|
||||
"preempt=full"
|
||||
"quiet"
|
||||
"loglevel=3"
|
||||
"systemd.show_status=off"
|
||||
"rd.udev.log_level=3"
|
||||
"vt.global_cursor_default=0"
|
||||
];
|
||||
boot.supportedFilesystems = {
|
||||
ntfs = true;
|
||||
btrfs = true;
|
||||
};
|
||||
boot.loader.efi.canTouchEfiVariables = true;
|
||||
boot.plymouth = {
|
||||
enable = true;
|
||||
# inherit (rice.plymouth) theme themePackages font;
|
||||
};
|
||||
|
||||
boot.loader.limine.extraEntries = ''
|
||||
/Windows
|
||||
protocol: efi
|
||||
path: boot():/EFI/Microsoft/Boot/bootmgfw.efi
|
||||
'';
|
||||
}
|
30
hosts/quiver/fs.nix
Normal file
|
@ -0,0 +1,30 @@
|
|||
{ ... }:
|
||||
{
|
||||
|
||||
fileSystems = {
|
||||
"/" = {
|
||||
device = "/dev/disk/by-uuid/b993b463-c131-4ef1-9aba-0e3eadaa2f9a";
|
||||
fsType = "btrfs";
|
||||
};
|
||||
|
||||
"/boot" = {
|
||||
device = "/dev/disk/by-uuid/6B75-AF9F";
|
||||
fsType = "vfat";
|
||||
};
|
||||
|
||||
"/data" = {
|
||||
device = "/dev/disk/by-uuid/39D4F78C658E8B56";
|
||||
fsType = "ntfs";
|
||||
options = [
|
||||
"rw"
|
||||
"uid=1000"
|
||||
"gid=100"
|
||||
];
|
||||
};
|
||||
};
|
||||
|
||||
swapDevices = [
|
||||
{ device = "/dev/disk/by-uuid/9c006925-e0e9-4165-bc0c-508ae2d1bfce"; }
|
||||
];
|
||||
|
||||
}
|
37
hosts/quiver/hw.nix
Normal file
|
@ -0,0 +1,37 @@
|
|||
{ config, ... }:
|
||||
{
|
||||
|
||||
security.tpm2.enable = true;
|
||||
|
||||
hardware.cpu.amd.updateMicrocode = true;
|
||||
services.xserver.videoDrivers = [ "nvidia" ];
|
||||
|
||||
nixpkgs.config.cudaSupport = true;
|
||||
|
||||
hardware.nvidia = {
|
||||
package = config.boot.kernelPackages.nvidiaPackages.latest;
|
||||
modesetting.enable = true;
|
||||
powerManagement.enable = true;
|
||||
nvidiaPersistenced = true;
|
||||
open = false;
|
||||
};
|
||||
|
||||
hardware.graphics.enable = true;
|
||||
hardware.graphics.enable32Bit = true;
|
||||
|
||||
# openrgb no longer recognises the device?
|
||||
# systemd.services.no-rgb = {
|
||||
# wantedBy = ["multi-user.target"];
|
||||
# description = "rgb led turn-off-er";
|
||||
# serviceConfig = {
|
||||
# Type = "oneshot";
|
||||
# ExecStart = ''${pkgs.openrgb}/bin/openrgb -d "HyperX DRAM" -m static -c 000000'';
|
||||
# After = ["openrgb"];
|
||||
# };
|
||||
# };
|
||||
|
||||
# services.hardware.openrgb = {
|
||||
# enable = true;
|
||||
# motherboard = "amd";
|
||||
# };
|
||||
}
|
|
@ -1,6 +1,8 @@
|
|||
_: {
|
||||
networking.hostName = "quiver";
|
||||
time.timeZone = "Australia/Sydney";
|
||||
time.hardwareClockInLocalTime = false;
|
||||
i18n.defaultLocale = "en_AU.UTF-8";
|
||||
i18n.supportedLocales = [ "en_AU.UTF-8/UTF-8" ];
|
||||
nixpkgs.system = "x86_64-linux";
|
||||
}
|
13
hosts/quiver/input.nix
Normal file
|
@ -0,0 +1,13 @@
|
|||
{ lib, pkgs, ... }:
|
||||
{
|
||||
hardware.ckb-next.enable = true;
|
||||
|
||||
services.libinput.mouse = {
|
||||
accelProfile = "flat";
|
||||
accelSpeed = 0.0;
|
||||
};
|
||||
|
||||
hm.quickServices = {
|
||||
ckb-next = "${lib.getExe pkgs.ckb-next} -c -b";
|
||||
};
|
||||
}
|
20
hosts/quiver/llm.nix
Normal file
|
@ -0,0 +1,20 @@
|
|||
{ inputs, config, ... }:
|
||||
{
|
||||
services.ollama = {
|
||||
enable = true;
|
||||
user = "ollama";
|
||||
};
|
||||
|
||||
services.open-webui = {
|
||||
package = inputs.nixpkgs-stable.legacyPackages.x86_64-linux.open-webui;
|
||||
enable = true;
|
||||
port = 8088;
|
||||
environment = {
|
||||
DO_NOT_TRACK = "True";
|
||||
SCARF_NO_ANALYTICS = "True";
|
||||
ANONYMIZED_TELEMETRY = "False";
|
||||
WEBUI_AUTH = "False";
|
||||
DATABASE_URL = "sqlite:///${config.services.open-webui.stateDir}/newdb.db";
|
||||
};
|
||||
};
|
||||
}
|
14
hosts/quiver/outputs.nix
Normal file
|
@ -0,0 +1,14 @@
|
|||
{ ... }:
|
||||
{
|
||||
hm.programs.niri.settings.outputs = {
|
||||
"DP-1" = {
|
||||
transform.rotation = 90;
|
||||
scale = 1;
|
||||
};
|
||||
"DP-2" = {
|
||||
variable-refresh-rate = true;
|
||||
scale = 1;
|
||||
};
|
||||
};
|
||||
|
||||
}
|
5
hosts/quiver/stateversion.nix
Normal file
|
@ -0,0 +1,5 @@
|
|||
{ ... }:
|
||||
{
|
||||
system.stateVersion = "22.11";
|
||||
hm.home.stateVersion = "22.11";
|
||||
}
|