diff --git a/README.org b/README.org index 8294108..bdadb24 100644 --- a/README.org +++ b/README.org @@ -14,5 +14,5 @@ ** for OPPO-A79 #+begin_src shell nix flake update --flake ~/ghq/github.com/takeokunn/nixos-configuration - nix flake . + nix run "~/ghq/github.com/takeokunn/nixos-configuration#OPL2212-2#OPPO-A79" #+end_src diff --git a/flake.lock b/flake.lock index b8c2ef6..d5fed25 100644 --- a/flake.lock +++ b/flake.lock @@ -7,11 +7,11 @@ "nixpkgs-stable": "nixpkgs-stable" }, "locked": { - "lastModified": 1716688460, - "narHash": "sha256-+h4E6JtuYPq1pirpseqn0sYU8/5Lh5UuQaBAH78xDYQ=", + "lastModified": 1716714348, + "narHash": "sha256-BKe2l6j185w6NCD5o2WbT3v6Ul8CYIUGlmI04MbS6QE=", "owner": "nix-community", "repo": "emacs-overlay", - "rev": "07be0e35817635c528bb07b2ae366bd87571ddd0", + "rev": "929e09706815a9e10cc749393eaa5895761de32a", "type": "github" }, "original": { @@ -45,11 +45,11 @@ ] }, "locked": { - "lastModified": 1716679503, - "narHash": "sha256-aX8AEWHLwuiYX8OCpTnHGrQeei1Gb+AGbk1hq+RIClg=", + "lastModified": 1716711219, + "narHash": "sha256-TnZETiQPXbyT5mdCHMOyrJnx2+BwroMBRrguciz1vEo=", "owner": "nix-community", "repo": "home-manager", - "rev": "e4611630c3cc8ed618b48d92f6291f65be9f7913", + "rev": "05e6ba83eb3585ce0aff7b41e4bd0e317d05ad4a", "type": "github" }, "original": { @@ -151,11 +151,11 @@ }, "nixos-hardware": { "locked": { - "lastModified": 1716173274, - "narHash": "sha256-FC21Bn4m6ctajMjiUof30awPBH/7WjD0M5yqrWepZbY=", + "lastModified": 1716715385, + "narHash": "sha256-fe6Z33pbfqu4TI5ijmcaNc5vRBs633tyxJ12HTghy3w=", "owner": "NixOS", "repo": "nixos-hardware", - "rev": "d9e0b26202fd500cf3e79f73653cce7f7d541191", + "rev": "2e7d6c568063c83355fe066b8a8917ee758de1b8", "type": "github" }, "original": { diff --git a/home-manager/default.nix b/home-manager/default.nix index c61a27a..2bd241f 100644 --- a/home-manager/default.nix +++ b/home-manager/default.nix @@ -6,11 +6,13 @@ let config.allowUnfree = true; overlays = import ./overlay.nix { inherit emacs-overlay; }; }; - basePkgs = import ./packages/base.nix { inherit pkgs; }; - darwinPkgs = import ./packages/darwin.nix { inherit pkgs; }; - nixosPkgs = import ./packages/nixos.nix { inherit pkgs; }; + basicPkgs = import ./packages/basic.nix { inherit pkgs; }; + utilsPkgs = import ./packages/utils.nix { inherit pkgs; }; + darwinPkgs = import ./packages/darwin { inherit pkgs; }; + nixosPkgs = import ./packages/nixos { inherit pkgs; }; in { home.stateVersion = "23.11"; - home.packages = basePkgs ++ lib.optionals pkgs.stdenv.isDarwin darwinPkgs - ++ lib.optionals pkgs.stdenv.isLinux nixosPkgs; + home.packages = basicPkgs + ++ lib.optionals pkgs.stdenv.isDarwin lib.mkMerge [utilsPkgs darwinPkgs] + ++ lib.optionals pkgs.stdenv.isLinux lib.mkMerge [ utilsPkgs nixosPkgs] } diff --git a/home-manager/packages/base.nix b/home-manager/packages/basic.nix similarity index 56% rename from home-manager/packages/base.nix rename to home-manager/packages/basic.nix index 8ac4e8c..149977e 100644 --- a/home-manager/packages/base.nix +++ b/home-manager/packages/basic.nix @@ -1,9 +1,5 @@ { pkgs }: -let - # ecspresso = pkgs.callPackage ../nixpkgs/ecspresso { }; - # isucrud = pkgs.callPackage ../nixpkgs/isucrud { }; - # mitamae = pkgs.callPackage ../pkgs/mitamae { }; - tmux-sixel = pkgs.callPackage ../nixpkgs/tmux-sixel { }; +let tmux-sixel = pkgs.callPackage ../nixpkgs/tmux-sixel { }; in with pkgs; [ # for language specific gopls @@ -62,55 +58,14 @@ in with pkgs; [ unixtools.watch wget yq - # for util tools - awscli - # ecspresso - ffmpeg - gibo - graphviz - iftop - imagemagick - # isucrud - # mitamae - ncurses - neofetch - offlineimap - speedtest-cli - tcpdump # for pass pwgen (pass.withExtensions (extensions: with extensions; [ pass-otp ])) # for editor - cmigemo - editorconfig-core-c - nano neovim - tree-sitter - (tree-sitter.withPlugins (p: builtins.attrValues p)) # for shell fish - zx - - # for DB - redis - mysql - sqlite - sqldef - - # for jokes - asciiquarium - cmatrix - sl - silicon - genact - - # for ai - ollama - - # for emacs - mu - emacsPackages.mu4e ] diff --git a/home-manager/packages/darwin.nix b/home-manager/packages/darwin/default.nix similarity index 100% rename from home-manager/packages/darwin.nix rename to home-manager/packages/darwin/default.nix diff --git a/home-manager/packages/nixos.nix b/home-manager/packages/nixos/default.nix similarity index 100% rename from home-manager/packages/nixos.nix rename to home-manager/packages/nixos/default.nix diff --git a/home-manager/packages/utils.nix b/home-manager/packages/utils.nix new file mode 100644 index 0000000..e1a8165 --- /dev/null +++ b/home-manager/packages/utils.nix @@ -0,0 +1,52 @@ +{ pkgs }: +let + ecspresso = pkgs.callPackage ../nixpkgs/ecspresso { }; + isucrud = pkgs.callPackage ../nixpkgs/isucrud { }; + mitamae = pkgs.callPackage ../pkgs/mitamae { }; +in with pkgs; [ + # for util tools + awscli + ecspresso + ffmpeg + gibo + graphviz + iftop + imagemagick + isucrud + mitamae + ncurses + neofetch + offlineimap + speedtest-cli + tcpdump + + # for editor + cmigemo + editorconfig-core-c + nano + tree-sitter + (tree-sitter.withPlugins (p: builtins.attrValues p)) + + # for shell + zx + + # for DB + redis + mysql + sqlite + sqldef + + # for jokes + asciiquarium + cmatrix + sl + silicon + genact + + # for ai + ollama + + # for emacs + mu + emacsPackages.mu4e +] diff --git a/systems/OPPO-A79/default.nix b/systems/OPPO-A79/default.nix index 9260bb9..3e73376 100644 --- a/systems/OPPO-A79/default.nix +++ b/systems/OPPO-A79/default.nix @@ -1,5 +1,10 @@ { self, nixpkgs, home-manager, emacs-overlay, nix-on-droid }: { OPPO-A79 = nix-on-droid.lib.nixOnDroidConfiguration { modules = [ ./nix-on-droid.nix ]; + + # home-manager.config = { pkgs }: + # { + + # }; }; } diff --git a/systems/OPPO-A79/nix-on-droid.nix b/systems/OPPO-A79/nix-on-droid.nix index f4899e3..9236abe 100644 --- a/systems/OPPO-A79/nix-on-droid.nix +++ b/systems/OPPO-A79/nix-on-droid.nix @@ -1,41 +1,16 @@ { config, lib, pkgs }: { - # Simply install just the packages - environment.packages = with pkgs; - [ - # User-facing stuff that you really really want to have - vim # or some other editor, e.g. nano or neovim - - # Some common stuff that people expect to have - #procps - #killall - #diffutils - #findutils - #utillinux - #tzdata - #hostname - #man - #gnugrep - #gnupg - #gnused - #gnutar - #bzip2 - #gzip - #xz - #zip - #unzip - ]; - - # Backup etc files instead of failing to activate generation if a file already exists in /etc environment.etcBackupExtension = ".bak"; - - # Read the changelog before changing this value system.stateVersion = "23.11"; - # Set up nix for flakes nix.extraOptions = '' experimental-features = nix-command flakes ''; - # Set your time zone - #time.timeZone = "Europe/Berlin"; + time.timeZone = "Asia/Tokyo"; + + # home-manager = { + # config = ../../home-manager; + # backupFileExtension = "hm-bak"; + # useGlobalPkgs = true; + # }; }