added a few changes

This commit is contained in:
2005 2024-05-18 01:10:04 +02:00
parent 79cbf5400e
commit 241370064e
43 changed files with 344 additions and 35 deletions

View file

@ -7,6 +7,7 @@
mumble # voip mumble # voip
element-desktop # fully featured matrix client element-desktop # fully featured matrix client
#gomuks # tui matrix client #gomuks # tui matrix client
cinny-desktop
]; ];

View file

@ -3,7 +3,9 @@
taskwarrior taskwarrior
timewarrior timewarrior
logseq logseq
]; ];
} }

View file

@ -1,6 +1,10 @@
{ pkgs, lib, ... }: { { pkgs, lib, ... }: {
environment.systemPackages = with pkgs; [
# for replay
xdotool
jq
];
home-manager.users.grape.xsession.windowManager.i3 = { home-manager.users.grape.xsession.windowManager.i3 = {
enable = true; enable = true;
config = { config = {
@ -51,7 +55,6 @@
"mod4+e" = "exec rofi -show calc"; "mod4+e" = "exec rofi -show calc";
"mod4+t" = "exec alacritty"; "mod4+t" = "exec alacritty";
"mod4+r" = "exec firefox"; "mod4+r" = "exec firefox";
"mod4+w" = "exec ~/.config/scripts/save_replay.sh";
# power off # power off
"mod4+Shift+Delete" = "exec shutdown now"; "mod4+Shift+Delete" = "exec shutdown now";
@ -60,6 +63,12 @@
"mod4+1" = "exec setxkbmap us"; "mod4+1" = "exec setxkbmap us";
"mod4+2" = "exec setxkbmap hu"; "mod4+2" = "exec setxkbmap hu";
# replay
"mod4+s" = "exec ~/.config/scripts/replay_application_name.sh";
"mod4+w" = "exec ~/.config/scripts/save_replay.sh";
"mod4+a" = "exec ~/.config/scripts/start_replay.sh";
"mod4+x" = "exec ~/.config/scripts/stop_replay.sh";
# screenshot # screenshot
# shit needs work # shit needs work
"Print" = "exec scrot '%Y-%m-%d_%H-%M-%S.png' -e 'mv $f ~/Pictures/screenshots && xclip -selection clipboard -t image/png -i ~/Pictures/screenshots/$f'"; "Print" = "exec scrot '%Y-%m-%d_%H-%M-%S.png' -e 'mv $f ~/Pictures/screenshots && xclip -selection clipboard -t image/png -i ~/Pictures/screenshots/$f'";

View file

@ -27,6 +27,10 @@
"window_type = 'desktop'" "window_type = 'desktop'"
"_GTK_FRAME_EXTENTS@:c" "_GTK_FRAME_EXTENTS@:c"
"class_g ~= 'slop'" "class_g ~= 'slop'"
"class_g ~= 'Warframe.x64.exe'"
"class_g ~= 'Warframe.x64.ex'"
"class_g ~= 'Warframe'"
"class_g ~= 'Peek'"
]; ];
opacity-rule = [ opacity-rule = [

View file

@ -38,21 +38,12 @@ in
label = " | "; label = " | ";
label-foreground = "${colors.seperatorColor}"; label-foreground = "${colors.seperatorColor}";
}; };
"module/cpu-label" = {
type = "custom/text";
label = "CPU ";
label-foreground = "${colors.seperatorColor}";
};
"module/gpu-label" = { "module/gpu-label" = {
type = "custom/text"; type = "custom/text";
label = "GPU "; label = "GPU ";
label-foreground = "${colors.seperatorColor}"; label-foreground = "${colors.seperatorColor}";
}; };
"module/ram-label" = {
type = "custom/text";
label = "RAM ";
label-foreground = "${colors.seperatorColor}";
};
"module/replay-label" = { "module/replay-label" = {
type = "custom/text"; type = "custom/text";
label = "REPLAY "; label = "REPLAY ";
@ -86,18 +77,22 @@ in
"module/wired-network" = { "module/wired-network" = {
type = "internal/network"; type = "internal/network";
interface = "eno2"; interface = "eno2";
interval = ".5";
label-connected = "%{F${colors.seperatorColor}}%{F-} %downspeed% %{F${colors.seperatorColor}}%{F-} %upspeed%";
label-foreground = "${colors.fg}"; label-foreground = "${colors.fg}";
}; };
"module/wireless-network" = { "module/wireless-network" = {
type = "internal/network"; type = "internal/network";
interface = "wlo1"; interface = "wlo1";
interval = ".5";
label-connected = "%{F${colors.seperatorColor}}%{F-} %downspeed% %{F${colors.seperatorColor}}%{F-} %upspeed%";
label-foreground = "${colors.fg}"; label-foreground = "${colors.fg}";
}; };
"module/cpu-temp" = { "module/cpu-temp" = {
type = "internal/temperature"; type = "internal/temperature";
format = "<label> "; format = "%{F${colors.seperatorColor}}CPU%{F-} <label> ";
format-warn = "<label-warn> "; format-warn = "%{F${colors.seperatorColor}}CPU%{F-} <label-warn> ";
base-temperature = 20; base-temperature = 20;
warn-temperature = 85; warn-temperature = 85;
label-warn-foreground = "${colors.warn}"; label-warn-foreground = "${colors.warn}";
@ -134,9 +129,10 @@ in
"module/memory" = { "module/memory" = {
type = "internal/memory"; type = "internal/memory";
interval = 1; interval = 1;
format = "%{F${colors.seperatorColor}}RAM%{F-} <label>";
label = "%used%"; label = "%used%";
label-warn = "%used%"; label-warn = "%used%";
warn-percentage = 70; warn-percentage = 60;
label-warn-foreground = "${colors.warn}"; label-warn-foreground = "${colors.warn}";
}; };
@ -144,7 +140,6 @@ in
"module/audio" = { "module/audio" = {
type = "internal/alsa"; type = "internal/alsa";
use-ui-max = false; use-ui-max = false;
interval = 5;
label-volume = "%percentage%%"; label-volume = "%percentage%%";
label-muted = "muted"; label-muted = "muted";
label-muted-foreground = "${colors.altfg}"; label-muted-foreground = "${colors.altfg}";
@ -155,9 +150,12 @@ in
type = "custom/script"; type = "custom/script";
exec = "~/.config/scripts/status.sh"; exec = "~/.config/scripts/status.sh";
interval = 1; interval = 1;
click-left = "~/.config/scripts/start_replay.sh"; click-left = "~/.config/scripts/select_replay_windows.sh";
click-middle = "~/.config/scripts/save_replay.sh"; click-middle = "~/.config/scripts/save_replay.sh";
click-right = "~/.config/scripts/stop_replay.sh"; click-right = "~/.config/scripts/stop_replay.sh";
scroll-up = "~/.config/scripts/select_replay_windows.sh";
scroll-down = "~/.config/scripts/start_replay.sh";
}; };
@ -210,6 +208,14 @@ in
adapter = "AC0"; adapter = "AC0";
poll-interval = 4; poll-interval = 4;
}; };
"module/keyboard" = {
type = "internal/xkeyboard";
format = "<label-layout> <label-indicator>";
};
"global/wm" = { "global/wm" = {
override-redirect = false; override-redirect = false;
}; };
@ -234,17 +240,16 @@ in
foreground = "${colors.fg}"; foreground = "${colors.fg}";
# border for bar # border for bar
# TODO for some reason i cant give the bar a margin-top and therefore i cant have a colored margin.. instead its invisible for now
border-size = "10px"; border-size = "10px";
# border-color = ${colors.border} # border-color = ${colors.border}
border-color = "${colors.invisible}"; border-color = "${colors.invisible}";
# Displayed modules # Displayed modules
modules-left = "date s ewmh s wired-network wireless-network s audio s music"; modules-left = "date s keyboard s ewmh s wired-network wireless-network s audio s music";
modules-center = "cava"; modules-center = "cava";
# TODO Add gpu usage and temp # TODO Add gpu usage and temp
modules-right = "battery-label battery s fs-label-data fs-data s fs-label-system fs-system s replay-label replay s ram-label memory s gpu-label gpu-usage gpu-temp s cpu-label cpu-temp cpu-usage"; modules-right = "battery-label battery s fs-label-data fs-data s fs-label-system fs-system s replay-label replay s memory s gpu-label gpu-usage gpu-temp s cpu-temp cpu-usage";
}; };
}; };

View file

@ -0,0 +1,8 @@
{ pkgs, ... }: {
services.prometheus.exporters.node = {
enable = false;
port = 9001;
openFirewall = true;
listenAddress = "32.54.31.0";
};
}

View file

@ -4,6 +4,7 @@
enable = true; enable = true;
font = "Jetbrains Mono"; font = "Jetbrains Mono";
configPath = "$XDG_CONFIG_HOME/rofi/config.rasi"; configPath = "$XDG_CONFIG_HOME/rofi/config.rasi";
# TODO for some reason the plugin doesn't work
plugins = with pkgs; [ rofi-calc rofi-emoji ]; plugins = with pkgs; [ rofi-calc rofi-emoji ];
}; };
} }

