!UUqahLbShAYkkrXmKs:matrix.org

DevOS

32 Members
Seeking help and geeking out together on https://github.com/divnix/devos & https://github.com/divnix/digga10 Servers

Load older messages


SenderMessageTime
4 Jan 2022
@cw:kernelpanic.cafe@cw:kernelpanic.cafeat line 3 in the second comment00:53:04
@cw:kernelpanic.cafe@cw:kernelpanic.cafe home-manager.users = { inherit (hmUsers) cw; }; 00:53:10
@cw:kernelpanic.cafe@cw:kernelpanic.cafe * at line 3 in users/cw/default.nix 00:54:05
@cw:kernelpanic.cafe@cw:kernelpanic.cafeI get it building (seemingly) fine and can enter nix-shell when I set user00:54:37
@cw:kernelpanic.cafe@cw:kernelpanic.cafeI'm just trying to understand how the pieces fit together00:54:54
@pachumicchu:myrdd.infoPacman99 So the idea is digga can create home-manager users for you and gives it to your nixos profiles as hmUsers 00:56:59
@pachumicchu:myrdd.infoPacman99 So yeah you do need the home.users line 00:57:09
@cw:kernelpanic.cafe@cw:kernelpanic.cafeWhy not just have digga look at home.users and go from there?00:59:59
@cw:kernelpanic.cafe@cw:kernelpanic.cafe Or rake users/alice/default.nix into home.users? 01:00:39
@cw:kernelpanic.cafe@cw:kernelpanic.cafeIs there a way to add the user to home.users from the default.nix file so I don't need to manage the user in both places?01:02:59
@cw:kernelpanic.cafe@cw:kernelpanic.cafeRedacted or Malformed Event02:41:03
@pachumicchu:myrdd.infoPacman99 Well I think you could just set your user profile in users/cw/default.nix, like remove the inherite (hmUsers) cw and move the stuff from the flake.nix home.users to home-manager.sers.cw = 05:41:23
@pachumicchu:myrdd.infoPacman99 Then just drop the home.users line in flake.nix 05:41:36
@pachumicchu:myrdd.infoPacman99 home.users is only necessary if you do inherit (hmUsers) alice 05:42:00
@pachumicchu:myrdd.infoPacman99 * Well I think you could just set your user profile in users/cw/default.nix, like remove the inherit (hmUsers) cw and move the stuff from the flake.nix home.users to home-manager.sers.cw = 05:42:11
@pachumicchu:myrdd.infoPacman99 * Well I think you could just set your user profile in users/cw/default.nix, like remove the inherit (hmUsers) cw and move the stuff from the flake.nix home.users to home-manager.users.cw = 05:42:18
5 Jan 2022
@Sweenu:matrix.orgBruno

I'm trying to do something but I need some help.
I've added a vars.nix file at the root of my dir with some variables that I use in many places:

{
  username = "sweenu";
  terminal = "alacritty";
}

And I have added vars = import ./vars.nix in my flake.nix and it's perfect, I can use my vars as simply as self.vars.username.
But I'm trying to improve this with:

{ pkgs }:
{
  username = "sweenu";
  terminal = "alacritty";
  terminalBin = "${pkgs.alacritty}/bin/alacritty";
}

But I have no clue how I could pass that pkgs argument though :/
I have tried vars = import ./vars.nix { pkgs = nixos; }; and vars = import ./vars.nix { pkgs = inputs.nixos; }; but it seems that the nixos variable isn't pointing to nixpkgs because it can't find alacritty.
Is there a way to do what I'm looking to do?

13:50:45
@Sweenu:matrix.orgBruno *

I'm trying to do something but I need some help.
I've added a vars.nix file at the root of my dir with some variables that I use in many places:

{
  username = "sweenu";
  terminal = "alacritty";
}

And I have added vars = import ./vars.nix in my flake.nix and it's perfect, I can use my vars as simply as self.vars.username.
But I'm trying to improve this with:

{ pkgs }:
{
  username = "sweenu";
  terminal = "alacritty";
  terminalBin = "${pkgs.alacritty}/bin/alacritty";
}

But I have no clue how I could pass that pkgs argument though :/
I have tried vars = import ./vars.nix { pkgs = nixos; }; and vars = import ./vars.nix { pkgs = inputs.nixos; }; but it seems that the nixos variable isn't pointing to nixpkgs because it can't find alacritty.
Is there a way to do what I'm looking to do?

13:51:53
@danielphan.2003:matrix.org@danielphan.2003:matrix.orgYou should create a module for this: In `modules/vars.nix` ``` { pkgs, lib, ... }: with lib; { options = { username = mkOption { type = types.str; }; terminalBin = mkOption { type = types.package; }; }; config = { username = "sweenu"; terminalBin = "${pkgs.alacritty}/bin/alacritty"; }; } ```16:05:19
@danielphan.2003:matrix.org@danielphan.2003:matrix.org *

You should create a module for this:

In modules/vars.nix

{ pkgs, lib, ... }:
with lib;
{
  options = {
    username = mkOption { type = types.str; };
    terminalBin = mkOption { type = types.package; };
  };
  config = {
    username = "sweenu";
    terminalBin = "${pkgs.alacritty}/bin/alacritty";
  };
}
16:06:32
@danielphan.2003:matrix.org@danielphan.2003:matrix.org
In reply to @Sweenu:matrix.org

I'm trying to do something but I need some help.
I've added a vars.nix file at the root of my dir with some variables that I use in many places:

{
  username = "sweenu";
  terminal = "alacritty";
}

And I have added vars = import ./vars.nix in my flake.nix and it's perfect, I can use my vars as simply as self.vars.username.
But I'm trying to improve this with:

{ pkgs }:
{
  username = "sweenu";
  terminal = "alacritty";
  terminalBin = "${pkgs.alacritty}/bin/alacritty";
}

But I have no clue how I could pass that pkgs argument though :/
I have tried vars = import ./vars.nix { pkgs = nixos; }; and vars = import ./vars.nix { pkgs = inputs.nixos; }; but it seems that the nixos variable isn't pointing to nixpkgs because it can't find alacritty.
Is there a way to do what I'm looking to do?

Then in these places, use config.username, config.terminal and so on.
16:08:08
@Sweenu:matrix.orgBruno Daniel Phan: Oh yeah I see, that's way better indeed. Thank you ! 16:45:37
6 Jan 2022
@danielphan.2003:matrix.org@danielphan.2003:matrix.org invited @danielphan.2003:c-137.meDaniel Phan on conduit.19:36:01
@danielphan.2003:c-137.meDaniel Phan on conduit joined the room.19:38:46
@danielphan.2003:c-137.meDaniel Phan on conduit changed their display name from danielphan.2003 ⚡️ to Daniel Phan.19:48:06
@hexa:lossy.networkhexa joined the room.21:14:13
@hexa:lossy.networkhexa left the room.21:15:02
7 Jan 2022
@danielphan.2003:c-137.meDaniel Phan on conduit changed their display name from Daniel Phan to Daniel Phan on conduit.13:20:36
9 Jan 2022
@csummers:matrix.orgColin Summers joined the room.22:15:26
10 Jan 2022
@danielphan.2003:c-137.meDaniel Phan on conduit set a profile picture.14:31:10

Show newer messages


Back to Room ListRoom Version: 6