move all expressions to nix/; include modularized home-manager config
This commit is contained in:
parent
d76a7f963b
commit
13bd5e9000
65 changed files with 1726 additions and 511 deletions
17
nix/os/profiles/common/boot.nix
Normal file
17
nix/os/profiles/common/boot.nix
Normal file
|
@ -0,0 +1,17 @@
|
|||
{ pkgs
|
||||
, ...
|
||||
}:
|
||||
|
||||
{
|
||||
boot.kernelPackages = pkgs.linuxPackages_latest;
|
||||
boot.loader.grub = {
|
||||
efiSupport = true;
|
||||
efiInstallAsRemovable = false;
|
||||
enable = true;
|
||||
version = 2;
|
||||
};
|
||||
|
||||
boot.loader.efi.canTouchEfiVariables = true;
|
||||
boot.tmpOnTmpfs = true;
|
||||
}
|
||||
|
10
nix/os/profiles/common/configuration.nix
Normal file
10
nix/os/profiles/common/configuration.nix
Normal file
|
@ -0,0 +1,10 @@
|
|||
{ ... }:
|
||||
|
||||
{
|
||||
imports = [
|
||||
./boot.nix
|
||||
./pkg.nix
|
||||
./user.nix
|
||||
./system.nix
|
||||
];
|
||||
}
|
26
nix/os/profiles/common/pkg.nix
Normal file
26
nix/os/profiles/common/pkg.nix
Normal file
|
@ -0,0 +1,26 @@
|
|||
{ config, pkgs, ... }:
|
||||
|
||||
{
|
||||
# Package configuration
|
||||
environment.systemPackages = with pkgs; [
|
||||
elfutils
|
||||
exfat
|
||||
file
|
||||
tree
|
||||
pwgen
|
||||
proot
|
||||
|
||||
parted
|
||||
pv
|
||||
tmux
|
||||
wget
|
||||
curl
|
||||
|
||||
git
|
||||
pastebinit
|
||||
gist
|
||||
|
||||
usbutils
|
||||
pciutils
|
||||
];
|
||||
}
|
88
nix/os/profiles/common/system.nix
Normal file
88
nix/os/profiles/common/system.nix
Normal file
|
@ -0,0 +1,88 @@
|
|||
{ config
|
||||
, pkgs
|
||||
, lib
|
||||
, ...
|
||||
}:
|
||||
|
||||
{
|
||||
nix.binaryCachePublicKeys = [
|
||||
# "hydra.nixos.org-1:CNHJZBh9K4tP3EKF6FkkgeVYsS3ohTl+oS0Qa8bezVs="
|
||||
];
|
||||
nix.binaryCaches = [
|
||||
"https://cache.nixos.org"
|
||||
# "https://hydra.nixos.org"
|
||||
];
|
||||
nix.trustedBinaryCaches = [
|
||||
"https://cache.nixos.org"
|
||||
# "https://hydra.nixos.org"
|
||||
];
|
||||
|
||||
nix.daemonNiceLevel = lib.mkDefault 19;
|
||||
nix.daemonIONiceLevel = lib.mkDefault 7;
|
||||
nix.maxJobs = lib.mkDefault 3;
|
||||
nix.buildCores = lib.mkDefault 3;
|
||||
nix.useSandbox = true;
|
||||
|
||||
environment.etc."lvm/lvm.conf".text = ''
|
||||
devices {
|
||||
issue_discards = 1
|
||||
}
|
||||
'';
|
||||
|
||||
# Fonts, I18N, Date ...
|
||||
fonts = {
|
||||
enableCoreFonts = true;
|
||||
};
|
||||
|
||||
i18n = {
|
||||
consoleFont = "lat9w-16";
|
||||
defaultLocale = "en_US.UTF-8";
|
||||
};
|
||||
time.timeZone = "Europe/Berlin";
|
||||
services.gpm.enable = true;
|
||||
|
||||
services.packagekit.enable = true;
|
||||
services.openssh.enable = true;
|
||||
networking.firewall.enable = true;
|
||||
|
||||
# Activation scripts for impure set up of paths in /
|
||||
system.activationScripts.bin = ''
|
||||
echo "setting up /bin..."
|
||||
ln -sfT ${pkgs.bash}/bin/bash /bin/.bash
|
||||
mv -Tf /bin/.bash /bin/bash
|
||||
'';
|
||||
system.activationScripts.etcX11sessinos = ''
|
||||
echo "setting up /etc/X11/sessions..."
|
||||
mkdir -p /etc/X11
|
||||
ln -sfT ${config.services.xserver.displayManager.session.desktops} /etc/X11/.sessions
|
||||
mv -Tf /etc/X11/.sessions /etc/X11/sessions
|
||||
'';
|
||||
system.activationScripts.lib64 = ''
|
||||
echo "setting up /lib64..."
|
||||
mkdir -p /lib64
|
||||
ln -sfT ${pkgs.stdenv.glibc}/lib/ld-linux-x86-64.so.2 /lib64/.ld-linux-x86-64.so.2
|
||||
mv -Tf /lib64/.ld-linux-x86-64.so.2 /lib64/ld-linux-x86-64.so.2
|
||||
'';
|
||||
|
||||
programs.zsh = {
|
||||
enable = false;
|
||||
# TODO: basic zsh config
|
||||
# enableAutosuggestions = true; # enableCompletion = true;
|
||||
# syntaxHighlighting.enable = true;
|
||||
# syntaxHighlighting.patterns = {};
|
||||
# ohMyZsh = {
|
||||
# enable = true;
|
||||
# theme = "tjkirch";
|
||||
# };
|
||||
# promptInit = ''
|
||||
# autoload -U promptinit
|
||||
# promptinit
|
||||
# ZSH_THEME_GIT_PROMPT_PREFIX='@ '
|
||||
# PROMPT='%F{%(!.red.green)}%n%f@%m %(?.%F{green}✓%f.%F{red}✗ ($?%))%f %F{blue}%~%f %F{magenta}$(git_prompt_info)%f
|
||||
#%_%F{%(!.red.green)}$(prompt_char)%f '
|
||||
# RPROMPT=""
|
||||
# '';
|
||||
# interactiveShellInit = ''
|
||||
# '';
|
||||
};
|
||||
}
|
19
nix/os/profiles/common/user.nix
Normal file
19
nix/os/profiles/common/user.nix
Normal file
|
@ -0,0 +1,19 @@
|
|||
{ config
|
||||
, pkgs
|
||||
, ... }:
|
||||
|
||||
let
|
||||
passwords = import ../../../variables/passwords.crypt.nix;
|
||||
libinfraos = import ../../lib/default.nix { };
|
||||
inherit (import ../../lib/default.nix { }) mkUser mkRoot;
|
||||
in {
|
||||
users.mutableUsers = false;
|
||||
|
||||
users.extraUsers.root = mkRoot { };
|
||||
users.extraUsers.steveej = mkUser {
|
||||
uid = 1000;
|
||||
};
|
||||
|
||||
security.pam.enableU2F = true;
|
||||
security.pam.services.steveej.u2fAuth = true;
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue