diff --git a/dummy/flake.nix b/dummy/flake.nix new file mode 100644 index 0000000..b047a08 --- /dev/null +++ b/dummy/flake.nix @@ -0,0 +1,69 @@ +{ + description = "Dummy Stormd Service"; + + inputs = { + nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable"; + }; + + outputs = + { self, nixpkgs }: + let + systems = nixpkgs.lib.systems.flakeExposed; + forAllSystems = nixpkgs.lib.genAttrs systems; + in + { + packages = forAllSystems (system: { + stormd = nixpkgs.legacyPackages.${system}.writeScriptBin "stormd" '' + #!${nixpkgs.legacyPackages.${system}.bash}/bin/bash + echo "This is a dummy stormd implementation" + exit 0 + ''; + default = self.packages.${system}.stormd; + }); + + apps = forAllSystems (system: { + stormd = { + type = "app"; + program = "${self.packages.${system}.stormd}/bin/stormd"; + }; + default = self.apps.${system}.stormd; + }); + + overlays = forAllSystems (system: [ (final: prev: { stormd = self.packages.${system}.stormd; }) ]); + + devShells = forAllSystems (system: { + default = nixpkgs.legacyPackages.${system}.mkShell { + packages = [ self.packages.${system}.stormd ]; + }; + }); + + nixosModules = forAllSystems ( + system: + { config, lib, ... }: + { + options = { + services.stormd = { + enable = lib.mkEnableOption "Enable the Stormd service."; + extraOptions = lib.mkOption { + type = lib.types.listOf lib.types.str; + default = [ ]; + description = "Extra options to pass to stormd daemon."; + }; + rootUser = lib.mkOption { + type = lib.types.str; + default = "root"; + description = "Root user name that will have stormd available."; + }; + nebulaPackage = lib.mkOption { + type = lib.types.package; + default = self.packages.${system}.stormd; + description = "The nebula package to use."; + }; + }; + }; + + config = lib.mkIf config.services.stormd.enable { }; + } + ); + }; +} diff --git a/flake.nix b/flake.nix index 8eeab5e..c15e520 100644 --- a/flake.nix +++ b/flake.nix @@ -3,31 +3,31 @@ inputs = { # Host flake pinning - lio_nixpkgs.url = "github:nixos/nixpkgs/nixos-24.05"; + lio_nixpkgs.url = "github:nixos/nixpkgs/nixos-24.11"; lio_home-manager = { - url = "github:nix-community/home-manager/release-24.05"; + url = "github:nix-community/home-manager/release-24.11"; inputs.nixpkgs.follows = "lio_nixpkgs"; }; - joe_nixpkgs.url = "github:nixos/nixpkgs/nixos-24.05"; + joe_nixpkgs.url = "github:nixos/nixpkgs/nixos-24.11"; joe_home-manager = { - url = "github:nix-community/home-manager/release-24.05"; + url = "github:nix-community/home-manager/release-24.11"; inputs.nixpkgs.follows = "joe_nixpkgs"; }; - h002_nixpkgs.url = "github:nixos/nixpkgs/nixos-24.05"; + h002_nixpkgs.url = "github:nixos/nixpkgs/nixos-24.11"; h002_home-manager = { - url = "github:nix-community/home-manager/release-24.05"; + url = "github:nix-community/home-manager/release-24.11"; inputs.nixpkgs.follows = "h002_nixpkgs"; }; - gpdPocket3_nixpkgs.url = "github:nixos/nixpkgs/nixos-24.05"; + gpdPocket3_nixpkgs.url = "github:nixos/nixpkgs/nixos-24.11"; gpdPocket3_home-manager = { - url = "github:nix-community/home-manager/release-24.05"; + url = "github:nix-community/home-manager/release-24.11"; inputs.nixpkgs.follows = "gpdPocket3_nixpkgs"; }; - nixpkgs_stable.url = "github:nixos/nixpkgs/nixos-24.05"; + nixpkgs_stable.url = "github:nixos/nixpkgs/nixos-24.11"; # Nix utility methods nypkgs = { url = "github:yunfachi/nypkgs"; @@ -43,7 +43,13 @@ url = "git+https://git.joshuabell.xyz/nvim"; }; ringofstorms-stormd = { + # Initial non git access run + # url = "./dummy"; + # inputs.nixpkgs.follows = "nixpkgs_stable"; + + # Normal access url = "git+ssh://git.joshuabell.xyz:3032/stormd"; + # Local path usage for testing changes locally # url = "path:/home/josh/projects/stormd"; }; @@ -164,9 +170,7 @@ path = lib.fileset.maybeMissing ./modules; recursive = true; } - ++ [ - ./hosts/configuration.nix - ]; + ++ [ ./hosts/configuration.nix ]; specialArgs = inputs // { inherit ylib; settings = diff --git a/hosts/h002/configuration.nix b/hosts/h002/configuration.nix index 1492021..109f289 100644 --- a/hosts/h002/configuration.nix +++ b/hosts/h002/configuration.nix @@ -12,14 +12,14 @@ # My custom modules mods = { - boot_grub = true; + boot_grub.enable = true; shell_common.enable = true; de_gnome_xorg.enable = true; - audio_pulse.enable = true; + audio.enable = true; neovim.enable = true; tty_caps_esc.enable = true; docker.enable = true; - # stormd.enable = true; + stormd.enable = true; nebula.enable = true; ssh.enable = true; }; diff --git a/hosts/lio/configuration.nix b/hosts/lio/configuration.nix index 30f0742..f9fc25a 100644 --- a/hosts/lio/configuration.nix +++ b/hosts/lio/configuration.nix @@ -14,7 +14,7 @@ boot_systemd.enable = true; shell_common.enable = true; # de_cosmic.enable = true; - audio_pulse.enable = true; + audio.enable = true; de_gnome_xorg.enable = true; # de_gnome_wayland.enable = true; neovim.enable = true; @@ -25,6 +25,7 @@ stormd.enable = true; nebula.enable = true; rustdesk.enable = true; + saber.enable = true; }; # opening this port for dev purposes diff --git a/modules/audio_pulse.nix b/modules/audio_pulse.nix index d4503fe..079d102 100644 --- a/modules/audio_pulse.nix +++ b/modules/audio_pulse.nix @@ -6,7 +6,7 @@ }: with lib; let - name = "audio_pulse"; + name = "audio"; cfg = config.mods.${name}; in { @@ -18,8 +18,22 @@ in config = mkIf cfg.enable { # Enable sound. - hardware.pulseaudio.enable = true; - hardware.pulseaudio.package = pkgs.pulseaudioFull; - environment.systemPackages = [ pkgs.pavucontrol ]; + # sound.enable = true; + # services.pipewire.pulse.enable = false; + # services.pipewire.enable = false; + # services.pipewire.audio.enable =false; + # hardware.pulseaudio.enable = true; + # hardware.pulseaudio.package = pkgs.pulseaudioFull; + # environment.systemPackages = [ pkgs.pavucontrol ]; + + security.rtkit.enable = true; + services.pipewire = { + enable = true; + alsa.enable = true; + alsa.support32Bit = true; + pulse.enable = true; + # If you want to use JACK applications, uncomment this + #jack.enable = true; + }; }; } diff --git a/modules/boot/grub.nix b/modules/boot/grub.nix index ca7a929..46f5e5e 100644 --- a/modules/boot/grub.nix +++ b/modules/boot/grub.nix @@ -12,7 +12,7 @@ in options = { mods.${name} = { enable = mkEnableOption (lib.mdDoc "Enable ${name}"); - device = mkDefaultOption { + device = mkOption { type = types.str; default = "/dev/sda"; description = '' diff --git a/modules/de/gnome_wayland.nix b/modules/de/gnome_wayland.nix index c20d354..d012be7 100644 --- a/modules/de/gnome_wayland.nix +++ b/modules/de/gnome_wayland.nix @@ -28,7 +28,7 @@ in }; services.gnome.core-utilities.enable = false; environment.systemPackages = with pkgs; [ - gnome.dconf-editor + dconf-editor # wayland clipboard in terminal wl-clipboard ]; diff --git a/modules/de/gnome_xorg.nix b/modules/de/gnome_xorg.nix index 6162c3a..b6e64e9 100644 --- a/modules/de/gnome_xorg.nix +++ b/modules/de/gnome_xorg.nix @@ -28,7 +28,7 @@ in }; services.gnome.core-utilities.enable = false; environment.systemPackages = with pkgs; [ - gnome.dconf-editor + dconf-editor xclip ]; }; diff --git a/modules/saber.nix b/modules/saber.nix new file mode 100644 index 0000000..adc2218 --- /dev/null +++ b/modules/saber.nix @@ -0,0 +1,26 @@ +{ + config, + lib, + pkgs, + settings, + ... +}: +with lib; +let + name = "saber"; + cfg = config.mods.${name}; +in +{ + options = { + mods.${name} = { + enable = mkEnableOption (lib.mdDoc "Enable ${name}"); + }; + }; + + config = mkIf cfg.enable { + environment.systemPackages = with pkgs; [ + saber + ]; + }; +} + diff --git a/modules/shell/common.nix b/modules/shell/common.nix index e2b90df..2a52b19 100644 --- a/modules/shell/common.nix +++ b/modules/shell/common.nix @@ -79,6 +79,7 @@ in diff = "git diff"; branches = "git branch -a"; gcam = "git commit -a -m"; + gcm = "git commit -m"; stashes = "git stash list"; # ripgrep diff --git a/modules/validations.nix b/modules/validations.nix index 548ee4d..5b5a991 100644 --- a/modules/validations.nix +++ b/modules/validations.nix @@ -19,10 +19,11 @@ ''; } { - assertion = !(config.mods.de_cosmic.enable && config.mods.audio_pulse.enable); + # // TODO check sinc epoulse is no longer + assertion = !(config.mods.de_cosmic.enable && config.mods.audio.enable); message = '' - Configuration Error: cannot use pulse audio with cosmic. - Remove: mods.audio_pulse.enable + Configuration Error: cannot use audio with cosmic. Check if this is true anymore... + Remove: mods.audio.enable ''; } ]; diff --git a/users/_common/components/home_manager/tmux/tmux-reset.conf b/users/_common/components/home_manager/tmux/tmux-reset.conf index e76043b..514597c 100644 --- a/users/_common/components/home_manager/tmux/tmux-reset.conf +++ b/users/_common/components/home_manager/tmux/tmux-reset.conf @@ -6,20 +6,20 @@ bind C-Space send-prefix # bind -r p previous-window # bind -r n next-window bind -r & kill-window -bind -r c new-window -c "#{pane_current_path}" +bind c new-window -c "#{pane_current_path}" bind ',' command-prompt "rename-window %%" bind "\|" split-window -h -c "#{pane_current_path}" bind "\\" split-window -v -c "#{pane_current_path}" bind w choose-tree -Zw -bind -r 1 select-window -t:1 -bind -r 2 select-window -t:2 -bind -r 3 select-window -t:3 -bind -r 4 select-window -t:4 -bind -r 5 select-window -t:5 -bind -r 6 select-window -t:6 -bind -r 7 select-window -t:7 -bind -r 8 select-window -t:8 -bind -r 9 select-window -t:9 +bind 1 select-window -t:1 +bind 2 select-window -t:2 +bind 3 select-window -t:3 +bind 4 select-window -t:4 +bind 5 select-window -t:5 +bind 6 select-window -t:6 +bind 7 select-window -t:7 +bind 8 select-window -t:8 +bind 9 select-window -t:9 # custom bind m command-prompt -p "Swap with window index:" "swap-window -t '%%'" bind -r [ swap-window -t -1 \; previous-window @@ -32,7 +32,7 @@ bind -r left select-pane -L bind -r down select-pane -D bind -r up select-pane -U bind -r right select-pane -R -bind -r x kill-pane +bind x kill-pane bind -r space resize-pane -Z bind S select-layout tiled bind -r h select-pane -L diff --git a/users/josh/home_manager/de/gnome.nix b/users/josh/home_manager/de/gnome.nix index 0d0907b..35c5f20 100644 --- a/users/josh/home_manager/de/gnome.nix +++ b/users/josh/home_manager/de/gnome.nix @@ -12,7 +12,7 @@ with lib.hm.gvariant; # > `dconf dump / > /tmp/dconf_dump_start && watch -n0.5 "dconf dump / > /tmp/dconf_dump_current && diff --color /tmp/dconf_dump_start /tmp/dconf_dump_current -U12"` # OR (Must be logged into user directly, no SU to user will work): `dconf watch /` # OR get the exact converted nixConfig from `dconf dump / | dconf2nix | less` and search with forward slash - # gnome.dconf-editor + # dconf-editor # gnomeExtensions.workspace-switch-wraparound #gnomeExtensions.forge # probably don"t need on this on tiny laptop but may explore this instead of sway for my desktop ];