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

View File

@ -2,9 +2,9 @@
description = "System config"; description = "System config";
inputs = { inputs = {
nixpkgs.url = github:nixos/nixpkgs/nixos-unstable; nixpkgs.url = github:nixos/nixpkgs/nixos-23.11;
home-manager = { home-manager = {
url = "github:nix-community/home-manager"; url = "github:nix-community/home-manager/release-23.11";
inputs.nixpkgs.follows = "nixpkgs"; inputs.nixpkgs.follows = "nixpkgs";
}; };
}; };
@ -27,7 +27,10 @@
home-manager.useGlobalPkgs = true; home-manager.useGlobalPkgs = true;
home-manager.useUserPackages = true; home-manager.useUserPackages = true;
home-manager.users.dm = { 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.useGlobalPkgs = true;
home-manager.useUserPackages = true; home-manager.useUserPackages = true;
home-manager.users.dm = { 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; [ home.packages = with pkgs; [
gnome.nautilus anytype
anki calc
conda
dig dig
direnv direnv
fd # find alternative
ffmpeg ffmpeg
firefox-wayland firefox-wayland
fuzzel fuzzel
fzf fzf
gcc gcc
git gnome.nautilus
git-lfs
gnumake gnumake
gnupg gnupg
gthumb gthumb
@ -25,22 +24,17 @@
megatools megatools
mpv mpv
networkmanagerapplet networkmanagerapplet
nmap
nnn
nodejs
obsidian obsidian
openconnect
owncloud-client
pass pass
polkit_gnome
pavucontrol pavucontrol
pinentry-qt pinentry-qt
polkit_gnome
pulseaudio pulseaudio
pv pynitrokey
rawtherapee sshfs
rpi-imager
ripgrep
swaybg swaybg
swaylock
swayidle
thunderbird thunderbird
tmux tmux
tree-sitter tree-sitter
@ -50,33 +44,28 @@
wl-clipboard wl-clipboard
xdg-utils xdg-utils
zathura zathura
zotero
]; ];
home.stateVersion = "22.11";
programs.home-manager = {
enable = true;
};
home.file = { home.file = {
".config/" = { ".config/" = {
source = ./dotfiles/.config; source = ../dotfiles/.config;
recursive = true; recursive = true;
}; };
}; };
home.file = { home.file = {
".xkb/" = { ".xkb/" = {
source = ./dotfiles/.xkb; source = ../dotfiles/.xkb;
recursive = true; recursive = true;
}; };
}; };
home.file = { home.file = {
".profile" = { ".profile" = {
source = ./dotfiles/.profile; source = ../dotfiles/.profile;
recursive = true; recursive = true;
}; };
}; };
home.file = { home.file = {
".tmux.conf" = { ".tmux.conf" = {
source = ./dotfiles/.tmux.conf; source = ../dotfiles/.tmux.conf;
recursive = true; recursive = true;
}; };
}; };

View File

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

View File

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