diff --git a/flake.lock b/flake.lock index 23c4886..db6d3d6 100644 --- a/flake.lock +++ b/flake.lock @@ -8,11 +8,11 @@ "systems": "systems" }, "locked": { - "lastModified": 1736955230, - "narHash": "sha256-uenf8fv2eG5bKM8C/UvFaiJMZ4IpUFaQxk9OH5t/1gA=", + "lastModified": 1750173260, + "narHash": "sha256-9P1FziAwl5+3edkfFcr5HeGtQUtrSdk/MksX39GieoA=", "owner": "ryantm", "repo": "agenix", - "rev": "e600439ec4c273cf11e06fe4d9d906fb98fa097c", + "rev": "531beac616433bac6f9e2a19feb8e99a22a66baf", "type": "github" }, "original": { @@ -29,11 +29,11 @@ ] }, "locked": { - "lastModified": 1700795494, - "narHash": "sha256-gzGLZSiOhf155FW7262kdHo2YDeugp3VuIFb4/GGng0=", + "lastModified": 1744478979, + "narHash": "sha256-dyN+teG9G82G+m+PX/aSAagkC+vUv0SgUw3XkPhQodQ=", "owner": "lnl7", "repo": "nix-darwin", - "rev": "4b9b83d5a92e8c1fbfd8eb27eda375908c11ec4d", + "rev": "43975d782b418ebf4969e9ccba82466728c2851b", "type": "github" }, "original": { @@ -43,6 +43,26 @@ "type": "github" } }, + "disko": { + "inputs": { + "nixpkgs": [ + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1752113600, + "narHash": "sha256-7LYDxKxZgBQ8LZUuolAQ8UkIB+jb4A2UmiR+kzY9CLI=", + "owner": "nix-community", + "repo": "disko", + "rev": "79264292b7e3482e5702932949de9cbb69fedf6d", + "type": "github" + }, + "original": { + "owner": "nix-community", + "repo": "disko", + "type": "github" + } + }, "flake-parts": { "inputs": { "nixpkgs-lib": [ @@ -51,11 +71,11 @@ ] }, "locked": { - "lastModified": 1741352980, - "narHash": "sha256-+u2UunDA4Cl5Fci3m7S643HzKmIDAe+fiXrLqYsR2fs=", + "lastModified": 1751413152, + "narHash": "sha256-Tyw1RjYEsp5scoigs1384gIg6e0GoBVjms4aXFfRssQ=", "owner": "hercules-ci", "repo": "flake-parts", - "rev": "f4330d22f1c5d2ba72d3d22df5597d123fdb60a9", + "rev": "77826244401ea9de6e3bac47c2db46005e1f30b5", "type": "github" }, "original": { @@ -102,7 +122,7 @@ }, "flake-utils_3": { "inputs": { - "systems": "systems_4" + "systems": "systems_5" }, "locked": { "lastModified": 1731533236, @@ -126,11 +146,11 @@ ] }, "locked": { - "lastModified": 1703113217, - "narHash": "sha256-7ulcXOk63TIT2lVDSExj7XzFx09LpdSAPtvgtM7yQPE=", + "lastModified": 1745494811, + "narHash": "sha256-YZCh2o9Ua1n9uCvrvi5pRxtuVNml8X2a03qIFfRKpFs=", "owner": "nix-community", "repo": "home-manager", - "rev": "3bfaacf46133c037bb356193bd2f1765d9dc82c1", + "rev": "abfad3d2958c9e6300a883bd443512c55dfeb1be", "type": "github" }, "original": { @@ -146,11 +166,11 @@ ] }, "locked": { - "lastModified": 1743097780, - "narHash": "sha256-5tUbaMBKYbfTe/4aXACxmiXG22TgwPBNcfZ8Kg3rt+g=", + "lastModified": 1752093218, + "narHash": "sha256-+3rXu8ewcNDi65/2mKkdSGrivQs5zEZVp5aYszXC0d0=", "owner": "nix-community", "repo": "home-manager", - "rev": "b14a70c40f4fd0b73d095ab04a7c6e31fbc18e52", + "rev": "206ed3c71418b52e176f16f58805c96e84555320", "type": "github" }, "original": { @@ -173,27 +193,27 @@ ] }, "locked": { - "lastModified": 1729958008, - "narHash": "sha256-EiOq8jF4Z/zQe0QYVc3+qSKxRK//CFHMB84aYrYGwEs=", + "lastModified": 1748294338, + "narHash": "sha256-FVO01jdmUNArzBS7NmaktLdGA5qA3lUMJ4B7a05Iynw=", "owner": "NuschtOS", "repo": "ixx", - "rev": "9fd01aad037f345350eab2cd45e1946cc66da4eb", + "rev": "cc5f390f7caf265461d4aab37e98d2292ebbdb85", "type": "github" }, "original": { "owner": "NuschtOS", - "ref": "v0.0.6", + "ref": "v0.0.8", "repo": "ixx", "type": "github" } }, "nixpkgs": { "locked": { - "lastModified": 1703013332, - "narHash": "sha256-+tFNwMvlXLbJZXiMHqYq77z/RfmpfpiI3yjL6o/Zo9M=", + "lastModified": 1745391562, + "narHash": "sha256-sPwcCYuiEopaafePqlG826tBhctuJsLx/mhKKM5Fmjo=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "54aac082a4d9bb5bbc5c4e899603abfb76a3f6d6", + "rev": "8a2f738d9d1f1d986b5a4cd2fd2061a7127237d7", "type": "github" }, "original": { @@ -205,11 +225,11 @@ }, "nixpkgs_2": { "locked": { - "lastModified": 1742889210, - "narHash": "sha256-hw63HnwnqU3ZQfsMclLhMvOezpM7RSB0dMAtD5/sOiw=", + "lastModified": 1751984180, + "narHash": "sha256-LwWRsENAZJKUdD3SpLluwDmdXY9F45ZEgCb0X+xgOL0=", "owner": "nixos", "repo": "nixpkgs", - "rev": "698214a32beb4f4c8e3942372c694f40848b360d", + "rev": "9807714d6944a957c2e036f84b0ff8caf9930bc0", "type": "github" }, "original": { @@ -221,15 +241,15 @@ }, "nixpkgs_3": { "locked": { - "lastModified": 1733759999, - "narHash": "sha256-463SNPWmz46iLzJKRzO3Q2b0Aurff3U1n0nYItxq7jU=", - "owner": "NixOS", + "lastModified": 1751984180, + "narHash": "sha256-LwWRsENAZJKUdD3SpLluwDmdXY9F45ZEgCb0X+xgOL0=", + "owner": "nixos", "repo": "nixpkgs", - "rev": "a73246e2eef4c6ed172979932bc80e1404ba2d56", + "rev": "9807714d6944a957c2e036f84b0ff8caf9930bc0", "type": "github" }, "original": { - "owner": "NixOS", + "owner": "nixos", "ref": "nixos-unstable", "repo": "nixpkgs", "type": "github" @@ -241,14 +261,15 @@ "nixpkgs": [ "nixpkgs" ], - "nuschtosSearch": "nuschtosSearch" + "nuschtosSearch": "nuschtosSearch", + "systems": "systems_4" }, "locked": { - "lastModified": 1742991302, - "narHash": "sha256-5S+qnc5ijgFWlAWS9+L7uAgpDnL0RtVEDhVpHWGoavA=", + "lastModified": 1752158208, + "narHash": "sha256-XbXYLUtaB/wHvZYefvaDPbo4eYj27kbtowHfww9bqLw=", "owner": "nix-community", "repo": "nixvim", - "rev": "1c0dd320d9c4f250ac33382e11d370b7abe97622", + "rev": "b728cf43d97814df43f5d9bd9dafac9072ccd9e8", "type": "github" }, "original": { @@ -267,11 +288,11 @@ ] }, "locked": { - "lastModified": 1742659553, - "narHash": "sha256-i/JCrr/jApVorI9GkSV5to+USrRCa0rWuQDH8JSlK2A=", + "lastModified": 1749730855, + "narHash": "sha256-L3x2nSlFkXkM6tQPLJP3oCBMIsRifhIDPMQQdHO5xWo=", "owner": "NuschtOS", "repo": "search", - "rev": "508752835128a3977985a4d5225ff241f7756181", + "rev": "8dfe5879dd009ff4742b668d9c699bc4b9761742", "type": "github" }, "original": { @@ -283,30 +304,12 @@ "root": { "inputs": { "agenix": "agenix", + "disko": "disko", "flake-utils": "flake-utils", "home-manager": "home-manager_2", "nixpkgs": "nixpkgs_2", "nixvim": "nixvim", - "superhtml": "superhtml" - } - }, - "superhtml": { - "inputs": { - "flake-utils": "flake-utils_3", - "nixpkgs": "nixpkgs_3" - }, - "locked": { - "lastModified": 1733963442, - "narHash": "sha256-upfDKS5CXtbbzCZICGqCsCwkHtjVa01jMWCj6rjO4zI=", - "ref": "refs/heads/main", - "rev": "c17d0ffe2440a81842055e5d4649723b7829a5da", - "revCount": 141, - "type": "git", - "url": "https://git.yadunut.dev/yadunut/superhtml" - }, - "original": { - "type": "git", - "url": "https://git.yadunut.dev/yadunut/superhtml" + "yadunut": "yadunut" } }, "systems": { @@ -368,6 +371,40 @@ "repo": "default", "type": "github" } + }, + "systems_5": { + "locked": { + "lastModified": 1681028828, + "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=", + "owner": "nix-systems", + "repo": "default", + "rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e", + "type": "github" + }, + "original": { + "owner": "nix-systems", + "repo": "default", + "type": "github" + } + }, + "yadunut": { + "inputs": { + "flake-utils": "flake-utils_3", + "nixpkgs": "nixpkgs_3" + }, + "locked": { + "lastModified": 1752450247, + "narHash": "sha256-rn8tN2VaItIFq1EQmP5DhZTEB9ea4cS0ZmclLQ+Rqv0=", + "ref": "refs/heads/main", + "rev": "9acd92634ea00da1879e01c225b4c52d86e979f3", + "revCount": 1, + "type": "git", + "url": "https://git.yadunut.dev/yadunut/nix.git" + }, + "original": { + "type": "git", + "url": "https://git.yadunut.dev/yadunut/nix.git" + } } }, "root": "root", diff --git a/flake.nix b/flake.nix index 31b0d15..c240eb0 100644 --- a/flake.nix +++ b/flake.nix @@ -9,63 +9,100 @@ url = "github:nix-community/home-manager"; inputs.nixpkgs.follows = "nixpkgs"; }; + flake-utils = { + url = "github:numtide/flake-utils"; + }; nixvim = { url = "github:nix-community/nixvim"; inputs.nixpkgs.follows = "nixpkgs"; }; - flake-utils.url = "github:numtide/flake-utils"; + disko = { + url = "github:nix-community/disko"; + inputs.nixpkgs.follows = "nixpkgs"; + }; + + yadunut.url = "git+https://git.yadunut.dev/yadunut/nix.git"; }; - outputs = { - nixpkgs, - home-manager, - flake-utils, - agenix, - nixvim, - ... - } @ inputs: { - formatter.aarch64-darwin = nixpkgs.legacyPackages.aarch64-darwin.alejandra; - homeConfigurations = { - "yadunut@yadunut-mbp" = home-manager.lib.homeManagerConfiguration { - pkgs = import nixpkgs { - system = "aarch64-darwin"; - config = { - allowUnfree = true; + outputs = + { + nixpkgs, + home-manager, + agenix, + nixvim, + disko, + flake-utils, + yadunut, + ... + }@inputs: + { + homeConfigurations = { + "yadunut@yadunut-mbp" = + let + system = "aarch64-darwin"; + pkgs = nixpkgs.legacyPackages.${system}; + in + home-manager.lib.homeManagerConfiguration { + inherit pkgs; + extraSpecialArgs = { + inherit inputs; + }; + modules = [ ./yadunut-mbp/home.nix ]; }; - }; - extraSpecialArgs = { - inherit inputs; - }; - modules = [./yadunut-mbp/home.nix]; - }; - "yadunut@yadunut-mba" = home-manager.lib.homeManagerConfiguration { - pkgs = import nixpkgs { - system = "aarch64-darwin"; - config = { - allowUnfree = true; + "yadunut@yadunut-mba" = + let + system = "aarch64-darwin"; + pkgs = nixpkgs.legacyPackages.${system}; + in + home-manager.lib.homeManagerConfiguration { + inherit pkgs; + extraSpecialArgs = { + inherit inputs; + }; + modules = [ ./yadunut-mba/home.nix ]; }; - }; - extraSpecialArgs = { - inherit inputs; - }; - modules = [ - ./yadunut-mba/home.nix - ]; }; - }; - nixosConfigurations.nixos = nixpkgs.lib.nixosSystem { - system = "x86_64-linux"; - modules = [ - ./falcon-nixos/configuration.nix - agenix.nixosModules.default - {_module.args = {inherit inputs;};} - home-manager.nixosModules.home-manager - { - home-manager.useGlobalPkgs = true; - home-manager.useUserPackages = true; - home-manager.users.yadunut = import ./falcon-nixos/home.nix; - } - ]; - }; - }; + nixosConfigurations = { + "penguin" = nixpkgs.lib.nixosSystem { + system = "x86_64-linux"; + modules = [ + disko.nixosModules.disko + agenix.nixosModules.default + ./penguin/disko-config.nix + yadunut.lib.users + ./penguin/configuration.nix + ./penguin/hardware-configuration.nix + ]; + }; + "falcon-nixos" = nixpkgs.lib.nixosSystem { + system = "x86_64-linux"; + modules = [ + ./falcon-nixos/configuration.nix + agenix.nixosModules.default + { _module.args = { inherit inputs; }; } + home-manager.nixosModules.home-manager + { + home-manager.useGlobalPkgs = true; + home-manager.useUserPackages = true; + home-manager.users.yadunut = import ./falcon-nixos/home.nix; + } + ]; + }; + }; + } + // flake-utils.lib.eachDefaultSystem ( + system: + let + pkgs = import nixpkgs { + inherit system; + }; + in + { + devShells.default = pkgs.mkShell { + buildInputs = [ + pkgs.nixd + ]; + }; + } + ); } diff --git a/modules/neovim.nix b/modules/neovim.nix index c48dfd8..d2a0226 100644 --- a/modules/neovim.nix +++ b/modules/neovim.nix @@ -8,7 +8,6 @@ inputs.nixvim.homeManagerModules.nixvim ]; programs.nixvim = { - nixpkgs.pkgs = pkgs; performance.combinePlugins.enable = false; performance.byteCompileLua.enable = false; @@ -32,15 +31,6 @@ }; lsp = { - # package = pkgs.vimUtils.buildVimPlugin { - # name = "lsp"; - # src = pkgs.fetchFromGitHub { - # owner = "neovim"; - # repo = "nvim-lspconfig"; - # rev = "541f3a2781de481bb84883889e4d9f0904250a56"; - # hash = "sha256-f9CqwKBWZgC2ystm+g7FmsHR0fLcM6Wj+GkSwoUIanw="; - # }; - # }; enable = true; servers = { # gleam.enable = true; @@ -52,7 +42,6 @@ cssls.enable = true; jsonls.enable = true; html.enable = true; - }; keymaps.lspBuf = { gd = { @@ -271,7 +260,6 @@ lean = { enable = true; }; - copilot-vim.enable = true; }; opts = { number = true; diff --git a/modules/zsh.nix b/modules/zsh.nix index 15a8736..fe6cc63 100644 --- a/modules/zsh.nix +++ b/modules/zsh.nix @@ -72,6 +72,7 @@ nodejs.disabled = true; package.disabled = true; aws.disabled = true; + python.disabled = true; }; }; } diff --git a/penguin/configuration.nix b/penguin/configuration.nix new file mode 100644 index 0000000..fcffae9 --- /dev/null +++ b/penguin/configuration.nix @@ -0,0 +1,35 @@ +{ + lib, + pkgs, + ... +}@args: +{ + boot = { + tmp.cleanOnBoot = true; + loader = { + systemd-boot.enable = true; + efi.canTouchEfiVariables = true; + }; + }; + + services.openssh = { + enable = true; + settings.PasswordAuthentication = false; + }; + + nix.settings.experimental-features = [ + "nix-command" + "flakes" + ]; + + nixpkgs.config.allowUnfree = true; + + networking.hostName = "penguin"; + + environment.systemPackages = with pkgs; [ + git + neovim + ghostty + zen + ]; +} diff --git a/penguin/disko-config.nix b/penguin/disko-config.nix new file mode 100644 index 0000000..1343f43 --- /dev/null +++ b/penguin/disko-config.nix @@ -0,0 +1,90 @@ +{ + disko.devices = { + disk = { + disk1 = { + type = "disk"; + device = "/dev/nvme1n1"; + content = { + type = "gpt"; + partitions = { + ESP = { + size = "512M"; + type = "EF00"; + content = { + type = "filesystem"; + format = "vfat"; + mountpoint = "/boot"; + mountOptions = [ "umask=0077" ]; + }; + }; + crypt_p1 = { + size = "100%"; + content = { + type = "luks"; + name = "crypt_p1"; + settings = { + allowDiscards = true; + }; + }; + }; + }; + }; + }; + disk2 = { + type = "disk"; + device = "/dev/nvme2n1"; + content = { + type = "gpt"; + partitions = { + crypt_p2 = { + size = "100%"; + content = { + type = "luks"; + name = "crypt_p2"; + settings = { + allowDiscards = true; + }; + content = { + type = "btrfs"; + extraArgs = [ + "-d raid1" + "/dev/mapper/crypt_p1" + ]; + subVolumes = { + "@" = { }; + "@/root" = { + mountpoint = "/"; + mountOptions = [ + "compress=zstd" + "noatime" + ]; + }; + "@/home" = { + mountpoint = "/home"; + mountOptions = [ + "compress=zstd" + "noatime" + ]; + }; + "@/nix" = { + mountpoint = "/nix"; + mountOptions = [ + "compress=zstd" + "noatime" + ]; + }; + "@/swap" = { + mountpoint = "./.swapvol"; + swap.swapfile.size = "64G"; + mountOptions = [ "noatime" ]; + }; + }; + }; + }; + }; + }; + }; + }; + }; + }; +} diff --git a/yadunut-mbp/home.nix b/yadunut-mbp/home.nix index bcb9c8a..96e8aa3 100644 --- a/yadunut-mbp/home.nix +++ b/yadunut-mbp/home.nix @@ -7,12 +7,12 @@ (import ../modules/zsh.nix) (import ../modules/git.nix) (import ../modules/neovim.nix) - (import ../modules/wezterm) ]; # Home Manager needs a bit of information about you and the paths it should # manage. home.username = "yadunut"; home.homeDirectory = "/Users/yadunut"; + nixpkgs.config.allowUnfree = true; # This value determines the Home Manager release that your configuration is # compatible with. This helps avoid breakage when a new Home Manager release @@ -29,12 +29,8 @@ # pkgs.dive pkgs.entr - pkgs.typst - pkgs.tinymist - pkgs.lazygit pkgs.jq - pkgs.nixfmt-rfc-style pkgs.just pkgs.rsync pkgs.nil # nix lsp