update dotfiles, add dmeiburg conf ...

This commit is contained in:
Daniel Meiburg 2024-03-27 21:04:32 +01:00
parent f8a8f6dee6
commit 4ba4cb0d5d
Signed by: dm
GPG Key ID: E5827ECFFE0AA4F2
10 changed files with 203 additions and 96 deletions

@ -1 +1 @@
Subproject commit ea8b60f8bc7398661990063b8b723ee2f5a6a924
Subproject commit f91ac0b0ac7dd84ef20c8becc9b9690a3d882018

View File

@ -7,31 +7,32 @@
]
},
"locked": {
"lastModified": 1700695018,
"narHash": "sha256-MAiPLgBF4GLzSOlhnPCDWkWW5CDx4i7ApIYaR+TwTVg=",
"lastModified": 1710888565,
"narHash": "sha256-s9Hi4RHhc6yut4EcYD50sZWRDKsugBJHSbON8KFwoTw=",
"owner": "nix-community",
"repo": "home-manager",
"rev": "134deb46abd5d0889d913b8509413f6f38b0811e",
"rev": "f33900124c23c4eca5831b9b5eb32ea5894375ce",
"type": "github"
},
"original": {
"owner": "nix-community",
"ref": "release-23.11",
"repo": "home-manager",
"type": "github"
}
},
"nixpkgs": {
"locked": {
"lastModified": 1700390070,
"narHash": "sha256-de9KYi8rSJpqvBfNwscWdalIJXPo8NjdIZcEJum1mH0=",
"lastModified": 1711460390,
"narHash": "sha256-akSgjDZL6pVHEfSE6sz1DNSXuYX6hq+P/1Z5IoYWs7E=",
"owner": "nixos",
"repo": "nixpkgs",
"rev": "e4ad989506ec7d71f7302cc3067abd82730a4beb",
"rev": "44733514b72e732bd49f5511bd0203dea9b9a434",
"type": "github"
},
"original": {
"owner": "nixos",
"ref": "nixos-unstable",
"ref": "nixos-23.11",
"repo": "nixpkgs",
"type": "github"
}

View File

@ -2,9 +2,9 @@
description = "System config";
inputs = {
nixpkgs.url = github:nixos/nixpkgs/nixos-unstable;
nixpkgs.url = github:nixos/nixpkgs/nixos-23.11;
home-manager = {
url = "github:nix-community/home-manager";
url = "github:nix-community/home-manager/release-23.11";
inputs.nixpkgs.follows = "nixpkgs";
};
};
@ -27,7 +27,10 @@
home-manager.useGlobalPkgs = true;
home-manager.useUserPackages = true;
home-manager.users.dm = {
imports = [ ./home.nix ];
imports = [
./hosts/home-common.nix
./hosts/home-workstations.nix
];
};
}
];
@ -41,7 +44,30 @@
home-manager.useGlobalPkgs = true;
home-manager.useUserPackages = true;
home-manager.users.dm = {
imports = [ ./home.nix ];
imports = [
./hosts/home-common.nix
./hosts/home-workstations.nix
];
};
}
];
};
dmeiburg = lib.nixosSystem {
system = "aarch64-linux";
pkgs = import nixpkgs {
system = "aarch64-linux";
config.allowUnfree = true;
};
modules = [
./hosts/dmeiburg/configuration.nix
home-manager.nixosModules.home-manager {
home-manager.useGlobalPkgs = true;
home-manager.useUserPackages = true;
home-manager.users.dm = {
imports = [
./hosts/home-common.nix
];
};
}
];

56
hosts/common.nix Normal file
View File

@ -0,0 +1,56 @@
{ config, pkgs, ... }:
{
# Bootloader.
boot.loader.systemd-boot.enable = true;
boot.loader.efi.canTouchEfiVariables = true;
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";
};
services.openssh = {
enable = true;
settings = {
PasswordAuthentication = false;
KbdInteractiveAuthentication = false;
};
};
users.users.dm = {
isNormalUser = true;
description = "Daniel Meiburg";
extraGroups = [ "networkmanager" "wheel" "dialout"];
packages = with pkgs; [
];
openssh.authorizedKeys.keys = [
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIJipJtCrYUPokjppDdz97XHo2vEDBUzgvUU33Wst6AWt openpgp:0xF3D173A6"
];
};
networking.networkmanager.enable = true;
programs.neovim = {
enable = true;
viAlias = true;
vimAlias = true;
defaultEditor = true;
};
programs.fish.enable = true;
nix.gc = {
automatic = true;
dates = "weekly";
options = "--delete-older-than 30d";
};
}

View File

@ -0,0 +1,34 @@
# Edit this configuration file to define what should be installed on
# your system. Help is available in the configuration.nix(5) man page
# and in the NixOS manual (accessible by running nixos-help).
{ config, pkgs, ... }:
{
imports =
[ # Include the results of the hardware scan.
./hardware-configuration.nix
../common.nix
];
networking.hostName = "dmeiburg"; # Define your hostname.
networking.firewall.trustedInterfaces = [ "docker0" ];
networking.firewall.allowedTCPPorts = [ 22 80 443 ];
environment.systemPackages = with pkgs; [
gnupg
pinentry
];
virtualisation.docker.enable = true;
users.users.dm.extraGroups = [ "docker" ];
programs = {
gnupg.agent = {
enable = true;
};
};
system.stateVersion = "23.11"; # Did you read the comment?
}

