Nix-darwin + Lix init

This commit is contained in:
Agatha Lovelace 2024-09-05 19:55:42 +02:00
parent 3ede14dc65
commit 518c89795b
Signed by: sorceress
GPG Key ID: 01D0B3AB10CED4F8
7 changed files with 351 additions and 135 deletions

View File

@ -1,39 +1,28 @@
{ pkgs, ... }: { { pkgs, ... }:
imports = [ ./users ]; {
## Optimizations ## Optimizations
# Clean /tmp
boot.tmp.cleanOnBoot = true;
# Link identical files # Link identical files
nix.settings.auto-optimise-store = true; nix.settings.auto-optimise-store = true;
# Limit journald logs
services.journald.extraConfig = ''
SystemMaxUse=100M
MaxFileSec=1month
'';
# Garbage collection # Garbage collection
nix.gc = { nix.gc = {
automatic = true; automatic = true;
dates = "weekly";
options = "--delete-older-than 30d"; options = "--delete-older-than 30d";
}; };
## Other ## Other
# Flakes # Flakes
nix.settings.experimental-features = [ "nix-command" "flakes" ]; nix.settings.experimental-features = [
"nix-command"
"flakes"
];
# Enable fish (needed for nix completions) # Enable fish (needed for nix completions)
programs.fish.enable = true; programs.fish.enable = true;
# Fix terminfo
environment.enableAllTerminfo = true;
environment.variables.COLORTERM = "truecolor";
# Packages used on all systems # Packages used on all systems
environment.systemPackages = with pkgs; [ environment.systemPackages = with pkgs; [
ccase ccase
@ -52,38 +41,6 @@
xclip xclip
]; ];
# Enable the OpenSSH daemon.
services.openssh = {
enable = true;
banner = ''
Hello mistress ^,,^
'';
settings.PasswordAuthentication = false;
};
# 🥺 # 🥺
# security.please.enable = true; # security.please.enable = true;
## Locale/Timezone
time.timeZone = "Europe/Berlin";
i18n.defaultLocale = "en_US.UTF-8";
i18n.extraLocaleSettings = {
LC_ADDRESS = "de_DE.UTF-8";
LC_IDENTIFICATION = "de_DE.UTF-8";
LC_MEASUREMENT = "de_DE.UTF-8";
LC_MONETARY = "de_DE.UTF-8";
LC_NAME = "de_DE.UTF-8";
LC_NUMERIC = "de_DE.UTF-8";
LC_PAPER = "de_DE.UTF-8";
LC_TELEPHONE = "de_DE.UTF-8";
LC_TIME = "de_DE.UTF-8";
};
# Configure keymap in X11
services.xserver = {
layout = "us";
xkbVariant = "";
};
} }

View File

@ -4,8 +4,9 @@
home-manager.useGlobalPkgs = true; home-manager.useGlobalPkgs = true;
home-manager.users.agatha = { home-manager.users.agatha = {
home.username = "agatha"; home.username = "agatha";
home.homeDirectory = "/home/agatha"; home.homeDirectory = lib.mkDefault "/home/agatha";
home.stateVersion = config.system.stateVersion; # Fallback for nix-darwin
home.stateVersion = if pkgs.stdenv.isLinux then config.system.stateVersion else "24.05";
home.packages = with pkgs; [ home.packages = with pkgs; [
bat bat
btop btop

53
common/linux-specific.nix Normal file
View File

@ -0,0 +1,53 @@
{
imports = [ ./users ];
## Optimizations
# Clean /tmp
boot.tmp.cleanOnBoot = true;
# Garbage collection
nix.gc.dates = "weekly";
# Limit journald logs
services.journald.extraConfig = ''
SystemMaxUse=100M
MaxFileSec=1month
'';
# Fix terminfo
environment.enableAllTerminfo = true;
environment.variables.COLORTERM = "truecolor";
## Locale/Timezone
time.timeZone = "Europe/Berlin";
i18n.defaultLocale = "en_US.UTF-8";
i18n.extraLocaleSettings = {
LC_ADDRESS = "de_DE.UTF-8";
LC_IDENTIFICATION = "de_DE.UTF-8";
LC_MEASUREMENT = "de_DE.UTF-8";
LC_MONETARY = "de_DE.UTF-8";
LC_NAME = "de_DE.UTF-8";
LC_NUMERIC = "de_DE.UTF-8";
LC_PAPER = "de_DE.UTF-8";
LC_TELEPHONE = "de_DE.UTF-8";
LC_TIME = "de_DE.UTF-8";
};
# Configure keymap in X11
services.xserver = {
layout = "us";
xkbVariant = "";
};
# Enable the OpenSSH daemon.
services.openssh = {
enable = true;
banner = ''
Hello mistress ^,,^
'';
settings.PasswordAuthentication = false;
};
}