diff --git a/README.md b/README.md index b1d1623..fb84fc0 100644 --- a/README.md +++ b/README.md @@ -3,8 +3,12 @@ ## To install fdisk DEVICE + 200M EFI fat32 labelled boot -> on /boot + ext4 labbelled fuhen -> on /nix + mkdir -p /nix/persist/home (else persisted seems to be bugged) + `nix-shell --run 'mkpasswd -m SHA-512' -p mkpasswd` to generate a password diff --git a/flake.nix b/flake.nix index 22ad263..21a2810 100644 --- a/flake.nix +++ b/flake.nix @@ -30,6 +30,7 @@ hyprland, neovim-nightly, nur, + nixpkgs, tuxedo-nixos, ... } @ rawInput: let @@ -40,25 +41,15 @@ nixModules, homeModules, }: let - nixpkgs = import rawInput.nixpkgs { - inherit system; - overlays = [ - (import ./pkgs) - ]; - }; - inputs = - rawInput - // { - inherit nixpkgs user; - }; + inputs = rawInput // { inherit user; }; in - rawInput.nixpkgs.lib.nixosSystem { - inherit system; + nixpkgs.lib.nixosSystem { specialArgs = inputs; modules = [ ./modules/nixos nixModules nur.nixosModules.nur + { nixpkgs.overlays = [ (import ./overlays) ]; } ({pkgs, ...}: { networking.hostName = hostname; diff --git a/modules/home/hyprland/hyprland.conf b/modules/home/hyprland/hyprland.conf index 338b94e..95a50c7 100644 --- a/modules/home/hyprland/hyprland.conf +++ b/modules/home/hyprland/hyprland.conf @@ -171,7 +171,7 @@ bindm = $mainMod, mouse:273, resizewindow bind = $mainMod, E, exec, kitty bind = $mainMod, R, exec, google-chrome-stable -bind = $mainMod, P, exec, rofi -show run +bind = $mainMod, P, exec, rofi -show drun bind = $mainMod, X, exec, grim -g "$(slurp -b 00000000 -s 61616140)" - | wl-copy bind = $mainMod, V, exec, cliphist list | rofi -dmenu | cliphist decode | wl-copy # bind = $mainMod, SPACE, exec, gfold | rofi -dmenu | diff --git a/modules/home/rofi/config.rasi b/modules/home/rofi/config.rasi index 7137f73..2333413 100644 --- a/modules/home/rofi/config.rasi +++ b/modules/home/rofi/config.rasi @@ -23,7 +23,6 @@ configuration { * { font: "monospace 12"; background-alt: @background; - foreground: #FFFFFF; active: @foreground; urgent: @backgroundAdditional; } diff --git a/modules/home/zsh/default.nix b/modules/home/zsh/default.nix index b7dfe16..622fba6 100644 --- a/modules/home/zsh/default.nix +++ b/modules/home/zsh/default.nix @@ -34,6 +34,13 @@ in { config.theme = "base16"; }; + programs.less = { + enable = true; + keys = '' + \e quit + ''; + }; + programs.zsh = { enable = true; autocd = true; diff --git a/modules/home/zsh/init.zsh b/modules/home/zsh/init.zsh index a1ec2b0..3cccf5e 100644 --- a/modules/home/zsh/init.zsh +++ b/modules/home/zsh/init.zsh @@ -28,6 +28,8 @@ function zvm_after_init() { # Restore plugin bindings that zsh-vi-mode overrides. bindkey '^r' _atuin_search_widget bindkey '\ej' jq-complete + bindkey '^[d' kill-word + ZVM_LINE_INIT_MODE=$ZVM_MODE_INSERT } export YSU_MESSAGE_FORMAT="Alias: %alias"; diff --git a/modules/nixos/default.nix b/modules/nixos/default.nix index 039cdc5..38f5bdd 100644 --- a/modules/nixos/default.nix +++ b/modules/nixos/default.nix @@ -7,9 +7,13 @@ ]; boot.loader = { + # Hide the boot loader and show it only on keypress. + timeout = 0; systemd-boot = { enable = true; -# configurationLimit = 4; + configurationLimit = 4; + # A real mode for hidpi + consoleMode = "max"; }; efi.canTouchEfiVariables = true; }; diff --git a/modules/nixos/nix/default.nix b/modules/nixos/nix/default.nix index 53862f3..1ec7c7c 100644 --- a/modules/nixos/nix/default.nix +++ b/modules/nixos/nix/default.nix @@ -35,6 +35,7 @@ in { "/var/lib/bluetooth" "/var/lib/systemd/coredump" "/var/lib/docker" + "/var/lib/flatpak" "/etc/NetworkManager/system-connections" ]; files = [ @@ -49,8 +50,10 @@ in { { directory = ".ssh"; mode = "0700"; } ".local/share/direnv" ".local/share/flatpak" + ".cache/flatpak" ".local/share/atuin" ".config/google-chrome" + ".config/discord" # Don't reinstall plugins on reboot ".local/share/nvim" ".local/state/nvim" diff --git a/modules/nixos/wayland/default.nix b/modules/nixos/wayland/default.nix index 9bfaf93..a955c82 100644 --- a/modules/nixos/wayland/default.nix +++ b/modules/nixos/wayland/default.nix @@ -42,5 +42,36 @@ in { environment.systemPackages = with pkgs; [ swaylock ]; + + systemd = { + user.services.polkit-gnome-authentication-agent-1 = { + description = "polkit-gnome-authentication-agent-1"; + wantedBy = [ "graphical-session.target" ]; + wants = [ "graphical-session.target" ]; + after = [ "graphical-session.target" ]; + serviceConfig = { + Type = "simple"; + ExecStart = "${pkgs.polkit_gnome}/libexec/polkit-gnome-authentication-agent-1"; + Restart = "on-failure"; + RestartSec = 1; + TimeoutStopSec = 10; + }; + }; + }; + + security.sudo.extraConfig = '' + Defaults lecture="never" + ''; + + boot = { + kernelParams = [ "quiet" "splash" ]; + consoleLogLevel = 0; + initrd.verbose = false; + plymouth = { + enable = true; + themePackages = [ pkgs.adi1090x-plymouth ]; + theme = "colorful_loop"; + }; + }; }; } diff --git a/overlays/adi1090x-plymouth.nix b/overlays/adi1090x-plymouth.nix new file mode 100644 index 0000000..fa4ab02 --- /dev/null +++ b/overlays/adi1090x-plymouth.nix @@ -0,0 +1,26 @@ +{ pkgs ? import {} }: + pkgs.stdenv.mkDerivation { + pname = "adi1090x-plymouth"; + version = "0.0.1"; + + src = builtins.fetchGit { + url = "https://github.com/adi1090x/plymouth-themes"; + rev = "bf2f570bee8e84c5c20caac353cbe1d811a4745f"; + }; + + buildInputs = [ + pkgs.git + ]; + + configurePhase = '' + mkdir -p $out/share/plymouth/themes/ + ''; + + buildPhase = '' + ''; + + installPhase = '' + cp -r pack_1/colorful_loop $out/share/plymouth/themes + cat pack_1/colorful_loop/colorful_loop.plymouth | sed "s@\/usr\/@$out\/@" > $out/share/plymouth/themes/colorful_loop/colorful_loop.plymouth + ''; + } diff --git a/overlays/default.nix b/overlays/default.nix new file mode 100644 index 0000000..cb30b6b --- /dev/null +++ b/overlays/default.nix @@ -0,0 +1,4 @@ +self: super: +{ + adi1090x-plymouth = super.callPackage ./adi1090x-plymouth.nix { }; +}