From d93cdebeb2e1b1070461d7ee014a008b6d60c122 Mon Sep 17 00:00:00 2001 From: takeokunn Date: Mon, 13 May 2024 20:06:01 +0900 Subject: [PATCH] Update --- flake.lock | 41 ++++++++++++----- flake.nix | 7 ++- .../{pkgs => nixpkgs}/ecspresso/default.nix | 0 .../{pkgs => nixpkgs}/isucrud/default.nix | 0 .../{pkgs => nixpkgs}/mitamae/default.nix | 0 .../{pkgs => nixpkgs}/tmux-sixel/default.nix | 0 home-manager/package.nix | 19 ++++---- systems/X13Gen2/configuration.nix | 44 +++++++++---------- systems/X13Gen2/default.nix | 11 ++--- 9 files changed, 70 insertions(+), 52 deletions(-) rename home-manager/{pkgs => nixpkgs}/ecspresso/default.nix (100%) rename home-manager/{pkgs => nixpkgs}/isucrud/default.nix (100%) rename home-manager/{pkgs => nixpkgs}/mitamae/default.nix (100%) rename home-manager/{pkgs => nixpkgs}/tmux-sixel/default.nix (100%) diff --git a/flake.lock b/flake.lock index fd6360f..49c8629 100644 --- a/flake.lock +++ b/flake.lock @@ -7,11 +7,11 @@ "nixpkgs-stable": "nixpkgs-stable" }, "locked": { - "lastModified": 1715392031, - "narHash": "sha256-3uhiVHNP/lfki1w4eKUgpBGyoPbbgYCgwWWgn+LUoIA=", + "lastModified": 1715478778, + "narHash": "sha256-XxQyMAwq+4qPn/Ol1NXG+JtdzmqOEdJVYs1OZmED8c8=", "owner": "nix-community", "repo": "emacs-overlay", - "rev": "62004f5ead76e154c4f19e27a94cd24fb4db59aa", + "rev": "cacd688b09b4ef4ddff5ff12ede2f24ca25119ad", "type": "github" }, "original": { @@ -45,11 +45,11 @@ ] }, "locked": { - "lastModified": 1715380449, - "narHash": "sha256-716+f9Rj3wjSyD1xitCv2FcYbgPz1WIVDj+ZBclH99Y=", + "lastModified": 1715486357, + "narHash": "sha256-4pRuzsHZOW5W4CsXI9uhKtiJeQSUoe1d2M9mWU98HC4=", "owner": "nix-community", "repo": "home-manager", - "rev": "d7682620185f213df384c363288093b486b2883f", + "rev": "44677a1c96810a8e8c4ffaeaad10c842402647c1", "type": "github" }, "original": { @@ -79,6 +79,22 @@ "type": "github" } }, + "nixos-hardware": { + "locked": { + "lastModified": 1715148395, + "narHash": "sha256-lRxjTxY3103LGMjWdVqntKZHhlmMX12QUjeFrQMmGaE=", + "owner": "NixOS", + "repo": "nixos-hardware", + "rev": "a4e2b7909fc1bdf30c30ef21d388fde0b5cdde4a", + "type": "github" + }, + "original": { + "owner": "NixOS", + "ref": "master", + "repo": "nixos-hardware", + "type": "github" + } + }, "nixpkgs": { "locked": { "lastModified": 1715266358, @@ -97,11 +113,11 @@ }, "nixpkgs-stable": { "locked": { - "lastModified": 1715218190, - "narHash": "sha256-R98WOBHkk8wIi103JUVQF3ei3oui4HvoZcz9tYOAwlk=", + "lastModified": 1715395895, + "narHash": "sha256-DreMqi6+qa21ffLQqhMQL2XRUkAGt3N7iVB5FhJKie4=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "9a9960b98418f8c385f52de3b09a63f9c561427a", + "rev": "71bae31b7dbc335528ca7e96f479ec93462323ff", "type": "github" }, "original": { @@ -113,11 +129,11 @@ }, "nixpkgs_2": { "locked": { - "lastModified": 1715316543, - "narHash": "sha256-4XOPcWmyH77Gd+cvVr2Hp7PHAlNAesvsLtHHbqy8xfA=", + "lastModified": 1715413075, + "narHash": "sha256-FCi3R1MeS5bVp0M0xTheveP6hhcCYfW/aghSTPebYL4=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "c669412a552f31c45adad47894e7fd6a8698e53f", + "rev": "e4e7a43a9db7e22613accfeb1005cca1b2b1ee0d", "type": "github" }, "original": { @@ -132,6 +148,7 @@ "emacs-overlay": "emacs-overlay", "home-manager": "home-manager", "nix-darwin": "nix-darwin", + "nixos-hardware": "nixos-hardware", "nixpkgs": "nixpkgs_2" } }, diff --git a/flake.nix b/flake.nix index 97d5fb6..7f3d064 100644 --- a/flake.nix +++ b/flake.nix @@ -12,12 +12,15 @@ url = "github:nix-community/home-manager/master"; inputs.nixpkgs.follows = "nixpkgs"; }; + nixos-hardware.url = "github:NixOS/nixos-hardware/master"; }; - outputs = inputs@{ self, nixpkgs, nix-darwin, home-manager, emacs-overlay }: { + outputs = inputs@{ self, nixpkgs, nix-darwin, home-manager, emacs-overlay, nixos-hardware }: { darwinConfigurations = (import ./systems/OPL2212-2 { inherit self nixpkgs nix-darwin home-manager emacs-overlay; }); - # nixosConfigurations = (import ./systems/) + nixosConfigurations = (import ./systems/X13Gen2 { + inherit self nixpkgs home-manager emacs-overlay nixos-hardware; + }); }; } diff --git a/home-manager/pkgs/ecspresso/default.nix b/home-manager/nixpkgs/ecspresso/default.nix similarity index 100% rename from home-manager/pkgs/ecspresso/default.nix rename to home-manager/nixpkgs/ecspresso/default.nix diff --git a/home-manager/pkgs/isucrud/default.nix b/home-manager/nixpkgs/isucrud/default.nix similarity index 100% rename from home-manager/pkgs/isucrud/default.nix rename to home-manager/nixpkgs/isucrud/default.nix diff --git a/home-manager/pkgs/mitamae/default.nix b/home-manager/nixpkgs/mitamae/default.nix similarity index 100% rename from home-manager/pkgs/mitamae/default.nix rename to home-manager/nixpkgs/mitamae/default.nix diff --git a/home-manager/pkgs/tmux-sixel/default.nix b/home-manager/nixpkgs/tmux-sixel/default.nix similarity index 100% rename from home-manager/pkgs/tmux-sixel/default.nix rename to home-manager/nixpkgs/tmux-sixel/default.nix diff --git a/home-manager/package.nix b/home-manager/package.nix index 8b385b5..cad6866 100644 --- a/home-manager/package.nix +++ b/home-manager/package.nix @@ -1,9 +1,9 @@ { pkgs }: let - ecspresso = pkgs.callPackage ./pkgs/ecspresso { }; - isucrud = pkgs.callPackage ./pkgs/isucrud { }; - mitamae = pkgs.callPackage ./pkgs/mitamae { }; - # tmux-sixel = pkgs.callPackage ./pkgs/tmux-sixel { }; + ecspresso = pkgs.callPackage ./nixpkgs/ecspresso { }; + isucrud = pkgs.callPackage ./nixpkgs/isucrud { }; + # mitamae = pkgs.callPackage ./pkgs/mitamae { }; + tmux-sixel = pkgs.callPackage ./nixpkgs/tmux-sixel { }; in with pkgs; [ # for language specific gopls @@ -27,7 +27,8 @@ in with pkgs; [ yaml-language-server # for gnupg - pinentry_mac + # pinentry_mac + # pinentry-curses pinentry-emacs gnupg @@ -53,9 +54,9 @@ in with pkgs; [ pv ripgrep rlwrap - terminal-notifier + # terminal-notifier tig - tmux # or tmux-sixel + tmux-sixel tokei tree unixtools.procps @@ -71,7 +72,7 @@ in with pkgs; [ iftop imagemagick isucrud - mitamae + # mitamae ncurses neofetch offlineimap @@ -84,7 +85,7 @@ in with pkgs; [ # for editor cmigemo - emacs-git + emacs editorconfig-core-c nano neovim diff --git a/systems/X13Gen2/configuration.nix b/systems/X13Gen2/configuration.nix index d402a82..3409014 100644 --- a/systems/X13Gen2/configuration.nix +++ b/systems/X13Gen2/configuration.nix @@ -5,11 +5,6 @@ { config, pkgs, ... }: { - imports = - [ # Include the results of the hardware scan. - ./hardware-configuration.nix - ]; - # Bootloader. boot.loader.systemd-boot.enable = true; boot.loader.efi.canTouchEfiVariables = true; @@ -51,9 +46,9 @@ # Configure keymap in X11 services.xserver = { - layout = "jp"; - xkbVariant = ""; - xkbOptions = "ctrl:swapcaps"; + xkb.layout = "jp"; + xkb.variant = ""; + xkb.options = "ctrl:swapcaps"; }; # Configure console keymap @@ -87,10 +82,11 @@ isNormalUser = true; description = "take"; extraGroups = [ "networkmanager" "wheel" ]; - packages = with pkgs; [ - firefox - # thunderbird - ]; + packages = with pkgs; + [ + firefox + # thunderbird + ]; }; # Allow unfree packages @@ -98,18 +94,18 @@ # List packages installed in system profile. To search, run: # $ nix search wget - environment.systemPackages = with pkgs; [ - vim # Do not forget to add an editor to edit configuration.nix! The Nano editor is also installed by default. - emacs29 - git - ghq - gnumake - gnupg - pinentry-curses - tmux - fish - peco - ]; + # environment.systemPackages = with pkgs; [ + # vim # Do not forget to add an editor to edit configuration.nix! The Nano editor is also installed by default. + # emacs29 + # git + # ghq + # gnumake + # gnupg + # pinentry-curses + # tmux + # fish + # peco + # ]; # Some programs need SUID wrappers, can be configured further or are # started in user sessions. diff --git a/systems/X13Gen2/default.nix b/systems/X13Gen2/default.nix index 4358011..023ef16 100644 --- a/systems/X13Gen2/default.nix +++ b/systems/X13Gen2/default.nix @@ -1,14 +1,15 @@ -{ self, nixpkgs, home-manager, emacs-overlay, ... }: +{ self, nixpkgs, home-manager, emacs-overlay, nixos-hardware, ... }: let - system = "aarch64-linux"; username = "take"; -in { + system = "x86_64-linux"; +in +{ X13Gen2 = nixpkgs.lib.nixosSystem { inherit system; - modules = [ ./configuration.nix - home-manager.darwinModules.home-manager + ./hardware-configuration.nix + home-manager.nixosModules.home-manager { home-manager.useUserPackages = true; home-manager.users."${username}" =