4 Jan 2022 |
@cw:kernelpanic.cafe | I get it building (seemingly) fine and can enter nix-shell when I set user | 00:54:37 |
@cw:kernelpanic.cafe | I'm just trying to understand how the pieces fit together | 00:54:54 |
Pacman99 | So the idea is digga can create home-manager users for you and gives it to your nixos profiles as hmUsers | 00:56:59 |
Pacman99 | So yeah you do need the home.users line | 00:57:09 |
@cw:kernelpanic.cafe | Why not just have digga look at home.users and go from there? | 00:59:59 |
@cw:kernelpanic.cafe | Or rake users/alice/default.nix into home.users ? | 01:00:39 |
@cw:kernelpanic.cafe | Is 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 | Redacted or Malformed Event | 02:41:03 |
Pacman99 | 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 |
Pacman99 | Then just drop the home.users line in flake.nix | 05:41:36 |
Pacman99 | home.users is only necessary if you do inherit (hmUsers) alice | 05:42:00 |
Pacman99 | * 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 |
Pacman99 | * 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 |
Bruno | 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 |
Bruno | * 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 | 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:05:19 |
@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 | 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 |
Bruno | Daniel Phan: Oh yeah I see, that's way better indeed. Thank you ! | 16:45:37 |
6 Jan 2022 |
| @danielphan.2003:matrix.org invited Daniel Phan on conduit. | 19:36:01 |
| Daniel Phan on conduit joined the room. | 19:38:46 |
| Daniel Phan on conduit changed their display name from danielphan.2003 ⚡️ to Daniel Phan. | 19:48:06 |
| hexa joined the room. | 21:14:13 |
| hexa left the room. | 21:15:02 |
7 Jan 2022 |
| Daniel Phan on conduit changed their display name from Daniel Phan to Daniel Phan on conduit. | 13:20:36 |
9 Jan 2022 |
| Colin Summers joined the room. | 22:15:26 |
10 Jan 2022 |
| Daniel Phan on conduit set a profile picture. | 14:31:10 |
| Daniel Phan on conduit changed their profile picture. | 14:31:41 |
ultranix | good job in moving the channel back to nixos.org | 17:27:28 |
| @worldofgeese:one.ems.host joined the room. | 19:43:31 |