diff --git a/curacao/hardware.nix b/curacao/hardware.nix index d758c97..7655256 100644 --- a/curacao/hardware.nix +++ b/curacao/hardware.nix @@ -1,9 +1,5 @@ { lib, nixos-hardware, ... }: { - imports = [ - # nixos-hardware.dell.g3.3779 - ]; - # UEFI works here, and variables can be touched boot.loader = { efi.canTouchEfiVariables = lib.mkDefault true; diff --git a/curacao/os.nix b/curacao/os.nix index 3f81444..f7b7312 100644 --- a/curacao/os.nix +++ b/curacao/os.nix @@ -1,7 +1,6 @@ { ... }: { imports = [ - ../os ./options.nix ./hardware.nix ./dk.nix diff --git a/flake.lock b/flake.lock index 30607a3..b091626 100644 --- a/flake.lock +++ b/flake.lock @@ -1,5 +1,275 @@ { "nodes": { + "base16": { + "inputs": { + "fromYaml": "fromYaml" + }, + "locked": { + "lastModified": 1689633990, + "narHash": "sha256-iwvQg2Vx0IIDWZaKo8Xmzxlv1YPHg+Kp/QSv8dRv0RY=", + "owner": "SenchoPens", + "repo": "base16.nix", + "rev": "dddf2e1c04845d43c89a8e9e37d574519649a404", + "type": "github" + }, + "original": { + "owner": "SenchoPens", + "repo": "base16.nix", + "type": "github" + } + }, + "base16-alacritty": { + "flake": false, + "locked": { + "lastModified": 1674275109, + "narHash": "sha256-Adwx9yP70I6mJrjjODOgZJjt4OPPe8gJu7UuBboXO4M=", + "owner": "aarowill", + "repo": "base16-alacritty", + "rev": "63d8ae5dfefe5db825dd4c699d0cdc2fc2c3eaf7", + "type": "github" + }, + "original": { + "owner": "aarowill", + "repo": "base16-alacritty", + "type": "github" + } + }, + "base16-fish": { + "flake": false, + "locked": { + "lastModified": 1622559957, + "narHash": "sha256-PebymhVYbL8trDVVXxCvZgc0S5VxI7I1Hv4RMSquTpA=", + "owner": "tomyun", + "repo": "base16-fish", + "rev": "2f6dd973a9075dabccd26f1cded09508180bf5fe", + "type": "github" + }, + "original": { + "owner": "tomyun", + "repo": "base16-fish", + "type": "github" + } + }, + "base16-foot": { + "flake": false, + "locked": { + "lastModified": 1696725948, + "narHash": "sha256-65bz2bUL/yzZ1c8/GQASnoiGwaF8DczlxJtzik1c0AU=", + "owner": "tinted-theming", + "repo": "base16-foot", + "rev": "eedbcfa30de0a4baa03e99f5e3ceb5535c2755ce", + "type": "github" + }, + "original": { + "owner": "tinted-theming", + "repo": "base16-foot", + "type": "github" + } + }, + "base16-helix": { + "flake": false, + "locked": { + "lastModified": 1696727917, + "narHash": "sha256-FVrbPk+NtMra0jtlC5oxyNchbm8FosmvXIatkRbYy1g=", + "owner": "tinted-theming", + "repo": "base16-helix", + "rev": "dbe1480d99fe80f08df7970e471fac24c05f2ddb", + "type": "github" + }, + "original": { + "owner": "tinted-theming", + "repo": "base16-helix", + "type": "github" + } + }, + "base16-kitty": { + "flake": false, + "locked": { + "lastModified": 1665001328, + "narHash": "sha256-aRaizTYPpuWEcvoYE9U+YRX+Wsc8+iG0guQJbvxEdJY=", + "owner": "kdrag0n", + "repo": "base16-kitty", + "rev": "06bb401fa9a0ffb84365905ffbb959ae5bf40805", + "type": "github" + }, + "original": { + "owner": "kdrag0n", + "repo": "base16-kitty", + "type": "github" + } + }, + "base16-tmux": { + "flake": false, + "locked": { + "lastModified": 1696725902, + "narHash": "sha256-wDPg5elZPcQpu7Df0lI5O8Jv4A3T6jUQIVg63KDU+3Q=", + "owner": "tinted-theming", + "repo": "base16-tmux", + "rev": "c02050bebb60dbb20cb433cd4d8ce668ecc11ba7", + "type": "github" + }, + "original": { + "owner": "tinted-theming", + "repo": "base16-tmux", + "type": "github" + } + }, + "base16-vim": { + "flake": false, + "locked": { + "lastModified": 1663659192, + "narHash": "sha256-uJvaYYDMXvoo0fhBZUhN8WBXeJ87SRgof6GEK2efFT0=", + "owner": "chriskempson", + "repo": "base16-vim", + "rev": "3be3cd82cd31acfcab9a41bad853d9c68d30478d", + "type": "github" + }, + "original": { + "owner": "chriskempson", + "repo": "base16-vim", + "type": "github" + } + }, + "disko": { + "inputs": { + "nixpkgs": [ + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1704318910, + "narHash": "sha256-wOIJwAsnZhM0NlFRwYJRgO4Lldh8j9viyzwQXtrbNtM=", + "owner": "nix-community", + "repo": "disko", + "rev": "aef9a509db64a081186af2dc185654d78dc8e344", + "type": "github" + }, + "original": { + "id": "disko", + "type": "indirect" + } + }, + "flake-compat": { + "flake": false, + "locked": { + "lastModified": 1673956053, + "narHash": "sha256-4gtG9iQuiKITOjNQQeQIpoIB6b16fm+504Ch3sNKLd8=", + "owner": "edolstra", + "repo": "flake-compat", + "rev": "35bb57c0c8d8b62bbfd284272c928ceb64ddbde9", + "type": "github" + }, + "original": { + "owner": "edolstra", + "repo": "flake-compat", + "type": "github" + } + }, + "flake-compat_2": { + "flake": false, + "locked": { + "lastModified": 1673956053, + "narHash": "sha256-4gtG9iQuiKITOjNQQeQIpoIB6b16fm+504Ch3sNKLd8=", + "owner": "edolstra", + "repo": "flake-compat", + "rev": "35bb57c0c8d8b62bbfd284272c928ceb64ddbde9", + "type": "github" + }, + "original": { + "owner": "edolstra", + "repo": "flake-compat", + "type": "github" + } + }, + "flake-utils": { + "locked": { + "lastModified": 1659877975, + "narHash": "sha256-zllb8aq3YO3h8B/U0/J1WBgAL8EX5yWf5pMj3G0NAmc=", + "owner": "numtide", + "repo": "flake-utils", + "rev": "c0e246b9b83f637f4681389ecabcb2681b4f3af0", + "type": "github" + }, + "original": { + "owner": "numtide", + "repo": "flake-utils", + "type": "github" + } + }, + "flake-utils_2": { + "inputs": { + "systems": "systems" + }, + "locked": { + "lastModified": 1701680307, + "narHash": "sha256-kAuep2h5ajznlPMD9rnQyffWG8EM/C73lejGofXvdM8=", + "owner": "numtide", + "repo": "flake-utils", + "rev": "4022d587cbbfd70fe950c1e2083a02621806a725", + "type": "github" + }, + "original": { + "owner": "numtide", + "repo": "flake-utils", + "type": "github" + } + }, + "flake-utils_3": { + "inputs": { + "systems": "systems_2" + }, + "locked": { + "lastModified": 1685518550, + "narHash": "sha256-o2d0KcvaXzTrPRIo0kOLV0/QXHhDQ5DTi+OxcjO8xqY=", + "owner": "numtide", + "repo": "flake-utils", + "rev": "a1720a10a6cfe8234c0e93907ffe81be440f4cef", + "type": "github" + }, + "original": { + "owner": "numtide", + "repo": "flake-utils", + "type": "github" + } + }, + "fromYaml": { + "flake": false, + "locked": { + "lastModified": 1689549921, + "narHash": "sha256-iX0pk/uB019TdBGlaJEWvBCfydT6sRq+eDcGPifVsCM=", + "owner": "SenchoPens", + "repo": "fromYaml", + "rev": "11fbbbfb32e3289d3c631e0134a23854e7865c84", + "type": "github" + }, + "original": { + "owner": "SenchoPens", + "repo": "fromYaml", + "type": "github" + } + }, + "gitignore": { + "inputs": { + "nixpkgs": [ + "nixvim", + "pre-commit-hooks", + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1660459072, + "narHash": "sha256-8DFJjXG8zqoONA1vXtgeKXy68KdJL5UaXR8NtVMUbx8=", + "owner": "hercules-ci", + "repo": "gitignore.nix", + "rev": "a20de23b925fd8264fd7fad6454652e142fd7f73", + "type": "github" + }, + "original": { + "owner": "hercules-ci", + "repo": "gitignore.nix", + "type": "github" + } + }, "home-manager": { "inputs": { "nixpkgs": [ @@ -15,9 +285,50 @@ "type": "github" }, "original": { - "owner": "nix-community", + "id": "home-manager", "ref": "release-23.11", + "type": "indirect" + } + }, + "home-manager_2": { + "inputs": { + "nixpkgs": [ + "stylix", + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1700847865, + "narHash": "sha256-uWaOIemGl9LF813MW0AEgCBpKwFo2t1Wv3BZc6e5Frw=", + "owner": "nix-community", "repo": "home-manager", + "rev": "8cedd63eede4c22deb192f1721dd67e7460e1ebe", + "type": "github" + }, + "original": { + "owner": "nix-community", + "repo": "home-manager", + "type": "github" + } + }, + "nixgl": { + "inputs": { + "flake-utils": "flake-utils", + "nixpkgs": [ + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1685908677, + "narHash": "sha256-E4zUPEUFyVWjVm45zICaHRpfGepfkE9Z2OECV9HXfA4=", + "owner": "guibou", + "repo": "nixGL", + "rev": "489d6b095ab9d289fe11af0219a9ff00fe87c7c5", + "type": "github" + }, + "original": { + "owner": "guibou", + "repo": "nixGL", "type": "github" } }, @@ -31,9 +342,8 @@ "type": "github" }, "original": { - "owner": "NixOS", - "repo": "nixos-hardware", - "type": "github" + "id": "nixos-hardware", + "type": "indirect" } }, "nixpkgs": { @@ -46,17 +356,144 @@ "type": "github" }, "original": { - "owner": "NixOS", + "id": "nixpkgs", "ref": "nixos-23.11", + "type": "indirect" + } + }, + "nixpkgs-stable": { + "locked": { + "lastModified": 1685801374, + "narHash": "sha256-otaSUoFEMM+LjBI1XL/xGB5ao6IwnZOXc47qhIgJe8U=", + "owner": "NixOS", "repo": "nixpkgs", + "rev": "c37ca420157f4abc31e26f436c1145f8951ff373", + "type": "github" + }, + "original": { + "owner": "NixOS", + "ref": "nixos-23.05", + "repo": "nixpkgs", + "type": "github" + } + }, + "nixvim": { + "inputs": { + "flake-utils": "flake-utils_2", + "nixpkgs": [ + "nixpkgs" + ], + "pre-commit-hooks": "pre-commit-hooks" + }, + "locked": { + "lastModified": 1702044539, + "narHash": "sha256-TNmEd6MipLxsrWromxqNfU4y17MoBr15QF7iEOagPy8=", + "owner": "nix-community", + "repo": "nixvim", + "rev": "c96d7b46d05a78e695ed1c725d1596b65509b4f9", + "type": "github" + }, + "original": { + "owner": "nix-community", + "repo": "nixvim", + "rev": "c96d7b46d05a78e695ed1c725d1596b65509b4f9", + "type": "github" + } + }, + "pre-commit-hooks": { + "inputs": { + "flake-compat": "flake-compat", + "flake-utils": "flake-utils_3", + "gitignore": "gitignore", + "nixpkgs": [ + "nixvim", + "nixpkgs" + ], + "nixpkgs-stable": "nixpkgs-stable" + }, + "locked": { + "lastModified": 1700922917, + "narHash": "sha256-ej2fch/T584b5K9sk1UhmZF7W6wEfDHuoUYpFN8dtvM=", + "owner": "cachix", + "repo": "pre-commit-hooks.nix", + "rev": "e5ee5c5f3844550c01d2131096c7271cec5e9b78", + "type": "github" + }, + "original": { + "owner": "cachix", + "repo": "pre-commit-hooks.nix", "type": "github" } }, "root": { "inputs": { + "disko": "disko", "home-manager": "home-manager", + "nixgl": "nixgl", "nixos-hardware": "nixos-hardware", - "nixpkgs": "nixpkgs" + "nixpkgs": "nixpkgs", + "nixvim": "nixvim", + "stylix": "stylix" + } + }, + "stylix": { + "inputs": { + "base16": "base16", + "base16-alacritty": "base16-alacritty", + "base16-fish": "base16-fish", + "base16-foot": "base16-foot", + "base16-helix": "base16-helix", + "base16-kitty": "base16-kitty", + "base16-tmux": "base16-tmux", + "base16-vim": "base16-vim", + "flake-compat": "flake-compat_2", + "home-manager": "home-manager_2", + "nixpkgs": [ + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1704308480, + "narHash": "sha256-88ICCdJyYYtsolRnPhI9IF+bhUIVUyhJ7nrKcKPgf6M=", + "owner": "danth", + "repo": "stylix", + "rev": "9bc1900b6888efdda39c2e02c7c8666911b72608", + "type": "github" + }, + "original": { + "owner": "danth", + "repo": "stylix", + "type": "github" + } + }, + "systems": { + "locked": { + "lastModified": 1681028828, + "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=", + "owner": "nix-systems", + "repo": "default", + "rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e", + "type": "github" + }, + "original": { + "owner": "nix-systems", + "repo": "default", + "type": "github" + } + }, + "systems_2": { + "locked": { + "lastModified": 1681028828, + "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=", + "owner": "nix-systems", + "repo": "default", + "rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e", + "type": "github" + }, + "original": { + "owner": "nix-systems", + "repo": "default", + "type": "github" } } }, diff --git a/flake.nix b/flake.nix index 571f4ac..a594f80 100644 --- a/flake.nix +++ b/flake.nix @@ -1,22 +1,88 @@ { - description = "Configs"; + description = "Geoffrey Frogeye's base configurations"; inputs = { - nixpkgs.url = github:NixOS/nixpkgs/nixos-23.11; - home-manager.url = github:nix-community/home-manager/release-23.11; - home-manager.inputs.nixpkgs.follows = "nixpkgs"; - nixos-hardware.url = github:NixOS/nixos-hardware/; - }; - - outputs = { self, nixpkgs, home-manager, ... }: { - - nixosConfigurations.curacao = nixpkgs.lib.nixosSystem { - system = "x86_64-linux"; - modules = [ - ./curacao/os.nix - # TODO Doesn't work with extensions, as they're out of trees - home-manager.nixosModules.home-manager - ]; + nixpkgs.url = "nixpkgs/nixos-23.11"; + # OS + disko = { + url = "disko"; + inputs.nixpkgs.follows = "nixpkgs"; + }; + nixos-hardware.url = "nixos-hardware"; + # HM + home-manager = { + url = "home-manager/release-23.11"; + inputs.nixpkgs.follows = "nixpkgs"; + }; + stylix = { + url = "github:danth/stylix"; + inputs.nixpkgs.follows = "nixpkgs"; + }; + nixvim = { + url = "github:nix-community/nixvim/c96d7b46d05a78e695ed1c725d1596b65509b4f9"; + # 24.05 Anything after this commit works + inputs.nixpkgs.follows = "nixpkgs"; + }; + nixgl = { + url = "github:guibou/nixGL"; + inputs.nixpkgs.follows = "nixpkgs"; }; }; + + outputs = { self, nixpkgs, disko, nixos-hardware, home-manager, stylix, nixvim, nixgl, ... }: + let + sharedOverlays = [ + nixgl.overlay + ]; + lib = { + nixosSystem = { system, modules }: nixpkgs.lib.nixosSystem { + inherit system; + modules = modules ++ [ + self.nixosModules.dotfiles + { + nixpkgs.overlays = sharedOverlays; + home-manager.sharedModules = [ self.homeManagerModules.dotfiles ]; + } + ]; + }; + homeManagerConfiguration = { system, modules }: home-manager.lib.homeManagerConfiguration { + pkgs = import nixpkgs { + inherit system; + overlays = sharedOverlays; + }; + modules = modules ++ [ self.homeManagerModules.dotfiles ]; + }; + }; + in + { + lib = lib; + nixosModules.dotfiles = { + imports = [ + ./os + disko.nixosModules.disko + home-manager.nixosModules.home-manager + ]; + }; + homeManagerModules.dotfiles = { + imports = [ + ./hm + stylix.homeManagerModules.stylix + nixvim.homeManagerModules.nixvim + ]; + }; + nixosConfigurations.curacao = lib.nixosSystem { + system = "x86_64-linux"; + modules = [ + ./curacao/os.nix + nixos-hardware.nixosModules.dell-g3-3779 + ]; + }; + nixosConfigurations.pindakaas = lib.nixosSystem { + system = "aarch64-linux"; + modules = [ + ./pindakaas/os.nix + nixos-hardware.nixosModules.pine64-pinebook-pro + ]; + }; + }; } diff --git a/hm/common.nix b/hm/common.nix index c7e2267..dc06d05 100644 --- a/hm/common.nix +++ b/hm/common.nix @@ -20,7 +20,10 @@ in { nixpkgs.config.allowUnfree = true; - nix.settings.experimental-features = [ "nix-command" "flakes" ]; + nix = { + package = lib.mkDefault pkgs.nixFlakes; + settings.experimental-features = [ "nix-command" "flakes" ]; + }; programs = let @@ -429,7 +432,6 @@ in neofetch # nix utils - nix nix-diff nix-tree nix-output-monitor diff --git a/hm/default.nix b/hm/default.nix index 0a4e777..f53ecb5 100644 --- a/hm/default.nix +++ b/hm/default.nix @@ -10,6 +10,6 @@ ./ssh.nix ./style.nix ./usernix - # ./vim.nix # FIXME Complains that it's using fetchtarball without a sha256 argument... but it's not? + ./vim.nix ]; } diff --git a/hm/desktop.nix b/hm/desktop.nix index 41c4391..1ca0467 100644 --- a/hm/desktop.nix +++ b/hm/desktop.nix @@ -1,11 +1,6 @@ { pkgs, config, lib, ... }: let - nixglsrc = builtins.fetchTarball { - url = "https://github.com/nix-community/nixGL/archive/489d6b095ab9d289fe11af0219a9ff00fe87c7c5.tar.gz"; - sha256 = "16b9jh46a02m79swsk5i5xw44738zy1i31al77mm1k8y4nxc8d9b"; - }; - nixgl = import (nixglsrc) { }; - nixGLIntelPrefix = "${nixgl.nixVulkanIntel}/bin/nixVulkanIntel ${nixgl.nixGLIntel}/bin/nixGLIntel "; + nixGLIntelPrefix = "${pkgs.nixgl.nixVulkanIntel}/bin/nixVulkanIntel ${pkgs.nixgl.nixGLIntel}/bin/nixGLIntel "; wmPrefix = "${lib.optionalString config.frogeye.desktop.nixGLIntel nixGLIntelPrefix}"; in { diff --git a/hm/flake.nix b/hm/flake.nix deleted file mode 100644 index 202e4c0..0000000 --- a/hm/flake.nix +++ /dev/null @@ -1,29 +0,0 @@ -{ - description = "Home Manager configuration of geoffrey"; - - inputs = { - # Specify the source of Home Manager and Nixpkgs. - nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable"; - home-manager = { - url = "github:nix-community/home-manager"; - inputs.nixpkgs.follows = "nixpkgs"; - }; - }; - - outputs = { nixpkgs, home-manager, ... }: - let - system = "x86_64-linux"; - pkgs = nixpkgs.legacyPackages.${system}; - in { - homeConfigurations."geoffrey" = home-manager.lib.homeManagerConfiguration { - inherit pkgs; - - # Specify your home configuration modules here, for example, - # the path to your home.nix. - modules = [ ./. ]; - - # Optionally use extraSpecialArgs - # to pass through arguments to home.nix - }; - }; -} diff --git a/hm/style.nix b/hm/style.nix index 64af287..77c7d9c 100644 --- a/hm/style.nix +++ b/hm/style.nix @@ -1,10 +1,6 @@ { pkgs, config, lib, ... }: let # Currently last commit in https://github.com/danth/stylix/pull/194 - stylix = builtins.fetchTarball { - url = "https://github.com/willemml/stylix/archive/2ed2b0086b41d582aca26e083c19c0e47c8991e3.tar.gz"; - sha256 = "1mwhpbfmw4n1lmy22s0dhbklzd8b0r7mn0mg7vbz44ac35m7kzf2"; - }; polarityFile = "${config.xdg.stateHome}/theme_polarity"; polarityFromFile = if builtins.pathExists polarityFile then lib.strings.fileContents polarityFile else "light"; polarity = if config.frogeye.polarity == "dynamic" then polarityFromFile else config.frogeye.polarity; @@ -16,9 +12,8 @@ let cfg = config.frogeye.desktop.phasesBrightness; in { - imports = [ (import stylix).homeManagerModules.stylix ]; - stylix = { + base16Scheme = "${pkgs.base16-schemes}/share/themes/solarized-${polarity}.yaml"; image = builtins.fetchurl { url = "https://get.wallhere.com/photo/sunlight-abstract-minimalism-green-simple-circle-light-leaf-wave-material-line-wing-computer-wallpaper-font-close-up-macro-photography-124350.png"; diff --git a/hm/vim.nix b/hm/vim.nix index a255995..999c7d7 100644 --- a/hm/vim.nix +++ b/hm/vim.nix @@ -1,10 +1,5 @@ { pkgs, lib, config, ... }: let - nixvim = builtins.fetchTarball { - url = "https://github.com/nix-community/nixvim/archive/c96d7b46d05a78e695ed1c725d1596b65509b4f9.tar.gz"; - # 24.05 Anythin after this commit works - sha256 = "0brzl3k11qjy81wvs1i8ngbk4kkxild9ps3ammnbr912ldvq9nac"; - }; vim-shot-f = pkgs.vimUtils.buildVimPlugin { pname = "vim-shot-f"; version = "2016-02-05"; @@ -29,7 +24,6 @@ let }; in { - imports = [ (import nixvim).homeManagerModules.nixvim ]; programs.nixvim = { enable = true; diff --git a/os/default.nix b/os/default.nix index 6924499..62b711b 100644 --- a/os/default.nix +++ b/os/default.nix @@ -10,10 +10,5 @@ ./geoffrey.nix # ./wireless.nix # FIXME networks.json is git-ignored, so flakes will not use it - "${builtins.fetchTarball { - url = "https://github.com/nix-community/disko/archive/3cb78c93e6a02f494aaf6aeb37481c27a2e2ee22.tar.gz"; - sha256 = "0slkd86c7viv8ping6wizhab6iwxz0bn9fxvzrscz0r745d8iaca"; - } - }/module.nix" ]; } diff --git a/pindakaas/hardware.nix b/pindakaas/hardware.nix index 9f9b6d3..f4173ad 100644 --- a/pindakaas/hardware.nix +++ b/pindakaas/hardware.nix @@ -1,9 +1,5 @@ { pkgs, config, ... }: { - imports = [ - - ]; - boot = { # nixos-hardware use latest kernel by default. It has been set a while ago, we maybe don't need it anymore? kernelPackages = pkgs.linuxPackages; diff --git a/pindakaas/os.nix b/pindakaas/os.nix index 9a992d4..44e2583 100644 --- a/pindakaas/os.nix +++ b/pindakaas/os.nix @@ -1,7 +1,6 @@ { ... }: { imports = [ - ../os ./hardware.nix ./dk.nix ./options.nix diff --git a/sprinkles/README.md b/sprinkles/README.md new file mode 100644 index 0000000..77f9aa2 --- /dev/null +++ b/sprinkles/README.md @@ -0,0 +1 @@ +FIXME Make this work with flakes