diff --git a/flake.nix b/flake.nix index 561e2b7..af11a15 100644 --- a/flake.nix +++ b/flake.nix @@ -20,15 +20,16 @@ flake = false; }; - kakoune-auto-pairs = { - url = "github:alexherbo2/auto-pairs.kak"; - flake = false; - }; - kakoune-sort-selections = { url = "github:occivink/kakoune-sort-selections"; flake = false; }; + + xorg-git = { + url = "git+https://gitlab.freedesktop.org/xorg/xserver.git"; + flake = false; + }; + # Kakoune Plugins End rofi-theme = { @@ -36,11 +37,21 @@ flake = false; }; + wlroots-git = { + url = "git+https://gitlab.freedesktop.org/wlroots/wlroots.git"; + flake = false; + }; + + sway-git = { + url = "github:swaywm/sway"; + flake = false; + }; + grub2-themes.url = "github:vinceliuice/grub2-themes"; }; - outputs = { self, nixpkgs, home-manager, nur, grub2-themes, ... }@inputs: + outputs = { self, nixpkgs, home-manager, nur, ... }@inputs: let username = "manuel"; hostname = "terra"; @@ -57,18 +68,45 @@ }; in { - overlays.default = - (final: prev: rec { - nerdfonts = prev.nerdfonts.override { - fonts = [ - "JetBrainsMono" - ]; - }; + overlays.default = (final: prev: rec { + nerdfonts = prev.nerdfonts.override { + fonts = [ + "JetBrainsMono" + ]; + }; + + wlroots = prev.wlroots.overrideAttrs (old: { + version = "0.16.0"; + src = inputs.wlroots-git; }); + sway-unwrapped = prev.sway-unwrapped.overrideAttrs (old: { + version = "1.8"; + buildInputs = old.buildInputs ++ [ + prev.xorg.xcbutilwm + prev.pcre2 + ]; + nativeBuildInputs = old.nativeBuildInputs ++ [ + prev.cmake + ]; + src = inputs.sway-git; + }); + + xwayland = prev.xwayland.overrideAttrs (old: { + version = "22.2"; + src = inputs.xorg-git; + buildInputs = old.buildInputs ++ [ + prev.udev + prev.xorg.libpciaccess + ]; + }); + + }); + nixosConfigurations.${hostname} = nixpkgs.lib.nixosSystem { inherit system; + inherit pkgs; specialArgs = { inherit inputs; }; modules = [ ./system/configuration.nix @@ -84,7 +122,7 @@ }; }; } - grub2-themes.nixosModule + inputs.grub2-themes.nixosModule ]; }; }; diff --git a/system/configuration.nix b/system/configuration.nix index c557e26..36842d8 100644 --- a/system/configuration.nix +++ b/system/configuration.nix @@ -47,7 +47,13 @@ kernelModules = [ "i2c-dev" "i2c-piix4" ]; }; - networking.hostName = "terra"; # Define your hostname. + networking = { + hostName = "terra"; # Define your hostname. + networkmanager = { + enable = true; + }; + firewall.checkReversePath = false; + }; # Set your time zone. time.timeZone = "Europe/Vienna"; @@ -102,37 +108,50 @@ interval = "hourly"; }; - security.doas.enable = true; - security.sudo.enable = false; + services.fstrim = { + enable = true; + interval = "weekly"; + }; - security.doas.extraRules = [{ - users = [ "manuel" ]; - keepEnv = true; - persist = true; - }]; - - security.polkit.enable = true; + security = { + sudo.enable = false; + doas = { + enable = true; + extraRules = [{ + users = [ "manuel" ]; + keepEnv = true; + persist = true; + }]; + }; + polkit.enable = true; + }; programs.fish.enable = true; # Define a user account. Don't forget to set a password with ‘passwd’. users.users.manuel = { isNormalUser = true; - extraGroups = [ "users" "wheel" "audio" "video" "games" "input" "geoclue" ]; + extraGroups = [ "users" "wheel" "audio" "video" "games" "input" "geoclue" "networkmanager" "nm-openvpn" ]; shell = pkgs.fish; }; # List packages installed in system profile. To search, run: # $ nix search wget - environment.systemPackages = with pkgs; [ - git - links2 - ripgrep - fd - htop - openrgb - ]; - environment.pathsToLink = [ "/share/zsh" ]; + environment = { + systemPackages = with pkgs; [ + git + links2 + ripgrep + fd + htop + openrgb + unzip + unrar + p7zip + ]; + pathsToLink = [ "/share/zsh" ]; + binsh = "${pkgs.dash}/bin/dash"; + }; # Some programs need SUID wrappers, can be configured further or are # started in user sessions. diff --git a/system/hardware-configuration.nix b/system/hardware-configuration.nix index 3f3bba1..b16b071 100644 --- a/system/hardware-configuration.nix +++ b/system/hardware-configuration.nix @@ -42,8 +42,8 @@ fileSystems."/home" = { - device = "/dev/disk/by-uuid/d94babc9-ef09-43bb-949d-ed477ff4f4c2"; - fsType = "ext4"; + device = "/dev/disk/by-uuid/4dd7a8ea-311a-458b-8839-1d92c7abab1f"; + fsType = "xfs"; }; fileSystems."/opt/games" = @@ -60,7 +60,7 @@ # (the default) this is the recommended approach. When using systemd-networkd it's # still possible to use this option, but it's recommended to use it in conjunction # with explicit per-interface declarations with `networking.interfaces..useDHCP`. - networking.useDHCP = lib.mkDefault true; + # networking.useDHCP = lib.mkDefault true; # networking.interfaces.enp8s0.useDHCP = lib.mkDefault true; # networking.interfaces.wlp6s0.useDHCP = lib.mkDefault true; diff --git a/user/configs/beets/beets.nix b/user/configs/beets/beets.nix index f158bdd..9604639 100644 --- a/user/configs/beets/beets.nix +++ b/user/configs/beets/beets.nix @@ -38,7 +38,6 @@ "threads" = 8; }; }; - }; } diff --git a/user/configs/fish/fish.nix b/user/configs/fish/fish.nix index e71c83f..8e043bc 100644 --- a/user/configs/fish/fish.nix +++ b/user/configs/fish/fish.nix @@ -42,7 +42,7 @@ nou = '' pushd &> /dev/null cd "${config.home.homeDirectory}/.dotfiles" - nix flake lock --commit-lock-file --update-input nixpkgs --update-input home-manager + nix flake lock --commit-lock-file --update-input nixpkgs --update-input home-manager --update-input nur doas nixos-rebuild switch --upgrade --flake .# popd &> /dev/null ''; diff --git a/user/configs/kakoune/kakoune.nix b/user/configs/kakoune/kakoune.nix index 5c65cca..5b11a71 100644 --- a/user/configs/kakoune/kakoune.nix +++ b/user/configs/kakoune/kakoune.nix @@ -5,10 +5,6 @@ let src = inputs.kakoune-smarttab; }; - auto-pairs = pkgs.kakouneUtils.buildKakounePlugin { - name = "kakoune-auto-pairs"; - src = inputs.kakoune-auto-pairs; - }; sort-selections = pkgs.kakouneUtils.buildKakounePlugin { name = "sort-selections-kak"; src = inputs.kakoune-sort-selections; @@ -21,9 +17,11 @@ in plugins = with pkgs.kakounePlugins; [ smarttab kakboard - auto-pairs - pkgs.kak-lsp + #auto-pairs-kak + kak-lsp sort-selections + powerline-kak + kakoune-extra-filetypes ]; config = { colorScheme = "gruvbox-dark"; @@ -53,13 +51,17 @@ in }; extraConfig = '' set global startup_info_version 99999999 - set-option global auto_pairs ( ) { } [ ] '"' '"' "'" "'" ` ` “ ” ‘ ’ « » ‹ › + #set-option global auto_pairs ( ) { } [ ] '"' '"' "'" "'" ` ` “ ” ‘ ’ « » ‹ › eval %sh{kak-lsp --kakoune -s $kak_session} # Not needed if you load it with plug.kak. lsp-enable map global user l %{: enter-user-mode lsp} -docstring "LSP mode" + require-module powerline + powerline-start + powerline-theme gruvbox + powerline-separator global half-step ''; }; diff --git a/user/configs/sway/sway.nix b/user/configs/sway/sway.nix index fa678a0..4abea62 100644 --- a/user/configs/sway/sway.nix +++ b/user/configs/sway/sway.nix @@ -131,6 +131,7 @@ in { command = "${xwaylandSetPrimary}/bin/xwayland-setprimary.sh"; always = true; } { command = "${pkgs.autotiling}/bin/autotiling"; always = true; } { command = "${pkgs.openrgb}/bin/openrgb --server --profile autorun.orp"; } + { command = "${pkgs.networkmanagerapplet}/bin/nm-applet --indicator"; } ]; bars = [{ command = "${pkgs.waybar}/bin/waybar"; @@ -167,6 +168,7 @@ in }; }; extraConfig = '' + seat seat0 xcursor_theme capitaine-cursors-white 32 ''; extraSessionCommands = '' export MOZ_ENABLE_WAYLAND=1 diff --git a/user/home.nix b/user/home.nix index 1e9f89e..ea94331 100644 --- a/user/home.nix +++ b/user/home.nix @@ -17,9 +17,10 @@ home.homeDirectory = "/home/manuel"; home.packages = [ pkgs.appimage-run - pkgs.bottles + # pkgs.bottles pkgs.discord pkgs.firefox + pkgs.lutris pkgs.nerdfonts pkgs.noto-fonts-cjk-sans pkgs.noto-fonts-cjk-serif @@ -70,6 +71,11 @@ package = pkgs.gruvbox-dark-icons-gtk; name = "oomox-gruvbox-dark"; }; + cursorTheme = { + package = pkgs.capitaine-cursors; + name = "capitaine-cursors-white"; + size = 32; + }; }; programs.git = {