Factor gwiad and sesame configuration into base mdule

This commit is contained in:
Julien Hémono 2025-12-06 14:28:28 +01:00
parent 5335a08eb5
commit 9b38a10457
4 changed files with 38 additions and 73 deletions

View file

@ -1,4 +1,4 @@
{ inputs, flake, pkgs, hostName, ... }: { inputs, flake, pkgs, ... }:
{ {
imports = with flake.nixosModules; [ imports = with flake.nixosModules; [
./hardware-configuration.nix ./hardware-configuration.nix
@ -9,23 +9,9 @@
./syncthing.nix ./syncthing.nix
]; ];
# Boot configuration
boot.loader.systemd-boot.enable = true;
boot.loader.systemd-boot.configurationLimit = 10;
boot.loader.efi.canTouchEfiVariables = true;
# Networking # Networking
networking.hostName = hostName;
networking.networkmanager.enable = true; networking.networkmanager.enable = true;
# Set your time zone.
time.timeZone = "Europe/Paris";
# Console
console = {
keyMap = "fr";
};
users.users.jhemono.uid = 1000; users.users.jhemono.uid = 1000;
users.groups.jhemono.gid = 1000; users.groups.jhemono.gid = 1000;
@ -43,17 +29,7 @@
# System packages # System packages
environment.systemPackages = with pkgs; [ environment.systemPackages = with pkgs; [
android-tools android-tools
bc
git
htop
jq
ncdu
rclone rclone
tmux
tree
unzip
vim
zip
]; ];
virtualisation.docker.rootless = { virtualisation.docker.rootless = {
@ -83,8 +59,6 @@
orca orca
]; ];
environment.variables.EDITOR = "vim";
# Some programs need SUID wrappers, can be configured further or are # Some programs need SUID wrappers, can be configured further or are
# started in user sessions. # started in user sessions.
# programs.mtr.enable = true; # programs.mtr.enable = true;

View file

@ -2,12 +2,13 @@
# your system. Help is available in the configuration.nix(5) man page, on # your system. Help is available in the configuration.nix(5) man page, on
# https://search.nixos.org/options and in the NixOS manual (`nixos-help`). # https://search.nixos.org/options and in the NixOS manual (`nixos-help`).
{ flake, config, hostName, lib, pkgs, ... }: { flake, config, lib, pkgs, ... }:
{ {
imports = with flake.nixosModules; [ imports = with flake.nixosModules; [
./hardware-configuration.nix ./hardware-configuration.nix
base base
jhemono
# Supporting # Supporting
./buckets.nix ./buckets.nix
./nginx.nix ./nginx.nix
@ -21,54 +22,11 @@
./syncthing.nix ./syncthing.nix
]; ];
# Boot configuration
boot.loader.systemd-boot.enable = true;
boot.loader.systemd-boot.configurationLimit = 10;
boot.loader.efi.canTouchEfiVariables = true;
# Networking
networking.hostName = hostName;
networking.domain = "hemono.fr";
# Set your time zone.
time.timeZone = "Europe/Paris";
# Console
console = {
keyMap = "fr";
};
# User account
users.users.jhemono = {
isNormalUser = true;
extraGroups = [ "wheel" ]; # Enable 'sudo' for the user.
openssh = {
authorizedKeys.keys = [
"ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAACAQC8Q2lWsqvoqoIxqb8HM96IpvZkFhnwcPdEo+m5peH5N/0PZloEp/NfLbzktXGNACe+bwfweR1Kokjs/Ep0tQQggGtgqB0jAopd1Yw0wzlFWYGqJsGyuFBGP4SljsQvGhU2IwgvuJFIRrOVu+gRTIM1DYGQOveNqlRU/QoqOZDQPvHsoQCLvwmZBzzi7DLktBQZ7h/CJ3GrzD2YUuIyulZGbhfM86i0p7NQ5+TSxuo7Yotbwzrzi7hAROO22ghRfv0vxAPip9SCF1SKIZpSDd8s7Nk6dkDE+95N5cMOkFwokWWsxaTM+EgZfTjQZon1L1/X3UC3hK6C+7GLusoNe8xdjm14e9LA5qG5ZRtLrmIrI2bW5KBj/8iTxRmXpE9x70d2Hl6jtHBQv4rQOAO3BET0TjlNAXchNDOcDbNX1ZqEwyImoF4c3kbr5M2ezWCDltAdvd74mMMiaenxwYkZeZbR3EJPbtC1v//9QQ9S7OzKa5utwjhZFlh0g79GKq8DiU6W8IzzmD7pGi8MIV3wOh1NGlcIlPaIyJY60XN0iRNI9NhMASAF493xPfMlVWl7Tly1VDVcPp5pC47vHU6/2mBbx5tnVShNPnkf4OwF3nC8i0DT+dRKXAxjfpoM5iYIrSHrNj9EKKFE4qNbqtAPTNGGtxJ0fUdWOgXLf5BMfYmaiQ== jhemono@gwiad"
"ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDFWZ1MF5Srp1AkfgzO/19RCeYfCU+HtJFYESS9PhQrQYhUwZtoHExHYyD1nf71+jGFu6HJjXAPDD5ZW1XqYEh8kFvkx8uXw+kKHOVwuVhkcIYduQlsR8e8kbu8y6OABPe3SWmmtiA2HdWCwlZNoyTL1X4+LsA+Hbs0EHn1p+RQ4YeOSuZV/5VETt1Mcu/d0GyFBlnoCtu3VwexBdZgsVkw/kOpjNrY0RhqEwiO7P9J+jXT6HB8wvus6MzgvNPzoFo6hAXqRGu3SvCQJnVkE/AulHBfWLFCwdIrekGCKMv9v51dUJ5pgHxWyZZQhYNFpE2qTj8meExBDfnnYl7MFQ3j termbot"
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIAxc+ov8QKWxdGq3kgGqouGd7nExXgpQtZrjv2TR6ILk jhemono@ipad-fred"
];
};
# packages = with pkgs; [
# firefox
# tree
# ];
};
# System packages # System packages
environment.systemPackages = with pkgs; [ environment.systemPackages = with pkgs; [
git git
htop
jq
ncdu
tmux
tree
unzip
vim
]; ];
environment.variables.EDITOR = "vim";
# OpenSSH # OpenSSH
services.openssh = { services.openssh = {
enable = true; enable = true;

View file

@ -1,5 +1,35 @@
{ pkgs, hostName, ... }:
{ {
# Boot configuration
boot.loader.systemd-boot.enable = true;
boot.loader.systemd-boot.configurationLimit = 10;
boot.loader.efi.canTouchEfiVariables = true;
# Networking
networking.hostName = hostName;
networking.domain = "hemono.fr";
# Time Zone
time.timeZone = "Europe/Paris";
# Console
console.keyMap = "fr";
# System packages
environment.systemPackages = with pkgs; [
htop
jq
ncdu
tmux
tree
unzip
vim
zip
];
environment.variables.EDITOR = "vim";
nix = { nix = {
gc = { gc = {
automatic = true; automatic = true;

View file

@ -7,9 +7,12 @@ in
users.users.${username} = { users.users.${username} = {
description = "Julien Hémono"; description = "Julien Hémono";
isNormalUser = true; isNormalUser = true;
createHome = true;
extraGroups = [ "wheel" ]; extraGroups = [ "wheel" ];
# openssh.authorizedKeys.keys = info.authorizedKeys; openssh.author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