From a3c8378d9992bf999771bf862df658b002457481 Mon Sep 17 00:00:00 2001 From: eneller Date: Thu, 11 Jan 2024 17:00:30 +0100 Subject: [PATCH] begin modularization --- .gitignore | 1 + configuration.nix | 8 +++++--- flake.lock | 27 +++++++++++++++++++++++++++ flake.nix | 29 +++++++++++++++++++++++++++++ 4 files changed, 62 insertions(+), 3 deletions(-) create mode 100644 flake.lock create mode 100644 flake.nix diff --git a/.gitignore b/.gitignore index b2be92b..87a3018 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,2 @@ result +*.qcow2 diff --git a/configuration.nix b/configuration.nix index 2c65708..29edb62 100644 --- a/configuration.nix +++ b/configuration.nix @@ -8,7 +8,6 @@ imports = [ # Include the results of the hardware scan. ./hardware-configuration.nix - (import "${builtins.fetchTarball https://github.com/nix-community/home-manager/archive/master.tar.gz}/nixos") #./home.nix ]; @@ -150,7 +149,7 @@ zsh zsh-powerlevel10k # TODO set up zsh to replace bash tmux - exa # TODO replace with eza + eza # TODO replace with eza ripgrep bat gnused @@ -171,7 +170,6 @@ python3 ansible telegram-desktop - home-manager ]; programs.neovim = { @@ -238,6 +236,10 @@ # HOME MANAGER #home-manager.users.snow = { pkgs, ... }: {}; nix.settings.experimental-features = [ "nix-command" "flakes" ]; + nixpkgs.config.permittedInsecurePackages = [ + "electron-25.9.0" # dependency of logseq + ]; + } diff --git a/flake.lock b/flake.lock new file mode 100644 index 0000000..51a892f --- /dev/null +++ b/flake.lock @@ -0,0 +1,27 @@ +{ + "nodes": { + "nixpkgs": { + "locked": { + "lastModified": 1704987849, + "narHash": "sha256-gZJSlgUkfLYekceF+2r5YI3pKqaYNSBR5SRL8yfoCU8=", + "owner": "nixos", + "repo": "nixpkgs", + "rev": "676128b13cd7bc0b24d22ee18b164641b691b621", + "type": "github" + }, + "original": { + "owner": "nixos", + "ref": "release-23.11", + "repo": "nixpkgs", + "type": "github" + } + }, + "root": { + "inputs": { + "nixpkgs": "nixpkgs" + } + } + }, + "root": "root", + "version": 7 +} diff --git a/flake.nix b/flake.nix new file mode 100644 index 0000000..8a4671f --- /dev/null +++ b/flake.nix @@ -0,0 +1,29 @@ +{ + description = "Nixos config flake"; + + inputs = { + nixpkgs.url = "github:nixos/nixpkgs/release-23.11"; + + # home-manager = { + # url = "github:nix-community/home-manager"; + # inputs.nixpkgs.follows = "nixpkgs"; + # }; + }; + + outputs = { self, nixpkgs, ... }@inputs: + let + system = "x86_64-linux"; + pkgs = nixpkgs.legacyPackages.${system}; + in + { + + nixosConfigurations.default = nixpkgs.lib.nixosSystem { + specialArgs = {inherit inputs;}; + modules = [ + ./configuration.nix + # inputs.home-manager.nixosModules.default + ]; + }; + + }; +}