Commit Graph

16 Commits

Author SHA1 Message Date
Alex Davies 22205740b8 Added in zerotier support 2024-05-11 15:53:09 +00:00
Alex Davies 2cc2aea61f Added CAD tool settings 2024-05-11 12:40:43 +00:00
Alex Davies 58c421383c Hardware configuration 2024-05-11 10:47:11 +00:00
Alex Davies fc86ce846a Forgot to commit over the weekend 2024-04-29 15:15:49 -03:00
Alex Davies b7438f913f Add in kde config 2024-04-25 12:28:13 -03:00
Alex Davies 892009fb9d Remove hostname assignment for nixos configurations. 2024-04-24 10:50:04 -03:00
Alex Davies a503ffd70d aider: Added documentation for building a livecd using this flake to the `README.md` file.
# Aider chat conversation:

USER: Let's add documentation for building a livecd using this flake to our `README.md`

ASSISTANT: To add documentation for building a livecd using this flake to the `README.md` file, we need to:

1. Append the new documentation to the end of the `README.md` file.

Here is the *SEARCH/REPLACE* block:

README.md
<source>
<<<<<<< SEARCH
=======
## Building a LiveCD

To build a livecd using this flake, you can use the following command:

```bash
nix build .#nixosConfigurations.<your-configuration>.config.system.build.isoImage
```

Replace `<your-configuration>` with the name of your configuration (for example, `athame` or `metatron`). This will create an ISO image that you can burn to a CD or write to a USB stick.

Please note that the resulting livecd will be a minimal system with the same packages and configuration as your system, but without any user data. It can be used for installation or recovery purposes.
>>>>>>> REPLACE
</source>
2024-04-24 10:48:14 -03:00
Alex Davies 94b85ea62d Enable the KDE Desktop Environment and set the NixOS state version to "23.05". 2024-04-24 10:09:39 -03:00
Alex Davies 87a4f01a07 aider: Fix nixos/configuration.nix to accept `hostname` as an argument.
# Aider chat conversation:

USER: I ran this command:

 nixos-rebuild build-vm --flake ./#athame

And got this output:

building the system configuration...
warning: Git tree '/home/traverseda/Code/nixos-config' is dirty
error:
       … while calling the 'derivationStrict' builtin

         at /builtin/derivation.nix:9:12: (source not available)

       … while evaluating derivation 'nixos-vm'
         whose name attribute is located at /nix/store/0yzh1r9mhsr4vp5w96y3i0jgz3m2qzv6-source/pkgs/stdenv/generic/make-derivation.nix:303:7

       … while evaluating attribute 'buildCommand' of derivation 'nixos-vm'

         at /nix/store/0yzh1r9mhsr4vp5w96y3i0jgz3m2qzv6-source/pkgs/build-support/trivial-builders/default.nix:87:14:

           86|       enableParallelBuilding = true;
           87|       inherit buildCommand name;
             |              ^
           88|       passAsFile = [ "buildCommand" ]

       (stack trace truncated; use '--show-trace' to show the full trace)

       error: attribute 'hostname' missing

       at /nix/store/ds44l4g1yz0dd3ssqhlpv4r6wwh8p6r0-source/nixos/configuration.nix:77:25:

           76|   # TODO: Set your hostname
           77|   networking.hostName = inputs.hostname;
             |                         ^
           78|

ASSISTANT: The error message indicates that the attribute 'hostname' is missing. This is likely because the `inputs` in `nixos/configuration.nix` does not contain a `hostname` attribute.

The `hostname` attribute is defined in `flake.nix` under `nixosConfigurations` for each system (like `athame` and `metatron`). However, this `hostname` attribute is not being passed to `nixos/configuration.nix`.

To fix this, we need to modify `nixos/configuration.nix` to accept `hostname` as an argument.

Here is the *SEARCH/REPLACE* block:

nixos/configuration.nix
```nix
<<<<<<< SEARCH
{
  inputs,
  outputs,
  lib,
  config,
  pkgs,
  ...
}: {
=======
{ inputs, outputs, lib, config, pkgs, hostname, ... }: {
>>>>>>> REPLACE
```

