Skip to content

Gerg-L/smfh

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

35 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Sleek Manifest File Handler

The goal of this project is to provide a reliable file creation tool for use with nix

Mainly with hjem, and possibly for creating /etc in NixOS

Example manifest

Note: any option set to null here is optional

{
  "files": [
    {
      "type": "file",
      "source": "./sources/file",
      "target": "./outputs/file",
      "permissions": null,
      "uid": null,
      "gid": null,
      "clobber": null
    },
    {
      "type": "symlink",
      "source": "./sources/file",
      "target": "./outputs/symlink",
      "permissions": null,
      "uid": null,
      "gid": null,
      "clobber": null
    },
    {
      "type": "recursiveSymlink",
      "source": "./sources/recursiveSymlink",
      "target": "./outputs/recursiveSymlink",
      "clobber": null
    },
    {
      "type": "modify",
      "target": "./outputs/modified",
      "permissions": null,
      "uid": null,
      "gid": null
    },
    {
      "type": "directory",
      "target": "./outputs/directory",
      "permissions": null,
      "uid": null,
      "gid": null,
      "clobber": null
    },
    {
      "type": "delete",
      "target": "./outputs/delete"
    }
  ],
  "clobber_by_default": false,
  "version": 1
}

With the sources directory containing:

$ eza --long --no-user --no-time --no-filesize --tree -L 2 sources
drwxr-xr-x sources
.rw-r--r-- ├── file
drwxr-xr-x └── recursiveSymlink
drwxr-xr-x     ├── dir
lrwxrwxrwx     └── symlink -> ../file

And the outputs directory looking like this before hand:

$ eza --long --no-user --no-time --no-filesize --tree -L 2 outputs
drwxr-xr-x outputs
.rw-r--r-- ├── delete
.rw-r--r-- └── modified

This should output:

$ eza --long --no-user --no-time --no-filesize --tree -L 2 outputs
drwxr-xr-x outputs
drwxr-xr-x ├── directory
.rw-r--r-- ├── file
.rw-r--r-- ├── modified
drwxr-xr-x ├── recursiveSymlink
drwxr-xr-x │   ├── dir
lrwxrwxrwx │   └── symlink -> /absolute/path/sources/file
lrwxrwxrwx └── symlink -> /absolute/path/sources/file

About

Sleek Manifest File Handler

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 3

  •  
  •  
  •