Commit Graph

37 Commits

Author SHA1 Message Date
Alex Davies 7174fd6ed8 More minor work tweaks 2024-06-19 10:54:54 -03:00
Alex Davies 87a21720f2 nixvim most of the way there 2024-06-11 16:44:13 -03:00
Alex Davies a3a16daf2a Auto cleanup older generations 2024-06-05 12:24:17 -03:00
Alex Davies 138933566b Disable docker liverestore so reboot doesn't hang 2024-06-04 12:18:00 -03:00
Alex Davies 4811ba6d00 Work on blender-cadsketcher, some tweaks to make Traverse's life easier 2024-06-02 14:30:43 -03:00
Alex Davies f7cc91e850 Added vscode and htop 2024-06-02 12:25:41 -03:00
Alex Davies d97b5629fc Merge branch 'main' of https://codeberg.org/traverseda/nixos-config 2024-05-31 09:53:51 -03:00
Alex Davies 1baab2c82e Misc minor changes 2024-05-31 09:53:35 -03:00
Alex Davies 7c04a2da97 Enable home-manager for users 2024-05-31 09:42:28 -03:00
Alex Davies 3dfdd8c074 Added comma 2024-05-31 09:36:03 -03:00
Alex Davies 36094b083a Merge branch 'main' of https://codeberg.org/traverseda/nixos-config 2024-05-31 09:28:47 -03:00
Alex Davies 67decdc3c8 Integrated plasma-manager config 2024-05-26 09:37:00 -03:00
Alex Davies d8fa2eb8c9 Added new laptop to the flee 2024-05-24 17:33:02 -03:00
Alex Davies 843270e01f Merge branch 'main' of https://codeberg.org/traverseda/nixos-config 2024-05-24 16:39:38 -03:00
Alex Davies 825829228e Add autools 2024-05-24 16:39:30 -03:00
Alex Davies 7d56fbed00 Renamed work computer hostname 2024-05-24 13:04:13 -03:00
Alex Davies 58128b2ee6 Removed extra flake flags 2024-05-24 07:08:18 -03:00
Alex Davies a67e367c68 Changed auto-update to just pull form git 2024-05-24 07:00:23 -03:00
Alex Davies 71bcde6239 Enable autoupdate 2024-05-23 21:53:07 -03:00
Alex Davies 3c944898b0 Creality print 2024-05-21 07:17:25 -03:00
Alex Davies 8453721cab Update zerotier, default packages 2024-05-18 21:20:55 -03:00
Alex Davies b77b6cfaf4 Initial work on home manager 2024-05-18 18:40:15 -03:00
Alex Davies 274e4e5627 Merge branch 'main' of https://codeberg.org/traverseda/nixos-config 2024-05-14 18:33:50 -03:00
Alex Davies d697dce92b Bigger, better, Virtual machines 2024-05-14 08:54:50 -03:00
Alex Davies 8409aec688 Better VM autodetection 2024-05-14 08:39:54 -03:00
Alex Davies c3ebc2312b Add nextcloud to installed apps 2024-05-14 07:30:11 -03:00
Alex Davies e0be8076cd Don't need specialArgs 2024-05-13 12:42:45 -03:00
Alex Davies 6e514ab503 Added some base packages 2024-05-11 16:19:50 -03:00
Alex Davies 3213050cae Timezones! 2024-05-11 13:12:04 -03: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 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 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
Alex Davies fb4fdfb763 Initial commit 2024-04-23 07:59:37 -03:00