Remove backup, use firefox-bin

This commit is contained in:
Erwin Boskma 2021-11-22 08:04:54 +01:00
parent d5098220e0
commit ae854f1a74
Signed by: erwin
GPG key ID: 270B20D17394F7E5
35 changed files with 103 additions and 1190 deletions

1
.gitignore vendored Normal file
View file

@ -0,0 +1 @@
/backup

View file

@ -1,5 +0,0 @@
{ pkgs, home-manager, system, lib, overlays, ... }:
rec {
user = import ./user.nix { inherit pkgs home-manager lib system overlays; };
host = import ./host.nix { inherit system pkgs home-manager lib user; };
}

View file

@ -1,47 +0,0 @@
{ system, pkgs, home-manager, lib, user, ... }:
with builtins;
{
mkHost = { name, NICs, initrdMods, kernelMods, kernelParams, kernelPackage,
systemConfig, cpuCores, users, wifi ? [],
gpuTempSensor ? null, cpuTempSensor ? null
}:
let
networkCfg = listToAttrs (map (n: {
name = "${n}"; value = { useDHCP = true; };
}) NICs);
userCfg = {
inherit name NICs systemConfig cpuCores gpuTempSensor cpuTempSensor;
};
sys_users = (map (u: user.mkSystemUser u) users);
in lib.nixosSystem {
inherit system;
modules = [
{
imports = [ ../modules/system ] ++ sys_users;
eb = systemConfig;
environment.etc = {
"hmsystemdata.json".text = toJSON userCfg;
};
networking.hostName = "${name}";
networking.interfaces = networkCfg;
networking.wireless.interfaces = wifi;
boot.initrd.availableKernelModules = initrdMods;
boot.kernelModules = kernelMods;
boot.kernelParams = kernelParams;
boot.kernelPackages = kernelPackage;
nixpkgs.pkgs = pkgs;
nix.maxJobs = lib.mkDefault cpuCores;
system.stateVersion = "21.05";
}
];
};
}

View file

@ -1,49 +0,0 @@
{ pkgs, home-manager, lib, system, overlays, ... }:
with builtins;
{
mkHMUser = { userConfig, username }:
home-manager.lib.homeManagerConfiguration {
inherit system username pkgs;
stateVersion = "21.05";
configuration =
let
trySettings = tryEval (fromJSON (readFile /etc/hmsystemdata.json));
machineData = if trySettings.success then trySettings.value else {};
machineModule = { pkgs, config, lib, ... }: {
options.machineData = lib.mkOption {
default = {};
description = "Settings passed from nixos system config. If not present it will be empty.";
};
config.machineData = machineData;
};
in {
erwin = userConfig;
nixpkgs.overlays = overlays;
nixpkgs.config.allowUnfree = true;
systemd.user.startServices = true;
home.stateVersion = "21.05";
home.username = username;
home.homeDirectory = "/home/${username}";
imports = [ ../modules/users machineModule ];
};
homeDirectory = "/home/${username}";
};
mkSystemUser = { name, groups, uid, shell, ... }:
{
users.users."${name}" = {
name = name;
isNormalUser = true;
isSystemUser = false;
extraGroups = groups;
uid = uid;
initialPassword = "helloworld";
shell = shell;
};
};
}

View file

@ -1,86 +0,0 @@
{ pkgs, config, lib, modulesPath, ... }:
with lib;
let
cfg = config.eb.boot;
in
{
options.eb.boot = {
type = mkOption {
description = "Type of boot. Default bios.";
default = null;
type = types.enum [ "bios" "uefi" ];
};
qemu = mkEnableOption {
description = "Set to true if running in qemu";
};
grubInstallDevice = mkOption {
description = "The disk to install Grub to";
type = types.nullOr types.str;
default = null;
};
};
config = mkMerge [
{
fileSystems."/" = {
device = "/dev/disk/by-label/nixos";
fsType = "ext4";
};
swapDevices = [{ device = "/dev/disk/by-label/swap"; }];
}
(mkIf (cfg.type == "bios") {
boot.loader = {
grub = {
enable = true;
version = 2;
device = cfg.grubInstallDevice;
efiSupport = false;
useOSProber = true;
extraEntries = ''
menuentry "Reboot" {
reboot
}
menuentry "Power off" {
halt
}
'';
};
};
})
(mkIf (cfg.type == "uefi") {
boot.loader = {
systemd-boot = {
enable = true;
editor = false;
configurationLimit = 10;
};
efi.canTouchEfiVariables = true;
};
fileSystems."/boot" = {
device = "/dev/disk/by-label/boot";
fsType = "vfat";
};
})
(mkIf (cfg.qemu) {
boot.initrd = {
availableKernelModules = [ "virtio_net" "virtio_pci" "virtio_mmio" "virtio_blk" "virtio_scsi" "9p" "9pnet_virtio" ];
kernelModules = [ "virtio_balloon" "virtio_console" "virtio_rng" ];
postDeviceCommands =
''
hwclock -s
'';
};
services.qemuGuest.enable = true;
services.spice-vdagentd.enable = true;
})
];
}