View file

@ -39,6 +39,12 @@
version = "7.3.2"; version = "7.3.2";
sha256 = "10q5w9g7ghn2qvdc7h2b79x1vy8nzpnwz8dbg1h03074ikhvjx4v"; sha256 = "10q5w9g7ghn2qvdc7h2b79x1vy8nzpnwz8dbg1h03074ikhvjx4v";
} }
{
name = "ollama-autocoder";
publisher = "10nates";
version = "0.0.8";
sha256 = "0pxmlhj0isz1qr7pmmlrk6srylgwf6c0wqbp9q2ig0barl2qznai";
}
]; ];
userSettings = { userSettings = {
"terminal.integrated.defaultProfile.linux" = "zsh"; "terminal.integrated.defaultProfile.linux" = "zsh";
@ -50,6 +56,11 @@
"vim.smartRelativeLine" = true; "vim.smartRelativeLine" = true;
"rust-analyzer.cargo.sysroot" = "discover"; "rust-analyzer.cargo.sysroot" = "discover";
# ollama-autocoder
"ollama-autocoder.endpoint" = "http://localhost:11434/api/generate";
"ollama-autocoder.model" = "qwen:7b";
"ollama-autocoder.completion keys" = "ctrl+i";
"ollama-autocoder.prompt window size" = 400;
}; };
languageSnippets = { languageSnippets = {
nix = { nix = {

View file

@ -12,6 +12,7 @@
./system/essentials.nix ./system/essentials.nix
./system/shell.nix ./system/shell.nix
./system/remap.nix ./system/remap.nix
./system/ssd.nix
# rice and other usefull apps # rice and other usefull apps
./desktop.nix ./desktop.nix
@ -42,7 +43,12 @@
# libreoffice # libreoffice
# ./apps/office.nix ./apps/office.nix
# node xporter
./configs/prometheus.nix
]; ];

View file

@ -29,15 +29,19 @@
filezilla filezilla
# screen sharing # screen sharing
#obs-studio obs-studio
#qpwgraph qpwgraph
# work # work
#figma-linux #figma-linux
#kdenlive #kdenlive
#video-trimmer #video-trimmer
peek
# for replay
xdotool
jq
]; ];
fonts.packages = with pkgs; [ fonts.packages = with pkgs; [
(nerdfonts.override { fonts = [ "JetBrainsMono" ]; }) (nerdfonts.override { fonts = [ "JetBrainsMono" ]; })

View file

@ -24,6 +24,8 @@
nurl nurl
nix-init nix-init
# for 3d
blender
]; ];
} }

View file

@ -1,6 +1,70 @@
{ {
"nodes": { "nodes": {
"agenix": {
"inputs": {
"darwin": "darwin",
"home-manager": "home-manager",
"nixpkgs": "nixpkgs",
"systems": "systems"
},
"locked": {
"lastModified": 1714136352,
"narHash": "sha256-BtWQ2Th/jamO1SlD+2ASSW5Jaf7JhA/JLpQHk0Goqpg=",
"owner": "ryantm",
"repo": "agenix",
"rev": "24a7ea390564ccd5b39b7884f597cfc8d7f6f44e",
"type": "github"
},
"original": {
"owner": "ryantm",
"repo": "agenix",
"type": "github"
}
},
"darwin": {
"inputs": {
"nixpkgs": [
"agenix",
"nixpkgs"
]
},
"locked": {
"lastModified": 1700795494,
"narHash": "sha256-gzGLZSiOhf155FW7262kdHo2YDeugp3VuIFb4/GGng0=",
"owner": "lnl7",
"repo": "nix-darwin",
"rev": "4b9b83d5a92e8c1fbfd8eb27eda375908c11ec4d",
"type": "github"
},
"original": {
"owner": "lnl7",
"ref": "master",
"repo": "nix-darwin",
"type": "github"
}
},
"home-manager": { "home-manager": {
"inputs": {
"nixpkgs": [
"agenix",
"nixpkgs"
]
},
"locked": {
"lastModified": 1703113217,
"narHash": "sha256-7ulcXOk63TIT2lVDSExj7XzFx09LpdSAPtvgtM7yQPE=",
"owner": "nix-community",
"repo": "home-manager",
"rev": "3bfaacf46133c037bb356193bd2f1765d9dc82c1",
"type": "github"
},
"original": {
"owner": "nix-community",
"repo": "home-manager",
"type": "github"
}
},
"home-manager_2": {
"inputs": { "inputs": {
"nixpkgs": [ "nixpkgs": [
"nixpkgs" "nixpkgs"
@ -23,16 +87,16 @@
}, },
"nixpkgs": { "nixpkgs": {
"locked": { "locked": {
"lastModified": 1711668574, "lastModified": 1703013332,
"narHash": "sha256-u1dfs0ASQIEr1icTVrsKwg2xToIpn7ZXxW3RHfHxshg=", "narHash": "sha256-+tFNwMvlXLbJZXiMHqYq77z/RfmpfpiI3yjL6o/Zo9M=",
"owner": "NixOS", "owner": "NixOS",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "219951b495fc2eac67b1456824cc1ec1fd2ee659", "rev": "54aac082a4d9bb5bbc5c4e899603abfb76a3f6d6",
"type": "github" "type": "github"
}, },
"original": { "original": {
"owner": "NixOS", "owner": "NixOS",
"ref": "nixos-23.11", "ref": "nixos-unstable",
"repo": "nixpkgs", "repo": "nixpkgs",
"type": "github" "type": "github"
} }
@ -52,6 +116,22 @@
"type": "indirect" "type": "indirect"
} }
}, },
"nixpkgs_2": {
"locked": {
"lastModified": 1711668574,
"narHash": "sha256-u1dfs0ASQIEr1icTVrsKwg2xToIpn7ZXxW3RHfHxshg=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "219951b495fc2eac67b1456824cc1ec1fd2ee659",
"type": "github"
},
"original": {
"owner": "NixOS",
"ref": "nixos-23.11",
"repo": "nixpkgs",
"type": "github"
}
},
"nvidia-patch": { "nvidia-patch": {
"inputs": { "inputs": {
"nixpkgs": [ "nixpkgs": [
@ -75,8 +155,9 @@
}, },
"root": { "root": {
"inputs": { "inputs": {
"home-manager": "home-manager", "agenix": "agenix",
"nixpkgs": "nixpkgs", "home-manager": "home-manager_2",
"nixpkgs": "nixpkgs_2",
"nixpkgs-unstable": "nixpkgs-unstable", "nixpkgs-unstable": "nixpkgs-unstable",
"nvidia-patch": "nvidia-patch" "nvidia-patch": "nvidia-patch"
} }
@ -96,9 +177,24 @@
"type": "github" "type": "github"
} }
}, },
"systems_2": {
"locked": {
"lastModified": 1681028828,
"narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=",
"owner": "nix-systems",
"repo": "default",
"rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e",
"type": "github"
},
"original": {
"owner": "nix-systems",
"repo": "default",
"type": "github"
}
},
"utils": { "utils": {
"inputs": { "inputs": {
"systems": "systems" "systems": "systems_2"
}, },
"locked": { "locked": {
"lastModified": 1710146030, "lastModified": 1710146030,

View file

@ -4,6 +4,7 @@
inputs = { inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixos-23.11"; # default packages nixpkgs.url = "github:NixOS/nixpkgs/nixos-23.11"; # default packages
nixpkgs-unstable.url = "nixpkgs/nixos-unstable"; # unstable branch for newer packages nixpkgs-unstable.url = "nixpkgs/nixos-unstable"; # unstable branch for newer packages
agenix.url = "github:ryantm/agenix";
home-manager = { home-manager = {
url = "github:nix-community/home-manager/release-23.11"; url = "github:nix-community/home-manager/release-23.11";
@ -20,6 +21,7 @@
, home-manager , home-manager
, nixpkgs-unstable , nixpkgs-unstable
, nvidia-patch , nvidia-patch
, agenix
, ... , ...
}: }:
let let
@ -40,7 +42,10 @@
nvidia-patch.overlays.default nvidia-patch.overlays.default
]; ];
}) })
{
environment.systemPackages = [ agenix.packages.${system}.default ];
}
agenix.nixosModules.default
./system/drivers/shitvidia-patch.nix ./system/drivers/shitvidia-patch.nix
./configuration.nix ./configuration.nix
home-manager.nixosModules.home-manager home-manager.nixosModules.home-manager

47
etc/hardware-configuration.nix Executable file
View file

@ -0,0 +1,47 @@
# Do not modify this file! It was generated by nixos-generate-config
# and may be overwritten by future invocations. Please make changes
# to /etc/nixos/configuration.nix instead.
{ config, lib, pkgs, modulesPath, ... }:
{
imports =
[ (modulesPath + "/installer/scan/not-detected.nix")
];
boot.initrd.availableKernelModules = [ "xhci_pci" "nvme" "usbhid" ];
boot.initrd.kernelModules = [ ];
boot.kernelModules = [ "kvm-intel" ];
boot.extraModulePackages = [ ];
fileSystems."/" =
{ device = "/dev/disk/by-uuid/7610257f-16f7-41c2-a0d9-4e9f08f2b3e9";
fsType = "ext4";
};
boot.initrd.luks.devices."luks-bbb8e429-bee1-4b5e-8ce8-c54f5f4f29a2".device = "/dev/disk/by-uuid/bbb8e429-bee1-4b5e-8ce8-c54f5f4f29a2";
fileSystems."/boot" =
{ device = "/dev/disk/by-uuid/4362-33EF";
fsType = "vfat";
};
fileSystems."/mnt/terra" =
{ device = "/dev/disk/by-uuid/f2b24250-0cf5-43d4-806f-7f024922781a";
fsType = "ext4";
};
swapDevices =
[ { device = "/dev/disk/by-uuid/c680b02d-7de7-4cd7-855b-daec64833e3b"; }
];
# Enables DHCP on each ethernet and wireless interface. In case of scripted networking
# (the default) this is the recommended approach. When using systemd-networkd it's
# still possible to use this option, but it's recommended to use it in conjunction
# with explicit per-interface declarations with `networking.interfaces.<interface>.useDHCP`.
networking.useDHCP = lib.mkDefault true;
# networking.interfaces.eno2.useDHCP = lib.mkDefault true;
# networking.interfaces.wlo1.useDHCP = lib.mkDefault true;
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
}

29
etc/opt/firefox/bookmarks.nix Executable file
View file

@ -0,0 +1,29 @@
[
{
name = "Stats";
tags = [ "metrics" ];
keyword = "grafana";
url = "http://stats.barna.local";
}
{
name = "Slskd - Soulseek server";
tags = [ "music" "piracy" ];
keyword = "slskd";
url = "http://32.54.31.5:5030";
}
{
name = "Gitea - berryez";
tags = [ "git" "code" ];
keyword = "gitea";
url = "https://git.berryez.xyz";
}
{
name = "NUR";
tags = [ "nixos" ];
keyword = "nur";
url = "https://nur.nix-community.org/";
}
]

View file

@ -15,7 +15,7 @@ in
}; };
# TODO fix hybrid optimus shit mode... add "intel" for inner display to work # TODO fix hybrid optimus shit mode... add "intel" for inner display to work
services.xserver.videoDrivers = [ "nvidia" "intel" ]; services.xserver.videoDrivers = [ "nvidia" ];
nixpkgs.config.cudaSupport = true; nixpkgs.config.cudaSupport = true;

View file

@ -13,4 +13,5 @@
hardware.bluetooth.enable = true; # enables support for Bluetooth hardware.bluetooth.enable = true; # enables support for Bluetooth
hardware.bluetooth.powerOnBoot = true; # powers up the default Bluetooth controller on boot hardware.bluetooth.powerOnBoot = true; # powers up the default Bluetooth controller on boot
} }

View file

@ -1,5 +1,11 @@
{ pkgs, ... }: { { pkgs, ... }: {
environment.systemPackages = with pkgs; [
lolcat # cool colors
figlet # ascii generator
];
# setting zsh as default shell # setting zsh as default shell
users.users.grape.shell = pkgs.zsh; users.users.grape.shell = pkgs.zsh;
programs.zsh.enable = true; programs.zsh.enable = true;
@ -7,6 +13,7 @@
home-manager.users.grape = { home-manager.users.grape = {
programs.zsh = { programs.zsh = {
enable = true; enable = true;
#defaultKeymap = "vicmd";
shellAliases = { shellAliases = {
# essentials # essentials
la = "ls -a"; la = "ls -a";
@ -23,6 +30,19 @@
#nix #nix
garbage = "nix-collect-garbage -d"; garbage = "nix-collect-garbage -d";
dev = "nix develop --command zsh";
# ssh
pink = "ssh pink@32.54.31.99";
yellow = "ssh root@32.54.31.5";
carbon = "ssh carbon@32.54.31.180";
lime = "ssh lime@32.54.31.241";
# remote deployment
deploy-carbon = "nixos-rebuild switch --flake .#carbon --target-host root@32.54.31.180 --show-trace";
deploy-lime = "nixos-rebuild switch --flake .#lime --target-host root@32.54.31.241 --show-trace";
deploy-pink = "nixos-rebuild switch --flake .#pink --target-host root@32.54.31.99 --show-trace";
# other # other
sget = "yt-dlp -x --audio-format flac --embed-metadata --add-metadata '$1'"; sget = "yt-dlp -x --audio-format flac --embed-metadata --add-metadata '$1'";
@ -34,8 +54,11 @@
ts = "timew stop"; ts = "timew stop";
}; };
# Cool rog logo (worth the ~2 seconds load time)
initExtra = '' initExtra = ''
PROMPT="[%M] %~ " # for cinny to work
WEBKIT_DISABLE_COMPOSITING_MODE=1
PROMPT="[%M] %~ "
''; '';
sessionVariables = { sessionVariables = {

17
etc/system/ssd.nix Normal file
View file

@ -0,0 +1,17 @@
{ pkgs, ... }: {
services.smartd = {
enable = true;
notifications.wall.enable = true;
devices = [
{
# System
device = "/dev/nvme1n1";
}
{
# Data
device = "/dev/nvme0n1";
}
];
};
}

View file

@ -1 +0,0 @@

View file

@ -1,3 +1,42 @@
### My nixos rice ### My nixos rice
![](./rice.png) ![](./rice.png)
This setup has a lot of impurities, for one firefox with aboslute paths and for another, all my home-manager definitions are for user `grape`. I could go around changing it but im lazy
# Keyboard shortcuts
| Modifier | name |
| ----------- | ---- |
| windows key | mod4 |
# shadow replay
| key-stroke | command | name |
| ---------- | ----------------------- | ----------------------- |
| mod4 + w | saves replay | w as in write to file |
| mod4 + a | start replay for screen | a as in all |
| mod4 + x | stops replay software | x as in kill |
| mod4 + s | focused window replay | s as in selected window |
# apps
| key-stroke | command |
| ---------- | -------------------------- |
| mod4 + d | rofi application launcher |
| mod4 + e | rofi calculator |
| mod4 + t | start terminal (allacrity) |
| mod4 + r | start firefox |
# languages
| key-stroke | command |
| ---------- | ------------ |
| mod4 + 1 | setxkbmap us |
| mod4 + 2 | setxkbmap hu |
# system
| key-stroke | command |
| --------------------- | ------------ |
| mod4 + shift + delete | shutdown now |