mirror of
https://github.com/foo-dogsquared/nixos-config.git
synced 2025-02-25 18:19:00 +00:00
Modularize nixos
user
This is to make creating installers easier.
This commit is contained in:
parent
11723c53e3
commit
f9589f2ca1
@ -3,6 +3,7 @@
|
|||||||
{
|
{
|
||||||
imports = [
|
imports = [
|
||||||
"${modulesPath}/installer/cd-dvd/installation-cd-minimal.nix"
|
"${modulesPath}/installer/cd-dvd/installation-cd-minimal.nix"
|
||||||
|
(lib.getUser "nixos" "nixos")
|
||||||
];
|
];
|
||||||
|
|
||||||
isoImage = {
|
isoImage = {
|
||||||
@ -19,57 +20,7 @@
|
|||||||
networking.hostName = "bootstrap";
|
networking.hostName = "bootstrap";
|
||||||
boot.supportedFilesystems = lib.mkForce [ "btrfs" "reiserfs" "vfat" "f2fs" "xfs" "ntfs" "cifs" ];
|
boot.supportedFilesystems = lib.mkForce [ "btrfs" "reiserfs" "vfat" "f2fs" "xfs" "ntfs" "cifs" ];
|
||||||
|
|
||||||
nix = {
|
users.users.root.password = "";
|
||||||
gc.automatic = true;
|
|
||||||
optimise.automatic = true;
|
|
||||||
|
|
||||||
# Please see `nix-conf.5` manual for more details.
|
|
||||||
settings = {
|
|
||||||
# All to make improvement for using Nix.
|
|
||||||
trusted-users = [ "root" "@wheel" ];
|
|
||||||
allow-import-from-derivation = true;
|
|
||||||
allow-dirty = true;
|
|
||||||
auto-optimise-store = true;
|
|
||||||
sandbox = true;
|
|
||||||
|
|
||||||
# Set several binary caches.
|
|
||||||
substituters = [
|
|
||||||
"https://cache.nixos.org/"
|
|
||||||
"https://nix-community.cachix.org"
|
|
||||||
"https://foo-dogsquared.cachix.org"
|
|
||||||
];
|
|
||||||
trusted-public-keys = [
|
|
||||||
"nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs="
|
|
||||||
"foo-dogsquared.cachix.org-1:/2fmqn/gLGvCs5EDeQmqwtus02TUmGy0ZlAEXqRE70E="
|
|
||||||
];
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
users.users = {
|
|
||||||
root.password = "";
|
|
||||||
|
|
||||||
nixos = {
|
|
||||||
password = "nixos";
|
|
||||||
description = "default";
|
|
||||||
isNormalUser = true;
|
|
||||||
extraGroups = [ "wheel" ];
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
environment.systemPackages = with pkgs; [
|
|
||||||
binutils
|
|
||||||
coreutils
|
|
||||||
moreutils
|
|
||||||
whois
|
|
||||||
jq
|
|
||||||
git
|
|
||||||
manix
|
|
||||||
|
|
||||||
# The coreutils replacement.
|
|
||||||
ripgrep
|
|
||||||
fd
|
|
||||||
bat
|
|
||||||
];
|
|
||||||
|
|
||||||
boot.loader.systemd-boot.enable = true;
|
boot.loader.systemd-boot.enable = true;
|
||||||
}
|
}
|
||||||
|
54
users/nixos/nixos/default.nix
Normal file
54
users/nixos/nixos/default.nix
Normal file
@ -0,0 +1,54 @@
|
|||||||
|
# This is the user usually used for installers. Don't treat it like a normal
|
||||||
|
# user, pls. It will override several things just to teach you a lesson. :)
|
||||||
|
{ lib, pkgs, ... }:
|
||||||
|
|
||||||
|
{
|
||||||
|
users.users.nixos = {
|
||||||
|
password = "nixos";
|
||||||
|
description = "default";
|
||||||
|
isNormalUser = true;
|
||||||
|
extraGroups = [ "wheel" ];
|
||||||
|
};
|
||||||
|
|
||||||
|
nix = {
|
||||||
|
gc.automatic = true;
|
||||||
|
optimise.automatic = true;
|
||||||
|
|
||||||
|
# Please see `nix-conf.5` manual for more details.
|
||||||
|
settings = {
|
||||||
|
# All to make improvement for using Nix.
|
||||||
|
trusted-users = [ "root" "@wheel" ];
|
||||||
|
allow-import-from-derivation = true;
|
||||||
|
allow-dirty = true;
|
||||||
|
auto-optimise-store = true;
|
||||||
|
sandbox = true;
|
||||||
|
|
||||||
|
# Set several binary caches.
|
||||||
|
substituters = [
|
||||||
|
"https://cache.nixos.org/"
|
||||||
|
"https://nix-community.cachix.org"
|
||||||
|
"https://foo-dogsquared.cachix.org"
|
||||||
|
];
|
||||||
|
trusted-public-keys = [
|
||||||
|
"nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs="
|
||||||
|
"foo-dogsquared.cachix.org-1:/2fmqn/gLGvCs5EDeQmqwtus02TUmGy0ZlAEXqRE70E="
|
||||||
|
];
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
environment.systemPackages = with pkgs; [
|
||||||
|
binutils
|
||||||
|
coreutils
|
||||||
|
moreutils
|
||||||
|
neovim
|
||||||
|
whois
|
||||||
|
jq
|
||||||
|
git
|
||||||
|
manix
|
||||||
|
|
||||||
|
# The coreutils replacement.
|
||||||
|
ripgrep
|
||||||
|
fd
|
||||||
|
bat
|
||||||
|
];
|
||||||
|
}
|
Loading…
Reference in New Issue
Block a user