!UUqahLbShAYkkrXmKs:matrix.org

DevOS

37 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
@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
@danielphan.2003:c-137.meDaniel Phan on conduit changed their profile picture.14:31:41
@ultranix:matrix.orgultranixgood job in moving the channel back to nixos.org17:27:28
@worldofgeese:one.ems.host@worldofgeese:one.ems.host joined the room.19:43:31
@worldofgeese:one.ems.host@worldofgeese:one.ems.hostI'm a little confused about getting started and could use a little guidance. So I've read through the first few pages of documentation and started to split out my configuration.nix into a users/worldofgeese/default.nix for user stuff, filesystem stuff into a hosts/endless-summer.nix and filled out the root user with a hashed password and pubkey. So I'm ready to go, right? Here's where I get confused: the install instructions indicate I should build an ISO from the bootstrap.nix but that won't source a lot of my personalizations. Do I wait on those until after I've built and booted a minimal ISO?19:51:54
@worldofgeese:one.ems.host@worldofgeese:one.ems.hostDevOS also has a tool for creating a guideline hosts file so I assume I wait on including my personal changes but I'm unsure19:52:47
11 Jan 2022
@danielphan.2003:c-137.meDaniel Phan on conduit
In reply to@worldofgeese:one.ems.host

I'm a little confused about getting started and could use a little guidance.

So I've read through the first few pages of documentation and started to split out my configuration.nix into a users/worldofgeese/default.nix for user stuff, filesystem stuff into a hosts/endless-summer.nix and filled out the root user with a hashed password and pubkey.

So I'm ready to go, right? Here's where I get confused: the install instructions indicate I should build an ISO from the bootstrap.nix but that won't source a lot of my personalizations. Do I wait on those until after I've built and booted a minimal ISO?

Yes, normally you would into a minimal ISO and deploy your personalizations to the remote machine. Since this is your first time installing, you can copy your devos config to the booted ISO and nixos-install from that.
01:58:02
@worldofgeese:one.ems.host@worldofgeese:one.ems.hostDSC_0000_BURST20220111103107683_COVER.JPG
Download DSC_0000_BURST20220111103107683_COVER.JPG
09:34:38
@worldofgeese:one.ems.host@worldofgeese:one.ems.hostI got a little further on this, thanks Daniel (and cool you're running Conduit, that's why I'm setting up a NixOS server now with the recently merged Conduit service). Following the documentation to set authorizedKeys, the key is set in the ISO but restrictive firewall rules block access to sshd.09:34:42
@worldofgeese:one.ems.host@worldofgeese:one.ems.hostI needed to clear the iptables rules and was then able to ssh into the live environment09:34:59
@worldofgeese:one.ems.host@worldofgeese:one.ems.hostIs this intended behavior?09:35:11
@danielphan.2003:c-137.meDaniel Phan on conduit The docs actually didn't mention that you would need networking.trustedInterfaces = [ "eth0" ]; 10:26:57
@danielphan.2003:c-137.meDaniel Phan on conduit I found out about networking.trustedInterfaces because I tried to opened port for Spotify and my phone couldn't detect my computer, though I only tested this with tailscale. 10:32:53

Show newer messages


Back to Room ListRoom Version: 6