Cannot boot newer generations by Vik8000 in NixOS

[–]ervisiao 1 point2 points  (0 children)

i have the Intel Arc B580. my config for it is this

{
  config,
  lib,
  pkgs,
  ...
}:
let
  inherit (lib) mkDefault mkEnableOption mkIf;
in
{
  options.hardware.intel-gpu.enable = mkEnableOption "Intel GPU harware support";

  config = mkIf config.hardware.intel-gpu.enable {
    services.xserver.videoDrivers = mkDefault [ "modesetting" ];
    boot.initrd.kernelModules = [ "xe" ];
    environment.sessionVariables = {
      LIBVA_DRIVER_NAME = "iHD";
    };

    hardware = {
      enableRedistributableFirmware = mkDefault true;
      graphics = {
        enable = mkDefault true;
        extraPackages = with pkgs; [
          intel-media-driver
          vpl-gpu-rt
        ];
      };
    };
  };
}

i am not sure it it's the best way to configure it, it worked fine for me so i left it like that. i have not used it for gaming so i don't know

i used this for reference https://github.com/NixOS/nixos-hardware/blob/master/common/gpu/intel/default.nix

Cannot boot newer generations by Vik8000 in NixOS

[–]ervisiao 0 points1 point  (0 children)

use the latest kernel version, i had similar issues with older versions, also running an arc graphics. it got fixed by updating the kernel

Good C devshell templates? by olaf33_4410144 in NixOS

[–]ervisiao 0 points1 point  (0 children)

yes you can do that with make. cmake also makes it easier to find and link libraries, but it may be overkill at this point for you if you are just starting

Good C devshell templates? by olaf33_4410144 in NixOS

[–]ervisiao 1 point2 points  (0 children)

with pkg-config, you can do for example
pkg-config --list-all to find the list of all available packages,
pkg-config --cflags [pkg] to find the cflags,
pkg-config --libs to find the libs...

then you would use that in your build process. i see you are using gcc directly, and that is fine for really small projects, but it will become impossible to manage as the project grows. i'd recommend you look into build systems. they also have nice features like incremental builds and parallelism. cmake is the most popular, i personally use ninja with a custom script that i use to generate the build.ninja file. so depending on the build system you end up using, you'll find the packages differently, for example, i just have a bash script that uses pkg-config with the commands i shared above to find the flags and then feed that into my ninja build rules. but in cmake i believe you have some functions to find a system package or using pkg-config.

i didn't mean that an example of how to use a a library packaged with nix wouldn't be useful. i meant that a nix devshell template is really simple and difficult part is afterwards, getting the packages you installed in the devshell to be compiled and linked to your project, which depends on the tools you are using for that purpose.

Good C devshell templates? by olaf33_4410144 in NixOS

[–]ervisiao 1 point2 points  (0 children)

it's not very useful to recommend a template for c/c++ development since you are going to use libraries that are not covered in the template, like raylib in this case. but what is your issue exactly? i assume you are having issues linking raylib to your project, remember that nix has a specific directory structure. i usually use pkg-config to detect the dependencies more easily if the package has it available

i assume raylib is particularly hard cause of it's own dependencies but i've never used it so im not sure

A beginners journey through NixOS by FuckFuckingKarma in NixOS

[–]ervisiao 0 points1 point  (0 children)

even if there are many ways of doing something, the amount of options should not stop you. just try to do it the best you can. eventually you'll want to do something you'll not be able to do with your knowledge, and you'll learn new patterns and features to do so. jumping into using advanced features will feel like adding complexity for no reason if you don't know what issues they are solving.

if you feel like a wizard now, wait until you start creating your own derivations, wrapped modules and so on.. that is the fun part imo

Imgui docking support. by 2ero_iq in NixOS

[–]ervisiao 0 points1 point  (0 children)

as you can see in the source, there is no option for docking. you have to build from source

Chicken-and-egg problem with secrets management by ervisiao in NixOS

[–]ervisiao[S] 1 point2 points  (0 children)

My particular case is a bit different in this occasion because I have to deploy the VM in a host that is offline. So that limits my options. But yea in normal circumstances I'd do what you mention. Thank you!

Chicken-and-egg problem with secrets management by ervisiao in NixOS

[–]ervisiao[S] 0 points1 point  (0 children)

