GithubHelp home page GithubHelp logo

hlissner / dotfiles Goto Github PK

View Code? Open in Web Editor NEW
1.5K 41.0 101.0 13.74 MB

And I say hey, what's going on?

Home Page: https://youtu.be/ZZ5LpwO-An4

License: MIT License

Shell 24.57% Python 5.41% Scheme 19.28% JavaScript 0.28% CSS 1.25% Common Lisp 0.73% Nix 34.40% SCSS 10.93% Fennel 3.04% Ruby 0.09%
dotfiles nixos nix-flake nixos-configuration

dotfiles's Introduction

Metrics

dotfiles's People

Contributors

edmundmiller avatar fetsorn avatar hlissner avatar totoroot avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

dotfiles's Issues

How to user personal package in the config?

Hi,

I'm trying to add some packages that haven't been added to nixpkgs. But I couldn't figure out the way to use the defined packages in the config.

Basically, I create a new stdenv.mkDerivation under ./pakcages/<new-package>.nix. But when I try to use that package in the config, it couldn't find it.

How to add personal packages in the config?

Dwm on nix

Hey,

I was wondering how could I use dwm on NixOs. Is it possible. Could u please share ur high wisdom to a peasant like me dark lord ๐Ÿ™‡

unnecessary type definition either str path

Hi!

I'm restructuring my nixos configurations and migrating to using flakes and used this as a reference, both to copy parts of code from and to learn some design patterns and generally things about nixos.

Now I'm trying to read and understand the code, and I've noticed that this let seems unnecessary:

