at master 1.3 kB view raw
1{ 2 config, 3 lib, 4 pkgs, 5 nixpkgs, 6 ... 7}: 8 9# build with: 10# nix build /etc/nixos#nixosConfigurations.barnacle.config.system.build.isoImage 11 12{ 13 imports = [ 14 "${nixpkgs}/nixos/modules/installer/cd-dvd/installation-cd-base.nix" 15 # installs nixpkgs channel for installation 16 "${nixpkgs}/nixos/modules/installer/cd-dvd/channel.nix" 17 ]; 18 19 nixpkgs.hostPlatform = "x86_64-linux"; 20 21 custom = { 22 enable = true; 23 laptop = true; 24 gui.i3 = true; 25 gui.sway = true; 26 homeManager.enable = true; 27 username = "nixos"; 28 }; 29 users.users.${config.custom.username}.hashedPassword = lib.mkForce null; 30 users.users.root.hashedPassword = lib.mkForce null; 31 32 services.openssh.settings.PermitRootLogin = lib.mkForce "no"; 33 services.getty.autologinUser = lib.mkForce "${config.custom.username}"; 34 services.getty.helpLine = lib.mkForce ""; 35 36 networking.wireless = { 37 # so we can use NetworkManager 38 enable = lib.mkForce false; 39 # networks = { "SSID" = { psk = "password"; }; }; 40 }; 41 42 home-manager.users.${config.custom.username}.config.home.file = { 43 "install.sh".source = ./install.sh; 44 "nixos" = { 45 recursive = true; 46 source = ../..; 47 }; 48 }; 49 50 # comment this out to make a smaller image 51 isoImage.squashfsCompression = "gzip -Xcompression-level 1"; 52}