Browse Source

fix: add home-manager configuration for git

Signed-off-by: Chinmay D. Pai <chinmaydpai@gmail.com>
master
Chinmay D. Pai 6 months ago
parent
commit
ffe56c718c
Signed by: thunderbottom GPG Key ID: 75507BE256F40CED
10 changed files with 97 additions and 8 deletions
  1. +8
    -2
      bastion.nix
  2. +5
    -0
      desktop/boot.nix
  3. +1
    -0
      desktop/gnome.nix
  4. +34
    -0
      hardware-configuration.nix
  5. +1
    -1
      hardware/sound/default.nix
  6. +17
    -0
      home/chnmy/default.nix
  7. +26
    -0
      home/chnmy/git.nix
  8. +1
    -1
      system/i18n.nix
  9. +3
    -3
      system/nixos.nix
  10. +1
    -1
      virtualization/docker.nix

+ 8
- 2
bastion.nix View File

@ -3,6 +3,8 @@
{
imports = [
<nixos-hardware/lenovo/thinkpad/x1/6th-gen>
<home-manager/nixos>
./hardware-configuration.nix
./desktop/boot.nix
./desktop/gnome.nix
./hardware/sound
@ -16,6 +18,10 @@
hardware.trackpoint.sensitivity = 180;
hardware.trackpoint.speed = 180;
home-manager.useUserPackages = true;
home-manager.useGlobalPkgs = true;
home-manager.users.chnmy = (import ./home/chnmy);
networking.hostName = "bastion";
nixpkgs.config.allowUnfree = true;
@ -24,7 +30,7 @@
programs.gnupg.agent = {
enable = true;
enableSSHSupport = true;
}
};
programs.less.enable = true;
services.acpid.enable = true;
@ -49,5 +55,5 @@
isNormalUser = true;
extraGroups = [ "audio" "docker" "disk" "input" "networkmanager" "video" "wheel" ];
shell = pkgs.bash;
}
};
}

+ 5
- 0
desktop/boot.nix View File

@ -6,4 +6,9 @@
boot.kernelParams = [ "i915.enable_fbc=1" "i915.enable_psr=2" "i915.fastboot=1" "i915.lvds_downclock=1" "drm.vblankoffdelay=1" ];
boot.loader.systemd-boot.enable = true;
boot.loader.efi.canTouchEfiVariables = true;
boot.initrd.luks.devices.root = {
device = "/dev/nvme0n1p2";
preLVM = true;
};
}

+ 1
- 0
desktop/gnome.nix View File

@ -1,6 +1,7 @@
{ config, pkgs, ... }:
{
services.xserver.enable = true;
services.xserver.layout = "us";
services.xserver.xkbOptions = "eurosign:e";


+ 34
- 0
hardware-configuration.nix View File

@ -0,0 +1,34 @@
# Do not modify this file! It was generated by ‘nixos-generate-config’
# and may be overwritten by future invocations. Please make changes
# to /etc/nixos/configuration.nix instead.
{ config, lib, pkgs, ... }:
{
imports =
[ <nixpkgs/nixos/modules/installer/scan/not-detected.nix>
];
boot.initrd.availableKernelModules = [ "xhci_pci" "nvme" "usb_storage" "sd_mod" ];
boot.initrd.kernelModules = [ "dm-snapshot" ];
boot.kernelModules = [ "kvm-intel" ];
boot.extraModulePackages = [ ];
fileSystems."/" =
{ device = "/dev/disk/by-uuid/2e0a3554-a06c-4978-a323-a54563361b21";
fsType = "ext4";
};
fileSystems."/boot" =
{ device = "/dev/disk/by-uuid/9A80-5B0B";
fsType = "vfat";
};
swapDevices =
[ { device = "/dev/disk/by-uuid/82ba54e0-f718-4da2-8943-a1b044d25954"; }
];
nix.maxJobs = lib.mkDefault 8;
powerManagement.cpuFreqGovernor = lib.mkDefault "powersave";
# High-DPI console
console.font = lib.mkDefault "${pkgs.terminus_font}/share/consolefonts/ter-u28n.psf.gz";
}

+ 1
- 1
hardware/sound/default.nix View File

@ -4,7 +4,7 @@
hardware.pulseaudio = {
enable = true;
support32Bit = true;
}
};
sound.enable = true;
sound.mediaKeys.enable = true;
sound.mediaKeys.volumeStep = "10";


+ 17
- 0
home/chnmy/default.nix View File

@ -0,0 +1,17 @@
{ config, lib, pkgs, ... }: {
imports = [
./git.nix
];
home.packages = with pkgs; [
alacritty
discord
signal-desktop
spotify
tailscale
tdesktop
];
programs.firefox.enable = true;
programs.zathura.enable = true;
}

+ 26
- 0
home/chnmy/git.nix View File

@ -0,0 +1,26 @@
{ lib, pkgs, ... }:
{
home.packages = with pkgs; [
git
git-lfs
github-cli
nix-prefetch-git
nix-prefetch-github
];
programs.git = {
enable = true;
ignores = [ "*~" ".#*" ];
lfs.enable = true;
signing.key = "75507BE256F40CED";
signing.signByDefault = true;
userEmail = "chinmaydpai@gmail.com";
userName = "Chinmay D. Pai";
extraConfig = {
core.editor = "vim";
gc.writeCommitGraph = true;
};
};
}

+ 1
- 1
system/i18n.nix View File

@ -8,5 +8,5 @@
i18n = {
defaultLocale = "en_US.UTF-8";
}
};
}

+ 3
- 3
system/nixos.nix View File

@ -1,7 +1,7 @@
{ config, pkgs, ... }:
{ config, pkgs, lib, ... }:
{
nix.allowedUsers = mkDefault [ "@users" ];
nix.allowedUsers = lib.mkDefault [ "@users" ];
nix.autoOptimiseStore = true;
nix.buildCores = 8;
nix.gc = {
@ -11,6 +11,6 @@
};
nix.maxJobs = 8;
nix.optimise.automatic = true;
nix.trustedUsers = [ "root", "chnmy" ];
nix.trustedUsers = [ "root" "chnmy" ];
nix.useSandbox = true;
}

+ 1
- 1
virtualization/docker.nix View File

@ -9,5 +9,5 @@
autoPrune.enable = true;
enable = true;
enableOnBoot = false;
}
};
}

Loading…
Cancel
Save