Skip to content

Commit

Permalink
Live image configurations
Browse files Browse the repository at this point in the history
  • Loading branch information
erictossell committed Nov 16, 2023
1 parent 64af5ee commit e797d5a
Show file tree
Hide file tree
Showing 6 changed files with 93 additions and 22 deletions.
8 changes: 2 additions & 6 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,2 @@
.gitconfig
.gitconfig*
smb-secrets*
smb-secrets
samba/*
samba
result/*
result
51 changes: 48 additions & 3 deletions flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,10 @@

};


outputs = { self, nixpkgs, ... } @ attrs: {

nixosConfigurations = {

retis = nixpkgs.lib.nixosSystem {
system = "x86_64-linux";
specialArgs = {
Expand Down Expand Up @@ -47,20 +47,65 @@
./.
];
};#sisyphus
# Appended new system
test1 = nixpkgs.lib.nixosSystem {
system = "x86_64-linux";
specialArgs = {
username = "test1";
hostname = "test1";
displayConfig = "laptop";
nvidia_bool = "enabled";
} // attrs;
modules = [
./.
];
};#test1
# Appended new system
test = nixpkgs.lib.nixosSystem {
system = "x86_64-linux";
specialArgs = {
username = "test";
hostname = "test";
displayConfig = "laptop";
nvidia_bool = "enabled";
} // attrs;
modules = [
./.
];
};#test

# A minimal dev-vm config for building custom ISO's
live = nixpkgs.lib.nixosSystem {
system = "x86_64-linux";
specialArgs = {
username = "eriim";
username = "nixos";
hostname = "live";
displayConfig = "laptop";
nvidia_bool = "disabled";
} // attrs;
modules = [
./.
./minimal.nix
];
};#live-image


live-hyprland = nixpkgs.lib.nixosSystem {
system = "x86_64-linux";
specialArgs = {
username = "nixos";
hostname = "live";
displayConfig = "laptop";
nvidia_bool = "disabled";
} // attrs;
modules = [
./minimal.nix
./modules/hyprland
./assets
];
};#live-image



};
};
}
10 changes: 10 additions & 0 deletions minimal.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{ home-manager, ... }:
{
imports = [
home-manager.nixosModules.home-manager
./users
./hosts
./modules/core/terminal
./modules/core/pkgs
];
}
9 changes: 9 additions & 0 deletions modules/core/pkgs/default.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{ pkgs, ... }:
let
corePackages = import ./core { inherit pkgs; };
devPackages = import ./dev { inherit pkgs; };
in
{
environment.systemPackages = corePackages ++ devPackages;

}
27 changes: 14 additions & 13 deletions sh/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -86,19 +86,20 @@ echo "Creating a basic system configuration in flake.nix..."
# Define the new configuration block
# Define the new configuration block
read -r -d '' NEW_CONFIG << EOM
# Appended new system
nixosConfigurations.$hostname = nixpkgs.lib.nixosSystem {
system = "x86_64-linux";
specialArgs = {
username = "$username";
hostname = "$hostname";
displayConfig = "laptop";
nvidia_bool = "$nvidia";
} // attrs;
modules = [
./.
];
};#$hostname
# Appended new system
# $hostname = nixpkgs.lib.nixosSystem {
system = "x86_64-linux";
specialArgs = {
username = "$username";
hostname = "$hostname";
displayConfig = "laptop";
nvidia_bool = "$nvidia";
} // attrs;
modules = [
./.
];
};#$hostname
EOM

# Use awk to append the new configuration block before the last closing brace of the outputs block
Expand Down
10 changes: 10 additions & 0 deletions users/nixos/default.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{ pkgs, username, ... }:
{
# Define a user account. Don't forget to set a password with ‘passwd’.
users.users.${username} = {
shell = pkgs.bash;
isNormalUser = true;
initialPassword = "temp123";
extraGroups = [ "wheel" ];
};
}

0 comments on commit e797d5a

Please sign in to comment.