2020-07-09

<slabity> Create a `services.displayManager.systemd` option and make youre own systemd-service display-manager thing
<slabity> SLiM is not maintained (except technically slim-ng). sddm is still going strong
<eyJhb> slabity: I just want "none" :p
<slabity> Is lightdm really that heavy when you just have autologin and no backend?
<slabity> bqv: You could probably write a systemd service to start your compositor properly. But that's probably a bit more difficult than it sounds
<slabity> Though that might be a bit annoying to support
<slabity> adisbladis: Maybe one of the 'display managers' we support could be a simple systemd service that logs you in?
<slabity> Regardless if I use zero of its features
<slabity> And that's probably why I'm not going to be switching from lightdm's autologin for a long time :P
<slabity> adisbladis: What, you don't like people running `bash exec systemd-run dbus-launch --exit-with-session swc-launch`?
<slabity> bqv: Didn't you say your audio isn't working? Isn't that an issue?
<slabity> bqv: You're just doing `exec sway`, correct?
<slabity> Impressive...
<slabity> Well unfortunatley I'm on my nvidia system so I can't see what would be wrong :/
<slabity> gchristensen: Do you need to go through the whole `dbus-launch --exit-with-session /path/to/sway` to get that integration working though?
<slabity> I thought that was one of the jobs of a display manager
<slabity> adisbladis: Does logind work properly when starting a session manually via a TTY?

2020-07-08

