initial commit, with lots of old code that i may need again later
This commit is contained in:
commit
79b4f7454d
8 changed files with 294 additions and 0 deletions
51
base.nix
Normal file
51
base.nix
Normal file
|
@ -0,0 +1,51 @@
|
|||
{ config, pkgs, modulesPath, ... }: {
|
||||
fileSystems = {
|
||||
"/boot" = {
|
||||
device = "/dev/disk/by-label/nixos-boot";
|
||||
fsType = "vfat";
|
||||
options = [ "nofail" "noauto" ];
|
||||
};
|
||||
"/" = {
|
||||
device = "/dev/disk/by-label/nixos-root";
|
||||
fsType = "ext4";
|
||||
};
|
||||
};
|
||||
|
||||
boot.loader.grub.enable = false;
|
||||
|
||||
system.build.rootFileSystem = pkgs.callPackage (modulesPath + "/../lib/make-ext4-fs.nix") {
|
||||
storePaths = with pkgs; [
|
||||
config.system.build.toplevel
|
||||
busybox
|
||||
];
|
||||
volumeLabel = "nixos-root";
|
||||
};
|
||||
|
||||
# system.build.usbImage = pkgs.callPackage ({ stdenvNoCC }: stdenvNoCC.mkDerivation {
|
||||
# name = "nixos-ps4-usbimage";
|
||||
|
||||
# nativeBuildInputs = with pkgs; [ mtools ];
|
||||
|
||||
# buildCommand = ''
|
||||
# mkdir $out
|
||||
# dd if=/dev/zero of=$out/nixos.img bs=1M count=2
|
||||
# mformat -F -i $out/nixos.img ::
|
||||
# mcopy -i $out/nixos.img ${config.system.build.system.kernel}/bzImage
|
||||
# '';
|
||||
# }) {};
|
||||
|
||||
boot.initrd.preFailCommands = ''
|
||||
export allowShell=1
|
||||
'';
|
||||
|
||||
users.users.nixos = {
|
||||
isNormalUser = true;
|
||||
password = "nixos";
|
||||
extraGroups = [ "wheel" ];
|
||||
};
|
||||
|
||||
users.defaultUserShell = pkgs.fish;
|
||||
programs.fish.enable = true;
|
||||
|
||||
services.getty.autologinUser = "nixos";
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue