From 40aaea83f4f87bcba8cb00904ce4db46901e658a Mon Sep 17 00:00:00 2001 From: iFargle Date: Thu, 29 Jun 2023 21:16:58 +0900 Subject: [PATCH] Testing home-manager --- laptop/configuration.nix | 16 ++++++++-------- laptop/home-manager.nix | 15 +++++++++++++++ 2 files changed, 23 insertions(+), 8 deletions(-) create mode 100644 laptop/home-manager.nix diff --git a/laptop/configuration.nix b/laptop/configuration.nix index cea5b2bf..074d8af7 100644 --- a/laptop/configuration.nix +++ b/laptop/configuration.nix @@ -14,16 +14,14 @@ boot.loader.efi.canTouchEfiVariables = true; # Plymouth splash screen boot.plymouth.enable = true; - + boot.initrd.systemd.enable = true; + boot.kernelParams = ["quiet"]; + # Setup keyfile boot.initrd.secrets = { "/crypto_keyfile.bin" = null; }; - # Plymouth troubleshooting - boot.initrd.systemd.enable = true; - boot.kernelParams = ["quiet"]; - # Enable swap on luks boot.initrd.luks.devices."luks-9704447e-6bd0-4a35-9c24-20cbab81c431".device = "/dev/disk/by-uuid/9704447e-6bd0-4a35-9c24-20cbab81c431"; boot.initrd.luks.devices."luks-9704447e-6bd0-4a35-9c24-20cbab81c431".keyFile = "/crypto_keyfile.bin"; @@ -163,9 +161,11 @@ services.openssh.enable = true; services.tailscale.enable = true; - # Enable nVidia drivers: - hardware.nvidia = { - + # Garbage collection -- Keep the system clean + gc = { + automatic = true; + dates = "weekly"; + options = "--delete-older-than 30d"; }; # This value determines the NixOS release from which the default diff --git a/laptop/home-manager.nix b/laptop/home-manager.nix new file mode 100644 index 00000000..44cf88a8 --- /dev/null +++ b/laptop/home-manager.nix @@ -0,0 +1,15 @@ +{ config, pkgs, ... }: +let + home-manager = builtins.fetchTarball "https://github.com/nix-community/home-manager/archive/master.tar.gz"; +in +{ + imports = [ + (import "${home-manager}/nixos") + ]; + + home-manager.users.albert = { + /* The home.stateVersion option does not have a default and must be set */ + home.stateVersion = "unstable"; + /* Here goes the rest of your home-manager config, e.g. home.packages = [ pkgs.foo ]; */ + }; +} \ No newline at end of file