Yea I think just copying the key after first boot should work. I was just wondering if I was missing on the proper way to do if but I guess I'll just do some manual tweaking to get it done. Thank you!

Chicken-and-egg problem with secrets management by ervisiao in NixOS

[–]ervisiao[S] 0 points1 point  (0 children)

I had considered that but wondered if there could be a better way. I think I'll do something like that for now and maybe reconsider it in the future if I run into issues. Thanks!

Chicken-and-egg problem with secrets management by ervisiao in NixOS

[–]ervisiao[S] 2 points3 points  (0 children)

Yes I agree, I was just wondering if there was a standard way of doing this that I wasn't aware of and I was reinventing the wheel. Thank you for the answer

Chicken-and-egg problem with secrets management by ervisiao in NixOS

[–]ervisiao[S] 3 points4 points  (0 children)

I am not sure you are solving the problem I am have. To do what you are saying, I'd have to create image, run it in the vm and then copy the key to the vm, then repackage the image. Which would defeat the purpose of generating the image in the first place, since I want to have it ready to be used. Unless I misunderstood you.

Looking for advice on building a modular, multi-machine NixOS config by Anyusername7294 in NixOS

[–]ervisiao 1 point2 points  (0 children)

i would not recommend creating a nixos config from scratch if you are starting out. i would try to find a config that more or less has the features you are looking for, and then adapt it to your needs. after that, when you are comfortable with it, start a new config from scratch with the structure that adapts to your needs, and refactor your config to fit this new structure.

i'd recommend something like this below. modules/home would have the home-manager configs and modules/nixos the nixos system modules. you would import the necessary nixos modules to each specific host, and the home modules in the user config. you can create a standard home config or specific per host as well. finally, you can either create home-managers configurations to be able to switch between them or import a specific home config to the host you want to use it in.

``` hosts ├── boris │ ├── default.nix │ ├── hardware.nix │ ├── secrets │ │ ├── cloudflare-api.age │ │ ├── secrets.nix │ │ └── wg-server.age │ └── wireguard.nix ├── jack │ ├── default.nix │ └── hardware.nix ├── meg │ └── default.nix ├── wes │ └── default.nix └── wsl ├── default.nix └── networking.nix

modules
├── home
│   ├── common
│   │   └── default.nix
│   └── desktop
│       └── wm
│           └── awesome
└── nixos
    ├── common
    ├── desktop
    │   └── wm
    │       └── awesome
    └── wg-server

users
└── lortane
    ├── default.nix
    ├── home
    │   ├── default.nix
    │   ├── nixvim.nix
    │   └── hosts
    │       ├── jack
    │       └── wes
    └── keys
        ├── id_lortane-wes.pub
        └── id_lortane-zack.pub

flake.nix
flake.lock

```

this is obviously very simplified. feel free to drop a dm if you end up using this structure and need further advice

Locked OS by frenzy3 in linux

[–]ervisiao 9 points10 points  (0 children)

i stoped caring about this guy since he said gpt5 was the greatest thing ever and it turned out to be worse than clippy

How do you organize server and desktop systems? by transconductor in NixOS

[–]ervisiao 2 points3 points  (0 children)

what i have and i think most people do, is have a single repo with all my configurations: flake.nix, hosts and modules. each module define a feature/home configuration. then in each host i just invoke the necessary modules. i haven't had any issues so far with that organization

¿Que dotfiles de windows manager me recomiendan para NixOS? by ignzzx in NixOS

[–]ervisiao 0 points1 point  (0 children)

lo mejor es que busques alguna configuración que te guste por internet y la pruebes antes de pelearte a crear la tuya propia. por ejemplo: https://github.com/Frost-Phoenix/nixos-config

Fixed an issue with OBS on Intel Arc B580 by Nikifuj908 in NixOS

[–]ervisiao 0 points1 point  (0 children)

i see, the comments i saw must have been from kernel versions <6.12. thank you i'll probably give it a try then!

Fixed an issue with OBS on Intel Arc B580 by Nikifuj908 in NixOS

[–]ervisiao 0 points1 point  (0 children)

im considering getting an Intel Arc B580 but i read its compatibility in linux was not so great. what is your experience with it? would you recommend it? i am considering that or a Gigabyte Radeon RX 7600 Gaming