View File

@ -0,0 +1,36 @@
# Do not modify this file! It was generated by nixos-generate-config
# and may be overwritten by future invocations. Please make changes
# to /etc/nixos/configuration.nix instead.
{ config, lib, pkgs, modulesPath, ... }:
{
imports =
[ (modulesPath + "/profiles/qemu-guest.nix")
];
boot.initrd.availableKernelModules = [ "xhci_pci" "virtio_pci" "virtio_scsi" "ahci" "usbhid" "sr_mod" ];
boot.initrd.kernelModules = [ ];
boot.kernelModules = [ ];
boot.extraModulePackages = [ ];
fileSystems."/" =
{ device = "/dev/disk/by-uuid/a31d9dbe-42dd-44ba-acc0-39d33795dcce";
fsType = "ext4";
};
fileSystems."/boot" =
{ device = "/dev/disk/by-uuid/1FDC-BEDE";
fsType = "vfat";
};
swapDevices = [ ];
# Enables DHCP on each ethernet and wireless interface. In case of scripted networking
# (the default) this is the recommended approach. When using systemd-networkd it's
# still possible to use this option, but it's recommended to use it in conjunction
# with explicit per-interface declarations with `networking.interfaces.<interface>.useDHCP`.
networking.useDHCP = lib.mkDefault true;
# networking.interfaces.enp3s0.useDHCP = lib.mkDefault true;
nixpkgs.hostPlatform = lib.mkDefault "aarch64-linux";
}

18
hosts/home-common.nix Normal file
View File

@ -0,0 +1,18 @@
{ pkgs, ...}:
{
home.packages = with pkgs; [
fd # find alternative
git
htop
neovim
nmap
nnn
pv
ripgrep
];
home.stateVersion = "22.11";
programs.home-manager = {
enable = true;
};
}

View File

@ -2,18 +2,17 @@
{
home.packages = with pkgs; [
gnome.nautilus
anki
anytype
calc
conda
dig
direnv
fd # find alternative
ffmpeg
firefox-wayland
fuzzel
fzf
gcc
git
git-lfs
gnome.nautilus
gnumake
gnupg
gthumb
@ -25,22 +24,17 @@
megatools
mpv
networkmanagerapplet
nmap
nnn
nodejs
obsidian
openconnect
owncloud-client
pass
polkit_gnome
pavucontrol
pinentry-qt
polkit_gnome
pulseaudio
pv
rawtherapee
rpi-imager
ripgrep
pynitrokey
sshfs
swaybg
swaylock
swayidle
thunderbird
tmux
tree-sitter
@ -50,33 +44,28 @@
wl-clipboard
xdg-utils
zathura
zotero
];
home.stateVersion = "22.11";
programs.home-manager = {
enable = true;
};
home.file = {
".config/" = {
source = ./dotfiles/.config;
source = ../dotfiles/.config;
recursive = true;
};
};
home.file = {
".xkb/" = {
source = ./dotfiles/.xkb;
source = ../dotfiles/.xkb;
recursive = true;
};
};
home.file = {
".profile" = {
source = ./dotfiles/.profile;
source = ../dotfiles/.profile;
recursive = true;
};
};
home.file = {
".tmux.conf" = {
source = ./dotfiles/.tmux.conf;
source = ../dotfiles/.tmux.conf;
recursive = true;
};
};

View File

@ -4,6 +4,7 @@
imports =
[ # Include the results of the hardware scan.
./hardware-configuration.nix
../common.nix
../workstation.nix
];

View File

@ -3,11 +3,9 @@
{
nixpkgs.config.permittedInsecurePackages = [
"zotero-6.0.27"
"electron-25.9.0"
];
# Bootloader.
boot.loader.systemd-boot.enable = true;
boot.loader.efi.canTouchEfiVariables = true;
nixpkgs.config.allowUnfree = true;
boot.initrd.secrets = {
"/crypto_keyfile.bin" = null;
@ -18,24 +16,6 @@
hardware.opengl.enable = true;
networking.networkmanager.enable = true;
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";
};
fonts.packages = with pkgs; [
noto-fonts
font-awesome
@ -59,56 +39,22 @@
security.pam.services.swaylock = {};
services.openssh = {
enable = true;
settings = {
PasswordAuthentication = false;
KbdInteractiveAuthentication = false;
};
};
users.users.dm = {
isNormalUser = true;
description = "Daniel Meiburg";
extraGroups = [ "networkmanager" "wheel" "dialout"];
packages = with pkgs; [
];
openssh.authorizedKeys.keys = [
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIJipJtCrYUPokjppDdz97XHo2vEDBUzgvUU33Wst6AWt openpgp:0xF3D173A6"
];
};
# enable nitrokeys
services.udev.packages = [ pkgs.nitrokey-udev-rules ];
programs = {
ssh.startAgent = false;
gnupg.agent = {
pinentryFlavor = "qt";
enable = true;
pinentryFlavor = "qt";
enableSSHSupport = true;
};
};
nixpkgs.config.allowUnfree = true;
environment.systemPackages = with pkgs; [
];
programs.neovim = {
enable = true;
viAlias = true;
vimAlias = true;
defaultEditor = true;
};
programs.fish.enable = true;
services.getty.autologinUser = "dm";
programs.dconf.enable = true;
nix.gc = {
automatic = true;
dates = "weekly";
options = "--delete-older-than 30d";
};
services.syncthing = {
enable = true;
user = "dm";