View file

@ -1,73 +0,0 @@
{ pkgs, config, lib, ... }:
with lib;
let
cfg = config.eb.core;
in
{
options.eb.core = {
enable = mkOption {
description = "Enable core options";
type = types.bool;
default = true;
};
};
config = mkIf (cfg.enable) {
nix = {
package = pkgs.nixUnstable;
extraOptions = "experimental-features = nix-command flakes";
gc = {
automatic = true;
options = "--delete-older-than 10d";
};
};
environment.shells = [ pkgs.fish pkgs.zsh pkgs.bash ];
console = {
font = "Lat2-Terminus16";
};
i18n.defaultLocale = "en_US.UTF-8";
time.timeZone = "Europe/Amsterdam";
powerManagement.cpuFreqGovernor = lib.mkDefault "performance";
hardware.enableRedistributableFirmware = lib.mkDefault true;
environment.systemPackages = with pkgs; [
unzip
zsh
fish
gawk
gnused
curl
xh
bottom
acpi
pstree
git
patchelf
nix-index
manix
neovim
];
security.sudo.extraConfig = ''Defaults env_reset,timestamp_timeout=5,insults,lecture="always"'';
security.sudo.execWheelOnly = true;
services.openssh.enable = true;
hardware.opengl = {
enable = true;
driSupport = true;
};
};
}

View file

@ -1,3 +0,0 @@
{ pkgs, config, lib, modulesPath, ... }: {
imports = [ ./boot ./core ./nixos ];
}

View file

@ -1,19 +0,0 @@
{ pkgs, config, lib, ... }:
with lib;
let
cfg = config.eb.nixos;
in {
options.eb.nixos = {
enable = mkOption {
description = "Whether to enable nixos settings";
type = types.bool;
default = false;
};
};
config = mkIf (cfg.enable) {
environment.systemPackages = [
];
};
}

View file

@ -1,85 +0,0 @@
{
enable = true;
settings = {
window = {
decorations = "full";
startup_mode = "Maximized";
};
scrolling = {
history = 100000;
};
font = {
normal = {
family = "CaskaydiaCove Nerd Font";
style = "Medium";
};
size = 10.0;
};
colors = {
primary = {
background = "#2e3440";
foreground = "#d8dee9";
dim_foreground = "#a5abb6";
};
cursor = {
text = "#2e3440";
cursor = "#d8dee9";
};
vi_mode_cursor = {
text = "#2e3440";
cursor = "#d8dee9";
};
selection = {
text = "CellForeground";
background = "#4c566a";
};
search = {
matches = {
foreground = "CellBackground";
background = "#88c0d0";
};
bar = {
background = "#434c5e";
foreground = "#d8dee9";
};
};
normal = {
black = "#3b4252";
red = "#bf616a";
green = "#a3be8c";
yellow = "#ebcb8b";
blue = "#81a1c1";
magenta = "#b48ead";
cyan = "#88c0d0";
white = "#e5e9f0";
};
bright = {
black = "#4c566a";
red = "#bf616a";
green = "#a3be8c";
yellow = "#ebcb8b";
blue = "#81a1c1";
magenta = "#b48ead";
cyan = "#8fbcbb";
white = "#eceff4";
};
dim = {
black = "#373e4d";
red = "#94545d";
green = "#809575";
yellow = "#b29e75";
blue = "#68809a";
magenta = "#8c738c";
cyan = "#6d96a5";
white = "#aeb3bb";
};
background_opacity = 0.9;
live_config_reload = true;
mouse = {
hide_when_typing = true;
};
};
};
}

View file

@ -1,41 +0,0 @@
{ pkgs, config, lib, ... }:
with lib;
let
cfg = config.erwin.applications;
in
{
options.erwin.applications = {
enable = mkEnableOption {
description = "Enable a set of common applications";
};
work = mkOption {
description = "Is this a work config?";
type = types.bool;
default = false;
};
};
config = mkIf (cfg.enable) {
home.sessionVariables = {
EDITOR = "vim";
};
home.packages = with pkgs; [
neovim
(nerdfonts.override { fonts = [ "CascadiaCode" "FantasqueSansMono" "FiraCode" "JetBrainsMono" "Meslo" "Noto" "SourceCodePro" ]; })
];
fonts.fontconfig.enable = true;
xdg = {
enable = true;
};
programs = {
alacritty = import ./alacritty.nix;
firefox = import ./firefox.nix { work = cfg.work; };
};
};
}

View file

@ -1,15 +0,0 @@
{ work }: {
enable = true;
profiles = {
private = {
id = 0;
isDefault = !work;
};
horus = {
id = 1;
isDefault = work;
};
};
}

View file

@ -1,19 +0,0 @@
{ pkgs, config, lib, ... }:
with lib;
let cfg = config.erwin.rofi;
in
{
options.erwin.rofi = {
enable = mkEnableOption {
description = "Enable rofi";
};
};
config = mkIf (cfg.enable) {
programs.rofi = {
enable = true;
package = pkgs.rofi-wayland;
};
};
}

View file

@ -1,12 +0,0 @@
{ pkgs, config, lib, ... }:
{
imports = [
./applications
./fish
./git
./gpg
./ssh
./sway
];
}

View file

@ -1,27 +0,0 @@
{ pkgs, config, lib, ... }:
with lib;
let cfg = config.erwin.fish;
in {
options.erwin.fish = {
enable = mkEnableOption {
description = "Enable fish shell";
};
};
config = mkIf (cfg.enable) (let starship = pkgs.starship;
in {
programs.starship = {
enable = true;
enableFishIntegration = true;
};
programs.fish = {
enable = true;
# interactiveShellInit = ''
# source ("${starship}/bin/starship" init fish --print-full-init | psub)
# '';
};
});
}

View file

@ -1,41 +0,0 @@
{ pkgs, config, lib, ... }:
with lib;
let
cfg = config.erwin.git;
in {
options.erwin.git = {
enable = mkOption {
description = "Enable git";
type = types.bool;
default = false;
};
userName = mkOption {
description = "Name for git";
type = types.str;
default = "Erwin Boskma";
};
userEmail = mkOption {
description = "Email for git";
type = types.str;
default = "erwin@datarift.nl";
};
};
config = mkIf (cfg.enable) {
programs.git = {
enable = true;
userName = cfg.userName;
userEmail = cfg.userEmail;
extraConfig = {
credential.helper = "${pkgs.git.override { withLibsecret = true; }}/bin/git-credential-libsecret";
};
};
home.packages = with pkgs; [
];
};
}

View file

@ -1,32 +0,0 @@
{ pkgs, config, lib, ... }:
with lib;
let
cfg = config.erwin.gpg;
in {
options.erwin.gpg = {
enable = mkOption {
description = "Enable GPG";
type = types.bool;
default = false;
};
};
config = mkIf (cfg.enable) {
home.packages = with pkgs; [
pinentry-curses
];
programs.gpg = {
enable = true;
};
services.gpg-agent = {
enable = true;
pinentryFlavor = "curses";
enableSshSupport = true;
defaultCacheTtlSsh = 14400;
maxCacheTtlSsh = 14400;
};
};
}

View file

@ -1,22 +0,0 @@
{ pkgs, config, lib, ... }:
with lib;
let
cfg = config.erwin.input;
in {
options.erwin.input = {
enable = mkOption {
description = "Enable input configuration";
type = types.bool;
default = false;
};
};
config = mkIf (cfg.enable) {
home.keyboard = {
layout = "us";
variant = "colemak";
options = [];
};
};
}

View file

@ -1,23 +0,0 @@
{ pkgs, config, lib, ... }:
with lib;
let
cfg = config.erwin.ssh;
in {
options.erwin.ssh = {
enable = mkOption {
description = "Enable ssh";
type = types.bool;
default = false;
};
};
config = mkIf (cfg.enable) {
home.packages = with pkgs; [
];
programs.ssh = {
enable = true;
};
};
}

View file

@ -1,51 +0,0 @@
{ pkgs, config, lib, ... }:
with lib;
let cfg = config.erwin.sway;
in
{
options.erwin.sway = {
enable = mkEnableOption {
description = "Enable sway";
};
};
config = mkIf (cfg.enable) {
wayland.windowManager.sway = {
enable = true;
config = import ./sway.nix {
inherit pkgs config lib;
};
extraSessionCommands =
''
export _JAVA_AWT_WM_NONREPARENTING=1
export MOZ_ENABLE_WAYLAND=1
export MOZ_DBUS_REMOTE=1
export QT_QPA_PLATFORM=wayland
export QT_WAYLAND_DISABLE_WINDOWDECORATION="1"
export QT_QPA_PLATFORMTHEME=qt5ct
export SDL_VIDEODRIVER=wayland
export SSH_AUTH_SOCK="''${XDG_RUNTIME_DIR}/gnupg/S.gpg-agent.ssh"
'';
wrapperFeatures = {
base = true;
gtk = true;
};
xwayland = true;
};
programs.waybar = import ./waybar.nix { inherit pkgs config lib; };
home.file.".wallpapers".source = ./wallpapers;
systemd.user.targets.tray = {
Unit = {
Description = "Home Manager System Tray";
Requires = [ "graphical-session-pre.target" ];
};
};
};
}

View file

@ -1,162 +0,0 @@
{ pkgs, config, lib, ... }:
let
cfg = config.wayland.windowManager.sway;
mod = "Mod4";
swaylockcmd = "${pkgs.swaylock}/bin/swaylock --ignore-empty-password --daemonize --show-failed-attempts --indicator-caps-lock --clock --image /home/erwin/Dropbox/Private/Wallpapers/2560x1440/arch.png --fade-in 0.5 --scaling fill";
in
{
modifier = mod;
assigns = {
"1" = [{ app_id = "firefox"; }];
"2" = [{ app_id = "Alacritty"; }];
"3" = [{ class = "Code"; }];
"10" = [{ class = "telegramdesktop"; } { class = "Signal"; }];
};
bars = [
{
command = "${pkgs.waybar}/bin/waybar";
}
];
left = "n";
down = "e";
up = "i";
right = "o";
floating = {
criteria = [{ app_id = "gnome-calculator"; }];
modifier = mod;
};
fonts = {
names = [ "MesloLGM Nerd Font" ];
style = "Regular";
size = 12.0;
};
gaps = {
inner = 10;
outer = 5;
smartBorders = "on";
};
input = {
"36125:40349:splitKB_Kyria" = {
xkb_options = "lv3:ralt_switch";
};
"1133:49291:Logitech_G502_HERO_SE" = {
natural_scroll = "enabled";
};
};
output = {
"Virtual-1" = {
bg = "~/.wallpapers/river-1920.png fill";
mode = "1920x1080@60Hz";
};
"DP-2" = {
bg = "~/.wallpapers/river-2560.png fill";
mode = "2560x1440@144Hz";
adaptive_sync = "on";
};
};
menu = "${pkgs.wofi}/bin/wofi --show drun -i | ${pkgs.findutils}/bin/xargs swaymsg exec --";
keybindings = {
"${cfg.config.modifier}+Return" = "exec ${cfg.config.terminal}";
"${cfg.config.modifier}+Shift+q" = "kill";
"${mod}+s" = "exec ${cfg.config.menu}";
"${mod}+Shift+s" = "exec ${pkgs.wofi}/bin/wofi --show run | ${pkgs.findutils}/bin/xargs swaymsg exec --";
"${cfg.config.modifier}+${cfg.config.left}" = "focus left";
"${cfg.config.modifier}+${cfg.config.down}" = "focus down";
"${cfg.config.modifier}+${cfg.config.up}" = "focus up";
"${cfg.config.modifier}+${cfg.config.right}" = "focus right";
"${cfg.config.modifier}+Left" = "focus left";
"${cfg.config.modifier}+Down" = "focus down";
"${cfg.config.modifier}+Up" = "focus up";
"${cfg.config.modifier}+Right" = "focus right";
"${cfg.config.modifier}+Shift+${cfg.config.left}" = "move left";
"${cfg.config.modifier}+Shift+${cfg.config.down}" = "move down";
"${cfg.config.modifier}+Shift+${cfg.config.up}" = "move up";
"${cfg.config.modifier}+Shift+${cfg.config.right}" = "move right";
"${cfg.config.modifier}+Shift+Left" = "move left";
"${cfg.config.modifier}+Shift+Down" = "move down";
"${cfg.config.modifier}+Shift+Up" = "move up";
"${cfg.config.modifier}+Shift+Right" = "move right";
"${mod}+h" = "split h";
"${mod}+v" = "split v";
"${mod}+t" = "fullscreen toggle";
"${cfg.config.modifier}+a" = "focus parent";
"${mod}+r" = "layout stacking";
"${cfg.config.modifier}+w" = "layout tabbed";
"${mod}+f" = "layout toggle split";
"${cfg.config.modifier}+Shift+space" = "floating toggle";
"${cfg.config.modifier}+space" = "focus mode_toggle";
"${cfg.config.modifier}+1" = "workspace number 1";
"${cfg.config.modifier}+2" = "workspace number 2";
"${cfg.config.modifier}+3" = "workspace number 3";
"${cfg.config.modifier}+4" = "workspace number 4";
"${cfg.config.modifier}+5" = "workspace number 5";
"${cfg.config.modifier}+6" = "workspace number 6";
"${cfg.config.modifier}+7" = "workspace number 7";
"${cfg.config.modifier}+8" = "workspace number 8";
"${cfg.config.modifier}+9" = "workspace number 9";
"${cfg.config.modifier}+Shift+1" =
"move container to workspace number 1";
"${cfg.config.modifier}+Shift+2" =
"move container to workspace number 2";
"${cfg.config.modifier}+Shift+3" =
"move container to workspace number 3";
"${cfg.config.modifier}+Shift+4" =
"move container to workspace number 4";
"${cfg.config.modifier}+Shift+5" =
"move container to workspace number 5";
"${cfg.config.modifier}+Shift+6" =
"move container to workspace number 6";
"${cfg.config.modifier}+Shift+7" =
"move container to workspace number 7";
"${cfg.config.modifier}+Shift+8" =
"move container to workspace number 8";
"${cfg.config.modifier}+Shift+9" =
"move container to workspace number 9";
"${cfg.config.modifier}+Shift+minus" = "move scratchpad";
"${cfg.config.modifier}+minus" = "scratchpad show";
"${cfg.config.modifier}+Shift+c" = "reload";
"${mod}+Shift+p" = "restart";
"${mod}+Shift+f" = "exec --no-startup-id ~/.config/wofi/session.sh";
"${mod}+l" = "exec ${swaylockcmd}";
"${mod}+p" = "mode resize";
"${mod}+Print" = "exec grim -o $(swaymsg -t get_outputs | ${pkgs.jq}/bin/jq -r '.[] | select(.focused) | .name')";
"${mod}+Shift+Print" = "exec grim -o $(swaymsg -t get_outputs | ${pkgs.jq}/bin/jq -r '.[] | select(.focused) | .name') - | ${pkgs.wl-clipboard}/bin/wl-copy -t \"image/png\" -f";
"${mod}+Shift+Ctrl+Print" = "exec grim -g \"$(${pkgs.slurp}/bin/slurp)\" - | ${pkgs.wl-clipboard}/bin/wl-copy -t \"image/png\" -f";
"${mod}+Shift+Alt+Print" = "exec grim -g \"$(${pkgs.slurp}/bin/slurp)\"";
"XF86AudioRaiseVolume" = "exec pamixer -ui 2 && pamixer --get-volume > $SWAYSOCK.wob";
"XF86AudioLowerVolume" = "exec pamixer -ud 2 && pamixer --get-volume > $SWAYSOCK.wob";
"XF86AudioMute" = "exec pamixer --toggle-mute && ( pamixer --get-mute && echo 0 > $SWAYSOCK.wob ) || pamixer --get-volume > $SWAYSOCK.wob";
"XF86Calculator" = "exec ${pkgs.gnome.gnome-calculator}/bin/gnome-calculator";
};
terminal = "${pkgs.alacritty}/bin/alacritty";
window = {
border = 1;
titlebar = false;
};
workspaceAutoBackAndForth = true;
}

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.8 MiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.8 MiB

View file

@ -1,356 +0,0 @@
{ pkgs, config, lib, ... }:
{
enable = true;
settings = [
{
layer = "top";
position = "top";
height = 30;
modules-left = [
"sway/workspaces"
"sway/mode"
# "custom/now_playing"
];
modules-center = [
"sway/window"
];
modules-right = [
"network"
"memory"
"cpu"
"temperature"
"custom/keyboard-layout"
"pulseaudio"
"tray"
"clock#date"
"clock#time"
"idle_inhibitor"
];
modules = {
"clock#time" = {
interval = 1;
format = "{:%H:%M:%S}";
tooltip = false;
};
"clock#date" = {
interval = 10;
format = " {:%e %b %Y}";
tooltip-format = "{:%e %B %Y}";
};
"cpu" = {
interval = 5;
format = " {usage}% ({load})";
states = {
warning = 70;
critical = 90;
};
};
"custom/keyboard-layout" = {
exec = "swaymsg -t get_inputs | grep -m1 'xkb_active_layout_name' | cut -d '\"' -f4";
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: memory
states = {
warning = 70;
critical = 90;
};
};
"network" = {
interval = 5;
format-wifi = " {essid} ({signalStrength}%)"; # Icon: wifi
format-ethernet = " {ifname}: {ipaddr}/{cidr}"; # Icon: ethernet
format-disconnected = " Disconnected";
tooltip-format = "{ifname}: {ipaddr}";
};
"sway/mode" = {
format = "<span style=\"italic\"> {}</span>"; # Icon: expand-arrows-alt
tooltip = false;
};
# TODO: package as nix thingy
# "custom/now_playing" = {
# exec = "${HOME}/.config/waybar/ha-now-playing --host home.datarift.nl --entity media_player.sonos_woonkamer --token <TOKEN>";
# format = " ♪ {}";
# interval = 2;
# on-click = "${HOME}/.config/waybar/ha-now-playing --host home.datarift.nl --entity media_player.sonos_woonkamer --token <TOKEN> play-pause";
# on-scroll-down = "${HOME}/.config/waybar/ha-now-playing --host home.datarift.nl --entity media_player.sonos_woonkamer --token <TOKEN> volume-up";
# on-scroll-up = "${HOME}/.config/waybar/ha-now-playing --host home.datarift.nl --entity media_player.sonos_woonkamer --token <TOKEN> volume-down";
# };
"sway/window" = {
format = "{}";
max-length = 120;
};
"sway/workspaces" = {
all-outputs = false;
disable-scroll = true;
format = "{icon} {name}";
format-icons = {
"1 =www" = "";
# Icon = firefox-browser
"2 =mail" = "";
# Icon = mail
"3 =editor" = "";
# Icon = code
"4 =terminals" = "";
# Icon = terminal
"5 =portal" = "";
# Icon = terminal
"urgent" = "";
"focused" = "";
"default" = "";
};
};
"pulseaudio" = {
#scroll-step = 1;
format = "{icon} {volume}%";
format-bluetooth = "{icon} {volume}%";
format-muted = "";
format-icons = {
headphones = "";
handsfree = "";
headset = "";
phone = "";
portable = "";
car = "";
default = [ "" "奔" "" ];
};
on-click = "pavucontrol";
};
"temperature" = {
hwmon-path = "/sys/class/hwmon/hwmon2/temp1_input";
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;
};
"tray" = {
icon-size = 21;
spacing = 10;
};
"idle_inhibitor" = {
format = "<span size=\"large\">{icon}</span>";
format-icons = {
activated = "";
deactivated = "";
};
};
};
}
];
style =
''
@keyframes blink-warning {
70% {
color: white;
}
to {
color: white;
background-color: orange;
}
}
@keyframes blink-critical {
70% {
color: white;
}
to {
color: white;
background-color: red;
}
}
* {
border: none;
border-radius: 0;
min-height: 0;
margin: 0;
padding: 0;
}
#waybar {
background: #323232;
color: white;
font-family: "MesloLGM Nerd Font", sans-serif;
font-size: 13px;
}
#battery,
#clock,
#cpu,
#custom-keyboard-layout,
#memory,
#mode,
#network,
#pulseaudio,
#temperature,
#tray,
#custom-now_playing,
#idle_inhibitor {
padding-left: 10px;
padding-right: 10px;
}
#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: 3s;
}
#battery.critical.discharging {
animation-name: blink-critical;
animation-duration: 2s;
}
#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;
}
#idle_inhibitor {
background-color: transparent;
font-weight: bold;
}
#idle_inhibitor.activated {
background-color: #c9545d;
color: #ffffff;
}
#custom-now_playing {
font-weight: bold;
}
'';
}

