mirror of
https://github.com/ItsDrike/nixdots
synced 2025-06-29 07:00:41 +00:00
Split everything up
This commit is contained in:
parent
cb2e2f3906
commit
ebe0e83f92
9 changed files with 99 additions and 104 deletions
13
system/default.nix
Normal file
13
system/default.nix
Normal file
|
@ -0,0 +1,13 @@
|
|||
{lib, ...}:
|
||||
{
|
||||
imports = [
|
||||
./network.nix
|
||||
./users.nix
|
||||
./nix.nix
|
||||
./packages.nix
|
||||
];
|
||||
|
||||
# Internationalisation properties
|
||||
time.timeZone = "CET";
|
||||
i18n.defaultLocale = "en_US.UTF-8";
|
||||
}
|
16
system/network.nix
Normal file
16
system/network.nix
Normal file
|
@ -0,0 +1,16 @@
|
|||
{lib, ...}:
|
||||
{
|
||||
networking = {
|
||||
firewall.enable = false;
|
||||
|
||||
networkmanager = {
|
||||
enable = true;
|
||||
dns = "systemd-resolved";
|
||||
};
|
||||
};
|
||||
|
||||
services.resolved.enable = true;
|
||||
|
||||
# Don't wait for network manager startup
|
||||
systemd.services.NetworkManager-wait-online.enable = lib.mkForce false;
|
||||
}
|
35
system/nix.nix
Normal file
35
system/nix.nix
Normal file
|
@ -0,0 +1,35 @@
|
|||
{pkgs, ...}:
|
||||
{
|
||||
nix = {
|
||||
settings = {
|
||||
# nix often takes up a lot of space, with /nix/store growing beyond reasonable sizes
|
||||
# this turns on automatic optimisation of the nix store that will run during every build
|
||||
# (alternatively, you can do this manually with `nix-store --optimise`)
|
||||
auto-optimise-store = true;
|
||||
# enable flakes support
|
||||
experimental-features = [ "nix-command" "flakes" ];
|
||||
};
|
||||
|
||||
# Enable automatic garbage collection, deleting entries older than 14 days
|
||||
# you can also run this manually with `nix-store --gc --delete-older-than 14d`.
|
||||
# If a result still exists in the file system, all the dependencies used to build
|
||||
# it will be kept.
|
||||
gc = {
|
||||
automatic = true;
|
||||
dates = "weekly";
|
||||
options = "--delete-older-than 14d";
|
||||
};
|
||||
|
||||
# Also run garbage colleciton whenever there is not enough space left,
|
||||
# freeing up to 1 GiB whenever there is less than 512MiB left.
|
||||
extraOptions = ''
|
||||
min-free = ${toString (512 * 1024 * 1024)}
|
||||
max-free = ${toString (1024 * 1024 * 1024)}
|
||||
'';
|
||||
};
|
||||
|
||||
nixpkgs.config.allowUnfree = true;
|
||||
|
||||
# Git is needed for flakes
|
||||
environment.systemPackages = with pkgs; [git];
|
||||
}
|
9
system/packages.nix
Normal file
9
system/packages.nix
Normal file
|
@ -0,0 +1,9 @@
|
|||
{pkgs, ...}:
|
||||
{
|
||||
# Basic list of must-have packages for all systems
|
||||
environment.systemPackages = with pkgs; [
|
||||
vim
|
||||
gnupg
|
||||
delta
|
||||
];
|
||||
}
|
8
system/users.nix
Normal file
8
system/users.nix
Normal file
|
@ -0,0 +1,8 @@
|
|||
{pkgs, ...}:
|
||||
{
|
||||
users.users.itsdrike = {
|
||||
isNormalUser = true;
|
||||
extraGroups = [ "wheel" ];
|
||||
initialPassword = "itsdrike";
|
||||
};
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue