Compare commits
No commits in common. "3b4f67c04f26aa9b488ffed7023f60e9cea859d4" and "ec11f6ec7f0e98c26895a3d20b015f96ad70d0df" have entirely different histories.
3b4f67c04f
...
ec11f6ec7f
@ -30,12 +30,12 @@
|
|||||||
system = "x86_64-linux";
|
system = "x86_64-linux";
|
||||||
modules = [
|
modules = [
|
||||||
./hosts/MaxNixosLaptop/configuration.nix
|
./hosts/MaxNixosLaptop/configuration.nix
|
||||||
sops-nix.nixosModules.sops
|
|
||||||
home-manager.nixosModules.default
|
home-manager.nixosModules.default
|
||||||
{
|
{
|
||||||
home-manager.useGlobalPkgs = true;
|
home-manager.useGlobalPkgs = true;
|
||||||
home-manager.useUserPackages = true;
|
home-manager.useUserPackages = true;
|
||||||
}
|
}
|
||||||
|
sops-nix.nixosModules.sops
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
@ -12,8 +12,6 @@
|
|||||||
./hardware-configuration.nix
|
./hardware-configuration.nix
|
||||||
# script for rebuilding nixos
|
# script for rebuilding nixos
|
||||||
../../modules/nixos/rebuild.nix
|
../../modules/nixos/rebuild.nix
|
||||||
../../modules/nixos/wifi.nix
|
|
||||||
../../modules/nixos/sops.nix
|
|
||||||
# greetd login manager
|
# greetd login manager
|
||||||
../../modules/nixos/greetd.nix
|
../../modules/nixos/greetd.nix
|
||||||
# sway as window manager
|
# sway as window manager
|
||||||
@ -33,7 +31,7 @@
|
|||||||
# networking.proxy.noProxy = "127.0.0.1,localhost,internal.domain";
|
# networking.proxy.noProxy = "127.0.0.1,localhost,internal.domain";
|
||||||
|
|
||||||
# Enable networking
|
# Enable networking
|
||||||
# networking.networkmanager.enable = true;
|
networking.networkmanager.enable = true;
|
||||||
|
|
||||||
# Set your time zone.
|
# Set your time zone.
|
||||||
time.timeZone = "Europe/Berlin";
|
time.timeZone = "Europe/Berlin";
|
||||||
@ -86,7 +84,6 @@
|
|||||||
# List packages installed in system profile. To search, run:
|
# List packages installed in system profile. To search, run:
|
||||||
# $ nix search wget
|
# $ nix search wget
|
||||||
environment.systemPackages = with pkgs; [
|
environment.systemPackages = with pkgs; [
|
||||||
neovim
|
|
||||||
wget
|
wget
|
||||||
fprintd
|
fprintd
|
||||||
home-manager
|
home-manager
|
||||||
@ -126,12 +123,6 @@
|
|||||||
# fingerprint unlock
|
# fingerprint unlock
|
||||||
services.fprintd.enable = true;
|
services.fprintd.enable = true;
|
||||||
|
|
||||||
hardware.bluetooth = {
|
|
||||||
enable = true;
|
|
||||||
powerOnBoot = true;
|
|
||||||
};
|
|
||||||
services.blueman.enable = true;
|
|
||||||
|
|
||||||
# Enable the OpenSSH daemon.
|
# Enable the OpenSSH daemon.
|
||||||
# services.openssh.enable = true;
|
# services.openssh.enable = true;
|
||||||
|
|
||||||
@ -153,14 +144,6 @@
|
|||||||
randomizedDelaySec = "45min";
|
randomizedDelaySec = "45min";
|
||||||
};
|
};
|
||||||
|
|
||||||
nix.gc = {
|
|
||||||
automatic = true;
|
|
||||||
dates = "10:00";
|
|
||||||
randomizedDelaySec = "45min";
|
|
||||||
options = "--delete-older-than 14d";
|
|
||||||
};
|
|
||||||
nix.settings.auto-optimise-store = 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
|
||||||
# on your system were taken. It‘s perfectly fine and recommended to leave
|
# on your system were taken. It‘s perfectly fine and recommended to leave
|
||||||
|
@ -42,6 +42,7 @@
|
|||||||
# environment.
|
# environment.
|
||||||
home.packages = with pkgs; [
|
home.packages = with pkgs; [
|
||||||
unzip
|
unzip
|
||||||
|
rustup
|
||||||
nextcloud-client
|
nextcloud-client
|
||||||
firefox
|
firefox
|
||||||
thunderbird
|
thunderbird
|
||||||
@ -50,6 +51,9 @@
|
|||||||
prismlauncher
|
prismlauncher
|
||||||
steam
|
steam
|
||||||
blender
|
blender
|
||||||
|
flip-link
|
||||||
|
bacon
|
||||||
|
probe-rs
|
||||||
betaflight-configurator
|
betaflight-configurator
|
||||||
loudgain
|
loudgain
|
||||||
youtube-dl
|
youtube-dl
|
||||||
@ -60,11 +64,6 @@
|
|||||||
sops
|
sops
|
||||||
pwvucontrol
|
pwvucontrol
|
||||||
qpwgraph
|
qpwgraph
|
||||||
(pkgs.discord.override {
|
|
||||||
withOpenASAR = true;
|
|
||||||
withVencord = true;
|
|
||||||
})
|
|
||||||
vesktop
|
|
||||||
];
|
];
|
||||||
|
|
||||||
home.sessionVariables = {
|
home.sessionVariables = {
|
||||||
@ -77,10 +76,4 @@
|
|||||||
|
|
||||||
# Let Home Manager install and manage itself.
|
# Let Home Manager install and manage itself.
|
||||||
programs.home-manager.enable = true;
|
programs.home-manager.enable = true;
|
||||||
|
|
||||||
programs.direnv = {
|
|
||||||
enable = true;
|
|
||||||
enableBashIntegration = true;
|
|
||||||
enableZshIntegration = true;
|
|
||||||
};
|
|
||||||
}
|
}
|
||||||
|
@ -3,69 +3,7 @@
|
|||||||
pkgs,
|
pkgs,
|
||||||
lib,
|
lib,
|
||||||
...
|
...
|
||||||
}: let
|
}: {
|
||||||
schema = "org.gnome.desktop.a11y.applications";
|
|
||||||
key = "screen-keyboard-enabled";
|
|
||||||
|
|
||||||
squeekboard_toggle = pkgs.writeShellScriptBin "squeekboard_toggle" ''
|
|
||||||
if [ "$(gsettings get ${schema} ${key})" == "true" ]; then
|
|
||||||
gsettings set ${schema} ${key} false
|
|
||||||
else
|
|
||||||
gsettings set ${schema} ${key} true
|
|
||||||
fi
|
|
||||||
'';
|
|
||||||
|
|
||||||
squeekboard_format = pkgs.writeShellScriptBin "squeekboard_format" ''
|
|
||||||
if [ "$(gsettings get ${schema} ${key})" == "true" ]; then
|
|
||||||
echo '{ "text": "", "tooltip": "enabled", "percentage": 100 }'
|
|
||||||
else
|
|
||||||
echo '{ "text": "", "tooltip": "disabled", "percentage": 0 }'
|
|
||||||
fi
|
|
||||||
'';
|
|
||||||
|
|
||||||
rotate_lisgd = pkgs.writeShellScriptBin "rotate_lisgd" ''
|
|
||||||
# PREV_ORIENTATION and ORIENTATION are given by rot8
|
|
||||||
|
|
||||||
LISGD_INPUT=/dev/input/by-path/platform-AMDI0010:02-event
|
|
||||||
# open nwggrid (Meta+D) by swiping up from the bottom edge
|
|
||||||
LISGD_ACTIONS=("1,DU,B,*,R,${pkgs.ydotool}/bin/ydotool key 125:1 32:1 32:0 125:0")
|
|
||||||
# close window (Meta+Shift+Q) by swiping down with 3 fingers
|
|
||||||
LISGD_ACTIONS+=("3,UD,*,L,R,${pkgs.ydotool}/bin/ydotool key 125:1 42:1 16:1 16:0 42:0 125:0")
|
|
||||||
|
|
||||||
# move window left (Meta+Shift+H) by swiping left with 2 fingers
|
|
||||||
LISGD_ACTIONS+=("2,UD,*,*,R,${pkgs.ydotool}/bin/ydotool key 125:1 42:1 35:1 35:0 42:0 125:0")
|
|
||||||
# move window down (Meta+Shift+J) by swiping down with 2 fingers
|
|
||||||
LISGD_ACTIONS+=("2,UD,*,*,R,${pkgs.ydotool}/bin/ydotool key 125:1 42:1 36:1 36:0 42:0 125:0")
|
|
||||||
# move window up (Meta+Shift+K) by swiping up with 2 fingers
|
|
||||||
LISGD_ACTIONS+=("2,UD,*,*,R,${pkgs.ydotool}/bin/ydotool key 125:1 42:1 37:1 37:0 42:0 125:0")
|
|
||||||
# move window right (Meta+Shift+L) by swiping right with 2 fingers
|
|
||||||
LISGD_ACTIONS+=("2,UD,*,*,R,${pkgs.ydotool}/bin/ydotool key 125:1 42:1 38:1 38:0 42:0 125:0")
|
|
||||||
|
|
||||||
LISGD_ACTION_OPTIONS=()
|
|
||||||
for str in "''${LISGD_ACTIONS[@]}"; do
|
|
||||||
LISGD_ACTION_OPTIONS+=("-g" "$str")
|
|
||||||
done
|
|
||||||
|
|
||||||
${pkgs.killall}/bin/killall lisgd
|
|
||||||
|
|
||||||
${pkgs.lisgd}/bin/lisgd -v -d "$LISGD_INPUT" "''${LISGD_ACTION_OPTIONS[@]}" &
|
|
||||||
'';
|
|
||||||
|
|
||||||
# bash script to let dbus know about impotant env variables and
|
|
||||||
# propagate them to relevent services run at the end of sway config
|
|
||||||
dbus-sway-environment = pkgs.writeShellScriptBin "dbus-sway-environment" ''
|
|
||||||
dbus-update-activation-environment --systemd WAYLAND_DISPLAY XDG_CURRENT_DESKTOP=sway
|
|
||||||
systemctl --user stop pipewire pipewire-media-session xdg-desktop-portal xdg-desktop-portal-wlr
|
|
||||||
systemctl --user start pipewire pipewire-media-session xdg-desktop-portal xdg-desktop-portal-wlr
|
|
||||||
'';
|
|
||||||
|
|
||||||
# currently, there is some friction between sway and gtk:
|
|
||||||
# https://github.com/swaywm/sway/wiki/GTK-3-settings-on-Wayland
|
|
||||||
configure-gtk = pkgs.writeShellScriptBin "configure-gtk" ''
|
|
||||||
gnome_schema=org.gnome.desktop.interface
|
|
||||||
gsettings set $gnome_schema gtk-theme 'Dracula'
|
|
||||||
'';
|
|
||||||
in {
|
|
||||||
home.packages = with pkgs; [
|
home.packages = with pkgs; [
|
||||||
waybar # status bar
|
waybar # status bar
|
||||||
swaylock # screen locking
|
swaylock # screen locking
|
||||||
@ -157,7 +95,7 @@ in {
|
|||||||
# custom pause mode similar to typical system shutdown menus
|
# custom pause mode similar to typical system shutdown menus
|
||||||
"${modifier}+F12" = "mode pause-break";
|
"${modifier}+F12" = "mode pause-break";
|
||||||
};
|
};
|
||||||
menu = "${pkgs.nwg-launchers}/bin/nwggrid -client";
|
menu = "${pkgs.tofi}/bin/tofi-drun | ${pkgs.findutils}/bin/xargs swaymsg exec --";
|
||||||
|
|
||||||
# use foot as default terminal
|
# use foot as default terminal
|
||||||
terminal = "foot";
|
terminal = "foot";
|
||||||
@ -185,16 +123,11 @@ in {
|
|||||||
};
|
};
|
||||||
|
|
||||||
startup = [
|
startup = [
|
||||||
{command = "${dbus-sway-environment}/bin/dbus-sway-environment";}
|
{command = "dbus-sway-environment";}
|
||||||
{command = "${configure-gtk}/bin/configure-gtk";}
|
{command = "configure-gtk";}
|
||||||
{command = "${pkgs.squeekboard}/bin/squeekboard";}
|
|
||||||
{command = "${pkgs.rot8}/bin/rot8 -n 10 -h ${rotate_lisgd}/bin/rotate_lisgd";}
|
|
||||||
{command = "${rotate_lisgd}/bin/rotate_lisgd";}
|
|
||||||
{command = "${pkgs.nwg-launchers}/bin/nwggrid-server -fp";}
|
|
||||||
{command = "${pkgs.keepassxc}/bin/keepassxc";}
|
{command = "${pkgs.keepassxc}/bin/keepassxc";}
|
||||||
{command = "${pkgs.waybar}/bin/waybar";}
|
{command = "${pkgs.waybar}/bin/waybar";}
|
||||||
{command = "${pkgs.foot}/bin/foot -a foot-startup";}
|
{command = "${pkgs.foot}/bin/foot -a foot-startup";}
|
||||||
{command = "${pkgs.networkmanagerapplet}/bin/nm-applet";}
|
|
||||||
];
|
];
|
||||||
|
|
||||||
defaultWorkspace = "main";
|
defaultWorkspace = "main";
|
||||||
@ -270,11 +203,6 @@ in {
|
|||||||
};
|
};
|
||||||
window.titlebar = false;
|
window.titlebar = false;
|
||||||
};
|
};
|
||||||
|
|
||||||
extraConfig = ''
|
|
||||||
bindswitch --reload --locked lid:on exec "[ $(${pkgs.sway}/bin/swaymsg -t get_outputs | ${pkgs.jq}/bin/jq '. | length') -gt 1 ] && ${pkgs.sway}/bin/swaymsg output eDP-1 disable"
|
|
||||||
bindswitch --reload --locked lid:off output eDP-1 enable
|
|
||||||
'';
|
|
||||||
};
|
};
|
||||||
|
|
||||||
programs.waybar = {
|
programs.waybar = {
|
||||||
@ -286,7 +214,7 @@ in {
|
|||||||
height = 26;
|
height = 26;
|
||||||
modules-left = ["sway/workspaces" "sway/mode"];
|
modules-left = ["sway/workspaces" "sway/mode"];
|
||||||
modules-center = ["sway/window"];
|
modules-center = ["sway/window"];
|
||||||
modules-right = ["mpd" "tray" "custom/squeekboard" "sway/language" "clock" "backlight" "battery" "network"];
|
modules-right = ["mpd" "tray" "sway/language" "clock" "backlight" "battery" "network"];
|
||||||
|
|
||||||
"sway/workspaces" = {
|
"sway/workspaces" = {
|
||||||
disable-scroll = true;
|
disable-scroll = true;
|
||||||
@ -304,7 +232,7 @@ in {
|
|||||||
};
|
};
|
||||||
|
|
||||||
"mpd" = {
|
"mpd" = {
|
||||||
format = "{stateIcon}{consumeIcon}{randomIcon}{repeatIcon}{singleIcon} {title} ({elapsedTime:%M:%S}/{totalTime:%M:%S}) {volume}";
|
format = "{stateIcon}{consumeIcon}{randomIcon}{repeatIcon}{singleIcon} {title} ({elapsedTime:%M:%S}/{totalTime:%M%S}) {volume}";
|
||||||
format-stopped = "{stateIcon}{randomIcon}{repeatIcon}{singleIcon} Stopped {volume}";
|
format-stopped = "{stateIcon}{randomIcon}{repeatIcon}{singleIcon} Stopped {volume}";
|
||||||
format-disconnected = "";
|
format-disconnected = "";
|
||||||
unkown-tag = "N/A";
|
unkown-tag = "N/A";
|
||||||
@ -336,15 +264,6 @@ in {
|
|||||||
spacing = 10;
|
spacing = 10;
|
||||||
};
|
};
|
||||||
|
|
||||||
"custom/squeekboard" = {
|
|
||||||
format = "{}";
|
|
||||||
exec = "${squeekboard_format}/bin/squeekboard_format";
|
|
||||||
return-type = "json";
|
|
||||||
exec-on-event = true;
|
|
||||||
interval = 2;
|
|
||||||
on-click = "${squeekboard_toggle}/bin/squeekboard_toggle";
|
|
||||||
};
|
|
||||||
|
|
||||||
"sway/language" = {
|
"sway/language" = {
|
||||||
format = "{shortDescription}";
|
format = "{shortDescription}";
|
||||||
tooltip = false;
|
tooltip = false;
|
||||||
@ -409,30 +328,6 @@ in {
|
|||||||
"${pkgs.sway}/bin/swaymsg workspace 5, move workspace to DP-4"
|
"${pkgs.sway}/bin/swaymsg workspace 5, move workspace to DP-4"
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
dock_luhbots2 = {
|
|
||||||
outputs = [
|
|
||||||
{
|
|
||||||
criteria = "eDP-1";
|
|
||||||
position = "1080,1080";
|
|
||||||
}
|
|
||||||
{
|
|
||||||
criteria = "Dell Inc. DELL U2422HE 8YCPH83";
|
|
||||||
position = "1080,0";
|
|
||||||
}
|
|
||||||
{
|
|
||||||
criteria = "NEC Corporation E243WMi 59118576NB";
|
|
||||||
transform = "90";
|
|
||||||
position = "0,0";
|
|
||||||
}
|
|
||||||
];
|
|
||||||
exec = [
|
|
||||||
"${pkgs.sway}/bin/swaymsg workspace 1, move workspace to DP-4"
|
|
||||||
"${pkgs.sway}/bin/swaymsg workspace 2, move workspace to DP-5"
|
|
||||||
"${pkgs.sway}/bin/swaymsg workspace 3, move workspace to eDP-1"
|
|
||||||
"${pkgs.sway}/bin/swaymsg workspace 4, move workspace to eDP-1"
|
|
||||||
"${pkgs.sway}/bin/swaymsg workspace 5, move workspace to DP-4"
|
|
||||||
];
|
|
||||||
};
|
|
||||||
laptop_hannspree = {
|
laptop_hannspree = {
|
||||||
outputs = [
|
outputs = [
|
||||||
{
|
{
|
||||||
|
@ -40,14 +40,6 @@ window#waybar {
|
|||||||
padding-right: 3px;
|
padding-right: 3px;
|
||||||
}
|
}
|
||||||
|
|
||||||
#custom-squeekboard {
|
|
||||||
border-width: 1px;
|
|
||||||
border-style: none none none solid;
|
|
||||||
border-color: #444444;
|
|
||||||
padding-left: 10px;
|
|
||||||
padding-right: 10px;
|
|
||||||
}
|
|
||||||
|
|
||||||
#language {
|
#language {
|
||||||
border-width: 1px;
|
border-width: 1px;
|
||||||
border-style: none none none solid;
|
border-style: none none none solid;
|
||||||
|
@ -74,6 +74,4 @@
|
|||||||
enableZshIntegration = true;
|
enableZshIntegration = true;
|
||||||
options = ["--cmd cd"];
|
options = ["--cmd cd"];
|
||||||
};
|
};
|
||||||
|
|
||||||
home.packages = with pkgs; [neovim];
|
|
||||||
}
|
}
|
||||||
|
Binary file not shown.
@ -4,24 +4,39 @@
|
|||||||
pkgs,
|
pkgs,
|
||||||
...
|
...
|
||||||
}: let
|
}: let
|
||||||
themeEnv = ''
|
swayConfig = pkgs.writeText "greetd-sway-config" ''
|
||||||
export XDG_DATA_DIRS="${pkgs.whitesur-gtk-theme}/share:$XDG_DATA_DIRS"
|
input * {
|
||||||
export XDG_DATA_DIRS="${pkgs.whitesur-icon-theme}/share:$XDG_DATA_DIRS"
|
xkb_layout "de"
|
||||||
export XDG_DATA_DIRS="${pkgs.whitesur-cursors}/share:$XDG_DATA_DIRS"
|
xkb_options "caps:ctrl_modifier"
|
||||||
|
xkb_numlock "enable"
|
||||||
|
}
|
||||||
|
input "type:touchpad" {
|
||||||
|
tap "enable"
|
||||||
|
natural_scroll "enable"
|
||||||
|
}
|
||||||
|
|
||||||
|
exec dbus-sway-environment
|
||||||
|
exec configure-gtk
|
||||||
|
# `-l` activates layer-shell mode. Notice that `swaymsg exit` will run after gtkgreet.
|
||||||
|
exec "${pkgs.greetd.regreet}/bin/regreet; swaymsg exit"
|
||||||
|
bindsym Mod4+shift+e exec swaynag \
|
||||||
|
-t warning \
|
||||||
|
-m 'What do you want to do?' \
|
||||||
|
-b 'Poweroff' 'systemctl poweroff' \
|
||||||
|
-b 'Reboot' 'systemctl reboot'
|
||||||
'';
|
'';
|
||||||
in {
|
in {
|
||||||
environment.extraInit = themeEnv;
|
|
||||||
programs.regreet = {
|
programs.regreet = {
|
||||||
enable = true;
|
enable = true;
|
||||||
settings = {
|
settings = {
|
||||||
background = {
|
background = {
|
||||||
fit = "Contain";
|
fit = "Containe";
|
||||||
path = "/home/max/Documents/Blender/desktop background Informatiker/render 4K new color.png";
|
path = "~/Documents/Blender/desktop background Informatiker/render 4K new color.png";
|
||||||
};
|
};
|
||||||
gtk = {
|
gtk = {
|
||||||
application_prefer_dark_theme = true;
|
application_prefer_dark_theme = true;
|
||||||
cursor_theme_name = "capitaine-cursors-white";
|
cursor_theme_name = "capitaine-cursors-white";
|
||||||
font_name = "FiraCode Nerd Font 20";
|
font_name = "FiraCode Nerd Font";
|
||||||
icon_theme_name = "WhiteSur-dark";
|
icon_theme_name = "WhiteSur-dark";
|
||||||
theme_name = "WhiteSur-Dark";
|
theme_name = "WhiteSur-Dark";
|
||||||
};
|
};
|
||||||
@ -38,15 +53,17 @@ in {
|
|||||||
extraGroups = [];
|
extraGroups = [];
|
||||||
};
|
};
|
||||||
|
|
||||||
services.greetd.enable = true;
|
services.greetd = {
|
||||||
|
enable = true;
|
||||||
|
settings = {
|
||||||
|
initial_session = {
|
||||||
|
command = "${pkgs.sway}/bin/sway --config ${swayConfig}";
|
||||||
|
user = "greeter";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
environment.etc."greetd/environments".text = ''
|
environment.etc."greetd/environments".text = ''
|
||||||
sway
|
sway
|
||||||
'';
|
'';
|
||||||
|
|
||||||
environment.systemPackages = with pkgs; [
|
|
||||||
whitesur-gtk-theme
|
|
||||||
whitesur-icon-theme
|
|
||||||
whitesur-cursors
|
|
||||||
];
|
|
||||||
}
|
}
|
||||||
|
@ -1,40 +1,45 @@
|
|||||||
{pkgs, ...}: let
|
{pkgs, ...}: let
|
||||||
# script for rebuilding nixos
|
# script for rebuilding nixos
|
||||||
rebuild = pkgs.writeShellScriptBin "rebuild" ''
|
rebuild = pkgs.writeTextFile {
|
||||||
# A rebuild script that commits on a successful build
|
name = "rebuild";
|
||||||
set -e
|
destination = "/bin/rebuild";
|
||||||
|
executable = true;
|
||||||
|
text = ''
|
||||||
|
#!${pkgs.bash}/bin/bash
|
||||||
|
|
||||||
# cd to your config dir
|
# A rebuild script that commits on a successful build
|
||||||
pushd ~/dotfiles/nixos
|
set -e
|
||||||
|
|
||||||
# Edit your config
|
# cd to your config dir
|
||||||
$EDITOR
|
pushd ~/dotfiles/nixos
|
||||||
|
|
||||||
# Autoformat your nix files
|
# Edit your config
|
||||||
${pkgs.alejandra}/bin/alejandra . #&>/dev/null
|
$EDITOR
|
||||||
|
|
||||||
# Shows your changes
|
# Autoformat your nix files
|
||||||
${pkgs.git}/bin/git diff -U0 *.nix
|
${pkgs.alejandra}/bin/alejandra . #&>/dev/null
|
||||||
|
|
||||||
echo "NixOS Rebuilding..."
|
# Shows your changes
|
||||||
|
${pkgs.git}/bin/git diff -U0 *.nix
|
||||||
|
|
||||||
# echo using sudo so we get feedback after unlocking
|
echo "NixOS Rebuilding..."
|
||||||
sudo echo "Beginning rebuild"
|
|
||||||
# Rebuild, output simplified errors, log trackebacks
|
|
||||||
sudo nixos-rebuild switch &>nixos-switch.log || (${pkgs.coreutils}/bin/cat nixos-switch.log | ${pkgs.gnugrep}/bin/grep --color error && false)
|
|
||||||
|
|
||||||
# Get current generation metadata
|
# Rebuild, output simplified errors, log trackebacks
|
||||||
current=$(nixos-rebuild list-generations | ${pkgs.gnugrep}/bin/grep current)
|
sudo nixos-rebuild switch &>nixos-switch.log || (${pkgs.coreutils}/bin/cat nixos-switch.log | ${pkgs.gnugrep}/bin/grep --color error && false)
|
||||||
|
|
||||||
# Commit all changes with the gereation metadata
|
# Get current generation metadata
|
||||||
${pkgs.git}/bin/git commit -am "$current"
|
current=$(nixos-rebuild list-generations | ${pkgs.gnugrep}/bin/grep current)
|
||||||
|
|
||||||
# Back to where you were
|
# Commit all changes with the gereation metadata
|
||||||
popd
|
${pkgs.git}/bin/git commit -am "$current"
|
||||||
|
|
||||||
# Notify all OK!
|
# Back to where you were
|
||||||
${pkgs.libnotify}/bin/notify-send -e "NixOS Rebuilt OK!" --icon=software-update-available
|
popd
|
||||||
'';
|
|
||||||
|
# Notify all OK!
|
||||||
|
${pkgs.libnotify}/bin/notify-send -e "NixOS Rebuilt OK!" --icon=software-update-available
|
||||||
|
'';
|
||||||
|
};
|
||||||
in {
|
in {
|
||||||
environment.systemPackages = [rebuild];
|
environment.systemPackages = [rebuild];
|
||||||
}
|
}
|
||||||
|
@ -1,34 +0,0 @@
|
|||||||
{sops, ...}: {
|
|
||||||
sops = {
|
|
||||||
age.keyFile = /home/max/.config/sops/age/keys.txt;
|
|
||||||
secrets = {
|
|
||||||
"home/ssid" = {
|
|
||||||
sopsFile = ../../secrets/wifi.yaml;
|
|
||||||
};
|
|
||||||
"home/psk" = {
|
|
||||||
sopsFile = ../../secrets/wifi.yaml;
|
|
||||||
};
|
|
||||||
"parents/ssid" = {
|
|
||||||
sopsFile = ../../secrets/wifi.yaml;
|
|
||||||
};
|
|
||||||
"parents/psk" = {
|
|
||||||
sopsFile = ../../secrets/wifi.yaml;
|
|
||||||
};
|
|
||||||
"eduroam/ident" = {
|
|
||||||
sopsFile = ../../secrets/wifi.yaml;
|
|
||||||
};
|
|
||||||
"eduroam/psk" = {
|
|
||||||
sopsFile = ../../secrets/wifi.yaml;
|
|
||||||
};
|
|
||||||
"luhbots/ssid" = {
|
|
||||||
sopsFile = ../../secrets/wifi.yaml;
|
|
||||||
};
|
|
||||||
"luhbots/ssid5" = {
|
|
||||||
sopsFile = ../../secrets/wifi.yaml;
|
|
||||||
};
|
|
||||||
"luhbots/psk" = {
|
|
||||||
sopsFile = ../../secrets/wifi.yaml;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
|
||||||
}
|
|
@ -3,9 +3,39 @@
|
|||||||
pkgs,
|
pkgs,
|
||||||
lib,
|
lib,
|
||||||
...
|
...
|
||||||
}: {
|
}: let
|
||||||
|
# bash script to let dbus know about impotant env variables and
|
||||||
|
# propagate them to relevent services run at the end of sway config
|
||||||
|
dbus-sway-environment = pkgs.writeTextFile {
|
||||||
|
name = "dubs-sway-environment";
|
||||||
|
destination = "/bin/dbus-sway-environment";
|
||||||
|
executable = true;
|
||||||
|
text = ''
|
||||||
|
dbus-update-activation-environment --systemd WAYLAND_DISPLAY XDG_CURRENT_DESKTOP=sway
|
||||||
|
systemctl --user stop pipewire pipewire-media-session xdg-desktop-portal xdg-desktop-portal-wlr
|
||||||
|
systemctl --user start pipewire pipewire-media-session xdg-desktop-portal xdg-desktop-portal-wlr
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
|
||||||
|
# currently, there is some friction between sway and gtk:
|
||||||
|
# https://github.com/swaywm/sway/wiki/GTK-3-settings-on-Wayland
|
||||||
|
configure-gtk = pkgs.writeTextFile {
|
||||||
|
name = "configure-gtk";
|
||||||
|
destination = "/bin/configure-gtk";
|
||||||
|
executable = true;
|
||||||
|
text = let
|
||||||
|
schema = pkgs.gsettings-desktop-schemas;
|
||||||
|
datadir = "${schema}/share/gsettings-schemas/${schema.name}";
|
||||||
|
in ''
|
||||||
|
gnome_schema=org.gnome.desktop.interface
|
||||||
|
gsettings set $gnome_schema gtk-theme 'Dracula'
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
in {
|
||||||
environment.systemPackages = with pkgs; [
|
environment.systemPackages = with pkgs; [
|
||||||
dbus # make dbus-update-activation-environment available in the path
|
dbus # make dbus-update-activation-environment available in the path
|
||||||
|
dbus-sway-environment
|
||||||
|
configure-gtk
|
||||||
wayland
|
wayland
|
||||||
xdg-utils # for opening default programs when clicking links
|
xdg-utils # for opening default programs when clicking links
|
||||||
glib # gsettings
|
glib # gsettings
|
||||||
@ -58,6 +88,4 @@
|
|||||||
|
|
||||||
# make swaylock work
|
# make swaylock work
|
||||||
security.pam.services.swaylock = {};
|
security.pam.services.swaylock = {};
|
||||||
|
|
||||||
users.extraUsers.max.extraGroups = ["input"];
|
|
||||||
}
|
}
|
||||||
|
@ -1,106 +1,32 @@
|
|||||||
{
|
{config, ...}: {
|
||||||
config,
|
sops.secrets."wireless.env" = {};
|
||||||
pkgs,
|
networking.wireless = {
|
||||||
...
|
enable = true;
|
||||||
}: {
|
userControlled.enable = true;
|
||||||
sops.templates = let
|
environmentFile = config.sops.secrets."wireless.env".path;
|
||||||
placeholder = config.sops.placeholder;
|
networks = {
|
||||||
in {
|
"@home_uuid@" = {
|
||||||
"home.nmconnection".content = ''
|
psk = "@home_psk@";
|
||||||
[connection]
|
priority = 10;
|
||||||
id=${placeholder."home/ssid"}
|
};
|
||||||
type=wifi
|
"@par_uuid@" = {
|
||||||
autoconnect-priority=10
|
psk = "@par_psk@";
|
||||||
|
priority = 10;
|
||||||
[wifi]
|
};
|
||||||
mode=infrastructure
|
"@luhbots_uuid@" = {
|
||||||
ssid=${placeholder."home/ssid"}
|
psk = "@luhbots_psk@";
|
||||||
|
priority = 5;
|
||||||
[wifi-security]
|
};
|
||||||
key-mgmt=wpa-psk
|
eduroam = {
|
||||||
psk=${placeholder."home/psk"}
|
auth = ''
|
||||||
'';
|
key_mgmt=WPA-EAP
|
||||||
"parents.nmconnection".content = ''
|
eap=PWD
|
||||||
[connection]
|
identity="@eduroam_ident@"
|
||||||
id=${placeholder."parents/ssid"}
|
password="@eduroam_psk@"
|
||||||
type=wifi
|
'';
|
||||||
autoconnect-priority=10
|
priority = 0;
|
||||||
|
};
|
||||||
[wifi]
|
};
|
||||||
mode=infrastructure
|
|
||||||
ssid=${placeholder."parents/ssid"}
|
|
||||||
|
|
||||||
[wifi-security]
|
|
||||||
key-mgmt=wpa-psk
|
|
||||||
psk=${placeholder."parents/psk"}
|
|
||||||
'';
|
|
||||||
"eduroam.nmconnection".content = ''
|
|
||||||
[connection]
|
|
||||||
id=eduroam
|
|
||||||
type=wifi
|
|
||||||
autoconnect-priority=0
|
|
||||||
|
|
||||||
[wifi]
|
|
||||||
mode=infrastructure
|
|
||||||
ssid=eduroam
|
|
||||||
|
|
||||||
[wifi-security]
|
|
||||||
auth-alg=open
|
|
||||||
key-mgmt=wpa-eap
|
|
||||||
|
|
||||||
[802-1x]
|
|
||||||
anonymous-identity=anonymous@uni-hannover.de
|
|
||||||
ca-cert=${./T-TeleSec_GlobalRoot_Class_2.crt}
|
|
||||||
domain-suffix-match=radius-dfn.luis.uni-hannover.de
|
|
||||||
eap=ttls;
|
|
||||||
identity=${placeholder."eduroam/ident"}
|
|
||||||
password=${placeholder."eduroam/psk"}
|
|
||||||
phase2-auth=mschapv2
|
|
||||||
'';
|
|
||||||
"luhbots.nmconnection".content = ''
|
|
||||||
[connection]
|
|
||||||
id=${placeholder."luhbots/ssid"}
|
|
||||||
type=wifi
|
|
||||||
autoconnect-priority=5
|
|
||||||
|
|
||||||
[wifi]
|
|
||||||
mode=infrastructure
|
|
||||||
ssid=${placeholder."luhbots/ssid"}
|
|
||||||
autoconnect-priority=0
|
|
||||||
|
|
||||||
[wifi-security]
|
|
||||||
key-mgmt=wpa-psk
|
|
||||||
psk=${placeholder."luhbots/psk"}
|
|
||||||
'';
|
|
||||||
"luhbots5.nmconnection".content = ''
|
|
||||||
[connection]
|
|
||||||
id=${placeholder."luhbots/ssid5"}
|
|
||||||
type=wifi
|
|
||||||
autoconnect-priority=10
|
|
||||||
|
|
||||||
[wifi]
|
|
||||||
mode=infrastructure
|
|
||||||
ssid=${placeholder."luhbots/ssid5"}
|
|
||||||
autoconnect-priority=0
|
|
||||||
|
|
||||||
[wifi-security]
|
|
||||||
key-mgmt=wpa-psk
|
|
||||||
psk=${placeholder."luhbots/psk"}
|
|
||||||
'';
|
|
||||||
};
|
};
|
||||||
environment.etc = let
|
users.extraUsers.max.extraGroups = ["wheel"];
|
||||||
template = config.sops.templates;
|
|
||||||
base = "NetworkManager/system-connections";
|
|
||||||
in {
|
|
||||||
"${base}/home.nmconnection".source = template."home.nmconnection".path;
|
|
||||||
"${base}/parents.nmconnection".source = template."parents.nmconnection".path;
|
|
||||||
"${base}/eduroam.nmconnection".source = template."eduroam.nmconnection".path;
|
|
||||||
"${base}/luhbots.nmconnection".source = template."luhbots.nmconnection".path;
|
|
||||||
"${base}/luhbots5.nmconnection".source = template."luhbots5.nmconnection".path;
|
|
||||||
};
|
|
||||||
networking.networkmanager.enable = true;
|
|
||||||
|
|
||||||
environment.systemPackages = with pkgs; [
|
|
||||||
nm-tray
|
|
||||||
];
|
|
||||||
}
|
}
|
||||||
|
@ -1,16 +1,4 @@
|
|||||||
home:
|
wireless.env: ENC[AES256_GCM,data:JSJjKuLsEz7niHs1tOJP0a11Hn2rWw8b671v6Fmq/8Gx+z4Pbz4ndwnsuJOK1fWN0LILCUmKr0pKOIoF+iDWPHJLN0j7iRGQui1AMC10a6uOhCqe0ILPdcGLqIbbo3jEn3/64L4qCVkC7nfHWoOH5v9ccTpPSi90tfLFc/SCqUpeoF0o26v+edxqyEkN+eI01S4vBy7TWijL30BYOiCAI3Q8PDQ7YKwHQukRyApLI2F1DYl0YW/BXOwqvuAvcejXYsM2/Abl0zLnRClTj7War0PS7svVGIzE,iv:ZTI9d/usa4oEWWJ3n3VBmeX3uMuJbuHBxL7ds/dkxZM=,tag:h0c0jvddS0RA2NkQBl3/AQ==,type:str]
|
||||||
ssid: ENC[AES256_GCM,data:i76d33GIysjSY2k=,iv:34g02nNL5xYXx0PpN49u4xVHzfraTMtAqC4w4oxLBao=,tag:Y3g8kzhPF5LJuaxFq7jd3w==,type:str]
|
|
||||||
psk: ENC[AES256_GCM,data:bb25mbWgCBvwEvKr4sRRXg==,iv:+oNkqdk0bEP1l1e+HpSveRrxJI8OfQtBVcQ5476kMLU=,tag:vdWSVd5pIRGab+lzP4oFHg==,type:str]
|
|
||||||
parents:
|
|
||||||
ssid: ENC[AES256_GCM,data:NZEKQ2N1sC0=,iv:vvsnsH3lYbtXwSnQuInhceiE19Z+ZNszB20TL9BF40g=,tag:5YOljSW9Hht+MCNKhss/Sw==,type:str]
|
|
||||||
psk: ENC[AES256_GCM,data:gjpdj21uLDiY,iv:k1RH2ybRkJccEqjkdv1Tz+qLS2EdGWdn+jRkUcTDLtY=,tag:IuwgoHt//GvyWVvDI2C/2g==,type:str]
|
|
||||||
luhbots:
|
|
||||||
ssid5: ENC[AES256_GCM,data:Bo0aJge7ZkrUhhA=,iv:1EmjRy1xK73xwhE+orUi2HLM9fM2zKxpxDHQnQgEdP0=,tag:P6PSTd34VByQEAhVGbXdNg==,type:str]
|
|
||||||
ssid: ENC[AES256_GCM,data:MH0T/q45UCZL7w==,iv:SFwjqsojxvsu4k83mi69CypaAdzVhFXbebi9/wTsgaY=,tag:JxY5ftwiZp6jGM4ZxvpO/g==,type:str]
|
|
||||||
psk: ENC[AES256_GCM,data:Fg8aRzPc6F0=,iv:5Se6YLTRRAP0Gc4WKPQ4vQHlZcG5mqLLqVLzeEaW/sI=,tag:1Ppw5ZyDSCb0atF8/tnSxg==,type:str]
|
|
||||||
eduroam:
|
|
||||||
ident: ENC[AES256_GCM,data:PXY5jOJ36+ko+a0PmtxViPHv5GvBwfBD32A=,iv:i6uFlawX0nQ7T25MF2OgwgeW43jaB2Y8pNYx9NMAVTc=,tag:veYmEFGz30AbYuHuQdA01w==,type:str]
|
|
||||||
psk: ENC[AES256_GCM,data:AcC96tlKw9mKKdR3nW+5FA==,iv:c6Oly2tmIpLjzTZ1iMl6e9bxAz9r7l5zKpwf3UVBpJg=,tag:yZnNpf2d40eZ6L9OgOzYHQ==,type:str]
|
|
||||||
sops:
|
sops:
|
||||||
kms: []
|
kms: []
|
||||||
gcp_kms: []
|
gcp_kms: []
|
||||||
@ -26,8 +14,8 @@ sops:
|
|||||||
d0FZc0x5UVhPQ09xUE5Qa1A0QkExVmcKkcy1i+nME0uHlLy8vCu8vgqSuR+0NqaD
|
d0FZc0x5UVhPQ09xUE5Qa1A0QkExVmcKkcy1i+nME0uHlLy8vCu8vgqSuR+0NqaD
|
||||||
D+zKRKNdfJn1TLsoyDb4iDSeqp8nB9fZzQqIJshGRhlnqxuzIiYqqA==
|
D+zKRKNdfJn1TLsoyDb4iDSeqp8nB9fZzQqIJshGRhlnqxuzIiYqqA==
|
||||||
-----END AGE ENCRYPTED FILE-----
|
-----END AGE ENCRYPTED FILE-----
|
||||||
lastmodified: "2024-03-15T13:39:03Z"
|
lastmodified: "2024-03-08T22:34:29Z"
|
||||||
mac: ENC[AES256_GCM,data:fY0F6U2Vro76AunBcwA4RtCdH6ovtjWFmI5aaqePcLgWuyPFAcDESAtLFNL/83KARRIwHeO2a+Q2gkVHkI3TROyCoPx/LGpIFGWpm5OpSImtT5LPrvFsG0I8cSiXZ7sIIjGaBMNfRNN1YqnYGCwqA2zXyE3mbtpJoVqd0/hVpx8=,iv:T7SrzmPrb3zVT+xkGPaiGj7uL8y3arlfyEbnXmqZYkY=,tag:k228lcSejQGFQAvd7/6Bkg==,type:str]
|
mac: ENC[AES256_GCM,data:MPUKmmbm8aB0BV3yWTeEIAfDudRGo4GSW6LVNBMCVUp/GXNYw45C/w09/u2d6o1oBSIBOZP03mR18sSNpaz7t98iw+F5bArMqefP+nULdhz3D58Zqm8lcaSMVjqCOc8q1O2o/bbhiE3qXZoC2It85Xym1BiVO5fdbwFZVRPa3aY=,iv:Z7Cg8qQg1e3gMHITgU4TfQbBIEx8/9lyhiQVNuQ+/yA=,tag:n/1uaNgHmw7MheLz/+41nA==,type:str]
|
||||||
pgp: []
|
pgp: []
|
||||||
unencrypted_suffix: _unencrypted
|
unencrypted_suffix: _unencrypted
|
||||||
version: 3.8.1
|
version: 3.8.1
|
||||||
|
Loading…
x
Reference in New Issue
Block a user