2020-08-16 08:33:44 +00:00
|
|
|
# Author: Henrik Lissner <henrik@lissner.net>
|
|
|
|
# Modified by: Gabriel Arazas <foo.dogsquared@gmail.com>
|
|
|
|
# URL: https://github.com/foo-dogsquared/nixos-config
|
|
|
|
# License: MIT
|
|
|
|
#
|
|
|
|
# This is ground zero, where the absolute essentials go, to be present on all systems I use nixos on.
|
2020-08-19 18:35:23 +00:00
|
|
|
# Contains cluser-wide configurations shared between all of the systems (located in `hosts/`).
|
2020-08-16 08:33:44 +00:00
|
|
|
|
|
|
|
device: username:
|
|
|
|
{ pkgs, options, lib, config, ... }:
|
2020-08-18 16:48:02 +00:00
|
|
|
|
2020-08-16 08:33:44 +00:00
|
|
|
{
|
|
|
|
networking.hostName = lib.mkDefault device;
|
|
|
|
my.username = username;
|
|
|
|
|
|
|
|
imports = [
|
|
|
|
./modules
|
|
|
|
"${./hosts}/${device}"
|
|
|
|
] ++ (if builtins.pathExists(/etc/nixos/cachix.nix) then [
|
|
|
|
/etc/nixos/cachix.nix
|
|
|
|
] else []) ++ (if builtins.pathExists(/etc/nixos/hardware-configuration.nix) then [
|
|
|
|
/etc/nixos/hardware-configuration.nix
|
2020-08-30 21:58:22 +00:00
|
|
|
] else []) ++ (if builtins.pathExists(/mnt/etc/nixos/hardware-configuration.nix) then [
|
|
|
|
/mnt/etc/nixos/hardware-configuration.nix
|
2020-08-16 08:33:44 +00:00
|
|
|
] else []);
|
|
|
|
|
2020-08-18 16:48:02 +00:00
|
|
|
# GARBAGE DAY!
|
|
|
|
nix.gc = {
|
|
|
|
automatic = true;
|
|
|
|
dates = "daily";
|
|
|
|
options = "--delete-older-than 3d";
|
|
|
|
};
|
2020-08-16 08:33:44 +00:00
|
|
|
nix.autoOptimiseStore = true;
|
|
|
|
nix.nixPath = options.nix.nixPath.default ++ [
|
|
|
|
# So we can use absolute import paths
|
|
|
|
"bin=/etc/dotfiles/config/bin"
|
|
|
|
"config=/etc/dotfiles/config"
|
|
|
|
];
|
|
|
|
|
|
|
|
# Add custom packages & unstable channel, so they can be accessed via pkgs.*
|
|
|
|
nixpkgs.overlays = import ./packages;
|
|
|
|
nixpkgs.config.allowUnfree = true; # forgive me Stallman senpai
|
|
|
|
|
2020-08-18 16:48:02 +00:00
|
|
|
# These are the things I want installed on all my systems.
|
2020-08-16 08:33:44 +00:00
|
|
|
environment.systemPackages = with pkgs; [
|
|
|
|
# Just the bear necessities~
|
|
|
|
coreutils
|
|
|
|
exfat
|
|
|
|
git
|
|
|
|
hfsprogs
|
|
|
|
killall
|
|
|
|
ntfs3g
|
|
|
|
sshfs
|
2020-08-19 18:35:23 +00:00
|
|
|
udiskie
|
2020-08-16 08:33:44 +00:00
|
|
|
unzip
|
|
|
|
vim
|
|
|
|
wget
|
|
|
|
|
|
|
|
gnumake # for our own makefile
|
|
|
|
cachix # less time buildin' mo time nixin'
|
|
|
|
];
|
|
|
|
|
2020-08-18 16:48:02 +00:00
|
|
|
# Default settings for primary user account.
|
|
|
|
# `my` is defined in 'modules/default.nix'.
|
2020-08-16 08:33:44 +00:00
|
|
|
my.user = {
|
|
|
|
isNormalUser = true;
|
|
|
|
uid = 1000;
|
2020-08-28 07:58:17 +00:00
|
|
|
extraGroups = [ "wheel" "video" "libvirtd" ];
|
2020-08-16 08:33:44 +00:00
|
|
|
shell = pkgs.zsh;
|
|
|
|
};
|
|
|
|
|
|
|
|
# This value determines the NixOS release with which your system is to be
|
|
|
|
# compatible, in order to avoid breaking some software such as database
|
|
|
|
# servers. You should change this only after NixOS release notes say you
|
|
|
|
# should.
|
|
|
|
system.stateVersion = "20.03"; # Did you read the comment?
|
|
|
|
}
|