From 5f7cfe485812f6d2794c51a422261277495d044c Mon Sep 17 00:00:00 2001 From: punkfairie Date: Thu, 14 Nov 2024 21:28:56 -0800 Subject: [PATCH] feat(snowfall): Setup Snowfall migration WIP!!!!!!! --- flake.nix | 20 ++++++-- homes/x86_64-linux/marley@nyx/default.nix | 4 ++ lib/module/default.nix | 51 +++++++++++++++++++ modules/home/me/default.nix | 4 ++ .../derivations}/figlet-with-fonts.nix | 0 {home => old/home}/appearance/default.nix | 0 {home => old/home}/appearance/gtk.nix | 0 {home => old/home}/appearance/qt.nix | 0 {home => old/home}/default.nix | 0 {home => old/home}/languages/default.nix | 0 {home => old/home}/languages/go.nix | 0 {home => old/home}/languages/javascript.nix | 0 {home => old/home}/languages/nix.nix | 0 {home => old/home}/languages/php.nix | 0 {home => old/home}/profile/default.nix | 0 {home => old/home}/profile/xdg.nix | 0 {home => old/home}/programs/amfora.nix | 0 {home => old/home}/programs/bat.nix | 0 {home => old/home}/programs/btop.nix | 0 {home => old/home}/programs/cava.nix | 0 {home => old/home}/programs/cheat.nix | 0 {home => old/home}/programs/curl.nix | 0 {home => old/home}/programs/default.nix | 0 {home => old/home}/programs/eza.nix | 0 {home => old/home}/programs/figlet.nix | 0 {home => old/home}/programs/fish.nix | 0 {home => old/home}/programs/fzf.nix | 0 {home => old/home}/programs/gh.nix | 0 {home => old/home}/programs/git.nix | 0 {home => old/home}/programs/glow.nix | 0 {home => old/home}/programs/gpg.nix | 0 {home => old/home}/programs/hyfetch.nix | 0 {home => old/home}/programs/just.nix | 0 {home => old/home}/programs/lazygit.nix | 0 {home => old/home}/programs/less.nix | 0 {home => old/home}/programs/man.nix | 0 {home => old/home}/programs/ncmpcpp.nix | 0 {home => old/home}/programs/neofetch.nix | 0 {home => old/home}/programs/rbw.nix | 0 {home => old/home}/programs/ripgrep.nix | 0 {home => old/home}/programs/ssh.nix | 0 {home => old/home}/programs/starship.nix | 0 {home => old/home}/programs/tmux.nix | 0 {home => old/home}/programs/topgrade.nix | 0 {home => old/home}/programs/wezterm.nix | 0 {home => old/home}/programs/wget.nix | 0 {home => old/home}/programs/zathura.nix | 0 {home => old/home}/programs/zoxide.nix | 0 {home => old/home}/services/clipboard.nix | 0 {home => old/home}/services/default.nix | 0 {home => old/home}/services/dunst.nix | 0 {home => old/home}/services/syncthing.nix | 0 {home => old/home}/xorg/default.nix | 0 {home => old/home}/xorg/xsession.nix | 0 {modules => old/modules}/home/iconTheme.nix | 0 {modules => old/modules}/home/me.nix | 0 {modules => old/modules}/home/shellAbbrs.nix | 0 {shells => old/shells}/base.nix | 0 {shells => old/shells}/nix.nix | 0 59 files changed, 76 insertions(+), 3 deletions(-) create mode 100644 homes/x86_64-linux/marley@nyx/default.nix create mode 100644 lib/module/default.nix create mode 100644 modules/home/me/default.nix rename {derivations => old/derivations}/figlet-with-fonts.nix (100%) rename {home => old/home}/appearance/default.nix (100%) rename {home => old/home}/appearance/gtk.nix (100%) rename {home => old/home}/appearance/qt.nix (100%) rename {home => old/home}/default.nix (100%) rename {home => old/home}/languages/default.nix (100%) rename {home => old/home}/languages/go.nix (100%) rename {home => old/home}/languages/javascript.nix (100%) rename {home => old/home}/languages/nix.nix (100%) rename {home => old/home}/languages/php.nix (100%) rename {home => old/home}/profile/default.nix (100%) rename {home => old/home}/profile/xdg.nix (100%) rename {home => old/home}/programs/amfora.nix (100%) rename {home => old/home}/programs/bat.nix (100%) rename {home => old/home}/programs/btop.nix (100%) rename {home => old/home}/programs/cava.nix (100%) rename {home => old/home}/programs/cheat.nix (100%) rename {home => old/home}/programs/curl.nix (100%) rename {home => old/home}/programs/default.nix (100%) rename {home => old/home}/programs/eza.nix (100%) rename {home => old/home}/programs/figlet.nix (100%) rename {home => old/home}/programs/fish.nix (100%) rename {home => old/home}/programs/fzf.nix (100%) rename {home => old/home}/programs/gh.nix (100%) rename {home => old/home}/programs/git.nix (100%) rename {home => old/home}/programs/glow.nix (100%) rename {home => old/home}/programs/gpg.nix (100%) rename {home => old/home}/programs/hyfetch.nix (100%) rename {home => old/home}/programs/just.nix (100%) rename {home => old/home}/programs/lazygit.nix (100%) rename {home => old/home}/programs/less.nix (100%) rename {home => old/home}/programs/man.nix (100%) rename {home => old/home}/programs/ncmpcpp.nix (100%) rename {home => old/home}/programs/neofetch.nix (100%) rename {home => old/home}/programs/rbw.nix (100%) rename {home => old/home}/programs/ripgrep.nix (100%) rename {home => old/home}/programs/ssh.nix (100%) rename {home => old/home}/programs/starship.nix (100%) rename {home => old/home}/programs/tmux.nix (100%) rename {home => old/home}/programs/topgrade.nix (100%) rename {home => old/home}/programs/wezterm.nix (100%) rename {home => old/home}/programs/wget.nix (100%) rename {home => old/home}/programs/zathura.nix (100%) rename {home => old/home}/programs/zoxide.nix (100%) rename {home => old/home}/services/clipboard.nix (100%) rename {home => old/home}/services/default.nix (100%) rename {home => old/home}/services/dunst.nix (100%) rename {home => old/home}/services/syncthing.nix (100%) rename {home => old/home}/xorg/default.nix (100%) rename {home => old/home}/xorg/xsession.nix (100%) rename {modules => old/modules}/home/iconTheme.nix (100%) rename {modules => old/modules}/home/me.nix (100%) rename {modules => old/modules}/home/shellAbbrs.nix (100%) rename {shells => old/shells}/base.nix (100%) rename {shells => old/shells}/nix.nix (100%) diff --git a/flake.nix b/flake.nix index 065242d..cfa3372 100644 --- a/flake.nix +++ b/flake.nix @@ -2,6 +2,18 @@ description = "marleyOS"; outputs = + inputs: + inputs.snowfall-lib.mkFlake { + inherit inputs; + src = ./.; + + snowfall = { + namespace = "marleyos"; + title = "marleyOS"; + }; + }; + + old = { self, ... }@inputs: inputs.flake-parts.lib.mkFlake { inherit inputs; } { debug = true; @@ -64,11 +76,13 @@ }; inputs = { - flake-parts.url = "github:hercules-ci/flake-parts"; - nixos-unified.url = "github:srid/nixos-unified"; - nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable"; + snowfall-lib = { + url = "github:snowfallorg/lib"; + inputs.nixpkgs.follows = "nixpkgs"; + }; + home-manager = { url = "github:nix-community/home-manager"; inputs.nixpkgs.follows = "nixpkgs"; diff --git a/homes/x86_64-linux/marley@nyx/default.nix b/homes/x86_64-linux/marley@nyx/default.nix new file mode 100644 index 0000000..40a51d2 --- /dev/null +++ b/homes/x86_64-linux/marley@nyx/default.nix @@ -0,0 +1,4 @@ +{ ... }: +{ + home.stateVersion = "24.05"; +} diff --git a/lib/module/default.nix b/lib/module/default.nix new file mode 100644 index 0000000..15a46ec --- /dev/null +++ b/lib/module/default.nix @@ -0,0 +1,51 @@ +{ lib, ... }: +with lib; +rec { + ## Create a NixOS module option. + ## + ## ```nix + ## lib.mkOpt nixpkgs.lib.types.str "My default" "Description of my option." + ## ``` + ## + #@ Type -> Any -> String + mkOpt = + type: default: description: + mkOption { + inherit + type + default + description + ; + }; + + ## Create a boolean NixOS module option. + ## + ## ```nix + ## lib.mkBoolOpt true "Description of my option." + ## ``` + ## + #@ Type -> Any -> String + mkBoolOpt = mkOpt types.bool; + + enabled = { + ## Quickly enable an option. + ## + ## ```nix + ## services.nginx = enabled; + ## ``` + ## + #@ true + enable = true; + }; + + disabled = { + ## Quickly disable an option. + ## + ## ```nix + ## services.nginx = enabled; + ## ``` + ## + #@ false + enable = false; + }; +} diff --git a/modules/home/me/default.nix b/modules/home/me/default.nix new file mode 100644 index 0000000..5e946b8 --- /dev/null +++ b/modules/home/me/default.nix @@ -0,0 +1,4 @@ +{ namespace, lib, ... }: +{ + +} diff --git a/derivations/figlet-with-fonts.nix b/old/derivations/figlet-with-fonts.nix similarity index 100% rename from derivations/figlet-with-fonts.nix rename to old/derivations/figlet-with-fonts.nix diff --git a/home/appearance/default.nix b/old/home/appearance/default.nix similarity index 100% rename from home/appearance/default.nix rename to old/home/appearance/default.nix diff --git a/home/appearance/gtk.nix b/old/home/appearance/gtk.nix similarity index 100% rename from home/appearance/gtk.nix rename to old/home/appearance/gtk.nix diff --git a/home/appearance/qt.nix b/old/home/appearance/qt.nix similarity index 100% rename from home/appearance/qt.nix rename to old/home/appearance/qt.nix diff --git a/home/default.nix b/old/home/default.nix similarity index 100% rename from home/default.nix rename to old/home/default.nix diff --git a/home/languages/default.nix b/old/home/languages/default.nix similarity index 100% rename from home/languages/default.nix rename to old/home/languages/default.nix diff --git a/home/languages/go.nix b/old/home/languages/go.nix similarity index 100% rename from home/languages/go.nix rename to old/home/languages/go.nix diff --git a/home/languages/javascript.nix b/old/home/languages/javascript.nix similarity index 100% rename from home/languages/javascript.nix rename to old/home/languages/javascript.nix diff --git a/home/languages/nix.nix b/old/home/languages/nix.nix similarity index 100% rename from home/languages/nix.nix rename to old/home/languages/nix.nix diff --git a/home/languages/php.nix b/old/home/languages/php.nix similarity index 100% rename from home/languages/php.nix rename to old/home/languages/php.nix diff --git a/home/profile/default.nix b/old/home/profile/default.nix similarity index 100% rename from home/profile/default.nix rename to old/home/profile/default.nix diff --git a/home/profile/xdg.nix b/old/home/profile/xdg.nix similarity index 100% rename from home/profile/xdg.nix rename to old/home/profile/xdg.nix diff --git a/home/programs/amfora.nix b/old/home/programs/amfora.nix similarity index 100% rename from home/programs/amfora.nix rename to old/home/programs/amfora.nix diff --git a/home/programs/bat.nix b/old/home/programs/bat.nix similarity index 100% rename from home/programs/bat.nix rename to old/home/programs/bat.nix diff --git a/home/programs/btop.nix b/old/home/programs/btop.nix similarity index 100% rename from home/programs/btop.nix rename to old/home/programs/btop.nix diff --git a/home/programs/cava.nix b/old/home/programs/cava.nix similarity index 100% rename from home/programs/cava.nix rename to old/home/programs/cava.nix diff --git a/home/programs/cheat.nix b/old/home/programs/cheat.nix similarity index 100% rename from home/programs/cheat.nix rename to old/home/programs/cheat.nix diff --git a/home/programs/curl.nix b/old/home/programs/curl.nix similarity index 100% rename from home/programs/curl.nix rename to old/home/programs/curl.nix diff --git a/home/programs/default.nix b/old/home/programs/default.nix similarity index 100% rename from home/programs/default.nix rename to old/home/programs/default.nix diff --git a/home/programs/eza.nix b/old/home/programs/eza.nix similarity index 100% rename from home/programs/eza.nix rename to old/home/programs/eza.nix diff --git a/home/programs/figlet.nix b/old/home/programs/figlet.nix similarity index 100% rename from home/programs/figlet.nix rename to old/home/programs/figlet.nix diff --git a/home/programs/fish.nix b/old/home/programs/fish.nix similarity index 100% rename from home/programs/fish.nix rename to old/home/programs/fish.nix diff --git a/home/programs/fzf.nix b/old/home/programs/fzf.nix similarity index 100% rename from home/programs/fzf.nix rename to old/home/programs/fzf.nix diff --git a/home/programs/gh.nix b/old/home/programs/gh.nix similarity index 100% rename from home/programs/gh.nix rename to old/home/programs/gh.nix diff --git a/home/programs/git.nix b/old/home/programs/git.nix similarity index 100% rename from home/programs/git.nix rename to old/home/programs/git.nix diff --git a/home/programs/glow.nix b/old/home/programs/glow.nix similarity index 100% rename from home/programs/glow.nix rename to old/home/programs/glow.nix diff --git a/home/programs/gpg.nix b/old/home/programs/gpg.nix similarity index 100% rename from home/programs/gpg.nix rename to old/home/programs/gpg.nix diff --git a/home/programs/hyfetch.nix b/old/home/programs/hyfetch.nix similarity index 100% rename from home/programs/hyfetch.nix rename to old/home/programs/hyfetch.nix diff --git a/home/programs/just.nix b/old/home/programs/just.nix similarity index 100% rename from home/programs/just.nix rename to old/home/programs/just.nix diff --git a/home/programs/lazygit.nix b/old/home/programs/lazygit.nix similarity index 100% rename from home/programs/lazygit.nix rename to old/home/programs/lazygit.nix diff --git a/home/programs/less.nix b/old/home/programs/less.nix similarity index 100% rename from home/programs/less.nix rename to old/home/programs/less.nix diff --git a/home/programs/man.nix b/old/home/programs/man.nix similarity index 100% rename from home/programs/man.nix rename to old/home/programs/man.nix diff --git a/home/programs/ncmpcpp.nix b/old/home/programs/ncmpcpp.nix similarity index 100% rename from home/programs/ncmpcpp.nix rename to old/home/programs/ncmpcpp.nix diff --git a/home/programs/neofetch.nix b/old/home/programs/neofetch.nix similarity index 100% rename from home/programs/neofetch.nix rename to old/home/programs/neofetch.nix diff --git a/home/programs/rbw.nix b/old/home/programs/rbw.nix similarity index 100% rename from home/programs/rbw.nix rename to old/home/programs/rbw.nix diff --git a/home/programs/ripgrep.nix b/old/home/programs/ripgrep.nix similarity index 100% rename from home/programs/ripgrep.nix rename to old/home/programs/ripgrep.nix diff --git a/home/programs/ssh.nix b/old/home/programs/ssh.nix similarity index 100% rename from home/programs/ssh.nix rename to old/home/programs/ssh.nix diff --git a/home/programs/starship.nix b/old/home/programs/starship.nix similarity index 100% rename from home/programs/starship.nix rename to old/home/programs/starship.nix diff --git a/home/programs/tmux.nix b/old/home/programs/tmux.nix similarity index 100% rename from home/programs/tmux.nix rename to old/home/programs/tmux.nix diff --git a/home/programs/topgrade.nix b/old/home/programs/topgrade.nix similarity index 100% rename from home/programs/topgrade.nix rename to old/home/programs/topgrade.nix diff --git a/home/programs/wezterm.nix b/old/home/programs/wezterm.nix similarity index 100% rename from home/programs/wezterm.nix rename to old/home/programs/wezterm.nix diff --git a/home/programs/wget.nix b/old/home/programs/wget.nix similarity index 100% rename from home/programs/wget.nix rename to old/home/programs/wget.nix diff --git a/home/programs/zathura.nix b/old/home/programs/zathura.nix similarity index 100% rename from home/programs/zathura.nix rename to old/home/programs/zathura.nix diff --git a/home/programs/zoxide.nix b/old/home/programs/zoxide.nix similarity index 100% rename from home/programs/zoxide.nix rename to old/home/programs/zoxide.nix diff --git a/home/services/clipboard.nix b/old/home/services/clipboard.nix similarity index 100% rename from home/services/clipboard.nix rename to old/home/services/clipboard.nix diff --git a/home/services/default.nix b/old/home/services/default.nix similarity index 100% rename from home/services/default.nix rename to old/home/services/default.nix diff --git a/home/services/dunst.nix b/old/home/services/dunst.nix similarity index 100% rename from home/services/dunst.nix rename to old/home/services/dunst.nix diff --git a/home/services/syncthing.nix b/old/home/services/syncthing.nix similarity index 100% rename from home/services/syncthing.nix rename to old/home/services/syncthing.nix diff --git a/home/xorg/default.nix b/old/home/xorg/default.nix similarity index 100% rename from home/xorg/default.nix rename to old/home/xorg/default.nix diff --git a/home/xorg/xsession.nix b/old/home/xorg/xsession.nix similarity index 100% rename from home/xorg/xsession.nix rename to old/home/xorg/xsession.nix diff --git a/modules/home/iconTheme.nix b/old/modules/home/iconTheme.nix similarity index 100% rename from modules/home/iconTheme.nix rename to old/modules/home/iconTheme.nix diff --git a/modules/home/me.nix b/old/modules/home/me.nix similarity index 100% rename from modules/home/me.nix rename to old/modules/home/me.nix diff --git a/modules/home/shellAbbrs.nix b/old/modules/home/shellAbbrs.nix similarity index 100% rename from modules/home/shellAbbrs.nix rename to old/modules/home/shellAbbrs.nix diff --git a/shells/base.nix b/old/shells/base.nix similarity index 100% rename from shells/base.nix rename to old/shells/base.nix diff --git a/shells/nix.nix b/old/shells/nix.nix similarity index 100% rename from shells/nix.nix rename to old/shells/nix.nix