Compare commits

...

16 Commits

Author SHA1 Message Date
niten 9e5ca132cf Remove unnecessary dependency for irony 2021-11-29 16:13:42 -08:00
niten 76bd02b24e Add manix for nixos docs 2021-11-26 23:33:55 -08:00
niten 7744f675a1 Updated flakes 2021-11-18 09:12:17 -08:00
niten 887a14bfa9 Never a gui for root 2021-11-15 16:29:13 -08:00
niten 2c1edb71fe Got rid of redundant variable 2021-11-15 16:26:38 -08:00
niten 63c2fdd679 Forget email, it never worked anyway 2021-11-15 16:25:19 -08:00
niten 6b04af4689 Add custom config for root. 2021-11-15 16:23:33 -08:00
niten d1b245e42d Treat root specially 2021-11-15 16:13:28 -08:00
niten 96e9d01281 Generate config for root 2021-11-15 16:08:58 -08:00
niten 8aa670951a Added faudio 2021-11-13 10:30:16 -08:00
niten 560c16a650 Added winetricks 2021-11-07 14:53:10 -08:00
niten bb1f864d45 Switch from redshift to gammastep.
Redshift was flickering like crazy.
2021-11-05 19:33:24 -07:00
niten 7d7f95b1c2 Added element matrix client 2021-10-29 10:29:10 -07:00
niten 1ba24b9571 Apparently this build is broken 2021-10-17 13:53:32 -07:00
niten b4524c5145 Oops, move programs out of home 2021-10-17 13:50:03 -07:00
niten a9a9785f9e Enable Firefox Gnome extensions 2021-10-17 13:46:01 -07:00
4 changed files with 177 additions and 75 deletions

View File

