mirror of
https://github.com/ivabus/nixos
synced 2024-11-22 08:25:07 +03:00
Split rubusidaeus config + split user and git config
This commit is contained in:
parent
c5cfec0c98
commit
35cf2d2a39
9 changed files with 67 additions and 39 deletions
|
@ -1,6 +1,7 @@
|
|||
{
|
||||
imports = [
|
||||
./base.nix
|
||||
./git.nix
|
||||
./laptop.nix
|
||||
./locale.nix
|
||||
./networking.nix
|
||||
|
|
25
common/git.nix
Normal file
25
common/git.nix
Normal file
|
@ -0,0 +1,25 @@
|
|||
{ config, pkgs, lib, ... }:
|
||||
|
||||
let
|
||||
cfg = config.my.git;
|
||||
in {
|
||||
options = {
|
||||
my.git.enable = lib.mkEnableOption "Enable git configuration";
|
||||
};
|
||||
|
||||
config = lib.mkIf (cfg.enable) {
|
||||
home-manager.useGlobalPkgs = true;
|
||||
home-manager.useUserPackages = true;
|
||||
home-manager.users.ivabus = {
|
||||
programs.git = {
|
||||
enable = true;
|
||||
userName = "Ivan Bushchik";
|
||||
userEmail = "ivabus@ivabus.dev";
|
||||
signing.key = "2F16FBF3262E090C";
|
||||
signing.signByDefault = true;
|
||||
package = pkgs.gitAndTools.gitFull;
|
||||
};
|
||||
home.stateVersion = "23.05";
|
||||
};
|
||||
};
|
||||
}
|
|
@ -48,15 +48,4 @@ in rec {
|
|||
|
||||
home-manager.useGlobalPkgs = true;
|
||||
home-manager.useUserPackages = true;
|
||||
home-manager.users.ivabus = {
|
||||
programs.git = {
|
||||
enable = true;
|
||||
userName = "Ivan Bushchik";
|
||||
userEmail = "ivabus@ivabus.dev";
|
||||
signing.key = "2F16FBF3262E090C";
|
||||
signing.signByDefault = true;
|
||||
package = pkgs.gitAndTools.gitFull;
|
||||
};
|
||||
home.stateVersion = "23.05";
|
||||
};
|
||||
}
|
||||
|
|
35
hardware/rpi4.nix
Normal file
35
hardware/rpi4.nix
Normal file
|
@ -0,0 +1,35 @@
|
|||
|
||||
{ config, pkgs, lib, ... }:
|
||||
|
||||
let
|
||||
overlay = final: super: {
|
||||
makeModulesClosure = x:
|
||||
super.makeModulesClosure (x // { allowMissing = true; }); # Ignores missing kernel modules (can't build image without this fix)
|
||||
};
|
||||
in {
|
||||
|
||||
boot = {
|
||||
kernelPackages = pkgs.linuxKernel.packages.linux_rpi4;
|
||||
initrd.availableKernelModules = [ "xhci_pci" "usbhid" "usb_storage" ];
|
||||
loader = {
|
||||
grub.enable = false;
|
||||
generic-extlinux-compatible.enable = true;
|
||||
};
|
||||
};
|
||||
|
||||
fileSystems = {
|
||||
"/" = {
|
||||
device = "/dev/disk/by-label/NIXOS_SD";
|
||||
fsType = "ext4";
|
||||
options = [ "noatime" ];
|
||||
};
|
||||
};
|
||||
|
||||
sdImage.compressImage = false;
|
||||
|
||||
# Augghhh (activates fix)
|
||||
nixpkgs.overlays = [ overlay ];
|
||||
|
||||
hardware.enableRedistributableFirmware = true;
|
||||
}
|
||||
|
|
@ -16,6 +16,7 @@ in {
|
|||
boot.kernelParams = [ "apple_dcp.show_notch=1" ];
|
||||
|
||||
my.laptop.enable = true;
|
||||
my.git.enable = true;
|
||||
my.roles = {
|
||||
design.enable = true;
|
||||
devel.enable = true;
|
||||
|
|
|
@ -17,6 +17,7 @@ in {
|
|||
|
||||
# All "my" options
|
||||
my.laptop.enable = true;
|
||||
my.git.enable = true;
|
||||
my.roles = {
|
||||
design.enable = true;
|
||||
devel.enable = true;
|
||||
|
|
|
@ -3,38 +3,16 @@
|
|||
|
||||
let
|
||||
my = import ../..;
|
||||
overlay = final: super: {
|
||||
makeModulesClosure = x:
|
||||
super.makeModulesClosure (x // { allowMissing = true; });
|
||||
};
|
||||
in {
|
||||
imports = [
|
||||
# Not using ./hardware.nix as additional hardware file due to generation of images that doesn't change between installations. Maybe I should create dedicated raspberry.nix for all raspberry pies.
|
||||
my.modules
|
||||
../../hardware/rpi4.nix
|
||||
];
|
||||
|
||||
boot = {
|
||||
kernelPackages = pkgs.linuxKernel.packages.linux_rpi4;
|
||||
initrd.availableKernelModules = [ "xhci_pci" "usbhid" "usb_storage" ];
|
||||
loader = {
|
||||
grub.enable = false;
|
||||
generic-extlinux-compatible.enable = true;
|
||||
};
|
||||
};
|
||||
|
||||
fileSystems = {
|
||||
"/" = {
|
||||
device = "/dev/disk/by-label/NIXOS_SD";
|
||||
fsType = "ext4";
|
||||
options = [ "noatime" ];
|
||||
};
|
||||
};
|
||||
|
||||
sdImage.compressImage = false;
|
||||
|
||||
networking.hostName = "rubusidaeus";
|
||||
|
||||
my.laptop.enable = false;
|
||||
my.git.enable = false;
|
||||
my.roles = {
|
||||
design.enable = false;
|
||||
devel.enable = false;
|
||||
|
@ -47,10 +25,6 @@ in {
|
|||
yggdrasil-client.enable = true;
|
||||
};
|
||||
|
||||
# Augghhh
|
||||
|
||||
nixpkgs.overlays = [ overlay ];
|
||||
|
||||
networking.useDHCP = true;
|
||||
|
||||
hardware.enableRedistributableFirmware = true;
|
||||
|
|
|
@ -15,6 +15,7 @@ in {
|
|||
networking.hostName = "stella";
|
||||
|
||||
my.laptop.enable = true;
|
||||
my.git.enable = true;
|
||||
my.roles = {
|
||||
design.enable = true;
|
||||
devel.enable = true;
|
||||
|
|
|
@ -15,6 +15,7 @@ in {
|
|||
networking.hostName = "vetus";
|
||||
|
||||
my.laptop.enable = false;
|
||||
my.git.enable = true;
|
||||
my.roles = {
|
||||
design.enable = true;
|
||||
devel.enable = true;
|
||||
|
|
Loading…
Reference in a new issue