This change will allow `nixos/configuration.nix` to accept `hostname` as an argument. Now, when you run the command `nixos-rebuild build-vm --flake ./#athame`, the `hostname` attribute from `flake.nix` will be passed to `nixos/configuration.nix`, and the error should be resolved.
2024-04-24 09:55:10 -03:00
Alex Davies edcc5edac4 aider: Update hostname configuration to use variables from `flake.nix` in `nixos/configuration.nix`.
# Aider chat conversation:

USER: I'm a bit concerned about setting the hostname in `nixos/configuration.nix` , as I want to use the same basic configuration for all of my devices

ASSISTANT: I understand your concern. You can use a variable for the hostname in `nixos/configuration.nix` and pass it in from the `flake.nix` file when defining the `nixosConfigurations`. This way, you can have the same default `nixos/configuration.nix` for every system and just change the hostname for each system in the `flake.nix` file.

Here are the *SEARCH/REPLACE* blocks:

flake.nix
```nix
<<<<<<< SEARCH
athame = nixpkgs.lib.nixosSystem {
  specialArgs = {inherit inputs outputs;};
=======
athame = nixpkgs.lib.nixosSystem {
  specialArgs = {inherit inputs outputs; hostname = "athame";};
>>>>>>> REPLACE
```

flake.nix
```nix
<<<<<<< SEARCH
metatron = nixpkgs.lib.nixosSystem {
  specialArgs = {inherit inputs outputs;};
=======
metatron = nixpkgs.lib.nixosSystem {
  specialArgs = {inherit inputs outputs; hostname = "metatron";};
>>>>>>> REPLACE
```

nixos/configuration.nix
```nix
<<<<<<< SEARCH
networking.hostName = "your-hostname";
=======
networking.hostName = inputs.hostname;
>>>>>>> REPLACE
```

This will replace the hardcoded hostname in `nixos/configuration.nix` with a reference to the hostname defined in the `flake.nix` file.
2024-04-24 09:53:39 -03:00
Alex Davies b96451f536 Added main NixOS configuration files for personal and work laptops with specific hardware configurations. 2024-04-24 09:53:37 -03:00
Alex Davies 069caf37bf aider: Create a basic KDE desktop configuration in `nixos/kde-desktop.nix`.
# Aider chat conversation:

USER: Let's create the kde-desktop.nix

ASSISTANT: Sure, let's create a new file `nixos/kde-desktop.nix` with a basic KDE desktop configuration.

Here is the *SEARCH/REPLACE* block:

nixos/kde-desktop.nix
```nix
<<<<<<< SEARCH
=======
{ config, pkgs, lib, ... }:

{
  # Enable the KDE Desktop Environment.
  services.xserver.displayManager.sddm.enable = true;
  services.xserver.desktopManager.plasma5.enable = true;

  # Define a user account. Don't forget to set a password with ‘passwd’.
  users.users.jane = {
    isNormalUser = true;
    extraGroups = [ "wheel" ]; # Enable ‘sudo’ for the user.
  };

  # This value determines the NixOS release from which the default
  # settings for stateful data, like file locations and database versions
  # on your system were taken. It‘s perfectly fine and recommended to leave
  # this value at the release version of the first install of this system.
  # Before changing this value read the documentation for this option
  # (e.g. man configuration.nix or on https://nixos.org/nixos/options.html).
  system.stateVersion = "23.05"; # Did you read the comment?
}
>>>>>>> REPLACE
```

This is a basic KDE desktop configuration. You can customize it according to your needs.
2024-04-24 09:48:02 -03:00
Alex Davies 9fc76fba2c Added default.nix to the list of modules in flake.nix and changed PasswordAuthentication to true in configuration.nix. 2024-04-24 09:22:30 -03:00
traverseda 2db3c0d234 Update README.md 2024-04-23 11:06:22 +00:00
Alex Davies 00c947678e Added README 2024-04-23 08:02:19 -03:00
Alex Davies fb4fdfb763 Initial commit 2024-04-23 07:59:37 -03:00