diff --git a/configuration.nix b/configuration.nix index 531c6e9..690358d 100644 --- a/configuration.nix +++ b/configuration.nix @@ -43,31 +43,6 @@ zsh.enable = true; }; - services.xserver = { - enable = true; - windowManager.i3.enable = true; - - layout = "de"; - xkbVariant = "nodeadkeys"; - xkbModel = "pc105"; - - libinput = { - enable = true; - touchpad = { - horizontalScrolling = false; - naturalScrolling = true; - }; - }; - - displayManager = { - defaultSession = "none+i3"; - autoLogin = { - enable = true; - user = "mandlm"; - }; - }; - }; - virtualisation.docker.enable = true; time.timeZone = "Europe/Berlin"; @@ -82,15 +57,22 @@ fonts.fonts = with pkgs; [ (nerdfonts.override { fonts = [ "DejaVuSansMono" "FiraCode" ]; }) font-awesome + dejavu_fonts ]; - hardware.pulseaudio.enable = true; + hardware = { + pulseaudio.enable = true; - hardware.sane = { - enable = true; - extraBackends = [ pkgs.sane-airscan ]; + opengl.enable = true; + + sane = { + enable = true; + extraBackends = [ pkgs.sane-airscan ]; + }; }; + security.polkit.enable = true; + environment.systemPackages = with pkgs; [ neovim git diff --git a/flake.nix b/flake.nix index 903ce6d..e63201e 100644 --- a/flake.nix +++ b/flake.nix @@ -53,6 +53,7 @@ system = "x86_64-linux"; modules = [ ./configuration.nix + ./greetd.nix ./users.nix ./machines/apache/configuration.nix ./machines/apache/hardware-configuration.nix diff --git a/greetd.nix b/greetd.nix new file mode 100644 index 0000000..564d9e6 --- /dev/null +++ b/greetd.nix @@ -0,0 +1,19 @@ +{ config, pkgs, ... }: +{ + services.greetd = { + enable = true; + settings = { + default_session.command = '' + ${pkgs.greetd.tuigreet}/bin/tuigreet \ + --time \ + --asterisks \ + --user-menu \ + --cmd sway + ''; + }; + }; + + environment.etc."greetd/environments".text = '' + sway + ''; +} diff --git a/home-manager/i3/default.nix b/home-manager/i3/default.nix deleted file mode 100644 index 9a93754..0000000 --- a/home-manager/i3/default.nix +++ /dev/null @@ -1,136 +0,0 @@ -{ config, lib, pkgs, user, ... }: - -let - cfg = config.xsession.windowManager.i3; - font.name = "DejaVu Sans Mono"; - font.size = 12.0; -in -{ - imports = [ - ./i3status-rust.nix - ]; - - home.file = { - workspaces = { - source = ./workspaces; - target = ".config/i3/workspaces"; - recursive = true; - }; - wallpapers = { - source = ./wallpapers; - target = ".config/i3/wallpapers"; - recursive = true; - }; - }; - - xsession.windowManager.i3 = { - enable = true; - - config = { - modifier = "Mod4"; - terminal = "${pkgs.kitty}/bin/kitty"; - - fonts = { - names = [ font.name ]; - size = font.size; - }; - - window = { - titlebar = false; - border = 0; - }; - - floating = { - titlebar = false; - border = 0; - }; - - menu = "${pkgs.rofi}/bin/rofi -show drun"; - - bars = [{ - mode = "hide"; - position = "top"; - statusCommand = "${pkgs.i3status-rust}/bin/i3status-rs ~/.config/i3status-rust/config-default.toml"; - - fonts = { - names = [ font.name ]; - size = font.size * 1.1; - }; - }]; - - defaultWorkspace = "workspace number 1"; - - keybindings = lib.mkOptionDefault { - "${cfg.config.modifier}+Shift+o" = "exec xdg-open \"zoommtg://zoom.us/join?action=join&confno=4861587170&pwd=ZVk3aHphcWppY21ONjZOMVh6STN6dz09\""; - "${cfg.config.modifier}+Shift+s" = "exec flameshot gui"; - }; - - startup = [ - { command = "i3-msg 'workspace 1; append_layout ~/.config/i3/workspaces/workspace-1.json'"; } - { command = "i3-msg 'workspace 2; append_layout ~/.config/i3/workspaces/workspace-2.json'"; } - { command = "i3-msg 'workspace 4; append_layout ~/.config/i3/workspaces/workspace-4.json'"; } - { command = "i3-msg 'workspace 5; append_layout ~/.config/i3/workspaces/workspace-5.json'"; } - { command = "kitty"; notification = false; } - { command = "firefox"; notification = false; } - { command = "element-desktop"; notification = false; } - { command = "keepassxc"; notification = false; } - { command = "nextcloud"; notification = false; } - { command = "thunderbird"; notification = false; } - ]; - - assigns = { - "6" = [{ class = "^\.zoom $"; }]; - }; - }; - }; - - services = { - betterlockscreen = { - enable = true; - arguments = [ "--update /home/mandlm/.config/i3/wallpapers/nix-wallpaper-dracula.png" ]; - }; - - flameshot = { - enable = true; - settings = { - General = { - showStartupLaunchMessage = false; - }; - }; - }; - - unclutter.enable = true; - - dunst = { - enable = true; - settings = { - global = { - follow = "keyboard"; - font = "DejaVu Sans Mono 11"; - frame_width = 1; - }; - - urgency_low = { - frame_color = "#268bd2"; - foreground = "#eee8d5"; - background = "#002b36"; - timeout = 4; - }; - - urgency_normal = { - frame_color = "#859900"; - foreground = "#eee8d5"; - background = "#002b36"; - timeout = 6; - }; - - urgency_critical = { - frame_color = "#dc322f"; - foreground = "#eee8d5"; - background = "#002b36"; - timeout = 8; - }; - }; - }; - }; -} diff --git a/home-manager/i3/wallpapers/nix-wallpaper-dracula.png b/home-manager/i3/wallpapers/nix-wallpaper-dracula.png deleted file mode 100644 index 8e439ac..0000000 Binary files a/home-manager/i3/wallpapers/nix-wallpaper-dracula.png and /dev/null differ diff --git a/home-manager/i3/workspaces/workspace-1.json b/home-manager/i3/workspaces/workspace-1.json deleted file mode 100644 index d6ce6b0..0000000 --- a/home-manager/i3/workspaces/workspace-1.json +++ /dev/null @@ -1,10 +0,0 @@ -// vim:ts=4:sw=4:et -{ - "name": "Terminal", - "swallows": [ - { - "class": "^kitty$" - } - ], - "type": "con" -} diff --git a/home-manager/i3/workspaces/workspace-2.json b/home-manager/i3/workspaces/workspace-2.json deleted file mode 100644 index a6d29f3..0000000 --- a/home-manager/i3/workspaces/workspace-2.json +++ /dev/null @@ -1,10 +0,0 @@ -// vim:ts=4:sw=4:et -{ - "name": "Element", - "swallows": [ - { - "class": "^Element$" - } - ], - "type": "con" -} diff --git a/home-manager/i3/workspaces/workspace-4.json b/home-manager/i3/workspaces/workspace-4.json deleted file mode 100644 index 108f590..0000000 --- a/home-manager/i3/workspaces/workspace-4.json +++ /dev/null @@ -1,10 +0,0 @@ -// vim:ts=4:sw=4:et -{ - "name": "Email", - "swallows": [ - { - "class": "^thunderbird$" - } - ], - "type": "con" -} diff --git a/home-manager/i3/workspaces/workspace-5.json b/home-manager/i3/workspaces/workspace-5.json deleted file mode 100644 index 7c74fa7..0000000 --- a/home-manager/i3/workspaces/workspace-5.json +++ /dev/null @@ -1,10 +0,0 @@ -// vim:ts=4:sw=4:et -{ - "name": "Browser", - "swallows": [ - { - "class": "^firefox$" - } - ], - "type": "con" -} diff --git a/home-manager/kitty.nix b/home-manager/kitty.nix index dc585bf..9a204d6 100644 --- a/home-manager/kitty.nix +++ b/home-manager/kitty.nix @@ -1,4 +1,4 @@ -{ config, lib, pkgs, user, theme, ... }: +{ theme, ... }: let theme_name = if theme == "light" then "Solarized Light" else "Solarized Dark"; diff --git a/home-manager/rofi.nix b/home-manager/rofi.nix deleted file mode 100644 index 0c75bfd..0000000 --- a/home-manager/rofi.nix +++ /dev/null @@ -1,13 +0,0 @@ -{ config, lib, pkgs, user, ... }: - -{ - programs.rofi = { - enable = true; - font = "DejaVu Sans Mono 12"; - terminal = "${pkgs.kitty}/bin/kitty"; - extraConfig = { - show-icons = true; - matching = "fuzzy"; - }; - }; -} diff --git a/home-manager/sway/default.nix b/home-manager/sway/default.nix new file mode 100644 index 0000000..a11f835 --- /dev/null +++ b/home-manager/sway/default.nix @@ -0,0 +1,71 @@ +{ config, lib, pkgs, user, ... }: +let + font.name = "DejaVu Sans Mono"; + font.size = 12.0; +in +{ + imports = [ + ./i3status-rust.nix + ]; + + programs.fuzzel = { + enable = true; + settings = { + main = { + terminal = "${pkgs.kitty}/bin/kitty"; + layer = "overlay"; + font = "DejaVu Sans Mono:size=10"; + }; + colors.background = "55000000"; + }; + }; + + wayland.windowManager.sway = { + enable = true; + + config = rec { + modifier = "Mod4"; + terminal = "${pkgs.kitty}/bin/kitty"; + + input = { + "type:keyboard" = { + xkb_layout = "de"; + }; + "type:touchpad" = { + natural_scroll = "enabled"; + tap = "enabled"; + accel_profile = "flat"; + dwt = "enabled"; + }; + }; + + seat = { + "*" = { + hide_cursor = "1000"; + }; + }; + + fonts = { + names = [ font.name ]; + size = font.size; + }; + + bars = [{ + mode = "hide"; + position = "top"; + statusCommand = "${pkgs.i3status-rust}/bin/i3status-rs ~/.config/i3status-rust/config-default.toml"; + + fonts = { + names = [ font.name ]; + size = font.size; + }; + }]; + + menu = "${pkgs.fuzzel}/bin/fuzzel"; + }; + + extraConfig = '' + ''; + }; + +} diff --git a/home-manager/i3/i3status-rust.nix b/home-manager/sway/i3status-rust.nix similarity index 100% rename from home-manager/i3/i3status-rust.nix rename to home-manager/sway/i3status-rust.nix diff --git a/home-mandlm.nix b/home-mandlm.nix index 287dbc0..9e3cb4d 100644 --- a/home-mandlm.nix +++ b/home-mandlm.nix @@ -44,8 +44,9 @@ ./home-manager/gpg ./home-manager/zsh.nix ./home-manager/starship.nix - ./home-manager/i3 - ./home-manager/rofi.nix + # ./home-manager/i3 + ./home-manager/sway + # ./home-manager/rofi.nix ./home-manager/direnv.nix ./home-manager/bat.nix ]; diff --git a/machines/apache/configuration.nix b/machines/apache/configuration.nix index d3d2b13..1303e3c 100644 --- a/machines/apache/configuration.nix +++ b/machines/apache/configuration.nix @@ -3,6 +3,6 @@ { networking.hostName = "apache"; boot.loader.grub.enableCryptodisk = true; - services.xserver.videoDrivers = [ "intel" "nvidia" ]; + # services.xserver.videoDrivers = [ "intel" "nvidia" ]; }