View file

@ -8,7 +8,8 @@ let
"devtools.theme" = "dark"; "devtools.theme" = "dark";
"widget.content.allow-gtk-dark-theme" = true; "widget.content.allow-gtk-dark-theme" = true;
"ui.key.menuAccessKeyFocuses" = false; "ui.key.menuAccessKeyFocuses" = false;
"image.avif.enable" = true; "image.avif.enabled" = true;
"image.webp.enabled" = true;
"privacy.webrtc.allowSilencingNotifications" = true; "privacy.webrtc.allowSilencingNotifications" = true;
"privacy.webrtc.legacyGlobalIndicator" = false; "privacy.webrtc.legacyGlobalIndicator" = false;
"browser.shell.checkDefaultBrowser" = false; "browser.shell.checkDefaultBrowser" = false;
@ -27,6 +28,7 @@ in
config = mkIf (cfg.enable) { config = mkIf (cfg.enable) {
programs.firefox = { programs.firefox = {
enable = true; enable = true;
package = pkgs.firefox-bin;
profiles = { profiles = {
private = { private = {

View file

@ -13,10 +13,19 @@ in
package = pkgs.rofi-wayland; package = pkgs.rofi-wayland;
theme = ./launch.rasi; theme = ./launch.rasi;
terminal = "${pkgs.alacritty}/bin/alacritty"; terminal = "${pkgs.alacritty}/bin/alacritty";
extraConfig = {
modi = "drun";
font = "Overpass Nerd Font 10";
display-drun = "";
sidebar-mode = false;
show-icons = true;
icon-theme = "Paper";
};
}; };
home.file.".local/rofi/themes/power.rasi" = { home.file.rofi_theme_power = {
source = ./power.rasi; source = ./power.rasi;
target = ".local/share/rofi/themes/power.rasi";
}; };
}; };
} }

View file

@ -1,14 +1,3 @@
configuration {
modi: "drun";
font: "Overpass Nerd Font 10";
display-drun: "";
sidebar-mode: false;
show-icons: true;
icon-theme: "Paper";
}
@theme "/dev/null"
* { * {
bg: #b5b5aa; bg: #b5b5aa;
fg: #2b2b2b; fg: #2b2b2b;

View file

@ -14,7 +14,7 @@ configuration {
spacing: 0; spacing: 0;
background-color: transparent; background-color: transparent;
font: "DroidSansMono Nerd Font Mono, 14, FontAwesome5Free, 14"; font: "DroidSansMono Nerd Font, 14";
highlight: bold; highlight: bold;
text-color: @text; text-color: @text;
} }
@ -28,7 +28,7 @@ window {
} }
inputbar { inputbar {
enabled: false; enabled: true;
border: 1px; border: 1px;
border-color: @orange; border-color: @orange;
border-radius: 5px; border-radius: 5px;

View file

@ -4,6 +4,7 @@ let
cfg = config.eboskma.programs.sway; cfg = config.eboskma.programs.sway;
mod = "Mod4"; mod = "Mod4";
swaylockcmd = "${pkgs.swaylock-effects}/bin/swaylock --ignore-empty-password --daemonize --show-failed-attempts --indicator-caps-lock --clock --image ~/.wallpapers/river-2560.png --fade-in 0.5 --scaling fill"; swaylockcmd = "${pkgs.swaylock-effects}/bin/swaylock --ignore-empty-password --daemonize --show-failed-attempts --indicator-caps-lock --clock --image ~/.wallpapers/river-2560.png --fade-in 0.5 --scaling fill";
rofiPower = pkgs.writeShellScriptBin "rofi-power" (builtins.readFile ./powermenu.sh);
in in
{ {
options.eboskma.programs.sway.enable = mkEnableOption "Enable sway"; options.eboskma.programs.sway.enable = mkEnableOption "Enable sway";
@ -68,7 +69,8 @@ in
}; };
}; };
menu = "${pkgs.wofi}/bin/wofi --show drun -i | ${pkgs.findutils}/bin/xargs swaymsg exec --"; # menu = "${pkgs.wofi}/bin/wofi --show drun -i | ${pkgs.findutils}/bin/xargs swaymsg exec --";
menu = "${pkgs.rofi}/bin/rofi -show drun -no-lazy-grab";
keybindings = { keybindings = {
"${mod}+Return" = "exec ${config.wayland.windowManager.sway.config.terminal}"; "${mod}+Return" = "exec ${config.wayland.windowManager.sway.config.terminal}";
@ -141,9 +143,8 @@ in
"${mod}+minus" = "scratchpad show"; "${mod}+minus" = "scratchpad show";
"${mod}+Shift+c" = "reload"; "${mod}+Shift+c" = "reload";
"${mod}+Shift+p" = "restart";
"${mod}+Shift+f" = "exec --no-startup-id ~/.config/rofi/session.sh"; "${mod}+Shift+f" = "exec --no-startup-id ${rofiPower}/bin/rofi-power";
"${mod}+l" = "exec ${swaylockcmd}"; "${mod}+l" = "exec ${swaylockcmd}";
"${mod}+p" = "mode resize"; "${mod}+p" = "mode resize";
@ -211,7 +212,7 @@ in
packages = with pkgs; [ packages = with pkgs; [
dunst dunst
swayidle swayidle
swaylock swaylock-effects
]; ];
}; };

View file

@ -0,0 +1,59 @@
#!/bin/bash
confirm() {
rofi -dmenu \
-i \
-no-fixed-num-lines \
-p "Are you sure? [y/n]: " \
-theme power
}
# Options
shutdown=""
reboot=""
lock=""
hibernate=""
exit_wm=""
#shutdown="S"
#reboot="R"
#lock="L"
#hibernate="S"
#exit_wm="E"
# Variable passed to rofi
options="${shutdown}\n${reboot}\n${lock}\n${hibernate}\n${exit_wm}"
uptime=$(uptime | awk '{print $1}' || true)
lockcmd="swaylock --ignore-empty-password --daemonize --show-failed-attempts --indicator-caps-lock --clock --image /home/erwin/.wallpapers/river-2560.png --fade-in 0.5 --scaling fill"
chosen="$(echo -e "${options}" | rofi -theme power -p "Uptime: ${uptime}" -dmenu -selected-row 2)"
if [[ "${chosen}" == "" ]]; then
exit 0
fi
if [[ "${chosen}" == "${lock}" ]]; then
${lockcmd}
exit 0
fi
answer=$(confirm)
if [[ "${answer}" == "y" ]]; then
case "${chosen}" in
"${shutdown}")
systemctl poweroff
;;
"${reboot}")
systemctl reboot
;;
"${hibernate}")
${lockcmd}
systemctl hibernate
;;
"${exit_wm}")
swaymsg exit
;;
*) ;;
esac
fi

