flake: Initialise new repository
This commit is contained in:
commit
1eb25ada72
41 changed files with 1657 additions and 0 deletions
68
hosts/galanthus/configuration.nix
Normal file
68
hosts/galanthus/configuration.nix
Normal file
|
|
@ -0,0 +1,68 @@
|
|||
{ inputs, pkgs, ... }:
|
||||
{
|
||||
imports = [
|
||||
inputs.agenix.nixosModules.default
|
||||
./hardware-configuration.nix
|
||||
../../modules/nixos
|
||||
];
|
||||
|
||||
boot = {
|
||||
loader = {
|
||||
systemd-boot.enable = true;
|
||||
efi.canTouchEfiVariables = true;
|
||||
};
|
||||
};
|
||||
|
||||
networking = {
|
||||
hostName = "galanthus";
|
||||
networkmanager.enable = true;
|
||||
};
|
||||
|
||||
nix = {
|
||||
settings = {
|
||||
experimental-features = [
|
||||
"nix-command"
|
||||
"flakes"
|
||||
];
|
||||
trusted-users = [ "jan" ];
|
||||
};
|
||||
gc = {
|
||||
automatic = true;
|
||||
dates = "weekly";
|
||||
};
|
||||
};
|
||||
|
||||
users.users.jan = {
|
||||
isNormalUser = true;
|
||||
description = "Jan Kremer";
|
||||
extraGroups = [
|
||||
"networkmanager"
|
||||
"wheel"
|
||||
];
|
||||
};
|
||||
|
||||
services = {
|
||||
openssh.enable = true;
|
||||
};
|
||||
|
||||
programs = {
|
||||
git.enable = true;
|
||||
|
||||
gnupg.agent = {
|
||||
enable = true;
|
||||
enableSSHSupport = true;
|
||||
};
|
||||
};
|
||||
|
||||
environment.systemPackages = [
|
||||
pkgs.yt-dlp
|
||||
pkgs.spotdl
|
||||
pkgs.ffmpeg
|
||||
];
|
||||
|
||||
time.timeZone = "Europe/Berlin";
|
||||
|
||||
i18n.defaultLocale = "de_DE.UTF-8";
|
||||
|
||||
system.stateVersion = "23.11"; # Don't change!
|
||||
}
|
||||
59
hosts/galanthus/hardware-configuration.nix
Normal file
59
hosts/galanthus/hardware-configuration.nix
Normal file
|
|
@ -0,0 +1,59 @@
|
|||
{
|
||||
config,
|
||||
lib,
|
||||
modulesPath,
|
||||
...
|
||||
}:
|
||||
{
|
||||
imports = [ (modulesPath + "/installer/scan/not-detected.nix") ];
|
||||
|
||||
boot = {
|
||||
initrd.availableKernelModules = [
|
||||
"xhci_pci"
|
||||
"ahci"
|
||||
"usbhid"
|
||||
"usb_storage"
|
||||
"sd_mod"
|
||||
];
|
||||
initrd.kernelModules = [ ];
|
||||
kernelModules = [
|
||||
"fuse"
|
||||
"kvm-intel"
|
||||
"coretemp"
|
||||
];
|
||||
extraModulePackages = [ ];
|
||||
};
|
||||
|
||||
fileSystems = {
|
||||
"/" = {
|
||||
device = "/dev/disk/by-uuid/a5d90a39-7b34-4112-9d76-90c279ececfb";
|
||||
fsType = "ext4";
|
||||
};
|
||||
|
||||
"/boot" = {
|
||||
device = "/dev/disk/by-uuid/F9B8-FABD";
|
||||
fsType = "vfat";
|
||||
};
|
||||
|
||||
## 8 TB HDD
|
||||
"/mnt/sdb1" = {
|
||||
device = "/dev/disk/by-uuid/10fef994-6ff0-4896-bc34-1ca4403af3d7";
|
||||
fsType = "ext4";
|
||||
};
|
||||
};
|
||||
|
||||
swapDevices = [
|
||||
{
|
||||
device = "/swapfile";
|
||||
size = 16 * 1024; # 16GB
|
||||
}
|
||||
];
|
||||
|
||||
networking = {
|
||||
useDHCP = lib.mkDefault true;
|
||||
interfaces.eno1.wakeOnLan.enable = true;
|
||||
};
|
||||
|
||||
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
|
||||
hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
|
||||
}
|
||||
109
hosts/mac/configuration.nix
Normal file
109
hosts/mac/configuration.nix
Normal file
|
|
@ -0,0 +1,109 @@
|
|||
{ inputs, ... }:
|
||||
{
|
||||
imports = [
|
||||
inputs.home-manager.darwinModules.home-manager
|
||||
inputs.agenix.darwinModules.default
|
||||
../../modules/darwin
|
||||
];
|
||||
|
||||
## Set username and home directory (required by home-manager)
|
||||
users.users.jan = {
|
||||
name = "jan";
|
||||
home = "/Users/jan";
|
||||
};
|
||||
networking.hostName = "Mac-von-Jan";
|
||||
|
||||
nix = {
|
||||
enable = false;
|
||||
## Recommended for nixd
|
||||
nixPath = [ "nixpkgs=${inputs.nixpkgs}" ];
|
||||
settings = {
|
||||
experimental-features = [
|
||||
"nix-command"
|
||||
"flakes"
|
||||
];
|
||||
trusted-users = [
|
||||
"root"
|
||||
"jan"
|
||||
"@admin"
|
||||
];
|
||||
};
|
||||
# gc.automatic = true;
|
||||
};
|
||||
|
||||
nixpkgs = {
|
||||
hostPlatform = "aarch64-darwin";
|
||||
config.allowUnfree = true;
|
||||
};
|
||||
|
||||
home-manager = {
|
||||
useGlobalPkgs = true;
|
||||
useUserPackages = true;
|
||||
users.jan = import ../../modules/home-manager;
|
||||
extraSpecialArgs = {
|
||||
inherit inputs;
|
||||
};
|
||||
backupFileExtension = "backup";
|
||||
};
|
||||
|
||||
homebrew = {
|
||||
enable = true;
|
||||
onActivation = {
|
||||
upgrade = true;
|
||||
cleanup = "zap";
|
||||
};
|
||||
};
|
||||
|
||||
programs = {
|
||||
zsh.enable = true;
|
||||
fish.enable = true;
|
||||
};
|
||||
|
||||
security.pam.services.sudo_local.touchIdAuth = true;
|
||||
|
||||
system = {
|
||||
primaryUser = "jan";
|
||||
defaults = {
|
||||
dock = {
|
||||
autohide = true;
|
||||
autohide-delay = 0.0;
|
||||
autohide-time-modifier = 0.0;
|
||||
orientation = "left";
|
||||
mru-spaces = false;
|
||||
largesize = 64;
|
||||
magnification = false;
|
||||
# persistent-apps = [
|
||||
# "/Applications/Safari.app"
|
||||
# "/System/Applications/Mail.app"
|
||||
# "/System/Applications/Calendar.app"
|
||||
# "/Applications/Things3.app"
|
||||
# "/Applications/Ghostty.app"
|
||||
# "/Applications/Obsidian.app"
|
||||
# "/System/Applications/Preview.app"
|
||||
# "/Applications/NetNewsWire.app"
|
||||
# "/System/Applications/Music.app"
|
||||
# "/System/Applications/Books.app"
|
||||
# "/System/Applications/System Settings.app"
|
||||
# ];
|
||||
};
|
||||
finder = {
|
||||
AppleShowAllExtensions = true;
|
||||
FXPreferredViewStyle = "clmv";
|
||||
ShowPathbar = true;
|
||||
_FXShowPosixPathInTitle = true;
|
||||
};
|
||||
# screencapture.location = "~/Pictures/Bildschirmfotos";
|
||||
};
|
||||
keyboard = {
|
||||
enableKeyMapping = true;
|
||||
remapCapsLockToEscape = true;
|
||||
};
|
||||
|
||||
## Set Git commit hash for darwin-version.
|
||||
configurationRevision = inputs.self.rev or inputs.self.dirtyRev or null;
|
||||
|
||||
## Used for backwards compatibility, please read the changelog before changing.
|
||||
## $ darwin-rebuild changelog
|
||||
stateVersion = 4;
|
||||
};
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue