From c954f0df5f67e144e74cde2647fdb3ee70076adb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Geoffrey=20=E2=80=9CFrogeye=E2=80=9D=20Preud=27homme?= Date: Fri, 5 Jan 2024 18:42:21 +0100 Subject: [PATCH] Quick commit 2024-01-05T18:42:21+01:00 --- curacao/dk.nix | 8 +++--- curacao/hardware.nix | 4 +-- flake.lock | 65 ++++++++++++++++++++++++++++++++++++++++++++ flake.nix | 22 +++++++++++++++ hm/default.nix | 2 +- hm/style.nix | 2 +- hm/vim.nix | 4 +-- os/default.nix | 3 +- os/geoffrey.nix | 4 --- 9 files changed, 98 insertions(+), 16 deletions(-) create mode 100644 flake.lock create mode 100644 flake.nix diff --git a/curacao/dk.nix b/curacao/dk.nix index d730d35..4f08553 100644 --- a/curacao/dk.nix +++ b/curacao/dk.nix @@ -73,7 +73,7 @@ in type = "luks"; name = "boot"; extraFormatArgs = [ "--type luks1" ]; - passwordFile = passwordFile; + passwordFile = "FIXME"; settings = { # keyFile = "/etc/keys/boot"; }; @@ -94,7 +94,7 @@ in content = { type = "luks"; name = "razmo"; - passwordFile = passwordFile; + passwordFile = "FIXME"; settings = { # keyFile = "/etc/keys/razmo"; }; @@ -129,7 +129,7 @@ in content = { type = "luks"; name = "rapswap"; - passwordFile = passwordFile; + passwordFile = "FIXME"; settings = { # keyFile = "/etc/keys/rapswap"; allowDiscards = true; @@ -147,7 +147,7 @@ in type = "luks"; name = "rapido"; initrdUnlock = true; - passwordFile = passwordFile; + passwordFile = "FIXME"; settings = { # keyFile = "/etc/keys/rapido"; allowDiscards = true; diff --git a/curacao/hardware.nix b/curacao/hardware.nix index f439fa7..d758c97 100644 --- a/curacao/hardware.nix +++ b/curacao/hardware.nix @@ -1,7 +1,7 @@ -{ lib, ... }: +{ lib, nixos-hardware, ... }: { imports = [ - + # nixos-hardware.dell.g3.3779 ]; # UEFI works here, and variables can be touched diff --git a/flake.lock b/flake.lock new file mode 100644 index 0000000..30607a3 --- /dev/null +++ b/flake.lock @@ -0,0 +1,65 @@ +{ + "nodes": { + "home-manager": { + "inputs": { + "nixpkgs": [ + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1704099619, + "narHash": "sha256-QRVMkdxLmv+aKGjcgeEg31xtJEIsYq4i1Kbyw5EPS6g=", + "owner": "nix-community", + "repo": "home-manager", + "rev": "7e398b3d76bc1503171b1364c9d4a07ac06f3851", + "type": "github" + }, + "original": { + "owner": "nix-community", + "ref": "release-23.11", + "repo": "home-manager", + "type": "github" + } + }, + "nixos-hardware": { + "locked": { + "lastModified": 1704458188, + "narHash": "sha256-f6BYEuIqnbrs6J/9m1/1VdkJ6d63hO9kUC09kTPuOqE=", + "owner": "NixOS", + "repo": "nixos-hardware", + "rev": "172385318068519900a7d71c1024242fa6af75f0", + "type": "github" + }, + "original": { + "owner": "NixOS", + "repo": "nixos-hardware", + "type": "github" + } + }, + "nixpkgs": { + "locked": { + "lastModified": 1704295289, + "narHash": "sha256-9WZDRfpMqCYL6g/HNWVvXF0hxdaAgwgIGeLYiOhmes8=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "b0b2c5445c64191fd8d0b31f2b1a34e45a64547d", + "type": "github" + }, + "original": { + "owner": "NixOS", + "ref": "nixos-23.11", + "repo": "nixpkgs", + "type": "github" + } + }, + "root": { + "inputs": { + "home-manager": "home-manager", + "nixos-hardware": "nixos-hardware", + "nixpkgs": "nixpkgs" + } + } + }, + "root": "root", + "version": 7 +} diff --git a/flake.nix b/flake.nix new file mode 100644 index 0000000..571f4ac --- /dev/null +++ b/flake.nix @@ -0,0 +1,22 @@ +{ + description = "Configs"; + + 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 + ]; + }; + }; +} diff --git a/hm/default.nix b/hm/default.nix index f53ecb5..0a4e777 100644 --- a/hm/default.nix +++ b/hm/default.nix @@ -10,6 +10,6 @@ ./ssh.nix ./style.nix ./usernix - ./vim.nix + # ./vim.nix # FIXME Complains that it's using fetchtarball without a sha256 argument... but it's not? ]; } diff --git a/hm/style.nix b/hm/style.nix index c21ab8a..64af287 100644 --- a/hm/style.nix +++ b/hm/style.nix @@ -44,7 +44,7 @@ in # Setting a custom base16 theme via nixvim: # - Is required so nixvim works # - For the rest only works on dark polarity, use the colorscheme otherwise... shrug - programs.nixvim.colorschemes.base16.colorscheme = "solarized-${polarity}"; + # programs.nixvim.colorschemes.base16.colorscheme = "solarized-${polarity}"; # Fix https://nix-community.github.io/home-manager/index.html#_why_do_i_get_an_error_message_about_literal_ca_desrt_dconf_literal_or_literal_dconf_service_literal # home.packages = [ pkgs.dconf ]; diff --git a/hm/vim.nix b/hm/vim.nix index eea12ec..a255995 100644 --- a/hm/vim.nix +++ b/hm/vim.nix @@ -29,9 +29,7 @@ let }; in { - imports = [ - nixvim.homeManagerModules.nixvim - ]; + imports = [ (import nixvim).homeManagerModules.nixvim ]; programs.nixvim = { enable = true; diff --git a/os/default.nix b/os/default.nix index 596cd3d..6924499 100644 --- a/os/default.nix +++ b/os/default.nix @@ -8,7 +8,8 @@ ./desktop.nix ./gaming ./geoffrey.nix - ./wireless.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"; diff --git a/os/geoffrey.nix b/os/geoffrey.nix index a860d42..4b3833c 100644 --- a/os/geoffrey.nix +++ b/os/geoffrey.nix @@ -1,9 +1,5 @@ { pkgs, lib, config, ... }: { - imports = [ - - ]; - users.users.root.initialHashedPassword = "$y$j9T$e64bjL7iyVlniEKwKbM9g0$cCn74za0r6L9QMO20Fdxz3/SX0yvhz3Xd6.2BhtbRL1"; # Not a real password users.users.geoffrey = {