shubham-cpp / dotfiles

Configs for Programs I use on daily basis
GNU General Public License v3.0
4 stars 0 forks source link

Nix another try #5

Open shubham-cpp opened 2 years ago

shubham-cpp commented 2 years ago
/etc/nixos/configuration.nix ```nix # Edit this configuration file to define what should be installed on # your system. Help is available in the configuration.nix(5) man page # and in the NixOS manual (accessible by running ‘nixos-help’). { config, pkgs, ... }: { imports = [ # Include the results of the hardware scan. ./hardware-configuration.nix ]; nix = { extraOptions = '' experimental-features = nix-command flakes ''; }; # Bootloader. boot={ kernelPackages = pkgs.linuxPackages_xanmod_latest; loader={ systemd-boot.enable = true; efi={ canTouchEfiVariables = true; efiSysMountPoint = "/boot/efi"; }; }; }; networking={ hostName = "nixos"; # Define your hostname. networkmanager.enable = true; # wireless.enable = true; # Enables wireless support via wpa_supplicant. # Configure network proxy if necessary # proxy.default = "http://user:password@proxy:port/"; # proxy.noProxy = "127.0.0.1,localhost,internal.domain"; }; # Set your time zone. time.timeZone = "Asia/Kolkata"; # Select internationalisation properties. i18n.defaultLocale = "en_IN.utf8"; # Enable the X11 windowing system. services={ xserver={ enable = true; # Enable the XFCE Desktop Environment. displayManager.lightdm.enable = true; desktopManager.xfce.enable = true; # Configure keymap in X11 layout = "us"; xkbVariant = ""; }; printing.enable = true; pipewire = { enable = true; alsa.enable = true; alsa.support32Bit = true; pulse.enable = true; wireplumber.enable = true; # If you want to use JACK applications, uncomment this #jack.enable = true; # use the example session manager (no others are packaged yet so this is enabled by default, # no need to redefine it in your config for now) #media-session.enable = true; }; }; # Enable sound with pipewire. sound.enable = true; hardware.pulseaudio.enable = false; security.rtkit.enable = true; # Enable touchpad support (enabled default in most desktopManager). # services.xserver.libinput.enable = true; # Define a user account. Don't forget to set a password with ‘passwd’. users.users.sp = { isNormalUser = true; description = "Shubham Pawar"; extraGroups = [ "networkmanager" "wheel" ]; }; # Allow unfree packages nixpkgs.config.allowUnfree = true; # List packages installed in system profile. To search, run: # $ nix search wget environment={ variables = { EDITOR = "nvim"; VISUAL = "nvim"; }; systemPackages = with pkgs; [ vim # Do not forget to add an editor to edit configuration.nix! The Nano editor is also installed by default. wget curl firefox ]; }; # Some programs need SUID wrappers, can be configured further or are # started in user sessions. # programs.mtr.enable = true; # programs.gnupg.agent = { # enable = true; # enableSSHSupport = true; # }; # List services that you want to enable: # Enable the OpenSSH daemon. # services.openssh.enable = true; # Open ports in the firewall. # networking.firewall.allowedTCPPorts = [ ... ]; # networking.firewall.allowedUDPPorts = [ ... ]; # Or disable the firewall altogether. # networking.firewall.enable = false; # This value determines the NixOS release from which the default # settings for stateful data, like file locations and database versions # on your system were taken. It‘s perfectly fine and recommended to leavecatenate(variables, "bootdev", bootdev) # this value at the release version of the first install of this system. # Before changing this value read the documentation for this option # (e.g. man configuration.nix or on https://nixos.org/nixos/options.html). system.stateVersion = "22.05"; # Did you read the comment? } ```
~/.config/nixpkgs/home.nix ```nix { config, pkgs, ... }: { # Home Manager needs a bit of information about you and the # paths it should manage. home = { username = "sp"; homeDirectory = "/home/sp"; stateVersion = "22.05"; sessionVariables = { BROWSER = "firefox"; TERMINAL = "alacritty"; EDITOR = "nvim"; }; }; home.packages = with pkgs; [ btop alacritty nixfmt rnix-lsp alejandra ksuperkey xfce.xfce4-whiskermenu-plugin rofi rofi-emoji neovim gnome.file-roller exa fd ripgrep fzf bat vifm-full lf ranger xclip ]; programs.vscode = { enable = true; package = pkgs.vscodium; extensions = with pkgs.vscode-extensions; [ vscodevim.vim streetsidesoftware.code-spell-checker pkief.material-icon-theme naumovs.color-highlight mskelton.one-dark-theme jnoortheen.nix-ide tabnine.tabnine-vscode kamadorueda.alejandra ]; }; gtk = { cursorTheme.package = pkgs.nordzy-cursor-theme; iconTheme.package = pkgs.vimix-icon-theme; #qogir-icon-theme; theme.package = pkgs.qogir-theme; }; qt = { enable = true; platformTheme = "gtk"; }; # Let Home Manager install and manage itself. programs.home-manager.enable = true; } ```
shubham-cpp commented 2 years ago
Updated /etc/nixos/configuration.nix ```nix # Edit this configuration file to define what should be installed on # your system. Help is available in the configuration.nix(5) man page # and in the NixOS manual (accessible by running ‘nixos-help’). { config, pkgs, ... }: { imports = [ # Include the results of the hardware scan. ./hardware-configuration.nix ]; # Use the systemd-boot EFI boot loader. boot = { # kernelPackages = pkgs.linuxPackages_latest; loader = { # systemd-boot.enable = true; # efi.canTouchEfiVariables = true; efi = { canTouchEfiVariables = true; efiSysMountPoint = "/boot/efi"; # ← use the same mount point here. }; grub = { efiSupport = true; #efiInstallAsRemovable = true; # in case canTouchEfiVariables doesn't work for your system device = "nodev"; }; }; }; networking = { useDHCP = false; hostName = "nixos"; # Define your hostname. networkmanager.enable = true; # Easiest to use and most distros use this by default. }; # Set your time zone. time.timeZone = "Asia/Kolkata"; # Select internationalisation properties. i18n.defaultLocale = "en_US.UTF-8"; # console = { # font = "Lat2-Terminus16"; # keyMap = "us"; # useXkbConfig = true; # use xkbOptions in tty. # }; nixpkgs.config.allowUnfree = true; # Enable the X11 windowing system. services = { xserver = { enable = true; displayManager = { gdm.enable = true; defaultSession = "xfce"; }; desktopManager.xfce = { enable = true; }; libinput = { enable = true; touchpad = { accelSpeed = "0.45"; disableWhileTyping = true; }; }; }; printing = { enable = true; browsing = true; drivers = with pkgs; [ cnijfilter2 ]; }; pipewire = { enable = true; alsa.enable = true; alsa.support32Bit = true; pulse.enable = true; #media-session.enable = true; wireplumber.enable = true; jack.enable = true; config.pipewire = { "context.properties" = { "link.max-buffers" = 16; "log.level" = 2; }; }; }; }; # Enable sound. sound.enable = true; hardware.pulseaudio.enable = false; security.rtkit.enable = true; # Define a user account. Don't forget to set a password with ‘passwd’. users.users.sp = { isNormalUser = true; description = "Shubham Pawar"; initialPassword = "sp"; extraGroups = [ "wheel" "networkmanager" ]; # Enable ‘sudo’ for the user. packages = with pkgs; [ firefox thunderbird ]; }; # List packages installed in system profile. To search, run: # $ nix search wget environment.systemPackages = with pkgs; [ vim # Do not forget to add an editor to edit configuration.nix! The Nano editor is also installed by default. wget curl xfce.xfce4-whiskermenu-plugin xfce.xfce4-weather-plugin xfce.xfce4-notes-plugin xfce.xfce4-clipman-plugin ]; # Some programs need SUID wrappers, can be configured further or are # started in user sessions. # programs.mtr.enable = true; programs.gnupg.agent = { enable = true; enableSSHSupport = true; }; programs.thunar.plugins = with pkgs.xfce; [ thunar-volman thunar-archive-plugin]; # List services that you want to enable: # Enable the OpenSSH daemon. # services.openssh.enable = true; # Open ports in the firewall. # networking.firewall.allowedTCPPorts = [ ... ]; # networking.firewall.allowedUDPPorts = [ ... ]; # Or disable the firewall altogether. # networking.firewall.enable = false; # Copy the NixOS configuration file and link it from the resulting system # (/run/current-system/configuration.nix). This is useful in case you # accidentally delete configuration.nix. # system.copySystemConfiguration = true; # This value determines the NixOS release from which the default # settings for stateful data, like file locations and database versions # on your system were taken. It‘s perfectly fine and recommended to leave # this value at the release version of the first install of this system. # Before changing this value read the documentation for this option # (e.g. man configuration.nix or on https://nixos.org/nixos/options.html). nix = { gc = { automatic = true; dates = "07:00"; }; optimise = { automatic = true; dates = [ "08:00" ]; }; extraOptions = '' experimental-features = nix-command flakes ''; }; system = { stateVersion = "22.05"; # Did you read the comment? autoUpgrade = { enable = true; dates = "05:00"; }; }; } ```