Merge branch 'master' of ssh://git.nx2.site:20022/nx2/dotfiles

This commit is contained in:
Lennart J. Kurzweg (Nx2)
2024-08-26 21:38:01 +02:00
15 changed files with 504 additions and 137 deletions

View File

@@ -1,7 +1,8 @@
{ pkgs, pkgs-unstable, lib, inputs, allowed, nvidia, ... }:
{ pkgs, inputs, ... }:
{
imports = [
inputs.sops-nix.nixosModules.sops
./system-modules/auto-mount.nix
./system-modules/hardware-configuration.nix
./system-modules/fuse.nix
./system-modules/nvidia.nix
@@ -17,7 +18,7 @@
./system-modules/gpg.nix
./system-modules/sops.nix
./system-modules/syncthing.nix
./system-modules/hsmw.nix # old
./system-modules/hsmw.nix
./system-modules/docker.nix
./system-modules/health_reminder.nix
./system-modules/ydotool.nix

View File

@@ -25,7 +25,7 @@ pkgs: rec {
xcolor = with ccolor; rec {
background = black.dark;
foreground = white.base;
border = cyan.base;
border = red.base;
border2 = blue.base;
accent = blue;
secondary = cyan;

117
flake.lock generated
View File

@@ -7,11 +7,11 @@
]
},
"locked": {
"lastModified": 1720553729,
"narHash": "sha256-9aM4MCBJn4UstcsSdukOFTxg79keUMTw9Kmqr7Wsfmw=",
"lastModified": 1724233980,
"narHash": "sha256-w0j/3OeSrpx+S8if1M2ONBsZvJQ1hBQkdTQEiMCHy7o=",
"owner": "KZDKM",
"repo": "Hyprspace",
"rev": "e8662093ae5b6e13a3cf1145d21d4804a3e84aeb",
"rev": "743ec37d02bb2b7261f28de16bf404cebfd96105",
"type": "github"
},
"original": {
@@ -40,11 +40,11 @@
]
},
"locked": {
"lastModified": 1721571743,
"narHash": "sha256-hat7wggtDISBJD8kTo5MTrT+IsY/Ha2MwgjmqqijoCA=",
"lastModified": 1724273991,
"narHash": "sha256-+aUSOXKGpS5CRm1oTitgNAr05ThQNbKIXalZHl3nC6Y=",
"owner": "hyprwm",
"repo": "aquamarine",
"rev": "601f6cf95cbe4fef02dc7faf34bba58566c914e9",
"rev": "9a3161ad4c78dc420d1cbb3aae638222608c7de4",
"type": "github"
},
"original": {
@@ -107,11 +107,11 @@
"nixpkgs-lib": "nixpkgs-lib"
},
"locked": {
"lastModified": 1719994518,
"narHash": "sha256-pQMhCCHyQGRzdfAkdJ4cIWiw+JNuWsTX7f0ZYSyz0VY=",
"lastModified": 1722555600,
"narHash": "sha256-XOQkdLafnb/p9ij77byFQjDf5m5QYl9b2REiVClC+x4=",
"owner": "hercules-ci",
"repo": "flake-parts",
"rev": "9227223f6d922fee3c7b190b2cc238a99527bbb7",
"rev": "8471fe90ad337a8074e957b69ca4d0089218391d",
"type": "github"
},
"original": {
@@ -218,11 +218,11 @@
]
},
"locked": {
"lastModified": 1721330371,
"narHash": "sha256-aYlHTWylczLt6ERJyg6E66Y/XSCbVL7leVcRuJmVbpI=",
"lastModified": 1722623071,
"narHash": "sha256-sLADpVgebpCBFXkA1FlCXtvEPu1tdEsTfqK1hfeHySE=",
"owner": "hyprwm",
"repo": "hyprcursor",
"rev": "4493a972b48f9c3014befbbf381ed5fff91a65dc",
"rev": "912d56025f03d41b1ad29510c423757b4379eb1c",
"type": "github"
},
"original": {
@@ -243,11 +243,11 @@
"xdph": "xdph"
},
"locked": {
"lastModified": 1721684218,
"narHash": "sha256-FbFz+F5LJs92s6/DEkhh2h+k8NRqqrs8MGF+GRZWZGo=",
"lastModified": 1724596623,
"narHash": "sha256-pLbNiAfpE8rW2e1Ih7Epi0LfyDmFv+UYU2BXg7Sj66U=",
"ref": "refs/heads/main",
"rev": "3c758db95c129ed6ca7ce0c1b5b82ad6e189488d",
"revCount": 4963,
"rev": "b672118f9238a48a18efd741cbcda387c5552238",
"revCount": 5136,
"submodules": true,
"type": "git",
"url": "https://github.com/hyprwm/Hyprland"
@@ -275,11 +275,11 @@
]
},
"locked": {
"lastModified": 1721668405,
"narHash": "sha256-ZnIXa+jeMXoerhRz/ZJwVoYHaROjcLyQsr1b6JZ2AjQ=",
"lastModified": 1723143591,
"narHash": "sha256-dPcWAeRJoG5CyWC32X3XX+Og0v/k1/S1N0T5dQWT32k=",
"owner": "hyprwm",
"repo": "hyprland-plugins",
"rev": "4c2cef8326711fbd91b7a313f095545eb50d2a57",
"rev": "b73d7b901d8cb1172dd25c7b7159f0242c625a77",
"type": "github"
},
"original": {
@@ -302,11 +302,11 @@
]
},
"locked": {
"lastModified": 1718746314,
"narHash": "sha256-HUklK5u86w2Yh9dOkk4FdsL8eehcOZ95jPhLixGDRQY=",
"lastModified": 1721326555,
"narHash": "sha256-zCu4R0CSHEactW9JqYki26gy8h9f6rHmSwj4XJmlHgg=",
"owner": "hyprwm",
"repo": "hyprland-protocols",
"rev": "1b61f0093afff20ab44d88ad707aed8bf2215290",
"rev": "5a11232266bf1a1f5952d5b179c3f4b2facaaa84",
"type": "github"
},
"original": {
@@ -331,11 +331,11 @@
]
},
"locked": {
"lastModified": 1721324361,
"narHash": "sha256-BiJKO0IIdnSwHQBSrEJlKlFr753urkLE48wtt0UhNG4=",
"lastModified": 1724174162,
"narHash": "sha256-fOOBLwil6M9QWMCiSULwjMQzrXhHXUnEqmjHX5ZHeVI=",
"owner": "hyprwm",
"repo": "hyprlang",
"rev": "adbefbf49664a6c2c8bf36b6487fd31e3eb68086",
"rev": "16e5c9465f04477d8a3dd48a0a26bf437986336c",
"type": "github"
},
"original": {
@@ -350,11 +350,11 @@
"nixpkgs": "nixpkgs_2"
},
"locked": {
"lastModified": 1719780938,
"narHash": "sha256-YocumFkp3FCgN3UCXp95EV7IvAwhQdlSav8cCB0oHv0=",
"lastModified": 1723307169,
"narHash": "sha256-gYfdNU65hqCLLzFG1WbNmkBbzHUKpSdeOBaeDEs34sM=",
"owner": "h3rmt",
"repo": "hyprswitch",
"rev": "4dbba183fcbaa63de64e973d5dc9bba883765aa3",
"rev": "a669b50adb9ba7790a5c1abaeecbd97ce42a842f",
"type": "github"
},
"original": {
@@ -376,11 +376,11 @@
]
},
"locked": {
"lastModified": 1721324102,
"narHash": "sha256-WAZ0X6yJW1hFG6otkHBfyJDKRpNP5stsRqdEuHrFRpk=",
"lastModified": 1722869141,
"narHash": "sha256-0KU4qhyMp441qfwbirNg3+wbm489KnEjXOz2I/RbeFs=",
"owner": "hyprwm",
"repo": "hyprutils",
"rev": "962582a090bc233c4de9d9897f46794280288989",
"rev": "0252fd13e78e60fb0da512a212e56007515a49f7",
"type": "github"
},
"original": {
@@ -441,11 +441,11 @@
},
"nixpkgs": {
"locked": {
"lastModified": 1721379653,
"narHash": "sha256-8MUgifkJ7lkZs3u99UDZMB4kbOxvMEXQZ31FO3SopZ0=",
"lastModified": 1724224976,
"narHash": "sha256-Z/ELQhrSd7bMzTO8r7NZgi9g5emh+aRKoCdaAv5fiO0=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "1d9c2c9b3e71b9ee663d11c5d298727dace8d374",
"rev": "c374d94f1536013ca8e92341b540eba4c22f9c62",
"type": "github"
},
"original": {
@@ -455,16 +455,32 @@
"type": "github"
}
},
"nixpkgs-latest": {
"locked": {
"lastModified": 1724604894,
"narHash": "sha256-ihWojFUzRYZ3i6xcxbzxMDAn5cX2FCtymu02MPjNA4c=",
"owner": "nixos",
"repo": "nixpkgs",
"rev": "669ce8b640c2ac856f714897aaffc5feb614ad57",
"type": "github"
},
"original": {
"owner": "nixos",
"ref": "master",
"repo": "nixpkgs",
"type": "github"
}
},
"nixpkgs-lib": {
"locked": {
"lastModified": 1719876945,
"narHash": "sha256-Fm2rDDs86sHy0/1jxTOKB1118Q0O3Uc7EC0iXvXKpbI=",
"lastModified": 1722555339,
"narHash": "sha256-uFf2QeW7eAHlYXuDktm9c25OxOyCoUOQmh5SZ9amE5Q=",
"type": "tarball",
"url": "https://github.com/NixOS/nixpkgs/archive/5daf0514482af3f97abaefc78a6606365c9108e2.tar.gz"
"url": "https://github.com/NixOS/nixpkgs/archive/a5d394176e64ab29c852d03346c1fc9b0b7d33eb.tar.gz"
},
"original": {
"type": "tarball",
"url": "https://github.com/NixOS/nixpkgs/archive/5daf0514482af3f97abaefc78a6606365c9108e2.tar.gz"
"url": "https://github.com/NixOS/nixpkgs/archive/a5d394176e64ab29c852d03346c1fc9b0b7d33eb.tar.gz"
}
},
"nixpkgs-stable": {
@@ -501,11 +517,11 @@
},
"nixpkgs-unstable": {
"locked": {
"lastModified": 1721562059,
"narHash": "sha256-Tybxt65eyOARf285hMHIJ2uul8SULjFZbT9ZaEeUnP8=",
"lastModified": 1724224976,
"narHash": "sha256-Z/ELQhrSd7bMzTO8r7NZgi9g5emh+aRKoCdaAv5fiO0=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "68c9ed8bbed9dfce253cc91560bf9043297ef2fe",
"rev": "c374d94f1536013ca8e92341b540eba4c22f9c62",
"type": "github"
},
"original": {
@@ -547,11 +563,11 @@
},
"nixpkgs_4": {
"locked": {
"lastModified": 1721548954,
"narHash": "sha256-7cCC8+Tdq1+3OPyc3+gVo9dzUNkNIQfwSDJ2HSi2u3o=",
"lastModified": 1724316499,
"narHash": "sha256-Qb9MhKBUTCfWg/wqqaxt89Xfi6qTD3XpTzQ9eXi3JmE=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "63d37ccd2d178d54e7fb691d7ec76000740ea24a",
"rev": "797f7dc49e0bc7fab4b57c021cdf68f595e47841",
"type": "github"
},
"original": {
@@ -600,6 +616,7 @@
"hyprswitch": "hyprswitch",
"lanzaboote": "lanzaboote",
"nixpkgs": "nixpkgs_4",
"nixpkgs-latest": "nixpkgs-latest",
"nixpkgs-unstable": "nixpkgs-unstable",
"sops-nix": "sops-nix"
}
@@ -637,11 +654,11 @@
"nixpkgs-stable": "nixpkgs-stable_2"
},
"locked": {
"lastModified": 1721688883,
"narHash": "sha256-9jsjsRKtJRqNSTXKj9zuDFRf2PGix30nMx9VKyPgD2U=",
"lastModified": 1723501126,
"narHash": "sha256-N9IcHgj/p1+2Pvk8P4Zc1bfrMwld5PcosVA0nL6IGdE=",
"owner": "Mic92",
"repo": "sops-nix",
"rev": "aff2f88277dabe695de4773682842c34a0b7fd54",
"rev": "be0eec2d27563590194a9206f551a6f73d52fa34",
"type": "github"
},
"original": {
@@ -697,11 +714,11 @@
]
},
"locked": {
"lastModified": 1721648131,
"narHash": "sha256-cyyxu/oj4QEFp3CVx2WeXa9T4OAUyynuBJHGkBZSxJI=",
"lastModified": 1724073926,
"narHash": "sha256-nWlUL43jOFHf+KW6Hqrx+W/r1XdXuDyb0wC/SrHsOu4=",
"owner": "hyprwm",
"repo": "xdg-desktop-portal-hyprland",
"rev": "663be9cad424b170b28b9fa8a61042d721007f3b",
"rev": "a08ecbbf33598924e93542f737fc6169a26b481e",
"type": "github"
},
"original": {

View File

@@ -4,6 +4,7 @@
inputs = {
nixpkgs = { url = "nixpkgs/nixos-24.05"; };
nixpkgs-unstable = { url = "nixpkgs/nixos-unstable"; };
nixpkgs-latest = { url = "github:nixos/nixpkgs?ref=master"; };
home-manager = { url = "github:nix-community/home-manager/release-24.05"; inputs.nixpkgs.follows = "nixpkgs"; };
sops-nix = { url = "github:Mic92/sops-nix"; inputs.nixpkgs.follows = "nixpkgs"; };
lanzaboote = { url = "github:nix-community/lanzaboote/v0.3.0"; };
@@ -16,7 +17,7 @@
# firefox-addons = { url = "gitlab:rycee/nur-expressions?dir=pkgs/firefox-addons"; inputs.nixpkgs.follows = "nixpkgs"; };
};
outputs = { self, nixpkgs, nixpkgs-unstable, home-manager, ... }@inputs: let
outputs = { self, nixpkgs, nixpkgs-unstable, nixpkgs-latest, home-manager, ... }@inputs: let
system = "x86_64-linux";
user = "nx2";
@@ -24,6 +25,7 @@
pkgs = import nixpkgs { inherit system config; };
pkgs-unstable = import nixpkgs-unstable { inherit system config; };
pkgs-latest = import nixpkgs-latest { inherit system config; };
nvidia-set = import ./flake-modules/nvidia.nix;
secrets = import ./git-crypt/secrets.nix;
@@ -38,7 +40,7 @@
enable = if (host == "NxXPS" || host == "NxNORTH") then true else false;
prime = if (host == "NxXPS") then true else false;
};
in { inherit inputs user host pkgs-unstable secrets rice nvidia; };
in { inherit inputs user host pkgs-unstable pkgs-latest secrets rice nvidia; };
};
in {
NxXPS = make-nixos-system "NxXPS";
@@ -55,7 +57,7 @@
enable = if (host == "NxXPS" || host == "NxNORTH") then true else false;
prime = if (host == "NxXPS") then true else false;
};
in { inherit inputs system user host pkgs-unstable rice secrets nvidia; };
in { inherit inputs system user host pkgs-unstable pkgs-latest rice secrets nvidia; };
};
in {
"${user}@NxXPS" = make-home-configuration "NxXPS" user;

View File

@@ -0,0 +1,7 @@
{ ... }:
{
services.udiskie = {
enable = true;
notify = true;
};
}

14
home-modules/direnv.nix Executable file
View File

@@ -0,0 +1,14 @@
{ lib, user, ... }:
lib.mkIf (user != "tv")
{
programs = {
direnv = {
enable = true;
# enableBashIntegration = true;
nix-direnv.enable = true;
config = {
hide_env_diff = true;
};
};
};
}

270
home-modules/foot.nix Normal file
View File

@@ -0,0 +1,270 @@
{ config, pkgs, rice, lib, user, ... }:
lib.mkIf (user != "tv")
{
home.packages = with pkgs; [
foot
];
programs.foot = {
enable = true;
# background = rice.color.background;
# foreground = rice.color.foreground;
# cursor = rice.color.foreground;
# color0 = rice.color.black.base;
# color8 = rice.color.black.bright;
# color1 = rice.color.red.base;
# color9 = rice.color.red.bright;
# color2 = rice.color.green.base;
# color10 = rice.color.green.bright;
# color3 = rice.color.yellow.base;
# color11 = rice.color.yellow.bright;
# color4 = rice.color.blue.base;
# color12 = rice.color.blue.bright;
# color5 = rice.color.magenta.base;
# color13 = rice.color.magenta.bright;
# color6 = rice.color.cyan.base;
# color14 = rice.color.cyan.bright;
# color7 = rice.color.white.base;
# color15 = rice.color.white.bright;
# background_opacity = builtins.toString rice.transparency;
# window_padding_width = 5;
# remember_window_size = false;
# settings = {
# main = {
# shell = ''$SHELL (if set, otherwise user's default shell from /etc/passwd)'';
# term = ''foot (or xterm-256color if built with -Dterminfo=disabled)'';
# login-shell = ''no'';
# # app-id = ''foot'';
# title = ''foot'';
# locked-title = ''no'';
# font = ''${rice.font.code.name}:size=8'';
# font-size-adjustment = ''0.5'';
# line-height = "<font metrics>";
# letter-spacing = ''0'';
# horizontal-letter-offset = ''0'';
# vertical-letter-offset = ''0'';
# underline-offset = "<font metrics>";
# underline-thickness = "<font underline thickness>";
# # box-drawings-uses-font-glyphs = "no";
# # dpi-aware = ''no'';
# # initial-window-size-pixels = ''700x500'';
# # initial-window-size-chars = "<COLSxROWS>";
# # initial-window-mode = ''windowed'';
# pad = ''5x5'';
# resize-by-cells = ''yes'';
# resize-keep-grid = ''yes'';
# resize-delay-ms = ''100'';
# # bold-text-in-bright = false;
# word-delimiters = '',│`|:"'()[]{}<>'';
# selection-target = ''primary'';
# workers = "<number of logical CPUs>";
# utmp-helper = ''/usr/lib/utempter/utempter'';
# # environment = {
# # name = ''value'';
# # };
# };
# bell = {
# urgent = ''no'';
# notify = ''no'';
# visual = ''no'';
# command = '''';
# command-focused = ''no'';
# };
# desktop-notifications = {
# command = ''notify-send --wait --app-name ''${app-id} --icon ''${app-id} --category ''${category} --urgency ''${urgency} --expire-time ''${expire-time} --hint STRING:image-path:''${icon} --hint BOOLEAN:suppress-sound:''${muted} --hint STRING:sound-name:''${sound-name} --replace-id ''${replace-id} ''${action-argument} --print-id -- ''${title} ''${body}'';
# command-action-argument = ''--action ''${action-name}=''${action-label}'';
# close = ''""'';
# inhibit-when-focused = ''yes'';
# };
# scrollback = {
# lines = ''1000'';
# multiplier = ''3.0'';
# indicator-position = ''relative'';
# indicator-format = ''""'';
# };
# url = {
# launch = ''xdg-open ''${url}'';
# label-letters = ''sadfjklewcmpgh'';
# osc8-underline = ''url-mode'';
# protocols = ''http, https, ftp, ftps, file, gemini, gopher'';
# uri-characters = ''abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789-_.,~:;/?#@!$&%*+="'()[]'';
# };
# cursor = {
# style = ''block'';
# color = "<inverse foreground/background>";
# blink = ''no'';
# blink-rate = ''500'';
# beam-thickness = ''1.5'';
# underline-thickness = "<font underline thickness>";
# };
# mouse = {
# hide-when-typing = ''no'';
# alternate-scroll-mode = ''yes'';
# };
# touch = {
# long-press-delay = ''400'';
# };
# colors = {
# alpha = ''1.0'';
# background = ''242424'';
# foreground = ''ffffff'';
# flash = ''7f7f00'';
# flash-alpha = ''0.5'';
# # Normal/regular colors (color palette 0-7)
# regular0 = ''242424'';
# regular1 = ''f62b5a'';
# regular2 = ''47b413'';
# regular3 = ''e3c401'';
# regular4 = ''24acd4'';
# regular5 = ''f2affd'';
# regular6 = ''13c299'';
# regular7 = ''e6e6e6'';
# # Bright colors (color palette 8-15)
# bright0 = ''616161'';
# bright1 = ''ff4d51'';
# bright2 = ''35d450'';
# bright3 = ''e9e836'';
# bright4 = ''5dc5f8'';
# bright5 = ''feabf2'';
# bright6 = ''24dfc4'';
# bright7 = ''ffffff'';
# # dimmed colors (see foot.ini(5) man page)
# # dim0 = "<not set>";
# # ...
# # dim7 = "<not-set>";
# # The remaining 256-color palette
# # 16 = <256-color palette #16>
# # ...
# # 255 = <256-color palette #255>
# # Misc colors
# selection-foreground = "<inverse foreground/background>";
# selection-background = "<inverse foreground/background>";
# jump-labels = "<regular0> <regular3>";
# scrollback-indicator = "<regular0> <bright4>";
# search-box-no-match = "<regular0> <regular1>";
# search-box-match = "<regular0> <regular3>";
# urls = "<regular3>";
# };
# csd = {
# preferred = ''server'';
# size = ''26'';
# font = "<primary font>";
# color = "<foreground color>";
# hide-when-maximized = ''no'';
# double-click-to-maximize = ''yes'';
# border-width = ''0'';
# border-color = "<csd.color>";
# button-width = ''26'';
# button-color = "<background color>";
# button-minimize-color = "<regular4>";
# button-maximize-color = "<regular2>";
# button-close-color = "<regular1>";
# };
# key-bindings = {
# scrollback-up-page = ''Shift+Page_Up'';
# scrollback-up-half-page = ''none'';
# scrollback-up-line = ''none'';
# scrollback-down-page = ''Shift+Page_Down'';
# scrollback-down-half-page = ''none'';
# scrollback-down-line = ''none'';
# scrollback-home = ''none'';
# scrollback-end = ''none'';
# clipboard-copy = ''Control+Shift+c XF86Copy'';
# clipboard-paste = ''Control+Shift+v XF86Paste'';
# primary-paste = ''Shift+Insert'';
# search-start = ''Control+Shift+r'';
# font-increase = ''Control+plus Control+equal Control+KP_Add'';
# font-decrease = ''Control+minus Control+KP_Subtract'';
# font-reset = ''Control+0 Control+KP_0'';
# spawn-terminal = ''Control+Shift+n'';
# minimize = ''none'';
# maximize = ''none'';
# fullscreen = ''none'';
# pipe-visible = ''[sh -c "xurls | fuzzel | xargs -r firefox"] none'';
# pipe-scrollback = ''[sh -c "xurls | fuzzel | xargs -r firefox"] none'';
# pipe-selected = ''[xargs -r firefox] none'';
# pipe-command-output = ''[wl-copy] none'';
# show-urls-launch = ''Control+Shift+o'';
# show-urls-copy = ''none'';
# show-urls-persistent = ''none'';
# prompt-prev = ''Control+Shift+z'';
# prompt-next = ''Control+Shift+x'';
# unicode-input = ''Control+Shift+u'';
# noop = ''none'';
# };
# search-bindings = {
# cancel = ''Control+g Control+c Escape'';
# commit = ''Return'';
# find-prev = ''Control+r'';
# find-next = ''Control+s'';
# cursor-left = ''Left Control+b'';
# cursor-left-word = ''Control+Left Mod1+b'';
# cursor-right = ''Right Control+f'';
# cursor-right-word = ''Control+Right Mod1+f'';
# cursor-home = ''Home Control+a'';
# cursor-end = ''End Control+e'';
# delete-prev = ''BackSpace'';
# delete-prev-word = ''Mod1+BackSpace Control+BackSpace'';
# delete-next = ''Delete'';
# delete-next-word = ''Mod1+d Control+Delete'';
# extend-char = ''Shift+Right'';
# extend-to-word-boundary = ''Control+w Control+Shift+Right'';
# extend-to-next-whitespace = ''Control+Shift+w'';
# extend-line-down = ''Shift+Down'';
# extend-backward-char = ''Shift+Left'';
# extend-backward-to-word-boundary = ''Control+Shift+Left'';
# extend-backward-to-next-whitespace = ''none'';
# extend-line-up = ''Shift+Up'';
# clipboard-paste = ''Control+v Control+Shift+v Control+y XF86Paste'';
# primary-paste = ''Shift+Insert'';
# unicode-input = ''none'';
# quit = ''none'';
# scrollback-up-page = ''Shift+Page_Up'';
# scrollback-up-half-page = ''none'';
# scrollback-up-line = ''none'';
# scrollback-down-page = ''Shift+Page_Down'';
# scrollback-down-half-page = ''none'';
# scrollback-down-line = ''none'';
# scrollback-home = ''none'';
# scrollback-end = ''none'';
# };
# url-bindings = {
# cancel = ''Control+g Control+c Control+d Escape'';
# toggle-url-visible = ''t'';
# };
# text-bindings = {
# "\x03" = ''Mod4+c'';
# };
# mouse-bindings = {
# scrollback-up-mouse = ''BTN_WHEEL_BACK'';
# scrollback-down-mouse = ''BTN_WHEEL_FORWARD'';
# font-increase = ''Control+BTN_WHEEL_BACK'';
# font-decrease = ''Control+BTN_WHEEL_FORWARD'';
# selection-override-modifiers = ''Shift'';
# primary-paste = ''BTN_MIDDLE'';
# select-begin = ''BTN_LEFT'';
# select-begin-block = ''Control+BTN_LEFT'';
# select-extend = ''BTN_RIGHT'';
# select-extend-character-wise = ''Control+BTN_RIGHT'';
# select-word = ''BTN_LEFT-2'';
# select-word-whitespace = ''Control+BTN_LEFT-2'';
# select-quote = ''BTN_LEFT-3'';
# select-row = ''BTN_LEFT-4'';
# # vim: ft = ''dosini'';
# };
# };
};
}

View File

@@ -5,6 +5,9 @@
nixfmt-classic # nix formater
nil # nix language server
python311Packages.python-lsp-server
ruff
ruff-lsp
pyright
lldb # debugger for llvm stuff
yaml-language-server # yaml
marksman # markdown
@@ -73,12 +76,39 @@
file-types = [ "md" "MD" ];
scope = "text.<name>";
}
# {
# name = "python";
# transport = "stdio";
# command = "python3";
# args = ["-m" "debugpy.adapter"];
# }
{
name = "python";
language-servers = [ "pyright" "ruff" ];
formatter = {
command = "ruff";
args = [
"format"
"--line-length"
"120"
"-"
];
};
debugger = {
name = "debugpy";
transport = "stdio";
command = "python";
args = [ "-m" "debugpy.adapter" ];
templates = [{
name = "source";
request = "launch";
completion = [{
name = "entrypoint";
completion = "filename";
default = ".";
}];
args = {
mode = "debug";
program = "{0}";
};
}];
};
}
];
language-server = {
"style-check" = {
@@ -87,6 +117,26 @@
"language-tool" = {
command = lib.getExe pkgs.ltex-ls;
};
"ruff" = {
command = "ruff-lsp";
config.settings.args = [
# Set line length
# "--line-length"
# "79"
# Enable some ruff rules
# "--select"
# (
# "F,W,E,I,N,D200,D201,D202,D203,D204,D205,D206,D207,D208,D209,D210,D211,"
# + "D212,D213,D214,D215,D300,D301,D400,D401,D402,D403,D404,D405,D406,"
# + "D407,D408,D409,D410,D411,D412,D413,D414,D415,D416,D417,D418,D419,"
# + "UP,YTT,TRIO,ASYNC,B,A,COM,C4,DTZ,T10,DJ,EXE,FA,ISC,ICN001,G010,"
# + "G101,G201,G202,INP,PIE,Q,RSE,RET,SLOT,SIM,TCH,INT,ARG,PTH,TD001,"
# + "TD004,TD005,TD006,TD007,PD,PL,TRY004,TRY200,TRY201,TRY302,TRY400,"
# + "TRY401,FLY,NPY,AIR,PERF,FURB,LOG,RUF"
# )
];
};
};
};
themes = {

View File

@@ -55,6 +55,7 @@ lib.mkIf (user != "tv")
blueman-manager = "󰂯"
Alacritty = ""
zoom = "󰬡"
spotify = ""
[class_active]
"(?i)ExampleOneTerm" = "icon"
@@ -75,6 +76,9 @@ lib.mkIf (user != "tv")
[initial_title_in_class]
[initial_title]
"Spotify Premium" = ""
[initial_title_in_class_active]
[initial_title_in_initial_class]

View File

@@ -247,7 +247,6 @@ lib.mkIf (user != "tv")
"waybar "
"hyprpaper -n "
"swww-daemon"
"= /home/nx2/scripts/swww-randomize.sh"
"hyprland-autoname-workspaces"
"/usr/lib/polkit-kde-authentication-agent-1 "
"dbus-update-activation-environment --systemd WAYLAND_DISPLAY XDG_CURRENT_DESKTOP"
@@ -459,8 +458,8 @@ lib.mkIf (user != "tv")
## MEGA KEYS:
'' , Print, exec, grim -g "$(slurp)"''
"SUPER, Next, resizeactive, 100 -100"
"SUPER, Prior, resizeactive, -100 100"
# "SUPER, Next, resizeactive, 5% 5%" # binde
# "SUPER, Prior, resizeactive, -5% -5%" # binde
###########################################################################
## FN KEYS:
@@ -492,6 +491,8 @@ lib.mkIf (user != "tv")
];
binde = [
# "SUPER, TAB, exec, hyprswitch --daemon --do-initial-execute"
"SUPER, Next, resizeactive, 10% 10%"
"SUPER, Prior, resizeactive, -10% -10%"
];
};

