init
init
This commit is contained in:
23
hosts/darwin/chidi/default.nix
Normal file
23
hosts/darwin/chidi/default.nix
Normal file
@@ -0,0 +1,23 @@
|
||||
{
|
||||
pkgs,
|
||||
user,
|
||||
...
|
||||
}:
|
||||
|
||||
{
|
||||
imports = [
|
||||
../shared.nix
|
||||
];
|
||||
|
||||
networking.hostName = "chidi";
|
||||
networking.computerName = "Chidi";
|
||||
|
||||
home-manager.users.${user} = {
|
||||
programs.git.userEmail = "christoph@tuist.dev";
|
||||
};
|
||||
|
||||
environment.systemPackages = with pkgs; [
|
||||
slack
|
||||
tuple
|
||||
];
|
||||
}
|
||||
@@ -1,93 +0,0 @@
|
||||
{
|
||||
agenix,
|
||||
config,
|
||||
pkgs,
|
||||
...
|
||||
}:
|
||||
|
||||
let
|
||||
user = "cschmatzler";
|
||||
in
|
||||
{
|
||||
|
||||
imports = [
|
||||
../../modules/darwin/secrets.nix
|
||||
../../modules/darwin/home-manager.nix
|
||||
../../modules/shared
|
||||
agenix.darwinModules.default
|
||||
];
|
||||
|
||||
nix = {
|
||||
package = pkgs.nix;
|
||||
settings = {
|
||||
trusted-users = [
|
||||
"@admin"
|
||||
"${user}"
|
||||
];
|
||||
substituters = [
|
||||
"https://nix-community.cachix.org"
|
||||
"https://cache.nixos.org"
|
||||
];
|
||||
trusted-public-keys = [ "cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY=" ];
|
||||
};
|
||||
gc = {
|
||||
automatic = true;
|
||||
interval = {
|
||||
Weekday = 0;
|
||||
Hour = 2;
|
||||
Minute = 0;
|
||||
};
|
||||
options = "--delete-older-than 30d";
|
||||
};
|
||||
extraOptions = ''
|
||||
experimental-features = nix-command flakes
|
||||
'';
|
||||
};
|
||||
|
||||
environment.systemPackages =
|
||||
with pkgs;
|
||||
[
|
||||
agenix.packages."${pkgs.system}".default
|
||||
]
|
||||
++ (import ../../modules/shared/packages.nix { inherit pkgs; });
|
||||
|
||||
system = {
|
||||
checks.verifyNixPath = false;
|
||||
primaryUser = user;
|
||||
stateVersion = 5;
|
||||
|
||||
defaults = {
|
||||
NSGlobalDomain = {
|
||||
AppleShowAllExtensions = true;
|
||||
ApplePressAndHoldEnabled = false;
|
||||
|
||||
# 120, 90, 60, 30, 12, 6, 2
|
||||
KeyRepeat = 2;
|
||||
|
||||
# 120, 94, 68, 35, 25, 15
|
||||
InitialKeyRepeat = 15;
|
||||
|
||||
"com.apple.mouse.tapBehavior" = 1;
|
||||
"com.apple.sound.beep.volume" = 0.0;
|
||||
"com.apple.sound.beep.feedback" = 0;
|
||||
};
|
||||
|
||||
dock = {
|
||||
autohide = false;
|
||||
show-recents = false;
|
||||
launchanim = true;
|
||||
orientation = "bottom";
|
||||
tilesize = 48;
|
||||
};
|
||||
|
||||
finder = {
|
||||
_FXShowPosixPathInTitle = false;
|
||||
};
|
||||
|
||||
trackpad = {
|
||||
Clicking = true;
|
||||
TrackpadThreeFingerDrag = true;
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
23
hosts/darwin/jason/default.nix
Normal file
23
hosts/darwin/jason/default.nix
Normal file
@@ -0,0 +1,23 @@
|
||||
{
|
||||
config,
|
||||
pkgs,
|
||||
user,
|
||||
...
|
||||
}:
|
||||
|
||||
{
|
||||
imports = [
|
||||
../shared.nix
|
||||
];
|
||||
|
||||
networking.hostName = "jason";
|
||||
networking.computerName = "Jason";
|
||||
|
||||
home-manager.users.${user} = {
|
||||
programs.git.userEmail = "christoph@schmatzler.com";
|
||||
};
|
||||
|
||||
environment.systemPackages = with pkgs; [
|
||||
slack
|
||||
];
|
||||
}
|
||||
14
hosts/darwin/shared.nix
Normal file
14
hosts/darwin/shared.nix
Normal file
@@ -0,0 +1,14 @@
|
||||
{
|
||||
agenix,
|
||||
config,
|
||||
pkgs,
|
||||
lib,
|
||||
...
|
||||
}:
|
||||
|
||||
{
|
||||
imports = [
|
||||
../../profiles/base
|
||||
../../profiles/darwin
|
||||
];
|
||||
}
|
||||
@@ -3,22 +3,21 @@
|
||||
inputs,
|
||||
pkgs,
|
||||
agenix,
|
||||
hostname,
|
||||
user,
|
||||
...
|
||||
}:
|
||||
|
||||
let
|
||||
user = "cschmatzler";
|
||||
keys = [ "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIOk8iAnIaa1deoc7jw8YACPNVka1ZFJxhnU4G74TmS+p" ];
|
||||
in
|
||||
{
|
||||
imports = [
|
||||
../../modules/nixos/secrets.nix
|
||||
../../modules/nixos/disk-config.nix
|
||||
../../modules/shared
|
||||
../../profiles/base
|
||||
../../profiles/nixos
|
||||
agenix.nixosModules.default
|
||||
];
|
||||
|
||||
# Use the systemd-boot EFI boot loader.
|
||||
boot = {
|
||||
loader = {
|
||||
systemd-boot = {
|
||||
@@ -35,54 +34,24 @@ in
|
||||
"usb_storage"
|
||||
"sd_mod"
|
||||
];
|
||||
# Uncomment for AMD GPU
|
||||
# initrd.kernelModules = [ "amdgpu" ];
|
||||
kernelPackages = pkgs.linuxPackages_latest;
|
||||
kernelModules = [ "uinput" ];
|
||||
};
|
||||
|
||||
# Set your time zone.
|
||||
time.timeZone = "America/New_York";
|
||||
time.timeZone = "UTC";
|
||||
|
||||
# The global useDHCP flag is deprecated, therefore explicitly set to false here.
|
||||
# Per-interface useDHCP will be mandatory in the future, so this generated config
|
||||
# replicates the default behaviour.
|
||||
networking = {
|
||||
hostName = "%HOST%"; # Define your hostname.
|
||||
hostName = hostname;
|
||||
useDHCP = false;
|
||||
interfaces."%INTERFACE%".useDHCP = true;
|
||||
};
|
||||
|
||||
nix = {
|
||||
nixPath = [ "nixos-config=/home/${user}/.local/share/src/nixos-config:/etc/nixos" ];
|
||||
settings = {
|
||||
allowed-users = [ "${user}" ];
|
||||
trusted-users = [
|
||||
"@admin"
|
||||
"${user}"
|
||||
];
|
||||
substituters = [
|
||||
"https://nix-community.cachix.org"
|
||||
"https://cache.nixos.org"
|
||||
];
|
||||
trusted-public-keys = [ "cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY=" ];
|
||||
};
|
||||
nix.nixPath = [ "nixos-config=/home/${user}/.local/share/src/nixos-config:/etc/nixos" ];
|
||||
|
||||
package = pkgs.nix;
|
||||
extraOptions = ''
|
||||
experimental-features = nix-command flakes
|
||||
'';
|
||||
};
|
||||
|
||||
# Manages keys and such
|
||||
programs = {
|
||||
gnupg.agent.enable = true;
|
||||
|
||||
# Needed for anything GTK related
|
||||
dconf.enable = true;
|
||||
|
||||
# My shell
|
||||
zsh.enable = true;
|
||||
fish.enable = true;
|
||||
};
|
||||
|
||||
services = {
|
||||
@@ -90,45 +59,24 @@ in
|
||||
xserver = {
|
||||
enable = true;
|
||||
|
||||
# Uncomment these for AMD or Nvidia GPU
|
||||
# videoDrivers = [ "amdgpu" ];
|
||||
# videoDrivers = [ "nvidia" ];
|
||||
|
||||
# Uncomment this for Nvidia GPU
|
||||
# This helps fix tearing of windows for Nvidia cards
|
||||
# services.xserver.screenSection = ''
|
||||
# Option "metamodes" "nvidia-auto-select +0+0 {ForceFullCompositionPipeline=On}"
|
||||
# Option "AllowIndirectGLXProtocol" "off"
|
||||
# Option "TripleBuffer" "on"
|
||||
# '';
|
||||
|
||||
# LightDM Display Manager
|
||||
displayManager.lightdm = {
|
||||
enable = true;
|
||||
greeters.slick.enable = true;
|
||||
background = ../../modules/nixos/config/login-wallpaper.png;
|
||||
background = ../../profiles/nixos/config/login-wallpaper.png;
|
||||
};
|
||||
|
||||
# Tiling window manager
|
||||
windowManager.bspwm = {
|
||||
enable = true;
|
||||
};
|
||||
|
||||
xkb = {
|
||||
# Turn Caps Lock into Ctrl
|
||||
layout = "us";
|
||||
options = "ctrl:nocaps";
|
||||
};
|
||||
};
|
||||
|
||||
# Better support for general peripherals
|
||||
libinput.enable = true;
|
||||
|
||||
# Let's be able to SSH into this machine
|
||||
openssh.enable = true;
|
||||
|
||||
# Sync state between machines
|
||||
# Sync state between machines
|
||||
syncthing = {
|
||||
enable = true;
|
||||
openDefaultPorts = true;
|
||||
@@ -283,15 +231,12 @@ in
|
||||
virtualisation.docker.enable = true;
|
||||
virtualisation.docker.logDriver = "json-file";
|
||||
|
||||
# It's me, it's you, it's everyone
|
||||
# Additional user config beyond what's in profiles/nixos
|
||||
users.users = {
|
||||
${user} = {
|
||||
isNormalUser = true;
|
||||
extraGroups = [
|
||||
"wheel" # Enable ‘sudo’ for the user.
|
||||
"docker"
|
||||
];
|
||||
shell = pkgs.zsh;
|
||||
openssh.authorizedKeys.keys = keys;
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user