<simpson> slabity: That's fair. NixOS is not exactly built around Xorg, but Xorg's conventions are very popular.
<KarlJoad> slabity: I have just run a `sudo nixos-rebuild switch` after setting `services.xserver.config` manually and the generated output still keeps the defaults in the xserver.nix module.
<slabity> Some can be ran without xserver
<slabity> simpson: I think my only complaint is that `services.xserver.desktopManager` is not necessarilly xserver specific
<slabity> At least the ones that interact with DRM
<KarlJoad> slabity: That's what I was thinking too. But when I tried to generate it manually, I don't think I got a completely overridden file.
<slabity> simpson: No worries. I'm (unfortunately) pretty familiar with X11 subsystems...
<slabity> KarlJoad: I'm pretty sure it will... That's the option that gets generated from all the other options according to what I see in https://github.com/NixOS/nixpkgs/blob/a5a52e8c73ed2bb52b5fcb0bc93a77769412e72e/nixos/modules/services/x11/xserver.nix
<KarlJoad> slabity: Overload everything? The entire file will reflect whatever I give it?
<simpson> slabity: FWIW, "window manager", "display server", "compositing manager", all are very specific roles which X11 clients play; specific client processes have those powers.
<slabity> KarlJoad: `services.xserver.config` will overload whatever gets generated
<slabity> I'm at least 85% certain it was me
<slabity> Sorry :P
<slabity> Introducing kmscon + conky + tint2
<slabity> bqv: If I put panels in my tty-console, is that a DE?
<slabity> adisbladis: That is beautiful
<adisbladis> slabity: Pretty much that, yes
<slabity> init=/usr/bin/emacs
<slabity> bqv: Of course not. But literally every time I discuss this with someone they have a different opinion on what a DE is
<adisbladis> slabity: Many years ago I tried doing that with emacs
<slabity> Just the kernel and sway
<slabity> No other programs
<slabity> eyJhb: Unless you ONLY use sway...
<eyJhb> slabity: then it is part of your DE well, not the wholething :p
<slabity> And If you just use Sway, then that's your DE as well
<slabity> eyJhb: That's how I see it
<bqv> slabity: ok its arbitrary to you, but its what everyone else uses, so its up to you whether you want to join in
<slabity> To me, a desktop environment is 1 or more programs that provide an environment on a desktop
<slabity> This entire thing sounds like an arbitrary distinction...
<slabity> This isn't very convincing...
<slabity> eyJhb: No, apparently only my panels are a desktop environment
<slabity> So my X11 + i3 + compton + panels is a desktop environment
<slabity> bqv: So a desktop environment is a bunch of separate programs designed to run together to provide a full environment for a desktop
<slabity> I'm not sure how that's not a desktop. If I throw X11 + i3 + Compton + A couple of panels is that a desktop?
<slabity> bqv: Why not
<bqv> slabity: no?
<slabity> i3 is an X11 based window manager, correct? And i3 + X11 is a desktop environment, correct?
<slabity> bqv: I'm not sure what you are saying in that case
<slabity> Because it's a full environment on a desktop
<slabity> It's... Bloated?
<slabity> Sway is totally a DE. Just a lightweight one
<slabity> jlv: Sure... But at that point I'd just call it a desktop environment
<jlv> slabity: could you say Sway is a compositor and window manager? I mean, it manages windows for you *shrug*
<slabity> Sway is a full-on compositor for example, while i3 literally just told the Xserver where to place windows
<slabity> jlv: Not really... It's just a spiritually wayland-based successor to i3, which was a window manager
<jlv> slabity: I though Sway was considered a window manager.
<slabity> jlv: Well I'd assume windowManager would still be part of xserver since Wayland doesn't really have that concept
<jlv> slabity: I was just thinking about that. I think it's a good idea. Sway is even on it's own right now.
<slabity> What about having each different desktopManager stand on its own and have the ones that require X11 or Wayland to automatically `xserver.enable = true;`?
<slabity> DM options... desktopManager or displayManager?
<colemickens> slabity: yeah, I think that's why no one ends up doing it
<colemickens> (slabity: idk if it would even stand up over time, I could imagine it just being an annoying moving target over time)
<slabity> But yea, if what you say is true, then it sounds like there are only a few options that would need to be removed from `services.xserver`
<slabity> colemickens: Heresay. How dare you suggest people standardize a complicated process
<slabity> jlv: That would still require the backend to be written
<colemickens> slabity: configuring those things will have zero effect in any wayland environment
<slabity> Using `services.xserver.libinput.*` options
<colemickens> slabity: that is compositor dependent.
<slabity> colemickens: Okay, so wayland pulls in the libinput dependencies... But how do you configure libinput?
<slabity> Or let's say lightdm?
<slabity> colemickens: How do you enable libinput for example?
<colemickens> slabity: robodojo : there's no x11 required.
<robodojo> slabity i'd also like a pure wayland setup
<slabity> I don't see anything on my initial search for any type of discussion like that
<slabity> Does anyone know of any Github issue or Discourse discussion on making Wayland a first-class citizen in NixOS? From what I can tell it looks like it is impossible to configure a pure-Wayland system without also setting up a ton of X11 programs and configurations
<jlv> slabity: dang. Maybe I can get away without `services.xserver.displayManager`. Honestly, I don't mind running `exec sway` in a tty, if it works.
<slabity> blv: Got some bad news for ya
<slabity> jlv: And of course you need `videoDrivers` which is in `services.xserver`
<slabity> jlv: Maybe? I'm not sure specifically. I know `services.xserver.libinput` and `services.xserver.displayManager` aren't necessarilly X11 related and can be used with Wayland
<jlv> slabity: are you saying `desktopManager` isn't a part of X11, even though it is in `xserver`?
<slabity> Actually I wish we could take everything out of xserver that isn't related to X11
<slabity> I wish we could take all the desktopManager stuff out of xserver
<slabity> I'm not sure... I haven't made the switch to sway because my laptop has an nvidia card :/
<jlv> slabity: would I use `services.xserver.desktopManager` even if I'm using Wayland?
<slabity> Oh, and let lightdm do the autologin stuff
<slabity> Then I just let home-manager handle it all
<slabity> blv: It is a bit ambiguous... I typically just set `services.xserver.desktopManager.session = [ { name = "custom"; start = "" } ];`, then set `services.xserver.desktopManager.default = "custom";`
<jlv> slabity: I didn't try that yet, because I wanted to manage Sway with Home Manger. Honestly, I'm still not clear on what is managed by root or user session in Wayland, as opposed to X11.
<slabity> jlv: `programs.sway.enable` doesn't work?
<slabity> Assuming it's a nixos-specific bug
<slabity> Bring it over to the #nixos-security channel
<slabity> KarlJoad: Does nvidia-settings create a config based on the running Xorg server? Or based on the hardware it finds?
<slabity> KarlJoad: I'm not sure. I don't have any experience with the `nvidia-settings` tools or what they generate. I'm not sure what the difficulty of that would be
<KarlJoad`> slabity: Would it make more sense to try to translate the config that nvidia-settings generates into a `services.xserver.<thing>` nix expression?
<slabity> robodojo: igb is an ethernet driver. Not sure what the error is for though
<slabity> drakonis: Check your default route. Maybe only traffic going to your VPN network will go through the VPN
<robodojo> slabity users.extraUsers Alias of users.users.
<slabity> I thought `users.users` were for system-level users
<fresheyeball> slabity: makeOverlayable :: Set -> Set
<slabity> Isn't `users.extraUsers` preferred?
<slabity> fresheyeball: What do you mean? What would 'makeOverlayable' do?
<slabity> Pretty much. You can check `/proc/cmdline` to see what your kernel booted with
<slabity> Your bootloader will say, "I'm going to run `/path/to/kernel/linux-bzimage` with `initrd=/path/to/initrd`", which your kernel accepts as an argument. The initrd contains the bare minimum to load the devices required to mount your actual disk (filesystem drivers, LUKS for encryption, LVM if you use that, etc)
<slabity> robodojo: Yes. It switches to the new environment entirely
<slabity> robodojo: Before your OS gets fully booted, the kernel loads an initial ramdisk, which contains all the software required to mount and load your actual environment
<slabity> robodojo: ramdisk
<slabity> It does look like that file can be cleaned up a little...
<KarlJoad`> slabity: Yeah, at that point, there is some configuration that is always input to the file, regardless of my personal configurations.
<slabity> KarlJoad: Actually take a look further down at line 712. That's where the whole file gets created
<slabity> KarlJoad: Basically, it will automatically generate the FontPaths and ModulePaths that you don't need to worry about... Then append your config to the end
<slabity> KarlJoad: The config file is generated with the script set in the `configFile` variable located here: https://github.com/NixOS/nixpkgs/blob/a5a52e8c73ed2bb52b5fcb0bc93a77769412e72e/nixos/modules/services/x11/xserver.nix
<slabity> KarlJoad: Also take a look at `services.xserver.xrandrHeads` as that provides all the `Section "Monitor"` parts of the config...
<KarlJoad`> slabity: That's the setting I was working with, but it still left some default settings behind.
<slabity> If you do a `ps aux | grep "/bin/X"` you can probably look at the `-config` flag and see the path of your current xserver.conf
<slabity> KarlJoad: `services.xserver.config` should contain your xorg.conf contents
<slabity> Oh, the bot
<KarlJoad`> slabity: Gotcha. If I use the proprietary drivers, how can I let the nvidia-settings write to the xorg.conf file?
<slabity> worldofpeace: I don't know what that means...
<worldofpeace> slabity: it was diva'fied
<slabity> Which is like a 50/50 chance :/
<slabity> Assuming the freedesktop article is up-to-date
<slabity> Or prop-drivers
<slabity> KarlJoad: That is correct. If you want both GPUs to dispaly to a monitor then you gotta have Xinerama
<cole-h> slabity: A while back :D
<slabity> When did {^_^} get sass?
<KarlJoad`> slabity: But, from your investigation, I either have to use the proprietary NVIDIA drivers, or use Xinerama with Nouveau, right?
<slabity> Uh
<slabity> cole-h++ I've been trying to find something like this for a while
<slabity> That's fair... It is a bit of a hassle to initally setup
<KarlJoad`> slabity: I have heard of it. Never tinkered with it in a declarative OS, let alone NixOS.
<slabity> You could use your 980 as your Linux GPU and passthrough the 1080 to a Windows VM and game on that :P
<slabity> KarlJoad: Have you heard of using VFIO to passthrough your GPU to a VM?
<KarlJoad`> slabity: I have 2 GPUs and want to use them both.
<slabity> Old monitor that doesn't have a connection to your new GPU?
<slabity> KarlJoad: Just curious, but if you aren't doing anything performance-based, then why the dual-GPU setup?
<slabity> Yea, I'm thinking of 'SLiM'
<slabity> No wait, I'm thinking of a different display manager
<slabity> robodojo: I'm pretty sure sddm is abandoned
<KarlJoad`> slabity: I see. I'm not doing anything performance-based on the system, so those limitations don't really apply here.
<slabity> See "Multi-monitor desktop with Nouveau"
<KarlJoad`> slabity: multiple-GPU-monitors, as in, 1 monitor in each graphics card?
<slabity> KarlJoad: So going by what I see on the freedesktop website, Nouveau only allows multiple-gpu-monitors using Xinerama
<robodojo> slabity right after POST f8 will let you choose between any connected storage device to boot from, don't have to go into bios
<slabity> robodojo: If `f8` you mean going into your BIOS and selecting the boot-disk, then yes...
<robodojo> slabity oh so i wont have to choose which disk to boot using f8?
<slabity> robodojo: Yes. Specifically it will allow NixOS to add a boot-entry with `efibootmgr`
<KarlJoad`> slabity: Correct. All outputs of the 1080 are shown. None of the 980Ti's are present. Although, the GPUs are present to the system.
<slabity> KarlJoad: So if you just run `xrandr`, than only one set of connectors appear, correct?
<slabity> Or just one?
<slabity> KarlJoad: Do both sets of connectors appear in your xrandr output?
<slabity> KarlJoad: Details for how the xserver.conf is written can be found here: https://github.com/NixOS/nixpkgs/blob/a5a52e8c73ed2bb52b5fcb0bc93a77769412e72e/nixos/modules/services/x11/xserver.nix
<slabity> Most people's configs are very different...
<slabity> Infact I just copy the hardware-config into my normal configuration.nix file
<slabity> I do at least
<slabity> But it's fine if you do
<slabity> It says you shouldn't change it...
<simpson> slabity: seL4 and Genode might be worth looking into; in general, capability-oriented models can be *extremely* fine-grained and detailed about permissions.
<slabity> And still allow your hardware to be usable
<slabity> robodojo: I don't think it's possible to have a security model that doesn't do that...
<slabity> But if a program is doing that then there's not really anything stopping it from doing anything else...
<slabity> I suppose it's possible to have a root-user program directly write to /dev/sdb or whatever
<slabity> robodojo: Pretty much...
<slabity> Jegus I never heard of that
<slabity> Apple had a bug that badly?
<slabity> It would prevent any device that uses that kernel module from loading
<slabity> I don't think a bug that would mount and write files to your disk is likely... Especially considering it requires root-access to do so
<slabity> robodojo: I don
<slabity> But typically the kernel developers are trying to get devices to work, not get them to not work
<slabity> I'm sure there's an option in a kernel module or something that would let you stop certain devices from appearing...
<clever> yorick: yeah, try slabity'd trick above, but your FS may have other corruption due to an improper shutdown
<slabity> Maybe try `printf 10 > /nix/var/nix/db/schema` if possible
<slabity> Mine says '10'
<slabity> Super useful when trying to find dependencies or missing headers
<slabity> selfsymmetric-mu: No problem. Just run `nix-index` to gather information of what's in packages, and then you can 'nix-locate' whatever files you need
<{^_^}> slabity's karma got increased to 9
<selfsymmetric-mu> Holy moly that worked. slabity++ what did we learn?
<slabity> Yea, that's pretty weird. Showing up like that in my nix-locate too
<slabity> I must have added a space or something?
<slabity> ,locate libpq-fe.h
<clever> slabity: it only works if , is the first character of the msg
<slabity> Is the locate command not working?
<slabity> ,locate libpq-fe.h