View File

@@ -43,7 +43,7 @@ lib.mkIf (user != "tv")
image = [
{ run = ''imv "$@"''; desc = "imv";}
{ run = ''gimp "$@"''; desc = "gimp";}
{ run = ''swww img "$@"''; desc = "swww wallpaper";}
{ run = ''swww img --transition-type wipe --transition-angle 60 --transition-step 120 --transition-fps 120 "$@"''; desc = "swww wallpaper";}
];
font = [
{ run = ''fontpreview "$@"''; desc = "fontpreview"; }

104
home.nix
View File

@@ -1,63 +1,53 @@
{ pkgs, pkgs-unstable, lib, host, user, ... }:
{
imports = [
./home-modules/vscode.nix
./home-modules/nvidia.nix
# ./home-modules/firefox.nix
./home-modules/discord.nix
./home-modules/matrix.nix
./home-modules/chatterino.nix
./home-modules/email.nix
./home-modules/bitwarden.nix
./home-modules/virt-manager.nix
./home-modules/office.nix
./home-modules/obs.nix
./home-modules/sent.nix
./home-modules/gestures.nix
./home-modules/pnx.nix
./home-modules/hyprland.nix
./home-modules/hyprland-autoname-workspaces.nix
./home-modules/waybar.nix
./home-modules/nx-gcal-event.nix
./home-modules/wlogout.nix
./home-modules/rofi.nix
./home-modules/games.nix
./home-modules/kitty.nix
./home-modules/fish.nix
./home-modules/auto-mount.nix
./home-modules/bash.nix
./home-modules/starship.nix
./home-modules/helix.nix
./home-modules/vale.nix
./home-modules/yazi.nix
./home-modules/zoxide.nix
./home-modules/nh.nix
./home-modules/ssh.nix
./home-modules/gpg.nix
./home-modules/sops.nix
./home-modules/git.nix
./home-modules/mako.nix
./home-modules/gtk.nix
./home-modules/qt.nix
./home-modules/latex.nix
./home-modules/pandoc.nix
./home-modules/programming/python.nix
./home-modules/programming/c.nix
./home-modules/programming/node.nix
./home-modules/programming/gleam.nix
./home-modules/bitwarden.nix
./home-modules/chatterino.nix
./home-modules/color-pallete.nix
];
./home-modules/direnv.nix
./home-modules/discord.nix
./home-modules/email.nix
# ./home-modules/firefox.nix
./home-modules/fish.nix
# ./home-modules/foot.nix
./home-modules/games.nix
./home-modules/gestures.nix
./home-modules/git.nix
./home-modules/gpg.nix
./home-modules/gtk.nix
./home-modules/helix.nix
./home-modules/hyprland-autoname-workspaces.nix
./home-modules/hyprland.nix
./home-modules/kitty.nix
./home-modules/latex.nix
./home-modules/mako.nix
./home-modules/matrix.nix
./home-modules/nh.nix
./home-modules/nvidia.nix
./home-modules/nx-gcal-event.nix
./home-modules/obs.nix
./home-modules/office.nix
./home-modules/pandoc.nix
./home-modules/pnx.nix
./home-modules/programming/c.nix
./home-modules/programming/gleam.nix
./home-modules/programming/node.nix
./home-modules/programming/python.nix
./home-modules/qt.nix
./home-modules/rofi.nix
./home-modules/sent.nix
./home-modules/sops.nix
./home-modules/ssh.nix
./home-modules/starship.nix
./home-modules/vale.nix
./home-modules/virt-manager.nix
./home-modules/vscode.nix
./home-modules/waybar.nix
./home-modules/wlogout.nix
./home-modules/yazi.nix
./home-modules/zoxide.nix ];
home.username = user;
home.homeDirectory = "/home/${user}";
home.stateVersion = "24.05";
@@ -93,14 +83,14 @@
xclip
xournal
] ++ (with pkgs-unstable; [
obsidian
firefox
]) ++ (if host != "NxACE" then (with pkgs; [
signal-desktop
obsidian
zoom-us
gimp
inkscape
]) else (with pkgs; [
]) else (with pkgs-unstable; [
]));

