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

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

At the same time, Nix-Gui should serve to gradually and comfortably teach users about the mechanics of the nix language and nixpkgs. At the most advanced level, once feature parity has been achieved Nix-Gui may be considered an IDE.

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 contact me on matrix (details below) to help with UX testing.

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

  • Review the code and point out potential improvements and flaws.
  • 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
Desktop application for Windows/macOS users to rotate through custom, preset, and searched-for collections of backgrounds with scheduling and additional settings

Background Revolution (In Development, Alpha Release) What? This will be an application for users to customize their windows backgrounds by uploading

Daniel Agapov 1 Nov 2, 2021
Use NixOS Without Coding

(Work in Progress) Nix-Gui Make NixOS usable for non-technical users through a settings / package management GUI. Motives The declarative nature of Ni

null 548 Dec 30, 2022
Management Gui for OpenVR FSR PlugIn

OpenVR FSR App Small GUI to install/uninstall, tweak settings of the Modified OpenVR DLL with AMD FidelityFX SuperResolution Upscaler with a single cl

Stefan Tapper 234 Dec 20, 2022
A GUI based CRUD database management system built using mysql and python

A GUI based CRUD database management system built using mysql and python

Aquila 2 Feb 13, 2022
A GUI for designing Python GUI's for PySimpleGUI.

SimpleGUIBuilder A GUI for designing Python GUI's for PySimpleGUI. Installation There is none :) just download the file from a release and run it. Don

Miguel Martins 65 Dec 22, 2022
PyQt5 Sample GUI Program - Python PyQt5 Sample GUI application

Python PyQt5 Sample GUI application Program work like this Designed GUI using De

Dimuth De Zoysa 5 Mar 27, 2022
The GUI application by Python3.8. Using QT Design draw UI and generator UI XML file provides to PySide2 build GUI components

The GUI application by Python3.8. Using QT Design draw UI and generator UI XML file provides to PySide2 build GUI components. Total adopt OOD design class, service, and abstract class. OOP implemented this project.

Jiage 1 Jan 11, 2022
Dear PyGui Extensions is a collection of useful tools, abstractions, and simplification layers built with/for Dear PyGui users.

Dear PyGui Extensions: A collection of useful tools, abstractions, and simplification layers built with/for Dear PyGui users.

Jonathan Hoffstadt 34 Jan 1, 2023
A little Python library for making simple Electron-like HTML/JS GUI apps

Eel Eel is a little Python library for making simple Electron-like offline HTML/JS GUI apps, with full access to Python capabilities and libraries. Ee

Chris Knott 5.4k Jan 7, 2023
Turn (almost) any Python command line program into a full GUI application with one line

Gooey Turn (almost) any Python 2 or 3 Console Program into a GUI application with one line Support this project Table of Contents Gooey Table of conte

Chris 17k Jan 9, 2023
Build GUI for your Python program with JavaScript, HTML, and CSS

https://pywebview.flowrl.com pywebview is a lightweight cross-platform wrapper around a webview component that allows to display HTML content in its o

Roman 3.3k Jan 1, 2023
A Python native, OS native GUI toolkit.

Toga A Python native, OS native GUI toolkit. Prerequisites Minimum requirements Toga requires Python 3. Python 2 is not supported. If you're on macOS,

BeeWare 3.3k Dec 31, 2022
Custom GUI for your Blender add-ons using Dear ImGui

Dear Imgui for Blender Use the infamous Dear ImGui library directly in your Blender scripts! This means custom GUI drawing in your operators: Normally

Elie Michel 83 Dec 25, 2022
Edifice: a declarative GUI library for Python

Edifice is a Python library for building reactive UI, inspired by modern Javascript libraries such as React.

David Ding 193 Dec 11, 2022
A Python native, OS native GUI toolkit.

Toga A Python native, OS native GUI toolkit. Prerequisites Minimum requirements Toga requires Python 3. Python 2 is not supported. If you're on macOS,

BeeWare 3.3k Jan 2, 2023
A small pomodoro GUI for Windows/Linux created in Python with PyQt5.

Pomodoro A small pomodoro GUI for Windows/Linux created with PyQt5. Features The "Timer" tab allows you to set your desired work and rest times aswell

Burak Martin 81 Dec 28, 2022
Learn to build a Python Desktop GUI app using pywebview, Python, JavaScript, HTML, & CSS.

Python Desktop App Learn how to make a desktop GUI application using Python, JavaScript, HTML, & CSS all thanks to pywebview. pywebview is essentially

Coding For Entrepreneurs 55 Jan 5, 2023
A Minimalistic Backup GUI for your Windows, Mac or Linux

BlobBackup is a minimalistic backup utility for your Windows, Mac or Linux computer. With an excellent engine, extensive storage support, and an easy

Bimba Shrestha 283 Nov 30, 2022