Compare commits
11 Commits
2d1e641887
...
main
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
579cd749a9 | ||
|
|
36585f4206 | ||
|
|
e474979699 | ||
|
|
1130a847a6 | ||
|
|
b474cabc0e | ||
|
|
810138e9d4 | ||
|
|
5984cd8b3a | ||
|
|
1b1b8111ba | ||
|
|
7834f74b01 | ||
|
|
a8347ee783 | ||
|
|
6bc88ba514 |
@@ -1,9 +0,0 @@
|
|||||||
{ config, pkgs, lib, ... }:
|
|
||||||
let
|
|
||||||
profile = import ./profile.nix;
|
|
||||||
in
|
|
||||||
{
|
|
||||||
environment.systemPackages = with pkgs; [
|
|
||||||
openmodelica.combined
|
|
||||||
];
|
|
||||||
}
|
|
||||||
@@ -4,41 +4,47 @@
|
|||||||
|
|
||||||
{ config, pkgs, ... }:
|
{ config, pkgs, ... }:
|
||||||
let
|
let
|
||||||
profile = import ./profile.nix;
|
profile = import ./profile.nix;
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
imports =
|
imports = [
|
||||||
[ # Include the results of the hardware scan.
|
# Include the results of the hardware scan.
|
||||||
./hardware-configuration.nix
|
./hardware-configuration.nix
|
||||||
./cron-schedule.nix
|
./cron-schedule.nix
|
||||||
./home-manager.nix
|
./home-manager.nix
|
||||||
];
|
];
|
||||||
|
|
||||||
# Bootloader.
|
# Bootloader.
|
||||||
boot.loader.systemd-boot.enable = true;
|
boot.loader.systemd-boot.enable = true;
|
||||||
boot.loader.efi.canTouchEfiVariables = true;
|
boot.loader.efi.canTouchEfiVariables = true;
|
||||||
|
|
||||||
boot.extraModulePackages = with config.boot.kernelPackages; [
|
boot.extraModulePackages = with config.boot.kernelPackages; [
|
||||||
v4l2loopback
|
v4l2loopback
|
||||||
];
|
];
|
||||||
|
|
||||||
boot.kernelModules = [ "v4l2loopback" ];
|
|
||||||
boot.extraModprobeConfig = ''
|
|
||||||
options v4l2loopback video_nr=10 card_label=snapcam exclusive_caps=1
|
|
||||||
'';
|
|
||||||
|
|
||||||
|
|
||||||
|
boot.kernelModules = [ "v4l2loopback" ];
|
||||||
|
boot.extraModprobeConfig = ''
|
||||||
|
options v4l2loopback video_nr=10 card_label=snapcam exclusive_caps=1
|
||||||
|
'';
|
||||||
|
|
||||||
networking.hostName = profile.hostname; # Define your hostname.
|
networking.hostName = profile.hostname; # Define your hostname.
|
||||||
# networking.wireless.enable = true; # Enables wireless support via wpa_supplicant.
|
# networking.wireless.enable = true; # Enables wireless support via wpa_supplicant.
|
||||||
|
|
||||||
# Enable networking
|
# Enable networking
|
||||||
networking.networkmanager.enable = true;
|
networking.networkmanager = {
|
||||||
|
enable = true;
|
||||||
|
plugins = with pkgs; [
|
||||||
|
networkmanager-ssh
|
||||||
|
networkmanager-openvpn
|
||||||
|
networkmanager-strongswan
|
||||||
|
];
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
# Set your time zone.
|
# Set your time zone.
|
||||||
time.timeZone = "Europe/Berlin";
|
time.timeZone = "Europe/Berlin";
|
||||||
|
|
||||||
# Select internationalisation properties.
|
# Select internationalization properties.
|
||||||
i18n.defaultLocale = "de_DE.UTF-8";
|
i18n.defaultLocale = "de_DE.UTF-8";
|
||||||
|
|
||||||
i18n.extraLocaleSettings = {
|
i18n.extraLocaleSettings = {
|
||||||
@@ -77,33 +83,32 @@ boot.extraModprobeConfig = ''
|
|||||||
console.keyMap = "de-latin1";
|
console.keyMap = "de-latin1";
|
||||||
|
|
||||||
environment.systemPackages = with pkgs; [
|
environment.systemPackages = with pkgs; [
|
||||||
wget
|
wget
|
||||||
networkmanager
|
strongswan
|
||||||
epiphany
|
nodejs_24
|
||||||
nodejs_24
|
dive
|
||||||
dive
|
podman-tui
|
||||||
podman-tui
|
podman-compose
|
||||||
podman-compose
|
gmp
|
||||||
gmp
|
gmp.dev
|
||||||
gmp.dev
|
pkg-config
|
||||||
pkg-config
|
|
||||||
];
|
];
|
||||||
|
|
||||||
programs.nix-ld = {
|
programs.nix-ld = {
|
||||||
enable = true;
|
enable = true;
|
||||||
libraries = with pkgs; [
|
libraries = with pkgs; [
|
||||||
stdenv.cc.cc
|
stdenv.cc.cc
|
||||||
zlib
|
zlib
|
||||||
gmp
|
gmp
|
||||||
openssl
|
openssl
|
||||||
curl
|
curl
|
||||||
glib
|
glib
|
||||||
gtk3
|
gtk3
|
||||||
libGL
|
libGL
|
||||||
xorg.libX11
|
xorg.libX11
|
||||||
appimage-run
|
appimage-run
|
||||||
libgcrypt
|
libgcrypt
|
||||||
libxcrypt
|
libxcrypt
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -132,7 +137,10 @@ boot.extraModprobeConfig = ''
|
|||||||
|
|
||||||
# Enable the OpenSSH daemon.
|
# Enable the OpenSSH daemon.
|
||||||
services.openssh.enable = true;
|
services.openssh.enable = true;
|
||||||
nix.settings.experimental-features = [ "nix-command" "flakes" ];
|
nix.settings.experimental-features = [
|
||||||
|
"nix-command"
|
||||||
|
"flakes"
|
||||||
|
];
|
||||||
nixpkgs.config.allowUnfree = true;
|
nixpkgs.config.allowUnfree = true;
|
||||||
# This value determines the NixOS release from which the default
|
# This value determines the NixOS release from which the default
|
||||||
# settings for stateful data, like file locations and database versions
|
# settings for stateful data, like file locations and database versions
|
||||||
|
|||||||
@@ -8,7 +8,7 @@ in
|
|||||||
./browser.nix
|
./browser.nix
|
||||||
./planner.nix
|
./planner.nix
|
||||||
./window-manager.nix
|
./window-manager.nix
|
||||||
../applications/matrix-element.nix
|
../applications/matrix.nix
|
||||||
];
|
];
|
||||||
|
|
||||||
environment.systemPackages = with pkgs; [
|
environment.systemPackages = with pkgs; [
|
||||||
|
|||||||
@@ -45,18 +45,4 @@ in
|
|||||||
programs.waybar = {
|
programs.waybar = {
|
||||||
enable = true;
|
enable = true;
|
||||||
};
|
};
|
||||||
|
|
||||||
home-manager.users.${profile.username} = { ... }: {
|
|
||||||
home.file.".config/hypr" = {
|
|
||||||
source = dotfiles_hypr;
|
|
||||||
recursive = true;
|
|
||||||
};
|
|
||||||
|
|
||||||
home.file.".config/waybar" = {
|
|
||||||
source = dotfiles_waybar;
|
|
||||||
recursive = true;
|
|
||||||
};
|
|
||||||
|
|
||||||
};
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -7,7 +7,6 @@ in
|
|||||||
{
|
{
|
||||||
|
|
||||||
imports = [
|
imports = [
|
||||||
<home-manager/nixos>
|
|
||||||
./desktop-environment/config.nix
|
./desktop-environment/config.nix
|
||||||
./terminal-environment/config.nix
|
./terminal-environment/config.nix
|
||||||
./system-environment/config.nix
|
./system-environment/config.nix
|
||||||
@@ -16,51 +15,10 @@ in
|
|||||||
users.users.${profile.username} = {
|
users.users.${profile.username} = {
|
||||||
isNormalUser = true;
|
isNormalUser = true;
|
||||||
description = "Nina Chlóe Kassandra";
|
description = "Nina Chlóe Kassandra";
|
||||||
extraGroups = [ "networkmanager" "wheel" "docker" "scanner" "lp" "uucp" "dialout"];
|
extraGroups = ["disks" "storage" "networkmanager" "wheel" "docker" "scanner" "lp" "uucp" "dialout"];
|
||||||
packages = with pkgs; [];
|
packages = with pkgs; [];
|
||||||
shell = pkgs.zsh;
|
shell = pkgs.zsh;
|
||||||
hashedPassword = profile.hashed-password;
|
hashedPassword = profile.hashed-password;
|
||||||
};
|
|
||||||
|
|
||||||
home-manager.backupFileExtension = "bck.lck";
|
|
||||||
|
|
||||||
home-manager.users.${profile.username} = { pkgs, ... }: {
|
|
||||||
home.stateVersion = "25.11";
|
|
||||||
programs.git = {
|
|
||||||
enable = true;
|
|
||||||
settings = {
|
|
||||||
user = {
|
|
||||||
name = "Nina Chloé Kassandra Reiß";
|
|
||||||
email = "nina.reiss@nickr.eu";
|
|
||||||
};
|
|
||||||
push = {
|
|
||||||
autoSetupRemote = true;
|
|
||||||
};
|
|
||||||
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
programs.ssh = {
|
|
||||||
enable = true;
|
|
||||||
|
|
||||||
extraConfig = ''
|
|
||||||
Host git.nickr.eu
|
|
||||||
HostName git.nickr.eu
|
|
||||||
Port 22
|
|
||||||
|
|
||||||
Host nickr.eu
|
|
||||||
HostName nickr.eu
|
|
||||||
Port 222
|
|
||||||
|
|
||||||
Host nichkara.eu
|
|
||||||
HostName nichkara.eu
|
|
||||||
Port 222
|
|
||||||
|
|
||||||
Host git.nichkara.eu
|
|
||||||
HostName git.nichkara.eu
|
|
||||||
Port 22
|
|
||||||
'';
|
|
||||||
};
|
|
||||||
};
|
};
|
||||||
|
|
||||||
systemd.services.generate-ssh-key = {
|
systemd.services.generate-ssh-key = {
|
||||||
|
|||||||
@@ -1,6 +1,9 @@
|
|||||||
{ pkgs, ... }:
|
{ pkgs, ... }:
|
||||||
{
|
{
|
||||||
|
|
||||||
|
services.udisks2.enable = true;
|
||||||
|
services.gvfs.enable = true;
|
||||||
|
|
||||||
environment.systemPackages = with pkgs; [
|
environment.systemPackages = with pkgs; [
|
||||||
nextcloud-client
|
nextcloud-client
|
||||||
unzip
|
unzip
|
||||||
|
|||||||
@@ -13,6 +13,7 @@ in
|
|||||||
astyle
|
astyle
|
||||||
hyfetch
|
hyfetch
|
||||||
fzf-zsh
|
fzf-zsh
|
||||||
|
distrobox
|
||||||
];
|
];
|
||||||
|
|
||||||
programs.tmux = {
|
programs.tmux = {
|
||||||
@@ -63,58 +64,4 @@ in
|
|||||||
theme = "sonicradish";
|
theme = "sonicradish";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
home-manager.users.${profile.username} = { ... }: {
|
|
||||||
programs.zsh = {
|
|
||||||
enable = true;
|
|
||||||
enableCompletion = true;
|
|
||||||
autocd = true;
|
|
||||||
|
|
||||||
autosuggestion = {
|
|
||||||
enable = true;
|
|
||||||
};
|
|
||||||
|
|
||||||
syntaxHighlighting = {
|
|
||||||
enable = true;
|
|
||||||
};
|
|
||||||
|
|
||||||
history = {
|
|
||||||
size = 4096;
|
|
||||||
ignoreSpace = true;
|
|
||||||
ignorePatterns = [ ];
|
|
||||||
saveNoDups = true;
|
|
||||||
ignoreAllDups = true;
|
|
||||||
};
|
|
||||||
|
|
||||||
oh-my-zsh = {
|
|
||||||
enable = true;
|
|
||||||
theme = "sonicradish";
|
|
||||||
plugins = [
|
|
||||||
"git"
|
|
||||||
"z"
|
|
||||||
"dotenv"
|
|
||||||
"battery"
|
|
||||||
"emoji"
|
|
||||||
"emoji-clock"
|
|
||||||
"fzf"
|
|
||||||
"kitty"
|
|
||||||
"themes"
|
|
||||||
"tmux"
|
|
||||||
"vi-mode"
|
|
||||||
];
|
|
||||||
};
|
|
||||||
|
|
||||||
setOptions = [
|
|
||||||
"HIST_IGNORE_ALL_DUPS"
|
|
||||||
];
|
|
||||||
|
|
||||||
shellAliases = {
|
|
||||||
ll = "ls -lh";
|
|
||||||
nix-check = "nixos-rebuild build";
|
|
||||||
nix-update = "sudo nixos-rebuild switch";
|
|
||||||
sirc = "ssh -t nichkara.eu tmux new-session -A -s weechat weechat";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -9,6 +9,8 @@ in
|
|||||||
fzf
|
fzf
|
||||||
ripgrep
|
ripgrep
|
||||||
ripgrep-all
|
ripgrep-all
|
||||||
|
ctags
|
||||||
|
lua54Packages.luarocks-nix
|
||||||
];
|
];
|
||||||
|
|
||||||
programs.neovim = {
|
programs.neovim = {
|
||||||
@@ -17,5 +19,7 @@ in
|
|||||||
withPython3 = true;
|
withPython3 = true;
|
||||||
withRuby = true;
|
withRuby = true;
|
||||||
withNodeJs = true;
|
withNodeJs = true;
|
||||||
|
viAlias = true;
|
||||||
|
vimAlias = true;
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
67
terminal-environment/genv/default.nix
Normal file
67
terminal-environment/genv/default.nix
Normal file
@@ -0,0 +1,67 @@
|
|||||||
|
{ pkgs, lib, ... }:
|
||||||
|
|
||||||
|
let
|
||||||
|
genv = pkgs.writeShellScriptBin "genv" ''
|
||||||
|
#!/usr/bin/env bash
|
||||||
|
set -e
|
||||||
|
|
||||||
|
DISTRO="$1"
|
||||||
|
PRESET="$2"
|
||||||
|
|
||||||
|
if [ -z "$DISTRO" ] || [ -z "$PRESET" ]; then
|
||||||
|
echo "Usage: genv <distro> <preset>"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
PROJECT=$(basename "$PWD")
|
||||||
|
BOX="genv-$PROJECT"
|
||||||
|
|
||||||
|
# distro mapping
|
||||||
|
case "$DISTRO" in
|
||||||
|
ubuntu) IMAGE="docker.io/library/ubuntu:24.04" ;;
|
||||||
|
arch) IMAGE="docker.io/library/archlinux:latest" ;;
|
||||||
|
alpine) IMAGE="docker.io/library/alpine:latest" ;;
|
||||||
|
*) IMAGE="$DISTRO" ;;
|
||||||
|
esac
|
||||||
|
|
||||||
|
echo "[genv] image: $IMAGE"
|
||||||
|
|
||||||
|
# container nur erstellen wenn nötig
|
||||||
|
if ! distrobox list | grep -q "$BOX"; then
|
||||||
|
distrobox create --name "$BOX" --image "$IMAGE"
|
||||||
|
fi
|
||||||
|
|
||||||
|
mkdir -p .genv
|
||||||
|
|
||||||
|
# preset kopieren
|
||||||
|
cp ${./presets}/$PRESET.sh .genv/setup.sh
|
||||||
|
chmod +x .genv/setup.sh
|
||||||
|
|
||||||
|
# envrc generieren
|
||||||
|
cat > .envrc <<EOF
|
||||||
|
export GENV_BOX="$BOX"
|
||||||
|
|
||||||
|
# container starten
|
||||||
|
distrobox start "$GENV_BOX" >/dev/null 2>&1 || true
|
||||||
|
|
||||||
|
# setup einmalig
|
||||||
|
if [ ! -f .genv/.init ]; then
|
||||||
|
echo "[genv] setup läuft"
|
||||||
|
distrobox enter "$GENV_BOX" -- bash .genv/setup.sh
|
||||||
|
touch .genv/.init
|
||||||
|
fi
|
||||||
|
|
||||||
|
# tmux workflow
|
||||||
|
if [ -z "$TMUX" ]; then
|
||||||
|
tmux new-session -A -s "$GENV_BOX" \
|
||||||
|
\; new-window -n editor "nvim" \
|
||||||
|
\; new-window -n dev "distrobox enter $GENV_BOX"
|
||||||
|
fi
|
||||||
|
EOF
|
||||||
|
|
||||||
|
echo "[genv] fertig → direnv allow"
|
||||||
|
'';
|
||||||
|
in
|
||||||
|
{
|
||||||
|
home.packages = [ genv ];
|
||||||
|
}
|
||||||
11
terminal-environment/genv/presets/c.sh
Normal file
11
terminal-environment/genv/presets/c.sh
Normal file
@@ -0,0 +1,11 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
set -e
|
||||||
|
|
||||||
|
if command -v apt >/dev/null; then
|
||||||
|
sudo apt update
|
||||||
|
sudo apt install -y build-essential cmake
|
||||||
|
elif command -v pacman >/dev/null; then
|
||||||
|
sudo pacman -Sy --noconfirm base-devel cmake
|
||||||
|
elif command -v apk >/dev/null; then
|
||||||
|
sudo apk add build-base cmake
|
||||||
|
fi
|
||||||
11
terminal-environment/genv/presets/data-science.sh
Normal file
11
terminal-environment/genv/presets/data-science.sh
Normal file
@@ -0,0 +1,11 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
set -e
|
||||||
|
|
||||||
|
if command -v apt >/dev/null; then
|
||||||
|
sudo apt update
|
||||||
|
sudo apt install -y python3
|
||||||
|
elif command -v pacman >/dev/null; then
|
||||||
|
sudo pacman -Sy --noconfirm base-devel python3
|
||||||
|
elif command -v apk >/dev/null; then
|
||||||
|
sudo apk add build-base python3
|
||||||
|
fi
|
||||||
Reference in New Issue
Block a user