init config

This commit is contained in:
2025-07-04 00:32:17 +02:00
commit 1a20402712
35 changed files with 2383 additions and 0 deletions
+18
View File
@@ -0,0 +1,18 @@
{ config, lib, pkgs, modulesPath, ... }:
{
# Time zone / Internalisation
time.timeZone = "Europe/Warsaw";
i18n.defaultLocale = "pl_PL.UTF-8";
i18n.extraLocaleSettings = {
LC_ADDRESS = "pl_PL.UTF-8";
LC_IDENTIFICATION = "pl_PL.UTF-8";
LC_MEASUREMENT = "pl_PL.UTF-8";
LC_MONETARY = "pl_PL.UTF-8";
LC_NAME = "pl_PL.UTF-8";
LC_NUMERIC = "pl_PL.UTF-8";
LC_PAPER = "pl_PL.UTF-8";
LC_TELEPHONE = "pl_PL.UTF-8";
LC_TIME = "pl_PL.UTF-8";
};
}
+11
View File
@@ -0,0 +1,11 @@
{ config, lib, pkgs, modulesPath, ... }:
{
# Allow unfree packages
nixpkgs.config.allowUnfree = true;
# Overlay different packages on top of nixpkgs
nixpkgs.overlays = [
(import ../../overlays/pkgs.nix)
];
}
+5
View File
@@ -0,0 +1,5 @@
{config, lib, pkgs, modulesPath, ... }:
{
options.lumpiasty.pc = lib.mkEnableOption "Enable options specific to personal computers";
}
+15
View File
@@ -0,0 +1,15 @@
{ config, lib, pkgs, modulesPath, ... }:
{
# List packages installed in system profile. To search, run:
# $ nix search wget
environment.systemPackages = with pkgs; [
vim # Do not forget to add an editor to edit configuration.nix! The Nano editor is also installed by default.
wget
htop
tree
];
nix.settings.experimental-features = [ "nix-command" "flakes" ];
}
+15
View File
@@ -0,0 +1,15 @@
{ config, lib, pkgs, modulesPath, ... }:
{
options.lumpiasty.sshd = lib.mkEnableOption "Enable intel CPU";
config = lib.mkIf config.lumpiasty.sshd {
services.openssh = {
enable = true;
settings = {
PasswordAuthentication = false;
AllowUsers = [ "user" ];
};
};
};
}
+40
View File
@@ -0,0 +1,40 @@
{ config, lib, pkgs, modulesPath, nix-flatpak, ... }:
let
cfg = config.lumpiasty.users;
mkHome = import ../../lib/mkHome.nix { lib = lib; nix-flatpak = nix-flatpak; };
mkUser = import ../../lib/mkUser.nix { lib = lib; };
in
{
options.lumpiasty.users = {
user = lib.mkEnableOption "Create user \"user\"";
drugi = lib.mkEnableOption "Create user \"drugi\"";
};
config = {
# Docker rootless user service, only if pc
# Unfortunately, not implemented in home-manager yet
virtualisation.docker.rootless = {
enable = config.lumpiasty.pc;
setSocketVariable = true;
};
# Flatpak
services.flatpak.enable = true;
# Users
users.mutableUsers = false;
home-manager.useGlobalPkgs = true;
home-manager.useUserPackages = true;
# User user
users.users.user = mkUser cfg.user ../../users/user/config.nix;
home-manager.users.user = mkHome cfg.user ../../users/user/home.nix;
# User drugi
users.users.drugi = mkUser cfg.drugi ../../users/drugi/config.nix;
home-manager.users.drugi = mkHome cfg.drugi ../../users/drugi/home.nix;
};
}