From 05f9bc5afd5ac5f671f1dcd3d20774b0987545ec Mon Sep 17 00:00:00 2001 From: Raghuram Subramani Date: Sat, 27 Jan 2024 12:45:54 +0530 Subject: refactor dotfiles, and use nix --- configuration.nix | 181 ++++++++++++++++++++++++++++++++++++++++++------------ 1 file changed, 142 insertions(+), 39 deletions(-) mode change 100755 => 100644 configuration.nix (limited to 'configuration.nix') diff --git a/configuration.nix b/configuration.nix old mode 100755 new mode 100644 index c4940ef..691a311 --- a/configuration.nix +++ b/configuration.nix @@ -1,10 +1,12 @@ { config, pkgs, ... }: { - imports = - [ - ./hardware-configuration.nix - ]; + imports = [ + ./hardware-configuration.nix + + ]; + + nix.settings.experimental-features = [ "nix-command" "flakes" ]; # Use the systemd-boot EFI boot loader. boot.loader.systemd-boot.enable = true; @@ -13,6 +15,11 @@ networking.hostName = "OwO"; networking.networkmanager.enable = true; + fileSystems."/data" = { + device = "/dev/sda"; + fsType = "ext4"; + }; + time.timeZone = "Asia/Kolkata"; nixpkgs.config.allowUnfree = true; @@ -55,6 +62,10 @@ }; }; + services.logind.extraConfig = '' + HandlePowerKey=ignore + ''; + systemd.services.greetd.serviceConfig = { Type = "idle"; StandardInput = "tty"; @@ -65,55 +76,146 @@ TTYVTDisallocate = true; }; - /* nixpkgs.overlays = [ - (self: super: { - waybar = super.waybar.overrideAttrs (oldAttrs: { - src = super.fetchFromGitHub { - owner = "Alexays"; - repo = "waybar"; - rev = "e46f66b4687eb807b6fc9c6714e52c52d0885926"; - hash = "sha256-bNzLLkkhH1MZmBneP3PH3xkED0hDWXyiaMqNWF2ilII="; - }; - }); - }) - ]; */ + environment.etc."inputrc".text = pkgs.lib.mkForce ( + builtins.readFile + '' + set completion-ignore-case on + '' + ); users.users.compromyse = { isNormalUser = true; extraGroups = [ "wheel" "storage" "libvirtd" ]; - packages = with pkgs; [ - neofetch - ]; }; - environment.systemPackages = with pkgs; [ - vim - wget - git + home-manager.useUserPackages = true; + home-manager.useGlobalPkgs = true; - polkit_gnome + home-manager.users.compromyse = { pkgs, ... }: { + home.packages = with pkgs; [ + wget + + tmux + fzf + fd + ripgrep + + cinnamon.nemo + mate.eom + + spotify + firefox + + pavucontrol + blueman + brillo + ]; + + programs.bash = { + enable = true; + initExtra= '' + export PS1="\[\e[38;5;243m\]\h \[\e[38;5;254m\]\w \[\033[0m\]> " + + sessionizer() { + DIR=$(fd . $HOME --type d -L -H | fzf) + SESSION_NAME="$DIR_$(date +%M%S)" + + if [ -n "$DIR" ] + then + if [ "$1" == "-cd" ] + then + cd $DIR + return + fi + tmux new-session -d -c "$DIR" -s "$SESSION_NAME" + if [ -n "$TMUX" ] + then + tmux switch -t "$SESSION_NAME" + else + tmux attach -t "$SESSION_NAME" + fi + fi + } + + if [[ $- != *i* ]] + then + sessionizer + fi + + bind '"\C-f": "sessionizer\n"' + bind '"\C-F": "sessionizer -cd\n"' + ''; + }; + + programs.git = { + enable = true; + userName = "Raghuram Subramani"; + userEmail = "raghus2247@gmail.com"; + }; + + programs.neovim = { + enable = true; + defaultEditor = true; + viAlias = true; + vimAlias = true; + vimdiffAlias = true; + }; + + + programs.alacritty = { + enable = true; + }; + + home.file = { + ".tmux.conf".source = ./.tmux.conf; + ".fdignore".source = ./.fdignore; + ".config" = { + source = ./config; + recursive = true; + }; + }; + + home.pointerCursor = { + gtk.enable = true; + package = pkgs.bibata-cursors; + name = "Bibata-Modern-Classic"; + size = 16; + }; + + gtk = { + enable = true; + + theme = { name = "adw-gtk3-dark"; package = pkgs.adw-gtk3; }; + iconTheme = { name = "Papirus-Light"; package = pkgs.papirus-icon-theme; }; + + font = { name = "UbuntuMono Nerd Font"; }; + }; + + qt = { + enable = true; + platformTheme = "gtk"; + style.name = "adwaita-dark"; + }; + + home.stateVersion = "23.11"; + programs.home-manager.enable = true; + }; + environment.systemPackages = with pkgs; [ waybar + tofi fuzzel dunst hyprpaper - greetd.tuigreet - greetd.greetd - terminator - firefox - spotify - virt-manager + networkmanagerapplet - pavucontrol - blueman + greetd.tuigreet + greetd.greetd + polkit_gnome + waylock libnotify libappindicator - - materia-theme - papirus-icon-theme - capitaine-cursors ]; fonts.packages = with pkgs; [ @@ -128,9 +230,10 @@ }; security.polkit.enable = true; + security.pam.services.waylock.text = '' + auth include login + ''; - system.copySystemConfiguration = true; - - system.stateVersion = "unstable"; + system.stateVersion = "23.11"; } -- cgit v1.2.3