Giter VIP home page Giter VIP logo

nix-config's Introduction

❄️ nix-config

Built with Nix

NixOS and Home Manager configuration for my machines.

Installation / Update

NixOS hosts

From the root of this repository, apply both the NixOS configuration and the Home Manager configuration:

sudo nixos-rebuild switch --flake ./#x220-nixos --show-trace --verbose

From the root of this repository, apply only the Home Manager configuration:

home-manager switch \
  --extra-experimental-features nix-command \
  --extra-experimental-features flakes \
  --flake .#jack@x220-nixos

ℹ️ As long as the configuration of a host (e.g. nixos/hosts/x220/configuration.nix) includes nix.settings.experimental-features = [ "nix-command" "flakes" ]; the --extra-experimental-features flags can be omitted.

home-manager switch --flake .#jack@x220-nixos

See also: Setup a new NixOS machine.

Non-NixOS hosts

See: Setup a new generic Linux machine.

Docs

Credits

I learned a lot by looking at other people's NixOS and Home Manager configurations. Here is a non exhaustive list of repositories I often look at for inspiration, and why I think they are worth mentioning.

  • it's well organized and well documented.
  • it contains a few notes that explain how to manage this configuration.
  • it configures Neovim using an external Nix flake.
  • it includes a build script to deploy the configuration to a new NixOS machine.
  • it's well documented. There is a short README in almost any directory. This keeps the documentation focused on a small subset of the entire configuration. I really like this approach.
  • the author wrote this NixOS & Flakes Book.

Other

nix-config's People

Contributors

jackdbd avatar

Watchers

 avatar  avatar

nix-config's Issues

ActivityWatch aw-qt doesn't start if I don't execute home-manager switch first

Every time I reboot my laptop, a systemd service launches aw-qt. aw-qt tries to start a few other ActivityWatch components (aw-server, aw-watcher-afk, aw-watcher-window) but immediately fails because it can't find them.

Here is a log file showing that neither bundled modules, nor system modules can be found.

2023-12-19 13:49:13 [INFO ]: Started aw-qt...  (aw_qt.main:53)
2023-12-19 13:49:13 [INFO ]: Found 0 bundled modules  (aw_qt.manager:85)
2023-12-19 13:49:14 [INFO ]: Found 0 system modules  (aw_qt.manager:119)
2023-12-19 13:49:14 [ERROR]: Module aw-server not found  (aw_qt.manager:273)
2023-12-19 13:49:14 [ERROR]: Module aw-watcher-afk not found  (aw_qt.manager:273)
2023-12-19 13:49:14 [ERROR]: Module aw-watcher-window not found  (aw_qt.manager:273)
2023-12-19 13:49:14 [ERROR]: Manager tried to start nonexistent module aw-server  (aw_qt.manager:265)
2023-12-19 13:49:14 [ERROR]: Manager tried to start nonexistent module aw-watcher-afk  (aw_qt.manager:265)
2023-12-19 13:49:14 [ERROR]: Manager tried to start nonexistent module aw-watcher-window  (aw_qt.manager:265)
2023-12-19 13:49:14 [INFO ]: Creating trayicon...  (aw_qt.trayicon:206)

As soon as I switch my Home Manager configuration with this command...

home-manager switch \
  --extra-experimental-features nix-command \
  --extra-experimental-features flakes \
  --flake $HOME/repos/nix-config#$(whoami)@$(hostname)

...aw-qt is able to find 4 ActivityWatch system modules and from then on it runs without any issues.

2023-12-19 13:50:25 [INFO ]: Started aw-qt...  (aw_qt.main:53)
2023-12-19 13:50:25 [INFO ]: Found 0 bundled modules  (aw_qt.manager:85)
2023-12-19 13:50:25 [INFO ]: Found 4 system modules  (aw_qt.manager:119)
2023-12-19 13:50:25 [INFO ]: Starting module aw-server  (aw_qt.manager:148)
2023-12-19 13:50:25 [INFO ]: Starting module aw-watcher-window  (aw_qt.manager:148)
2023-12-19 13:50:25 [INFO ]: Starting module aw-watcher-afk  (aw_qt.manager:148)
2023-12-19 13:50:25 [INFO ]: Creating trayicon...  (aw_qt.trayicon:206)
2023-12-19 13:50:26 [INFO ]: Initialized aw-qt and trayicon successfully  (aw_qt.trayicon:262)

By looking at the default aw-qt configuration, it seems that it is launched with --autostart-modules=aw-server,aw-watcher-afk,aw-watcher-window.

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.