2020-07-06

<KarlJoad> slabity: I have been re-enabling certain options, and it IS because I was specifying the per-interface `useDHCP` option.
<slabity> I think that one's fine, but it would not hurt to temporarily disable it
<slabity> If it still doesn't work, then post your updated config files and I'll take a look
<slabity> Can you try commenting out all those options?
<slabity> Any reason you don't just remove those? I don't understand why you are insisting on setting those variables
<slabity> It is all of the `useDHCP` values
<slabity> The `useDHCP` WILL pause boot time until the interfaces can get an IP/gateway from a DHCP server
<slabity> Yes
<KarlJoad> slabity: So it's the interface-wide `useDHCP` that's doing it?
<slabity> `networking = { hostName = "Karl-Nixos"; networkmanager.enable = true; };`
<slabity> In `thinkpad-T460s.nix` you can just set `networking = { hostName = "Karl-Nixos"; networkmanager.enable = true; };"
<slabity> So in the `configuration.nix`, you can remove all the networking lines. Including the `networking = { nameservers = [ "8.8.8.8" "8.8.4.4" ]; };` and the `networking.useDHCP = false;`
<slabity> KarlJoad: Can you post your configuration.nix?
<slabity> KarlJoad: I'm assuming you don't want to remove the lines completely for some reason, but they are null by default.
<slabity> Remove those lines entirely and check for any other config-lines related to networking
<slabity> You need to set it to null
<slabity> KarlJoad: No wait, the value for useDHCP can be a boolean, but it can also be null
<gueorgui> slabity: Actually I was wrong, Xcursor.size worked! Thanks a lot :)
<slabity> KarlJoad: You should just remove it entirely. If you have NetworkManager running, that's all you need for networking
<KarlJoad> slabity: So, just switch each of the devices' `useDHCP` flags to false?
<gueorgui> slabity: Yeah, I've tried that, but didn't seem to make a difference
<slabity> KarlJoad: Yea, you can remove that. I think that starts the daemon alongside NetworkManager rather than letting NetworkManager run it itself
<slabity> gueorgui: What about Xcursor.size?
<slabity> KarlJoad: You don't have dhcpcd in your config, do you? NetworkManager should manage that
<slabity> KarlJoad: That honestly sounds like dhcpcd is running
<gueorgui> slabity: Yeah I've adjusted that. Hidpi works fine overall, except for the mouse cursor
<slabity> You may need to adjust the Xresources Xft.dpi value
<KarlJoad> slabity: In respose to your "And it's fine when it's plugged in though?", the answer is yes.
<slabity> gueogui: i3 does not support hidpi as far as I am aware
<slabity> dhcpcd will block the boot, but NetworkManager shouldn't
<slabity> KarlJoad: Do you also happen to have dhcpcd enabled in your config?
<slabity> And it's fine when it's plugged in though?
<slabity> NetworkManager should not block the boot. What service does it say it is waiting on?
<KarlJoad> slabity: I'm using NetworkManager
<slabity> If it's a laptop I'm assuming you are using NetworkManager?
<slabity> KarlJoad: How is the connection being managed?
<slabity> ,locate libpam.so
<slabity> ,locat libpam.so
<slabity> There's also libpam-wrapper
<slabity> aleph-: openpam has libpam in it
<OmnipotentEntity> slabity++
<{^_^}> slabity's karma got increased to 8
<slabity> Your services' ExecStart would likely be something like `ExecStart = ''${pkgs.postgresql11Packages.repmgr}/bin/repmgrd --config-file=${somthing}'';`
<slabity> If you want to make a service: https://nixos.wiki/wiki/NixOS:extend_NixOS
<slabity> Well, you can probably start at making a nixos-module that handles all of it
<slabity> Assuming that's what you're trying to do
<slabity> If you make a derivation for your config you might be able to make a wrapper around it to throw in your configuration.nix
<slabity> Oh, it looks like repmgrd has a `--config-file=PATH` option
<slabity> But I don't know anything specific about how repmgr works
<slabity> Maybe if you can figure out how to load a config at the command-line or an environment variable or something and then make a wrapper around it
<slabity> Nah, sorry. Was checking the derivation to see if there was anything that indicated a config file.
<OmnipotentEntity> slabity, did you have some input?
<slabity> omnipotententity: postgresql11Packages.repmgr?
<slabity> But the actual config is probably not the easiest...
<slabity> What I can tell you is that if you have an Xorg config that works, then you can use `services.xserver.config` with all your Device and Monitor sections and it should work
<slabity> Heck anything can happen when you are using Nvidia drivers...
<slabity> KarlJoad: Sorry... Anything can happen when you are using Nouveau drivers.
<KarlJoad> slabity: When I typed that in before, all I got was a gray screen on both monitors.
<slabity> Not sure how you can convert that to a configuration though
<slabity> KarlJoad: Not sure if it's helpful, but to get my second GPU's monitor to work I use `xrandr --setprovideroutputsource 1 0` and the modes come up like normal
<slabity> Nice
<slabity> Can it go negative?
<slabity> Interesting...
<slabity> Hmm
<{^_^}> slabity's karma got increased to 7
<{^_^}> slabity's karma got decreased to 6
<scoates> slabity++
<slabity> slabity++
<slabity> slabity+=1
<slabity> slabity--
<slabity> Well that's some pretty precise karma...
<slabity> Uhh...
<scoates> slabity: thanks for trying
<slabity> I don't think so. I only just downloaded it earlier
<slabity> I'm pretty sure I've run out of ideas.
<scoates> slabity: maybe flake-compat master is currently broken, and you have cached good version? (just a thought… might be dumb)
<slabity> scoates: Could you try clearing out `~/.cache/nix` and try again? Maybe there's something cached that it doesn't like
<scoates> looks the same, slabity. https://files.scoat.es/aNpZJSkM.png ; (it did fetch the first time I ran it before I saw your "different directory". ~/tmp is empty)
<slabity> Do it in a different directory
<slabity> Maybe it didn't like the fetchGit value
<slabity> scoates: `nix-shell -E "(import (fetchTarball https://github.com/edolstra/flake-compat/archive/master.tar.gz) { src = (builtins.fetchTarball https://github.com/NixOS/nixos-homepage/archive/master.tar.gz); }).shellNix"`
<slabity> Does `nix-shell -p hello` do anything? Because it seems like your nix-shell isn't even attemtping to evaluate the expression given
<slabity> There's no compilation or anything?
<slabity> scoates: What if you run `nix-shell -E "(import (fetchTarball https://github.com/edolstra/flake-compat/archive/master.tar.gz) { src = builtins.fetchGit ./.; }).shellNix"`
<slabity> scoates: Does it still happen if you do `nix-shell shell.nix`?
<slabity> scoates: No idea. Looks to be direnv related and I have no experience with that
<scoates> slabity: ^
<slabity> scoates: It seems to work for me... What happens if you run the following: "git clone https://github.com/NixOS/nixos-homepage.git && cd nixos-homepage && nix-shell"
<tokudan> slabity, not for that service: https://nixos.org/nixos/options.html#services.airsonic
<slabity> But since that doesn't exist it looks like you will need a system-level overlay to overload the airsonic package
<slabity> tokudan: Normally there should be an option like 'services.airsonic.pkg' that lets you indicate the airsonic package to use...
<slabity> scoates: You're in the correct directory? Without any arguments, nix-shell will look for shell.nix
<tokudan> slabity, thanks that looks more useful, I'll have a look
<slabity> tokuden: Nixpkgs allows you to overload packages from upstream with your own using overlays. For your user you can do .config/nixpkgs/overlays.nix
<tokudan> slabity, and how does that work? nixpkgs manual doesn't really give me anything useful, or i'm too stupid for it
<slabity> tokudan: You can use an overlay
<slabity> I prefer the Arch wiki's guide to XDG: https://wiki.archlinux.org/index.php/XDG_Base_Directory

2020-07-02

<slabity> No building necessary, just a simple python script
<slabity> What's a good example of a simple python script wrapped in a derivation?
<slabity> daf90: That is probably the simplest way unless you want Nix to be managing your /etc/ files for you
<maier> slabity++
<{^_^}> slabity's karma got increased to 7
<maier> slabity: right on, just tried it and I only have the one "NixOS" generation in my boot loader. Thank you :)
<slabity> I think the issue is that the bootloader config doesn't get updated with nix-collect-garbage. You may need to do a rebuild again to get the old ones removed after you run that
<maier> slabity: to clarify (I just checked, it's my first real NixOS try): I don't use GRUB, but systemd-boot