From 6afc7f6fb5132c372e58b887642f1a7006fc58bc Mon Sep 17 00:00:00 2001 From: Tao Tien <29749622+taotien@users.noreply.github.com> Date: Tue, 23 Jan 2024 19:52:56 -0800 Subject: [PATCH] home-manager --- flake.lock | 21 +++++++++++++++++++++ flake.nix | 5 ++++- users/tao.nix | 22 +++++++++++----------- 3 files changed, 36 insertions(+), 12 deletions(-) diff --git a/flake.lock b/flake.lock index 87c6947..eaf2c3f 100644 --- a/flake.lock +++ b/flake.lock @@ -39,6 +39,26 @@ "type": "github" } }, + "home-manager": { + "inputs": { + "nixpkgs": [ + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1706001011, + "narHash": "sha256-J7Bs9LHdZubgNHZ6+eE/7C18lZ1P6S5/zdJSdXFItI4=", + "owner": "nix-community", + "repo": "home-manager", + "rev": "3df2a80f3f85f91ea06e5e91071fa74ba92e5084", + "type": "github" + }, + "original": { + "owner": "nix-community", + "repo": "home-manager", + "type": "github" + } + }, "nixos-hardware": { "locked": { "lastModified": 1705312285, @@ -136,6 +156,7 @@ "root": { "inputs": { "aagl": "aagl", + "home-manager": "home-manager", "nixos-hardware": "nixos-hardware", "nixos-raspberrypi": "nixos-raspberrypi", "nixpkgs": "nixpkgs_2", diff --git a/flake.nix b/flake.nix index d9cfba8..5380fa4 100644 --- a/flake.nix +++ b/flake.nix @@ -11,10 +11,12 @@ aagl.inputs.nixpkgs.follows = "nixpkgs"; # prescurve.url = "github:taotien/prescurve"; # prescurve.inputs.nixpkgs.follows = "nixpkgs"; + home-manager.url = "github:nix-community/home-manager"; + home-manager.inputs.nixpkgs.follows = "nixpkgs"; }; # outputs = { nixpkgs, nixos-hardware, nixpkgs-unstable, nixos-raspberrypi, aagl, prescurve, ... }@attrs: - outputs = { nixpkgs, nixos-hardware, nixpkgs-unstable, nixos-raspberrypi, aagl, ... }@attrs: + outputs = { nixpkgs, nixos-hardware, nixpkgs-unstable, nixos-raspberrypi, aagl, home-manager, ... }@attrs: let nixos-system = (systemModules: nixpkgs.lib.nixosSystem { modules = systemModules; @@ -46,6 +48,7 @@ ({ config, pkgs, ... }: { nixpkgs.overlays = [ overlay-unstable ]; }) nixos-hw.common-cpu-amd nixos-hw.common-gpu-nvidia-nonprime + home-manager.nixosModules.home-manager ./systems/BASED.nix ./systems/NOcomputer.nix ./users/tao.nix diff --git a/users/tao.nix b/users/tao.nix index 6a7da7a..1778375 100644 --- a/users/tao.nix +++ b/users/tao.nix @@ -91,20 +91,20 @@ shell = pkgs.unstable.nushell; }; - security.sudo = { - extraRules = [{ - commands = [ - { - command = "${pkgs.systemd}/bin/bootctl set-oneshot auto-windows"; - options = [ "NOPASSWD" ]; - } - ]; - groups = [ "wheel" ]; - }]; - }; + security.sudo-rs.enable = true; + security.sudo-rs.extraRules = [{ + commands = [ + { command = "${pkgs.systemd}/bin/bootctl set-oneshot auto-windows"; options = [ "NOPASSWD" ]; } + ]; + groups = [ "wheel" ]; + }]; # i18n.inputMethod = { # enabled = "fcitx5"; # fcitx5.addons = with pkgs; [ fcitx5-mozc fcitx5-chewing fcitx5-chinese-addons fcitx5-rime ]; # }; + + home-manager.users.tao = { + home.stateVersion = "23.11"; + }; }