From 127efbc4574b6ac9dde20121820e5bbd0ab5f1f9 Mon Sep 17 00:00:00 2001 From: iFargle Date: Fri, 30 Jun 2023 19:17:13 +0900 Subject: [PATCH] test --- laptop/configuration.nix | 2 +- laptop/flake.nix | 34 ++++++++++++++++++++++++++-------- 2 files changed, 27 insertions(+), 9 deletions(-) diff --git a/laptop/configuration.nix b/laptop/configuration.nix index e49b4a72..0066fcbe 100644 --- a/laptop/configuration.nix +++ b/laptop/configuration.nix @@ -175,7 +175,7 @@ nix.gc = { automatic = true; dates = "weekly"; - options = "--delete-older-than 30d"; + options = "--delete-older-than 7d"; }; # Configure BASH exports diff --git a/laptop/flake.nix b/laptop/flake.nix index a90ca723..e46ab5a2 100644 --- a/laptop/flake.nix +++ b/laptop/flake.nix @@ -1,15 +1,33 @@ { - description = "Bootstrap Nix Flake for my laptop"; + description = "Laptop System Config"; inputs = { - nixpkgs.url = "github:nixos/nixpgs/nixos-23.05"; + nixpkgs.url = "nixpkgs/nixos-23.05"; + home-manager.url = "github:nix-community/home-manager/release-23.05"; + home-manager.inputs.nixpkgs.follows = "nixpkgs"; }; - outputs = { self, nixpkgs }: { - # replace 'joes-desktop' with your hostname here. - nixosConfigurations.nixos-p1 = nixpkgs.lib.nixosSystem { - system = "x86_64-linux"; - # modules = [ ./configuration.nix ]; + outputs = { nixpkgs, home-manager, ... }: + let + system = "x86_64-linux"; + hostname = "nixos-p1"; + pkgs = import nixpkgs { + # Tells Flake what OS version we are using + inherit system; + config = { allowUnfree = true; }; + }; + + lib = nixpkgs.lib; + in { + nixosConfigurations = { + nixos-p1 = lib.nixosSystem { + inherit system; + + modules = [ + ./configuration.nix + /etc/nixos/hardware-configuration.nix + ]; + }; }; }; -} \ No newline at end of file +}