Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- { config, pkgs, ... }:
- {
- imports = [ <nixpkgs/nixos/modules/installer/virtualbox-demo.nix> ];
- users.users = {
- mhmd = {
- isNormalUser = true;
- home = "/home/mhmd";
- description = "Mohamad Safadieh";
- extraGroups = ["wheel" "audio" "networkmanager"];
- shell = pkgs.zsh;
- initialPassword = "1234";
- createHome = true;
- };
- };
- security.sudo.extraRules = [
- { commands = [ { command = "ALL"; options = [ "NOPASSWD" ]; } ]; groups = [ "wheel" ]; }
- ];
- services.xserver = {
- desktopManager.plasma5.enable = pkgs.lib.mkForce false;
- displayManager.sddm.enable = pkgs.lib.mkForce false;
- displayManager.startx.enable = true;
- windowManager.xmonad = {
- enable = true;
- enableContribAndExtras = true;
- extraPackages = haskellPackages: [
- haskellPackages.roman-numerals
- haskellPackages.xmonad-wallpaper
- ];
- };
- xautolock = {
- enable = true;
- time = 15;
- locker = "${pkgs.systemd}/bin/systemctl suspend";
- extraOptions = [ "-detectsleep" "-corners 0-00" ];
- };
- # disabled middle click to I dont press it accidentally
- libinput.buttonMapping = "1 1 3 4 5 6 7 8 9 10";
- layout = "us,ara";
- xkbOptions = "grp:alt_space_toggle";
- xkbModel = "pc105";
- xkbVariant = ",qwerty";
- };
- services.compton = {
- enable = true;
- };
- systemd.services = {
- "suspend@" = {
- description = "i3lock";
- before = [ "sleep.target" ];
- environment = { DISPLAY = ":0"; };
- serviceConfig = { Type = "forking"; User = "mhmd"; };
- script = "${pkgs.i3lock}/bin/i3lock -c 323232";
- wantedBy = [ "sleep.target" ];
- };
- "mullvad-vpn@" = {
- enable = true;
- description = "Mullvad VPN";
- script = ''
- choose_vpn() {
- server=$(ls /etc/wireguard | grep -Po "mullvad-us[0.9]+" | shuf -n 1)
- ${pkgs.systemd}/bin/systemctl start wg-quick@$server
- }
- sleep $1
- choose_vpn
- '';
- scriptArgs = "%I";
- wantedBy = [ "multi-user.target" ];
- };
- };
- time.timeZone = "America/New_York";
- programs.zsh = {
- enable = true;
- syntaxHighlighting.enable = true;
- ohMyZsh = {
- enable = true;
- theme = "simple";
- plugins = ["git" "python"];
- };
- loginShellInit = ''
- HYPHEN_INSENSITIVE="true"
- DISABLE_UPDATE_PROMPT="true"
- DISABLE_AUTO_TITLE="true"
- gpg-connect-agent updatestartuptty /bye > /dev/null
- alias ld-off='xrandr --output eDP --off'
- if [[ ! $DISPLAY && $XDG_VTNR -eq 1 ]]; then
- exec startx -- vt1 &> /dev/null
- fi
- '';
- };
- programs.vim = {
- defaultEditor = true;
- };
- programs.gnupg.agent = {
- enable = true;
- enableSSHSupport = true;
- };
- services.mpd = {
- enable = true;
- musicDirectory = "/home/mhmd/Music";
- extraConfig = ''
- auto_update "yes"
- audio_output {
- type "pulse"
- name "pulse audio"
- }
- audio_output {
- type "fifo"
- name "FIFO"
- path "/tmp/mpd.fifo"
- format "44100:16:2"
- }
- '';
- };
- hardware.pulseaudio.enable = true;
- hardware.pulseaudio.support32Bit = true;
- environment.systemPackages = with pkgs; [
- alacritty
- compton
- dmenu
- feh
- git
- gimp
- gnupg
- i3lock
- inkscape
- mpd
- mupdf
- neofetch
- ncmpcpp
- scrot
- vim
- vscodium
- wireguard
- xautolock
- xmobar
- xmonad-with-packages
- zsh
- zsh-syntax-highlighting
- ];
- fonts = {
- enableFontDir = true;
- enableGhostscriptFonts = true;
- fonts = with pkgs; [
- anonymousPro
- emojione
- iosevka
- terminus_font
- ];
- };
- # boot.kernelPackages = pkgs.linuxPackages_latest;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement