Migrate to flake
This commit is contained in:
parent
7e24481850
commit
6cdbba8c60
42 changed files with 842 additions and 770 deletions
1
.gitignore
vendored
1
.gitignore
vendored
|
@ -1,2 +1 @@
|
||||||
/configuration.nix
|
|
||||||
/result
|
/result
|
||||||
|
|
|
@ -1,11 +0,0 @@
|
||||||
{ config, pkgs, ... }:
|
|
||||||
|
|
||||||
{
|
|
||||||
|
|
||||||
services.postgresql = {
|
|
||||||
enable = true;
|
|
||||||
package = pkgs.postgresql_12;
|
|
||||||
};
|
|
||||||
|
|
||||||
services.postgresqlBackup.enable = true;
|
|
||||||
}
|
|
|
@ -5,6 +5,7 @@
|
||||||
./greeter.nix
|
./greeter.nix
|
||||||
./hardware.nix
|
./hardware.nix
|
||||||
./office-suite.nix
|
./office-suite.nix
|
||||||
|
./security.nix
|
||||||
];
|
];
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -26,6 +26,8 @@
|
||||||
light.enable = true;
|
light.enable = true;
|
||||||
|
|
||||||
dconf.enable = true;
|
dconf.enable = true;
|
||||||
|
|
||||||
|
sway.enable = true;
|
||||||
};
|
};
|
||||||
|
|
||||||
services.gnome = {
|
services.gnome = {
|
||||||
|
@ -36,6 +38,7 @@
|
||||||
gnome-keyring.enable = true;
|
gnome-keyring.enable = true;
|
||||||
evolution-data-server.enable = true;
|
evolution-data-server.enable = true;
|
||||||
gnome-online-accounts.enable = true;
|
gnome-online-accounts.enable = true;
|
||||||
|
gnome-remote-desktop.enable = true;
|
||||||
|
|
||||||
sushi.enable = false;
|
sushi.enable = false;
|
||||||
};
|
};
|
||||||
|
@ -45,6 +48,7 @@
|
||||||
services.flatpak.enable = true;
|
services.flatpak.enable = true;
|
||||||
xdg.portal = {
|
xdg.portal = {
|
||||||
enable = true;
|
enable = true;
|
||||||
|
wlr.enable = true;
|
||||||
gtkUsePortal = false;
|
gtkUsePortal = false;
|
||||||
#extraPortals = [ pkgs.xdg-desktop-portal-gtk pkgs.xdg-desktop-portal-wlr ];
|
#extraPortals = [ pkgs.xdg-desktop-portal-gtk pkgs.xdg-desktop-portal-wlr ];
|
||||||
extraPortals = [ pkgs.xdg-desktop-portal-wlr ];
|
extraPortals = [ pkgs.xdg-desktop-portal-wlr ];
|
||||||
|
|
|
@ -59,5 +59,6 @@
|
||||||
};
|
};
|
||||||
|
|
||||||
programs.light.enable = true;
|
programs.light.enable = true;
|
||||||
|
programs.adb.enable = true;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,9 +0,0 @@
|
||||||
{ config, pkgs, lib, ... }: {
|
|
||||||
|
|
||||||
imports = [ <home-manager/nixos> ];
|
|
||||||
|
|
||||||
home-manager = {
|
|
||||||
useUserPackages = true;
|
|
||||||
useGlobalPkgs = true;
|
|
||||||
};
|
|
||||||
}
|
|
|
@ -1,4 +0,0 @@
|
||||||
{ pkgs, ... }: {
|
|
||||||
programs.adb.enable = true;
|
|
||||||
users.users.fhauser.extraGroups = [ "adbusers" ];
|
|
||||||
}
|
|
|
@ -1,118 +0,0 @@
|
||||||
{ config, pkgs, lib, ... }:
|
|
||||||
|
|
||||||
{
|
|
||||||
|
|
||||||
imports = [
|
|
||||||
./evolution.nix
|
|
||||||
./firefox.nix
|
|
||||||
./gpg.nix
|
|
||||||
./ssh.nix
|
|
||||||
./scripts.nix
|
|
||||||
./webapps.nix
|
|
||||||
./vim.nix
|
|
||||||
./git.nix
|
|
||||||
./waybar.nix
|
|
||||||
./psql.nix
|
|
||||||
./android-studio.nix
|
|
||||||
./mako.nix
|
|
||||||
./redshift.nix
|
|
||||||
./alacritty.nix
|
|
||||||
./shell.nix
|
|
||||||
./swaylock.nix
|
|
||||||
./kanshi.nix
|
|
||||||
./sway.nix
|
|
||||||
./android-studio.nix
|
|
||||||
];
|
|
||||||
home-manager.users.fhauser = { config, pkgs, ... }: {
|
|
||||||
services = {
|
|
||||||
network-manager-applet.enable = true;
|
|
||||||
nextcloud-client = {
|
|
||||||
enable = true;
|
|
||||||
startInBackground = true;
|
|
||||||
};
|
|
||||||
owncloud-client.enable = true;
|
|
||||||
pasystray.enable = true;
|
|
||||||
blueman-applet.enable = true;
|
|
||||||
};
|
|
||||||
|
|
||||||
home = {
|
|
||||||
packages = with pkgs;
|
|
||||||
[ # Networking
|
|
||||||
unison
|
|
||||||
transmission # GUI Tools, maybe extract...
|
|
||||||
] ++ [ # Desktop Environment Applications
|
|
||||||
google-chrome
|
|
||||||
chromium
|
|
||||||
#midori # TODO: Currently unused
|
|
||||||
#qutebrowser # TODO: Currently unused
|
|
||||||
synergy
|
|
||||||
#quicksynergy # Currently unused
|
|
||||||
nextcloud-client
|
|
||||||
owncloud-client
|
|
||||||
] ++ [ # office # TODO: Migrate to office.nix
|
|
||||||
# TODO: Build fails!
|
|
||||||
libreoffice-fresh # TODO: Dictionaries, nixos/nixpkgs#14430
|
|
||||||
# pdfgrep
|
|
||||||
# pdftk
|
|
||||||
# calibre
|
|
||||||
tectonic
|
|
||||||
# texstudio
|
|
||||||
# pandoc
|
|
||||||
# system-config-printer
|
|
||||||
# cups-pk-helper
|
|
||||||
# cups-bjnp
|
|
||||||
# gutenprint
|
|
||||||
# gutenprintBin
|
|
||||||
# hplipWithPlugin
|
|
||||||
simple-scan
|
|
||||||
gnome.gnome-online-accounts
|
|
||||||
gnome.gnome-control-center
|
|
||||||
] ++ [ # Communication
|
|
||||||
signal-desktop
|
|
||||||
tdesktop
|
|
||||||
discord
|
|
||||||
mattermost-desktop
|
|
||||||
# pidgin pidgin-otr pidgin-with-plugins #TODO: Pidgin needed?
|
|
||||||
#TODO: ekiga?
|
|
||||||
skype
|
|
||||||
slack
|
|
||||||
teams
|
|
||||||
jitsi-meet-electron
|
|
||||||
teamviewer
|
|
||||||
rdesktop
|
|
||||||
] ++ [ # Development
|
|
||||||
vscodium
|
|
||||||
gitlab-runner
|
|
||||||
docker-compose
|
|
||||||
vagrant
|
|
||||||
virt-manager
|
|
||||||
modemmanager # TODO: makes sense here?
|
|
||||||
modem-manager-gui
|
|
||||||
];
|
|
||||||
|
|
||||||
#TODO: Write module
|
|
||||||
activation.statefulConfigSymlinks =
|
|
||||||
config.lib.dag.entryAfter [ "writeBoundary" ] ''
|
|
||||||
set -eo pipefail
|
|
||||||
|
|
||||||
STATEFUL_CONFS=(
|
|
||||||
".config/spotify"
|
|
||||||
".mozilla"
|
|
||||||
".password-store"
|
|
||||||
)
|
|
||||||
for STATEFUL_CONF in ''${STATEFUL_CONFS[@]}; do
|
|
||||||
if [ -e "$STATEFUL_CONF" ] && [ ! -h "$STATEFUL_CONF" ]; then
|
|
||||||
echo "File $STATEFUL_CONF already exists, exiting!" >&2
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [ -h "$STATEFUL_CONF" ]; then
|
|
||||||
rm "$STATEFUL_CONF"
|
|
||||||
fi
|
|
||||||
|
|
||||||
$DRY_RUN_CMD ln -s $VERBOSE_ARG "$HOME/.stateful/$STATEFUL_CONF" "$HOME/$STATEFUL_CONF"
|
|
||||||
done
|
|
||||||
'';
|
|
||||||
};
|
|
||||||
};
|
|
||||||
}
|
|
|
@ -1,6 +0,0 @@
|
||||||
{ pkgs, ... }: {
|
|
||||||
home-manager.users.fhauser = {
|
|
||||||
dconf.settings."org/gnome/evolution-data-server/calendar".notify-enable-audio =
|
|
||||||
false;
|
|
||||||
};
|
|
||||||
}
|
|
|
@ -1,12 +0,0 @@
|
||||||
{ pkgs, ... }: {
|
|
||||||
home-manager.users.fhauser = {
|
|
||||||
programs.firefox = {
|
|
||||||
enable = true;
|
|
||||||
package = pkgs.firefox-wayland;
|
|
||||||
};
|
|
||||||
home.sessionVariables = {
|
|
||||||
MOZ_ENABLE_WAYLAND = "true";
|
|
||||||
MOZ_DBUS_REMOTE = "1";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
}
|
|
|
@ -1,171 +0,0 @@
|
||||||
{ pkgs, lib, config, ... }: {
|
|
||||||
|
|
||||||
# environment.systemPackages = with pkgs; [ polkit_gnome ]; #TODO: Needed?
|
|
||||||
programs.sway.enable = true;
|
|
||||||
xdg.portal.wlr.enable = true;
|
|
||||||
|
|
||||||
services.gnome.gnome-remote-desktop.enable = true;
|
|
||||||
#environment.systemPackages = with pkgs; [ pipewire ];
|
|
||||||
#systemd.user.services.pipewire.environment.XDG_CURRENT_DESKTOP = "sway";
|
|
||||||
#systemd.user.services.xdg-desktop-portal-wlr.environment.XDG_CURRENT_DESKTOP =
|
|
||||||
# "sway";
|
|
||||||
# systemd.user.services.xdg-desktop-portal-wlr.script = "${pkgs.xdg-desktop-portal-wlr}/libexec/xdg-desktop-portal-wlr";
|
|
||||||
# systemd.user.services.xdg-desktop-portal-wlr.scriptArgs = "--output=DP-1"; # TODO: Extract this *****
|
|
||||||
home-manager.users.fhauser = let
|
|
||||||
adhereTheSwayTarget = {
|
|
||||||
Install.WantedBy = lib.mkForce [ "sway-session.target" ];
|
|
||||||
Unit.PartOf = lib.mkForce [ "sway-session.target" ];
|
|
||||||
};
|
|
||||||
# TODO: active screen with -m $active_screen
|
|
||||||
bemenuLauncher = pkgs.writeScriptBin "bemenuLauncher" ''
|
|
||||||
#!${pkgs.stdenv.shell}
|
|
||||||
#active_screen=$(swaymsg -r -t get_outputs | \
|
|
||||||
# ${pkgs.jq}/bin/jq '. [] | select (.focused == true) | .name | split ("-") | last')
|
|
||||||
${pkgs.dmenu}/bin/dmenu_path | \
|
|
||||||
${pkgs.bemenu}/bin/bemenu --list 20 --ignorecase --prompt 'Start: ' | \
|
|
||||||
xargs swaymsg exec --
|
|
||||||
'';
|
|
||||||
homeManagerConfig = config.home-manager.users.fhauser;
|
|
||||||
in rec {
|
|
||||||
home.packages = with pkgs; [
|
|
||||||
sway-contrib.grimshot
|
|
||||||
wl-clipboard
|
|
||||||
libappindicator
|
|
||||||
gnome.defaultIconTheme
|
|
||||||
gnome2.gnome-icon-theme
|
|
||||||
hicolor-icon-theme # TODO: Move these requirements?
|
|
||||||
];
|
|
||||||
|
|
||||||
xsession.preferStatusNotifierItems = true;
|
|
||||||
|
|
||||||
wayland.windowManager.sway = {
|
|
||||||
enable = true;
|
|
||||||
systemdIntegration = true;
|
|
||||||
xwayland = true;
|
|
||||||
wrapperFeatures = { gtk = true; };
|
|
||||||
extraSessionCommands = ''
|
|
||||||
#export XDG_CURRENT_DESKTOP=Unity
|
|
||||||
export XDG_CURRENT_DESKTOP=sway
|
|
||||||
export XDG_SESSION_TYPE="wayland"
|
|
||||||
export _JAVA_AWT_WM_NONREPARENTING=1
|
|
||||||
export SSH_AUTH_SOCK=/run/user/1000/gnupg/S.gpg-agent.ssh # TODO: Migrate
|
|
||||||
export QT_QPA_PLATFORM=wayland
|
|
||||||
export QT_WAYLAND_DISABLE_WINDOWDECORATION="1"
|
|
||||||
# TODO: QTpie
|
|
||||||
export WLR_DRM_NO_MODIFIERS=1
|
|
||||||
export WLR_NO_HARDWARE_CURSORS=1
|
|
||||||
'';
|
|
||||||
config = {
|
|
||||||
input = {
|
|
||||||
"type:keyboard" = {
|
|
||||||
xkb_layout = "ch,de";
|
|
||||||
xkb_options = "eurosign:e";
|
|
||||||
};
|
|
||||||
"*" = { xkb_numlock = "enable"; };
|
|
||||||
};
|
|
||||||
terminal = "${pkgs.alacritty}/bin/alacritty";
|
|
||||||
menu = "${bemenuLauncher}/bin/bemenuLauncher";
|
|
||||||
gaps.inner = 8;
|
|
||||||
modifier = "Mod4";
|
|
||||||
window.border = 0;
|
|
||||||
#colors.focused.border = "#323232";
|
|
||||||
|
|
||||||
#TODO: Workspace Programm assignment: Not working properly
|
|
||||||
assigns = {
|
|
||||||
"10" = [{ app_id = "^firefox$"; }];
|
|
||||||
"11" = [{ app_id = "^(claws-mail|thunderbird|evolution)$"; }];
|
|
||||||
"12" = [{
|
|
||||||
class = "^Chromium-browser$";
|
|
||||||
instance = "^web.threema.ch";
|
|
||||||
}];
|
|
||||||
"13" = [{ class = "^Spotify$"; }];
|
|
||||||
};
|
|
||||||
|
|
||||||
keybindings = let
|
|
||||||
mod = wayland.windowManager.sway.config.modifier;
|
|
||||||
playerctl = "${pkgs.playerctl}/bin/playerctl";
|
|
||||||
pamixer = "${pkgs.pamixer}/bin/pamixer";
|
|
||||||
light = "${pkgs.light}/bin/light";
|
|
||||||
in lib.mkOptionDefault {
|
|
||||||
"${mod}+p" = "exec passbemenu";
|
|
||||||
"${mod}+x" = "move workspace to output right";
|
|
||||||
"${mod}+y" = "move workspace to output left";
|
|
||||||
|
|
||||||
"${mod}+section" = "workspace 0";
|
|
||||||
"${mod}+0" = "workspace 10";
|
|
||||||
"${mod}+apostrophe" = "workspace 11";
|
|
||||||
"${mod}+dead_circumflex" = "workspace 12";
|
|
||||||
"${mod}+dead_diaeresis" = "workspace 13";
|
|
||||||
"${mod}+dollar" = "workspace 14";
|
|
||||||
|
|
||||||
"${mod}+Shift+section" = "move container to workspace 0";
|
|
||||||
"${mod}+Shift+0" = "move container to workspace 10";
|
|
||||||
"${mod}+Shift+apostrophe" = "move container to workspace 11";
|
|
||||||
"${mod}+Shift+dead_circumflex" = "move container to workspace 12";
|
|
||||||
"${mod}+Shift+dead_diaeresis" = "move container to workspace 13";
|
|
||||||
"${mod}+Shift+dollar" = "move container to workspace 14";
|
|
||||||
|
|
||||||
"Ctrl+mod1+l" = "exec ${pkgs.systemd}/bin/loginctl lock-session";
|
|
||||||
"Ctrl+mod1+Shift+L" = "exec ${pkgs.systemd}/bin/systemctl suspend";
|
|
||||||
|
|
||||||
# pulse audio volume control
|
|
||||||
XF86AudioLowerVolume = "exec ${pamixer} --decrease 3";
|
|
||||||
XF86AudioRaiseVolume = "exec ${pamixer} --increase 3";
|
|
||||||
XF86AudioMute = "exec ${pamixer} --toggle-mute";
|
|
||||||
XF86AudioMicMute = "exec ${pamixer} --default-source --toggle-mute";
|
|
||||||
|
|
||||||
# Spotify control
|
|
||||||
XF86AudioPause = "exec ${playerctl} play-pause";
|
|
||||||
XF86AudioPlay = "exec ${playerctl} play-pause";
|
|
||||||
XF86AudioNext = "exec ${playerctl} next";
|
|
||||||
XF86AudioPrev = "exec ${playerctl} previous";
|
|
||||||
|
|
||||||
# screen brightness
|
|
||||||
XF86MonBrightnessUp = "exec ${light} -A 10";
|
|
||||||
XF86MonBrightnessDown = "exec ${light} -U 5";
|
|
||||||
|
|
||||||
# screenshot
|
|
||||||
Print = "exec ${pkgs.sway-contrib.grimshot}/bin/grimshot copy area";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
extraConfig = ''
|
|
||||||
# Disable the laptop screen when the lid is closed.
|
|
||||||
bindswitch --reload lid:on output eDP-1 disable
|
|
||||||
bindswitch --reload lid:off output eDP-1 enable
|
|
||||||
'';
|
|
||||||
};
|
|
||||||
|
|
||||||
systemd.user.services.network-manager-applet = adhereTheSwayTarget;
|
|
||||||
systemd.user.services.nextcloud-client = adhereTheSwayTarget // {
|
|
||||||
# For trayicon to work:
|
|
||||||
Unit.After = [ "waybar.service" ];
|
|
||||||
Service = {
|
|
||||||
ExecStartPre = "${pkgs.coreutils}/bin/sleep 3";
|
|
||||||
Environment = lib.mkForce
|
|
||||||
"PATH=${homeManagerConfig.home.profileDirectory}/bin XDG_CURRENT_DESKTOP=Unity";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
systemd.user.services.owncloud-client = adhereTheSwayTarget // {
|
|
||||||
# For trayicon to work:
|
|
||||||
Unit.After = [ "waybar.service" ];
|
|
||||||
Service = {
|
|
||||||
ExecStartPre = "${pkgs.coreutils}/bin/sleep 3";
|
|
||||||
Environment = lib.mkForce
|
|
||||||
"PATH=${homeManagerConfig.home.profileDirectory}/bin XDG_CURRENT_DESKTOP=Unity";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
systemd.user.services.pasystray = adhereTheSwayTarget;
|
|
||||||
|
|
||||||
gtk = {
|
|
||||||
iconTheme = {
|
|
||||||
# package = pkgs.gnome-icon-theme;
|
|
||||||
# name = "gnome";
|
|
||||||
package = pkgs.hicolor_icon_theme;
|
|
||||||
name = "hicolor";
|
|
||||||
};
|
|
||||||
gtk3.extraConfig.gtk-menu-images = true;
|
|
||||||
};
|
|
||||||
|
|
||||||
dconf.settings = { "org/gnome/desktop/interface".menus-have-icons = true; };
|
|
||||||
};
|
|
||||||
}
|
|
|
@ -1,386 +0,0 @@
|
||||||
{ pkgs, lib, config, ... }: {
|
|
||||||
home-manager.users.fhauser = {
|
|
||||||
xsession.preferStatusNotifierItems = true;
|
|
||||||
wayland.windowManager.sway.config.bars = [ ];
|
|
||||||
|
|
||||||
programs.waybar = {
|
|
||||||
enable = true;
|
|
||||||
settings = [{
|
|
||||||
position = "top";
|
|
||||||
#height =
|
|
||||||
modules-left = [ "sway/mode" "sway/workspaces" ];
|
|
||||||
modules-center = [ "sway/window" ];
|
|
||||||
modules-right = [
|
|
||||||
"backlight"
|
|
||||||
"idle_inhibitor"
|
|
||||||
"bluetooth"
|
|
||||||
"cpu"
|
|
||||||
"temperature"
|
|
||||||
"memory"
|
|
||||||
"disk"
|
|
||||||
"network"
|
|
||||||
"pulseaudio"
|
|
||||||
#"custom/keyboard-layout"
|
|
||||||
"battery"
|
|
||||||
"tray"
|
|
||||||
"clock"
|
|
||||||
];
|
|
||||||
modules = {
|
|
||||||
backlight.format = " {percent}%";
|
|
||||||
disk.format = " {percentage_used}%";
|
|
||||||
clock.format = "{:%Y-%2m-%2d %H:%M}";
|
|
||||||
"sway/workspaces" = {
|
|
||||||
disable-scroll-wraparound = true;
|
|
||||||
enable-bar-scroll = true;
|
|
||||||
numeric-first = true;
|
|
||||||
};
|
|
||||||
|
|
||||||
battery = {
|
|
||||||
interval = 10;
|
|
||||||
states = {
|
|
||||||
warning = 15;
|
|
||||||
critical = 10;
|
|
||||||
};
|
|
||||||
format = " {capacity}% {time}"; # Icon: bolt
|
|
||||||
format-discharging = "{icon} {capacity}% {time}";
|
|
||||||
format-time = "{H}:{M}";
|
|
||||||
format-icons = [
|
|
||||||
"" # Icon: battery-full
|
|
||||||
"" # Icon: battery-three-quarters
|
|
||||||
"" # Icon: battery-half
|
|
||||||
"" # Icon: battery-quarter
|
|
||||||
"" # Icon: battery-empty
|
|
||||||
];
|
|
||||||
tooltip = "true";
|
|
||||||
};
|
|
||||||
|
|
||||||
cpu = {
|
|
||||||
interval = "5";
|
|
||||||
format = " {usage}% ({load})"; # Icon: microchip
|
|
||||||
states = {
|
|
||||||
warning = "70";
|
|
||||||
critical = "90";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
#"custom/keyboard-layout" = {
|
|
||||||
# exec = pkgs.writeShellScript "keyboard-layout" "swaymsg -t get_inputs | grep -m1 'xkb_active_layout_name' | cut -d '\"' -f4";
|
|
||||||
# # Interval set only as a fallback, as the value is updated by signal
|
|
||||||
# interval = "30";
|
|
||||||
# format = " {}"; # Icon: keyboard
|
|
||||||
# # Signal sent by Sway key binding (~/.config/sway/key-bindings)
|
|
||||||
# signal = "1"; # SIGHUP
|
|
||||||
# tooltip = "false";
|
|
||||||
#};
|
|
||||||
|
|
||||||
memory = {
|
|
||||||
interval = "5";
|
|
||||||
format = " {}%"; # Icon: microchip
|
|
||||||
states = {
|
|
||||||
warning = "70";
|
|
||||||
critical = "90";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
network = {
|
|
||||||
interval = "5";
|
|
||||||
format-wifi = " {essid} ({signalStrength}%)"; # Icon: wifi
|
|
||||||
format-ethernet = "🔗 {ifname}: {ipaddr}/{cidr}"; # Icon: ethernet
|
|
||||||
format-disconnected = "🔗";
|
|
||||||
tooltip-format = "{ifname}: {ipaddr}";
|
|
||||||
};
|
|
||||||
|
|
||||||
"sway/mode" = {
|
|
||||||
format =
|
|
||||||
''<span style="italic"> {}</span>''; # Icon: expand-arrows-alt
|
|
||||||
tooltip = "false";
|
|
||||||
};
|
|
||||||
|
|
||||||
"sway/window" = {
|
|
||||||
format = "{}";
|
|
||||||
max-length = "120";
|
|
||||||
};
|
|
||||||
|
|
||||||
"sway/workspaces" = {
|
|
||||||
all-outputs = false;
|
|
||||||
disable-scroll = true;
|
|
||||||
format = "{icon}";
|
|
||||||
format-icons = {
|
|
||||||
"10" = " 10";
|
|
||||||
"11" = " 11";
|
|
||||||
"12" = " 12";
|
|
||||||
"13" = " 13";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
pulseaudio = {
|
|
||||||
scroll-step = 3;
|
|
||||||
format = "{icon} {volume}%";
|
|
||||||
format-bluetooth = "{icon} {volume}%";
|
|
||||||
format-muted = "🔇";
|
|
||||||
format-icons = {
|
|
||||||
headphones = "";
|
|
||||||
handsfree = "";
|
|
||||||
headset = "";
|
|
||||||
phone = "";
|
|
||||||
portable = "";
|
|
||||||
car = "";
|
|
||||||
default = [ "" "" "" ];
|
|
||||||
};
|
|
||||||
on-click = "pavucontrol";
|
|
||||||
};
|
|
||||||
|
|
||||||
temperature = {
|
|
||||||
critical-threshold = 80;
|
|
||||||
interval = 5;
|
|
||||||
format = "{icon} {temperatureC}°C";
|
|
||||||
format-icons = [
|
|
||||||
"" # Icon: temperature-empty
|
|
||||||
"" # Icon: temperature-quarter
|
|
||||||
"" # Icon: temperature-half
|
|
||||||
"" # Icon: temperature-three-quarters
|
|
||||||
"" # Icon: temperature-full
|
|
||||||
];
|
|
||||||
tooltip = "true";
|
|
||||||
hwmon-path = "/sys/class/hwmon/hwmon2/temp1_input";
|
|
||||||
};
|
|
||||||
|
|
||||||
idle_inhibitor = {
|
|
||||||
format = "{icon}";
|
|
||||||
format-icons = {
|
|
||||||
activated = "";
|
|
||||||
deactivated = "";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
tray = {
|
|
||||||
icon-size = "21";
|
|
||||||
spacing = "10";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
}];
|
|
||||||
|
|
||||||
systemd.enable = true;
|
|
||||||
|
|
||||||
style = ''
|
|
||||||
/* =============================================================================
|
|
||||||
*
|
|
||||||
* Waybar configuration
|
|
||||||
*
|
|
||||||
* Configuration reference: https://github.com/Alexays/Waybar/wiki/Configuration
|
|
||||||
*
|
|
||||||
* =========================================================================== */
|
|
||||||
|
|
||||||
/* -----------------------------------------------------------------------------
|
|
||||||
* Keyframes
|
|
||||||
* -------------------------------------------------------------------------- */
|
|
||||||
|
|
||||||
@keyframes blink-warning {
|
|
||||||
70% {
|
|
||||||
color: white;
|
|
||||||
}
|
|
||||||
|
|
||||||
to {
|
|
||||||
color: white;
|
|
||||||
background-color: orange;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
@keyframes blink-critical {
|
|
||||||
70% {
|
|
||||||
color: white;
|
|
||||||
}
|
|
||||||
|
|
||||||
to {
|
|
||||||
color: white;
|
|
||||||
background-color: red;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/* -----------------------------------------------------------------------------
|
|
||||||
* Base styles
|
|
||||||
* -------------------------------------------------------------------------- */
|
|
||||||
|
|
||||||
/* Reset all styles */
|
|
||||||
* {
|
|
||||||
border: none;
|
|
||||||
border-radius: 0;
|
|
||||||
min-height: 0;
|
|
||||||
margin: 0;
|
|
||||||
padding: 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* The whole bar */
|
|
||||||
#waybar {
|
|
||||||
background: #323232;
|
|
||||||
color: white;
|
|
||||||
/*font-family: Cantarell, Noto Sans, sans-serif;*/
|
|
||||||
font-size: 13px;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Each module */
|
|
||||||
#battery,
|
|
||||||
#clock,
|
|
||||||
#cpu,
|
|
||||||
#custom-keyboard-layout,
|
|
||||||
#memory,
|
|
||||||
#mode,
|
|
||||||
#network,
|
|
||||||
#pulseaudio,
|
|
||||||
#temperature,
|
|
||||||
#backlight,
|
|
||||||
#idle_inhibitor,
|
|
||||||
#tray {
|
|
||||||
margin-left: 5px;
|
|
||||||
margin-right: 5px;
|
|
||||||
padding-left: 5px;
|
|
||||||
padding-right: 5px;
|
|
||||||
/*border-right: solid 1px black;*/
|
|
||||||
}
|
|
||||||
|
|
||||||
#backlight {
|
|
||||||
margin-right: 0;
|
|
||||||
padding-right: 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
#idle_inhibiter {
|
|
||||||
margin-left: 0;
|
|
||||||
padding-left: 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/* -----------------------------------------------------------------------------
|
|
||||||
* Module styles
|
|
||||||
* -------------------------------------------------------------------------- */
|
|
||||||
|
|
||||||
#battery {
|
|
||||||
animation-timing-function: linear;
|
|
||||||
animation-iteration-count: infinite;
|
|
||||||
animation-direction: alternate;
|
|
||||||
}
|
|
||||||
|
|
||||||
#battery.warning {
|
|
||||||
color: orange;
|
|
||||||
}
|
|
||||||
|
|
||||||
#battery.critical {
|
|
||||||
color: red;
|
|
||||||
}
|
|
||||||
|
|
||||||
#battery.warning.discharging {
|
|
||||||
animation-name: blink-warning;
|
|
||||||
animation-duration: 4s;
|
|
||||||
}
|
|
||||||
|
|
||||||
#battery.critical.discharging {
|
|
||||||
animation-name: blink-critical;
|
|
||||||
animation-duration: 3s;
|
|
||||||
}
|
|
||||||
|
|
||||||
#clock {
|
|
||||||
font-weight: bold;
|
|
||||||
}
|
|
||||||
|
|
||||||
#cpu {
|
|
||||||
/* No styles */
|
|
||||||
}
|
|
||||||
|
|
||||||
#cpu.warning {
|
|
||||||
color: orange;
|
|
||||||
}
|
|
||||||
|
|
||||||
#cpu.critical {
|
|
||||||
color: red;
|
|
||||||
}
|
|
||||||
|
|
||||||
#memory {
|
|
||||||
animation-timing-function: linear;
|
|
||||||
animation-iteration-count: infinite;
|
|
||||||
animation-direction: alternate;
|
|
||||||
}
|
|
||||||
|
|
||||||
#memory.warning {
|
|
||||||
color: orange;
|
|
||||||
}
|
|
||||||
|
|
||||||
#memory.critical {
|
|
||||||
color: red;
|
|
||||||
animation-name: blink-critical;
|
|
||||||
animation-duration: 2s;
|
|
||||||
}
|
|
||||||
|
|
||||||
#mode {
|
|
||||||
background: #64727D;
|
|
||||||
border-top: 2px solid white;
|
|
||||||
/* To compensate for the top border and still have vertical centering */
|
|
||||||
padding-bottom: 2px;
|
|
||||||
}
|
|
||||||
|
|
||||||
#network {
|
|
||||||
/* No styles */
|
|
||||||
}
|
|
||||||
|
|
||||||
#network.disconnected {
|
|
||||||
color: orange;
|
|
||||||
}
|
|
||||||
|
|
||||||
#pulseaudio {
|
|
||||||
/* No styles */
|
|
||||||
}
|
|
||||||
|
|
||||||
#pulseaudio.muted {
|
|
||||||
/* No styles */
|
|
||||||
}
|
|
||||||
|
|
||||||
#custom-spotify {
|
|
||||||
color: rgb(102, 220, 105);
|
|
||||||
}
|
|
||||||
|
|
||||||
#temperature {
|
|
||||||
/* No styles */
|
|
||||||
}
|
|
||||||
|
|
||||||
#temperature.critical {
|
|
||||||
color: red;
|
|
||||||
}
|
|
||||||
|
|
||||||
#tray {
|
|
||||||
/* No styles */
|
|
||||||
}
|
|
||||||
|
|
||||||
#window {
|
|
||||||
font-weight: bold;
|
|
||||||
}
|
|
||||||
|
|
||||||
#workspaces button {
|
|
||||||
border-top: 2px solid transparent;
|
|
||||||
/* To compensate for the top border and still have vertical centering */
|
|
||||||
padding-bottom: 2px;
|
|
||||||
padding-left: 10px;
|
|
||||||
padding-right: 10px;
|
|
||||||
color: #888888;
|
|
||||||
}
|
|
||||||
|
|
||||||
#workspaces button.focused {
|
|
||||||
border-color: #4c7899;
|
|
||||||
color: white;
|
|
||||||
background-color: #285577;
|
|
||||||
}
|
|
||||||
|
|
||||||
#workspaces button.urgent {
|
|
||||||
border-color: #c9545d;
|
|
||||||
color: #c9545d;
|
|
||||||
}
|
|
||||||
'';
|
|
||||||
};
|
|
||||||
systemd.user.services.waybar = with lib; {
|
|
||||||
# Install.WantedBy = mkForce [ "sway-session.target" ]; # TODO: Set as systemd.target with 22.05
|
|
||||||
Unit = {
|
|
||||||
Requisite = mkForce [ ];
|
|
||||||
After = mkForce [ ];
|
|
||||||
PartOf = [ "tray.target" ];
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
|
||||||
}
|
|
|
@ -1,11 +0,0 @@
|
||||||
{ config, pkgs, lib, ... }: {
|
|
||||||
imports =
|
|
||||||
[ ./multimedia.nix ./security.nix ./applications ./work ./mimetypes.nix ];
|
|
||||||
home-manager.users.fhauser.home.stateVersion = config.system.stateVersion;
|
|
||||||
home-manager.users.fhauser.systemd.user.targets.tray = {
|
|
||||||
Unit = {
|
|
||||||
Description = "Home Manager System Tray";
|
|
||||||
Requires = [ "graphical-session-pre.target" ];
|
|
||||||
};
|
|
||||||
};
|
|
||||||
}
|
|
66
flake.lock
generated
Normal file
66
flake.lock
generated
Normal file
|
@ -0,0 +1,66 @@
|
||||||
|
{
|
||||||
|
"nodes": {
|
||||||
|
"home-manager": {
|
||||||
|
"inputs": {
|
||||||
|
"nixpkgs": [
|
||||||
|
"nixpkgs-stable"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1648834319,
|
||||||
|
"narHash": "sha256-i5Aj4Aw64D/A0X6XW5LxSS4XBnYj7gMz+kN4dpsbdk8=",
|
||||||
|
"owner": "nix-community",
|
||||||
|
"repo": "home-manager",
|
||||||
|
"rev": "0bdbdea2e26c984b096f4f7d10e3c88536a980b0",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "nix-community",
|
||||||
|
"ref": "release-21.11",
|
||||||
|
"repo": "home-manager",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"nixpkgs-stable": {
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1649490789,
|
||||||
|
"narHash": "sha256-YrhVxwoofZSx/wLZ4GYET//8vS+uqWX572zvdmP/Etg=",
|
||||||
|
"owner": "NixOS",
|
||||||
|
"repo": "nixpkgs",
|
||||||
|
"rev": "c86185d20d708013caf97a6adaa8dc6d72313c75",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "NixOS",
|
||||||
|
"ref": "nixos-21.11",
|
||||||
|
"repo": "nixpkgs",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"nixpkgs-unstable": {
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1649408932,
|
||||||
|
"narHash": "sha256-JhTW1OtS5fACcRXLqcTTQyYO5vLkO+bceCqeRms13SY=",
|
||||||
|
"owner": "NixOS",
|
||||||
|
"repo": "nixpkgs",
|
||||||
|
"rev": "42948b300670223ca8286aaf916bc381f66a5313",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "NixOS",
|
||||||
|
"ref": "nixos-unstable",
|
||||||
|
"repo": "nixpkgs",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"root": {
|
||||||
|
"inputs": {
|
||||||
|
"home-manager": "home-manager",
|
||||||
|
"nixpkgs-stable": "nixpkgs-stable",
|
||||||
|
"nixpkgs-unstable": "nixpkgs-unstable"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"root": "root",
|
||||||
|
"version": 7
|
||||||
|
}
|
58
flake.nix
Normal file
58
flake.nix
Normal file
|
@ -0,0 +1,58 @@
|
||||||
|
{
|
||||||
|
inputs = {
|
||||||
|
nixpkgs-unstable.url = "github:NixOS/nixpkgs/nixos-unstable";
|
||||||
|
nixpkgs-stable.url = "github:NixOS/nixpkgs/nixos-21.11";
|
||||||
|
home-manager.url = "github:nix-community/home-manager/release-21.11";
|
||||||
|
home-manager.inputs.nixpkgs.follows = "nixpkgs-stable";
|
||||||
|
#fabianhauser-etaxes.url = "github:fabianhauser/etaxes-sg-nix";
|
||||||
|
};
|
||||||
|
|
||||||
|
outputs = { self, nixpkgs-unstable, nixpkgs-stable, home-manager, ... }@inputs:
|
||||||
|
let system = "x86_64-linux";
|
||||||
|
pkgsUnstable = import nixpkgs-unstable {
|
||||||
|
inherit system;
|
||||||
|
config.allowUnfree = true; # For vscode
|
||||||
|
};
|
||||||
|
in {
|
||||||
|
checks.${system}.formatCheck = let pkgs = pkgsUnstable; in pkgs.runCommand "nixfmt-check" { } ''
|
||||||
|
set -euo pipefail
|
||||||
|
cd ${self}
|
||||||
|
${pkgs.findutils}/bin/find . -type f -name '*.nix' -exec ${pkgs.nixfmt}/bin/nixfmt --check {} +
|
||||||
|
mkdir $out
|
||||||
|
'';
|
||||||
|
|
||||||
|
# Build with `nixos-rebuild --flake .#<hostname>` or
|
||||||
|
# `nix build .#nixosConfigurations.<hostname>.config.system.build.toplevel
|
||||||
|
nixosConfigurations = let
|
||||||
|
hosts = [ "speer" "hummelberg" ];
|
||||||
|
home-manager-modules = [ home-manager.nixosModules.home-manager {
|
||||||
|
home-manager = {
|
||||||
|
useGlobalPkgs = true;
|
||||||
|
useUserPackages = true;
|
||||||
|
extraSpecialArgs = { inherit pkgsUnstable; };
|
||||||
|
users.fhauser = import ./home/fhauser/default.nix;
|
||||||
|
};
|
||||||
|
}];
|
||||||
|
mapHostnameToAttr = host:
|
||||||
|
nixpkgs-stable.lib.nixosSystem {
|
||||||
|
inherit system;
|
||||||
|
modules = [ ./host/${host}/default.nix ] ++ home-manager-modules;
|
||||||
|
};
|
||||||
|
in pkgsUnstable.lib.genAttrs hosts mapHostnameToAttr;
|
||||||
|
|
||||||
|
|
||||||
|
homeConfigurations = {
|
||||||
|
fhauser = home-manager.lib.homeManagerConfiguration rec {
|
||||||
|
inherit system;
|
||||||
|
username = "fhauser";
|
||||||
|
configuration = import ./home/${username}/default.nix;
|
||||||
|
extraSpecialArgs = { inherit pkgsUnstable; };
|
||||||
|
|
||||||
|
# Update the state version as needed.
|
||||||
|
# See the changelog here:
|
||||||
|
# https://nix-community.github.io/home-manager/release-notes.html#sec-release-21.05
|
||||||
|
stateVersion = "21.11";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
|
@ -1,5 +1,5 @@
|
||||||
{ pkgs, ... }: {
|
{ pkgs, ... }: {
|
||||||
home-manager.users.fhauser.programs.alacritty = {
|
programs.alacritty = {
|
||||||
enable = true;
|
enable = true;
|
||||||
settings."background_opacity" = 0.95;
|
settings."background_opacity" = 0.95;
|
||||||
};
|
};
|
115
home/fhauser/applications/default.nix
Normal file
115
home/fhauser/applications/default.nix
Normal file
|
@ -0,0 +1,115 @@
|
||||||
|
{ config, pkgs, lib, ... }:
|
||||||
|
|
||||||
|
{
|
||||||
|
|
||||||
|
imports = [
|
||||||
|
./evolution.nix
|
||||||
|
./firefox.nix
|
||||||
|
./gpg.nix
|
||||||
|
./ssh.nix
|
||||||
|
./scripts.nix
|
||||||
|
./webapps.nix
|
||||||
|
./vim.nix
|
||||||
|
./git.nix
|
||||||
|
./waybar.nix
|
||||||
|
./psql.nix
|
||||||
|
./mako.nix
|
||||||
|
./redshift.nix
|
||||||
|
./alacritty.nix
|
||||||
|
./shell.nix
|
||||||
|
./swaylock.nix
|
||||||
|
./kanshi.nix
|
||||||
|
./sway.nix
|
||||||
|
];
|
||||||
|
|
||||||
|
services = {
|
||||||
|
network-manager-applet.enable = true;
|
||||||
|
nextcloud-client = {
|
||||||
|
enable = true;
|
||||||
|
startInBackground = true;
|
||||||
|
};
|
||||||
|
owncloud-client.enable = true;
|
||||||
|
pasystray.enable = true;
|
||||||
|
blueman-applet.enable = true;
|
||||||
|
};
|
||||||
|
|
||||||
|
home = {
|
||||||
|
packages = with pkgs;
|
||||||
|
[ # Networking
|
||||||
|
unison
|
||||||
|
transmission # GUI Tools, maybe extract...
|
||||||
|
] ++ [ # Desktop Environment Applications
|
||||||
|
google-chrome
|
||||||
|
chromium
|
||||||
|
#midori # TODO: Currently unused
|
||||||
|
#qutebrowser # TODO: Currently unused
|
||||||
|
synergy
|
||||||
|
#quicksynergy # Currently unused
|
||||||
|
nextcloud-client
|
||||||
|
owncloud-client
|
||||||
|
] ++ [ # office # TODO: Migrate to office.nix
|
||||||
|
# TODO: Build fails!
|
||||||
|
libreoffice-fresh # TODO: Dictionaries, nixos/nixpkgs#14430
|
||||||
|
# pdfgrep
|
||||||
|
# pdftk
|
||||||
|
# calibre
|
||||||
|
tectonic
|
||||||
|
# texstudio
|
||||||
|
# pandoc
|
||||||
|
# system-config-printer
|
||||||
|
# cups-pk-helper
|
||||||
|
# cups-bjnp
|
||||||
|
# gutenprint
|
||||||
|
# gutenprintBin
|
||||||
|
# hplipWithPlugin
|
||||||
|
simple-scan
|
||||||
|
gnome.gnome-online-accounts
|
||||||
|
gnome.gnome-control-center
|
||||||
|
] ++ [ # Communication
|
||||||
|
signal-desktop
|
||||||
|
tdesktop
|
||||||
|
discord
|
||||||
|
mattermost-desktop
|
||||||
|
# pidgin pidgin-otr pidgin-with-plugins #TODO: Pidgin needed?
|
||||||
|
#TODO: ekiga?
|
||||||
|
skype
|
||||||
|
slack
|
||||||
|
teams
|
||||||
|
jitsi-meet-electron
|
||||||
|
teamviewer
|
||||||
|
rdesktop
|
||||||
|
] ++ [ # Development
|
||||||
|
vscodium
|
||||||
|
gitlab-runner
|
||||||
|
docker-compose
|
||||||
|
vagrant
|
||||||
|
virt-manager
|
||||||
|
modemmanager # TODO: makes sense here?
|
||||||
|
modem-manager-gui
|
||||||
|
];
|
||||||
|
|
||||||
|
#TODO: Write module
|
||||||
|
activation.statefulConfigSymlinks =
|
||||||
|
config.lib.dag.entryAfter [ "writeBoundary" ] ''
|
||||||
|
set -eo pipefail
|
||||||
|
|
||||||
|
STATEFUL_CONFS=(
|
||||||
|
".config/spotify"
|
||||||
|
".mozilla"
|
||||||
|
".password-store"
|
||||||
|
)
|
||||||
|
for STATEFUL_CONF in ''${STATEFUL_CONFS[@]}; do
|
||||||
|
if [ -e "$STATEFUL_CONF" ] && [ ! -h "$STATEFUL_CONF" ]; then
|
||||||
|
echo "File $STATEFUL_CONF already exists, exiting!" >&2
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ -h "$STATEFUL_CONF" ]; then
|
||||||
|
rm "$STATEFUL_CONF"
|
||||||
|
fi
|
||||||
|
|
||||||
|
$DRY_RUN_CMD ln -s $VERBOSE_ARG "$HOME/.stateful/$STATEFUL_CONF" "$HOME/$STATEFUL_CONF"
|
||||||
|
done
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
}
|
4
home/fhauser/applications/evolution.nix
Normal file
4
home/fhauser/applications/evolution.nix
Normal file
|
@ -0,0 +1,4 @@
|
||||||
|
{ pkgs, ... }: {
|
||||||
|
dconf.settings."org/gnome/evolution-data-server/calendar".notify-enable-audio =
|
||||||
|
false;
|
||||||
|
}
|
10
home/fhauser/applications/firefox.nix
Normal file
10
home/fhauser/applications/firefox.nix
Normal file
|
@ -0,0 +1,10 @@
|
||||||
|
{ pkgs, ... }: {
|
||||||
|
programs.firefox = {
|
||||||
|
enable = true;
|
||||||
|
package = pkgs.firefox-wayland;
|
||||||
|
};
|
||||||
|
home.sessionVariables = {
|
||||||
|
MOZ_ENABLE_WAYLAND = "true";
|
||||||
|
MOZ_DBUS_REMOTE = "1";
|
||||||
|
};
|
||||||
|
}
|
|
@ -1,5 +1,5 @@
|
||||||
{ pkgs, ... }: {
|
{ pkgs, ... }: {
|
||||||
home-manager.users.fhauser.programs.git = {
|
programs.git = {
|
||||||
enable = true;
|
enable = true;
|
||||||
package = pkgs.gitAndTools.gitFull;
|
package = pkgs.gitAndTools.gitFull;
|
||||||
aliases = {
|
aliases = {
|
|
@ -1,12 +1,10 @@
|
||||||
{ pkgs, ... }:
|
{ pkgs, pkgsUnstable, ... }: {
|
||||||
let unstable = import <nixos-unstable> { };
|
|
||||||
in {
|
|
||||||
#TODO: ENV variabls for agent
|
#TODO: ENV variabls for agent
|
||||||
home-manager.users.fhauser.home.sessionVariables.SSH_AUTH_SOCK =
|
home.sessionVariables.SSH_AUTH_SOCK =
|
||||||
"/run/user/1000/gnupg/S.gpg-agent.ssh";
|
"/run/user/1000/gnupg/S.gpg-agent.ssh";
|
||||||
home-manager.users.fhauser.programs.gpg = {
|
programs.gpg = {
|
||||||
enable = true;
|
enable = true;
|
||||||
package = unstable.gnupg;
|
package = pkgsUnstable.gnupg;
|
||||||
settings = {
|
settings = {
|
||||||
"use-agent" = true;
|
"use-agent" = true;
|
||||||
"trust-model" = "tofu";
|
"trust-model" = "tofu";
|
||||||
|
@ -34,7 +32,7 @@ in {
|
||||||
# { source = "./fabian.hauser@threema.ch.pub"; trust = 5; }
|
# { source = "./fabian.hauser@threema.ch.pub"; trust = 5; }
|
||||||
#];
|
#];
|
||||||
};
|
};
|
||||||
home-manager.users.fhauser.services.gpg-agent = {
|
services.gpg-agent = {
|
||||||
enable = true;
|
enable = true;
|
||||||
enableScDaemon = true;
|
enableScDaemon = true;
|
||||||
enableSshSupport = true;
|
enableSshSupport = true;
|
|
@ -1,6 +1,6 @@
|
||||||
{ pkgs, lib, config, ... }: {
|
{ pkgs, lib, config, ... }: {
|
||||||
# home-manager.users.fhauser.systemd.user.services.kanshi.Install.WantedBy = "home-manager-fhauser.service"; # TODO: Upstream array type of systemdTarget
|
# systemd.user.services.kanshi.Install.WantedBy = "home-manager-fhauser.service"; # TODO: Upstream array type of systemdTarget
|
||||||
home-manager.users.fhauser.services.kanshi = {
|
services.kanshi = {
|
||||||
enable = true;
|
enable = true;
|
||||||
profiles = let
|
profiles = let
|
||||||
backgroundPicturePath = "~/pictures/backgrounds";
|
backgroundPicturePath = "~/pictures/backgrounds";
|
|
@ -1,5 +1,5 @@
|
||||||
{ pkgs, ... }: {
|
{ pkgs, ... }: {
|
||||||
home-manager.users.fhauser.programs.mako = {
|
programs.mako = {
|
||||||
enable = true;
|
enable = true;
|
||||||
backgroundColor = "#CCCCCCCC"; # TODO: Make layout colors in a central place
|
backgroundColor = "#CCCCCCCC"; # TODO: Make layout colors in a central place
|
||||||
borderSize = 0;
|
borderSize = 0;
|
|
@ -1,5 +1,5 @@
|
||||||
{ pkgs, ... }: {
|
{ pkgs, ... }: {
|
||||||
home-manager.users.fhauser.home.file.".psqlrc".text = ''
|
home.file.".psqlrc".text = ''
|
||||||
\set QUIET 1
|
\set QUIET 1
|
||||||
|
|
||||||
\pset linestyle unicode
|
\pset linestyle unicode
|
|
@ -1,5 +1,5 @@
|
||||||
{ pkgs, ... }: {
|
{ pkgs, ... }: {
|
||||||
home-manager.users.fhauser.services.redshift = {
|
services.redshift = {
|
||||||
enable = true;
|
enable = true;
|
||||||
package = pkgs.redshift-wlr;
|
package = pkgs.redshift-wlr;
|
||||||
settings.redshift.brightness-night = "0.9";
|
settings.redshift.brightness-night = "0.9";
|
|
@ -25,16 +25,16 @@ let
|
||||||
|
|
||||||
${pkgs.pass-wayland}/bin/pass show -c "$password" 2>/dev/null
|
${pkgs.pass-wayland}/bin/pass show -c "$password" 2>/dev/null
|
||||||
'';
|
'';
|
||||||
threema-vpn = pkgs.writeScriptBin "threema-vpn" ''
|
threema-vpn = pkgs.writeScriptBin "threema-vpn" ""; #''
|
||||||
#!${pkgs.stdenv.shell}
|
# #!${pkgs.stdenv.shell}
|
||||||
set -eo pipefail
|
# set -eo pipefail
|
||||||
|
|
||||||
SERVICE=openvpn-threema
|
# SERVICE=openvpn-threema
|
||||||
SERVICE_EXEC="${config.systemd.services.openvpn-threema.serviceConfig.ExecStart}"
|
# SERVICE_EXEC="${config.systemd.services.openvpn-threema.serviceConfig.ExecStart}"
|
||||||
|
|
||||||
exec sudo ${pkgs.openvpn}/sbin/openvpn''${SERVICE_EXEC#@* openvpn}
|
# exec sudo ${pkgs.openvpn}/sbin/openvpn''${SERVICE_EXEC#@* openvpn}
|
||||||
|
|
||||||
'';
|
#'';
|
||||||
threema-env = pkgs.writeScriptBin "threema-env" ''
|
threema-env = pkgs.writeScriptBin "threema-env" ''
|
||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
set -eo pipefail
|
set -eo pipefail
|
||||||
|
@ -74,6 +74,6 @@ let
|
||||||
${xhost}/bin/xhost
|
${xhost}/bin/xhost
|
||||||
'';
|
'';
|
||||||
in {
|
in {
|
||||||
home-manager.users.fhauser.home.packages =
|
home.packages =
|
||||||
[ passbemenu threema-vpn threema-env wsudo ];
|
[ passbemenu threema-vpn threema-env wsudo ];
|
||||||
}
|
}
|
|
@ -1,5 +1,5 @@
|
||||||
{ pkgs, ... }: {
|
{ pkgs, ... }: {
|
||||||
home-manager.users.fhauser.programs = {
|
programs = {
|
||||||
bash = {
|
bash = {
|
||||||
enable = true;
|
enable = true;
|
||||||
historyIgnore = [ "ls" "cd" "exit" "j" ];
|
historyIgnore = [ "ls" "cd" "exit" "j" ];
|
|
@ -1,5 +1,5 @@
|
||||||
{ pkgs, lib, ... }: {
|
{ pkgs, lib, ... }: {
|
||||||
home-manager.users.fhauser.programs.ssh = let
|
programs.ssh = let
|
||||||
forceIdentityThreema = {
|
forceIdentityThreema = {
|
||||||
identityFile = toString (pkgs.writeText "fabian.hauser@threema.ch.pub" ''
|
identityFile = toString (pkgs.writeText "fabian.hauser@threema.ch.pub" ''
|
||||||
ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIO7h492sXT7zdamf+nbOt+y6jiqxicOnm6+wiuEG1EvZ openpgp:0x18B553DD
|
ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIO7h492sXT7zdamf+nbOt+y6jiqxicOnm6+wiuEG1EvZ openpgp:0x18B553DD
|
156
home/fhauser/applications/sway.nix
Normal file
156
home/fhauser/applications/sway.nix
Normal file
|
@ -0,0 +1,156 @@
|
||||||
|
{ pkgs, lib, config, ... }: let
|
||||||
|
adhereTheSwayTarget = {
|
||||||
|
Install.WantedBy = lib.mkForce [ "sway-session.target" ];
|
||||||
|
Unit.PartOf = lib.mkForce [ "sway-session.target" ];
|
||||||
|
};
|
||||||
|
# TODO: active screen with -m $active_screen
|
||||||
|
bemenuLauncher = pkgs.writeScriptBin "bemenuLauncher" ''
|
||||||
|
#!${pkgs.stdenv.shell}
|
||||||
|
#active_screen=$(swaymsg -r -t get_outputs | \
|
||||||
|
# ${pkgs.jq}/bin/jq '. [] | select (.focused == true) | .name | split ("-") | last')
|
||||||
|
${pkgs.dmenu}/bin/dmenu_path | \
|
||||||
|
${pkgs.bemenu}/bin/bemenu --list 20 --ignorecase --prompt 'Start: ' | \
|
||||||
|
xargs swaymsg exec --
|
||||||
|
'';
|
||||||
|
in rec {
|
||||||
|
home.packages = with pkgs; [
|
||||||
|
sway-contrib.grimshot
|
||||||
|
wl-clipboard
|
||||||
|
libappindicator
|
||||||
|
gnome.defaultIconTheme
|
||||||
|
gnome2.gnome-icon-theme
|
||||||
|
hicolor-icon-theme # TODO: Move these requirements?
|
||||||
|
];
|
||||||
|
|
||||||
|
xsession.preferStatusNotifierItems = true;
|
||||||
|
|
||||||
|
wayland.windowManager.sway = {
|
||||||
|
enable = true;
|
||||||
|
systemdIntegration = true;
|
||||||
|
xwayland = true;
|
||||||
|
wrapperFeatures = { gtk = true; };
|
||||||
|
extraSessionCommands = ''
|
||||||
|
#export XDG_CURRENT_DESKTOP=Unity
|
||||||
|
export XDG_CURRENT_DESKTOP=sway
|
||||||
|
export XDG_SESSION_TYPE="wayland"
|
||||||
|
export _JAVA_AWT_WM_NONREPARENTING=1
|
||||||
|
export SSH_AUTH_SOCK=/run/user/1000/gnupg/S.gpg-agent.ssh # TODO: Migrate
|
||||||
|
export QT_QPA_PLATFORM=wayland
|
||||||
|
export QT_WAYLAND_DISABLE_WINDOWDECORATION="1"
|
||||||
|
# TODO: QTpie
|
||||||
|
export WLR_DRM_NO_MODIFIERS=1
|
||||||
|
export WLR_NO_HARDWARE_CURSORS=1
|
||||||
|
'';
|
||||||
|
config = {
|
||||||
|
input = {
|
||||||
|
"type:keyboard" = {
|
||||||
|
xkb_layout = "ch,de";
|
||||||
|
xkb_options = "eurosign:e";
|
||||||
|
};
|
||||||
|
"*" = { xkb_numlock = "enable"; };
|
||||||
|
};
|
||||||
|
terminal = "${pkgs.alacritty}/bin/alacritty";
|
||||||
|
menu = "${bemenuLauncher}/bin/bemenuLauncher";
|
||||||
|
gaps.inner = 8;
|
||||||
|
modifier = "Mod4";
|
||||||
|
window.border = 0;
|
||||||
|
#colors.focused.border = "#323232";
|
||||||
|
|
||||||
|
#TODO: Workspace Programm assignment: Not working properly
|
||||||
|
assigns = {
|
||||||
|
"10" = [{ app_id = "^firefox$"; }];
|
||||||
|
"11" = [{ app_id = "^(claws-mail|thunderbird|evolution)$"; }];
|
||||||
|
"12" = [{
|
||||||
|
class = "^Chromium-browser$";
|
||||||
|
instance = "^web.threema.ch";
|
||||||
|
}];
|
||||||
|
"13" = [{ class = "^Spotify$"; }];
|
||||||
|
};
|
||||||
|
|
||||||
|
keybindings = let
|
||||||
|
mod = wayland.windowManager.sway.config.modifier;
|
||||||
|
playerctl = "${pkgs.playerctl}/bin/playerctl";
|
||||||
|
pamixer = "${pkgs.pamixer}/bin/pamixer";
|
||||||
|
light = "${pkgs.light}/bin/light";
|
||||||
|
in lib.mkOptionDefault {
|
||||||
|
"${mod}+p" = "exec passbemenu";
|
||||||
|
"${mod}+x" = "move workspace to output right";
|
||||||
|
"${mod}+y" = "move workspace to output left";
|
||||||
|
|
||||||
|
"${mod}+section" = "workspace 0";
|
||||||
|
"${mod}+0" = "workspace 10";
|
||||||
|
"${mod}+apostrophe" = "workspace 11";
|
||||||
|
"${mod}+dead_circumflex" = "workspace 12";
|
||||||
|
"${mod}+dead_diaeresis" = "workspace 13";
|
||||||
|
"${mod}+dollar" = "workspace 14";
|
||||||
|
|
||||||
|
"${mod}+Shift+section" = "move container to workspace 0";
|
||||||
|
"${mod}+Shift+0" = "move container to workspace 10";
|
||||||
|
"${mod}+Shift+apostrophe" = "move container to workspace 11";
|
||||||
|
"${mod}+Shift+dead_circumflex" = "move container to workspace 12";
|
||||||
|
"${mod}+Shift+dead_diaeresis" = "move container to workspace 13";
|
||||||
|
"${mod}+Shift+dollar" = "move container to workspace 14";
|
||||||
|
|
||||||
|
"Ctrl+mod1+l" = "exec ${pkgs.systemd}/bin/loginctl lock-session";
|
||||||
|
"Ctrl+mod1+Shift+L" = "exec ${pkgs.systemd}/bin/systemctl suspend";
|
||||||
|
|
||||||
|
# pulse audio volume control
|
||||||
|
XF86AudioLowerVolume = "exec ${pamixer} --decrease 3";
|
||||||
|
XF86AudioRaiseVolume = "exec ${pamixer} --increase 3";
|
||||||
|
XF86AudioMute = "exec ${pamixer} --toggle-mute";
|
||||||
|
XF86AudioMicMute = "exec ${pamixer} --default-source --toggle-mute";
|
||||||
|
|
||||||
|
# Spotify control
|
||||||
|
XF86AudioPause = "exec ${playerctl} play-pause";
|
||||||
|
XF86AudioPlay = "exec ${playerctl} play-pause";
|
||||||
|
XF86AudioNext = "exec ${playerctl} next";
|
||||||
|
XF86AudioPrev = "exec ${playerctl} previous";
|
||||||
|
|
||||||
|
# screen brightness
|
||||||
|
XF86MonBrightnessUp = "exec ${light} -A 10";
|
||||||
|
XF86MonBrightnessDown = "exec ${light} -U 5";
|
||||||
|
|
||||||
|
# screenshot
|
||||||
|
Print = "exec ${pkgs.sway-contrib.grimshot}/bin/grimshot copy area";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
extraConfig = ''
|
||||||
|
# Disable the laptop screen when the lid is closed.
|
||||||
|
bindswitch --reload lid:on output eDP-1 disable
|
||||||
|
bindswitch --reload lid:off output eDP-1 enable
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
|
||||||
|
systemd.user.services.network-manager-applet = adhereTheSwayTarget;
|
||||||
|
systemd.user.services.nextcloud-client = adhereTheSwayTarget // {
|
||||||
|
# For trayicon to work:
|
||||||
|
Unit.After = [ "waybar.service" ];
|
||||||
|
Service = {
|
||||||
|
ExecStartPre = "${pkgs.coreutils}/bin/sleep 3";
|
||||||
|
Environment = lib.mkForce
|
||||||
|
"PATH=${config.home.profileDirectory}/bin XDG_CURRENT_DESKTOP=Unity";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
systemd.user.services.owncloud-client = adhereTheSwayTarget // {
|
||||||
|
# For trayicon to work:
|
||||||
|
Unit.After = [ "waybar.service" ];
|
||||||
|
Service = {
|
||||||
|
ExecStartPre = "${pkgs.coreutils}/bin/sleep 3";
|
||||||
|
Environment = lib.mkForce
|
||||||
|
"PATH=${config.home.profileDirectory}/bin XDG_CURRENT_DESKTOP=Unity";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
systemd.user.services.pasystray = adhereTheSwayTarget;
|
||||||
|
|
||||||
|
gtk = {
|
||||||
|
iconTheme = {
|
||||||
|
# package = pkgs.gnome-icon-theme;
|
||||||
|
# name = "gnome";
|
||||||
|
package = pkgs.hicolor_icon_theme;
|
||||||
|
name = "hicolor";
|
||||||
|
};
|
||||||
|
gtk3.extraConfig.gtk-menu-images = true;
|
||||||
|
};
|
||||||
|
|
||||||
|
dconf.settings = { "org/gnome/desktop/interface".menus-have-icons = true; };
|
||||||
|
}
|
|
@ -1,5 +1,5 @@
|
||||||
{ pkgs, ... }: {
|
{ pkgs, ... }: {
|
||||||
home-manager.users.fhauser.systemd.user.services.swayidle = let
|
systemd.user.services.swayidle = let
|
||||||
lock =
|
lock =
|
||||||
"${pkgs.swaylock}/bin/swaylock --hide-keyboard-layout --ignore-empty-password --daemonize --show-failed-attempts --color=000000";
|
"${pkgs.swaylock}/bin/swaylock --hide-keyboard-layout --ignore-empty-password --daemonize --show-failed-attempts --color=000000";
|
||||||
logTimeCmd = "${pkgs.coreutils}/bin/date --rfc-3339=seconds >> ~/locklog";
|
logTimeCmd = "${pkgs.coreutils}/bin/date --rfc-3339=seconds >> ~/locklog";
|
|
@ -1,5 +1,5 @@
|
||||||
{ pkgs, ... }: {
|
{ pkgs, ... }: {
|
||||||
home-manager.users.fhauser.programs.vim = {
|
programs.vim = {
|
||||||
enable = true;
|
enable = true;
|
||||||
extraConfig = ''
|
extraConfig = ''
|
||||||
colorscheme elflord
|
colorscheme elflord
|
384
home/fhauser/applications/waybar.nix
Normal file
384
home/fhauser/applications/waybar.nix
Normal file
|
@ -0,0 +1,384 @@
|
||||||
|
{ pkgs, lib, config, ... }: {
|
||||||
|
xsession.preferStatusNotifierItems = true;
|
||||||
|
wayland.windowManager.sway.config.bars = [ ];
|
||||||
|
|
||||||
|
programs.waybar = {
|
||||||
|
enable = true;
|
||||||
|
settings = [{
|
||||||
|
position = "top";
|
||||||
|
#height =
|
||||||
|
modules-left = [ "sway/mode" "sway/workspaces" ];
|
||||||
|
modules-center = [ "sway/window" ];
|
||||||
|
modules-right = [
|
||||||
|
"backlight"
|
||||||
|
"idle_inhibitor"
|
||||||
|
"bluetooth"
|
||||||
|
"cpu"
|
||||||
|
"temperature"
|
||||||
|
"memory"
|
||||||
|
"disk"
|
||||||
|
"network"
|
||||||
|
"pulseaudio"
|
||||||
|
#"custom/keyboard-layout"
|
||||||
|
"battery"
|
||||||
|
"tray"
|
||||||
|
"clock"
|
||||||
|
];
|
||||||
|
modules = {
|
||||||
|
backlight.format = " {percent}%";
|
||||||
|
disk.format = " {percentage_used}%";
|
||||||
|
clock.format = "{:%Y-%2m-%2d %H:%M}";
|
||||||
|
"sway/workspaces" = {
|
||||||
|
disable-scroll-wraparound = true;
|
||||||
|
enable-bar-scroll = true;
|
||||||
|
numeric-first = true;
|
||||||
|
};
|
||||||
|
|
||||||
|
battery = {
|
||||||
|
interval = 10;
|
||||||
|
states = {
|
||||||
|
warning = 15;
|
||||||
|
critical = 10;
|
||||||
|
};
|
||||||
|
format = " {capacity}% {time}"; # Icon: bolt
|
||||||
|
format-discharging = "{icon} {capacity}% {time}";
|
||||||
|
format-time = "{H}:{M}";
|
||||||
|
format-icons = [
|
||||||
|
"" # Icon: battery-full
|
||||||
|
"" # Icon: battery-three-quarters
|
||||||
|
"" # Icon: battery-half
|
||||||
|
"" # Icon: battery-quarter
|
||||||
|
"" # Icon: battery-empty
|
||||||
|
];
|
||||||
|
tooltip = "true";
|
||||||
|
};
|
||||||
|
|
||||||
|
cpu = {
|
||||||
|
interval = "5";
|
||||||
|
format = " {usage}% ({load})"; # Icon: microchip
|
||||||
|
states = {
|
||||||
|
warning = "70";
|
||||||
|
critical = "90";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
#"custom/keyboard-layout" = {
|
||||||
|
# exec = pkgs.writeShellScript "keyboard-layout" "swaymsg -t get_inputs | grep -m1 'xkb_active_layout_name' | cut -d '\"' -f4";
|
||||||
|
# # Interval set only as a fallback, as the value is updated by signal
|
||||||
|
# interval = "30";
|
||||||
|
# format = " {}"; # Icon: keyboard
|
||||||
|
# # Signal sent by Sway key binding (~/.config/sway/key-bindings)
|
||||||
|
# signal = "1"; # SIGHUP
|
||||||
|
# tooltip = "false";
|
||||||
|
#};
|
||||||
|
|
||||||
|
memory = {
|
||||||
|
interval = "5";
|
||||||
|
format = " {}%"; # Icon: microchip
|
||||||
|
states = {
|
||||||
|
warning = "70";
|
||||||
|
critical = "90";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
network = {
|
||||||
|
interval = "5";
|
||||||
|
format-wifi = " {essid} ({signalStrength}%)"; # Icon: wifi
|
||||||
|
format-ethernet = "🔗 {ifname}: {ipaddr}/{cidr}"; # Icon: ethernet
|
||||||
|
format-disconnected = "🔗";
|
||||||
|
tooltip-format = "{ifname}: {ipaddr}";
|
||||||
|
};
|
||||||
|
|
||||||
|
"sway/mode" = {
|
||||||
|
format =
|
||||||
|
''<span style="italic"> {}</span>''; # Icon: expand-arrows-alt
|
||||||
|
tooltip = "false";
|
||||||
|
};
|
||||||
|
|
||||||
|
"sway/window" = {
|
||||||
|
format = "{}";
|
||||||
|
max-length = "120";
|
||||||
|
};
|
||||||
|
|
||||||
|
"sway/workspaces" = {
|
||||||
|
all-outputs = false;
|
||||||
|
disable-scroll = true;
|
||||||
|
format = "{icon}";
|
||||||
|
format-icons = {
|
||||||
|
"10" = " 10";
|
||||||
|
"11" = " 11";
|
||||||
|
"12" = " 12";
|
||||||
|
"13" = " 13";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
pulseaudio = {
|
||||||
|
scroll-step = 3;
|
||||||
|
format = "{icon} {volume}%";
|
||||||
|
format-bluetooth = "{icon} {volume}%";
|
||||||
|
format-muted = "🔇";
|
||||||
|
format-icons = {
|
||||||
|
headphones = "";
|
||||||
|
handsfree = "";
|
||||||
|
headset = "";
|
||||||
|
phone = "";
|
||||||
|
portable = "";
|
||||||
|
car = "";
|
||||||
|
default = [ "" "" "" ];
|
||||||
|
};
|
||||||
|
on-click = "pavucontrol";
|
||||||
|
};
|
||||||
|
|
||||||
|
temperature = {
|
||||||
|
critical-threshold = 80;
|
||||||
|
interval = 5;
|
||||||
|
format = "{icon} {temperatureC}°C";
|
||||||
|
format-icons = [
|
||||||
|
"" # Icon: temperature-empty
|
||||||
|
"" # Icon: temperature-quarter
|
||||||
|
"" # Icon: temperature-half
|
||||||
|
"" # Icon: temperature-three-quarters
|
||||||
|
"" # Icon: temperature-full
|
||||||
|
];
|
||||||
|
tooltip = "true";
|
||||||
|
hwmon-path = "/sys/class/hwmon/hwmon2/temp1_input";
|
||||||
|
};
|
||||||
|
|
||||||
|
idle_inhibitor = {
|
||||||
|
format = "{icon}";
|
||||||
|
format-icons = {
|
||||||
|
activated = "";
|
||||||
|
deactivated = "";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
tray = {
|
||||||
|
icon-size = "21";
|
||||||
|
spacing = "10";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}];
|
||||||
|
|
||||||
|
systemd.enable = true;
|
||||||
|
|
||||||
|
style = ''
|
||||||
|
/* =============================================================================
|
||||||
|
*
|
||||||
|
* Waybar configuration
|
||||||
|
*
|
||||||
|
* Configuration reference: https://github.com/Alexays/Waybar/wiki/Configuration
|
||||||
|
*
|
||||||
|
* =========================================================================== */
|
||||||
|
|
||||||
|
/* -----------------------------------------------------------------------------
|
||||||
|
* Keyframes
|
||||||
|
* -------------------------------------------------------------------------- */
|
||||||
|
|
||||||
|
@keyframes blink-warning {
|
||||||
|
70% {
|
||||||
|
color: white;
|
||||||
|
}
|
||||||
|
|
||||||
|
to {
|
||||||
|
color: white;
|
||||||
|
background-color: orange;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@keyframes blink-critical {
|
||||||
|
70% {
|
||||||
|
color: white;
|
||||||
|
}
|
||||||
|
|
||||||
|
to {
|
||||||
|
color: white;
|
||||||
|
background-color: red;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/* -----------------------------------------------------------------------------
|
||||||
|
* Base styles
|
||||||
|
* -------------------------------------------------------------------------- */
|
||||||
|
|
||||||
|
/* Reset all styles */
|
||||||
|
* {
|
||||||
|
border: none;
|
||||||
|
border-radius: 0;
|
||||||
|
min-height: 0;
|
||||||
|
margin: 0;
|
||||||
|
padding: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* The whole bar */
|
||||||
|
#waybar {
|
||||||
|
background: #323232;
|
||||||
|
color: white;
|
||||||
|
/*font-family: Cantarell, Noto Sans, sans-serif;*/
|
||||||
|
font-size: 13px;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Each module */
|
||||||
|
#battery,
|
||||||
|
#clock,
|
||||||
|
#cpu,
|
||||||
|
#custom-keyboard-layout,
|
||||||
|
#memory,
|
||||||
|
#mode,
|
||||||
|
#network,
|
||||||
|
#pulseaudio,
|
||||||
|
#temperature,
|
||||||
|
#backlight,
|
||||||
|
#idle_inhibitor,
|
||||||
|
#tray {
|
||||||
|
margin-left: 5px;
|
||||||
|
margin-right: 5px;
|
||||||
|
padding-left: 5px;
|
||||||
|
padding-right: 5px;
|
||||||
|
/*border-right: solid 1px black;*/
|
||||||
|
}
|
||||||
|
|
||||||
|
#backlight {
|
||||||
|
margin-right: 0;
|
||||||
|
padding-right: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
#idle_inhibiter {
|
||||||
|
margin-left: 0;
|
||||||
|
padding-left: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/* -----------------------------------------------------------------------------
|
||||||
|
* Module styles
|
||||||
|
* -------------------------------------------------------------------------- */
|
||||||
|
|
||||||
|
#battery {
|
||||||
|
animation-timing-function: linear;
|
||||||
|
animation-iteration-count: infinite;
|
||||||
|
animation-direction: alternate;
|
||||||
|
}
|
||||||
|
|
||||||
|
#battery.warning {
|
||||||
|
color: orange;
|
||||||
|
}
|
||||||
|
|
||||||
|
#battery.critical {
|
||||||
|
color: red;
|
||||||
|
}
|
||||||
|
|
||||||
|
#battery.warning.discharging {
|
||||||
|
animation-name: blink-warning;
|
||||||
|
animation-duration: 4s;
|
||||||
|
}
|
||||||
|
|
||||||
|
#battery.critical.discharging {
|
||||||
|
animation-name: blink-critical;
|
||||||
|
animation-duration: 3s;
|
||||||
|
}
|
||||||
|
|
||||||
|
#clock {
|
||||||
|
font-weight: bold;
|
||||||
|
}
|
||||||
|
|
||||||
|
#cpu {
|
||||||
|
/* No styles */
|
||||||
|
}
|
||||||
|
|
||||||
|
#cpu.warning {
|
||||||
|
color: orange;
|
||||||
|
}
|
||||||
|
|
||||||
|
#cpu.critical {
|
||||||
|
color: red;
|
||||||
|
}
|
||||||
|
|
||||||
|
#memory {
|
||||||
|
animation-timing-function: linear;
|
||||||
|
animation-iteration-count: infinite;
|
||||||
|
animation-direction: alternate;
|
||||||
|
}
|
||||||
|
|
||||||
|
#memory.warning {
|
||||||
|
color: orange;
|
||||||
|
}
|
||||||
|
|
||||||
|
#memory.critical {
|
||||||
|
color: red;
|
||||||
|
animation-name: blink-critical;
|
||||||
|
animation-duration: 2s;
|
||||||
|
}
|
||||||
|
|
||||||
|
#mode {
|
||||||
|
background: #64727D;
|
||||||
|
border-top: 2px solid white;
|
||||||
|
/* To compensate for the top border and still have vertical centering */
|
||||||
|
padding-bottom: 2px;
|
||||||
|
}
|
||||||
|
|
||||||
|
#network {
|
||||||
|
/* No styles */
|
||||||
|
}
|
||||||
|
|
||||||
|
#network.disconnected {
|
||||||
|
color: orange;
|
||||||
|
}
|
||||||
|
|
||||||
|
#pulseaudio {
|
||||||
|
/* No styles */
|
||||||
|
}
|
||||||
|
|
||||||
|
#pulseaudio.muted {
|
||||||
|
/* No styles */
|
||||||
|
}
|
||||||
|
|
||||||
|
#custom-spotify {
|
||||||
|
color: rgb(102, 220, 105);
|
||||||
|
}
|
||||||
|
|
||||||
|
#temperature {
|
||||||
|
/* No styles */
|
||||||
|
}
|
||||||
|
|
||||||
|
#temperature.critical {
|
||||||
|
color: red;
|
||||||
|
}
|
||||||
|
|
||||||
|
#tray {
|
||||||
|
/* No styles */
|
||||||
|
}
|
||||||
|
|
||||||
|
#window {
|
||||||
|
font-weight: bold;
|
||||||
|
}
|
||||||
|
|
||||||
|
#workspaces button {
|
||||||
|
border-top: 2px solid transparent;
|
||||||
|
/* To compensate for the top border and still have vertical centering */
|
||||||
|
padding-bottom: 2px;
|
||||||
|
padding-left: 10px;
|
||||||
|
padding-right: 10px;
|
||||||
|
color: #888888;
|
||||||
|
}
|
||||||
|
|
||||||
|
#workspaces button.focused {
|
||||||
|
border-color: #4c7899;
|
||||||
|
color: white;
|
||||||
|
background-color: #285577;
|
||||||
|
}
|
||||||
|
|
||||||
|
#workspaces button.urgent {
|
||||||
|
border-color: #c9545d;
|
||||||
|
color: #c9545d;
|
||||||
|
}
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
systemd.user.services.waybar = with lib; {
|
||||||
|
# Install.WantedBy = mkForce [ "sway-session.target" ]; # TODO: Set as systemd.target with 22.05
|
||||||
|
Unit = {
|
||||||
|
Requisite = mkForce [ ];
|
||||||
|
After = mkForce [ ];
|
||||||
|
PartOf = [ "tray.target" ];
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
|
@ -14,7 +14,7 @@ let
|
||||||
netflix = web-app "netflix" "https://netflix.com/";
|
netflix = web-app "netflix" "https://netflix.com/";
|
||||||
disneyplus = web-app "disneyplus" "https://disneyplus.com/";
|
disneyplus = web-app "disneyplus" "https://disneyplus.com/";
|
||||||
in {
|
in {
|
||||||
home-manager.users.fhauser.home.packages = [
|
home.packages = [
|
||||||
whatsapp
|
whatsapp
|
||||||
netflix
|
netflix
|
||||||
disneyplus
|
disneyplus
|
11
home/fhauser/default.nix
Normal file
11
home/fhauser/default.nix
Normal file
|
@ -0,0 +1,11 @@
|
||||||
|
{ config, pkgs, lib, nixosConfig, ... }: {
|
||||||
|
imports =
|
||||||
|
[ ./multimedia.nix ./applications ./work ./mimetypes.nix ./games.nix ];
|
||||||
|
home.stateVersion = nixosConfig.system.stateVersion;
|
||||||
|
systemd.user.targets.tray = {
|
||||||
|
Unit = {
|
||||||
|
Description = "Home Manager System Tray";
|
||||||
|
Requires = [ "graphical-session-pre.target" ];
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
|
@ -1,7 +1,7 @@
|
||||||
{ config, lib, pkgs, ... }:
|
{ config, pkgs, lib, ... }:
|
||||||
|
|
||||||
{
|
{
|
||||||
environment.systemPackages = with pkgs;
|
home.packages = with pkgs;
|
||||||
[
|
[
|
||||||
neverball
|
neverball
|
||||||
wesnoth
|
wesnoth
|
||||||
|
@ -10,7 +10,6 @@
|
||||||
superTuxKart
|
superTuxKart
|
||||||
extremetuxracer
|
extremetuxracer
|
||||||
zeroad
|
zeroad
|
||||||
|
|
||||||
] ++ (with pkgs.gnome; [ # Selection of gnome games
|
] ++ (with pkgs.gnome; [ # Selection of gnome games
|
||||||
five-or-more
|
five-or-more
|
||||||
four-in-a-row
|
four-in-a-row
|
|
@ -1,6 +1,6 @@
|
||||||
{ pkgs, lib, config, ... }: {
|
{ pkgs, lib, config, ... }: {
|
||||||
|
|
||||||
home-manager.users.fhauser.xdg.mimeApps = rec {
|
xdg.mimeApps = rec {
|
||||||
enable = true;
|
enable = true;
|
||||||
associations.added = defaultApplications;
|
associations.added = defaultApplications;
|
||||||
defaultApplications = let
|
defaultApplications = let
|
|
@ -1,7 +1,7 @@
|
||||||
{ config, pkgs, lib, ... }:
|
{ config, pkgs, lib, ... }:
|
||||||
|
|
||||||
{
|
{
|
||||||
home-manager.users.fhauser.home.packages = with pkgs;
|
home.packages = with pkgs;
|
||||||
[ vlc v4l-utils calibre blender openshot-qt playerctl youtube-dl ]
|
[ vlc v4l-utils calibre blender openshot-qt playerctl youtube-dl ]
|
||||||
++ [ # Audio
|
++ [ # Audio
|
||||||
audacity
|
audacity
|
|
@ -1,6 +1,6 @@
|
||||||
{ config, pkgs, lib, ... }:
|
{ config, pkgs, lib, ... }:
|
||||||
|
|
||||||
{
|
{
|
||||||
# Note: Some of these files might not be provided by this repository.
|
# Note: Some of these files might not be provided by this repository.
|
||||||
imports = [ ./openvpn.nix ];
|
# TODO
|
||||||
|
#imports = [ ./openvpn.nix ];
|
||||||
}
|
}
|
|
@ -12,15 +12,9 @@
|
||||||
../../defaults/base
|
../../defaults/base
|
||||||
../../defaults/cifs-auth-fix
|
../../defaults/cifs-auth-fix
|
||||||
../../defaults/desktop
|
../../defaults/desktop
|
||||||
../../defaults/games
|
|
||||||
../../defaults/user-configuration
|
|
||||||
../../defaults/user-configuration/fhauser
|
|
||||||
#../../defaults/printing
|
#../../defaults/printing
|
||||||
];
|
];
|
||||||
|
|
||||||
#TODO: Clean up next section
|
|
||||||
#services.xserver.dpi = 180;
|
|
||||||
|
|
||||||
virtualisation = { # TODO: This should probably be somewhere else.
|
virtualisation = { # TODO: This should probably be somewhere else.
|
||||||
docker = {
|
docker = {
|
||||||
enable = true;
|
enable = true;
|
||||||
|
|
|
@ -10,7 +10,7 @@
|
||||||
isNormalUser = true;
|
isNormalUser = true;
|
||||||
description = "Fabian Hauser";
|
description = "Fabian Hauser";
|
||||||
group = "fhauser";
|
group = "fhauser";
|
||||||
extraGroups = [ "wheel" "video" "docker" "networkmanager" "libvirtd" ];
|
extraGroups = [ "wheel" "video" "docker" "networkmanager" "libvirtd" "adbusers" ];
|
||||||
hashedPassword =
|
hashedPassword =
|
||||||
"$6$rounds=20000$TYZ8CojfBLwejcwn$smEJe6/anL9NGf.Ytfny14nBfhr4TRPv2XK1lgHz7yg.zQow1HACePirEjsjxzFC6vTHGaT8t2NxobUsHbWLg1";
|
"$6$rounds=20000$TYZ8CojfBLwejcwn$smEJe6/anL9NGf.Ytfny14nBfhr4TRPv2XK1lgHz7yg.zQow1HACePirEjsjxzFC6vTHGaT8t2NxobUsHbWLg1";
|
||||||
openssh.authorizedKeys.keys = [
|
openssh.authorizedKeys.keys = [
|
||||||
|
|
Loading…
Add table
Reference in a new issue