Changing the structure of the configuration

This commit is contained in:
Lyes Saadi 2024-05-04 21:48:55 +02:00
parent be8c206e60
commit c06849e70f
No known key found for this signature in database
GPG key ID: 17418538BAA17767
12 changed files with 2 additions and 24 deletions

4
.gitignore vendored
View file

@ -1,4 +1,2 @@
/hardware-configuration.nix
/hardware.nix
/result
*.qcow2
*.qcow2

View file

@ -6,7 +6,6 @@
./hardware-configuration.nix
./packages.nix
./system.nix
# ./hardware.nix # Set in the up.sh script among the files in hardware/
./networking.nix
./user/user.nix
./specialisation.nix

View file

@ -10,7 +10,7 @@
};
outputs = { self, nixpkgs, nixos-hardware, nix-flatpak, ... }@attrs: {
nixosConfigurations.lyes-nix = nixpkgs.lib.nixosSystem {
nixosConfigurations.lyes-pc = nixpkgs.lib.nixosSystem {
system = "x86_64-linux";
specialArgs = attrs;
modules = [

19
up.sh
View file

@ -1,19 +0,0 @@
#!/bin/sh
rm *.qcow2 result 2> /dev/null
# if [ -n "$1" ]; then
# echo "Changing hardware"
# cp hardware/"$1".nix hardware.nix
# exit 0
# fi
if [ "$EUID" -ne 0 ]; then
echo "Please run as root"
exit 1
fi
echo "Updating configuration"
rm hardware-configuration.nix
sudo cp -rf * /etc/nixos/
cp /etc/nixos/hardware-configuration.nix .