dotfiles/config/common.nix

77 lines
1.7 KiB
Nix

2021-09-11 12:05:37 +07:00
{ self, home-manager, ... }:
{ config, pkgs, lib, ... }:
{
imports = [
home-manager.nixosModules.home-manager {
home-manager.useGlobalPkgs = true;
home-manager.useUserPackages = true;
home-manager.users.chanbakjsd = import ../home/home.nix;
}
];
nix.package = pkgs.nixUnstable;
nix.extraOptions = "experimental-features = nix-command flakes";
nixpkgs.config.allowUnfree = true;
2021-12-05 00:51:42 +07:00
nixpkgs.config.packageOverrides = self.customPkgs;
2021-09-11 12:05:37 +07:00
2021-09-11 14:25:54 +07:00
environment.pathsToLink = [ "/share/zsh" ]; # Required for autocompletion.
2021-09-11 12:05:37 +07:00
environment.systemPackages = with pkgs; [
firefox
git
git-crypt
];
fonts.fonts = with pkgs; [
noto-fonts
noto-fonts-cjk
noto-fonts-emoji
jetbrains-mono
2021-09-11 14:41:24 +07:00
font-awesome
2021-09-11 12:05:37 +07:00
];
programs.dconf.enable = true;
2021-09-11 12:05:37 +07:00
sound.enable = true;
hardware.pulseaudio.enable = lib.mkForce false;
services.pipewire = {
enable = true;
alsa.enable = true;
jack.enable = true;
pulse.enable = true;
alsa.support32Bit = true;
};
2021-09-11 12:05:37 +07:00
time.timeZone = "Asia/Kuala_Lumpur";
networking.networkmanager.enable = true;
networking.dhcpcd.wait = "background"; # Don't wait and immediately go to background.
systemd.tmpfiles.rules = [
"L /home/chanbakjsd/nixos - - - - /persist/nix-config"
"L /home/chanbakjsd/Projects - - - - /persist/Projects"
2021-12-20 07:34:30 +07:00
"L /home/chanbakjsd/.ssh - - - - /persist/secrets/.ssh"
"L /home/chanbakjsd/.gnupg - - - - /persist/secrets/.gnupg"
];
2021-09-11 12:05:37 +07:00
services.xserver = {
enable = true;
displayManager.sddm.enable = true;
windowManager.i3.enable = true;
};
2021-09-11 14:25:54 +07:00
programs.zsh.enable = true;
2021-09-11 12:05:37 +07:00
users = {
mutableUsers = false; # Force all users to be declared
users.chanbakjsd = {
isNormalUser = true;
extraGroups = [ "wheel" "networkmanager" ];
hashedPassword = self.secrets.passwordHash;
2021-09-11 14:25:54 +07:00
shell = pkgs.zsh;
2021-09-11 12:05:37 +07:00
};
};
}