Use NixOS Without Coding

Overview

(Work in Progress)

Nix-Gui

Make NixOS usable for non-technical users through a settings / package management GUI.

screenshots/historical_2021_06_23.gif

Motives

The declarative nature of NixOS provides it the capability of being the most user friendly linux distro. No more editing dotfiles, /etc files, manually writing timers, services, running commands to manage and create users and groups, etc. NixOS integrates all of that into a declarative system, and this project integrates NixOS’ declarative system into a GUI.

Serve Users Unfamiliar with or Learning Nix

Nix-Gui is a configuration management tool designed for those who haven’t mastered the (arguably difficult) nix language. It is also an attempt to replicate the ease of use of popular configuration systems including

  • Ubuntu’s Unity System Settings
  • Mint’s Cinnimon Settings
  • Synaptic Package Manager

Nix-Gui is designed to gradually and comfortably teach users about the mechanics of the nix language and nixpkgs.

Serve as an Effective System Management Tool for Experienced Users

At the most advanced level, and once feature parity has been achieved. Power users should be capable of changing system configuration, creating system ISOs, deploying systems to the cloud, etc in Nix-Gui more intelligibly and faster than through their traditional means of writing a nix module.

Serve Mobile Users

An additional motive for this project is to enable system configuration for mobile devices without having to type code on your phone.

Docs

Contributing

Non-developers (and interested developers), if you want to help, please

  • Run the application and submit bug report issues on GitHub.
  • Contact me on matrix (details below) to help more directly with UX testing.

Developers, if you’re interested in contributing, you may

  • Review the code, run the application, and point out potential improvements, flaws, and bugs by submitting issues.
  • Review milestones and issues and create pull requests to address bugs and missing features.
  • Contribute to important dependencies including rnix-parser and rnix-lsp.
  • Contact me on matrix to discuss.

Contact

Contact me on Matrix (andrew:mtx.rew.la)