View File

@@ -0,0 +1,4 @@
{ ... }:
{
services.udisks2.enable = true;
}

View File

@@ -4,12 +4,9 @@
(modulesPath + "/installer/scan/not-detected.nix")
];
environment.systemPackages = if host == "NxNORTH" then with pkgs; [
environment.systemPackages = with pkgs; [
ntfs3g
btrfs-progs
] else if host == "NxXPS" then with pkgs; [
ntfs3g
] else [];
];
boot.initrd.availableKernelModules = [ "xhci_pci" "thunderbolt" "vmd" "nvme" "usb_storage" "sd_mod" "rtsx_pci_sdmmc" ];
# boot.initrd.kernelModules = [ ];
@@ -19,7 +16,7 @@
fileSystems = if host != "NxACE" then {
"/" = { device = "/dev/disk/by-label/nixos"; fsType = "ext4"; };
"/boot" = { device = "/dev/disk/by-label/EFI"; fsType = "vfat"; };
"/home/${user}/shared" = { device = "/dev/disk/by-label/shared"; fsType = if host == "NxXPS" then "ntfs" else "btrfs"; };
"/home/${user}/shared" = { device = "/dev/disk/by-label/shared"; fsType = "ntfs"; };
} else {
"/" = { device = "/dev/disk/by-label/nixos"; fsType = "ext4"; };
"/boot" = { device = "/dev/disk/by-label/EFI"; fsType = "vfat"; };

View File

@@ -1,12 +1,22 @@
{ pkgs, pkgs-unstable, lib, host, nvidia, ... }:
let p = pkgs-unstable; in
{
environment.systemPackages = with p; [
ollama
];
{ pkgs, pkgs-unstable, pkgs-latest, lib, host, nvidia, ... }:
let
p = pkgs-latest.ollama;
# p = pkgs-unstable.ollama.overrideAttrs (oldAttrs: rec {
# inherit (oldAttrs) pname;
# version = "0.3.0";
# src = pkgs.fetchFromGitHub {
# owner = "ollama";
# repo = "ollama";
# rev = "v${version}";
# hash = "sha256-69CpRAggx6a1NJq+CA9QliXuUbDgC1ERRuA3y17KVAM=";
# fetchSubmodules = true;
# };
# });
in {
environment.systemPackages = [ p ];
services.ollama = {
package = p.ollama;
package = p;
enable = true;
acceleration = lib.mkIf nvidia.enable "cuda";
listenAddress = if host == "NxACE" then "0.0.0.0:11434" else "127.0.0.1:11434";