dotfiles = let t = either str path; in {

According to https://nixos.org/manual/nixos/stable/index.html#sec-option-types-basic, types.path is defined as
A filesystem path, defined as anything that when coerced to a string starts with a slash.
So that should already include str, right? Or am I missing something?

How are you managing doom-emacs?

I found a commented out section in modules/editors/emacs.nix, which seems like pulling in doom, if the doom-flag is enabled.

However, if that is the way you typically install it, why is it commented out? Are you managing doom outside of the NixOS-config or something?

Not really an issue, but I think that it's an interesting question that I haven't really found an answer for yet.

Suggestion: kvantum theme

Hey,

I looked at your dotfiles for inspiration on how to get qt to respect the dracula theme and found this

# Try really hard to get QT to respect my GTK theme.
env.GTK_DATA_PREFIX = [ "${config.system.path}" ];
env.QT_QPA_PLATFORMTHEME = "gtk2";
qt5 = { style = "gtk2"; platformTheme = "gtk2"; };

as for me this worked not too well (i.e. some remaining white backgrounds and so on).
I took a closer look at the dracula-theme package and found that it includes a kvantum theme which is supported by qtgnomeplatform.
To use this I had to do the following:
(I did not use the qt5 = ... as there the style gets set and for some reason overrides my personal session variables)
Install qgnomeplatform, set QT_QPA_PLATFORMTHEME = "gnome" and QT_STYLE_OVERRIDE="kvantum" and configure kvantum to use dracula

  xdg.configFile = {
    "kvantum.kvconfig" = {
      text = "theme=Dracula";
      target = "Kvantum/kvantum.kvconfig";
    };
    "Dracula-kvantum" = {
      recursive = true;
      source = "${pkgs.dracula-theme}/share/themes/Dracula/kde/kvantum/Dracula";
      target = "Kvantum/Dracula";
    };
  };

Request Starter Config Template

Describe your request

I would like to be able to create a skeleton/starter project with complete required files for a dotfiles setup instead of creating one per host or module. Have a look at:

https://github.com/Misterio77/nix-starter-configs

Briefly explain its use-case

if I could use a command like:

nix flake init -t github:hlissner/dotfiles#new-dotfiles 

This will create a complete directory called dotfiles with the required setup for at least one host. (with lib/modules/overlay setup) similar to https://github.com/Misterio77/nix-starter-configs

After upgrade home-manager to 23.11 doesn't build

What did you expect to happen?

I tried upgrade to newest Nixos.
I would like to to work.

What actually happened?

Doesn't compile.

image

Describe your attempts to resolve the issue

I tried change versions, study your files etc.

Steps to reproduce

I changed url to home-manager to offical reporo, to master branch
I try rebuild nixos

Package commit

master

System Information

No response

Absolute paths in `xdg.configFile`

What would you like to know?

How are you using absolute paths here?:

# link recursively so other modules can link files in their folders
home.configFile = {
"sxhkd".source = "${configDir}/sxhkd";
"bspwm" = {
source = "${configDir}/bspwm";
recursive = true;
};
};

For me, I need to pass the absolute path string to config.lib.file.mkOutOfStoreSymlink first, or I would get this error:

error: access to absolute path '/absolute/path' is forbidden in pure eval mode (use '--impure' to override)

How are you working around this?

Make bin/hey a separate flake

Have you considered making bin/hey a separate flake? As you say, it simplifies the commands a lot and makes it a bit more like the Guix UI. I see you have some aspects of it that are specific to your dotfiles, which would need to be removed, but the generic commands would still be useful on any system. Thoughts?

fup? fup!

Hello and Hey!

There is https://github.com/gytis-ivaskevicius/flake-utils-plus coming around the corner, and divnix/devos will rebase shortly.

Even though the README classifies devos as an

An overengineered config to scare off beginners.

I still wanted to invite you to the party ๐Ÿฅณ !

And I say ... ?

... staging is set to dabadooh ...

error: ipython-8.4.0 not supported for interpreter python3.7

What did you expect to happen?

When I do sudo nixos-rebuild switch --flake .#kuro, it should rebuild just fine.

What actually happened?

When i do sudo nixos-rebuild switch --flake .#kuro it spits out an error about ipython, complaining about ipython 8.4.0 not supported for python3.7 interpreter. error: ipython-8.4.0 not supported for interpreter python3.7. The trace is so long it's very difficult to copy.

Describe your attempts to resolve the issue

I have not tried anything.

Steps to reproduce

I opened a terminal.
Typed these commands.

git clone [email protected]:hlissner/dotfiles
cd dotfiles
sudo nixos-rebuild switch --flake .#kuro

And then... error.

Package commit

089f1a9

System Information

I use nixos 22.11 i think.

Suggestion: Update quickstart section in README

I just recently used the quick start instructions in the README to provision a new laptop, and I figured that it may be helpful for others (who aren't very familiar with the nix flakes approach) to clarify the quickstart section in the README. My suggestion would be something along the following lines:

  1. switch to root user with sudo su -
  2. nix-shell -p git nixFlakes
  3. git clone https://github.com/hlissner/dotfiles /mnt/etc/nixos
  4. Install NixOS: USER=<your_user_name_here> nixos-install --impure --root /mnt --flake /mnt/etc/nixos#XYZ, where XYZ is the host you want to install. Use #generic for a simple, universal config, or create a sub-directory in hosts/ for your device. See host/kuro for an example. If you added a folder in hosts/ don't forget to git add hosts/new_folder_for_host before running nixos-install.
    Reboot!

I think just adding the --impure flag by default and reminding users to do a git add host/new_folder_for_host would be sufficient for new comers.

multi arch management (RPI ? )

Hi !

I love the way you diffuse love for emacs with Doom (learn emacs in 2001, abandon it during so many years, but i rejump on boat with Doom in 2020, so thanks), so i'm also interested to follow your way for Nixos.

As lot of people, i have multiple computer, and an aarch64 RPI 4 to serve some contents at home. So ... i try to learn how people manage different arch in their flakes. I found the "rasendubi" LP way interesting but very complicated from a noob in nix like me (https://github.com/rasendubi/dotfiles/blob/master/flake.nix ).

I found this issue (divnix/digga#125 ) talking about arch and your dotfile. It seems something is now merged to help management of different arch : divnix/digga#161

Are you planning some aarch management in your nix dotfiles tool ? I'm interested to beta test :)

Help needed...installation instructions possibly outdated

Hey there,

I tried following the installation instructions, since I was not confident enough to configure my system from scratch due to a lack of experience with Nix. My plan was to first get the system up and running and then customize it to better suit my needs but I already failed to get a working installation and need help.

I first yoinked a minimal image (20.09.2144.1d957fd0233) and booted. After successfully partitioning my drive I cloned my fork with all modifications for my host and updated the hardware-configuration. However I first had to install git with nix-env -iA nixos.git.

Now when I tried running the installer I noticed that flakes weren't installed either:
error: unrecognised flag '--experimental-features'

So I added the channel and installed them with nix-env -iA nixpkgs.nixFlakes.

After that, I could restart the installation process but it failed with something along the lines of:
access to path /mnt/nix/store/ is forbidden in restricted mode.

With --show-trace I got the following:

trace: while evaluating the attribute 'activationScript' of the derivation 'nixos-system-purple-21.03.20201030.fcc6849' at: (95:5) in file: /mnt/nix/store/<some-hash>-source/nixos/modules/system/activation/top-level.nix

I don't see what is wrong there...

name = "nixos-system-${config.system.nixos.label}";

Any ideas if my configuration causes it or if it has something to do with flakes having changed since the repo was last updated?

It seems like this issue is related but the workaround does not work on a read-only file-system like the one of the installer:
NixOS/nix#4081

Although it seems to have been fixed by now...
NixOS/nixpkgs#99493

Sorry if the issue is misplaced here and many thanks in advance!

Shiro external monitor

What would you like to know?

For the shiro host, you mention in the README about external monitor setup. Do you manually run the xrandr command every time you connect with/disconnect from the external monitor, or do you automate it somehow?

Your configuration is great btw!

Regarding nixpkgs.lib.nixosSystem.specialArgs

Hello!

I was just wondering whether you could tell me whether the specialArgs set can pass a custom lib to the configuration files? I'd like to make a custom function automatically available to all my [sub-]modules directly, and I was wondering whether this could do the trick!

Thank you kindly for the help!

Upon moving to the new `hey`/`flake` based system, ZGEN_SOURCE broken

I've been following your dotfiles for a while now, and finally moved to the flake-based hey system.

Because of the complexity of the merge, I ended up just starting over from the base level. I ended up getting the system upgraded and most things back to normal, but I've been stymied by ZGEN_SOURCE and the zsh plugin system.

Somehow, post-boot $ZGEN_SOURCE is always set to $ZGEN_DIR (missing zgen.zsh at the end). I've scoured the dotfiles and haven't been able to find HOW this is happening. Checking /etc/set-environment I see the correct value set, but something is overwritting the value. userActivationScripts are also failing post-hey rebuild, but I'm not sure if that could be causing the environment not to completely roll-over even after a reboot (new generations are created).

I was hoping you had some insight since you once went through this upgrade yourself.

`countAttrs` doesn't work as expected

What did you expect to happen?

Here we are. My nix-fu isn't great, but maybe I found an issue with this function. I'm trying to use countAttrs as done in this assertion.

I have a similar setup for my WMs, like that:

  cfgXorg = config.user-modules.desktop.xorg;
  cfgWayland = config.user-modules.desktop.wayland;

  ...
  
  {
    assertion = (countAttrs (n: v: n == "enable" && v) cfgXorg) < 2;
    message = "[Xorg] Can't have more than one WM/DE enable at a time.";
  }
  {
    assertion = (countAttrs (n: v: n == "enable" && v) cfgWayland) < 2;
    message = "[Wayland] Can't have more than one WM/DE enable at a time.";
  }

Something like this should print a backtrace!

 user-modules.desktop.wayland = {
      enable = true;
      sway.enable = true;
      hyprland.enable = true;
 };

What actually happened?

The evaluation continues, instead of printing the backtrace.

Describe your attempts to resolve the issue

No response

Steps to reproduce

Enable at least two WMs (I'm using your functions for the same purpose)

Package commit

089f1a9

System Information

No response

nix-darwin

First off, thanks for creating doom and sharing your dotfiles - really appreciate it!

I understand that this config is geared toward nixos (and you don't use mac), but was wondering if you would be able to help me understand how I might adapt the libs (and general configs) to also work with darwin and specifically nix-darwin flakes.

For example, I think I need to adapt the mkHost function, to something like:

  mkHost = path: attrs @ { system ? system, ... }:
    if system == "x86_64-darwin" then inputs.nix-darwin.lib.darwinSystem else nixosSystem {
      inherit system;
      specialArgs = { inherit lib inputs; };
      modules = [
        {
          nixpkgs.pkgs = pkgs;
          networking.hostName = mkDefault (removeSuffix ".nix" (baseNameOf path));
        }
        (filterAttrs (n: v: !elem n [ "system" ]) attrs)
        ../.
        (import path)
      ];
    };

and in flake.nix, need to additionally set darwinModules and darwinConfigurations.

      nixosModules = # shared modules and maybe some nixos specific modules in ./modules/os-specific/nixos
      nixosConfigurations = # nixos specific hosts

      darwinModules = # shared modules and maybe some darwin specific modules in ./modules/os-specific/darwin
      darwinConfigurations = # darwin specific hosts

Thanks in advance!

Fail to update all topics with `zsh depoly -a`

When I was executing zsh depoly -a, it showed the error message: [FAIL] topic/topic topic/topic topic/topic doesn't exist!at topic-init:4>, where [[ ! -d 'dev/java dev/python editor/emacs misc/docker misc/weechat shell/mu shell/zsh' ]] at line 3 failed.

I use

function topic-init {
  IN=(${=@})
  for topic in $@; do ...

to split string into list, and it works for now.

mkEnableOption expects string instead of bool

What did you expect to happen?

Configuration could return description when try to document it.

What actually happened?

An exception raised:

error: cannot coerce a Boolean to a string
           99|     description = "Whether to enable ${name}.";

Describe your attempts to resolve the issue

I omitted skype module from my documentation attempts

# "modules/desktop/apps/skype.nix"

Steps to reproduce

  1. clone friendly-modules
  2. uncomment line with # "modules/desktop/apps/skype.nix" of hlissner.nix
  3. run nix develop --build

Package commit

fb0593a

System Information

I use NixOS unstable, and I document random modules instead of eat my dog when a have no homework

What is `bindkey -M vicmd "^[[3~" delete-char` for?

I was reading your dotfiles and came across these lines. I tried to search for it but couldn't find anything. Do you care to explain what these lines for? Actually, what is ^[[3~? Is there any resource I can learn about them more?

bindkey -M vicmd "^[[3~" delete-char
bindkey "^[[3~"  delete-char
bindkey "^[3;5~" delete-char

surround

I'm trying to get the vi surround stuff to work in 5.2, but these lines are having no effect for me:

autoload -Uz surround
zle -N delete-surround surround
zle -N add-surround surround
zle -N change-surround surround
bindkey -a cs change-surround
bindkey -a ds delete-surround
bindkey -a ys add-surround

Are you doing anything else to get this working in your setup?

Thanks.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.