From 30d059d995c7ddf79e2eba5cf5a611d16d0a0ae8 Mon Sep 17 00:00:00 2001 From: Katherina Walshe-Grey Date: Tue, 28 May 2024 22:53:40 +0100 Subject: [PATCH 1/3] Enable home-manager module --- hive.nix | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/hive.nix b/hive.nix index 4e4ffb9..41f2d90 100644 --- a/hive.nix +++ b/hive.nix @@ -5,7 +5,10 @@ in { }; defaults = { pkgs, ... }: { - imports = [ ./pinning.nix ]; + imports = [ + ./pinning.nix + (import "${sources.home-manager}/nixos") + ]; deployment.replaceUnknownProfiles = false; }; From 1012a3a1de1e4cc19f44506d4c522762bfc9e3af Mon Sep 17 00:00:00 2001 From: Katherina Walshe-Grey Date: Tue, 28 May 2024 22:53:50 +0100 Subject: [PATCH 2/3] [tohru] Move most user config to home-manager & install VS Code --- hosts/tohru/configuration.nix | 16 ++------------- hosts/tohru/home.nix | 38 +++++++++++++++++++++++++++++++++++ 2 files changed, 40 insertions(+), 14 deletions(-) create mode 100644 hosts/tohru/home.nix diff --git a/hosts/tohru/configuration.nix b/hosts/tohru/configuration.nix index 2a09eb4..87707ea 100644 --- a/hosts/tohru/configuration.nix +++ b/hosts/tohru/configuration.nix @@ -2,8 +2,9 @@ { imports = - [ # Include the results of the hardware scan. + [ ./hardware-configuration.nix + ./home.nix ]; boot.loader.systemd-boot.enable = true; @@ -33,25 +34,12 @@ # Enable touchpad support (enabled default in most desktopManager). services.xserver.libinput.enable = true; - # Define a user account. Don't forget to set a password with ‘passwd’. - users.users.bluebird = { - isNormalUser = true; - extraGroups = [ "wheel" "networkmanager" ]; - packages = with pkgs; [ - bitwarden - firefox - tor-browser-bundle-bin - ]; - }; - # List packages installed in system profile. To search, run: # $ nix search wget environment.systemPackages = with pkgs; [ colmena git npins - plocate - tree wget ]; diff --git a/hosts/tohru/home.nix b/hosts/tohru/home.nix new file mode 100644 index 0000000..2f2b128 --- /dev/null +++ b/hosts/tohru/home.nix @@ -0,0 +1,38 @@ +{ config, lib, pkgs, ... }: + +{ + users.users.bluebird = { + isNormalUser = true; + description = "Bluebird"; + extraGroups = [ "wheel" "networkmanager" ]; + packages = with pkgs; [ + # TODO: move these to home-manager + bitwarden + firefox + tor-browser-bundle-bin + ]; + }; + + home-manager.users.bluebird = { pkgs, ... }: { + home.packages = [ + pkgs.fortune + pkgs.htop + pkgs.tree + ]; + + programs.git = { + enable = true; + userName = "Katherina Walshe-Grey"; + userEmail = "git@katherina.rocks"; + }; + + programs.vscode = { + enable = true; + package = pkgs.vscodium; + extensions = with pkgs.vscode-extensions; [ + ]; + }; + + home.stateVersion = "23.11"; + }; +} From 21ebcf6f75bd3420c39596a1041ccad1af53a48f Mon Sep 17 00:00:00 2001 From: Katherina Walshe-Grey Date: Wed, 29 May 2024 13:35:27 +0100 Subject: [PATCH 3/3] [tohru] Basic configuration for VS Code --- hosts/tohru/home.nix | 29 ++++++++++++++++++++++------- npins/sources.json | 12 ++++++++++++ 2 files changed, 34 insertions(+), 7 deletions(-) diff --git a/hosts/tohru/home.nix b/hosts/tohru/home.nix index 2f2b128..33a4f8e 100644 --- a/hosts/tohru/home.nix +++ b/hosts/tohru/home.nix @@ -14,10 +14,13 @@ }; home-manager.users.bluebird = { pkgs, ... }: { - home.packages = [ - pkgs.fortune - pkgs.htop - pkgs.tree + home.packages = with pkgs; [ + fortune + htop + tree + + nil + nixpkgs-fmt ]; programs.git = { @@ -26,11 +29,23 @@ userEmail = "git@katherina.rocks"; }; - programs.vscode = { + programs.vscode = let + system = builtins.currentSystem; + sources = import ../../npins; + extensions = (import sources.nix-vscode-extensions).extensions.${system}; + in { enable = true; package = pkgs.vscodium; - extensions = with pkgs.vscode-extensions; [ - ]; + extensions = (with pkgs.vscode-extensions; [ + jnoortheen.nix-ide + ]) ++ (with extensions.open-vsx; [ + robbowen.synthwave-vscode + ]); + userSettings = { + "nix.enableLanguageServer" = true; + "nix.serverPath" = "nil"; + "workbench.colorTheme" = "SynthWave '84"; + }; }; home.stateVersion = "23.11"; diff --git a/npins/sources.json b/npins/sources.json index e3ca425..554530a 100644 --- a/npins/sources.json +++ b/npins/sources.json @@ -12,6 +12,18 @@ "url": "https://github.com/nix-community/home-manager/archive/2c78a57c544dd19b07442350727ced097e1aa6e6.tar.gz", "hash": "1zb4qsyn7l1zdiv1kjx07jvgnakpsifc62fxcim50w3ni27cwxk3" }, + "nix-vscode-extensions": { + "type": "Git", + "repository": { + "type": "GitHub", + "owner": "nix-community", + "repo": "nix-vscode-extensions" + }, + "branch": "master", + "revision": "1f5f225e7ceee57404f6e409200cc9eea25090be", + "url": "https://github.com/nix-community/nix-vscode-extensions/archive/1f5f225e7ceee57404f6e409200cc9eea25090be.tar.gz", + "hash": "1s24w7fwfgd1v3s9zlj9cmwhbfc90av8c44kg9dchvj0yh6fg5sx" + }, "nixpkgs": { "type": "Channel", "name": "nixos-23.11",