View file

@ -60,6 +60,7 @@ in
home.packages = with pkgs; [ home.packages = with pkgs; [
rnix-lsp rnix-lsp
shellcheck
]; ];
}; };
} }

View file

@ -395,7 +395,6 @@
}, },
"emmet.triggerExpansionOnTab": true, "emmet.triggerExpansionOnTab": true,
"python.languageServer": "Default", "python.languageServer": "Default",
"shellcheck.executablePath": "/usr/bin/shellcheck",
"shellcheck.enableQuickFix": true, "shellcheck.enableQuickFix": true,
"shellcheck.customArgs": ["--enable=all"], "shellcheck.customArgs": ["--enable=all"],
"python.defaultInterpreterPath": "/usr/bin/python", "python.defaultInterpreterPath": "/usr/bin/python",

View file

@ -7,6 +7,7 @@
plymouth.enable = true; plymouth.enable = true;
work = false; work = false;
}; };
bluetooth.enable = true;
desktop = { desktop = {
enable = true; enable = true;
home-manager = true; home-manager = true;

View file

@ -0,0 +1,15 @@
{ pkgs, config, lib, ... }:
with lib;
let
cfg = config.eboskma.bluetooth;
in
{
options.eboskma.bluetooth = {
enable = mkEnableOption "activate bluetooth";
};
config = mkIf (cfg.enable) {
hardware.bluetooth.enable = true;
services.blueman.enable = true;
};
}

View file

@ -1,6 +1,8 @@
{ lib, pkgs, config, inputs, self-overlay, ha-now-playing-overlay, pamedia-overlay, ... }: { lib, pkgs, config, inputs, self-overlay, ha-now-playing-overlay, pamedia-overlay, ... }:
with lib; with lib;
let cfg = config.eboskma.desktop; let
cfg = config.eboskma.desktop;
bt = config.eboskma.bluetooth;
in in
{ {
imports = [ ../../users/erwin.nix ../../users/root.nix ]; imports = [ ../../users/erwin.nix ../../users/root.nix ];
@ -23,6 +25,8 @@ in
programs.home-manager.enable = true; programs.home-manager.enable = true;
programs.command-not-found.enable = true; programs.command-not-found.enable = true;
services.blueman-applet.enable = bt.enable;
home.username = "erwin"; home.username = "erwin";
home.homeDirectory = "/home/erwin"; home.homeDirectory = "/home/erwin";
home.sessionVariables = { home.sessionVariables = {

View file

@ -13,7 +13,7 @@ in
fontDir.enable = true; fontDir.enable = true;
fonts = with pkgs; [ fonts = with pkgs; [
(nerdfonts.override { fonts = [ "CascadiaCode" "FantasqueSansMono" "FiraCode" "Iosevka" "JetBrainsMono" "Meslo" "Noto" "SourceCodePro" ]; }) (nerdfonts.override { fonts = [ "CascadiaCode" "DroidSansMono" "FantasqueSansMono" "FiraCode" "Iosevka" "JetBrainsMono" "Meslo" "Noto" "SourceCodePro" ]; })
dejavu_fonts dejavu_fonts
kochi-substitute kochi-substitute
noto-fonts-emoji noto-fonts-emoji