@ -182,14 +182,16 @@
}, },
"home-manager": { "home-manager": {
"inputs": { "inputs": {
"nixpkgs": "nixpkgs_2" "nixpkgs": [
"nixpkgs"
]
}, },
"locked": { "locked": {
"lastModified": 1633291410, "lastModified": 1637019201,
"narHash": "sha256-IxUzCGwj+s2Rn/+u0NtY36ix5I8MopMOO8Ip59PnBlw=", "narHash": "sha256-lq4gz51fx4m5FXfx1SCB444aEBeaYtLMVm3P18Wi9ls=",
"owner": "nix-community", "owner": "nix-community",
"repo": "home-manager", "repo": "home-manager",
"rev": "382505714d10c6791a96712e0554587c75c5bf8b", "rev": "bcf03fa16a1f06b8a0abb27bf49afa8d6fffe8f1",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -202,11 +204,11 @@
"niten-doom-config": { "niten-doom-config": {
"flake": false, "flake": false,
"locked": { "locked": {
"lastModified": 1628274414, "lastModified": 1633712607,
"narHash": "sha256-EIGqjTHcYnjVXceY1tpjaYxNmORh8NNiL2FVWCI5sBo=", "narHash": "sha256-6PAw7Xvoj4JROeTqK1nhT2zv7bPpiQlm9t7H5HQ0f2k=",
"ref": "master", "ref": "master",
"rev": "0ab1532c856ccdb6ce46c5948054279f439eb1f2", "rev": "0a4f8ce4121ba3d64d29b0d52733c08febfb83d8",
"revCount": 34, "revCount": 35,
"type": "git", "type": "git",
"url": "https://git.fudo.org/niten/doom-emacs.git" "url": "https://git.fudo.org/niten/doom-emacs.git"
}, },
@ -249,15 +251,16 @@
}, },
"nixpkgs_2": { "nixpkgs_2": {
"locked": { "locked": {
"lastModified": 1633381874, "lastModified": 1636944046,
"narHash": "sha256-RkoVeo4K1IKqQzCI9W28UOyw4ic3Lhb3XoMDFDp7X74=", "narHash": "sha256-74KLDsiWSBsYXKj/ql9EGbw1TbIJRE7clFkhl30HV/c=",
"owner": "NixOS", "owner": "NixOS",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "35b808214a1ca158a04d6980cb95cc1a77ce1f94", "rev": "46251a79f752ae1d46ef733e8e9760b6d3429da4",
"type": "github" "type": "github"
}, },
"original": { "original": {
"id": "nixpkgs", "id": "nixpkgs",
"ref": "nixos-21.05",
"type": "indirect" "type": "indirect"
} }
}, },
@ -377,7 +380,8 @@
"inputs": { "inputs": {
"doom-emacs": "doom-emacs", "doom-emacs": "doom-emacs",
"home-manager": "home-manager", "home-manager": "home-manager",
"niten-doom-config": "niten-doom-config" "niten-doom-config": "niten-doom-config",
"nixpkgs": "nixpkgs_2"
} }
}, },
"rotate-text": { "rotate-text": {

View File

@ -6,7 +6,7 @@ with lib;
let let
user-configs = { user-configs = {
niten = ./niten.nix; niten = ./niten.nix;
root = ./niten.nix; root = ./root.nix;
viator = ./niten.nix; viator = ./niten.nix;
xiaoxuan = ./xiaoxuan.nix; xiaoxuan = ./xiaoxuan.nix;
}; };
@ -14,19 +14,11 @@ let
hostname = config.instance.hostname; hostname = config.instance.hostname;
enable-gui = config.fudo.hosts.${hostname}.enable-gui; 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-users = let
local-usernames = attrNames config.instance.local-users; local-usernames = attrNames config.instance.local-users;
in filterAttrs in filterAttrs
(username: userOpts: elem username local-usernames) (username: userOpts: elem username local-usernames)
user-config-map; user-configs;
in { in {
config.home-manager = { config.home-manager = {
@ -50,6 +42,18 @@ in {
home-dir home-dir
enable-gui; 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";
};
};
}; };
} }

View File

@ -23,29 +23,29 @@ let
emacsPackagesOverlay = final: prev: { emacsPackagesOverlay = final: prev: {
irony = prev.irony.overrideAttrs (esuper: { irony = prev.irony.overrideAttrs (esuper: {
buildInputs = with pkgs; buildInputs = with pkgs;
esuper.buildInputs ++ esuper.buildInputs ++ [ clang libclang ];
[ cmake libclang clang ];
}); });
}; };
}; };
gui-packages = with pkgs; [ gui-packages = with pkgs; [
exodus element-desktop
firefox exodus
gnome.gnome-tweaks faudio
google-chrome gnome.gnome-tweaks
imagemagick google-chrome
jq imagemagick
minecraft jq
mplayer minecraft
nyxt mplayer
openttd nyxt
pv openttd
redshift pv
signal-desktop redshift
spotify signal-desktop
xclip spotify
]; xclip
];
common-packages = with pkgs; [ common-packages = with pkgs; [
ant ant
@ -61,10 +61,10 @@ let
clj2nix clj2nix
cmake cmake
curl curl
doom-emacs-package
enca enca
file file
fortune fortune
doom-emacs-package
git git
gnutls gnutls
gnupg gnupg
@ -77,6 +77,7 @@ let
lispPackages.quicklisp lispPackages.quicklisp
lsof lsof
lshw lshw
manix
mkpasswd mkpasswd
mtr mtr
nixfmt nixfmt
@ -97,6 +98,7 @@ let
texlive.combined.scheme-basic texlive.combined.scheme-basic
tmux tmux
unzip unzip
winetricks
yubikey-manager yubikey-manager
yubikey-personalization yubikey-personalization
youtube-dl youtube-dl
@ -115,7 +117,11 @@ let
in { in {
programs = { programs = {
bash.enable = true; bash = {
enable = true;
enableVteIntegration = true;
};
git = { git = {
enable = true; enable = true;
userName = username; userName = username;
@ -123,6 +129,16 @@ in {
ignores = [ "*~" ]; ignores = [ "*~" ];
extraConfig.pull.rebase = false; extraConfig.pull.rebase = false;
}; };
firefox = {
enable = enable-gui;
## Some perm change error?
# package = (pkgs.firefox.override {
# cfg = {
# enableGnomeExtensions = true;
# };
# });
};
}; };
xresources.properties = mkIf enable-gui { xresources.properties = mkIf enable-gui {
@ -145,44 +161,15 @@ in {
gpg-agent.enable = true; gpg-agent.enable = true;
gnome-keyring.enable = true; gnome-keyring.enable = enable-gui;
redshift = { gammastep = {
enable = true; enable = true;
latitude = "47"; latitude = "47";
longitude = "122"; 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 = { home = {
packages = if enable-gui then (common-packages ++ gui-packages) packages = if enable-gui then (common-packages ++ gui-packages)
else else
@ -227,5 +214,5 @@ in {
}; };
systemd.user.tmpfiles.rules = systemd.user.tmpfiles.rules =
map (dir: "d ${home-dir}/${dir} 700 niten - - -") ensure-directories; map (dir: "d ${home-dir}/${dir} 700 ${username} - - -") ensure-directories;
} }

107
root.nix Normal file
View File

@ -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;
}