dwarfmaster / arkenfox-nixos

Utilities to use arkenfox/user.js in NixOS
MIT License
67 stars 11 forks source link

How do I use the module? #38

Closed 0x4d6165 closed 1 year ago

0x4d6165 commented 1 year ago

I'm probably making a silly error but I'm not sure how to use the module? I add it to my flake and I still get a

error: The option home-manager.users.maedayscout.programs.firefox.arkenfox does not exist. Definition values:
       - In /nix/store/n97rpbbqjprlyqwcwa09gl88isgbvmz2-source/flake.nix:
           {
             enable = true;
             version = "103.0";
           }

Here's my flake

{
 inputs = {
    home-manager.url = "github:nix-community/home-manager";
    home-manager.inputs.nixpkgs.follows = "nixpkgs";
    arkenfox.url = "git+https://github.com/dwarfmaster/arkenfox-nixos?ref=main";
    arkenfox.inputs.nixpkgs.follows = "nixpkgs";
  };
  outputs = { self, nixpkgs, home-manager, arkenfox, ... }: {
    nixosConfigurations."0x4d6165-x360-nixos" = nixpkgs.lib.nixosSystem {
      system = "x86_64-linux";
      modules = [ ./configuration.nix
        home-manager.nixosModules.home-manager
          {
            home-manager.useGlobalPkgs = true;
            home-manager.useUserPackages = true;
            home-manager.users.maedayscout = {nixpkgs, ...}: {
            services.gammastep = {
                enable = true;
                provider = "geoclue2";
            };

            services.mpd = {
                enable = true;
                musicDirectory = "/home/maedayscout/Music/";
                extraConfig = ''
                # must specify one or more outputs in order to play audio!
                # (e.g. ALSA, PulseAudio, PipeWire), see next sections
            audio_output {
                type "alsa"
                name "My ALSA"
                mixer_type      "hardware"
                mixer_device    "default"
                mixer_control   "PCM"
                }
                '';
                # Optional:
            };
            services.mpd-discord-rpc.enable = true;
            services.mpdris2 = {
                enable = true;
                notifications = true;
                multimediaKeys = true;
            };

            programs.direnv.enable = true;
            programs.direnv.nix-direnv.enable = true;
            programs.direnv.enableZshIntegration = true;

            programs.starship = {
                enable = true;
                enableZshIntegration = true;
            };
            programs.zoxide = {
                enable = true;
                enableZshIntegration = true;
            };
            programs.git = {
                enable = true;
                userName = "Mae Miller";
                userEmail = "maeborow@posteo.net";
                signing.key = "317F7B2642173F9C";
                signing.signByDefault = true;
                package = nixpkgs.gitFull;
            };
            services.swayidle = {
                enable = true;
                timeouts = [
                {
                    timeout = 1800;
                    command = "${nixpkgs.swaylock}/bin/swaylock";
                }
                {
                    timeout = 1800;
                    command = "${nixpkgs.sway}/bin/swaymsg 'output * dpms off'";
                    resumeCommand = "${nixpkgs.sway}/bin/swaymsg 'output * dpms on'";
                }
                {
                    timeout = 2005;
                    command = "systemctl suspend";
                }
                ];
                events = [
                {
                    event = "before-sleep";
                    command = "${nixpkgs.swaylock}/bin/swaylock";
                }
                ];
            };
            home.packages = [
                (nixpkgs.rofi-wayland.override {"plugins" = [nixpkgs.rofi-calc nixpkgs.rofi-emoji];})
                nixpkgs.dconf
            ];
            programs.zsh = {
                enable = true;
                shellAliases = {
                cp = "cp -i";
                mv = "mv -i";
                };
                initExtra = "
                    set -o noclobber

                    export TERM=xterm-256color
                    fpath+=~/.zfunc
                    # Lines configured by zsh-newuser-install
                    HISTFILE=~/.histfile
                    HISTSIZE=1000
                    SAVEHIST=1000
                    setopt autocd extendedglob notify
                    unsetopt beep
                    export EDITOR=vim
                    bindkey -e

                    export MOZ_ENABLE_WAYLAND=1
                    export QT_STYLE_OVERRIDE='kvantum'
                    export GTK_THEME=Catppuccin-Macchiato-Standard-Mauve-Dark
                    export _JAVA_AWT_WM_NONREPARENTING=1

                    autoload -Uz compinit
                    compinit

                    ### Added by Zinit's installer
                    export HISTORY_SUBSTRING_SEARCH_FUZZY='y'

                    source ${nixpkgs.zinit}/share/zinit/zinit.zsh   
                    zinit load zsh-users/zsh-syntax-highlighting
                    zinit load zsh-users/zsh-autosuggestions
                    zinit load zsh-users/zsh-history-substring-search
                    zinit load johannchangpro/zsh-interactive-cd

                    bindkey \"$terminfo[kcuu1]\" history-substring-search-up
                    bindkey \"$terminfo[kcud1]\" history-substring-search-down
                    bindkey  \"^[[H\"   beginning-of-line
                    bindkey  \"^[[F\"   end-of-line
                    bindkey  \"^[[3~\"  delete-char
                    export GOPATH=~/go

                    if [[ -o interactive ]] then
                    PF_INFO='ascii title os host kernel uptime memory wm'  ~/.misc/pfetch/pfetch 
                    fi

                    fpath+=~/.zfunc
                ";
            };
            programs.fish = {
                enable = true;
                shellInit = "
                set -Ux EDITOR 'vim'

                set -Ux MOZ_ENABLE_WAYLAND 1
                set -Ux QT_STYLE_OVERRIDE 'kvantum'
                set -Ux GTK_THEME 'Catppuccin-Macchiato-Standard-Mauve-Dark'
                set -Ux _JAVA_AWT_WM_NONREPARENTING '1'

                set -Ux PYTHON_KEYRING_BACKEND 'keyring.backends.null.Keyring'

                alias cp 'cp -i'
                alias mv 'mv -i'

                if status is-interactive
                    # Commands to run in interactive sessions can go here
                    ~/.local/bin/afetch
                end

                starship init fish | source
                zoxide init fish | source
                direnv hook fish | source
                ";
            };
            gtk = {
                enable = true;
                theme = {
                name = "Catppuccin-Macchiato-Compact-Pink-dark";
                package = nixpkgs.catppuccin-gtk.override {
                    accents = ["mauve"];
                    variant = "macchiato";
                };
                };
                iconTheme = {
                name = "Papirus-Dark";
                package = nixpkgs.papirus-icon-theme;
                };
                cursorTheme = {
                name = "Catppuccin-Macchiato-Mauve-Cursors";
                package = nixpkgs.catppuccin-cursors.macchiatoMauve;
                };
                gtk3.extraConfig = {
                Settings = ''
                    gtk-application-prefer-dark-theme=1
                '';
                };

            gtk4.extraConfig = {
                Settings = ''
                    gtk-application-prefer-dark-theme=1
                '';
                };
            };
            programs.firefox = {
            enable = true;
            package = nixpkgs.firefox-devedition-bin;
            arkenfox = {
                enable = true;
                version = "103.0";
            };
            profiles.Default.arkenfox = {
                enable = true;
                "0000".enable = true;
                "0001" = {
                enable = true;
                "0101"."browser.shell.checkDefaultBrowser".value = true;
                };
                "0002" = {
                enable = true;
                "0204"."browser.search.region".enable = true;
                };
            };
            };

            home.stateVersion = "23.05";
            };
          }
        ];
    };
  };
}
dwarfmaster commented 1 year ago

You need to import the home manager module into your config at some point. One way to do it is to add imports = [ arkenfox.hmModules.default ]; in your home-manager config.

0x4d6165 commented 1 year ago

Oh I see! Thank you that worked