Comments
  • Fix dark theme (updated)

    Fix dark theme (updated)

    Built on top of https://github.com/nix-gui/nix-gui/pull/172

    Fixes https://github.com/nix-gui/nix-gui/issues/141

    Changes:

    • Remove all coloring except from "status circles". Coloring entire QListWidgetItems, QGroupBox's, and buttons doesn't work well with dark themes.
    • Change yellow and green shade
    • Use QStyledItemDelegate to create OptionListItemDelegate which handles rendering of both editable and uneditable navlist items. This delegate allows the placement of icons, status circles, text, and extra text.

    image

    image

    opened by lapp0 16
  • convert org mode docs to markdown [WIP]

    convert org mode docs to markdown [WIP]

    This PR is related to #226 and is the output of the following command run in each subdirectory:

    for f in *.org; do pandoc "$f" -s -o "${f%.org}.md"; done
    

    I also git rm the org files.

    opened by jgarte 9
  • Implement basic save functionality

    Implement basic save functionality

    fixes https://github.com/nix-gui/nix-gui/issues/18

    Edit:

    test_load_edit_save showed a major weakness in the API: StateModels aren't independent. That is if you edit a state and persist it, loading a new StateModel will result in retrieval of the pre-edit state. This is because get_option_data is wrapped with lru_cache.

    Therefore to get the test working I stripped the lru_cache decorator. This results in redundant calculations of modules options, and the tests take over 600 seconds on my end. Therefore in this PR I will also:

    • [x] resolve https://github.com/nix-gui/nix-gui/issues/49
    • [x] write a cache decorator which checks if the contents of a file have changed, otherwise returns the cached result
    opened by lapp0 9
  • Fix Set Modules Issue

    Fix Set Modules Issue

    Fixes #54

    • [x] fix test case so it correctly fails if set module is used
    • [x] minor improvements to code and tests
    • [x] dependency injection inget_option_tree
    • [x] import set module by changing lib.nix

    Currently the evalModuleStub changes result in no position being returned.

    Error for set modules before this change:

    E               error: while evaluating 'get_modules_defined_attrs' at /build/k204x5pv8a4s0ach7h0g08wibc09gdgd-source/nixui/nix/lib.nix:48:31, called from (string):1:1:
    E               while evaluating 'collectDeclarationPositions' at /build/k204x5pv8a4s0ach7h0g08wibc09gdgd-source/nixui/nix/lib.nix:12:42, called from /build/k204x5pv8a4s0ach7h0g08wibc09gdgd-source/nixui/nix/lib.nix:55:5:
    E               while evaluating 'evalModuleStub' at /build/k204x5pv8a4s0ach7h0g08wibc09gdgd-source/nixui/nix/lib.nix:21:20, called from /build/k204x5pv8a4s0ach7h0g08wibc09gdgd-source/nixui/nix/lib.nix:53:36:
    E               attempt to call something which is not a function but a set, at /build/k204x5pv8a4s0ach7h0g08wibc09gdgd-source/nixui/nix/lib.nix:21:33
    
    

    Output before this change:

    [{'loc': ['environment', 'etc'], 'position': {'column': 3, 'file': '/build/ffjx8jqw8fn6ijcqdd0nrqrcb5x73gja-source/nixui/tests/sample/configuration.nix', 'line': 104}}, {'loc': ['environment', 'systemPackages'], 'position': {'column': 3, 'file': '/build/ffjx8jqw8fn6ijcqdd0nrqrcb5x73gja-source/nixui/tests/sample/configuration.nix', 'line': 167}}...
    

    Output after this change:

    [{'loc': ['appstream', 'enable'], 'position': None}, {'loc': ['assertions'], 'position': None}
    

    Need to look more into how https://github.com/NixOS/nixpkgs/blob/master/nixos/lib/eval-config.nix and https://github.com/NixOS/nixpkgs/blob/a3df3d05e5db17b26ff886f53a58761a547561cc/lib/modules.nix works to fix this issue and merge.

    opened by lapp0 7
  • Dev docs

    Dev docs

    fixes https://github.com/nix-gui/nix-gui/issues/188

    Important for review: Architecture documented

    • rendered at https://github.com/nix-gui/nix-gui/blob/dev-docs/docs/development/architecture.org

    Minor changes:

    • development.org reorganized into multiple files,
    • FieldsGroupBox refactored out of nav_interface.py

    This documentation describes the state of Nix-Gui after the following issues are tackled:

    • https://github.com/nix-gui/nix-gui/issues/173
    • https://github.com/nix-gui/nix-gui/issues/216
    • https://github.com/nix-gui/nix-gui/issues/218
    opened by lapp0 6
  • attempt to call something which is not a function but a set

    attempt to call something which is not a function but a set

    Hi,

    From patches to patches, it progresses =D

    I tried again, and it failed again :

    CONFIGURATION_PATH=/etc/nixos/configuration.nix nixFlakes run github:lapp0/nix-gui
    warning: ignoring the user-specified setting 'experimental-features', because it is a restricted setting and you are not a trusted user
    Traceback (most recent call last):
      File "/nix/store/1wb8vhks5nhai197qjy3jwv0s6k181gf-python3.8-nix-gui-0.1.0/bin/.nix-gui-wrapped", line 9, in <module>
        sys.exit(main())
      File "/nix/store/1wb8vhks5nhai197qjy3jwv0s6k181gf-python3.8-nix-gui-0.1.0/lib/python3.8/site-packages/nixui/main.py", line 10, in main
        statemodel = state_model.StateModel()
      File "/nix/store/1wb8vhks5nhai197qjy3jwv0s6k181gf-python3.8-nix-gui-0.1.0/lib/python3.8/site-packages/nixui/state_model.py", line 26, in __init__
        self.current_values = api.get_option_values_map()
      File "/nix/store/1wb8vhks5nhai197qjy3jwv0s6k181gf-python3.8-nix-gui-0.1.0/lib/python3.8/site-packages/nixui/utils/copy_decorator.py", line 6, in fn
        return copy.copy(wrapped(*args, **kwargs))
      File "/nix/store/1wb8vhks5nhai197qjy3jwv0s6k181gf-python3.8-nix-gui-0.1.0/lib/python3.8/site-packages/nixui/options/api.py", line 75, in get_option_values_map
        for option, option_data in get_option_data().items()
      File "/nix/store/1wb8vhks5nhai197qjy3jwv0s6k181gf-python3.8-nix-gui-0.1.0/lib/python3.8/site-packages/nixui/utils/copy_decorator.py", line 6, in fn
        return copy.copy(wrapped(*args, **kwargs))
      File "/nix/store/1wb8vhks5nhai197qjy3jwv0s6k181gf-python3.8-nix-gui-0.1.0/lib/python3.8/site-packages/nixui/options/api.py", line 48, in get_option_data
        configured_values = {'.'.join(k): v for k, v in parser.get_all_option_values(os.environ['CONFIGURATION_PATH']).items()}
      File "/nix/store/1wb8vhks5nhai197qjy3jwv0s6k181gf-python3.8-nix-gui-0.1.0/lib/python3.8/site-packages/nixui/options/parser.py", line 10, in get_all_option_values
        for attr_loc, attr_data in nix_eval.get_modules_defined_attrs(module_path).items():
      File "/nix/store/1wb8vhks5nhai197qjy3jwv0s6k181gf-python3.8-nix-gui-0.1.0/lib/python3.8/site-packages/nixui/options/nix_eval.py", line 59, in get_modules_defined_attrs
        leaves = nix_instantiate_eval(leaves_expr_template.substitute(module_path=module_path), strict=True)
      File "/nix/store/1wb8vhks5nhai197qjy3jwv0s6k181gf-python3.8-nix-gui-0.1.0/lib/python3.8/site-packages/nixui/options/nix_eval.py", line 21, in nix_instantiate_eval
        res = subprocess.check_output(cmd, stderr=log_pipe)
      File "/nix/store/66fbv9mmx1j4hrn9y06kcp73c3yb196r-python3-3.8.9/lib/python3.8/subprocess.py", line 415, in check_output
        return run(*popenargs, stdout=PIPE, timeout=timeout, check=True,
      File "/nix/store/66fbv9mmx1j4hrn9y06kcp73c3yb196r-python3-3.8.9/lib/python3.8/subprocess.py", line 516, in run
        raise CalledProcessError(retcode, process.args,
    subprocess.CalledProcessError: Command '['nix-instantiate', '--eval', '-E', '\nlet\n  config = import /etc/nixos/configuration.nix {config = {}; pkgs = import <nixpkgs> {}; lib = import <nixpkgs/lib>;};\n  closure = builtins.tail (builtins.genericClosure {\n    startSet = [{ key = builtins.toJSON []; value = {value = config;}; }];\n    operator = {key, value}: builtins.filter (x: x != null) (\n      if\n        builtins.isAttrs value.value\n      then\n        builtins.map (new_key:\n          let\n            pos = (builtins.unsafeGetAttrPos new_key value.value);\n          in\n            if\n              builtins.isNull pos || (pos.file != builtins.toString "/etc/nixos/configuration.nix")\n            then null\n            else {\n              key = builtins.toJSON ((builtins.fromJSON key) ++ [new_key]);\n              value = {\n                value = builtins.getAttr new_key value.value;\n                inherit pos;\n              };\n            }\n        ) (builtins.attrNames value.value)\n      else []\n    );\n  });\n  leaves = builtins.filter (x: !(builtins.isAttrs x.value.value)) closure;\nin\nbuiltins.map (x: {name = builtins.fromJSON x.key; position = x.value.pos;}) leaves\n    ', '--json', '--strict']' returned non-zero exit status 1.
    

    I copied the executed script in the command line and got this error

    nix-shell script.nix
    error: attempt to call something which is not a function but a set, at /tmp/script.nix:2:12
    (use '--show-trace' to show detailed location information)
    
    opened by pinage404 6
  • fix dark theme text color

    fix dark theme text color

    before the patch, text was not visible with qt dark theme

    i tried to fix the richtext class, but ... waste of time, no success simple solution: render navlist as plain text

    opened by milahu 5
  • profile navlist color selection and optimize

    profile navlist color selection and optimize

    Navlist colors are set based on whether the option or a descendant is changed either in configuration or in memory. This is operation more expensive than it should be.

    opened by lapp0 5
  • Feature Request: Support the Pinephone

    Feature Request: Support the Pinephone

    Hi,

    Is this app mobile friendly?

    I think it would be nice to consider usage on the pinephone/mobile optimization for future developments.

    I would definitely prefer to use NixOS on the pinephone "without coding".

    Some inspiration:

    https://github.com/JasonG-FR/PineBattery

    https://mobile.nixos.org/

    opened by jgarte 4
  • Undo Functionality for Attribute Renames / Deletion + New Implementation of Committing Changing to Disk

    Undo Functionality for Attribute Renames / Deletion + New Implementation of Committing Changing to Disk

    fixes #72

    fixes #57

    • [X] implement undo via Updates
    • [X] ~~parser.persist_updates: iterate over Updates and apply their changes~~
      • [X] Possible better alternative: update configuration files by calculating changes to OptionTree
    • [x] ensure DiffWidget works with the changes
    • [x] update architecture.org to reflect how Updates and persisting now work in Nix-Gui
    • [X] handle all TODOs
    • (referenced / created separate issues below)
    • [x] ~~update version to nix-gui to 0.2.0, as this fixes the last remaining issue in milestone 1~~ (moved to https://github.com/nix-gui/nix-gui/issues/240)

    New issues to address shortcomings of this PR

    During creation of this PR, new (non-urgent) requirements for Nix-Gui have been discovered / created, but are out of scope for this already-oversized PR.

    • https://github.com/nix-gui/nix-gui/issues/243
    • https://github.com/nix-gui/nix-gui/issues/244
    • https://github.com/nix-gui/nix-gui/issues/245
    • https://github.com/nix-gui/nix-gui/issues/246
    • https://github.com/nix-gui/nix-gui/issues/247
    • https://github.com/nix-gui/nix-gui/issues/75

    Immediate follow up PR

    Code injection is messy and doesn't work properly at all for lists.

    • https://github.com/nix-gui/nix-gui/pull/248
    opened by lapp0 4
  • nix run github:nix-gui/nix-gui doesn't work from official NixOS.org virtualbox OVA

    nix run github:nix-gui/nix-gui doesn't work from official NixOS.org virtualbox OVA

    After enabling flakes, when this happens:

    [demo@nixos:~]$ nix run github:nix-gui/nix-gui
    INFO:Retrieving option values for module "/etc/nixos/configuration.nix"
    ERROR:[Errno 2] No such file or directory: '/etc/nixos/<nixpkgs/nixos/modules/installer/virtualbox-demo.nix>'
    

    I guess this is because of the config piece that imports that in /etc/nixos/configuration.nix:

    # ... snip ...
    imports = [ <nixpkgs/nixos/modules/installer/virtualbox-demo.nix> ];
    # ... snip ...
    

    When I try to run it again, no error is displayed but it's also all blank:

    Screenshot_20211023_044202

    opened by ParetoOptimalDev 4
  • attribute 'defaultApp.x86_64-linux' should have type 'derivation'

    attribute 'defaultApp.x86_64-linux' should have type 'derivation'

    I ran nix --experimental-features 'nix-command flakes' run github:nix-gui/nix-gui and I get attribute 'defaultApp.x86_64-linux' should have type 'derivation' I am running fedora silverblue 37 and used this guide to install nix.

    opened by dnkmmr69420 0
  • error: attribute 'cycle' missing. The ‘fileSystems’ option can't be topologically sorted

    error: attribute 'cycle' missing. The ‘fileSystems’ option can't be topologically sorted

    cd nix-gui
    nix develop
    cd nixui
    p=/nix/store/ip17r412b9by9nwb0ri0avrzhvv49ajc-source
    export NIX_PATH=$p:nixpkgs=$p:nixos-config=$(readlink -f tests/sample/configuration.nix)
    
    # workaround for https://github.com/nix-gui/nix-gui/issues/275
    sed -i '/echo ${toString config.services.nix-serve.port}/d' tests/sample/configuration.nix
    
    pytest -svv tests/test_api.py::test_get_option_tree
    
    )
    >               raise NixEvalError(err_str)
    E               nixui.options.nix_eval.NixEvalError: NixEvalError("""
    E               error: attribute 'cycle' missing
    E               
    E                      at /nix/store/ip17r412b9by9nwb0ri0avrzhvv49ajc-source/nixos/modules/tasks/filesystems.nix:259:119:
    E               
    E                         258|       { assertion = ! (fileSystems' ? cycle);
    E                         259|         message = "The ‘fileSystems’ option can't be topologically sorted: mountpoint dependency path ${ls " -> " fileSystems'.cycle} loops to ${ls ", " fileSystems'.loops}";
    E                            |                                                                                                                       ^
    E                         260|       }
    

    https://github.com/NixOS/nixpkgs/blob/master/nixos/modules/tasks/filesystems.nix#L277

    
      ###### implementation
    
      config = {
    
        assertions = let
          ls = sep: concatMapStringsSep sep (x: x.mountPoint);
          notAutoResizable = fs: fs.autoResize && !(hasPrefix "ext" fs.fsType || fs.fsType == "f2fs");
        in [
          { assertion = ! (fileSystems' ? cycle);
            message = "The ‘fileSystems’ option can't be topologically sorted: mountpoint dependency path ${ls " -> " fileSystems'.cycle} loops to ${ls ", " fileSystems'.loops}";
          }
          { assertion = ! (any notAutoResizable fileSystems);
            message = let
              fs = head (filter notAutoResizable fileSystems);
            in
              "Mountpoint '${fs.mountPoint}': 'autoResize = true' is not supported for 'fsType = \"${fs.fsType}\"':${if fs.fsType == "auto" then " fsType has to be explicitly set and" else ""} only the ext filesystems and f2fs support it.";
          }
        ];
    
    opened by milahu 0
  • error: attribute 'services' missing

    error: attribute 'services' missing

    cd nix-gui
    nix develop
    cd nixui
    p=/nix/store/ip17r412b9by9nwb0ri0avrzhvv49ajc-source
    export NIX_PATH=$p:nixpkgs=$p:nixos-config=$(readlink -f tests/sample/configuration.nix)
    pytest -svv tests/test_api.py::test_get_option_tree
    
    E               nixui.options.nix_eval.NixEvalError: NixEvalError("""
    E               error: attribute 'services' missing
    E               
    E                      at /tmp/nix-gui/nixui/tests/sample/configuration.nix:95:25:
    E               
    E                          94|         # test getting config
    E                          95|         echo ${toString config.services.nix-serve.port}
    E                            |                         ^
    E                          96|       '';
    
    opened by milahu 0
Owner
null
Use CSS styling in Tkinter apps

cssTk To-Do Support Upto CSS 4.15 Set Up Docs Features * Corner Radius Gradient BG Blur Animations Usage Scenarios Allows easy import of GTK 3 and GTK

RUG 5 Oct 18, 2022
A quick GUI script to pseudo-anonymize patient videos for use in the GRK

grk_patient_sorter A quick GUI script to pseudo-anonymize patient videos for use in the GRK. Source directory — the highest level folder that will be

Peter Somers 1 Dec 9, 2021
Windows & Linux GUI application to use a Satodime (satodime.io)

Satodime-Tool Licence: LGPL v3 Author: Toporin Language: Python (>= 3.6) Homepage: https://github.com/Toporin/Satodime-Tool Introduction What is Satod

null 4 Dec 16, 2022
Use any of the 1k+ free FontAwesome icons in your tkinter application.

TkFontAwesome A library that enables you to use FontAwesome icons in your tkinter application. You may use any of the 1k+ free FontAwesome 5.0 icons.

Israel Dryer 33 Dec 20, 2022
These are some useful tkinter utilities that i like to personally use.

ntkutils nefs tkinter utilities These are some useful tkinter utilities that i like to personally use. I upload this here because someone might wants

nef 7 Dec 6, 2022
Make nixos usable for non-technical users through a settings / package management GUI.

Nix-Gui Make nixos usable for non-technical users through a settings / package management GUI. Motives The declarative nature of ni

null 547 Dec 31, 2022
Run unpatched binaries on Nix/NixOS

Run unpatched binaries on Nix/NixOS

Thiago Kenji Okada 160 Jan 8, 2023
PSP (Python Starter Package) is meant for those who want to start coding in python but are new to the coding scene.

Python Starter Package PSP (Python Starter Package) is meant for those who want to start coding in python, but are new to the coding scene. We include

Giter/ 1 Nov 20, 2021
Transformer Huffman coding - Complete Huffman coding through transformer

Transformer_Huffman_coding Complete Huffman coding through transformer 2022/2/19

null 3 May 19, 2022
A handy tool for generating Django-based backend projects without coding. On the other hand, it is a code generator of the Django framework.

Django Sage Painless The django-sage-painless is a valuable package based on Django Web Framework & Django Rest Framework for high-level and rapid web

sageteam 51 Sep 15, 2022
This repo is to be freely used by ML devs to check the GAN performances without coding from scratch.

GANs for Fun Created because I can! GOAL The goal of this repo is to be freely used by ML devs to check the GAN performances without coding from scrat

Sagnik Roy 13 Jan 26, 2022
Use Convolutional Recurrent Neural Network to recognize the Handwritten line text image without pre segmentation into words or characters. Use CTC loss Function to train.

Handwritten Line Text Recognition using Deep Learning with Tensorflow Description Use Convolutional Recurrent Neural Network to recognize the Handwrit

sushant097 224 Jan 7, 2023
a delightful machine learning tool that allows you to train, test and use models without writing code

igel A delightful machine learning tool that allows you to train/fit, test and use models without writing code Note I'm also working on a GUI desktop

Nidhal Baccouri 3k Jan 5, 2023
The Devils Eye is an OSINT tool that searches the Darkweb for onion links and descriptions that match with the users query without requiring the use for Tor.

The Devil's Eye searches the darkweb for information relating to the user's query and returns the results including .onion links and their description

Richard Mwewa 135 Dec 31, 2022
This is a bot which you can use in telegram to spam without flooding and enjoy being in the leaderboard

Telegram-Count-spamming-Bot This is a bot which you can use in telegram to spam without flooding and enjoy being in the leaderboard You can avoid the

Lalan Kumar 1 Oct 23, 2021
Use webpack to generate your static bundles without django's staticfiles or opaque wrappers.

django-webpack-loader Use webpack to generate your static bundles without django's staticfiles or opaque wrappers. Django webpack loader consumes the

null 2.4k Dec 24, 2022
Use case: quick JSON processing/restructuring with jq without terminal

alfred-jq Alfred workflow to conveniently process JQ on clipboard based on a jq query Also available at: packal/jq Use case: quick JSON processing/res

T on Meta Mode 5 Sep 30, 2022
Simple NLP based project without any use of AI

Simple NLP based project without any use of AI

Shripad Rao 1 Apr 26, 2022
Hack-All is a simple CLI tool that helps ethical-hackers to make a reverse connection without knowing the target device in use is it computer or phone

Hack-All is a simple CLI tool that helps ethical-hackers to make a reverse connection without knowing the target device in use is it computer

LightYagami17 5 Nov 22, 2022