Compare commits
No commits in common. "main" and "old-structure" have entirely different histories.
main
...
old-struct
288 changed files with 2929 additions and 12526 deletions
|
@ -1,7 +0,0 @@
|
|||
keys:
|
||||
- &franz age1uauvjwfvg8u0zkn58ematurcptf43gz6vx44nwkq3xcnmwq95psqna9psw
|
||||
creation_rules:
|
||||
- path_regex: secrets/franz.yaml$
|
||||
key_groups:
|
||||
- age:
|
||||
- *franz
|
20
README.md
20
README.md
|
@ -1,20 +0,0 @@
|
|||
# Nix-Config
|
||||
|
||||
## Installation
|
||||
|
||||
The NixOS installer image comes with password SSH auth disabled. Simply allowing the public Git keys is a nice workaround.
|
||||
```sh
|
||||
sudo systemctl start sshd
|
||||
mkdir ~/.ssh; curl https://git.ghoscht.com/ghoscht.keys > ~/.ssh/authorized_keys
|
||||
```
|
||||
|
||||
The specific config from "hosts" can be installed using the following command. Limiting the download speed is optional, but can come in handy.
|
||||
```sh
|
||||
sudo nixos-install --option download-speed 4000 --flake .#<CONFIG_NAME_HERE>
|
||||
```
|
||||
|
||||
## RPi Image generation
|
||||
```sh
|
||||
nix build .#nixosConfigurations.eustachius.config.system.build.sdImage
|
||||
sudo dd if=./result/sd-image/<IMAGE_NAME>.img of=/dev/<DEVICE_NAME> bs=1M status=progress
|
||||
```
|
|
@ -1,74 +0,0 @@
|
|||
{device ? throw "Set this to your disk device, e.g. /dev/sda", ...}: {
|
||||
disko.devices = {
|
||||
disk.main = {
|
||||
inherit device;
|
||||
type = "disk";
|
||||
content = {
|
||||
type = "gpt";
|
||||
partitions = {
|
||||
boot = {
|
||||
name = "boot";
|
||||
size = "1M";
|
||||
type = "EF02";
|
||||
};
|
||||
esp = {
|
||||
name = "ESP";
|
||||
size = "500M";
|
||||
type = "EF00";
|
||||
content = {
|
||||
type = "filesystem";
|
||||
format = "vfat";
|
||||
mountpoint = "/boot";
|
||||
mountOptions = ["umask=0077"];
|
||||
};
|
||||
};
|
||||
swap = {
|
||||
size = "4G";
|
||||
content = {
|
||||
type = "swap";
|
||||
resumeDevice = true;
|
||||
};
|
||||
};
|
||||
root = {
|
||||
name = "root";
|
||||
size = "100%";
|
||||
content = {
|
||||
type = "lvm_pv";
|
||||
vg = "root_vg";
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
lvm_vg = {
|
||||
root_vg = {
|
||||
type = "lvm_vg";
|
||||
lvs = {
|
||||
root = {
|
||||
size = "100%FREE";
|
||||
content = {
|
||||
type = "btrfs";
|
||||
extraArgs = ["-f"];
|
||||
|
||||
subvolumes = {
|
||||
"/root" = {
|
||||
mountpoint = "/";
|
||||
};
|
||||
|
||||
"/home" = {
|
||||
mountOptions = ["compress=zstd"];
|
||||
mountpoint = "/home";
|
||||
};
|
||||
|
||||
"/nix" = {
|
||||
mountOptions = ["subvol=nix" "compress=zstd" "noatime"];
|
||||
mountpoint = "/nix";
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
1243
flake.lock
1243
flake.lock
File diff suppressed because it is too large
Load diff
197
flake.nix
197
flake.nix
|
@ -1,151 +1,76 @@
|
|||
#
|
||||
# flake.nix *
|
||||
# ├─ ./hosts
|
||||
# │ └─ default.nix
|
||||
# ├─ ./darwin
|
||||
# │ └─ default.nix
|
||||
# └─ ./nix
|
||||
# └─ default.nix
|
||||
#
|
||||
{
|
||||
description = "Your new nix config";
|
||||
description = "Nix, NixOS and Nix Darwin System Flake Configuration";
|
||||
|
||||
inputs = {
|
||||
# Nixpkgs
|
||||
nixpkgs.url = "github:nixos/nixpkgs/nixos-24.05";
|
||||
# You can access packages and modules from different nixpkgs revs
|
||||
# at the same time. Here's an working example:
|
||||
nixpkgs-unstable.url = "github:nixos/nixpkgs/nixos-unstable";
|
||||
# Also see the 'unstable-packages' overlay at 'overlays/default.nix'.
|
||||
inputs =
|
||||
# References Used by Flake
|
||||
{
|
||||
nixpkgs.url = "github:nixos/nixpkgs/nixos-23.05"; # Stable Nix Packages (Default)
|
||||
nixpkgs-unstable.url = "github:nixos/nixpkgs/nixos-unstable"; # Unstable Nix Packages
|
||||
|
||||
# Home manager
|
||||
home-manager.url = "github:nix-community/home-manager/release-24.05";
|
||||
home-manager.inputs.nixpkgs.follows = "nixpkgs";
|
||||
home-manager = {
|
||||
# User Environment Manager
|
||||
url = "github:nix-community/home-manager/release-23.05";
|
||||
inputs.nixpkgs.follows = "nixpkgs";
|
||||
};
|
||||
|
||||
hardware.url = "github:nixos/nixos-hardware";
|
||||
nur = {
|
||||
# NUR Community Packages
|
||||
url = "github:nix-community/NUR"; # Requires "nur.nixosModules.nur" to be added to the host modules
|
||||
};
|
||||
|
||||
disko = {
|
||||
url = "github:nix-community/disko";
|
||||
inputs.nixpkgs.follows = "nixpkgs";
|
||||
hyprland = {
|
||||
# Official Hyprland Flake
|
||||
url = "github:hyprwm/Hyprland"; # Requires "hyprland.nixosModules.default" to be added the host modules
|
||||
inputs.nixpkgs.follows = "nixpkgs-unstable";
|
||||
};
|
||||
|
||||
split-monitor-workspaces = {
|
||||
url = "github:Duckonaut/split-monitor-workspaces";
|
||||
inputs.hyprland.follows = "hyprland"; # <- make sure this line is present for the plugin to work as intended
|
||||
};
|
||||
};
|
||||
|
||||
nix-colors.url = "github:misterio77/nix-colors";
|
||||
firefox-addons = {
|
||||
url = "gitlab:rycee/nur-expressions?dir=pkgs/firefox-addons";
|
||||
inputs.nixpkgs.follows = "nixpkgs";
|
||||
};
|
||||
arkenfox = {
|
||||
url = "github:dwarfmaster/arkenfox-nixos";
|
||||
inputs.nixpkgs.follows = "nixpkgs";
|
||||
};
|
||||
xremap.url = "github:xremap/nix-flake";
|
||||
flatpaks.url = "github:GermanBread/declarative-flatpak/stable-v3";
|
||||
heliox-cli.url = "git+https://git.ghoscht.com/heliox/cli?ref=custom-dimming";
|
||||
picokontroller.url = "git+https://git.ghoscht.com/ghoscht/picoKontroller";
|
||||
sops-nix.url = "github:Mic92/sops-nix";
|
||||
arion.url = "github:hercules-ci/arion";
|
||||
};
|
||||
|
||||
outputs = {
|
||||
outputs = inputs @ {
|
||||
self,
|
||||
nixpkgs,
|
||||
nixpkgs-unstable,
|
||||
home-manager,
|
||||
nur,
|
||||
hyprland,
|
||||
split-monitor-workspaces,
|
||||
...
|
||||
} @ inputs: let
|
||||
inherit (self) outputs;
|
||||
# Supported systems for your flake packages, shell, etc.
|
||||
systems = [
|
||||
"aarch64-linux"
|
||||
"i686-linux"
|
||||
"x86_64-linux"
|
||||
"aarch64-darwin"
|
||||
"x86_64-darwin"
|
||||
];
|
||||
# This is a function that generates an attribute by calling a function you
|
||||
# pass to it, with each system as an argument
|
||||
forAllSystems = nixpkgs.lib.genAttrs systems;
|
||||
vars = import ./vars.nix;
|
||||
}:
|
||||
# Function telling flake which inputs to use
|
||||
let
|
||||
vars = {
|
||||
# Variables Used In Flake
|
||||
user = "ghoscht";
|
||||
location = "$HOME/.setup";
|
||||
terminal = "alacritty";
|
||||
editor = "nvim";
|
||||
};
|
||||
in {
|
||||
# Your custom packages
|
||||
# Accessible through 'nix build', 'nix shell', etc
|
||||
packages = forAllSystems (system: import ./pkgs nixpkgs.legacyPackages.${system});
|
||||
# Formatter for your nix files, available through 'nix fmt'
|
||||
# Other options beside 'alejandra' include 'nixpkgs-fmt'
|
||||
formatter = forAllSystems (system: nixpkgs.legacyPackages.${system}.alejandra);
|
||||
nixosConfigurations = ( # NixOS Configurations
|
||||
import ./hosts {
|
||||
inherit (nixpkgs) lib;
|
||||
inherit inputs nixpkgs nixpkgs-unstable home-manager nur hyprland split-monitor-workspaces vars; # Inherit inputs
|
||||
}
|
||||
);
|
||||
|
||||
# Your custom packages and modifications, exported as overlays
|
||||
overlays = import ./overlays {inherit inputs;};
|
||||
# Reusable nixos modules you might want to export
|
||||
# These are usually stuff you would upstream into nixpkgs
|
||||
nixosModules = import ./modules/nixos;
|
||||
# Reusable home-manager modules you might want to export
|
||||
# These are usually stuff you would upstream into home-manager
|
||||
homeManagerModules = import ./modules/home-manager;
|
||||
|
||||
# NixOS configuration entrypoint
|
||||
# Available through 'nixos-rebuild --flake .#your-hostname'
|
||||
nixosConfigurations = {
|
||||
adalbert = nixpkgs.lib.nixosSystem {
|
||||
specialArgs = {inherit inputs outputs vars;};
|
||||
modules = [
|
||||
./hosts/adalbert
|
||||
];
|
||||
};
|
||||
ludwig = nixpkgs.lib.nixosSystem {
|
||||
specialArgs = {inherit inputs outputs vars;};
|
||||
modules = [
|
||||
./hosts/ludwig
|
||||
];
|
||||
};
|
||||
leopold = nixpkgs.lib.nixosSystem {
|
||||
specialArgs = {inherit inputs outputs vars;};
|
||||
modules = [
|
||||
./hosts/leopold
|
||||
];
|
||||
};
|
||||
franz = nixpkgs.lib.nixosSystem {
|
||||
specialArgs = {inherit inputs outputs vars;};
|
||||
modules = [
|
||||
./hosts/franz
|
||||
];
|
||||
};
|
||||
# build with nix build .#nixosConfigurations.eustachius.config.system.build.sdImage
|
||||
eustachius = nixpkgs.lib.nixosSystem {
|
||||
system = "aarch64-linux";
|
||||
modules = [
|
||||
"${nixpkgs}/nixos/modules/installer/sd-card/sd-image-aarch64-installer.nix"
|
||||
./hosts/eustachius
|
||||
|
||||
# extra config for sdImage generator
|
||||
{
|
||||
sdImage.compressImage = false;
|
||||
}
|
||||
];
|
||||
};
|
||||
};
|
||||
|
||||
# Standalone home-manager configuration entrypoint
|
||||
# Available through 'home-manager --flake .#your-username@your-hostname'
|
||||
homeConfigurations = {
|
||||
"${vars.user}@adalbert" = home-manager.lib.homeManagerConfiguration {
|
||||
pkgs = nixpkgs.legacyPackages.x86_64-linux; # Home-manager requires 'pkgs' instance
|
||||
extraSpecialArgs = {inherit inputs outputs vars;};
|
||||
modules = [
|
||||
./home/adalbert.nix
|
||||
];
|
||||
};
|
||||
};
|
||||
"${vars.user}@ludwig" = home-manager.lib.homeManagerConfiguration {
|
||||
pkgs = nixpkgs.legacyPackages.x86_64-linux; # Home-manager requires 'pkgs' instance
|
||||
extraSpecialArgs = {inherit inputs outputs vars;};
|
||||
modules = [
|
||||
./home/ludwig.nix
|
||||
];
|
||||
};
|
||||
"${vars.user}@franz" = home-manager.lib.homeManagerConfiguration {
|
||||
pkgs = nixpkgs.legacyPackages.x86_64-linux; # Home-manager requires 'pkgs' instance
|
||||
extraSpecialArgs = {inherit inputs outputs vars;};
|
||||
modules = [
|
||||
./home/franz.nix
|
||||
];
|
||||
};
|
||||
# "${vars.user}@eustachius" = home-manager.lib.homeManagerConfiguration {
|
||||
# pkgs = nixpkgs.legacyPackages.aarch64-linux; # Home-manager requires 'pkgs' instance
|
||||
# extraSpecialArgs = {inherit inputs outputs vars;};
|
||||
# modules = [
|
||||
# ./home/eustachius.nix
|
||||
# ];
|
||||
# };
|
||||
homeConfigurations = ( # Nix Configurations
|
||||
import ./nix/home.nix {
|
||||
inherit (nixpkgs) lib;
|
||||
inherit inputs nixpkgs nixpkgs-unstable home-manager vars hyprland split-monitor-workspaces;
|
||||
}
|
||||
);
|
||||
};
|
||||
}
|
||||
|
|
|
@ -1,31 +0,0 @@
|
|||
{
|
||||
inputs,
|
||||
outputs,
|
||||
pkgs,
|
||||
...
|
||||
}: let
|
||||
in {
|
||||
imports = [
|
||||
./global
|
||||
./features/desktop/awesome
|
||||
./features/games
|
||||
./features/coding
|
||||
./features/desktop/common/3d-printing.nix
|
||||
inputs.nix-colors.homeManagerModules.default
|
||||
];
|
||||
|
||||
colorScheme = inputs.nix-colors.colorSchemes.catppuccin-mocha;
|
||||
|
||||
home.packages = [
|
||||
inputs.picokontroller.packages.x86_64-linux.default
|
||||
# pkgs.citrix_workspace
|
||||
];
|
||||
nixpkgs = {
|
||||
config = {
|
||||
permittedInsecurePackages = [
|
||||
"electron-25.9.0"
|
||||
"nix-2.15.3"
|
||||
];
|
||||
};
|
||||
};
|
||||
}
|
|
@ -1,6 +0,0 @@
|
|||
{
|
||||
programs.bat = {
|
||||
enable = true;
|
||||
config.theme = "base16";
|
||||
};
|
||||
}
|
|
@ -1,98 +0,0 @@
|
|||
{config, ...}: {
|
||||
programs.btop = {
|
||||
enable = true;
|
||||
settings = {
|
||||
color_theme = "nix-colors";
|
||||
theme_background = false;
|
||||
truecolor = true;
|
||||
vim_keys = true;
|
||||
rounded_corners = true;
|
||||
proc_gradient = false;
|
||||
};
|
||||
};
|
||||
xdg.configFile."btop/themes/nix-colors".text = ''
|
||||
# Main background, empty for terminal default, need to be empty if you want transparent background
|
||||
# theme[main_bg]="#${config.colorScheme.colors.base00}"
|
||||
|
||||
# Main text color
|
||||
theme[main_fg]="#${config.colorScheme.colors.base05}"
|
||||
|
||||
# Title color for boxes
|
||||
theme[title]="#${config.colorScheme.colors.base05}"
|
||||
|
||||
# Highlight color for keyboard shortcuts
|
||||
theme[hi_fg]="#${config.colorScheme.colors.base0D}"
|
||||
|
||||
# Background color of selected item in processes box
|
||||
theme[selected_bg]="#${config.colorScheme.colors.base03}"
|
||||
|
||||
# Foreground color of selected item in processes box
|
||||
theme[selected_fg]="#${config.colorScheme.colors.base0D}"
|
||||
|
||||
# Color of inactive/disabled text
|
||||
theme[inactive_fg]="#${config.colorScheme.colors.base02}"
|
||||
|
||||
# Color of text appearing on top of graphs, i.e uptime and current network graph scaling
|
||||
theme[graph_text]="#${config.colorScheme.colors.base06}"
|
||||
|
||||
# Background color of the percentage meters
|
||||
theme[meter_bg]="#${config.colorScheme.colors.base03}"
|
||||
|
||||
# Misc colors for processes box including mini cpu graphs, details memory graph and details status text
|
||||
theme[proc_misc]="#${config.colorScheme.colors.base06}"
|
||||
|
||||
# CPU, Memory, Network, Proc box outline colors
|
||||
theme[cpu_box]="#${config.colorScheme.colors.base0E}" #Mauve
|
||||
theme[mem_box]="#${config.colorScheme.colors.base0B}" #Green
|
||||
theme[net_box]="#${config.colorScheme.colors.base08}" #Maroon
|
||||
theme[proc_box]="#${config.colorScheme.colors.base0D}" #Blue
|
||||
|
||||
# Box divider line and small boxes line color
|
||||
theme[div_line]="#${config.colorScheme.colors.base04}"
|
||||
|
||||
# Temperature graph color (Green -> Yellow -> Red)
|
||||
theme[temp_start]="#${config.colorScheme.colors.base0B}"
|
||||
theme[temp_mid]="#${config.colorScheme.colors.base0A}"
|
||||
theme[temp_end]="#${config.colorScheme.colors.base08}"
|
||||
|
||||
# CPU graph colors (Teal -> Lavender)
|
||||
theme[cpu_start]="#${config.colorScheme.colors.base0C}"
|
||||
theme[cpu_mid]="#${config.colorScheme.colors.base0D}"
|
||||
theme[cpu_end]="#${config.colorScheme.colors.base07}"
|
||||
|
||||
# Mem/Disk free meter (Mauve -> Lavender -> Blue)
|
||||
theme[free_start]="#${config.colorScheme.colors.base0E}"
|
||||
theme[free_mid]="#${config.colorScheme.colors.base07}"
|
||||
theme[free_end]="#${config.colorScheme.colors.base0D}"
|
||||
|
||||
# Mem/Disk cached meter (Sapphire -> Lavender)
|
||||
theme[cached_start]="#${config.colorScheme.colors.base0D}"
|
||||
theme[cached_mid]="#${config.colorScheme.colors.base0D}"
|
||||
theme[cached_end]="#${config.colorScheme.colors.base07}"
|
||||
|
||||
# Mem/Disk available meter (Peach -> Red)
|
||||
theme[available_start]="#${config.colorScheme.colors.base0F}"
|
||||
theme[available_mid]="#${config.colorScheme.colors.base09}"
|
||||
theme[available_end]="#${config.colorScheme.colors.base08}"
|
||||
|
||||
# Mem/Disk used meter (Green -> Sky)
|
||||
theme[used_start]="#${config.colorScheme.colors.base0B}"
|
||||
theme[used_mid]="#${config.colorScheme.colors.base0C}"
|
||||
theme[used_end]="#${config.colorScheme.colors.base0D}"
|
||||
|
||||
# Download graph colors (Peach -> Red)
|
||||
theme[download_start]="#${config.colorScheme.colors.base0F}"
|
||||
theme[download_mid]="#${config.colorScheme.colors.base09}"
|
||||
theme[download_end]="#${config.colorScheme.colors.base08}"
|
||||
|
||||
# Upload graph colors (Green -> Sky)
|
||||
theme[upload_start]="#${config.colorScheme.colors.base0B}"
|
||||
theme[upload_mid]="#${config.colorScheme.colors.base0C}"
|
||||
theme[upload_end]="#${config.colorScheme.colors.base0D}"
|
||||
|
||||
# Process box color gradient for threads, mem and cpu usage (Sapphire -> Mauve)
|
||||
theme[process_start]="#${config.colorScheme.colors.base0D}"
|
||||
theme[process_mid]="#${config.colorScheme.colors.base0C}"
|
||||
theme[process_end]="#${config.colorScheme.colors.base0E}"
|
||||
'';
|
||||
}
|
|
@ -1,40 +0,0 @@
|
|||
{pkgs, ...}: {
|
||||
imports = [
|
||||
./bat.nix
|
||||
./direnv.nix
|
||||
./fish.nix
|
||||
./git.nix
|
||||
./gpg.nix
|
||||
./btop.nix
|
||||
./nix-index.nix
|
||||
./lazygit.nix
|
||||
];
|
||||
home.packages = with pkgs; [
|
||||
comma # Install and run programs by sticking a , before them
|
||||
distrobox # Nice escape hatch, integrates docker images with my environment
|
||||
|
||||
bc # Calculator
|
||||
eza # Better ls
|
||||
ripgrep # Better grep
|
||||
fd # Better find
|
||||
httpie # Better curl
|
||||
diffsitter # Better diff
|
||||
jq # JSON pretty printer and manipulator
|
||||
timer # Nice looking timer
|
||||
lazydocker # Docker TUI
|
||||
neofetch # Unixporn stuff
|
||||
tldr # Nice & short manual snippets
|
||||
ntfy-sh # Push notifications to other devices
|
||||
ipinfo # IP geolocation
|
||||
ranger # TUI file manager
|
||||
trickle # cli network limiter
|
||||
du-dust # disk usage visualizer
|
||||
lftp # FTP client
|
||||
unar # unarchive files like rar, zip, tar
|
||||
glow # fancy markdown viewer
|
||||
|
||||
nvd # Differ
|
||||
nix-output-monitor
|
||||
nh # Nice wrapper for NixOS and HM
|
||||
];
|
||||
}
|
|
@ -1,6 +0,0 @@
|
|||
{
|
||||
programs.direnv = {
|
||||
enable = true;
|
||||
nix-direnv.enable = true;
|
||||
};
|
||||
}
|
|
@ -1,109 +0,0 @@
|
|||
{
|
||||
config,
|
||||
lib,
|
||||
pkgs,
|
||||
...
|
||||
}: let
|
||||
inherit (lib) mkIf;
|
||||
hasPackage = pname: lib.any (p: p ? pname && p.pname == pname) config.home.packages;
|
||||
hasRipgrep = hasPackage "ripgrep";
|
||||
hasLftp = hasPackage "lftp";
|
||||
hasExa = hasPackage "eza";
|
||||
hasLazygit = config.programs.lazygit.enable;
|
||||
hasLazydocker = hasPackage "lazydocker";
|
||||
hasNixYourShell = hasPackage "nix-your-shell";
|
||||
hasShellColor = config.programs.shellcolor.enable;
|
||||
hasWezterm = config.programs.wezterm.enable;
|
||||
shellcolor = "${pkgs.shellcolord}/bin/shellcolor";
|
||||
in {
|
||||
programs.fish = {
|
||||
enable = true;
|
||||
interactiveShellInit = ''
|
||||
${
|
||||
if hasNixYourShell
|
||||
then "nix-your-shell fish | source"
|
||||
else ""
|
||||
}
|
||||
'';
|
||||
plugins = [
|
||||
{
|
||||
name = "grc";
|
||||
src = pkgs.fishPlugins.grc.src;
|
||||
}
|
||||
{
|
||||
name = "fzf";
|
||||
src = pkgs.fishPlugins.fzf.src;
|
||||
}
|
||||
{
|
||||
name = "tide";
|
||||
src = pkgs.fishPlugins.tide.src;
|
||||
}
|
||||
{
|
||||
name = "sponge";
|
||||
src = pkgs.fishPlugins.sponge.src;
|
||||
}
|
||||
{
|
||||
name = "autopair";
|
||||
src = pkgs.fishPlugins.autopair.src;
|
||||
}
|
||||
{
|
||||
name = "puffer";
|
||||
src = pkgs.fishPlugins.puffer.src;
|
||||
}
|
||||
{
|
||||
name = "z";
|
||||
src = pkgs.fishPlugins.z.src;
|
||||
}
|
||||
];
|
||||
shellAliases = {
|
||||
lzg = mkIf hasLazygit "lazygit";
|
||||
lzd = mkIf hasLazydocker "lazydocker";
|
||||
batt = ''upower -i /org/freedesktop/UPower/devices/battery_BAT0 | grep -e "percentage" -e "state"'';
|
||||
slp = "systemctl suspend";
|
||||
sdn = "shutdown 0";
|
||||
nrs = "nh os switch ~/.setup";
|
||||
|
||||
ls = mkIf hasExa "eza";
|
||||
ll = mkIf hasExa "eza -l";
|
||||
la = mkIf hasExa "eza -la";
|
||||
exa = mkIf hasExa "eza";
|
||||
|
||||
imgcat = mkIf hasWezterm "wezterm imgcat";
|
||||
};
|
||||
shellAbbrs = rec {
|
||||
jqless = "jq -C | less -r";
|
||||
|
||||
n = "nix";
|
||||
nd = "nix develop -c $SHELL";
|
||||
ns = "nix shell";
|
||||
nsn = "nix shell nixpkgs#";
|
||||
nb = "nix build";
|
||||
nbn = "nix build nixpkgs#";
|
||||
nf = "nix flake";
|
||||
|
||||
glk = "gpg --list-keys --with-keygrip";
|
||||
gssh = "gpg --export-ssh-key";
|
||||
gnk = "gpg --full-generate-key --expert";
|
||||
gek = "gpg --edit-key --expert";
|
||||
|
||||
udmount = "udisksctl mount -b";
|
||||
udumount = "udisksctl unmount -b";
|
||||
|
||||
fftp = mkIf hasLftp "lftp -u ghoscht, sftp://192.168.178.35";
|
||||
arss = "sudo autorestic exec -av -- snapshots";
|
||||
};
|
||||
functions = {
|
||||
# Disable greeting
|
||||
fish_greeting = "";
|
||||
fish_init_custom = ''
|
||||
tide configure --auto --style=Rainbow --prompt_colors='True color' --show_time=No --rainbow_prompt_separators=Vertical --powerline_prompt_heads=Slanted --powerline_prompt_tails=Flat --powerline_prompt_style='Two lines, frame' --prompt_connection=Solid --powerline_right_prompt_frame=No --prompt_connection_andor_frame_color=Darkest --prompt_spacing=Compact --icons='Many icons' --transient=Yes
|
||||
'';
|
||||
};
|
||||
};
|
||||
home.packages = with pkgs; [grc fzf nix-your-shell];
|
||||
|
||||
# Applies tide configure on rebuild
|
||||
home.activation.configureTide = lib.hm.dag.entryAfter ["writeBoundary"] ''
|
||||
${pkgs.fish}/bin/fish -c "fish_init_custom"
|
||||
'';
|
||||
}
|
|
@ -1,22 +0,0 @@
|
|||
{pkgs, ...}: {
|
||||
#Prefer IPv4 for ssh
|
||||
# home.file.".ssh/config".text = "AddressFamily inet";
|
||||
|
||||
programs.git = {
|
||||
enable = true;
|
||||
userName = "GHOSCHT";
|
||||
userEmail = "31184695+GHOSCHT@users.noreply.github.com";
|
||||
package = pkgs.gitAndTools.gitFull;
|
||||
|
||||
extraConfig = {
|
||||
commit.gpgsign = true;
|
||||
user.signingkey = "0x2C2C1C62A5388E82";
|
||||
init.defaultBranch = "main";
|
||||
pull.rebase = false; # merge by default
|
||||
};
|
||||
lfs.enable = true;
|
||||
aliases = {
|
||||
graph = "log --decorate --oneline --graph";
|
||||
};
|
||||
};
|
||||
}
|
|
@ -1,25 +0,0 @@
|
|||
{
|
||||
lib,
|
||||
pkgs,
|
||||
...
|
||||
}: {
|
||||
programs.gpg = {
|
||||
enable = true;
|
||||
};
|
||||
services.gpg-agent = {
|
||||
enable = true;
|
||||
enableSshSupport = true;
|
||||
enableFishIntegration = true;
|
||||
enableZshIntegration = true;
|
||||
pinentryPackage = pkgs.pinentry-gnome3;
|
||||
};
|
||||
|
||||
# Prevent clobbering SSH_AUTH_SOCK
|
||||
home.sessionVariables.GSM_SKIP_SSH_AGENT_WORKAROUND = "1";
|
||||
|
||||
# Disable gnome-keyring ssh-agent
|
||||
xdg.configFile."autostart/gnome-keyring-ssh.desktop".text = ''
|
||||
${lib.fileContents "${pkgs.gnome3.gnome-keyring}/etc/xdg/autostart/gnome-keyring-ssh.desktop"}
|
||||
Hidden=true
|
||||
'';
|
||||
}
|
|
@ -1,21 +0,0 @@
|
|||
{config, ...}: {
|
||||
programs.lazygit = {
|
||||
enable = true;
|
||||
settings = with config.colorScheme.colors; {
|
||||
gui = {
|
||||
theme = {
|
||||
activeBorderColor = ["#${base0D}" "bold"];
|
||||
inactiveBorderColor = ["#${base05}"];
|
||||
optionsTextColor = ["#${base0D}"];
|
||||
selectedLineBgColor = ["${base02}"];
|
||||
selectedRangeBgColor = ["${base02}"];
|
||||
cherryPickedCommitBgColor = ["#${base03}"];
|
||||
cherryPickedCommitFgColor = ["#${base0D}"];
|
||||
unstagedChangesColor = ["#${base08}"];
|
||||
defaultFgColor = ["#${base05}"];
|
||||
searchingActiveBorderColor = ["#${base0A}"];
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
|
@ -1,33 +0,0 @@
|
|||
{pkgs, ...}: let
|
||||
update-script = pkgs.writeShellApplication {
|
||||
name = "fetch-nix-index-database";
|
||||
runtimeInputs = with pkgs; [wget coreutils];
|
||||
text = ''
|
||||
filename="index-x86_64-linux"
|
||||
mkdir -p ~/.cache/nix-index
|
||||
cd ~/.cache/nix-index
|
||||
wget -N "https://github.com/Mic92/nix-index-database/releases/latest/download/$filename"
|
||||
ln -f "$filename" files
|
||||
'';
|
||||
};
|
||||
in {
|
||||
programs.nix-index.enable = true;
|
||||
|
||||
systemd.user.services.nix-index-database-sync = {
|
||||
Unit = {Description = "fetch mic92/nix-index-database";};
|
||||
Service = {
|
||||
Type = "oneshot";
|
||||
ExecStart = "${update-script}/bin/fetch-nix-index-database";
|
||||
Restart = "on-failure";
|
||||
RestartSec = "5m";
|
||||
};
|
||||
};
|
||||
systemd.user.timers.nix-index-database-sync = {
|
||||
Unit = {Description = "Automatic github:mic92/nix-index-database fetching";};
|
||||
Timer = {
|
||||
OnBootSec = "10m";
|
||||
OnUnitActiveSec = "24h";
|
||||
};
|
||||
Install = {WantedBy = ["timers.target"];};
|
||||
};
|
||||
}
|
|
@ -1,8 +0,0 @@
|
|||
{pkgs, ...}: {
|
||||
imports = [
|
||||
./nvim
|
||||
./vscode.nix
|
||||
./intellij.nix
|
||||
./tmux.nix
|
||||
];
|
||||
}
|
|
@ -1,9 +0,0 @@
|
|||
{pkgs, ...}: {
|
||||
home.packages = [
|
||||
(pkgs.unstable.jetbrains.plugins.addPlugins pkgs.unstable.jetbrains.idea-ultimate ["ideavim"])
|
||||
];
|
||||
home.sessionVariables = {
|
||||
JAVA_HOME = "${pkgs.openjdk17}/lib/openjdk";
|
||||
LD_LIBRARY_PATH = "${pkgs.libGL}/lib:${pkgs.gtk3}/lib:${pkgs.glib.out}/lib:${pkgs.xorg.libXtst}/lib";
|
||||
};
|
||||
}
|
|
@ -1,257 +0,0 @@
|
|||
{
|
||||
config,
|
||||
lib,
|
||||
pkgs,
|
||||
# vars,
|
||||
...
|
||||
}: let
|
||||
vars = import ../../../../vars.nix;
|
||||
colors = config.colorScheme.colors;
|
||||
stableExtraPkgs = with pkgs; [
|
||||
# LSP
|
||||
lua-language-server
|
||||
pkgs.nodePackages.typescript-language-server
|
||||
|
||||
# Formatters
|
||||
stylua # lua
|
||||
black # pyton
|
||||
alejandra # nix
|
||||
clang-tools_16 # c/c++
|
||||
rustfmt
|
||||
yamlfmt
|
||||
prettierd
|
||||
vscode-langservers-extracted
|
||||
|
||||
# Linters
|
||||
ruff # python
|
||||
nodePackages.jsonlint # json
|
||||
nodePackages.eslint_d # javascript
|
||||
|
||||
# Tools
|
||||
xclip
|
||||
wl-clipboard
|
||||
fzf
|
||||
gcc
|
||||
|
||||
# idk?
|
||||
lua
|
||||
];
|
||||
unstableExtraPkgs = with pkgs.unstable; [
|
||||
# LSP
|
||||
nixd
|
||||
];
|
||||
in {
|
||||
home.sessionVariables.EDITOR = "nvim";
|
||||
|
||||
programs.neovim = {
|
||||
enable = true;
|
||||
|
||||
viAlias = true;
|
||||
vimAlias = true;
|
||||
vimdiffAlias = true;
|
||||
|
||||
extraPackages = stableExtraPkgs ++ unstableExtraPkgs;
|
||||
|
||||
plugins = with pkgs.vimPlugins; [
|
||||
{
|
||||
plugin = neodev-nvim;
|
||||
type = "lua";
|
||||
config = ''
|
||||
require("neodev").setup({
|
||||
override = function(root_dir, library)
|
||||
if root_dir:find("/home/${vars.user + "/" + vars.dir_name}", 1, true) == 1 then
|
||||
library.enabled = true
|
||||
library.plugins = true
|
||||
end
|
||||
end,
|
||||
})
|
||||
'';
|
||||
}
|
||||
|
||||
{
|
||||
plugin = nvim-lspconfig;
|
||||
config = builtins.readFile ./plugin/lsp.lua;
|
||||
type = "lua";
|
||||
}
|
||||
|
||||
{
|
||||
plugin = comment-nvim;
|
||||
config = "require('Comment').setup()";
|
||||
type = "lua";
|
||||
}
|
||||
|
||||
cmp-path
|
||||
nvim-cmp
|
||||
{
|
||||
plugin = nvim-cmp;
|
||||
config = builtins.readFile ./plugin/cmp.lua;
|
||||
type = "lua";
|
||||
}
|
||||
|
||||
{
|
||||
plugin = telescope-nvim;
|
||||
config = builtins.readFile ./plugin/telescope.lua;
|
||||
type = "lua";
|
||||
}
|
||||
|
||||
telescope-fzf-native-nvim
|
||||
telescope-ui-select-nvim
|
||||
|
||||
cmp_luasnip
|
||||
cmp-nvim-lsp
|
||||
|
||||
luasnip
|
||||
friendly-snippets
|
||||
|
||||
{
|
||||
plugin = nvim-treesitter.withPlugins (p: [
|
||||
p.vim
|
||||
p.bash
|
||||
p.lua
|
||||
p.python
|
||||
p.json
|
||||
p.java
|
||||
p.rust
|
||||
p.cpp
|
||||
p.c
|
||||
p.css
|
||||
p.csv
|
||||
p.dockerfile
|
||||
p.diff
|
||||
p.gitignore
|
||||
p.git_config
|
||||
p.gitattributes
|
||||
p.make
|
||||
p.yaml
|
||||
p.toml
|
||||
p.typescript
|
||||
p.xml
|
||||
]);
|
||||
config = builtins.readFile ./plugin/treesitter.lua;
|
||||
type = "lua";
|
||||
}
|
||||
|
||||
vim-nix
|
||||
|
||||
{
|
||||
plugin = base16-nvim;
|
||||
config = ''
|
||||
require('base16-colorscheme').setup({
|
||||
base00 = '#${colors.base00}', base01 = '#${colors.base01}', base02 = '#${colors.base02}', base03 = '#${colors.base03}',
|
||||
base04 = '#${colors.base04}', base05 = '#${colors.base05}', base06 = '#${colors.base06}', base07 = '#${colors.base07}',
|
||||
base08 = '#${colors.base08}', base09 = '#${colors.base09}', base0A = '#${colors.base0A}', base0B = '#${colors.base0B}',
|
||||
base0C = '#${colors.base0C}', base0D = '#${colors.base0D}', base0E = '#${colors.base0E}', base0F = '#${colors.base0F}',
|
||||
})'';
|
||||
type = "lua";
|
||||
}
|
||||
|
||||
{
|
||||
plugin = lualine-nvim;
|
||||
config = builtins.readFile ./plugin/lualine.lua;
|
||||
type = "lua";
|
||||
}
|
||||
|
||||
nvim-web-devicons
|
||||
plenary-nvim
|
||||
nui-nvim
|
||||
{
|
||||
plugin = neo-tree-nvim;
|
||||
config = builtins.readFile ./plugin/neo-tree.lua;
|
||||
type = "lua";
|
||||
}
|
||||
|
||||
{
|
||||
plugin = gitsigns-nvim;
|
||||
config = "require('gitsigns').setup()";
|
||||
type = "lua";
|
||||
}
|
||||
|
||||
diffview-nvim
|
||||
lazygit-nvim
|
||||
|
||||
{
|
||||
plugin = todo-comments-nvim;
|
||||
config = builtins.readFile ./plugin/todo.lua;
|
||||
type = "lua";
|
||||
}
|
||||
|
||||
{
|
||||
plugin = alpha-nvim;
|
||||
config = builtins.readFile ./plugin/alpha.lua;
|
||||
type = "lua";
|
||||
}
|
||||
|
||||
{
|
||||
plugin = none-ls-nvim;
|
||||
config = builtins.readFile ./plugin/none-ls.lua;
|
||||
type = "lua";
|
||||
}
|
||||
|
||||
{
|
||||
plugin = nvim-autopairs;
|
||||
config = "require('nvim-autopairs').setup()";
|
||||
type = "lua";
|
||||
}
|
||||
|
||||
barbar-nvim
|
||||
|
||||
{
|
||||
plugin = nvim-surround;
|
||||
config = "require('nvim-surround').setup({})";
|
||||
type = "lua";
|
||||
}
|
||||
|
||||
vim-be-good
|
||||
|
||||
rainbow-delimiters-nvim
|
||||
|
||||
rustaceanvim
|
||||
|
||||
{
|
||||
plugin = vim-tmux-navigator;
|
||||
config = builtins.readFile ./plugin/vim-tmux-navigator.lua;
|
||||
type = "lua";
|
||||
}
|
||||
|
||||
{
|
||||
plugin = nvim-ts-autotag;
|
||||
config = "require('nvim-ts-autotag').setup({})";
|
||||
type = "lua";
|
||||
}
|
||||
];
|
||||
|
||||
extraLuaConfig = ''
|
||||
${builtins.readFile ./options.lua}
|
||||
'';
|
||||
};
|
||||
|
||||
xdg.desktopEntries = {
|
||||
nvim = {
|
||||
name = "Neovim";
|
||||
genericName = "Text Editor";
|
||||
comment = "Edit text files";
|
||||
exec = "nvim %F";
|
||||
icon = "nvim";
|
||||
mimeType = [
|
||||
"text/english"
|
||||
"text/plain"
|
||||
"text/x-makefile"
|
||||
"text/x-c++hdr"
|
||||
"text/x-c++src"
|
||||
"text/x-chdr"
|
||||
"text/x-csrc"
|
||||
"text/x-java"
|
||||
"text/x-moc"
|
||||
"text/x-pascal"
|
||||
"text/x-tcl"
|
||||
"text/x-tex"
|
||||
"application/x-shellscript"
|
||||
"text/x-c"
|
||||
"text/x-c++"
|
||||
];
|
||||
terminal = true;
|
||||
type = "Application";
|
||||
categories = ["Utility" "TextEditor"];
|
||||
};
|
||||
};
|
||||
}
|
|
@ -1,25 +0,0 @@
|
|||
vim.keymap.set("", "<Space>", "<Nop>")
|
||||
vim.keymap.set("", "<C-Space>", "<Nop>")
|
||||
vim.g.mapleader = " "
|
||||
vim.g.maplocalleader = " "
|
||||
|
||||
vim.o.clipboard = "unnamedplus"
|
||||
|
||||
-- vim.o.number = true
|
||||
vim.o.relativenumber = true
|
||||
|
||||
vim.o.signcolumn = "yes"
|
||||
|
||||
vim.o.tabstop = 4
|
||||
vim.o.shiftwidth = 4
|
||||
|
||||
vim.o.updatetime = 300
|
||||
|
||||
vim.o.termguicolors = true
|
||||
|
||||
vim.o.mouse = "a"
|
||||
|
||||
-- disable empty line ~
|
||||
vim.o.fillchars = "eob: "
|
||||
|
||||
vim.o.undofile = true
|
|
@ -1,32 +0,0 @@
|
|||
local dashboard = require("alpha.themes.dashboard")
|
||||
local function button(sc, txt, keybind, keybind_opts)
|
||||
local b = dashboard.button(sc, txt, keybind, keybind_opts)
|
||||
b.opts.hl = "Identifier"
|
||||
b.opts.hl_shortcut = "Identifier"
|
||||
return b
|
||||
end
|
||||
|
||||
dashboard.section.buttons.val = {
|
||||
button("r", " > Recent files", ":Telescope oldfiles<CR>"),
|
||||
button("n", " > New file", ":ene <BAR> startinsert <CR>"),
|
||||
button("f", " > Find files", ":Telescope find_files hidden=true<CR>"),
|
||||
button("u", " > Update plugins", ":PackerSync<CR>"),
|
||||
button("q", " > Quit Neovim", ":qa<CR>"),
|
||||
}
|
||||
dashboard.section.footer.val = require("alpha.fortune")
|
||||
dashboard.section.header.val = {
|
||||
[[ ███▄ █ ▓█████ ▒█████ ██▒ █▓ ██▓ ███▄ ▄███▓]],
|
||||
[[ ██ ▀█ █ ▓█ ▀ ▒██▒ ██▒▓██░ █▒▓██▒▓██▒▀█▀ ██▒]],
|
||||
[[▓██ ▀█ ██▒▒███ ▒██░ ██▒ ▓██ █▒░▒██▒▓██ ▓██░]],
|
||||
[[▓██▒ ▐▌██▒▒▓█ ▄ ▒██ ██░ ▒██ █░░░██░▒██ ▒██ ]],
|
||||
[[▒██░ ▓██░░▒████▒░ ████▓▒░ ▒▀█░ ░██░▒██▒ ░██▒]],
|
||||
[[░ ▒░ ▒ ▒ ░░ ▒░ ░░ ▒░▒░▒░ ░ ▐░ ░▓ ░ ▒░ ░ ░]],
|
||||
[[░ ░░ ░ ▒░ ░ ░ ░ ░ ▒ ▒░ ░ ░░ ▒ ░░ ░ ░]],
|
||||
[[ ░ ░ ░ ░ ░ ░ ░ ▒ ░░ ▒ ░░ ░ ]],
|
||||
[[ ░ ░ ░ ░ ░ ░ ░ ░ ]],
|
||||
[[ ░ ]],
|
||||
}
|
||||
|
||||
dashboard.section.header.opts.hl = "Function"
|
||||
dashboard.section.footer.opts.hl = "Function"
|
||||
require("alpha").setup(require("alpha.themes.dashboard").opts)
|
|
@ -1,47 +0,0 @@
|
|||
local cmp = require("cmp")
|
||||
local luasnip = require("luasnip")
|
||||
|
||||
require("luasnip.loaders.from_vscode").lazy_load()
|
||||
luasnip.config.setup({})
|
||||
|
||||
cmp.setup({
|
||||
snippet = {
|
||||
expand = function(args)
|
||||
luasnip.lsp_expand(args.body)
|
||||
end,
|
||||
},
|
||||
mapping = cmp.mapping.preset.insert({
|
||||
["<C-n>"] = cmp.mapping.select_next_item(),
|
||||
["<C-p>"] = cmp.mapping.select_prev_item(),
|
||||
["<C-d>"] = cmp.mapping.scroll_docs(-4),
|
||||
["<C-f>"] = cmp.mapping.scroll_docs(4),
|
||||
["<C-Space>"] = cmp.mapping.complete({}),
|
||||
["<CR>"] = cmp.mapping.confirm({
|
||||
behavior = cmp.ConfirmBehavior.Replace,
|
||||
select = true,
|
||||
}),
|
||||
["<Tab>"] = cmp.mapping(function(fallback)
|
||||
if cmp.visible() then
|
||||
cmp.select_next_item()
|
||||
elseif luasnip.expand_or_locally_jumpable() then
|
||||
luasnip.expand_or_jump()
|
||||
else
|
||||
fallback()
|
||||
end
|
||||
end, { "i", "s" }),
|
||||
["<S-Tab>"] = cmp.mapping(function(fallback)
|
||||
if cmp.visible() then
|
||||
cmp.select_prev_item()
|
||||
elseif luasnip.locally_jumpable(-1) then
|
||||
luasnip.jump(-1)
|
||||
else
|
||||
fallback()
|
||||
end
|
||||
end, { "i", "s" }),
|
||||
}),
|
||||
sources = {
|
||||
{ name = "nvim_lsp" },
|
||||
{ name = "luasnip" },
|
||||
{ name = "path" },
|
||||
},
|
||||
})
|
|
@ -1,67 +0,0 @@
|
|||
local on_attach = function(_, bufnr)
|
||||
local bufmap = function(keys, func)
|
||||
vim.keymap.set("n", keys, func, { buffer = bufnr })
|
||||
end
|
||||
|
||||
bufmap("<leader>r", vim.lsp.buf.rename)
|
||||
bufmap("<leader>a", vim.lsp.buf.code_action)
|
||||
|
||||
bufmap("gd", vim.lsp.buf.definition)
|
||||
bufmap("gD", vim.lsp.buf.declaration)
|
||||
bufmap("gI", vim.lsp.buf.implementation)
|
||||
bufmap("<leader>D", vim.lsp.buf.type_definition)
|
||||
|
||||
bufmap("gr", require("telescope.builtin").lsp_references)
|
||||
bufmap("<leader>s", require("telescope.builtin").lsp_document_symbols)
|
||||
bufmap("<leader>S", require("telescope.builtin").lsp_dynamic_workspace_symbols)
|
||||
|
||||
bufmap("K", vim.lsp.buf.hover)
|
||||
|
||||
vim.api.nvim_buf_create_user_command(bufnr, "Format", function(_)
|
||||
vim.lsp.buf.format()
|
||||
end, {})
|
||||
end
|
||||
|
||||
local capabilities = vim.lsp.protocol.make_client_capabilities()
|
||||
capabilities = require("cmp_nvim_lsp").default_capabilities(capabilities)
|
||||
|
||||
require("lspconfig").lua_ls.setup({
|
||||
on_attach = on_attach,
|
||||
capabilities = capabilities,
|
||||
root_dir = function()
|
||||
return vim.loop.cwd()
|
||||
end,
|
||||
settings = {
|
||||
Lua = {
|
||||
workspace = { checkThirdParty = false },
|
||||
telemetry = { enable = false },
|
||||
},
|
||||
},
|
||||
})
|
||||
|
||||
require("lspconfig").nixd.setup({
|
||||
on_attach = on_attach,
|
||||
capabilities = capabilities,
|
||||
})
|
||||
|
||||
require("lspconfig").tsserver.setup({
|
||||
on_attach = on_attach,
|
||||
capabilities = capabilities,
|
||||
})
|
||||
|
||||
require("lspconfig").eslint.setup({
|
||||
settings = {
|
||||
packageManager = "yarn",
|
||||
},
|
||||
on_attach = function(client, bufnr)
|
||||
vim.api.nvim_create_autocmd("BufWritePre", {
|
||||
buffer = bufnr,
|
||||
command = "EslintFixAll",
|
||||
})
|
||||
vim.api.nvim_create_autocmd("BufWritePost", {
|
||||
callback = function()
|
||||
vim.lsp.buf.format()
|
||||
end,
|
||||
})
|
||||
end,
|
||||
})
|
|
@ -1,10 +0,0 @@
|
|||
local lualine = require("lualine")
|
||||
|
||||
local config = {
|
||||
options = {
|
||||
theme = "base16",
|
||||
globalstatus = true,
|
||||
},
|
||||
}
|
||||
|
||||
lualine.setup(config)
|
|
@ -1,19 +0,0 @@
|
|||
require("neo-tree").setup({
|
||||
close_if_last_window = true, -- Close Neo-tree if it is the last window left in the tab
|
||||
hide_root_node = true, -- Hide the root node
|
||||
filesystem = {
|
||||
filtered_items = {
|
||||
visible = false,
|
||||
hide_dotfiles = false,
|
||||
hide_gitignored = false,
|
||||
hide_by_name = {
|
||||
".git",
|
||||
".DS_Store",
|
||||
"thumbs.db",
|
||||
},
|
||||
show_hidden_count = false,
|
||||
},
|
||||
},
|
||||
})
|
||||
|
||||
vim.keymap.set("n", "<C-n>", "<Cmd>Neotree toggle<CR>")
|
|
@ -1,47 +0,0 @@
|
|||
local null_ls = require("null-ls")
|
||||
local augroup = vim.api.nvim_create_augroup("LspFormatting", {})
|
||||
|
||||
local opts = {
|
||||
sources = {
|
||||
-- Lua
|
||||
null_ls.builtins.formatting.stylua,
|
||||
-- Python
|
||||
null_ls.builtins.formatting.black,
|
||||
-- null_ls.builtins.diagnostics.ruff,
|
||||
-- Javascript
|
||||
-- null_ls.builtins.diagnostics.eslint_d,
|
||||
-- null_ls.builtins.diagnostics.jsonlint,
|
||||
-- C/C++
|
||||
null_ls.builtins.formatting.clang_format,
|
||||
-- Nix
|
||||
null_ls.builtins.formatting.alejandra,
|
||||
-- Rust
|
||||
-- null_ls.builtins.formatting.rustfmt,
|
||||
-- YAML
|
||||
null_ls.builtins.formatting.yamlfmt,
|
||||
-- Typescript
|
||||
null_ls.builtins.formatting.prettier.with({
|
||||
condition = function(utils)
|
||||
return utils.has_file({ ".prettierrc.js" })
|
||||
end,
|
||||
}),
|
||||
},
|
||||
on_attach = function(client, bufnr)
|
||||
if client.supports_method("textDocument/formatting") then
|
||||
vim.api.nvim_clear_autocmds({
|
||||
group = augroup,
|
||||
buffer = bufnr,
|
||||
})
|
||||
vim.api.nvim_create_autocmd("BufWritePre", {
|
||||
group = augroup,
|
||||
buffer = bufnr,
|
||||
callback = function()
|
||||
vim.lsp.buf.format({ bufnr = bufnr })
|
||||
end,
|
||||
})
|
||||
end
|
||||
end,
|
||||
}
|
||||
|
||||
null_ls.setup(opts)
|
||||
vim.keymap.set("n", "<leader>gf", vim.lsp.buf.format, {})
|
|
@ -1 +0,0 @@
|
|||
|
|
@ -1,20 +0,0 @@
|
|||
require("telescope").setup({
|
||||
extensions = {
|
||||
fzf = {
|
||||
fuzzy = true, -- false will only do exact matching
|
||||
override_generic_sorter = true, -- override the generic sorter
|
||||
override_file_sorter = true, -- override the file sorter
|
||||
case_mode = "smart_case", -- or "ignore_case" or "respect_case"
|
||||
-- the default case_mode is "smart_case"
|
||||
["ui-select"] = {
|
||||
require("telescope.themes").get_dropdown({}),
|
||||
},
|
||||
},
|
||||
},
|
||||
})
|
||||
|
||||
require("telescope").load_extension("fzf")
|
||||
require("telescope").load_extension("ui-select")
|
||||
local builtin = require("telescope.builtin")
|
||||
vim.keymap.set("n", "<C-p>", builtin.find_files, {})
|
||||
vim.keymap.set("n", "<leader>fg", builtin.live_grep, {})
|
|
@ -1,55 +0,0 @@
|
|||
require("todo-comments").setup({
|
||||
signs = true,
|
||||
sign_priority = 8,
|
||||
keywords = {
|
||||
FIX = {
|
||||
icon = " ", -- icon used for the sign, and in search results
|
||||
color = "error", -- can be a hex color, or a named color (see below)
|
||||
alt = { "FIXME", "BUG", "FIXIT", "ISSUE" }, -- a set of other keywords that all map to this FIX keywords
|
||||
-- signs = false, -- configure signs for some keywords individually
|
||||
},
|
||||
TODO = { icon = " ", color = "info" },
|
||||
HACK = { icon = " ", color = "warning" },
|
||||
WARN = { icon = " ", color = "warning", alt = { "WARNING", "XXX" } },
|
||||
PERF = { icon = " ", alt = { "OPTIM", "PERFORMANCE", "OPTIMIZE" } },
|
||||
NOTE = { icon = " ", color = "hint", alt = { "INFO" } },
|
||||
TEST = { icon = " ", color = "test", alt = { "TESTING", "PASSED", "FAILED" } },
|
||||
},
|
||||
gui_style = {
|
||||
fg = "NONE", -- The gui style to use for the fg highlight group.
|
||||
bg = "BOLD", -- The gui style to use for the bg highlight group.
|
||||
},
|
||||
merge_keywords = true, -- when true, custom keywords will be merged with the defaults
|
||||
highlight = {
|
||||
multiline = true, -- enable multine todo comments
|
||||
multiline_pattern = "^.", -- lua pattern to match the next multiline from the start of the matched keyword
|
||||
multiline_context = 10, -- extra lines that will be re-evaluated when changing a line
|
||||
before = "", -- "fg" or "bg" or empty
|
||||
keyword = "wide", -- "fg", "bg", "wide", "wide_bg", "wide_fg" or empty. (wide and wide_bg is the same as bg, but will also highlight surrounding characters, wide_fg acts accordingly but with fg)
|
||||
after = "fg", -- "fg" or "bg" or empty
|
||||
pattern = [[.*<(KEYWORDS)\s*:]], -- pattern or table of patterns, used for highlighting (vim regex)
|
||||
comments_only = true, -- uses treesitter to match keywords in comments only
|
||||
max_line_len = 400, -- ignore lines longer than this
|
||||
exclude = {}, -- list of file types to exclude highlighting
|
||||
},
|
||||
colors = {
|
||||
error = { "DiagnosticError", "ErrorMsg", "#DC2626" },
|
||||
warning = { "DiagnosticWarn", "WarningMsg", "#FBBF24" },
|
||||
info = { "DiagnosticInfo", "#2563EB" },
|
||||
hint = { "DiagnosticHint", "#10B981" },
|
||||
default = { "Identifier", "#7C3AED" },
|
||||
test = { "Identifier", "#FF00FF" },
|
||||
},
|
||||
search = {
|
||||
command = "rg",
|
||||
args = {
|
||||
"--color=never",
|
||||
"--no-heading",
|
||||
"--with-filename",
|
||||
"--line-number",
|
||||
"--column",
|
||||
},
|
||||
-- pattern = [[\b(KEYWORDS):]], -- ripgrep regex
|
||||
pattern = [[\b(KEYWORDS)\b]], -- match without the extra colon.
|
||||
},
|
||||
})
|
|
@ -1,9 +0,0 @@
|
|||
require("nvim-treesitter.configs").setup({
|
||||
ensure_installed = {},
|
||||
|
||||
auto_install = false,
|
||||
|
||||
highlight = { enable = true },
|
||||
|
||||
indent = { enable = true },
|
||||
})
|
|
@ -1,5 +0,0 @@
|
|||
-- Navigate vim panes better
|
||||
vim.keymap.set("n", "<c-k>", ":wincmd k<CR>")
|
||||
vim.keymap.set("n", "<c-j>", ":wincmd j<CR>")
|
||||
vim.keymap.set("n", "<c-h>", ":wincmd h<CR>")
|
||||
vim.keymap.set("n", "<c-l>", ":wincmd l<CR>")
|
|
@ -1,46 +0,0 @@
|
|||
{pkgs, ...}: {
|
||||
home.packages = [pkgs.tmuxinator-fzf-start];
|
||||
programs.tmux = {
|
||||
enable = true;
|
||||
keyMode = "vi";
|
||||
customPaneNavigationAndResize = true;
|
||||
mouse = true;
|
||||
tmuxinator.enable = true;
|
||||
shortcut = "Space";
|
||||
extraConfig = ''
|
||||
bind % split-window -h -c "#{pane_current_path}"
|
||||
bind '"' split-window -v -c "#{pane_current_path}"
|
||||
set -sg escape-time 0
|
||||
'';
|
||||
plugins = with pkgs; [
|
||||
tmuxPlugins.vim-tmux-navigator
|
||||
{
|
||||
plugin = tmuxPlugins.catppuccin;
|
||||
extraConfig = ''
|
||||
set -g status-position top
|
||||
|
||||
set-option -sa terminal-features ',xterm-256color:RGB'
|
||||
|
||||
set -g @catppuccin_window_left_separator ""
|
||||
set -g @catppuccin_window_right_separator " "
|
||||
set -g @catppuccin_window_middle_separator " █"
|
||||
set -g @catppuccin_window_number_position "right"
|
||||
|
||||
set -g @catppuccin_window_default_fill "number"
|
||||
set -g @catppuccin_window_default_text "#W"
|
||||
|
||||
set -g @catppuccin_window_current_fill "number"
|
||||
set -g @catppuccin_window_current_text "#W"
|
||||
|
||||
set -g @catppuccin_status_modules_right "directory session"
|
||||
set -g @catppuccin_status_left_separator " "
|
||||
set -g @catppuccin_status_right_separator ""
|
||||
set -g @catppuccin_status_fill "icon"
|
||||
set -g @catppuccin_status_connect_separator "no"
|
||||
|
||||
set -g @catppuccin_directory_text "#{pane_current_path}"
|
||||
'';
|
||||
}
|
||||
];
|
||||
};
|
||||
}
|
|
@ -1,71 +0,0 @@
|
|||
{
|
||||
config,
|
||||
lib,
|
||||
pkgs,
|
||||
vars,
|
||||
...
|
||||
}: let
|
||||
in {
|
||||
programs.vscode = {
|
||||
enable = true;
|
||||
package = pkgs.vscodium;
|
||||
enableUpdateCheck = false;
|
||||
extensions = with pkgs.vscode-extensions;
|
||||
[
|
||||
catppuccin.catppuccin-vsc
|
||||
pkief.material-icon-theme
|
||||
vscodevim.vim
|
||||
bbenoist.nix
|
||||
ms-python.python
|
||||
ms-toolsai.jupyter
|
||||
ms-toolsai.jupyter-renderers
|
||||
ms-toolsai.jupyter-keymap
|
||||
]
|
||||
++ pkgs.vscode-utils.extensionsFromVscodeMarketplace [
|
||||
{
|
||||
name = "remote-ssh-edit";
|
||||
publisher = "ms-vscode-remote";
|
||||
version = "0.47.2";
|
||||
sha256 = "1hp6gjh4xp2m1xlm1jsdzxw9d8frkiidhph6nvl24d0h8z34w49g";
|
||||
}
|
||||
];
|
||||
userSettings = {
|
||||
#Theming
|
||||
"workbench.colorTheme" = "Catppuccin Mocha";
|
||||
"catppuccin.accentColor" = "green";
|
||||
"workbench.iconTheme" = "material-icon-theme";
|
||||
"window.menuBarVisibility" = "toggle";
|
||||
"editor.minimap.autohide" = false;
|
||||
#Extensions - General
|
||||
"extensions.autoCheckUpdates" = false;
|
||||
"extensions.autoUpdate" = false;
|
||||
# Startup
|
||||
"workbench.startupEditor" = "none";
|
||||
# Vim
|
||||
"editor.lineNumbers" = "relative";
|
||||
};
|
||||
keybindings = [
|
||||
# Navigating Autosuggest and Quick Open entries
|
||||
{
|
||||
"key" = "ctrl+j";
|
||||
"command" = "selectNextSuggestion";
|
||||
"when" = "suggestWidgetVisible";
|
||||
}
|
||||
{
|
||||
"key" = "ctrl+k";
|
||||
"command" = "selectPrevSuggestion";
|
||||
"when" = "suggestWidgetVisible";
|
||||
}
|
||||
{
|
||||
"key" = "ctrl+j";
|
||||
"command" = "workbench.action.quickOpenSelectNext";
|
||||
"when" = "inQuickOpen";
|
||||
}
|
||||
{
|
||||
"key" = "ctrl+k";
|
||||
"command" = "workbench.action.quickOpenSelectPrevious";
|
||||
"when" = "inQuickOpen";
|
||||
}
|
||||
];
|
||||
};
|
||||
}
|
|
@ -1,37 +0,0 @@
|
|||
{pkgs, ...}: {
|
||||
imports = [
|
||||
../common
|
||||
./zathura.nix
|
||||
];
|
||||
|
||||
home = {
|
||||
file.".wallpapers" = {
|
||||
source = ../../../../rsc/wallpaper;
|
||||
recursive = true;
|
||||
};
|
||||
file.".config/awesome/" = {
|
||||
source = ../../../../rsc/config/awesome;
|
||||
recursive = true;
|
||||
};
|
||||
file.".config/picom/" = {
|
||||
source = ../../../../rsc/config/picom;
|
||||
recursive = true;
|
||||
};
|
||||
file.".config/rofi" = {
|
||||
source = ../../../../rsc/config/rofi;
|
||||
recursive = true;
|
||||
};
|
||||
|
||||
packages = with pkgs; [
|
||||
picom
|
||||
rofi
|
||||
redshift
|
||||
xbindkeys
|
||||
clipmenu
|
||||
flameshot
|
||||
xclip
|
||||
brightnessctl
|
||||
feh
|
||||
];
|
||||
};
|
||||
}
|
|
@ -1,47 +0,0 @@
|
|||
{pkgs, ...}: {
|
||||
programs.zathura = {
|
||||
enable = true;
|
||||
options = {
|
||||
selection-clipboard = "clipboard";
|
||||
statusbar-home-tilde = true;
|
||||
|
||||
default-fg = "#CDD6F4";
|
||||
default-bg = "#1E1E2E";
|
||||
|
||||
completion-bg = "#313244";
|
||||
completion-fg = "#CDD6F4";
|
||||
completion-highlight-bg = "#575268";
|
||||
completion-highlight-fg = "#CDD6F4";
|
||||
completion-group-bg = "#313244";
|
||||
completion-group-fg = "#89B4FA";
|
||||
|
||||
statusbar-fg = "#CDD6F4";
|
||||
statusbar-bg = "#313244";
|
||||
|
||||
notification-bg = "#313244";
|
||||
notification-fg = "#CDD6F4";
|
||||
notification-error-bg = "#313244";
|
||||
notification-error-fg = "#F38BA8";
|
||||
notification-warning-bg = "#313244";
|
||||
notification-warning-fg = "#FAE3B0";
|
||||
|
||||
inputbar-fg = "#CDD6F4";
|
||||
inputbar-bg = "#313244";
|
||||
|
||||
recolor-lightcolor = "#1E1E2E";
|
||||
recolor-darkcolor = "#CDD6F4";
|
||||
|
||||
index-fg = "#CDD6F4";
|
||||
index-bg = "#1E1E2E";
|
||||
index-active-fg = "#CDD6F4";
|
||||
index-active-bg = "#313244";
|
||||
|
||||
render-loading-bg = "#1E1E2E";
|
||||
render-loading-fg = "#CDD6F4";
|
||||
|
||||
highlight-color = "#575268";
|
||||
highlight-fg = "#F5C2E7";
|
||||
highlight-active-color = "#F5C2E7";
|
||||
};
|
||||
};
|
||||
}
|
|
@ -1,3 +0,0 @@
|
|||
{pkgs, ...}: {
|
||||
home.packages = with pkgs; [freecad cura];
|
||||
}
|
|
@ -1,60 +0,0 @@
|
|||
{
|
||||
pkgs,
|
||||
config,
|
||||
...
|
||||
}: {
|
||||
programs.alacritty.enable = true;
|
||||
programs.alacritty.settings = {
|
||||
window = {
|
||||
opacity = 0.83;
|
||||
padding = {
|
||||
x = 0;
|
||||
y = 5;
|
||||
};
|
||||
};
|
||||
font = {
|
||||
normal = {
|
||||
family = "${config.fontProfiles.monospace.family}";
|
||||
style = "Medium";
|
||||
};
|
||||
bold = {
|
||||
family = "${config.fontProfiles.monospace.family}";
|
||||
style = "Bold";
|
||||
};
|
||||
italic = {
|
||||
family = "${config.fontProfiles.monospace.family}";
|
||||
style = "MediumItalic";
|
||||
};
|
||||
};
|
||||
colors = with config.colorScheme.colors; {
|
||||
bright = {
|
||||
black = "0x${base00}";
|
||||
blue = "0x${base0D}";
|
||||
cyan = "0x${base0C}";
|
||||
green = "0x${base0B}";
|
||||
magenta = "0x${base0E}";
|
||||
red = "0x${base08}";
|
||||
white = "0x${base06}";
|
||||
yellow = "0x${base09}";
|
||||
};
|
||||
cursor = {
|
||||
cursor = "0x${base06}";
|
||||
text = "0x${base06}";
|
||||
};
|
||||
normal = {
|
||||
black = "0x${base00}";
|
||||
blue = "0x${base0D}";
|
||||
cyan = "0x${base0C}";
|
||||
green = "0x${base0B}";
|
||||
magenta = "0x${base0E}";
|
||||
red = "0x${base08}";
|
||||
white = "0x${base06}";
|
||||
yellow = "0x${base0A}";
|
||||
};
|
||||
primary = {
|
||||
background = "0x${base00}";
|
||||
foreground = "0x${base06}";
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
|
@ -1,29 +0,0 @@
|
|||
{pkgs, ...}: {
|
||||
imports = [
|
||||
./theming.nix
|
||||
./firefox.nix
|
||||
./alacritty.nix
|
||||
./wezterm.nix
|
||||
./font.nix
|
||||
./playerctl.nix
|
||||
./easyeffects.nix
|
||||
./nextcloud.nix
|
||||
./flatpak.nix
|
||||
./notes.nix
|
||||
./fcitx5.nix
|
||||
];
|
||||
|
||||
home.packages = with pkgs;
|
||||
[
|
||||
jellyfin-media-player # watch shows & movies from jellyfin with hardware decoding
|
||||
# feishin-appimage # self-packaged feishin while electron build fails
|
||||
signal-desktop # secure messenger
|
||||
webcord-vencord # more "privacy friendly" discord client
|
||||
anki
|
||||
calibre
|
||||
|
||||
rofi-audio-switcher # Script to switch default audio sinks/sources
|
||||
mpv # Video player
|
||||
]
|
||||
++ (with pkgs.unstable; [feishin]);
|
||||
}
|
|
@ -1,7 +0,0 @@
|
|||
{pkgs, ...}: {
|
||||
# services.easyeffects.enable = true;
|
||||
xdg.configFile."easyeffects/output/Beyerdynamic_DT990_Oratory.json" = {
|
||||
source = ../../../../rsc/config/easyeffects/Beyerdynamic_DT990_Oratory.json;
|
||||
};
|
||||
home.packages = with pkgs; [easyeffects];
|
||||
}
|
|
@ -1,107 +0,0 @@
|
|||
{pkgs, ...}: {
|
||||
# xdg.configFile."fcitx5" = {
|
||||
# source = ../../../../rsc/config/fcitx5;
|
||||
# recursive = true;
|
||||
# };
|
||||
xdg.configFile = {
|
||||
"fcitx5/config" = {
|
||||
force = true;
|
||||
text = ''
|
||||
[Hotkey]
|
||||
# Enumerate when press trigger key repeatedly
|
||||
EnumerateWithTriggerKeys=True
|
||||
# Temporally switch between first and current Input Method
|
||||
AltTriggerKeys=
|
||||
# Enumerate Input Method Forward
|
||||
EnumerateForwardKeys=
|
||||
# Enumerate Input Method Backward
|
||||
EnumerateBackwardKeys=
|
||||
# Skip first input method while enumerating
|
||||
EnumerateSkipFirst=False
|
||||
# Enumerate Input Method Group Forward
|
||||
EnumerateGroupForwardKeys=
|
||||
# Enumerate Input Method Group Backward
|
||||
EnumerateGroupBackwardKeys=
|
||||
# Activate Input Method
|
||||
ActivateKeys=
|
||||
# Deactivate Input Method
|
||||
DeactivateKeys=
|
||||
# Default Previous page
|
||||
PrevPage=
|
||||
# Default Next page
|
||||
NextPage=
|
||||
# Default Previous Candidate
|
||||
PrevCandidate=
|
||||
# Default Next Candidate
|
||||
NextCandidate=
|
||||
# Toggle embedded preedit
|
||||
TogglePreedit=
|
||||
|
||||
[Hotkey/TriggerKeys]
|
||||
0=Control+Alt+space
|
||||
|
||||
[Behavior]
|
||||
# Active By Default
|
||||
ActiveByDefault=False
|
||||
# Share Input State
|
||||
ShareInputState=No
|
||||
# Show preedit in application
|
||||
PreeditEnabledByDefault=True
|
||||
# Show Input Method Information when switch input method
|
||||
ShowInputMethodInformation=True
|
||||
# Show Input Method Information when changing focus
|
||||
showInputMethodInformationWhenFocusIn=False
|
||||
# Show compact input method information
|
||||
CompactInputMethodInformation=True
|
||||
# Show first input method information
|
||||
ShowFirstInputMethodInformation=True
|
||||
# Default page size
|
||||
DefaultPageSize=5
|
||||
# Override Xkb Option
|
||||
OverrideXkbOption=False
|
||||
# Custom Xkb Option
|
||||
CustomXkbOption=
|
||||
# Force Enabled Addons
|
||||
EnabledAddons=
|
||||
# Force Disabled Addons
|
||||
DisabledAddons=
|
||||
# Preload input method to be used by default
|
||||
PreloadInputMethod=True
|
||||
# Allow input method in the password field
|
||||
AllowInputMethodForPassword=False
|
||||
# Show preedit text when typing password
|
||||
ShowPreeditForPassword=False
|
||||
# Interval of saving user data in minutes
|
||||
AutoSavePeriod=30
|
||||
'';
|
||||
};
|
||||
|
||||
"fcitx5/profile" = {
|
||||
force = true;
|
||||
text = ''
|
||||
[Groups/0]
|
||||
# Group Name
|
||||
Name="Group 1"
|
||||
# Layout
|
||||
Default Layout=de
|
||||
# Default Input Method
|
||||
DefaultIM=mozc
|
||||
|
||||
[Groups/0/Items/0]
|
||||
# Name
|
||||
Name=keyboard-de
|
||||
# Layout
|
||||
Layout=
|
||||
|
||||
[Groups/0/Items/1]
|
||||
# Name
|
||||
Name=mozc
|
||||
# Layout
|
||||
Layout=
|
||||
|
||||
[GroupOrder]
|
||||
0="Group 1"
|
||||
'';
|
||||
};
|
||||
};
|
||||
}
|
|
@ -1,195 +0,0 @@
|
|||
{
|
||||
inputs,
|
||||
pkgs,
|
||||
vars,
|
||||
...
|
||||
}: {
|
||||
imports = [inputs.arkenfox.hmModules.default];
|
||||
home.file.".mozilla/native-messaging-hosts/org.kde.plasma.browser_integration.json".source = "${pkgs.plasma5Packages.plasma-browser-integration}/lib/mozilla/native-messaging-hosts/org.kde.plasma.browser_integration.json";
|
||||
|
||||
programs.firefox = {
|
||||
enable = true;
|
||||
|
||||
arkenfox = {
|
||||
enable = true;
|
||||
version = "128.0";
|
||||
};
|
||||
|
||||
profiles.Default = {
|
||||
extensions = with inputs.firefox-addons.packages."x86_64-linux"; [
|
||||
bitwarden
|
||||
ublock-origin
|
||||
darkreader
|
||||
tabliss
|
||||
consent-o-matic
|
||||
# bypass-paywalls-clean
|
||||
];
|
||||
|
||||
search.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"];
|
||||
};
|
||||
|
||||
"Home Manager" = {
|
||||
urls = [
|
||||
{
|
||||
template = "https://mipmip.github.io/home-manager-option-search";
|
||||
params = [
|
||||
{
|
||||
name = "query";
|
||||
value = "{searchTerms}";
|
||||
}
|
||||
];
|
||||
}
|
||||
];
|
||||
|
||||
icon = "${pkgs.nixos-icons}/share/icons/hicolor/scalable/apps/nix-snowflake.svg";
|
||||
definedAliases = ["@hm"];
|
||||
};
|
||||
|
||||
"Searx" = {
|
||||
urls = [
|
||||
{
|
||||
template = "https://paulgo.io/search";
|
||||
params = [
|
||||
{
|
||||
name = "q";
|
||||
value = "{searchTerms}";
|
||||
}
|
||||
];
|
||||
}
|
||||
];
|
||||
|
||||
iconUpdateURL = "https://paulgo.io/favicon.ico";
|
||||
definedAliases = ["@sx"];
|
||||
};
|
||||
|
||||
"Amazon" = {
|
||||
urls = [
|
||||
{
|
||||
template = "https://www.amazon.de/s";
|
||||
params = [
|
||||
{
|
||||
name = "k";
|
||||
value = "{searchTerms}";
|
||||
}
|
||||
];
|
||||
}
|
||||
];
|
||||
|
||||
iconUpdateURL = "https://amazon.de/favicon.ico";
|
||||
definedAliases = ["@a"];
|
||||
};
|
||||
|
||||
"YouTube" = {
|
||||
urls = [
|
||||
{
|
||||
template = "https://efy.piped.pages.dev/results";
|
||||
params = [
|
||||
{
|
||||
name = "search_query";
|
||||
value = "{searchTerms}";
|
||||
}
|
||||
];
|
||||
}
|
||||
];
|
||||
|
||||
iconUpdateURL = "https://piped.video/favicon.ico";
|
||||
definedAliases = ["yt"];
|
||||
};
|
||||
};
|
||||
search.force = true;
|
||||
search.default = "Searx";
|
||||
|
||||
settings = {
|
||||
"media.hardwaremediakeys.enabled" = false;
|
||||
"dom.security.https_only_mode" = true;
|
||||
"browser.download.panel.shown" = false;
|
||||
"browser.toolbars.bookmarks.visibility" = "always";
|
||||
"signon.rememberSignons" = false;
|
||||
"browser.formfill.enable" = false;
|
||||
"signon. prefillForms" = false;
|
||||
"browser.shell.checkDefaultBrowser" = false;
|
||||
# "browser.newtabpage.activity-stream.showSponsoredTopSites" = false;
|
||||
"browser.uiCustomization.state" = ''{"placements":{"widget-overflow-fixed-list":[],"unified-extensions-area":["addon_darkreader_org-browser-action","plasma-browser-integration_kde_org-browser-action","_506e023c-7f2b-40a3-8066-bc5deb40aebe_-browser-action","_testpilot-containers-browser-action","7esoorv3_alefvanoon_anonaddy_me-browser-action","_a6c4a591-f1b2-4f03-b3ff-767e5bedf4e7_-browser-action","gdpr_cavi_au_dk-browser-action","firefoxcolor_mozilla_com-browser-action","firefox-translations-addon_mozilla_org-browser-action"],"nav-bar":["back-button","forward-button","stop-reload-button","urlbar-container","downloads-button","unified-extensions-button","ublock0_raymondhill_net-browser-action","_446900e4-71c2-419f-a6a7-df9c091e268b_-browser-action"],"toolbar-menubar":["menubar-items"],"TabsToolbar":["tabbrowser-tabs","new-tab-button","alltabs-button"],"PersonalToolbar":["personal-bookmarks"]},"seen":["save-to-pocket-button","developer-button","_446900e4-71c2-419f-a6a7-df9c091e268b_-browser-action","addon_darkreader_org-browser-action","ublock0_raymondhill_net-browser-action","plasma-browser-integration_kde_org-browser-action","_506e023c-7f2b-40a3-8066-bc5deb40aebe_-browser-action","_testpilot-containers-browser-action","7esoorv3_alefvanoon_anonaddy_me-browser-action","_a6c4a591-f1b2-4f03-b3ff-767e5bedf4e7_-browser-action","gdpr_cavi_au_dk-browser-action","firefoxcolor_mozilla_com-browser-action","firefox-translations-addon_mozilla_org-browser-action"],"dirtyAreaCache":["nav-bar","PersonalToolbar","toolbar-menubar","TabsToolbar","unified-extensions-area"],"currentVersion":20,"newElementCount":4}'';
|
||||
};
|
||||
arkenfox = {
|
||||
enable = true;
|
||||
"0000".enable = true;
|
||||
"0100" = {
|
||||
enable = true;
|
||||
# Allow setting homepage
|
||||
"0102"."browser.startup.page".value = 1;
|
||||
};
|
||||
"0200" = {
|
||||
enable = true;
|
||||
};
|
||||
"0300".enable = true;
|
||||
# We keep safebrowsing
|
||||
"0400".enable = false;
|
||||
"0600" = {
|
||||
enable = true;
|
||||
"0610"."browser.send_pings".enable = true;
|
||||
};
|
||||
"0700" = {
|
||||
enable = true;
|
||||
# Disable DNS over HTTPS
|
||||
"0710"."network.trr.mode".value = 5;
|
||||
};
|
||||
# "0800" = {
|
||||
# enable = true;
|
||||
# # Keep using url bar as search bar
|
||||
# "0801"."keyword.enabled".value = true;
|
||||
# };
|
||||
"0900".enable = true;
|
||||
"1000" = {
|
||||
enable = true;
|
||||
# Enable disk cache for performance reasons
|
||||
"1001"."browser.cache.disk.enable".enable = true;
|
||||
"1001"."browser.cache.disk.enable".value = true;
|
||||
};
|
||||
"1200".enable = true;
|
||||
# I don't use container tabs
|
||||
"1700".enable = false;
|
||||
"2600" = {
|
||||
enable = true;
|
||||
# useDownloadDir
|
||||
"2651".enable = false;
|
||||
# always_ask_before_handling_new_types
|
||||
"2654".enable = false;
|
||||
};
|
||||
"2700".enable = true;
|
||||
"2800" = {
|
||||
"2812".enable = true;
|
||||
};
|
||||
"5000" = {
|
||||
"5008".enable = true;
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
xdg.mimeApps.defaultApplications = {
|
||||
"text/html" = ["firefox.desktop"];
|
||||
"text/xml" = ["firefox.desktop"];
|
||||
"x-scheme-handler/http" = ["firefox.desktop"];
|
||||
"x-scheme-handler/https" = ["firefox.desktop"];
|
||||
};
|
||||
}
|
|
@ -1,33 +0,0 @@
|
|||
{inputs, ...}: {
|
||||
imports = [inputs.flatpaks.homeManagerModules.default];
|
||||
services.flatpak = {
|
||||
remotes.flathub = "https://flathub.org/repo/flathub.flatpakrepo";
|
||||
packages = [
|
||||
"flathub:app/us.zoom.Zoom//stable"
|
||||
"flathub:app/com.discordapp.Discord//stable"
|
||||
"flathub:app/md.obsidian.Obsidian//stable"
|
||||
"flathub:app/com.github.iwalton3.jellyfin-media-player//stable"
|
||||
];
|
||||
overrides = {
|
||||
global = {
|
||||
filesystems = [
|
||||
"~/.local/share/icons"
|
||||
];
|
||||
environment = {
|
||||
"MOZ_ENABLE_WAYLAND" = 1;
|
||||
};
|
||||
};
|
||||
"md.obsidian.Obsidian" = {
|
||||
sockets = [
|
||||
"wayland"
|
||||
"system-bus"
|
||||
];
|
||||
};
|
||||
"com.github.iwalton3.jellyfin-media-player" = {
|
||||
environment = {
|
||||
QT_XCB_GL_INTEGRATION = "xcb_egl";
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
|
@ -1,13 +0,0 @@
|
|||
{pkgs, ...}: {
|
||||
fontProfiles = {
|
||||
enable = true;
|
||||
monospace = {
|
||||
family = "JetBrains Mono Nerd Font";
|
||||
package = pkgs.nerdfonts.override {fonts = ["JetBrainsMono"];};
|
||||
};
|
||||
regular = {
|
||||
family = "Fira Sans";
|
||||
package = pkgs.fira;
|
||||
};
|
||||
};
|
||||
}
|
|
@ -1,3 +0,0 @@
|
|||
{
|
||||
services.nextcloud-client.enable = true;
|
||||
}
|
|
@ -1,5 +0,0 @@
|
|||
{pkgs, ...}: {
|
||||
home.packages = with pkgs; [
|
||||
xournalpp
|
||||
];
|
||||
}
|
|
@ -1,6 +0,0 @@
|
|||
{pkgs, ...}: {
|
||||
home.packages = with pkgs; [playerctl];
|
||||
services.playerctld = {
|
||||
enable = true;
|
||||
};
|
||||
}
|
|
@ -1,33 +0,0 @@
|
|||
{pkgs, ...}: {
|
||||
home.pointerCursor = {
|
||||
package = pkgs.bibata-cursors;
|
||||
name = "Bibata-Modern-Ice";
|
||||
size = 25;
|
||||
x11.enable = true;
|
||||
gtk.enable = true;
|
||||
};
|
||||
|
||||
# gtk.cursorTheme.package = pkgs.bibata-cursors;
|
||||
# gtk.cursorTheme.name = "Bibata-Modern-Ice";
|
||||
# home.file.".icons/bibata".source = "${pkgs.bibata-cursors}/share/icons/Bibata-Modern-Classic";
|
||||
# xdg.dataFile."icons/bibata".source = "${pkgs.bibata-cursors}/share/icons/Bibata-Modern-Classic";
|
||||
gtk = {
|
||||
enable = true;
|
||||
theme.package = pkgs.adw-gtk3;
|
||||
theme.name = "adw-gtk3-dark";
|
||||
iconTheme.package = pkgs.papirus-icon-theme;
|
||||
iconTheme.name = "Papirus";
|
||||
};
|
||||
|
||||
qt = {
|
||||
enable = true;
|
||||
platformTheme.name = "gtk";
|
||||
style.package = with pkgs; [adwaita-qt adwaita-qt6];
|
||||
style.name = "adwaita-dark";
|
||||
};
|
||||
|
||||
home.packages = with pkgs; [
|
||||
libsForQt5.qt5.qtquickcontrols2
|
||||
libsForQt5.qt5.qtgraphicaleffects
|
||||
];
|
||||
}
|
|
@ -1,55 +0,0 @@
|
|||
{
|
||||
pkgs,
|
||||
config,
|
||||
...
|
||||
}: {
|
||||
programs.wezterm = {
|
||||
enable = true;
|
||||
colorSchemes = {
|
||||
"${config.colorscheme.slug}" = with config.colorScheme; {
|
||||
foreground = "#${colors.base05}";
|
||||
background = "#${colors.base00}";
|
||||
|
||||
ansi = [
|
||||
"#${colors.base00}"
|
||||
"#${colors.base08}"
|
||||
"#${colors.base0B}"
|
||||
"#${colors.base0A}"
|
||||
"#${colors.base0D}"
|
||||
"#${colors.base0E}"
|
||||
"#${colors.base0C}"
|
||||
"#${colors.base05}"
|
||||
];
|
||||
brights = [
|
||||
"#${colors.base03}"
|
||||
"#${colors.base08}"
|
||||
"#${colors.base0B}"
|
||||
"#${colors.base0A}"
|
||||
"#${colors.base0D}"
|
||||
"#${colors.base0E}"
|
||||
"#${colors.base0C}"
|
||||
"#${colors.base07}"
|
||||
];
|
||||
cursor_fg = "#${colors.base00}";
|
||||
cursor_bg = "#${colors.base05}";
|
||||
selection_fg = "#${colors.base00}";
|
||||
selection_bg = "#${colors.base05}";
|
||||
};
|
||||
};
|
||||
extraConfig = ''
|
||||
return {
|
||||
warn_about_missing_glyphs=false,
|
||||
font = wezterm.font("${config.fontProfiles.monospace.family}"),
|
||||
font_size = 12.0,
|
||||
window_background_opacity = 0.83,
|
||||
color_scheme = "${config.colorscheme.slug}",
|
||||
hide_tab_bar_if_only_one_tab = true,
|
||||
window_close_confirmation = "NeverPrompt",
|
||||
use_ime = true,
|
||||
set_environment_variables = {
|
||||
TERM = 'wezterm',
|
||||
},
|
||||
}
|
||||
'';
|
||||
};
|
||||
}
|
|
@ -1,5 +0,0 @@
|
|||
{pkgs, ...}: {
|
||||
imports = [
|
||||
../common
|
||||
];
|
||||
}
|
|
@ -1,12 +0,0 @@
|
|||
{pkgs, ...}: {
|
||||
home.packages = with pkgs; [
|
||||
protonup-rs
|
||||
heroic
|
||||
(lutris.override {
|
||||
extraLibraries = pkgs: [
|
||||
wine
|
||||
wineWowPackages.stable
|
||||
];
|
||||
})
|
||||
];
|
||||
}
|
|
@ -1,14 +0,0 @@
|
|||
{
|
||||
xdg.userDirs = {
|
||||
enable = true;
|
||||
createDirectories = true;
|
||||
desktop = "/home/ghoscht/Uni";
|
||||
download = "/home/ghoscht/Downloads";
|
||||
documents = "/home/ghoscht/Documents";
|
||||
music = null;
|
||||
pictures = "/home/ghoscht/Pictures";
|
||||
publicShare = null;
|
||||
templates = null;
|
||||
videos = null;
|
||||
};
|
||||
}
|
|
@ -1,27 +0,0 @@
|
|||
{
|
||||
inputs,
|
||||
outputs,
|
||||
...
|
||||
}: let
|
||||
in {
|
||||
imports = [
|
||||
./global
|
||||
./features/coding/nvim
|
||||
./features/coding/tmux.nix
|
||||
inputs.nix-colors.homeManagerModules.default
|
||||
];
|
||||
|
||||
colorScheme = inputs.nix-colors.colorSchemes.catppuccin-mocha;
|
||||
|
||||
home.file.".docker" = {
|
||||
source = ../rsc/docker/franz;
|
||||
recursive = true;
|
||||
};
|
||||
nixpkgs = {
|
||||
config = {
|
||||
permittedInsecurePackages = [
|
||||
"nix-2.15.3"
|
||||
];
|
||||
};
|
||||
};
|
||||
}
|
|
@ -1,84 +0,0 @@
|
|||
# This is your home-manager configuration file
|
||||
# Use this to configure your home environment (it replaces ~/.config/nixpkgs/home.nix)
|
||||
{
|
||||
inputs,
|
||||
outputs,
|
||||
lib,
|
||||
config,
|
||||
pkgs,
|
||||
vars,
|
||||
...
|
||||
}: {
|
||||
# You can import other home-manager modules here
|
||||
imports =
|
||||
[
|
||||
# If you want to use modules your own flake exports (from modules/home-manager):
|
||||
# outputs.homeManagerModules.example
|
||||
|
||||
# Or modules exported from other flakes (such as nix-colors):
|
||||
# inputs.nix-colors.homeManagerModules
|
||||
|
||||
# You can also split up your configuration and import pieces of it here:
|
||||
../features/cli
|
||||
../features/general/xdg-dirs.nix
|
||||
]
|
||||
++ (builtins.attrValues outputs.homeManagerModules);
|
||||
|
||||
nixpkgs = {
|
||||
# You can add overlays here
|
||||
overlays =
|
||||
[
|
||||
# Add overlays your own flake exports (from overlays and pkgs dir):
|
||||
# outputs.overlays.additions
|
||||
# outputs.overlays.modifications
|
||||
# outputs.overlays.unstable-packages
|
||||
|
||||
# You can also add overlays exported from other flakes:
|
||||
# neovim-nightly-overlay.overlays.default
|
||||
|
||||
# Or define it inline, for example:
|
||||
# (final: prev: {
|
||||
# hi = final.hello.overrideAttrs (oldAttrs: {
|
||||
# patches = [ ./change-hello-to-hi.patch ];
|
||||
# });
|
||||
# })
|
||||
]
|
||||
++ (builtins.attrValues outputs.overlays);
|
||||
# Configure your nixpkgs instance
|
||||
config = {
|
||||
# Disable if you don't want unfree packages
|
||||
allowUnfree = true;
|
||||
permittedInsecurePackages = [
|
||||
"electron-24.8.6" #fixes Feishin & Webcord
|
||||
];
|
||||
# Workaround for https://github.com/nix-community/home-manager/issues/2942
|
||||
allowUnfreePredicate = _: true;
|
||||
};
|
||||
};
|
||||
|
||||
nix = {
|
||||
package = lib.mkDefault pkgs.nix;
|
||||
settings = {
|
||||
experimental-features = ["nix-command" "flakes" "repl-flake"];
|
||||
warn-dirty = false;
|
||||
};
|
||||
};
|
||||
|
||||
home = {
|
||||
username = lib.mkDefault vars.user;
|
||||
homeDirectory = lib.mkDefault "/home/${config.home.username}";
|
||||
# https://nixos.wiki/wiki/FAQ/When_do_I_update_stateVersion
|
||||
stateVersion = "23.11";
|
||||
};
|
||||
|
||||
# Add stuff for your user as you see fit:
|
||||
# programs.neovim.enable = true;
|
||||
# home.packages = with pkgs; [ steam ];
|
||||
|
||||
# Enable home-manager and git
|
||||
programs.home-manager.enable = true;
|
||||
programs.git.enable = true;
|
||||
|
||||
# Nicely reload system units when changing configs
|
||||
systemd.user.startServices = "sd-switch";
|
||||
}
|
|
@ -1,27 +0,0 @@
|
|||
{
|
||||
pkgs,
|
||||
inputs,
|
||||
outputs,
|
||||
...
|
||||
}: let
|
||||
in {
|
||||
imports = [
|
||||
./global
|
||||
./features/desktop/awesome
|
||||
./features/desktop/gnome
|
||||
./features/coding
|
||||
inputs.nix-colors.homeManagerModules.default
|
||||
];
|
||||
|
||||
home.packages = with pkgs; [nextcloud-client];
|
||||
|
||||
colorScheme = inputs.nix-colors.colorSchemes.catppuccin-mocha;
|
||||
nixpkgs = {
|
||||
config = {
|
||||
permittedInsecurePackages = [
|
||||
"electron-25.9.0"
|
||||
"nix-2.15.3"
|
||||
];
|
||||
};
|
||||
};
|
||||
}
|
|
@ -1,106 +0,0 @@
|
|||
# This is your system's configuration file.
|
||||
# Use this to configure your system environment (it replaces /etc/nixos/configuration.nix)
|
||||
{
|
||||
inputs,
|
||||
outputs,
|
||||
pkgs,
|
||||
...
|
||||
}: {
|
||||
# You can import other NixOS modules here
|
||||
imports = [
|
||||
# If you want to use modules your own flake exports (from modules/nixos):
|
||||
# outputs.nixosModules.example
|
||||
|
||||
# Or modules from other flakes (such as nixos-hardware):
|
||||
inputs.hardware.nixosModules.common-cpu-amd-pstate
|
||||
inputs.hardware.nixosModules.common-gpu-nvidia-nonprime
|
||||
inputs.hardware.nixosModules.common-pc-ssd
|
||||
|
||||
# You can also split up your configuration and import pieces of it here:
|
||||
# ./users.nix
|
||||
|
||||
# Import your generated (nixos-generate-config) hardware configuration
|
||||
./hardware-configuration.nix
|
||||
|
||||
../common/global
|
||||
../common/optional/desktop/awesome.nix
|
||||
|
||||
../common/optional/systemd-boot.nix
|
||||
../common/optional/wireshark.nix
|
||||
../common/optional/kde-connect.nix
|
||||
../common/optional/gnome-keyring.nix
|
||||
../common/optional/adb.nix
|
||||
../common/optional/docker.nix
|
||||
../common/optional/gaming/gamemode.nix
|
||||
../common/optional/gaming/steam.nix
|
||||
../common/optional/desktop/japanese.nix
|
||||
../common/optional/udisks.nix
|
||||
];
|
||||
|
||||
nixpkgs = {
|
||||
# You can add overlays here
|
||||
overlays = [
|
||||
# Add overlays your own flake exports (from overlays and pkgs dir):
|
||||
outputs.overlays.additions
|
||||
outputs.overlays.modifications
|
||||
outputs.overlays.unstable-packages
|
||||
|
||||
# You can also add overlays exported from other flakes:
|
||||
# neovim-nightly-overlay.overlays.default
|
||||
|
||||
# Or define it inline, for example:
|
||||
# (final: prev: {
|
||||
# hi = final.hello.overrideAttrs (oldAttrs: {
|
||||
# patches = [ ./change-hello-to-hi.patch ];
|
||||
# });
|
||||
# })
|
||||
];
|
||||
# Configure your nixpkgs instance
|
||||
config = {
|
||||
# Disable if you don't want unfree packages
|
||||
allowUnfree = true;
|
||||
firefox.enablePlasmaBrowserIntegration = true;
|
||||
segger-jlink.acceptLicense = true;
|
||||
permittedInsecurePackages = ["segger-jlink-qt4-794l"];
|
||||
};
|
||||
};
|
||||
|
||||
networking.hostName = "adalbert";
|
||||
|
||||
services.udev.packages = [inputs.heliox-cli.packages.x86_64-linux.default pkgs.segger-jlink];
|
||||
environment.systemPackages = [inputs.heliox-cli.packages.x86_64-linux.default];
|
||||
|
||||
# Personalausweis reader
|
||||
programs.ausweisapp.enable = true;
|
||||
programs.ausweisapp.openFirewall = true; # also sets firewall entry
|
||||
|
||||
programs.nix-ld.enable = true;
|
||||
|
||||
# services.xserver.displayManager.sddm.enable = true;
|
||||
services.xserver.displayManager.gdm.enable = true;
|
||||
|
||||
# Force disable Nvidia PRIME, needed by nix-hardware
|
||||
# hardware.nvidia.prime.offload.enable = false;
|
||||
|
||||
programs.coolercontrol = {
|
||||
enable = true;
|
||||
nvidiaSupport = true;
|
||||
};
|
||||
boot.binfmt.emulatedSystems = [
|
||||
"aarch64-linux"
|
||||
"riscv64-linux"
|
||||
];
|
||||
|
||||
programs = {
|
||||
adb.enable = true;
|
||||
dconf.enable = true;
|
||||
};
|
||||
|
||||
hardware = {
|
||||
opengl.enable = true;
|
||||
opentabletdriver.enable = true;
|
||||
};
|
||||
|
||||
# https://nixos.wiki/wiki/FAQ/When_do_I_update_stateVersion
|
||||
system.stateVersion = "23.11";
|
||||
}
|
|
@ -1,32 +0,0 @@
|
|||
# This file (and the global directory) holds config that i use on all hosts
|
||||
{
|
||||
inputs,
|
||||
outputs,
|
||||
...
|
||||
}: {
|
||||
imports =
|
||||
[
|
||||
inputs.home-manager.nixosModules.home-manager
|
||||
./user.nix
|
||||
./fish.nix
|
||||
./locale.nix
|
||||
./nix.nix
|
||||
./power-button.nix
|
||||
./documentation.nix
|
||||
]
|
||||
++ (builtins.attrValues outputs.nixosModules);
|
||||
|
||||
home-manager.extraSpecialArgs = {inherit inputs outputs;};
|
||||
|
||||
nixpkgs = {
|
||||
overlays = builtins.attrValues outputs.overlays;
|
||||
config = {
|
||||
allowUnfree = true;
|
||||
};
|
||||
};
|
||||
|
||||
# Enable networking
|
||||
networking.networkmanager.enable = true;
|
||||
|
||||
boot.supportedFilesystems = ["ntfs"];
|
||||
}
|
|
@ -1,9 +0,0 @@
|
|||
{pkgs, ...}: {
|
||||
environment.systemPackages = with pkgs; [man-pages man-pages-posix];
|
||||
documentation.dev.enable = true;
|
||||
documentation.man = {
|
||||
# In order to enable to mandoc man-db has to be disabled.
|
||||
man-db.enable = false;
|
||||
mandoc.enable = true;
|
||||
};
|
||||
}
|
|
@ -1,17 +0,0 @@
|
|||
{
|
||||
inputs,
|
||||
pkgs,
|
||||
...
|
||||
}: {
|
||||
programs.fish = {
|
||||
enable = true;
|
||||
vendor = {
|
||||
completions.enable = true;
|
||||
config.enable = true;
|
||||
functions.enable = true;
|
||||
};
|
||||
useBabelfish = true;
|
||||
};
|
||||
users.defaultUserShell = pkgs.fish;
|
||||
environment.shells = with pkgs; [fish];
|
||||
}
|
|
@ -1,20 +0,0 @@
|
|||
{lib, ...}: {
|
||||
time.timeZone = "Europe/Berlin";
|
||||
|
||||
i18n = {
|
||||
defaultLocale = "en_US.UTF-8";
|
||||
extraLocaleSettings = {
|
||||
LC_ADDRESS = "de_DE.UTF-8";
|
||||
LC_IDENTIFICATION = "de_DE.UTF-8";
|
||||
LC_MEASUREMENT = "de_DE.UTF-8";
|
||||
LC_MONETARY = "de_DE.UTF-8";
|
||||
LC_NAME = "de_DE.UTF-8";
|
||||
LC_NUMERIC = "de_DE.UTF-8";
|
||||
LC_PAPER = "de_DE.UTF-8";
|
||||
LC_TELEPHONE = "de_DE.UTF-8";
|
||||
LC_TIME = "de_DE.UTF-8";
|
||||
};
|
||||
};
|
||||
console.keyMap = "de";
|
||||
services.xserver.layout = "de";
|
||||
}
|
|
@ -1,28 +0,0 @@
|
|||
{
|
||||
inputs,
|
||||
lib,
|
||||
...
|
||||
}: {
|
||||
nix = {
|
||||
settings = {
|
||||
auto-optimise-store = lib.mkDefault true;
|
||||
experimental-features = ["nix-command" "flakes" "repl-flake"];
|
||||
warn-dirty = false;
|
||||
system-features = ["kvm" "big-parallel" "nixos-test"];
|
||||
};
|
||||
gc = {
|
||||
automatic = true;
|
||||
dates = "weekly";
|
||||
# Keep the last 3 generations
|
||||
options = "--delete-older-than +3";
|
||||
};
|
||||
|
||||
# This will add each flake input as a registry
|
||||
# To make nix3 commands consistent with your flake
|
||||
registry = (lib.mapAttrs (_: flake: {inherit flake;})) ((lib.filterAttrs (_: lib.isType "flake")) inputs);
|
||||
|
||||
# Add nixpkgs input to NIX_PATH
|
||||
# This lets nix2 commands still use <nixpkgs>
|
||||
nixPath = ["nixpkgs=${inputs.nixpkgs.outPath}"];
|
||||
};
|
||||
}
|
|
@ -1,10 +0,0 @@
|
|||
{config, ...}: let
|
||||
dockerEnabled = config.virtualisation.docker.enable;
|
||||
in {
|
||||
virtualisation.podman = {
|
||||
enable = true;
|
||||
dockerCompat = !dockerEnabled;
|
||||
dockerSocket.enable = !dockerEnabled;
|
||||
defaultNetwork.settings.dns_enabled = true;
|
||||
};
|
||||
}
|
|
@ -1,10 +0,0 @@
|
|||
{
|
||||
inputs,
|
||||
lib,
|
||||
...
|
||||
}: {
|
||||
services.logind.extraConfig = ''
|
||||
# don't shutdown when power button is short-pressed
|
||||
HandlePowerKey=ignore
|
||||
'';
|
||||
}
|
|
@ -1,45 +0,0 @@
|
|||
{
|
||||
inputs,
|
||||
outputs,
|
||||
pkgs,
|
||||
config,
|
||||
vars,
|
||||
...
|
||||
}: let
|
||||
ifTheyExist = groups: builtins.filter (group: builtins.hasAttr group config.users.groups) groups;
|
||||
in {
|
||||
users.users.${vars.user} = {
|
||||
isNormalUser = true;
|
||||
shell = pkgs.fish;
|
||||
extraGroups =
|
||||
[
|
||||
"wheel"
|
||||
"video"
|
||||
"audio"
|
||||
"camera"
|
||||
]
|
||||
++ ifTheyExist [
|
||||
"minecraft"
|
||||
"network"
|
||||
"networkmanager"
|
||||
"wireshark"
|
||||
"i2c"
|
||||
"mysql"
|
||||
"docker"
|
||||
"podman"
|
||||
"git"
|
||||
"libvirtd"
|
||||
"deluge"
|
||||
"lp"
|
||||
"scanner"
|
||||
"kvm"
|
||||
"libvirtd"
|
||||
"tty"
|
||||
"dialout"
|
||||
];
|
||||
|
||||
packages = [pkgs.home-manager];
|
||||
};
|
||||
|
||||
home-manager.users.${vars.user} = import ../../../home/${config.networking.hostName}.nix;
|
||||
}
|
|
@ -1,5 +0,0 @@
|
|||
{vars, ...}: let
|
||||
in {
|
||||
programs.adb.enable = true;
|
||||
users.users.${vars.user}.extraGroups = ["adbusers"];
|
||||
}
|
|
@ -1,15 +0,0 @@
|
|||
{
|
||||
config,
|
||||
lib,
|
||||
pkgs,
|
||||
...
|
||||
}: {
|
||||
imports = [./global.nix ./x11.nix];
|
||||
|
||||
services = {
|
||||
xserver = {
|
||||
# dpi = 180;
|
||||
windowManager.awesome.enable = true;
|
||||
};
|
||||
};
|
||||
}
|
|
@ -1,14 +0,0 @@
|
|||
{
|
||||
config,
|
||||
lib,
|
||||
pkgs,
|
||||
...
|
||||
}: {
|
||||
# Enable Flatpak
|
||||
services.flatpak.enable = true;
|
||||
|
||||
# Create folder where all fonts are linked to /run/current-system/sw/share/X11/fonts
|
||||
fonts.fontDir.enable = true;
|
||||
|
||||
xdg.portal.enable = true;
|
||||
}
|
|
@ -1,16 +0,0 @@
|
|||
{
|
||||
config,
|
||||
lib,
|
||||
pkgs,
|
||||
...
|
||||
}: {
|
||||
imports = [./pipewire.nix ../printing.nix ./flatpak.nix ./xremap.nix];
|
||||
|
||||
# Enable for GTK
|
||||
programs.dconf.enable = true;
|
||||
|
||||
# Fix for qt6 plugins
|
||||
environment.profileRelativeSessionVariables = {
|
||||
QT_PLUGIN_PATH = ["/lib/qt-6/plugins"];
|
||||
};
|
||||
}
|
|
@ -1,51 +0,0 @@
|
|||
{
|
||||
config,
|
||||
lib,
|
||||
pkgs,
|
||||
...
|
||||
}: {
|
||||
imports = [./global.nix ./x11.nix ./wayland.nix];
|
||||
|
||||
services = {
|
||||
xserver = {
|
||||
desktopManager.gnome = {
|
||||
enable = true;
|
||||
};
|
||||
libinput.enable = true;
|
||||
modules = [pkgs.xf86_input_wacom];
|
||||
wacom.enable = true;
|
||||
};
|
||||
udev.packages = with pkgs; [
|
||||
gnome.gnome-settings-daemon
|
||||
];
|
||||
};
|
||||
|
||||
environment = {
|
||||
systemPackages = with pkgs; [
|
||||
# System-Wide Packages
|
||||
gnome.adwaita-icon-theme
|
||||
gnome.dconf-editor
|
||||
gnome.gnome-tweaks
|
||||
gnomeExtensions.kimpanel
|
||||
gnomeExtensions.vitals
|
||||
gnomeExtensions.tray-icons-reloaded
|
||||
];
|
||||
gnome.excludePackages =
|
||||
(with pkgs; [
|
||||
# Ignored Packages
|
||||
gnome-tour
|
||||
gedit
|
||||
])
|
||||
++ (with pkgs.gnome; [
|
||||
atomix
|
||||
epiphany
|
||||
geary
|
||||
gnome-characters
|
||||
gnome-contacts
|
||||
gnome-initial-setup
|
||||
hitori
|
||||
iagno
|
||||
tali
|
||||
]);
|
||||
};
|
||||
}
|
|
@ -1,13 +0,0 @@
|
|||
{pkgs, ...}: {
|
||||
i18n.inputMethod = {
|
||||
enabled = "fcitx5";
|
||||
fcitx5.addons = with pkgs; [
|
||||
fcitx5-mozc
|
||||
fcitx5-gtk
|
||||
];
|
||||
fcitx5.waylandFrontend = true;
|
||||
};
|
||||
fonts.packages = with pkgs; [
|
||||
noto-fonts-cjk-sans
|
||||
];
|
||||
}
|
|
@ -1,13 +0,0 @@
|
|||
{pkgs, ...}: {
|
||||
security.rtkit.enable = true;
|
||||
hardware.pulseaudio.enable = false;
|
||||
services.pipewire = {
|
||||
enable = true;
|
||||
alsa.enable = true;
|
||||
alsa.support32Bit = true;
|
||||
pulse.enable = true;
|
||||
jack.enable = true;
|
||||
};
|
||||
|
||||
environment.systemPackages = with pkgs; [pavucontrol pulseaudio qpwgraph];
|
||||
}
|
|
@ -1,15 +0,0 @@
|
|||
{pkgs, ...}: {
|
||||
imports = [./global.nix ./x11.nix];
|
||||
|
||||
services.xserver.desktopManager.plasma5.enable = true;
|
||||
environment.plasma5.excludePackages = with pkgs.libsForQt5; [
|
||||
elisa
|
||||
gwenview
|
||||
okular
|
||||
oxygen
|
||||
khelpcenter
|
||||
konsole
|
||||
plasma-browser-integration
|
||||
print-manager
|
||||
];
|
||||
}
|
|
@ -1,15 +0,0 @@
|
|||
{
|
||||
config,
|
||||
lib,
|
||||
pkgs,
|
||||
...
|
||||
}: {
|
||||
# Hint electron apps to use wayland
|
||||
environment.sessionVariables.NIXOS_OZONE_WL = "1";
|
||||
|
||||
environment.systemPackages = with pkgs; [
|
||||
xwaylandvideobridge
|
||||
libsForQt5.qt5.qtwayland
|
||||
qt6.qtwayland
|
||||
];
|
||||
}
|
|
@ -1,28 +0,0 @@
|
|||
{
|
||||
config,
|
||||
lib,
|
||||
pkgs,
|
||||
...
|
||||
}: {
|
||||
services = {
|
||||
# Enable the X11 windowing system.
|
||||
xserver = {
|
||||
enable = true;
|
||||
# Enable touchpad support
|
||||
libinput.enable = true;
|
||||
# Remove xterm terminal
|
||||
excludePackages = with pkgs; [xterm];
|
||||
modules = [pkgs.xf86_input_wacom];
|
||||
wacom.enable = true;
|
||||
};
|
||||
};
|
||||
|
||||
# Install installation
|
||||
environment = {
|
||||
systemPackages = with pkgs; [
|
||||
# X11
|
||||
xorg.xkbutils
|
||||
xorg.xkill
|
||||
];
|
||||
};
|
||||
}
|
|
@ -1,14 +0,0 @@
|
|||
{
|
||||
config,
|
||||
lib,
|
||||
pkgs,
|
||||
...
|
||||
}: {
|
||||
xdg.portal = {
|
||||
enable = true;
|
||||
xdgOpenUsePortal = true;
|
||||
wlr.enable = true;
|
||||
extraPortals = with pkgs; [xdg-desktop-portal-gtk];
|
||||
configPackages = with pkgs; [gnome.gnome-session];
|
||||
};
|
||||
}
|
|
@ -1,67 +0,0 @@
|
|||
{
|
||||
pkgs,
|
||||
inputs,
|
||||
lib,
|
||||
...
|
||||
}: {
|
||||
imports = [
|
||||
inputs.xremap.nixosModules.default
|
||||
];
|
||||
|
||||
hardware.uinput.enable = true;
|
||||
users.groups.uinput.members = ["ghoscht"];
|
||||
users.groups.input.members = ["ghoscht"];
|
||||
|
||||
systemd.user.services.set-xhost = {
|
||||
description = "Run a one-shot command upon user login";
|
||||
path = [pkgs.xorg.xhost];
|
||||
wantedBy = ["default.target"];
|
||||
script = "xhost +SI:localuser:root";
|
||||
environment.DISPLAY = ":0"; # NOTE: This is hardcoded for this flake
|
||||
};
|
||||
|
||||
services.xremap = {
|
||||
withX11 = true;
|
||||
watch = true;
|
||||
debug = false;
|
||||
userName = "ghoscht";
|
||||
serviceMode = "user";
|
||||
config = {
|
||||
keymap = [
|
||||
{
|
||||
name = "Global";
|
||||
remap = {
|
||||
"CapsLock" = "Esc";
|
||||
"Esc" = "CapsLock";
|
||||
super-x = {
|
||||
launch = ["${lib.getExe pkgs.wezterm}"];
|
||||
};
|
||||
# super-space = {
|
||||
# launch = ["${lib.getExe pkgs.rofi}" "-i" "-show" "drun" "-show-icons"];
|
||||
# };
|
||||
# super-control-l = {
|
||||
# launch = ["${lib.getExe pkgs.firefox}"];
|
||||
# };
|
||||
# super-control-shift-l = {
|
||||
# launch = ["${lib.getExe pkgs.firefox}" "--private-window"];
|
||||
# };
|
||||
};
|
||||
}
|
||||
{
|
||||
name = "Music";
|
||||
remap = {
|
||||
"KEY_PLAYPAUSE" = {
|
||||
launch = ["${lib.getExe pkgs.playerctl}" "play-pause"];
|
||||
};
|
||||
"KEY_NEXTSONG" = {
|
||||
launch = ["${lib.getExe pkgs.playerctl}" "next"];
|
||||
};
|
||||
"KEY_PREVIOUSSONG" = {
|
||||
launch = ["${lib.getExe pkgs.playerctl}" "previous"];
|
||||
};
|
||||
};
|
||||
}
|
||||
];
|
||||
};
|
||||
};
|
||||
}
|
|
@ -1,13 +0,0 @@
|
|||
{
|
||||
virtualisation.docker = {
|
||||
enable = true;
|
||||
daemon.settings = {
|
||||
"default-address-pools" = [
|
||||
{
|
||||
"base" = "172.29.0.0/16";
|
||||
"size" = 24;
|
||||
}
|
||||
];
|
||||
};
|
||||
};
|
||||
}
|
|
@ -1,7 +0,0 @@
|
|||
{config, ...}: let
|
||||
hostname = config.networking.hostName;
|
||||
in {
|
||||
boot.initrd = {
|
||||
luks.devices."${hostname}".device = "/dev/disk/by-label/${hostname}_crypt";
|
||||
};
|
||||
}
|
|
@ -1,3 +0,0 @@
|
|||
{
|
||||
programs.gamemode.enable = true;
|
||||
}
|
|
@ -1,17 +0,0 @@
|
|||
{
|
||||
config,
|
||||
lib,
|
||||
pkgs,
|
||||
...
|
||||
}: {
|
||||
programs = {
|
||||
steam = {
|
||||
enable = true;
|
||||
};
|
||||
};
|
||||
|
||||
xdg.mime = {
|
||||
defaultApplications."x-scheme-handler/steam" = "steam.desktop";
|
||||
addedAssociations."x-scheme-handler/steam" = "steam.desktop";
|
||||
};
|
||||
}
|
|
@ -1,22 +0,0 @@
|
|||
{
|
||||
config,
|
||||
lib,
|
||||
pkgs,
|
||||
...
|
||||
}: {
|
||||
programs.kdeconnect.enable = true;
|
||||
|
||||
# Create system services for KDE connect
|
||||
systemd.user.services.kdeconnect = {
|
||||
description = "Adds communication between your desktop and your smartphone";
|
||||
after = ["graphical-session-pre.target"];
|
||||
partOf = ["graphical-session.target"];
|
||||
wantedBy = ["graphical-session.target"];
|
||||
|
||||
serviceConfig = {
|
||||
#Environment = "PATH=${config.home.profileDirectory}/bin";
|
||||
ExecStart = "${pkgs.plasma5Packages.kdeconnect-kde}/libexec/kdeconnectd";
|
||||
Restart = "on-abort";
|
||||
};
|
||||
};
|
||||
}
|
|
@ -1,24 +0,0 @@
|
|||
{
|
||||
config,
|
||||
lib,
|
||||
pkgs,
|
||||
...
|
||||
}: {
|
||||
services = {
|
||||
# Printer Setup
|
||||
printing.enable = true;
|
||||
avahi = {
|
||||
enable = true;
|
||||
nssmdns = true;
|
||||
# for a WiFi printer
|
||||
openFirewall = true;
|
||||
};
|
||||
udev.packages = [pkgs.utsushi];
|
||||
};
|
||||
|
||||
# Scanner Setup
|
||||
hardware.sane = {
|
||||
enable = true;
|
||||
extraBackends = [pkgs.utsushi];
|
||||
};
|
||||
}
|
|
@ -1,12 +0,0 @@
|
|||
{
|
||||
config,
|
||||
lib,
|
||||
pkgs,
|
||||
...
|
||||
}: {
|
||||
services.hardware.openrgb = {
|
||||
enable = true;
|
||||
package = pkgs.openrgb-with-all-plugins;
|
||||
motherboard = lib.mkDefault config.variables.machine.motherboard;
|
||||
};
|
||||
}
|
|
@ -1,10 +0,0 @@
|
|||
{
|
||||
boot.loader = {
|
||||
systemd-boot = {
|
||||
enable = true;
|
||||
consoleMode = "max";
|
||||
configurationLimit = 42;
|
||||
};
|
||||
efi.canTouchEfiVariables = true;
|
||||
};
|
||||
}
|
|
@ -1,6 +0,0 @@
|
|||
{
|
||||
imports = [../global/tailscale.nix];
|
||||
services.tailscale = {
|
||||
useRoutingFeatures = "both";
|
||||
};
|
||||
}
|
|
@ -1,10 +0,0 @@
|
|||
{lib, ...}: {
|
||||
services.tailscale = {
|
||||
enable = true;
|
||||
useRoutingFeatures = lib.mkDefault "client";
|
||||
};
|
||||
networking.firewall = {
|
||||
checkReversePath = "loose";
|
||||
allowedUDPPorts = [41641]; # Facilitate firewall punching
|
||||
};
|
||||
}
|
|
@ -1,3 +0,0 @@
|
|||
{
|
||||
services.udisks2.enable = true;
|
||||
}
|
|
@ -1,7 +0,0 @@
|
|||
{
|
||||
services.vsftpd = {
|
||||
enable = true;
|
||||
writeEnable = true;
|
||||
localUsers = true;
|
||||
};
|
||||
}
|
|
@ -1,5 +0,0 @@
|
|||
{
|
||||
programs.wireshark = {
|
||||
enable = true;
|
||||
};
|
||||
}
|
|
@ -1,7 +0,0 @@
|
|||
{
|
||||
services.xserver.serverFlagsSection = ''
|
||||
Option "StandbyTime" "0"
|
||||
Option "SuspendTime" "0"
|
||||
Option "OffTime" "0"
|
||||
'';
|
||||
}
|
242
hosts/configuration.nix
Normal file
242
hosts/configuration.nix
Normal file
|
@ -0,0 +1,242 @@
|
|||
{
|
||||
config,
|
||||
lib,
|
||||
pkgs,
|
||||
unstable,
|
||||
inputs,
|
||||
vars,
|
||||
...
|
||||
}: {
|
||||
imports =
|
||||
(import ../modules/desktops) ++ (import ../modules/shell) ++ [../modules/programs/librewolf.nix ../modules/programs/alacritty.nix] ++ (import ../modules/theming) ++ (import ../modules/coding);
|
||||
|
||||
users.users.${vars.user} = {
|
||||
# System User
|
||||
isNormalUser = true;
|
||||
extraGroups = ["wheel" "video" "audio" "camera" "networkmanager" "lp" "scanner" "kvm" "libvirtd" "i2c" "tty" "dialout" "wireshark"];
|
||||
};
|
||||
|
||||
boot.supportedFilesystems = ["ntfs" "exfat"];
|
||||
|
||||
# Set default shell -> move to module
|
||||
users.defaultUserShell = pkgs.fish;
|
||||
environment.shells = with pkgs; [fish];
|
||||
programs.fish.enable = true;
|
||||
|
||||
services.flatpak.enable = true;
|
||||
# Enable the X11 windowing system.
|
||||
# services.xserver.enable = true;
|
||||
|
||||
# programs.ssh.startAgent = true;
|
||||
|
||||
services.logind.extraConfig = ''
|
||||
# don’t shutdown when power button is short-pressed
|
||||
HandlePowerKey=ignore
|
||||
'';
|
||||
|
||||
# Enable the KDE Plasma Desktop Environment.
|
||||
services.xserver.displayManager.sddm.enable = true;
|
||||
# Configure keymap in X11
|
||||
# services.xserver = {
|
||||
# layout = "de";
|
||||
# xkbVariant = "";
|
||||
# };
|
||||
|
||||
environment.defaultCursor = {
|
||||
enable = true;
|
||||
theme = "breeze_cursors";
|
||||
};
|
||||
|
||||
time.timeZone = "Europe/Berlin";
|
||||
i18n = {
|
||||
defaultLocale = "en_US.UTF-8";
|
||||
extraLocaleSettings = {
|
||||
LC_ADDRESS = "de_DE.UTF-8";
|
||||
LC_IDENTIFICATION = "de_DE.UTF-8";
|
||||
LC_MEASUREMENT = "de_DE.UTF-8";
|
||||
LC_MONETARY = "de_DE.UTF-8";
|
||||
LC_NAME = "de_DE.UTF-8";
|
||||
LC_NUMERIC = "de_DE.UTF-8";
|
||||
LC_PAPER = "de_DE.UTF-8";
|
||||
LC_TELEPHONE = "de_DE.UTF-8";
|
||||
LC_TIME = "de_DE.UTF-8";
|
||||
};
|
||||
};
|
||||
|
||||
console = {
|
||||
# font = "Lat2-Terminus16";
|
||||
keyMap = "de";
|
||||
};
|
||||
|
||||
security = {
|
||||
rtkit.enable = true;
|
||||
polkit.enable = true;
|
||||
};
|
||||
|
||||
fonts.fonts = with pkgs; [
|
||||
# Fonts
|
||||
carlito # NixOS
|
||||
vegur # NixOS
|
||||
source-code-pro
|
||||
jetbrains-mono
|
||||
font-awesome # Icons
|
||||
corefonts # MS
|
||||
carlito
|
||||
dejavu_fonts
|
||||
ipafont
|
||||
kochi-substitute
|
||||
source-code-pro
|
||||
ttf_bitstream_vera
|
||||
inter
|
||||
noto-fonts-cjk-sans
|
||||
(nerdfonts.override {
|
||||
# Nerdfont Icons override
|
||||
fonts = [
|
||||
"JetBrainsMono"
|
||||
];
|
||||
})
|
||||
];
|
||||
|
||||
environment = {
|
||||
variables = {
|
||||
# Environment Variables
|
||||
TERMINAL = "${vars.terminal}";
|
||||
EDITOR = "${vars.editor}";
|
||||
VISUAL = "${vars.editor}";
|
||||
};
|
||||
systemPackages = with pkgs;
|
||||
[
|
||||
# System-Wide Packages
|
||||
# Terminal
|
||||
btop # Resource Manager
|
||||
coreutils # GNU Utilities
|
||||
git # Version Control
|
||||
killall # Process Killer
|
||||
nano # Text Editor
|
||||
neovim
|
||||
nix-tree # Browse Nix Store
|
||||
pciutils # Manage PCI
|
||||
tldr # Helper
|
||||
usbutils # Manage USB
|
||||
wget # Retriever
|
||||
bat
|
||||
lazygit
|
||||
fzf
|
||||
neofetch
|
||||
jmtpfs # Android MTP
|
||||
ipinfo
|
||||
|
||||
# Video/Audio
|
||||
alsa-utils # Audio Control
|
||||
feh # Image Viewer
|
||||
mpv # Media Player
|
||||
pavucontrol # Audio Control
|
||||
pipewire # Audio Server/Control
|
||||
pulseaudio # Audio Server/Control
|
||||
jellyfin-media-player
|
||||
|
||||
# Apps
|
||||
appimage-run # Runs AppImages on NixOS
|
||||
webcord
|
||||
signal-desktop
|
||||
alacritty
|
||||
librewolf
|
||||
zathura
|
||||
|
||||
# File Management
|
||||
unzip # Zip Files
|
||||
unrar # Rar Files
|
||||
zip # Zip
|
||||
|
||||
# Shell
|
||||
fishPlugins.grc
|
||||
grc
|
||||
fishPlugins.fzf
|
||||
fishPlugins.tide
|
||||
fishPlugins.sponge
|
||||
fishPlugins.colored-man-pages
|
||||
fishPlugins.autopair
|
||||
nix-your-shell
|
||||
# Other Packages Found @
|
||||
# - ./<host>/default.nix
|
||||
# - ../modules
|
||||
]
|
||||
++ (with unstable; [
|
||||
# Terminal
|
||||
eza
|
||||
|
||||
# Apps
|
||||
feishin
|
||||
sddm
|
||||
electron-mail
|
||||
xournalpp
|
||||
]);
|
||||
};
|
||||
|
||||
programs = {
|
||||
dconf.enable = true;
|
||||
};
|
||||
|
||||
i18n.inputMethod = {
|
||||
enabled = "fcitx5";
|
||||
fcitx5.addons = with pkgs; [
|
||||
fcitx5-mozc
|
||||
fcitx5-gtk
|
||||
];
|
||||
};
|
||||
|
||||
services = {
|
||||
printing = {
|
||||
# CUPS
|
||||
enable = true;
|
||||
};
|
||||
pipewire = {
|
||||
# Sound
|
||||
enable = true;
|
||||
alsa = {
|
||||
enable = true;
|
||||
support32Bit = true;
|
||||
};
|
||||
pulse.enable = true;
|
||||
jack.enable = true;
|
||||
};
|
||||
};
|
||||
|
||||
#hardware.pulseaudio.enable = false;
|
||||
|
||||
nix = {
|
||||
# Nix Package Manager Settings
|
||||
settings = {
|
||||
auto-optimise-store = true;
|
||||
};
|
||||
# gc = { # Garbage Collection
|
||||
# automatic = true;
|
||||
# dates = "weekly";
|
||||
# options = "--delete-older-than 2d";
|
||||
# };
|
||||
package = pkgs.nixVersions.unstable; # Enable Flakes
|
||||
registry.nixpkgs.flake = inputs.nixpkgs;
|
||||
extraOptions = ''
|
||||
experimental-features = nix-command flakes
|
||||
keep-outputs = true
|
||||
keep-derivations = true
|
||||
'';
|
||||
};
|
||||
nixpkgs.config.allowUnfree = true; # Allow Proprietary Software.
|
||||
|
||||
system = {
|
||||
# NixOS Settings
|
||||
stateVersion = "23.05";
|
||||
};
|
||||
|
||||
home-manager.users.${vars.user} = {
|
||||
# Home-Manager Settings
|
||||
home = {
|
||||
stateVersion = "23.05";
|
||||
};
|
||||
|
||||
programs = {
|
||||
home-manager.enable = true;
|
||||
};
|
||||
};
|
||||
}
|
82
hosts/convertible/default.nix
Normal file
82
hosts/convertible/default.nix
Normal file
|
@ -0,0 +1,82 @@
|
|||
# NOTE: Dual booted with windows 11. Disable fast-boot in power plan and bios and turn off hibernate to get wifi and bluetooth working. This only works once but on reboot is borked again. So using the old school BLT dongle.
|
||||
#
|
||||
{
|
||||
lib,
|
||||
pkgs,
|
||||
vars,
|
||||
unstable,
|
||||
...
|
||||
}: {
|
||||
imports = [
|
||||
./hardware-configuration.nix
|
||||
../../modules/virtualization/docker.nix
|
||||
../../modules/virtualization/qemu.nix
|
||||
../../modules/secrets/gnome-keyring.nix
|
||||
../../modules/secrets/gpg.nix
|
||||
];
|
||||
|
||||
boot = {
|
||||
# Boot Options
|
||||
loader = {
|
||||
systemd-boot = {
|
||||
enable = true;
|
||||
configurationLimit = 3;
|
||||
};
|
||||
efi = {
|
||||
canTouchEfiVariables = true;
|
||||
};
|
||||
timeout = 5;
|
||||
};
|
||||
};
|
||||
|
||||
boot.initrd.secrets = {
|
||||
"/crypto_keyfile.bin" = null;
|
||||
};
|
||||
|
||||
# Enable swap on luks
|
||||
boot.initrd.luks.devices."luks-4397a73c-b1b9-4fd0-8f7d-21d5159269b8".device = "/dev/disk/by-uuid/4397a73c-b1b9-4fd0-8f7d-21d5159269b8";
|
||||
boot.initrd.luks.devices."luks-4397a73c-b1b9-4fd0-8f7d-21d5159269b8".keyFile = "/crypto_keyfile.bin";
|
||||
|
||||
boot.kernelParams = ["i915.force_probe=9a49"];
|
||||
hardware.opengl = {
|
||||
enable = true;
|
||||
extraPackages = with pkgs; [
|
||||
intel-media-driver # LIBVA_DRIVER_NAME=iHD
|
||||
vaapiIntel # LIBVA_DRIVER_NAME=i965 (older but works better for Firefox/Chromium)
|
||||
vaapiVdpau
|
||||
libvdpau-va-gl
|
||||
];
|
||||
};
|
||||
# i18n.inputmethod = {
|
||||
# enabled = "fcitx5";
|
||||
# # fcitx5.addons = with pkgs; [
|
||||
# # fcitx5-mozc
|
||||
# # fcitx5-gtk
|
||||
# # ];
|
||||
# };
|
||||
|
||||
gnome.enable = true;
|
||||
awesome.enable = true;
|
||||
|
||||
services.tailscale.enable = true;
|
||||
services.tailscale.useRoutingFeatures = "client";
|
||||
|
||||
environment = {
|
||||
etc = {
|
||||
"wireplumber/bluetooth.lua.d/51-bluez-config.lua".text = ''
|
||||
bluez_monitor.properties = {
|
||||
["bluez5.enable-hw-volume"] = false,
|
||||
}
|
||||
'';
|
||||
};
|
||||
systemPackages = with pkgs;
|
||||
[
|
||||
tailscale
|
||||
nextcloud-client
|
||||
calibre
|
||||
libreoffice
|
||||
element-desktop
|
||||
]
|
||||
++ (with unstable; [xournalpp]);
|
||||
};
|
||||
}
|
|
@ -22,9 +22,7 @@
|
|||
fsType = "ext4";
|
||||
};
|
||||
|
||||
boot.initrd.luks.devices = {
|
||||
"luks-5f04c1e9-c3fe-42fb-97d1-0833bf66435a".device = "/dev/disk/by-uuid/5f04c1e9-c3fe-42fb-97d1-0833bf66435a";
|
||||
};
|
||||
boot.initrd.luks.devices."luks-5f04c1e9-c3fe-42fb-97d1-0833bf66435a".device = "/dev/disk/by-uuid/5f04c1e9-c3fe-42fb-97d1-0833bf66435a";
|
||||
|
||||
fileSystems."/boot" = {
|
||||
device = "/dev/disk/by-uuid/A2B4-1BBE";
|
79
hosts/default.nix
Normal file
79
hosts/default.nix
Normal file
|
@ -0,0 +1,79 @@
|
|||
{
|
||||
lib,
|
||||
inputs,
|
||||
nixpkgs,
|
||||
nixpkgs-unstable,
|
||||
home-manager,
|
||||
nur,
|
||||
hyprland,
|
||||
split-monitor-workspaces,
|
||||
vars,
|
||||
...
|
||||
}: let
|
||||
system = "x86_64-linux"; # System Architecture
|
||||
|
||||
pkgs = import nixpkgs {
|
||||
inherit system;
|
||||
config.allowUnfree = true; # Allow Proprietary Software
|
||||
};
|
||||
|
||||
unstable = import nixpkgs-unstable {
|
||||
inherit system;
|
||||
config.allowUnfree = true;
|
||||
};
|
||||
|
||||
lib = nixpkgs.lib;
|
||||
in {
|
||||
desktop = lib.nixosSystem {
|
||||
# Desktop Profile
|
||||
inherit system;
|
||||
specialArgs = {
|
||||
# Pass Flake Variable
|
||||
inherit inputs system unstable hyprland vars split-monitor-workspaces;
|
||||
host = {
|
||||
hostName = "desktop";
|
||||
mainMonitor = "DP-3";
|
||||
secondMonitor = "DP-1";
|
||||
};
|
||||
};
|
||||
modules = [
|
||||
# Modules Used
|
||||
nur.nixosModules.nur
|
||||
hyprland.nixosModules.default
|
||||
./desktop
|
||||
./configuration.nix
|
||||
home-manager.nixosModules.home-manager
|
||||
{
|
||||
# Home-Manager Module
|
||||
home-manager.useGlobalPkgs = true;
|
||||
home-manager.useUserPackages = true;
|
||||
}
|
||||
];
|
||||
};
|
||||
convertible = lib.nixosSystem {
|
||||
# Desktop Profile
|
||||
inherit system;
|
||||
specialArgs = {
|
||||
# Pass Flake Variable
|
||||
inherit inputs system unstable hyprland vars split-monitor-workspaces;
|
||||
host = {
|
||||
hostName = "convertible";
|
||||
mainMonitor = "DP-3";
|
||||
secondMonitor = "DP-1";
|
||||
};
|
||||
};
|
||||
modules = [
|
||||
# Modules Used
|
||||
nur.nixosModules.nur
|
||||
hyprland.nixosModules.default
|
||||
./convertible
|
||||
./configuration.nix
|
||||
home-manager.nixosModules.home-manager
|
||||
{
|
||||
# Home-Manager Module
|
||||
home-manager.useGlobalPkgs = true;
|
||||
home-manager.useUserPackages = true;
|
||||
}
|
||||
];
|
||||
};
|
||||
}
|
71
hosts/desktop/default.nix
Normal file
71
hosts/desktop/default.nix
Normal file
|
@ -0,0 +1,71 @@
|
|||
# NOTE: Dual booted with windows 11. Disable fast-boot in power plan and bios and turn off hibernate to get wifi and bluetooth working. This only works once but on reboot is borked again. So using the old school BLT dongle.
|
||||
#
|
||||
{
|
||||
lib,
|
||||
pkgs,
|
||||
vars,
|
||||
unstable,
|
||||
...
|
||||
}: {
|
||||
imports = [
|
||||
./hardware-configuration.nix
|
||||
../../modules/hardware/nvidia.nix
|
||||
../../modules/services/avahi.nix
|
||||
../../modules/virtualization/docker.nix
|
||||
../../modules/virtualization/qemu.nix
|
||||
../../modules/programs/games.nix
|
||||
../../modules/secrets/gnome-keyring.nix
|
||||
../../modules/secrets/gpg.nix
|
||||
# ../../modules/services/easyeffects.nix
|
||||
];
|
||||
|
||||
boot = {
|
||||
# Boot Options
|
||||
loader = {
|
||||
systemd-boot = {
|
||||
enable = true;
|
||||
configurationLimit = 3;
|
||||
};
|
||||
efi = {
|
||||
canTouchEfiVariables = true;
|
||||
};
|
||||
timeout = 5;
|
||||
};
|
||||
kernelPackages = unstable.linuxPackages_latest;
|
||||
};
|
||||
|
||||
hardware = {
|
||||
sane = {
|
||||
# Scanning
|
||||
enable = true;
|
||||
extraBackends = [unstable.utsushi];
|
||||
};
|
||||
};
|
||||
services.udev.packages = [unstable.utsushi];
|
||||
|
||||
# Desktops
|
||||
hyprland.enable = false;
|
||||
kde.enable = false;
|
||||
awesome.enable = true;
|
||||
|
||||
programs.kdeconnect.enable = true;
|
||||
environment = {
|
||||
systemPackages = with pkgs;
|
||||
[
|
||||
# System-Wide Packages
|
||||
discord # Messaging
|
||||
obs-studio # Live Streaming
|
||||
simple-scan # Scanning
|
||||
firefox
|
||||
heroic
|
||||
nextcloud-client
|
||||
anki
|
||||
easyeffects
|
||||
qpwgraph
|
||||
calibre
|
||||
]
|
||||
++ (with unstable; [
|
||||
libsForQt5.kdeconnect-kde
|
||||
]);
|
||||
};
|
||||
}
|
|
@ -18,17 +18,17 @@
|
|||
boot.extraModulePackages = [];
|
||||
|
||||
fileSystems."/" = {
|
||||
device = "/dev/disk/by-uuid/e92a5e85-52ce-4627-be79-5c07a99e2d1b";
|
||||
device = "/dev/disk/by-uuid/f9ba57fb-0b82-47e0-8189-7bbebc530e2b";
|
||||
fsType = "ext4";
|
||||
};
|
||||
|
||||
fileSystems."/boot" = {
|
||||
device = "/dev/disk/by-uuid/348E-AC69";
|
||||
device = "/dev/disk/by-uuid/BCF2-51D4";
|
||||
fsType = "vfat";
|
||||
};
|
||||
|
||||
swapDevices = [
|
||||
{device = "/dev/disk/by-uuid/ae322cab-c083-4644-80ff-9122498d54e8";}
|
||||
{device = "/dev/disk/by-uuid/4834fbc3-3feb-4b93-b11f-8b9bd054c5c1";}
|
||||
];
|
||||
|
||||
# Enables DHCP on each ethernet and wireless interface. In case of scripted networking
|
|
@ -1,117 +0,0 @@
|
|||
{
|
||||
pkgs,
|
||||
lib,
|
||||
...
|
||||
}: let
|
||||
vars = import ../../vars.nix;
|
||||
in {
|
||||
imports = [../common/global/locale.nix];
|
||||
# NixOS wants to enable GRUB by default
|
||||
boot.loader.grub.enable = false;
|
||||
# Enables the generation of /boot/extlinux/extlinux.conf
|
||||
boot.loader.generic-extlinux-compatible.enable = true;
|
||||
|
||||
# !!! Set to specific linux kernel version
|
||||
boot.kernelPackages = pkgs.linuxPackages;
|
||||
|
||||
# Disable ZFS on kernel 6
|
||||
boot.supportedFilesystems = lib.mkForce [
|
||||
"vfat"
|
||||
"xfs"
|
||||
"cifs"
|
||||
"ntfs"
|
||||
];
|
||||
|
||||
# !!! Needed for the virtual console to work on the RPi 3, as the default of 16M doesn't seem to be enough.
|
||||
# If X.org behaves weirdly (I only saw the cursor) then try increasing this to 256M.
|
||||
# On a Raspberry Pi 4 with 4 GB, you should either disable this parameter or increase to at least 64M if you want the USB ports to work.
|
||||
boot.kernelParams = ["cma=256M"];
|
||||
|
||||
# File systems configuration for using the installer's partition layout
|
||||
fileSystems = {
|
||||
# Prior to 19.09, the boot partition was hosted on the smaller first partition
|
||||
# Starting with 19.09, the /boot folder is on the main bigger partition.
|
||||
# The following is to be used only with older images.
|
||||
/*
|
||||
"/boot" = {
|
||||
device = "/dev/disk/by-label/NIXOS_BOOT";
|
||||
fsType = "vfat";
|
||||
};
|
||||
*/
|
||||
"/" = {
|
||||
device = "/dev/disk/by-label/NIXOS_SD";
|
||||
fsType = "ext4";
|
||||
};
|
||||
};
|
||||
|
||||
# !!! Adding a swap file is optional, but strongly recommended!
|
||||
swapDevices = [
|
||||
{
|
||||
device = "/swapfile";
|
||||
size = 1024;
|
||||
}
|
||||
];
|
||||
|
||||
# systemPackages
|
||||
environment.systemPackages = with pkgs; [
|
||||
neovim
|
||||
curl
|
||||
wget
|
||||
];
|
||||
|
||||
services.openssh = {
|
||||
enable = true;
|
||||
settings.PermitRootLogin = "yes";
|
||||
};
|
||||
|
||||
services.restic.server = {
|
||||
enable = true;
|
||||
dataDir = "/mnt/backups";
|
||||
extraFlags = ["--no-auth"];
|
||||
};
|
||||
|
||||
services.tailscale = {
|
||||
enable = true;
|
||||
useRoutingFeatures = "server";
|
||||
};
|
||||
|
||||
virtualisation.docker.enable = true;
|
||||
|
||||
networking.firewall.enable = false;
|
||||
|
||||
# Networking
|
||||
networking.useDHCP = true;
|
||||
|
||||
# forwarding
|
||||
boot.kernel.sysctl = {
|
||||
"net.ipv4.conf.all.forwarding" = true;
|
||||
"net.ipv6.conf.all.forwarding" = true;
|
||||
"net.ipv4.tcp_ecn" = true;
|
||||
};
|
||||
|
||||
# put your own configuration here, for example ssh keys:
|
||||
users.mutableUsers = true;
|
||||
users.users.nixos = {
|
||||
isNormalUser = true;
|
||||
password = "changeme";
|
||||
extraGroups = ["wheel" "docker"];
|
||||
openssh.authorizedKeys.keys = [
|
||||
#Adalbert
|
||||
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIJd6Gut34abkwlZ4tZVBO4Qt7CkIpPm/Z8R6JCisjnYy openpgp:0xBD0CFCA0"
|
||||
|
||||
#Ludwig
|
||||
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIFlRsnLqm6Ap3yKEEhtFiWavo72df/X5Il1ZCmENUqev openpgp:0xDE189CA5"
|
||||
|
||||
#Franz
|
||||
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIINCjLoirHMos7c9lRatWtSYAk68xbUGc8vPU0wFxIzj openpgp:0x7430326E"
|
||||
];
|
||||
};
|
||||
users.users.admin = {
|
||||
isNormalUser = true;
|
||||
extraGroups = ["wheel"]; # Enable ‘sudo’ for the user.
|
||||
hashedPassword = "blablabla"; # generate with `mkpasswd`
|
||||
};
|
||||
nix.settings.trusted-users = ["admin" "ghoscht" "nixos"];
|
||||
|
||||
system.stateVersion = "23.11";
|
||||
}
|
|
@ -1,7 +0,0 @@
|
|||
# Franz
|
||||
|
||||
## Drive Formatting
|
||||
|
||||
```sh
|
||||
sudo nix --experimental-features "nix-command flakes" run github:nix-community/disko -- --mode disko ../../disko/btrfs-swap.nix --arg device '"/dev/nvme0n1"'
|
||||
```
|
|
@ -1,131 +0,0 @@
|
|||
let
|
||||
authentikImage = "ghcr.io/goauthentik/server:2024.8.2";
|
||||
in {
|
||||
project.name = "auth";
|
||||
|
||||
networks.dmz = {
|
||||
name = "dmz";
|
||||
external = true;
|
||||
};
|
||||
networks.internal = {};
|
||||
|
||||
services = {
|
||||
authentik.service = {
|
||||
image = authentikImage;
|
||||
container_name = "authentik";
|
||||
labels = {
|
||||
"traefik.enable" = "true";
|
||||
|
||||
"traefik.http.services.authentik.loadbalancer.server.port" = "9000";
|
||||
"traefik.http.routers.authentik.service" = "authentik";
|
||||
"traefik.http.routers.authentik.rule" = "Host(`auth.ghoscht.com`)";
|
||||
"traefik.http.routers.authentik.entrypoints" = "websecure";
|
||||
"traefik.http.routers.authentik.tls" = "true";
|
||||
"traefik.http.routers.authentik.tls.certresolver" = "letsencrypt";
|
||||
|
||||
"traefik.http.services.authentik-external.loadbalancer.server.port" = "9000";
|
||||
"traefik.http.routers.authentik-external.service" = "authentik-external";
|
||||
"traefik.http.routers.authentik-external.rule" = "Host(`auth.ghoscht.com`)";
|
||||
"traefik.http.routers.authentik-external.entrypoints" = "websecure-external";
|
||||
"traefik.http.routers.authentik-external.tls" = "true";
|
||||
"traefik.http.routers.authentik-external.tls.certresolver" = "letsencrypt";
|
||||
|
||||
"diun.enable" = "true";
|
||||
"diun.watch_repo" = "true";
|
||||
"diun.include_tags" = "^\\d+\\.\\d+\\.\\d+$$";
|
||||
};
|
||||
command = "server";
|
||||
environment = {
|
||||
AUTHENTIK_REDIS__HOST = "redis";
|
||||
AUTHENTIK_POSTGRESQL__HOST = "postgres";
|
||||
AUTHENTIK_ERROR_REPORTING__ENABLED = "true";
|
||||
};
|
||||
env_file = [
|
||||
"/home/ghoscht/.docker/auth/authentik.env"
|
||||
];
|
||||
restart = "always";
|
||||
depends_on = {
|
||||
redis = {condition = "service_healthy";};
|
||||
postgres = {condition = "service_healthy";};
|
||||
};
|
||||
volumes = [
|
||||
"/home/ghoscht/.docker/auth/authentik_media:/media"
|
||||
"/home/ghoscht/.docker/auth/authentik_custom_templates:/templates"
|
||||
];
|
||||
networks = [
|
||||
"dmz"
|
||||
"internal"
|
||||
];
|
||||
};
|
||||
worker.service = {
|
||||
image = authentikImage;
|
||||
command = "worker";
|
||||
environment = {
|
||||
AUTHENTIK_REDIS__HOST = "redis";
|
||||
AUTHENTIK_POSTGRESQL__HOST = "postgres";
|
||||
AUTHENTIK_ERROR_REPORTING__ENABLED = "true";
|
||||
};
|
||||
env_file = [
|
||||
"/home/ghoscht/.docker/auth/authentik.env"
|
||||
];
|
||||
depends_on = {
|
||||
redis = {condition = "service_healthy";};
|
||||
postgres = {condition = "service_healthy";};
|
||||
};
|
||||
volumes = [
|
||||
"/var/run/docker.sock:/var/run/docker.sock"
|
||||
"/home/ghoscht/.docker/auth/authentik_media:/media"
|
||||
"/home/ghoscht/.docker/auth/authentik_custom_templates:/templates"
|
||||
];
|
||||
restart = "always";
|
||||
user = "root";
|
||||
networks = [
|
||||
"internal"
|
||||
];
|
||||
};
|
||||
redis.service = {
|
||||
image = "redis:7.2.4";
|
||||
command = "--save 60 1 --loglevel warning";
|
||||
healthcheck = {
|
||||
test = [
|
||||
"CMD-SHELL"
|
||||
"redis-cli ping | grep PONG"
|
||||
];
|
||||
start_period = "20s";
|
||||
interval = "30s";
|
||||
retries = 5;
|
||||
timeout = "5s";
|
||||
};
|
||||
restart = "always";
|
||||
volumes = [
|
||||
"/home/ghoscht/.docker/auth/redis_data:/data"
|
||||
];
|
||||
networks = [
|
||||
"internal"
|
||||
];
|
||||
};
|
||||
postgres.service = {
|
||||
image = "postgres:12.18";
|
||||
restart = "always";
|
||||
env_file = [
|
||||
"/home/ghoscht/.docker/auth/postgres.env"
|
||||
];
|
||||
volumes = [
|
||||
"/home/ghoscht/.docker/auth/postgres_data:/var/lib/postgresql/data"
|
||||
];
|
||||
healthcheck = {
|
||||
test = [
|
||||
"CMD-SHELL"
|
||||
"pg_isready -d $${POSTGRES_DB} -U $${POSTGRES_USER}"
|
||||
];
|
||||
start_period = "20s";
|
||||
interval = "30s";
|
||||
retries = 5;
|
||||
timeout = "5s";
|
||||
};
|
||||
networks = [
|
||||
"internal"
|
||||
];
|
||||
};
|
||||
};
|
||||
}
|
|
@ -1,6 +0,0 @@
|
|||
# Instead of pinning Nixpkgs, we can opt to use the one in NIX_PATH
|
||||
import <nixpkgs> {
|
||||
# We specify the architecture explicitly. Use a Linux remote builder when
|
||||
# calling arion from other platforms.
|
||||
system = "x86_64-linux";
|
||||
}
|
|
@ -1,45 +0,0 @@
|
|||
{config, ...}: let
|
||||
vars = import ../../../../vars.nix;
|
||||
in {
|
||||
virtualisation.arion = {
|
||||
projects.auth.settings = {
|
||||
imports = [./arion-compose.nix];
|
||||
};
|
||||
};
|
||||
|
||||
sops.secrets."auth/postgres_db" = {
|
||||
owner = vars.user;
|
||||
};
|
||||
sops.secrets."auth/postgres_user" = {
|
||||
owner = vars.user;
|
||||
};
|
||||
sops.secrets."auth/postgres_pw" = {
|
||||
owner = vars.user;
|
||||
};
|
||||
sops.secrets."auth/authentik_secret_key" = {
|
||||
owner = vars.user;
|
||||
};
|
||||
|
||||
sops.templates."auth-postgres.env" = {
|
||||
path = "/home/${vars.user}/.docker/auth/postgres.env";
|
||||
owner = vars.user;
|
||||
mode = "0775";
|
||||
content = ''
|
||||
POSTGRES_PASSWORD="${config.sops.placeholder."auth/postgres_pw"}"
|
||||
POSTGRES_USER="${config.sops.placeholder."auth/postgres_user"}"
|
||||
POSTGRES_DB="${config.sops.placeholder."auth/postgres_db"}"
|
||||
'';
|
||||
};
|
||||
|
||||
sops.templates."auth-authentik.env" = {
|
||||
path = "/home/${vars.user}/.docker/auth/authentik.env";
|
||||
owner = vars.user;
|
||||
mode = "0775";
|
||||
content = ''
|
||||
AUTHENTIK_POSTGRESQL__PASSWORD="${config.sops.placeholder."auth/postgres_pw"}"
|
||||
AUTHENTIK_POSTGRESQL__USER="${config.sops.placeholder."auth/postgres_user"}"
|
||||
AUTHENTIK_POSTGRESQL__NAME="${config.sops.placeholder."auth/postgres_db"}"
|
||||
AUTHENTIK_SECRET_KEY="${config.sops.placeholder."auth/authentik_secret_key"}"
|
||||
'';
|
||||
};
|
||||
}
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Reference in a new issue