GithubHelp home page GithubHelp logo

nixpkgs's Introduction

Nixpkgs

My own nix settings.

Installation

For a new NixOS system, install with Calamares from USB drive, then follow this guide to start using flakes.

Configurations location

Common to all suitable systems

  • home-manager: home/
  • NixOS: etc/nixos/
  • darwin: etc/darwin/

Common to most system

They are in the location mentioned in the above section, but their value could be conditioned, or directly extracted, from configurations defined in systems/.

System-specific

In this case, the configuration is directly defined in systems/, without the overhead of defining a new option in a module, and then setting in the common one.

nixpkgs's People

Contributors

alecandido avatar

Watchers

 avatar  avatar

nixpkgs's Issues

Backup

Track my user and few orgs (i.e. qiboteam, qibogang, and nnpdf).
Possibly even subset of some orgs (I don't care about having a backup of pineapplgrids or reportengine).

Schedule daily uploads.
Keep shallow.

Periodically (monthly?) copy the full snapshot to a different location.

Code

Make a backup flake in alecandido/flakes (Python, there is JSON and TOML support built-in).

Keep the systemd unit in alecandido/nixpkgs?

  • git: shallow clone (it automatically uses the SSH key, but I don't need the history)
    • optionally mark some repos as full clones
  • scp, obvious (no history)
  • http, curl resource to folder identified by group name

Config file

Specify which repos (or sets) to download:

[scp]
villarose = ["~/path/to/folder1", "~/path/to/folder2", "..."]
yukon = ["~/path/to/folder3", "~/path/to/folder4", "..."]
"..." = ["..."]

[http]
group1 = ["..."]

[git.github]
owners = ["alecandido", "qiboteam", "qibogang"]
repos = ["nnpdf/eko", "nnpdf/yadism", "nnpdf/pineappl", "..."]

[git.gitlab]
"..." = ["..."]

Keep different sources separate, because of addressing (but also because they may have different APIs).

GitHub

gh api /user/repos --jq '.[] | {"name": .name, "owner": .owner.login, "url": .ssh_url}' --paginate

Optional secrets

Since it may be difficult to recover all the requirements during a fresh installation (new ssh keys, register them, rekey secrets, or reobtain them if permanently lost, ...), then better to be able to exclude them in a first step.

Currently, with villarose it is more or less possible by commenting the the networking.nix import in its respective default.nix file.

Toggles to home manager modules

Instead of using a list of toggles, like:

(homeMods "alessandro" ["amenities" "neovim.lsp" "gnome" "thunderbird"])

it would be more natural to have attributes, like:

{
  amenities = true;
  gnome = true;
  neovim = {
    lsp = true;
  };
  shell = "nu";
  thunderbird = true;
}

But even better, it would be to have an home-manager module where to write some configurations, and then use this high-level configs to enable a series of other configs (like right now it is happening for toggles).
https://nixos.org/manual/nixos/stable/index.html#sec-writing-modules

Using home-manager it should on every platform (including darwin), and the configurations could be added as an extra module in systems/.

Remove Gnome

Remove Gnome from villarose and klondike, since they don't have to run GUI apps.

Consider that Gnome is not only the GUI, but it is taking care of other resources, e.g. Network Manager.

Firefox

Home manager has a firefox module:
https://nix-community.github.io/home-manager/options.xhtml#opt-programs.firefox.enable

And it enables adding extensions:
https://nix-community.github.io/home-manager/options.xhtml#opt-programs.firefox.profiles._name_.extensions
(and possibly even bookmarks, though I would push them to a private repo).

Some extensions have been packaged by rycee (HM auth):
https://git.sr.ht/~rycee/nur-expressions/tree/master/item/pkgs/firefox-addons/generated-firefox-addons.nix
including:

  • 10ten-ja-reader
  • bitwarden
  • languagetool
  • notifier-for-github
  • refined-github
  • tab-session-manager

(i.e. all those that I use...)

Configure email accounts

  • complete accounts configs (no password)
  • test in Thunderbird
  • add terminal client (neomutt? aerc?)
  • manage passwords with agenix #5

VPN

  • set up my own

Gnome

Tweak Gnome.

  • /org/gnome/shell in dconf
[/]
app-picker-layout=[{'org.gnome.clocks.desktop': <{'position': <0>}>, 'org.gnome.Calendar.desktop': <{'position': <1>}>, 'org.gnome.Loupe.desktop': <{'position': <2>}>, 'org.gnome.Totem.desktop': <{'position': <3>}>, 'org.gnome.Music.desktop': <{'position': <4>}>, 'org.gnome.Snapshot.desktop': <{'position': <5>}>, 'org.gnome.Settings.desktop': <{'position': <6>}>, 'Utilities': <{'position': <7>}>, 'org.gnome.Evince.desktop': <{'position': <8>}>, 'org.gnome.TextEditor.desktop': <{'position': <9>}>, 'gnome-system-monitor.desktop': <{'position': <10>}>, 'org.gnome.Weather.desktop': <{'position': <11>}>, 'org.gnome.Maps.desktop': <{'position': <12>}>, 'org.gnome.Calculator.desktop': <{'position': <13>}>, 'com.mattjakeman.ExtensionManager.desktop': <{'position': <14>}>, 'org.gnome.Extensions.desktop': <{'position': <15>}>, 'org.gnome.Contacts.desktop': <{'position': <16>}>, 'simple-scan.desktop': <{'position': <17>}>, 'org.gnome.Epiphany.desktop': <{'position': <18>}>, 'org.gnome.Fractal.desktop': <{'position': <19>}>, 'org.gnome.Geary.desktop': <{'position': <20>}>, 'yelp.desktop': <{'position': <21>}>, 'org.gnome.Tour.desktop': <{'position': <22>}>}, {'nixos-manual.desktop': <{'position': <0>}>, 'brave-browser.desktop': <{'position': <1>}>, 'org.telegram.desktop.desktop': <{'position': <2>}>, 'thunderbird.desktop': <{'position': <3>}>, 'nvim.desktop': <{'position': <4>}>, 'htop.desktop': <{'position': <5>}>, 'btop.desktop': <{'position': <6>}>, 'cups.desktop': <{'position': <7>}>, 'kitty.desktop': <{'position': <8>}>, 'xterm.desktop': <{'position': <9>}>}]
enabled-extensions=['[email protected]']
favorite-apps=['firefox.desktop', 'org.gnome.Nautilus.desktop']

[app-switcher]
current-workspace-only=true

Nixvim

Consider moving to Nixvim, to simplify Neovim configs.

Host website

Or part of it

(better to keep the minimal front-page on GitHub Pages, for better availability)

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.