Compare commits
16 Commits
Author | SHA1 | Date |
---|---|---|
niten | 9e5ca132cf | |
niten | 76bd02b24e | |
niten | 7744f675a1 | |
niten | 887a14bfa9 | |
niten | 2c1edb71fe | |
niten | 63c2fdd679 | |
niten | 6b04af4689 | |
niten | d1b245e42d | |
niten | 96e9d01281 | |
niten | 8aa670951a | |
niten | 560c16a650 | |
niten | bb1f864d45 | |
niten | 7d7f95b1c2 | |
niten | 1ba24b9571 | |
niten | b4524c5145 | |
niten | a9a9785f9e |
28
flake.lock
28
flake.lock
|
@ -182,14 +182,16 @@
|
|||
},
|
||||
"home-manager": {
|
||||
"inputs": {
|
||||
"nixpkgs": "nixpkgs_2"
|
||||
"nixpkgs": [
|
||||
"nixpkgs"
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1633291410,
|
||||
"narHash": "sha256-IxUzCGwj+s2Rn/+u0NtY36ix5I8MopMOO8Ip59PnBlw=",
|
||||
"lastModified": 1637019201,
|
||||
"narHash": "sha256-lq4gz51fx4m5FXfx1SCB444aEBeaYtLMVm3P18Wi9ls=",
|
||||
"owner": "nix-community",
|
||||
"repo": "home-manager",
|
||||
"rev": "382505714d10c6791a96712e0554587c75c5bf8b",
|
||||
"rev": "bcf03fa16a1f06b8a0abb27bf49afa8d6fffe8f1",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
@ -202,11 +204,11 @@
|
|||
"niten-doom-config": {
|
||||
"flake": false,
|
||||
"locked": {
|
||||
"lastModified": 1628274414,
|
||||
"narHash": "sha256-EIGqjTHcYnjVXceY1tpjaYxNmORh8NNiL2FVWCI5sBo=",
|
||||
"lastModified": 1633712607,
|
||||
"narHash": "sha256-6PAw7Xvoj4JROeTqK1nhT2zv7bPpiQlm9t7H5HQ0f2k=",
|
||||
"ref": "master",
|
||||
"rev": "0ab1532c856ccdb6ce46c5948054279f439eb1f2",
|
||||
"revCount": 34,
|
||||
"rev": "0a4f8ce4121ba3d64d29b0d52733c08febfb83d8",
|
||||
"revCount": 35,
|
||||
"type": "git",
|
||||
"url": "https://git.fudo.org/niten/doom-emacs.git"
|
||||
},
|
||||
|
@ -249,15 +251,16 @@
|
|||
},
|
||||
"nixpkgs_2": {
|
||||
"locked": {
|
||||
"lastModified": 1633381874,
|
||||
"narHash": "sha256-RkoVeo4K1IKqQzCI9W28UOyw4ic3Lhb3XoMDFDp7X74=",
|
||||
"lastModified": 1636944046,
|
||||
"narHash": "sha256-74KLDsiWSBsYXKj/ql9EGbw1TbIJRE7clFkhl30HV/c=",
|
||||
"owner": "NixOS",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "35b808214a1ca158a04d6980cb95cc1a77ce1f94",
|
||||
"rev": "46251a79f752ae1d46ef733e8e9760b6d3429da4",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"id": "nixpkgs",
|
||||
"ref": "nixos-21.05",
|
||||
"type": "indirect"
|
||||
}
|
||||
},
|
||||
|
@ -377,7 +380,8 @@
|
|||
"inputs": {
|
||||
"doom-emacs": "doom-emacs",
|
||||
"home-manager": "home-manager",
|
||||
"niten-doom-config": "niten-doom-config"
|
||||
"niten-doom-config": "niten-doom-config",
|
||||
"nixpkgs": "nixpkgs_2"
|
||||
}
|
||||
},
|
||||
"rotate-text": {
|
||||
|
|
26
module.nix
26
module.nix
|
@ -6,7 +6,7 @@ with lib;
|
|||
let
|
||||
user-configs = {
|
||||
niten = ./niten.nix;
|
||||
root = ./niten.nix;
|
||||
root = ./root.nix;
|
||||
viator = ./niten.nix;
|
||||
xiaoxuan = ./xiaoxuan.nix;
|
||||
};
|
||||
|
@ -14,19 +14,11 @@ let
|
|||
hostname = config.instance.hostname;
|
||||
enable-gui = config.fudo.hosts.${hostname}.enable-gui;
|
||||
|
||||
user-config-map = {
|
||||
niten = ./niten.nix;
|
||||
# FIXME: Root shouldn't have all this stuff installed!
|
||||
root = ./niten.nix;
|
||||
viator = ./niten.nix;
|
||||
xiaoxuan = ./xiaoxuan.nix;
|
||||
};
|
||||
|
||||
local-users = let
|
||||
local-usernames = attrNames config.instance.local-users;
|
||||
in filterAttrs
|
||||
(username: userOpts: elem username local-usernames)
|
||||
user-config-map;
|
||||
user-configs;
|
||||
|
||||
in {
|
||||
config.home-manager = {
|
||||
|
@ -50,6 +42,18 @@ in {
|
|||
home-dir
|
||||
enable-gui;
|
||||
});
|
||||
in mapAttrs generate-config local-users;
|
||||
in (mapAttrs generate-config local-users) // {
|
||||
root = import user-configs.root {
|
||||
inherit
|
||||
config
|
||||
lib
|
||||
pkgs
|
||||
doom-emacs
|
||||
niten-doom-config;
|
||||
username = "root";
|
||||
user-email = "root@${config.instance.local-domain}";
|
||||
home-dir = "/root";
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
91
niten.nix
91
niten.nix
|
@ -23,29 +23,29 @@ let
|
|||
emacsPackagesOverlay = final: prev: {
|
||||
irony = prev.irony.overrideAttrs (esuper: {
|
||||
buildInputs = with pkgs;
|
||||
esuper.buildInputs ++
|
||||
[ cmake libclang clang ];
|
||||
esuper.buildInputs ++ [ clang libclang ];
|
||||
});
|
||||
};
|
||||
};
|
||||
|
||||
gui-packages = with pkgs; [
|
||||
exodus
|
||||
firefox
|
||||
gnome.gnome-tweaks
|
||||
google-chrome
|
||||
imagemagick
|
||||
jq
|
||||
minecraft
|
||||
mplayer
|
||||
nyxt
|
||||
openttd
|
||||
pv
|
||||
redshift
|
||||
signal-desktop
|
||||
spotify
|
||||
xclip
|
||||
];
|
||||
element-desktop
|
||||
exodus
|
||||
faudio
|
||||
gnome.gnome-tweaks
|
||||
google-chrome
|
||||
imagemagick
|
||||
jq
|
||||
minecraft
|
||||
mplayer
|
||||
nyxt
|
||||
openttd
|
||||
pv
|
||||
redshift
|
||||
signal-desktop
|
||||
spotify
|
||||
xclip
|
||||
];
|
||||
|
||||
common-packages = with pkgs; [
|
||||
ant
|
||||
|
@ -61,10 +61,10 @@ let
|
|||
clj2nix
|
||||
cmake
|
||||
curl
|
||||
doom-emacs-package
|
||||
enca
|
||||
file
|
||||
fortune
|
||||
doom-emacs-package
|
||||
git
|
||||
gnutls
|
||||
gnupg
|
||||
|
@ -77,6 +77,7 @@ let
|
|||
lispPackages.quicklisp
|
||||
lsof
|
||||
lshw
|
||||
manix
|
||||
mkpasswd
|
||||
mtr
|
||||
nixfmt
|
||||
|
@ -97,6 +98,7 @@ let
|
|||
texlive.combined.scheme-basic
|
||||
tmux
|
||||
unzip
|
||||
winetricks
|
||||
yubikey-manager
|
||||
yubikey-personalization
|
||||
youtube-dl
|
||||
|
@ -115,7 +117,11 @@ let
|
|||
in {
|
||||
|
||||
programs = {
|
||||
bash.enable = true;
|
||||
bash = {
|
||||
enable = true;
|
||||
enableVteIntegration = true;
|
||||
};
|
||||
|
||||
git = {
|
||||
enable = true;
|
||||
userName = username;
|
||||
|
@ -123,6 +129,16 @@ in {
|
|||
ignores = [ "*~" ];
|
||||
extraConfig.pull.rebase = false;
|
||||
};
|
||||
|
||||
firefox = {
|
||||
enable = enable-gui;
|
||||
## Some perm change error?
|
||||
# package = (pkgs.firefox.override {
|
||||
# cfg = {
|
||||
# enableGnomeExtensions = true;
|
||||
# };
|
||||
# });
|
||||
};
|
||||
};
|
||||
|
||||
xresources.properties = mkIf enable-gui {
|
||||
|
@ -145,44 +161,15 @@ in {
|
|||
|
||||
gpg-agent.enable = true;
|
||||
|
||||
gnome-keyring.enable = true;
|
||||
gnome-keyring.enable = enable-gui;
|
||||
|
||||
redshift = {
|
||||
gammastep = {
|
||||
enable = true;
|
||||
latitude = "47";
|
||||
longitude = "122";
|
||||
};
|
||||
};
|
||||
|
||||
accounts.email.accounts = {
|
||||
Fudo = {
|
||||
primary = true;
|
||||
address = "niten@fudo.org";
|
||||
aliases = [ "peter@selby.ca" ];
|
||||
userName = "niten";
|
||||
realName = "Niten";
|
||||
imap = {
|
||||
host = "mail.fudo.org";
|
||||
port = 993;
|
||||
tls.enable = true;
|
||||
};
|
||||
smtp = {
|
||||
host = "mail.fudo.org";
|
||||
port = 587;
|
||||
tls = {
|
||||
enable = true;
|
||||
useStartTls = true;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
GMail = {
|
||||
address = "pselby@gmail.com";
|
||||
flavor = "gmail.com";
|
||||
realName = "Peter Selby";
|
||||
};
|
||||
};
|
||||
|
||||
home = {
|
||||
packages = if enable-gui then (common-packages ++ gui-packages)
|
||||
else
|
||||
|
@ -227,5 +214,5 @@ in {
|
|||
};
|
||||
|
||||
systemd.user.tmpfiles.rules =
|
||||
map (dir: "d ${home-dir}/${dir} 700 niten - - -") ensure-directories;
|
||||
map (dir: "d ${home-dir}/${dir} 700 ${username} - - -") ensure-directories;
|
||||
}
|
||||
|
|
|
@ -0,0 +1,107 @@
|
|||
{
|
||||
doom-emacs,
|
||||
niten-doom-config,
|
||||
config,
|
||||
lib,
|
||||
pkgs,
|
||||
username,
|
||||
user-email,
|
||||
home-dir,
|
||||
...
|
||||
}:
|
||||
|
||||
with lib;
|
||||
let
|
||||
doom-emacs-package = pkgs.callPackage doom-emacs {
|
||||
doomPrivateDir = niten-doom-config;
|
||||
extraPackages = with pkgs.emacsPackages; [
|
||||
elpher
|
||||
use-package
|
||||
];
|
||||
emacsPackagesOverlay = final: prev: {
|
||||
irony = prev.irony.overrideAttrs (esuper: {
|
||||
buildInputs = with pkgs;
|
||||
esuper.buildInputs ++
|
||||
[ cmake libclang clang ];
|
||||
});
|
||||
};
|
||||
};
|
||||
|
||||
common-packages = with pkgs; [
|
||||
atop
|
||||
btrfs-progs
|
||||
cdrtools
|
||||
curl
|
||||
doom-emacs-package
|
||||
file
|
||||
git
|
||||
gnutls
|
||||
gnupg
|
||||
guile
|
||||
iptables
|
||||
lsof
|
||||
lshw
|
||||
mtr
|
||||
nix-prefetch-git
|
||||
nmap
|
||||
pciutils
|
||||
pwgen
|
||||
tmux
|
||||
unzip
|
||||
];
|
||||
|
||||
ensure-directories = [ ".emacs.d/.local/etc/eshell" ];
|
||||
|
||||
in {
|
||||
|
||||
programs = {
|
||||
bash = {
|
||||
enable = true;
|
||||
enableVteIntegration = true;
|
||||
};
|
||||
|
||||
git = {
|
||||
enable = true;
|
||||
userName = username;
|
||||
userEmail = user-email;
|
||||
ignores = [ "*~" ];
|
||||
extraConfig.pull.rebase = false;
|
||||
};
|
||||
};
|
||||
|
||||
services = {
|
||||
emacs = {
|
||||
enable = true;
|
||||
package = doom-emacs-package;
|
||||
client = {
|
||||
enable = true;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
home = {
|
||||
packages = common-packages;
|
||||
|
||||
file = {
|
||||
# For nixified emacs
|
||||
".emacs.d/init.el".text = ''
|
||||
(load "default.el")
|
||||
|
||||
(setq package-archives nil)
|
||||
(package-initialize)
|
||||
'';
|
||||
};
|
||||
|
||||
sessionVariables = {
|
||||
# EDITOR = "${doom-emacs}/bin/emacsclient -t";
|
||||
ALTERNATE_EDITOR = "";
|
||||
|
||||
DOOM_EMACS_SITE_PATH = "${niten-doom-config}/site.d";
|
||||
|
||||
HISTCONTROL = "ignoredups:ignorespace";
|
||||
};
|
||||
};
|
||||
|
||||
systemd.user.tmpfiles.rules =
|
||||
map (dir: "d ${home-dir}/${dir} 700 root - - -") ensure-directories;
|
||||
}
|
Loading…
Reference in New Issue