From b55c662a1b9125e4b44ba6c076784e2f273788ad Mon Sep 17 00:00:00 2001 From: kenji Date: Tue, 23 Dec 2025 18:43:43 +0000 Subject: [PATCH] hello world! --- apps/git/default.nix | 5 +++++ apps/git/home.nix | 10 ++++++++++ flake.lock | 33 +++++++++++---------------------- flake.nix | 6 ++++++ hosts/hakase/configuration.nix | 6 +----- modules/home/terminal.nix | 1 + modules/system/default.nix | 5 ++++- system/boot.nix | 8 ++++---- system/version.nix | 7 +++++++ 9 files changed, 49 insertions(+), 32 deletions(-) create mode 100644 apps/git/default.nix create mode 100644 apps/git/home.nix diff --git a/apps/git/default.nix b/apps/git/default.nix new file mode 100644 index 0000000..fa6e84a --- /dev/null +++ b/apps/git/default.nix @@ -0,0 +1,5 @@ +{pkgs, ...}: { + environment.systemPackages = with pkgs; [ + git + ]; +} diff --git a/apps/git/home.nix b/apps/git/home.nix new file mode 100644 index 0000000..b15b115 --- /dev/null +++ b/apps/git/home.nix @@ -0,0 +1,10 @@ +{myConfig, ...}: { + programs.git = { + enable = true; + extraConfig = { + user.name = "${myConfig.nixos.Git.user}"; + user.email = "${myConfig.nixos.Git.email}"; + init.defaultBranch = "${myConfig.nixos.Git.defaultBranch}"; + }; + }; +} diff --git a/flake.lock b/flake.lock index b55740c..e70f8ea 100644 --- a/flake.lock +++ b/flake.lock @@ -640,7 +640,9 @@ "nixpkgs" ], "nixvim": "nixvim", - "rust-overlay": "rust-overlay" + "rust-overlay": [ + "rust-overlay" + ] }, "locked": { "lastModified": 1764015463, @@ -685,22 +687,6 @@ } }, "nixpkgs_2": { - "locked": { - "lastModified": 1736320768, - "narHash": "sha256-nIYdTAiKIGnFNugbomgBJR+Xv5F1ZQU+HfaBqJKroC0=", - "owner": "NixOS", - "repo": "nixpkgs", - "rev": "4bc9c909d9ac828a039f288cf872d16d38185db8", - "type": "github" - }, - "original": { - "owner": "NixOS", - "ref": "nixpkgs-unstable", - "repo": "nixpkgs", - "type": "github" - } - }, - "nixpkgs_3": { "locked": { "lastModified": 1766309749, "narHash": "sha256-3xY8CZ4rSnQ0NqGhMKAy5vgC+2IVK0NoVEzDoOh4DA4=", @@ -794,19 +780,22 @@ "home-manager": "home-manager", "hyprland": "hyprland", "nixovim": "nixovim", - "nixpkgs": "nixpkgs_3" + "nixpkgs": "nixpkgs_2", + "rust-overlay": "rust-overlay" } }, "rust-overlay": { "inputs": { - "nixpkgs": "nixpkgs_2" + "nixpkgs": [ + "nixpkgs" + ] }, "locked": { - "lastModified": 1739327257, - "narHash": "sha256-rlGK8wxz/e50Z+PQRzuP+m03IrGkhcPGmgkBnkEZ9C8=", + "lastModified": 1766457837, + "narHash": "sha256-aeBbkQ0HPFNOIsUeEsXmZHXbYq4bG8ipT9JRlCcKHgU=", "owner": "oxalica", "repo": "rust-overlay", - "rev": "e01f2c035b7b8a428c119b183f4cbc55f2eef07c", + "rev": "2c7510a559416d07242621d036847152d970612b", "type": "github" }, "original": { diff --git a/flake.nix b/flake.nix index c6a4080..3117b85 100644 --- a/flake.nix +++ b/flake.nix @@ -3,6 +3,11 @@ inputs = { nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable"; + rust-overlay = { + url = "github:oxalica/rust-overlay"; + inputs.nixpkgs.follows = "nixpkgs"; + }; + home-manager = { url = "github:nix-community/home-manager"; inputs.nixpkgs.follows = "nixpkgs"; @@ -14,6 +19,7 @@ nixovim = { url = "git+https://git.sakamoto.dev/kenji/nixovim.git"; inputs.nixpkgs.follows = "nixpkgs"; + inputs.rust-overlay.follows = "rust-overlay"; }; }; diff --git a/hosts/hakase/configuration.nix b/hosts/hakase/configuration.nix index 307ace1..a4094b5 100644 --- a/hosts/hakase/configuration.nix +++ b/hosts/hakase/configuration.nix @@ -1,10 +1,6 @@ {pkgs, ...}: { imports = [ ./hardware-configuration.nix - ../../system/version.nix - ../../system/user.nix - ../../system/home-manager.nix - ../../system/hardware.nix - ../../system/services.nix + ../../modules/system/default.nix ]; } diff --git a/modules/home/terminal.nix b/modules/home/terminal.nix index 4139228..bbf7487 100644 --- a/modules/home/terminal.nix +++ b/modules/home/terminal.nix @@ -1,5 +1,6 @@ { imports = [ ../../apps/neovim/neovim.nix + ../../apps/git/home.nix ]; } diff --git a/modules/system/default.nix b/modules/system/default.nix index 2956e49..51ad81b 100644 --- a/modules/system/default.nix +++ b/modules/system/default.nix @@ -1,4 +1,4 @@ -{...}: { +{pkgs, ...}: { imports = [ ../../system/boot.nix ../../system/amd.nix @@ -8,4 +8,7 @@ ../../system/user.nix ../../system/version.nix ]; + environment.systemPackages = with pkgs; [ + git + ]; } diff --git a/system/boot.nix b/system/boot.nix index 2571d3d..e1d534e 100644 --- a/system/boot.nix +++ b/system/boot.nix @@ -10,10 +10,10 @@ efiSysMountPoint = "/boot"; }; - grub = { - enable = false; - device = "nodev"; - }; + # grub = { + # enable = false; + # device = "nodev"; + # }; }; initrd = { diff --git a/system/version.nix b/system/version.nix index a967d1d..98edc1d 100644 --- a/system/version.nix +++ b/system/version.nix @@ -1,4 +1,11 @@ {pkgs, ...}: { system.stateVersion = "25.05"; nixpkgs.config.allowUnfree = true; + nix = { + distributedBuilds = true; + settings = { + builders-use-substitutes = true; + experimental-features = ["nix-command" "flakes"]; + }; + }; }