mirror of
https://github.com/Theaninova/TheaninovOS.git
synced 2025-12-11 02:56:27 +00:00
feat: use nixfmt
This commit is contained in:
154
flake.nix
154
flake.nix
@@ -18,88 +18,82 @@
|
||||
hyprland.url = "github:hyprwm/hyprland";
|
||||
};
|
||||
|
||||
outputs = {
|
||||
nixpkgs,
|
||||
nur,
|
||||
home-manager,
|
||||
ags,
|
||||
nixvim,
|
||||
anyrun,
|
||||
hyprland,
|
||||
...
|
||||
} @ inputs: let
|
||||
inherit (nixpkgs.lib) genAttrs listToAttrs;
|
||||
eachSystem = genAttrs ["x86_64-linux"];
|
||||
legacyPackages = eachSystem (system:
|
||||
import nixpkgs {
|
||||
inherit system;
|
||||
config = {
|
||||
allowUnfree = true;
|
||||
allowUnsupportedSystem = true;
|
||||
experimental-features = "nix-command flakes";
|
||||
substituters = ["https://hyprland.cachix.org" "https://cuda-maintainers.cachix.org"];
|
||||
trusted-public-keys = [
|
||||
"hyprland.cachix.org-1:a7pgxzMz7+chwVL3/pzj6jIBMioiJM7ypFP8PwtkuGc="
|
||||
"cuda-maintainers.cachix.org-1:0dq3bujKpuEPMCX6U4WylrUDZ9JyUG0VpVZa7CNfq5E="
|
||||
];
|
||||
};
|
||||
overlays = [
|
||||
nur.overlay
|
||||
(final: prev: {
|
||||
anyrunPlugins = anyrun.packages.${prev.system};
|
||||
hyprland = hyprland.packages.${prev.system}.hyprland;
|
||||
xdg-desktop-portal-hyprland = hyprland.packages.${prev.system}.xdg-desktop-portal-hyprland;
|
||||
ags = ags.packages.${prev.system}.default;
|
||||
gbmonctl = prev.callPackage ./overlays/gbmonctl {};
|
||||
lpc21isp = prev.callPackage ./overlays/lpc21isp {};
|
||||
cura = prev.appimageTools.wrapType2 rec {
|
||||
name = "cura";
|
||||
version = "5.6.0";
|
||||
src = prev.fetchurl {
|
||||
url = "https://github.com/Ultimaker/Cura/releases/download/${version}/UltiMaker-Cura-${version}-linux-X64.AppImage";
|
||||
hash = "sha256-EHiWoNpLKHPzv6rZrtNgEr7y//iVcRYeV/TaCn8QpEA=";
|
||||
outputs =
|
||||
{ nixpkgs, nur, home-manager, ags, nixvim, anyrun, hyprland, ... }@inputs:
|
||||
let
|
||||
inherit (nixpkgs.lib) genAttrs listToAttrs;
|
||||
eachSystem = genAttrs [ "x86_64-linux" ];
|
||||
legacyPackages = eachSystem (system:
|
||||
import nixpkgs {
|
||||
inherit system;
|
||||
config = {
|
||||
allowUnfree = true;
|
||||
allowUnsupportedSystem = true;
|
||||
experimental-features = "nix-command flakes";
|
||||
substituters = [
|
||||
"https://hyprland.cachix.org"
|
||||
"https://cuda-maintainers.cachix.org"
|
||||
];
|
||||
trusted-public-keys = [
|
||||
"hyprland.cachix.org-1:a7pgxzMz7+chwVL3/pzj6jIBMioiJM7ypFP8PwtkuGc="
|
||||
"cuda-maintainers.cachix.org-1:0dq3bujKpuEPMCX6U4WylrUDZ9JyUG0VpVZa7CNfq5E="
|
||||
];
|
||||
};
|
||||
overlays = [
|
||||
nur.overlay
|
||||
(final: prev: {
|
||||
anyrunPlugins = anyrun.packages.${prev.system};
|
||||
hyprland = hyprland.packages.${prev.system}.hyprland;
|
||||
xdg-desktop-portal-hyprland =
|
||||
hyprland.packages.${prev.system}.xdg-desktop-portal-hyprland;
|
||||
ags = ags.packages.${prev.system}.default;
|
||||
gbmonctl = prev.callPackage ./overlays/gbmonctl { };
|
||||
lpc21isp = prev.callPackage ./overlays/lpc21isp { };
|
||||
cura = prev.appimageTools.wrapType2 rec {
|
||||
name = "cura";
|
||||
version = "5.6.0";
|
||||
src = prev.fetchurl {
|
||||
url =
|
||||
"https://github.com/Ultimaker/Cura/releases/download/${version}/UltiMaker-Cura-${version}-linux-X64.AppImage";
|
||||
hash = "sha256-EHiWoNpLKHPzv6rZrtNgEr7y//iVcRYeV/TaCn8QpEA=";
|
||||
};
|
||||
extraPkgs = pkgs: with pkgs; [ ];
|
||||
};
|
||||
extraPkgs = pkgs: with pkgs; [];
|
||||
};
|
||||
})
|
||||
];
|
||||
});
|
||||
})
|
||||
];
|
||||
});
|
||||
|
||||
mkHost = {
|
||||
hostname,
|
||||
username,
|
||||
desktop,
|
||||
system,
|
||||
stateVersion,
|
||||
}:
|
||||
nixpkgs.lib.nixosSystem {
|
||||
pkgs = legacyPackages.${system};
|
||||
modules = [
|
||||
./modules/nixos/hid-fanatecff
|
||||
./modules/nixos/gbmonctl
|
||||
./hosts/${hostname}
|
||||
home-manager.nixosModules.home-manager
|
||||
{
|
||||
_module.args = {inherit username;};
|
||||
networking.hostName = hostname;
|
||||
system.stateVersion = stateVersion;
|
||||
home-manager = {
|
||||
useGlobalPkgs = true;
|
||||
useUserPackages = true;
|
||||
extraSpecialArgs = {inherit username desktop stateVersion inputs;};
|
||||
users.${username} = import ./home;
|
||||
};
|
||||
}
|
||||
];
|
||||
specialArgs = inputs;
|
||||
mkHost = { hostname, username, desktop, system, stateVersion, }:
|
||||
nixpkgs.lib.nixosSystem {
|
||||
pkgs = legacyPackages.${system};
|
||||
modules = [
|
||||
./modules/nixos/hid-fanatecff
|
||||
./modules/nixos/gbmonctl
|
||||
./hosts/${hostname}
|
||||
home-manager.nixosModules.home-manager
|
||||
{
|
||||
_module.args = { inherit username; };
|
||||
networking.hostName = hostname;
|
||||
system.stateVersion = stateVersion;
|
||||
home-manager = {
|
||||
useGlobalPkgs = true;
|
||||
useUserPackages = true;
|
||||
extraSpecialArgs = {
|
||||
inherit username desktop stateVersion inputs;
|
||||
};
|
||||
users.${username} = import ./home;
|
||||
};
|
||||
}
|
||||
];
|
||||
specialArgs = inputs;
|
||||
};
|
||||
in {
|
||||
nixosConfigurations.MONSTER = mkHost {
|
||||
hostname = "MONSTER";
|
||||
username = "theaninova";
|
||||
desktop = "hyprland";
|
||||
system = "x86_64-linux";
|
||||
stateVersion = "23.05";
|
||||
};
|
||||
in {
|
||||
nixosConfigurations.MONSTER = mkHost {
|
||||
hostname = "MONSTER";
|
||||
username = "theaninova";
|
||||
desktop = "hyprland";
|
||||
system = "x86_64-linux";
|
||||
stateVersion = "23.05";
|
||||
};
|
||||
};
|
||||
}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
{config, ...}: {
|
||||
{ config, ... }: {
|
||||
xdg.enable = true;
|
||||
xdg.userDirs.enable = true;
|
||||
home.sessionVariables = {
|
||||
@@ -7,7 +7,8 @@
|
||||
NPM_CONFIG_CACHE = "${config.xdg.cacheHome}/npm";
|
||||
NPM_CONFIG_TMP = "${config.xdg.stateHome}/npm";
|
||||
WINEPREFIX = "${config.xdg.configHome}/wineprefixes/default";
|
||||
_JAVA_OPTGRADLE_USER_HOMEIONS = ''-Djava.util.prefs.userRoot="${config.xdg.configHome}"/java'';
|
||||
_JAVA_OPTGRADLE_USER_HOMEIONS =
|
||||
''-Djava.util.prefs.userRoot="${config.xdg.configHome}"/java'';
|
||||
GRADLE_USER_HOME = "${config.xdg.configHome}/gradle";
|
||||
DVDCSS_CACHE = "${config.xdg.cacheHome}/dvdcss";
|
||||
DOCKER_CONFIG = "${config.xdg.configHome}/docker";
|
||||
|
||||
@@ -1,11 +1,4 @@
|
||||
{
|
||||
username,
|
||||
desktop,
|
||||
stateVersion,
|
||||
osConfig,
|
||||
inputs,
|
||||
...
|
||||
}: rec {
|
||||
{ username, desktop, stateVersion, osConfig, inputs, ... }: rec {
|
||||
home = {
|
||||
inherit username stateVersion;
|
||||
homeDirectory = "/home/${username}";
|
||||
|
||||
39
home/desktops/hyprland/anyrun.css
Normal file
39
home/desktops/hyprland/anyrun.css
Normal file
@@ -0,0 +1,39 @@
|
||||
* {
|
||||
font-family: "NotoSans NF";
|
||||
}
|
||||
|
||||
window#window {
|
||||
background: transparent;
|
||||
}
|
||||
|
||||
box#main {
|
||||
background: rgba(48, 52, 70, 0.4);
|
||||
box-shadow: 0 0 15px rgba(0, 0, 0, 0.29);
|
||||
border-radius: 24px;
|
||||
}
|
||||
|
||||
entry#entry {
|
||||
border: none;
|
||||
box-shadow: none;
|
||||
padding: 8px 24px;
|
||||
}
|
||||
|
||||
entry#entry,
|
||||
list#main {
|
||||
border-radius: 24px;
|
||||
background: transparent;
|
||||
}
|
||||
|
||||
row#match {
|
||||
border-radius: 8px;
|
||||
padding: 0 4px;
|
||||
}
|
||||
|
||||
row#plugin {
|
||||
border-radius: 16px;
|
||||
padding: 16px;
|
||||
}
|
||||
|
||||
list#plugin {
|
||||
background: transparent;
|
||||
}
|
||||
@@ -1,4 +1,4 @@
|
||||
{pkgs}: {
|
||||
{ pkgs }: {
|
||||
enable = true;
|
||||
config = {
|
||||
plugins = with pkgs.anyrunPlugins; [
|
||||
@@ -11,49 +11,5 @@
|
||||
y.fraction = 0.2;
|
||||
closeOnClick = true;
|
||||
};
|
||||
extraCss =
|
||||
/*
|
||||
css
|
||||
*/
|
||||
''
|
||||
* {
|
||||
font-family: "NotoSans NF";
|
||||
}
|
||||
|
||||
window#window {
|
||||
background: transparent;
|
||||
}
|
||||
|
||||
box#main {
|
||||
background: rgba(48, 52, 70, 0.4);
|
||||
box-shadow: 0 0 15px rgba(0, 0, 0, 0.29);
|
||||
border-radius: 24px;
|
||||
}
|
||||
|
||||
entry#entry {
|
||||
border: none;
|
||||
box-shadow: none;
|
||||
padding: 8px 24px;
|
||||
}
|
||||
|
||||
entry#entry,
|
||||
list#main {
|
||||
border-radius: 24px;
|
||||
background: transparent;
|
||||
}
|
||||
|
||||
row#match {
|
||||
border-radius: 8px;
|
||||
padding: 0 4px;
|
||||
}
|
||||
|
||||
row#plugin {
|
||||
border-radius: 16px;
|
||||
padding: 16px;
|
||||
}
|
||||
|
||||
list#plugin {
|
||||
background: transparent;
|
||||
}
|
||||
'';
|
||||
extraCss = builtins.readFile ./anyrun.css;
|
||||
}
|
||||
|
||||
@@ -1,8 +1,4 @@
|
||||
{
|
||||
pkgs,
|
||||
config,
|
||||
...
|
||||
}: {
|
||||
{ pkgs, config, ... }: {
|
||||
services.darkman = let
|
||||
wallpaperPath = "${config.home.homeDirectory}/.local/state/wallpaper.jpg";
|
||||
in {
|
||||
@@ -20,7 +16,7 @@
|
||||
|
||||
vendorHash = "sha256-xEPmNnaDwFU4l2G4cMvtNeQ9KneF5g9ViQSFrDkrafY=";
|
||||
|
||||
nativeBuildInputs = [pkgs.scdoc];
|
||||
nativeBuildInputs = [ pkgs.scdoc ];
|
||||
|
||||
postPatch = ''
|
||||
substituteInPlace darkman.service \
|
||||
@@ -44,10 +40,11 @@
|
||||
'';
|
||||
|
||||
meta = with pkgs.lib; {
|
||||
description = "Framework for dark-mode and light-mode transitions on Linux desktop";
|
||||
description =
|
||||
"Framework for dark-mode and light-mode transitions on Linux desktop";
|
||||
homepage = "https://gitlab.com/WhyNotHugo/darkman";
|
||||
license = licenses.isc;
|
||||
maintainers = [maintainers.ajgrf];
|
||||
maintainers = [ maintainers.ajgrf ];
|
||||
platforms = platforms.linux;
|
||||
mainProgram = "darkman";
|
||||
};
|
||||
@@ -58,18 +55,14 @@
|
||||
};
|
||||
darkModeScripts = {
|
||||
kitty-theme =
|
||||
/*
|
||||
bash
|
||||
*/
|
||||
# bash
|
||||
''
|
||||
${pkgs.kitty}/bin/kitty +kitten themes --reload-in=all --config-file-name ${config.home.homeDirectory}/.config/kitty/current-colors.conf Catppuccin-Frappe
|
||||
'';
|
||||
};
|
||||
lightModeScripts = {
|
||||
kitty-theme =
|
||||
/*
|
||||
bash
|
||||
*/
|
||||
# bash
|
||||
''
|
||||
${pkgs.kitty}/bin/kitty +kitten themes --reload-in=all --config-file-name ${config.home.homeDirectory}/.config/kitty/current-colors.conf Catppuccin-Latte
|
||||
'';
|
||||
|
||||
@@ -1,18 +1,11 @@
|
||||
{
|
||||
config,
|
||||
pkgs,
|
||||
lib,
|
||||
...
|
||||
}: {
|
||||
imports = [
|
||||
./darkman.nix
|
||||
];
|
||||
{ config, pkgs, lib, ... }: {
|
||||
imports = [ ./darkman.nix ];
|
||||
|
||||
wayland.windowManager.hyprland = {
|
||||
enable = true;
|
||||
systemd = {
|
||||
enable = true;
|
||||
variables = ["--all"];
|
||||
variables = [ "--all" ];
|
||||
};
|
||||
settings = {
|
||||
env = [
|
||||
@@ -48,13 +41,8 @@
|
||||
};
|
||||
bind = import ./keybinds.nix;
|
||||
bindm = import ./mousebinds.nix;
|
||||
bindr = [
|
||||
"SUPER,SUPER_L,exec,pkill anyrun || anyrun"
|
||||
];
|
||||
monitor = [
|
||||
"DP-1,highrr,0x0,1,bitdepth,8"
|
||||
"DP-1,addreserved,250,0,0,0"
|
||||
];
|
||||
bindr = [ "SUPER,SUPER_L,exec,pkill anyrun || anyrun" ];
|
||||
monitor = [ "DP-1,highrr,0x0,1,bitdepth,8" "DP-1,addreserved,250,0,0,0" ];
|
||||
workspace = [
|
||||
"special:calc,border:false,gapsout:200,on-created-empty:[noanim;silent] kitty -e qalc"
|
||||
];
|
||||
@@ -96,10 +84,7 @@
|
||||
disable_splash_rendering = true;
|
||||
force_default_wallpaper = 0;
|
||||
};
|
||||
layerrule = [
|
||||
"blur, anyrun"
|
||||
"ignorealpha 0.3, anyrun"
|
||||
];
|
||||
layerrule = [ "blur, anyrun" "ignorealpha 0.3, anyrun" ];
|
||||
decoration = {
|
||||
drop_shadow = "yes";
|
||||
shadow_range = 16;
|
||||
@@ -111,7 +96,7 @@
|
||||
enabled = true;
|
||||
size = 8;
|
||||
passes = 3;
|
||||
noise = 0.01;
|
||||
noise = 1.0e-2;
|
||||
contrast = 0.9;
|
||||
brightness = 0.8;
|
||||
};
|
||||
@@ -137,8 +122,9 @@
|
||||
services.flameshot = {
|
||||
enable = true;
|
||||
package = pkgs.flameshot.overrideAttrs (final: prev: {
|
||||
cmakeFlags = ["-DUSE_WAYLAND_CLIPBOARD=1" "-DUSE_WAYLAND_GRIM=true"];
|
||||
nativeBuildInputs = prev.nativeBuildInputs ++ [pkgs.libsForQt5.kguiaddons];
|
||||
cmakeFlags = [ "-DUSE_WAYLAND_CLIPBOARD=1" "-DUSE_WAYLAND_GRIM=true" ];
|
||||
nativeBuildInputs = prev.nativeBuildInputs
|
||||
++ [ pkgs.libsForQt5.kguiaddons ];
|
||||
});
|
||||
settings = {
|
||||
General = {
|
||||
@@ -158,30 +144,30 @@
|
||||
systemd.user.services.ags = {
|
||||
Unit = {
|
||||
Description = "ags";
|
||||
PartOf = ["graphical-session.target" "tray.target"];
|
||||
PartOf = [ "graphical-session.target" "tray.target" ];
|
||||
};
|
||||
Service = {
|
||||
ExecStart = "${pkgs.ags}/bin/ags";
|
||||
ExecReload = "${pkgs.coreutils}/bin/kill -SIGUSR2 $MAINPID";
|
||||
Restart = "always";
|
||||
KillMode = "mixed";
|
||||
Environment = "PATH=/run/current-system/sw/bin/:${with pkgs;
|
||||
lib.makeBinPath [
|
||||
swww
|
||||
sassc
|
||||
glib
|
||||
brightnessctl
|
||||
ydotool
|
||||
kitty
|
||||
hyprpicker
|
||||
]}";
|
||||
};
|
||||
Install = {
|
||||
WantedBy = ["graphical-session.target"];
|
||||
Environment = "PATH=/run/current-system/sw/bin/:${
|
||||
with pkgs;
|
||||
lib.makeBinPath [
|
||||
swww
|
||||
sassc
|
||||
glib
|
||||
brightnessctl
|
||||
ydotool
|
||||
kitty
|
||||
hyprpicker
|
||||
]
|
||||
}";
|
||||
};
|
||||
Install = { WantedBy = [ "graphical-session.target" ]; };
|
||||
};
|
||||
programs.kitty = import ./kitty.nix {inherit pkgs;};
|
||||
programs.anyrun = import ./anyrun.nix {inherit pkgs;};
|
||||
programs.kitty = import ./kitty.nix { inherit pkgs; };
|
||||
programs.anyrun = import ./anyrun.nix { inherit pkgs; };
|
||||
services.udiskie.enable = true;
|
||||
services.udiskie.tray = "never";
|
||||
|
||||
@@ -242,9 +228,7 @@
|
||||
};
|
||||
|
||||
programs.fish.loginShellInit =
|
||||
/*
|
||||
fish
|
||||
*/
|
||||
# fish
|
||||
''
|
||||
Hyprland && echo "goodbye" && exit 0 \
|
||||
|| echo "$status couldn't launch Hyprland" && tty | grep tty1 \
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
{pkgs}: {
|
||||
{ pkgs }: {
|
||||
enable = true;
|
||||
shellIntegration.enableFishIntegration = true;
|
||||
extraConfig = ''
|
||||
|
||||
@@ -1,4 +1 @@
|
||||
[
|
||||
"SUPER,mouse:272,movewindow"
|
||||
"SUPER,mouse:273,resizewindow"
|
||||
]
|
||||
[ "SUPER,mouse:272,movewindow" "SUPER,mouse:273,resizewindow" ]
|
||||
|
||||
@@ -1 +1 @@
|
||||
{...}: {}
|
||||
{ ... }: { }
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
{pkgs, ...}: {
|
||||
{ pkgs, ... }: {
|
||||
xdg.configFile."ranger/rc.conf".source = ./ranger.conf;
|
||||
home.packages = with pkgs; [
|
||||
# nix
|
||||
@@ -25,9 +25,9 @@
|
||||
bitwarden
|
||||
|
||||
# chat apps
|
||||
(import ./threema-desktop.nix {inherit pkgs;})
|
||||
(vesktop.override {electron = pkgs.electron_28;})
|
||||
(element-desktop.override {electron = pkgs.electron_28;})
|
||||
(import ./threema-desktop.nix { inherit pkgs; })
|
||||
(vesktop.override { electron = pkgs.electron_28; })
|
||||
(element-desktop.override { electron = pkgs.electron_28; })
|
||||
slack
|
||||
|
||||
# office
|
||||
@@ -42,9 +42,7 @@
|
||||
pinta
|
||||
kdePackages.kdenlive
|
||||
# friture TODO: broken
|
||||
(blender.override {
|
||||
cudaSupport = true;
|
||||
})
|
||||
(blender.override { cudaSupport = true; })
|
||||
openscad-unstable
|
||||
|
||||
# development
|
||||
|
||||
@@ -1,9 +1,4 @@
|
||||
{
|
||||
lib,
|
||||
stdenv,
|
||||
fetchFromGitHub,
|
||||
pkgs,
|
||||
}:
|
||||
{ lib, stdenv, fetchFromGitHub, pkgs, }:
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "hid-fanatecff-tools";
|
||||
version = "0.1.0";
|
||||
|
||||
@@ -1,3 +1 @@
|
||||
[
|
||||
"@angular/language-server"
|
||||
]
|
||||
["@angular/language-server"]
|
||||
|
||||
@@ -1,8 +1,6 @@
|
||||
{pkgs}:
|
||||
{ pkgs }:
|
||||
pkgs.threema-desktop.overrideAttrs (prev: {
|
||||
postFixup =
|
||||
prev.postFixup
|
||||
+ ''
|
||||
echo "\''${NIXOS_OZONE_WL:+\''${WAYLAND_DISPLAY:+--ozone-platform=wayland --enable-features=WaylandWindowDecorations}}" >> $out/bin/threema
|
||||
'';
|
||||
postFixup = prev.postFixup + ''
|
||||
echo "\''${NIXOS_OZONE_WL:+\''${WAYLAND_DISPLAY:+--ozone-platform=wayland --enable-features=WaylandWindowDecorations}}" >> $out/bin/threema
|
||||
'';
|
||||
})
|
||||
|
||||
@@ -1,8 +1,4 @@
|
||||
{
|
||||
pkgs,
|
||||
config,
|
||||
...
|
||||
}: {
|
||||
{ pkgs, config, ... }: {
|
||||
programs = {
|
||||
home-manager.enable = true;
|
||||
rbw = {
|
||||
@@ -15,14 +11,12 @@
|
||||
};
|
||||
git = import ./git.nix;
|
||||
lazygit.enable = true;
|
||||
nixvim = import ./nixvim {inherit pkgs;};
|
||||
firefox = import ./firefox.nix {inherit pkgs;};
|
||||
nixvim = import ./nixvim { inherit pkgs; };
|
||||
firefox = import ./firefox.nix { inherit pkgs; };
|
||||
gpg.enable = true;
|
||||
btop = {
|
||||
enable = true;
|
||||
settings = {
|
||||
vim_keys = true;
|
||||
};
|
||||
settings = { vim_keys = true; };
|
||||
};
|
||||
zsh = {
|
||||
enable = true;
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
{pkgs}: {
|
||||
{ pkgs }: {
|
||||
enable = true;
|
||||
package = pkgs.wrapFirefox pkgs.firefox-unwrapped {
|
||||
extraPolicies = {
|
||||
@@ -43,29 +43,30 @@
|
||||
default = "Google";
|
||||
engines = {
|
||||
"Nix Packages" = {
|
||||
urls = [
|
||||
{
|
||||
template = "https://search.nixos.org/packages";
|
||||
params = [
|
||||
{
|
||||
name = "type";
|
||||
value = "packages";
|
||||
}
|
||||
{
|
||||
name = "query";
|
||||
value = "{searchTerms}";
|
||||
}
|
||||
];
|
||||
}
|
||||
];
|
||||
icon = "${pkgs.nixos-icons}/share/icons/hicolor/scalable/apps/nix-snowflake.svg";
|
||||
definedAliases = ["@np"];
|
||||
urls = [{
|
||||
template = "https://search.nixos.org/packages";
|
||||
params = [
|
||||
{
|
||||
name = "type";
|
||||
value = "packages";
|
||||
}
|
||||
{
|
||||
name = "query";
|
||||
value = "{searchTerms}";
|
||||
}
|
||||
];
|
||||
}];
|
||||
icon =
|
||||
"${pkgs.nixos-icons}/share/icons/hicolor/scalable/apps/nix-snowflake.svg";
|
||||
definedAliases = [ "@np" ];
|
||||
};
|
||||
"NixOS Wiki" = {
|
||||
urls = [{template = "https://nixos.wiki/index.php?search={searchTerms}";}];
|
||||
urls = [{
|
||||
template = "https://nixos.wiki/index.php?search={searchTerms}";
|
||||
}];
|
||||
iconUpdateURL = "https://nixos.wiki/favicon.png";
|
||||
updateInterval = 24 * 60 * 60 * 1000;
|
||||
definedAliases = ["@nw"];
|
||||
definedAliases = [ "@nw" ];
|
||||
};
|
||||
"Wikipedia (en)".metaData.alias = "@wiki";
|
||||
};
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
{pkgs, ...}: {
|
||||
home.packages = [pkgs.neovide];
|
||||
{ pkgs, ... }: {
|
||||
home.packages = [ pkgs.neovide ];
|
||||
xdg.configFile."neovide/config.toml".source = ./neovide.toml;
|
||||
}
|
||||
|
||||
@@ -1,10 +1,9 @@
|
||||
{pkgs}: let
|
||||
angular-ls =
|
||||
(import ../../packages/node-packages {
|
||||
inherit pkgs;
|
||||
nodejs = pkgs.nodejs_18;
|
||||
})
|
||||
."@angular/language-server";
|
||||
{ pkgs }:
|
||||
let
|
||||
angular-ls = (import ../../packages/node-packages {
|
||||
inherit pkgs;
|
||||
nodejs = pkgs.nodejs_18;
|
||||
})."@angular/language-server";
|
||||
darkman = pkgs.vimUtils.buildVimPlugin {
|
||||
name = "darkman";
|
||||
src = pkgs.buildGoModule rec {
|
||||
@@ -47,7 +46,7 @@ in {
|
||||
smartindent = true;
|
||||
signcolumn = "yes";
|
||||
|
||||
undodir = {__raw = "os.getenv('HOME') .. '/.config/nvim/undodir'";};
|
||||
undodir = { __raw = "os.getenv('HOME') .. '/.config/nvim/undodir'"; };
|
||||
undofile = true;
|
||||
|
||||
scrolloff = 12;
|
||||
@@ -68,8 +67,8 @@ in {
|
||||
minimap_width = 10;
|
||||
minimap_auto_start = 1;
|
||||
minimap_auto_start_win_enter = 1;
|
||||
minimap_close_buftypes = ["nofile"];
|
||||
minimap_block_filetypes = ["NvimTree"];
|
||||
minimap_close_buftypes = [ "nofile" ];
|
||||
minimap_block_filetypes = [ "NvimTree" ];
|
||||
|
||||
mapleader = ";";
|
||||
|
||||
@@ -110,8 +109,8 @@ in {
|
||||
light = "latte";
|
||||
};
|
||||
integrations.native_lsp.underlines = {
|
||||
errors = ["undercurl"];
|
||||
warnings = ["undercurl"];
|
||||
errors = [ "undercurl" ];
|
||||
warnings = [ "undercurl" ];
|
||||
};
|
||||
customHighlights = builtins.readFile ./custom-highlights.lua;
|
||||
};
|
||||
@@ -130,41 +129,37 @@ in {
|
||||
right = "┊";
|
||||
};
|
||||
sections = {
|
||||
lualine_a = [
|
||||
{
|
||||
name = "mode";
|
||||
separator = {
|
||||
right = "";
|
||||
left = "";
|
||||
};
|
||||
icon = "";
|
||||
}
|
||||
];
|
||||
lualine_a = [{
|
||||
name = "mode";
|
||||
separator = {
|
||||
right = "";
|
||||
left = "";
|
||||
};
|
||||
icon = "";
|
||||
}];
|
||||
lualine_x = [
|
||||
{name = "fancy_lsp_servers";}
|
||||
{ name = "fancy_lsp_servers"; }
|
||||
{
|
||||
name = "filetype";
|
||||
extraConfig = {icon_only = true;};
|
||||
extraConfig = { icon_only = true; };
|
||||
padding = {
|
||||
left = 1;
|
||||
right = 2;
|
||||
};
|
||||
}
|
||||
];
|
||||
lualine_z = [
|
||||
{
|
||||
name = "location";
|
||||
separator = {
|
||||
right = "";
|
||||
left = "";
|
||||
};
|
||||
}
|
||||
];
|
||||
lualine_z = [{
|
||||
name = "location";
|
||||
separator = {
|
||||
right = "";
|
||||
left = "";
|
||||
};
|
||||
}];
|
||||
};
|
||||
};
|
||||
auto-save = {
|
||||
enable = true;
|
||||
triggerEvents = ["FocusLost" "BufLeave"];
|
||||
triggerEvents = [ "FocusLost" "BufLeave" ];
|
||||
};
|
||||
indent-blankline = {
|
||||
enable = true;
|
||||
@@ -242,20 +237,20 @@ in {
|
||||
conform-nvim = {
|
||||
enable = true;
|
||||
formattersByFt = {
|
||||
lua = ["stylua"];
|
||||
javascript = ["prettier"];
|
||||
markdown = ["prettier"];
|
||||
typescript = ["prettier"];
|
||||
json = ["prettier"];
|
||||
yaml = ["prettier"];
|
||||
html = ["prettier"];
|
||||
css = ["prettier"];
|
||||
scss = ["prettier"];
|
||||
less = ["prettier"];
|
||||
svelte = ["prettier"];
|
||||
rust = ["rustfmt"];
|
||||
bash = ["shfmt"];
|
||||
nix = ["alejandra"];
|
||||
lua = [ "stylua" ];
|
||||
javascript = [ "prettier" ];
|
||||
markdown = [ "prettier" ];
|
||||
typescript = [ "prettier" ];
|
||||
json = [ "prettier" ];
|
||||
yaml = [ "prettier" ];
|
||||
html = [ "prettier" ];
|
||||
css = [ "prettier" ];
|
||||
scss = [ "prettier" ];
|
||||
less = [ "prettier" ];
|
||||
svelte = [ "prettier" ];
|
||||
rust = [ "rustfmt" ];
|
||||
bash = [ "shfmt" ];
|
||||
nix = [ "nixfmt" ];
|
||||
};
|
||||
formatOnSave = {
|
||||
timeoutMs = 500;
|
||||
@@ -266,66 +261,67 @@ in {
|
||||
lint = {
|
||||
enable = true;
|
||||
lintersByFt = {
|
||||
javascript = ["eslint"];
|
||||
typescript = ["eslint"];
|
||||
css = ["stylelint"];
|
||||
scss = ["stylelint"];
|
||||
less = ["stylelint"];
|
||||
bash = ["shellcheck"];
|
||||
javascript = [ "eslint" ];
|
||||
typescript = [ "eslint" ];
|
||||
css = [ "stylelint" ];
|
||||
scss = [ "stylelint" ];
|
||||
less = [ "stylelint" ];
|
||||
bash = [ "shellcheck" ];
|
||||
};
|
||||
autoCmd.event = "TextChanged";
|
||||
};
|
||||
|
||||
lsp = {
|
||||
enable = true;
|
||||
keymaps = {diagnostic = {};};
|
||||
enabledServers = [
|
||||
{
|
||||
name = "angularls";
|
||||
extraOptions = {
|
||||
cmd = [
|
||||
"ngserver"
|
||||
"--stdio"
|
||||
"--tsProbeLocations"
|
||||
""
|
||||
"--ngProbeLocations"
|
||||
""
|
||||
];
|
||||
on_new_config = {
|
||||
__raw =
|
||||
/*
|
||||
lua
|
||||
*/
|
||||
''
|
||||
function(new_config, new_root_dir)
|
||||
new_config.cmd = {
|
||||
new_root_dir .. "/node_modules/@angular/language-server/bin/ngserver",
|
||||
"--stdio",
|
||||
"--tsProbeLocations",
|
||||
new_root_dir .. "/node_modules",
|
||||
"--ngProbeLocations",
|
||||
new_root_dir .. "/node_modules",
|
||||
}
|
||||
end
|
||||
'';
|
||||
};
|
||||
filetypes = ["typescript" "html" "typescriptreact" "typescript.tsx" "angular" "html.angular"];
|
||||
on_attach = {
|
||||
__raw =
|
||||
/*
|
||||
lua
|
||||
*/
|
||||
''
|
||||
function(client, bufnr)
|
||||
if vim.bo[bufnr].filetype == "html" then
|
||||
vim.bo[bufnr].filetype = "angular"
|
||||
end
|
||||
end
|
||||
'';
|
||||
};
|
||||
keymaps = { diagnostic = { }; };
|
||||
enabledServers = [{
|
||||
name = "angularls";
|
||||
extraOptions = {
|
||||
cmd = [
|
||||
"ngserver"
|
||||
"--stdio"
|
||||
"--tsProbeLocations"
|
||||
""
|
||||
"--ngProbeLocations"
|
||||
""
|
||||
];
|
||||
on_new_config = {
|
||||
__raw =
|
||||
# lua
|
||||
''
|
||||
function(new_config, new_root_dir)
|
||||
new_config.cmd = {
|
||||
new_root_dir .. "/node_modules/@angular/language-server/bin/ngserver",
|
||||
"--stdio",
|
||||
"--tsProbeLocations",
|
||||
new_root_dir .. "/node_modules",
|
||||
"--ngProbeLocations",
|
||||
new_root_dir .. "/node_modules",
|
||||
}
|
||||
end
|
||||
'';
|
||||
};
|
||||
}
|
||||
];
|
||||
filetypes = [
|
||||
"typescript"
|
||||
"html"
|
||||
"typescriptreact"
|
||||
"typescript.tsx"
|
||||
"angular"
|
||||
"html.angular"
|
||||
];
|
||||
on_attach = {
|
||||
__raw =
|
||||
# lua
|
||||
''
|
||||
function(client, bufnr)
|
||||
if vim.bo[bufnr].filetype == "html" then
|
||||
vim.bo[bufnr].filetype = "angular"
|
||||
end
|
||||
end
|
||||
'';
|
||||
};
|
||||
};
|
||||
}];
|
||||
servers = {
|
||||
html.enable = true;
|
||||
cssls.enable = true;
|
||||
@@ -345,7 +341,7 @@ in {
|
||||
|
||||
clangd = {
|
||||
enable = true;
|
||||
cmd = ["clangd" "--offset-encoding=utf-16"];
|
||||
cmd = [ "clangd" "--offset-encoding=utf-16" ];
|
||||
};
|
||||
|
||||
nixd.enable = true;
|
||||
@@ -359,9 +355,7 @@ in {
|
||||
mode = "symbol_text";
|
||||
cmp = {
|
||||
after =
|
||||
/*
|
||||
lua
|
||||
*/
|
||||
# lua
|
||||
''
|
||||
function(entry, vim_item, kind)
|
||||
if entry.source.name == "npm" then
|
||||
@@ -373,37 +367,35 @@ in {
|
||||
end
|
||||
'';
|
||||
};
|
||||
symbolMap = {
|
||||
Copilot = "";
|
||||
};
|
||||
symbolMap = { Copilot = ""; };
|
||||
};
|
||||
cmp = {
|
||||
enable = true;
|
||||
settings = {
|
||||
mapping = {
|
||||
"<C-n>" = "cmp.mapping.select_next_item({behavior = cmp.SelectBehavior.Select})";
|
||||
"<C-p>" = "cmp.mapping.select_prev_item({behavior = cmp.SelectBehavior.Select})";
|
||||
"<C-n>" =
|
||||
"cmp.mapping.select_next_item({behavior = cmp.SelectBehavior.Select})";
|
||||
"<C-p>" =
|
||||
"cmp.mapping.select_prev_item({behavior = cmp.SelectBehavior.Select})";
|
||||
"<C-Space>" = "cmp.mapping.confirm({select = true})";
|
||||
"<C-Enter>" = "cmp.mapping.complete()";
|
||||
};
|
||||
sources = [
|
||||
{name = "copilot";}
|
||||
{name = "path";}
|
||||
{name = "luasnip";}
|
||||
{ name = "copilot"; }
|
||||
{ name = "path"; }
|
||||
{ name = "luasnip"; }
|
||||
{
|
||||
name = "npm";
|
||||
keywordLength = 4;
|
||||
priority = 10;
|
||||
}
|
||||
{name = "nvim_lsp";}
|
||||
{name = "nvim_lsp_signature_help";}
|
||||
{name = "nvim_lsp_document_symbol";}
|
||||
{ name = "nvim_lsp"; }
|
||||
{ name = "nvim_lsp_signature_help"; }
|
||||
{ name = "nvim_lsp_document_symbol"; }
|
||||
];
|
||||
formatting.fields = ["abbr" "kind"];
|
||||
formatting.fields = [ "abbr" "kind" ];
|
||||
snippet.expand =
|
||||
/*
|
||||
lua
|
||||
*/
|
||||
# lua
|
||||
"function(args) require('luasnip').lsp_expand(args.body) end";
|
||||
window = {
|
||||
completion.border = "rounded";
|
||||
@@ -413,9 +405,7 @@ in {
|
||||
};
|
||||
};
|
||||
|
||||
which-key = {
|
||||
enable = true;
|
||||
};
|
||||
which-key = { enable = true; };
|
||||
|
||||
copilot-lua = {
|
||||
panel.enabled = false;
|
||||
@@ -434,9 +424,13 @@ in {
|
||||
angular-ls
|
||||
pkgs.nodePackages.typescript-language-server
|
||||
pkgs.nodePackages.stylelint
|
||||
pkgs.nodePackages.prettier
|
||||
pkgs.jq
|
||||
pkgs.html-tidy
|
||||
pkgs.alejandra
|
||||
pkgs.nixfmt
|
||||
pkgs.stylua
|
||||
pkgs.shfmt
|
||||
pkgs.fzf
|
||||
];
|
||||
extraPlugins = with pkgs.vimPlugins; [
|
||||
vim-mergetool
|
||||
|
||||
@@ -3,58 +3,55 @@ require("cmp-npm").setup({})
|
||||
require("rest-nvim").setup({})
|
||||
require("actions-preview").setup({})
|
||||
|
||||
-- require("lspconfig").angularls.setup({})
|
||||
|
||||
if vim.g.neovide then
|
||||
vim.api.nvim_create_autocmd("ColorScheme", {
|
||||
pattern = "*",
|
||||
callback = function()
|
||||
local flavour = require("catppuccin").options.background[vim.o.background]
|
||||
local palette = require("catppuccin.palettes").get_palette(flavour)
|
||||
vim.cmd("hi Normal guibg=" .. palette.base)
|
||||
vim.cmd("set pumblend=100")
|
||||
end,
|
||||
})
|
||||
vim.api.nvim_create_autocmd("ColorScheme", {
|
||||
pattern = "*",
|
||||
callback = function()
|
||||
local flavour = require("catppuccin").options.background[vim.o.background]
|
||||
local palette = require("catppuccin.palettes").get_palette(flavour)
|
||||
vim.cmd("hi Normal guibg=" .. palette.base)
|
||||
vim.cmd("set pumblend=100")
|
||||
end,
|
||||
})
|
||||
end
|
||||
|
||||
local signs = {
|
||||
{ name = "DiagnosticSignError", text = "" },
|
||||
{ name = "DiagnosticSignWarn", text = "" },
|
||||
{ name = "DiagnosticSignHint", text = "" },
|
||||
{ name = "DiagnosticSignInfo", text = "" },
|
||||
{ name = "DiagnosticSignError", text = "" },
|
||||
{ name = "DiagnosticSignWarn", text = "" },
|
||||
{ name = "DiagnosticSignHint", text = "" },
|
||||
{ name = "DiagnosticSignInfo", text = "" },
|
||||
}
|
||||
|
||||
for _, sign in ipairs(signs) do
|
||||
vim.fn.sign_define(sign.name, { texthl = sign.name, text = sign.text, numhl = "" })
|
||||
vim.fn.sign_define(sign.name, { texthl = sign.name, text = sign.text, numhl = "" })
|
||||
end
|
||||
|
||||
vim.diagnostic.config({
|
||||
virtual_text = true,
|
||||
signs = true,
|
||||
underline = true,
|
||||
update_in_insert = true,
|
||||
severity_sort = false,
|
||||
virtual_text = true,
|
||||
signs = true,
|
||||
underline = true,
|
||||
update_in_insert = true,
|
||||
severity_sort = false,
|
||||
})
|
||||
vim.lsp.handlers["textDocument/hover"] = vim.lsp.with(vim.lsp.handlers.hover, { border = "rounded" })
|
||||
|
||||
local Terminal = require('toggleterm.terminal').Terminal
|
||||
local lazygit = Terminal:new({
|
||||
cmd = "lazygit",
|
||||
dir = "git_dir",
|
||||
direction = "float",
|
||||
local Terminal = require("toggleterm.terminal").Terminal
|
||||
local lazygit = Terminal:new({
|
||||
cmd = "lazygit",
|
||||
dir = "git_dir",
|
||||
direction = "float",
|
||||
|
||||
on_open = function(term)
|
||||
vim.cmd("startinsert!")
|
||||
vim.api.nvim_buf_set_keymap(term.bufnr, "n", "q", "<cmd>close<CR>", { noremap = true, silent = true })
|
||||
end,
|
||||
on_close = function(term)
|
||||
vim.cmd("startinsert!")
|
||||
end,
|
||||
on_open = function(term)
|
||||
vim.cmd("startinsert!")
|
||||
vim.api.nvim_buf_set_keymap(term.bufnr, "n", "q", "<cmd>close<CR>", { noremap = true, silent = true })
|
||||
end,
|
||||
on_close = function(term)
|
||||
vim.cmd("startinsert!")
|
||||
end,
|
||||
})
|
||||
|
||||
|
||||
function _lazygit_toggle()
|
||||
lazygit:toggle()
|
||||
lazygit:toggle()
|
||||
end
|
||||
|
||||
vim.api.nvim_set_keymap("n", "<leader>g", "<cmd>lua _lazygit_toggle()<CR>", { noremap = true, silent = true })
|
||||
|
||||
@@ -58,7 +58,7 @@
|
||||
{
|
||||
key = "hh";
|
||||
mode = "n";
|
||||
action = '':Telescope harpoon marks<CR>'';
|
||||
action = ":Telescope harpoon marks<CR>";
|
||||
}
|
||||
{
|
||||
key = "<leader>sa";
|
||||
@@ -77,7 +77,8 @@
|
||||
key = "<leader>xw";
|
||||
mode = "n";
|
||||
lua = true;
|
||||
action = "function() require('trouble').toggle('workspace_diagnostics') end";
|
||||
action =
|
||||
"function() require('trouble').toggle('workspace_diagnostics') end";
|
||||
}
|
||||
{
|
||||
key = "<leader>xd";
|
||||
|
||||
@@ -1,8 +1,4 @@
|
||||
{
|
||||
pkgs,
|
||||
homeDirectory,
|
||||
...
|
||||
}: {
|
||||
{ pkgs, homeDirectory, ... }: {
|
||||
services = {
|
||||
gpg-agent = {
|
||||
enable = true;
|
||||
|
||||
@@ -1,19 +1,11 @@
|
||||
# Edit this configuration file to define what should be installed on
|
||||
# your system. Help is available in the configuration.nix(5) man page
|
||||
# and in the NixOS manual (accessible by running ‘nixos-help’).
|
||||
{
|
||||
config,
|
||||
pkgs,
|
||||
username,
|
||||
...
|
||||
}: {
|
||||
imports = [
|
||||
./nvidia.nix
|
||||
./hardware-configuration.nix
|
||||
];
|
||||
{ config, pkgs, username, ... }: {
|
||||
imports = [ ./nvidia.nix ./hardware-configuration.nix ];
|
||||
|
||||
nix = {
|
||||
settings.experimental-features = ["nix-command" "flakes"];
|
||||
settings.experimental-features = [ "nix-command" "flakes" ];
|
||||
gc = {
|
||||
automatic = true;
|
||||
randomizedDelaySec = "14m";
|
||||
@@ -35,7 +27,7 @@
|
||||
};
|
||||
efi.canTouchEfiVariables = true;
|
||||
};
|
||||
supportedFilesystems = ["ntfs"];
|
||||
supportedFilesystems = [ "ntfs" ];
|
||||
|
||||
# Silent Boot
|
||||
kernelParams = [
|
||||
@@ -52,8 +44,8 @@
|
||||
initrd.verbose = false;
|
||||
|
||||
# Virtual Camera/Mic
|
||||
kernelModules = ["v4l2loopback" "snd-aloop" "sg"];
|
||||
extraModulePackages = with config.boot.kernelPackages; [v4l2loopback.out];
|
||||
kernelModules = [ "v4l2loopback" "snd-aloop" "sg" ];
|
||||
extraModulePackages = with config.boot.kernelPackages; [ v4l2loopback.out ];
|
||||
extraModprobeConfig = ''
|
||||
options v4l2loopback exclusive_caps=1 card_label="Virtual Camera"
|
||||
blacklist i2c_nvidia_gpu
|
||||
@@ -79,7 +71,7 @@
|
||||
|
||||
hardware.sane = {
|
||||
enable = true;
|
||||
extraBackends = [pkgs.sane-airscan];
|
||||
extraBackends = [ pkgs.sane-airscan ];
|
||||
};
|
||||
services.printing.enable = true;
|
||||
services.avahi = {
|
||||
@@ -91,17 +83,14 @@
|
||||
services.dbus.enable = true;
|
||||
xdg.portal = {
|
||||
enable = true;
|
||||
extraPortals = [
|
||||
pkgs.xdg-desktop-portal-gtk
|
||||
pkgs.xdg-desktop-portal-kde
|
||||
];
|
||||
extraPortals = [ pkgs.xdg-desktop-portal-gtk pkgs.xdg-desktop-portal-kde ];
|
||||
};
|
||||
|
||||
time.timeZone = "Europe/Berlin";
|
||||
i18n = {
|
||||
inputMethod = {
|
||||
enabled = "ibus";
|
||||
ibus.engines = with pkgs.ibus-engines; [anthy];
|
||||
ibus.engines = with pkgs.ibus-engines; [ anthy ];
|
||||
};
|
||||
defaultLocale = "en_GB.UTF-8";
|
||||
extraLocaleSettings = {
|
||||
@@ -123,7 +112,7 @@
|
||||
layout = "cc1-thea";
|
||||
extraLayouts.cc1-thea = {
|
||||
description = "A CC1 optimized layout";
|
||||
languages = ["eng" "ger"];
|
||||
languages = [ "eng" "ger" ];
|
||||
symbolsFile = ../../modules/cc1-thea;
|
||||
};
|
||||
};
|
||||
@@ -133,14 +122,11 @@
|
||||
# nautilus on non-gnome
|
||||
services.gvfs.enable = true;
|
||||
# fix pinentry on non-gnome
|
||||
services.dbus.packages = with pkgs; [gcr];
|
||||
services.dbus.packages = with pkgs; [ gcr ];
|
||||
services.gnome.gnome-online-accounts.enable = true;
|
||||
services.gnome.evolution-data-server.enable = true;
|
||||
|
||||
services.udev.packages = with pkgs; [
|
||||
oversteer
|
||||
android-udev-rules
|
||||
];
|
||||
services.udev.packages = with pkgs; [ oversteer android-udev-rules ];
|
||||
|
||||
virtualisation.docker.rootless = {
|
||||
enable = true;
|
||||
@@ -149,7 +135,7 @@
|
||||
|
||||
# Define a user account. Don't forget to set a password with ‘passwd’.
|
||||
services.getty.autologinUser = "${username}";
|
||||
services.getty.extraArgs = ["--noclear" "--noissue" "--nonewline"];
|
||||
services.getty.extraArgs = [ "--noclear" "--noissue" "--nonewline" ];
|
||||
services.getty.loginOptions = "-p -f -- \\u"; # preserve environment
|
||||
programs.hyprland.enable = true;
|
||||
programs.fish.enable = true;
|
||||
@@ -160,7 +146,19 @@
|
||||
users.defaultUserShell = pkgs.fish;
|
||||
users.users.${username} = {
|
||||
isNormalUser = true;
|
||||
extraGroups = ["networkmanager" "wheel" "audio" "video" "dialout" "plugdev" "scanner" "lp" "input" "adbusers" "cdrom"];
|
||||
extraGroups = [
|
||||
"networkmanager"
|
||||
"wheel"
|
||||
"audio"
|
||||
"video"
|
||||
"dialout"
|
||||
"plugdev"
|
||||
"scanner"
|
||||
"lp"
|
||||
"input"
|
||||
"adbusers"
|
||||
"cdrom"
|
||||
];
|
||||
};
|
||||
|
||||
# List packages installed in system profile. To search, run:
|
||||
@@ -199,18 +197,18 @@
|
||||
noto-fonts-cjk
|
||||
noto-fonts-emoji
|
||||
fira-code
|
||||
(nerdfonts.override {fonts = ["FiraCode" "JetBrainsMono" "Noto" "NerdFontsSymbolsOnly"];})
|
||||
(nerdfonts.override {
|
||||
fonts = [ "FiraCode" "JetBrainsMono" "Noto" "NerdFontsSymbolsOnly" ];
|
||||
})
|
||||
];
|
||||
fontconfig = {
|
||||
defaultFonts = {
|
||||
monospace = ["FiraCode Nerd Font"];
|
||||
sansSerif = ["Noto Sans Nerd Font"];
|
||||
monospace = [ "FiraCode Nerd Font" ];
|
||||
sansSerif = [ "Noto Sans Nerd Font" ];
|
||||
};
|
||||
|
||||
localConf =
|
||||
/*
|
||||
xml
|
||||
*/
|
||||
# xml
|
||||
''
|
||||
<match target="font">
|
||||
<test name="family" compare="contains">
|
||||
@@ -237,27 +235,25 @@
|
||||
|
||||
networking = {
|
||||
firewall = {
|
||||
allowedTCPPorts = [8100 5037 5173];
|
||||
allowedUDPPorts = [50765];
|
||||
allowedTCPPorts = [ 8100 5037 5173 ];
|
||||
allowedUDPPorts = [ 50765 ];
|
||||
};
|
||||
|
||||
networkmanager = {
|
||||
enable = true;
|
||||
plugins = with pkgs; [
|
||||
networkmanager-openconnect
|
||||
];
|
||||
plugins = with pkgs; [ networkmanager-openconnect ];
|
||||
};
|
||||
|
||||
hosts = {
|
||||
"192.168.0.219" = ["kookaborrow"];
|
||||
"192.168.0.1" = ["router"];
|
||||
"192.168.0.219" = [ "kookaborrow" ];
|
||||
"192.168.0.1" = [ "router" ];
|
||||
};
|
||||
};
|
||||
|
||||
fileSystems."/mnt/media" = {
|
||||
device = "kookaborrow:/media";
|
||||
fsType = "nfs";
|
||||
options = ["x-systemd-automount" "noauto"];
|
||||
options = [ "x-systemd-automount" "noauto" ];
|
||||
};
|
||||
|
||||
fileSystems."/run/media/theaninova/heart-drive" = {
|
||||
|
||||
@@ -1,21 +1,14 @@
|
||||
# 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")
|
||||
];
|
||||
{ config, lib, pkgs, modulesPath, ... }: {
|
||||
imports = [ (modulesPath + "/installer/scan/not-detected.nix") ];
|
||||
|
||||
boot.initrd.availableKernelModules = ["nvme" "xhci_pci" "ahci" "usb_storage" "usbhid" "sd_mod"];
|
||||
boot.initrd.kernelModules = [];
|
||||
boot.kernelModules = ["kvm-amd"];
|
||||
boot.extraModulePackages = [];
|
||||
boot.initrd.availableKernelModules =
|
||||
[ "nvme" "xhci_pci" "ahci" "usb_storage" "usbhid" "sd_mod" ];
|
||||
boot.initrd.kernelModules = [ ];
|
||||
boot.kernelModules = [ "kvm-amd" ];
|
||||
boot.extraModulePackages = [ ];
|
||||
|
||||
fileSystems."/" = {
|
||||
device = "/dev/disk/by-uuid/637f852b-e5bc-4bdb-a75e-886680bd52d2";
|
||||
@@ -27,9 +20,8 @@
|
||||
fsType = "vfat";
|
||||
};
|
||||
|
||||
swapDevices = [
|
||||
{device = "/dev/disk/by-uuid/b09fbba2-c97a-41bc-a3cd-8204e30204f8";}
|
||||
];
|
||||
swapDevices =
|
||||
[{ device = "/dev/disk/by-uuid/b09fbba2-c97a-41bc-a3cd-8204e30204f8"; }];
|
||||
|
||||
# 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
|
||||
@@ -39,5 +31,6 @@
|
||||
# networking.interfaces.eno1.useDHCP = lib.mkDefault true;
|
||||
|
||||
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
|
||||
hardware.cpu.amd.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
|
||||
hardware.cpu.amd.updateMicrocode =
|
||||
lib.mkDefault config.hardware.enableRedistributableFirmware;
|
||||
}
|
||||
|
||||
@@ -1,23 +1,16 @@
|
||||
{
|
||||
config,
|
||||
lib,
|
||||
pkgs,
|
||||
...
|
||||
}: {
|
||||
{ config, lib, pkgs, ... }: {
|
||||
hardware.opengl = {
|
||||
enable = true;
|
||||
driSupport = true;
|
||||
driSupport32Bit = true;
|
||||
extraPackages = with pkgs; [
|
||||
libvdpau-va-gl
|
||||
nvidia-vaapi-driver
|
||||
];
|
||||
extraPackages = with pkgs; [ libvdpau-va-gl nvidia-vaapi-driver ];
|
||||
};
|
||||
|
||||
services.xserver.videoDrivers = ["nvidia"];
|
||||
services.xserver.videoDrivers = [ "nvidia" ];
|
||||
|
||||
boot.kernelModules = ["nvidia" "nvidia_modeset" "nvidia_uvm" "nvidia_drm"];
|
||||
boot.initrd.kernelModules = ["nvidia" "nvidia_modeset" "nvidia_uvm" "nvidia_drm"];
|
||||
boot.kernelModules = [ "nvidia" "nvidia_modeset" "nvidia_uvm" "nvidia_drm" ];
|
||||
boot.initrd.kernelModules =
|
||||
[ "nvidia" "nvidia_modeset" "nvidia_uvm" "nvidia_drm" ];
|
||||
|
||||
hardware.nvidia = {
|
||||
modesetting.enable = true;
|
||||
|
||||
@@ -1,25 +1,19 @@
|
||||
{
|
||||
pkgs,
|
||||
lib,
|
||||
config,
|
||||
...
|
||||
}: let
|
||||
cfg = config.hardware.gbmonctl;
|
||||
in
|
||||
with lib; {
|
||||
options.hardware.gbmonctl = {
|
||||
enable = mkOption {
|
||||
type = types.bool;
|
||||
default = false;
|
||||
description = lib.mkDoc ''
|
||||
Enables a CLI tool to change monitor settings over USB to the Gigabyte M32U
|
||||
{ pkgs, lib, config, ... }:
|
||||
let cfg = config.hardware.gbmonctl;
|
||||
in with lib; {
|
||||
options.hardware.gbmonctl = {
|
||||
enable = mkOption {
|
||||
type = types.bool;
|
||||
default = false;
|
||||
description = lib.mkDoc ''
|
||||
Enables a CLI tool to change monitor settings over USB to the Gigabyte M32U
|
||||
|
||||
In theory any Gigabyte Monitor that uses a Realtek HID device (presumably the M28U also uses this) to control it over OSD sidekick should have the same protocol, but this is the only one I own.
|
||||
'';
|
||||
};
|
||||
In theory any Gigabyte Monitor that uses a Realtek HID device (presumably the M28U also uses this) to control it over OSD sidekick should have the same protocol, but this is the only one I own.
|
||||
'';
|
||||
};
|
||||
config = lib.mkIf cfg.enable {
|
||||
environment.systemPackages = [pkgs.gbmonctl];
|
||||
services.udev.packages = [pkgs.gbmonctl];
|
||||
};
|
||||
}
|
||||
};
|
||||
config = lib.mkIf cfg.enable {
|
||||
environment.systemPackages = [ pkgs.gbmonctl ];
|
||||
services.udev.packages = [ pkgs.gbmonctl ];
|
||||
};
|
||||
}
|
||||
|
||||
@@ -1,13 +1,10 @@
|
||||
{
|
||||
pkgs,
|
||||
lib,
|
||||
config,
|
||||
...
|
||||
}:
|
||||
with lib; let
|
||||
{ pkgs, lib, config, ... }:
|
||||
with lib;
|
||||
let
|
||||
cfg = config.hardware.hid-fanatecff;
|
||||
kernel = config.boot.kernelPackages.kernel;
|
||||
fanatecKernelModule = pkgs.callPackage (import ./hid-fanatecff-module.nix) {kernel = kernel;};
|
||||
fanatecKernelModule =
|
||||
pkgs.callPackage (import ./hid-fanatecff-module.nix) { kernel = kernel; };
|
||||
in {
|
||||
options.hardware.hid-fanatecff = {
|
||||
enable = mkOption {
|
||||
@@ -23,8 +20,8 @@ in {
|
||||
};
|
||||
config = lib.mkIf cfg.enable {
|
||||
boot = {
|
||||
extraModulePackages = [fanatecKernelModule];
|
||||
kernelModules = ["hid-fanatecff"];
|
||||
extraModulePackages = [ fanatecKernelModule ];
|
||||
kernelModules = [ "hid-fanatecff" ];
|
||||
};
|
||||
};
|
||||
}
|
||||
|
||||
@@ -1,9 +1,4 @@
|
||||
{
|
||||
lib,
|
||||
stdenv,
|
||||
kernel,
|
||||
fetchFromGitHub,
|
||||
}:
|
||||
{ lib, stdenv, kernel, fetchFromGitHub, }:
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "hid-fanatecff";
|
||||
version = "0.1.0";
|
||||
@@ -17,12 +12,10 @@ stdenv.mkDerivation rec {
|
||||
|
||||
nativeBuildInputs = kernel.moduleBuildDependencies;
|
||||
|
||||
makeFlags =
|
||||
kernel.makeFlags
|
||||
++ [
|
||||
"KVERSION=${kernel.modDirVersion}"
|
||||
"KERNEL_SRC=${kernel.dev}/lib/modules/${kernel.modDirVersion}/build"
|
||||
];
|
||||
makeFlags = kernel.makeFlags ++ [
|
||||
"KVERSION=${kernel.modDirVersion}"
|
||||
"KERNEL_SRC=${kernel.dev}/lib/modules/${kernel.modDirVersion}/build"
|
||||
];
|
||||
|
||||
installFlags = [
|
||||
"-C"
|
||||
@@ -30,10 +23,11 @@ stdenv.mkDerivation rec {
|
||||
"M=${src}"
|
||||
"INSTALL_MOD_PATH=${placeholder "out"}"
|
||||
];
|
||||
installTargets = ["modules_install"];
|
||||
installTargets = [ "modules_install" ];
|
||||
|
||||
meta = with lib; {
|
||||
description = "Linux kernel driver that aims to add support for FANATEC devices";
|
||||
description =
|
||||
"Linux kernel driver that aims to add support for FANATEC devices";
|
||||
homepage = "https://github.com/gotzl/hid-fanatecff";
|
||||
license = licenses.gpl2Only;
|
||||
platforms = platforms.linux;
|
||||
|
||||
@@ -1,11 +1,4 @@
|
||||
{
|
||||
lib,
|
||||
pkgs,
|
||||
buildGoModule,
|
||||
fetchFromGitHub,
|
||||
hidapi,
|
||||
udev,
|
||||
}:
|
||||
{ lib, pkgs, buildGoModule, fetchFromGitHub, hidapi, udev, }:
|
||||
buildGoModule rec {
|
||||
pname = "gbmonctl";
|
||||
version = "1d01a090";
|
||||
@@ -16,14 +9,15 @@ buildGoModule rec {
|
||||
hash = "sha256-KeBdGtQWz9TBmk1HdXlkIs2r2aZ+EO8WhNaGbsFBBR8=";
|
||||
};
|
||||
vendorHash = "sha256-cEqpEaX4eJ/6um9qbw/kzg9/vesOWmdiHzZ7IodVV9c=";
|
||||
buildInputs = [hidapi udev];
|
||||
buildInputs = [ hidapi udev ];
|
||||
postInstall = ''
|
||||
mkdir -p $out/bin $out/lib/udev/rules.d
|
||||
echo 'KERNEL=="hidraw*", ATTRS{idVendor}=="0bda", ATTRS{idProduct}=="1100", MODE="0666", TAG+="uaccess"' \
|
||||
> $out/lib/udev/rules.d/99-gigabyte-monitor.rules
|
||||
'';
|
||||
meta = with lib; {
|
||||
description = "A CLI tool to change monitor settings over USB to the Gigabyte M32U";
|
||||
description =
|
||||
"A CLI tool to change monitor settings over USB to the Gigabyte M32U";
|
||||
homepage = "https://github.com/kelvie/gbmonctl";
|
||||
};
|
||||
}
|
||||
|
||||
@@ -1,9 +1,4 @@
|
||||
{
|
||||
stdenv,
|
||||
fetchFromGitHub,
|
||||
glibc,
|
||||
lib,
|
||||
}:
|
||||
{ stdenv, fetchFromGitHub, glibc, lib, }:
|
||||
stdenv.mkDerivation {
|
||||
name = "lpc21isp";
|
||||
src = fetchFromGitHub {
|
||||
@@ -12,16 +7,17 @@ stdenv.mkDerivation {
|
||||
rev = "cf89d0b122ef02358e0f130b8f32cb804c11a54e";
|
||||
hash = "sha256-BZvtJMtVyqsCPVhp/QL5cXJY8Q25T/RzYzHMutE24hk=";
|
||||
};
|
||||
nativeBuildInputs = [glibc.static];
|
||||
nativeBuildInputs = [ glibc.static ];
|
||||
installPhase = ''
|
||||
mkdir -p $out/bin
|
||||
cp lpc21isp $out/bin
|
||||
'';
|
||||
meta = with lib; {
|
||||
description = "Portable command line ISP for NXP LPC family and Analog Devices ADUC70xx";
|
||||
description =
|
||||
"Portable command line ISP for NXP LPC family and Analog Devices ADUC70xx";
|
||||
homepage = "https://github.com/capiman/lpc21isp";
|
||||
license = licenses.lgpl3Plus;
|
||||
maintainers = [maintainers.theaninova];
|
||||
maintainers = [ maintainers.theaninova ];
|
||||
mainProgram = "lpc21isp";
|
||||
};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user