Limit graphical programs by hostname
parent
7d1d1388b4
commit
533da03db0
|
@ -0,0 +1,20 @@
|
|||
{ pkgs, ... }:
|
||||
|
||||
let
|
||||
pkgsUnstable = import <nixpkgs-unstable> {};
|
||||
in
|
||||
{
|
||||
home.packages = with pkgs; [
|
||||
authy
|
||||
barrier
|
||||
pkgsUnstable.discord
|
||||
google-chrome
|
||||
todoist-electron
|
||||
pkgsUnstable.zoom-us
|
||||
|
||||
pkgsUnstable.logseq
|
||||
sublime-music
|
||||
|
||||
alacritty
|
||||
];
|
||||
}
|
|
@ -1,6 +1,8 @@
|
|||
{ config, pkgs, ... }:
|
||||
{ config, pkgs, lib, ... }:
|
||||
|
||||
let
|
||||
inherit (lib) optionals;
|
||||
hostName = import ./hostname.nix lib;
|
||||
# Be able to use unstable packages
|
||||
pkgsUnstable = import <nixpkgs-unstable> {};
|
||||
|
||||
|
@ -10,14 +12,12 @@ in
|
|||
home.username = "earne";
|
||||
home.homeDirectory = "/home/earne";
|
||||
|
||||
home.packages = with pkgs; [
|
||||
authy # non-free
|
||||
barrier
|
||||
pkgsUnstable.discord # non-free
|
||||
google-chrome # non-free
|
||||
todoist-electron # non-free
|
||||
pkgsUnstable.zoom-us # non-free
|
||||
imports =
|
||||
(optionals (hostName == "tycho") [
|
||||
./graphical.nix
|
||||
]);
|
||||
|
||||
home.packages = with pkgs; [
|
||||
# Doom Emacs + dependencies
|
||||
pkgsUnstable.fd
|
||||
pkgsUnstable.ripgrep
|
||||
|
@ -27,10 +27,6 @@ in
|
|||
isync
|
||||
khard
|
||||
|
||||
pkgsUnstable.logseq
|
||||
sublime-music
|
||||
|
||||
alacritty
|
||||
gitFull
|
||||
git-extras
|
||||
ghq
|
||||
|
|
|
@ -0,0 +1,21 @@
|
|||
lib:
|
||||
|
||||
let
|
||||
|
||||
inherit (builtins) currentSystem;
|
||||
inherit (lib) maybeEnv fileContents;
|
||||
inherit (lib.systems.elaborate { system = currentSystem; }) isLinux isDarwin;
|
||||
|
||||
in
|
||||
|
||||
maybeEnv "HOST" (fileContents (
|
||||
if !isDarwin then
|
||||
/etc/hostname
|
||||
else
|
||||
derivation {
|
||||
name = "hostname";
|
||||
system = currentSystem;
|
||||
builder = "/bin/sh";
|
||||
args = [ "-c" "/usr/sbin/scutil --get LocalHostName > $out" ];
|
||||
}
|
||||
))
|
Loading…
Reference in New Issue