aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAkshay Nair <phenax5@gmail.com>2021-02-17 23:30:14 +0530
committerAkshay Nair <phenax5@gmail.com>2021-02-17 23:30:14 +0530
commit24589a4689ec7c4a3c722daeece04d76dd5b7f12 (patch)
tree6b3953b88f75a60c34f79946d1ccfb3e5b030324
parent10ef9ed4d2594679c38c46703f863419c9f0ada4 (diff)
downloadnixos-config-24589a4689ec7c4a3c722daeece04d76dd5b7f12.tar.gz
nixos-config-24589a4689ec7c4a3c722daeece04d76dd5b7f12.zip
Moves configuration around to modules
-rw-r--r--configuration.nix41
-rw-r--r--home.nix49
-rw-r--r--modules/git.home.nix38
-rw-r--r--modules/music.home.nix (renamed from modules/music.nix)0
-rw-r--r--modules/torrent.home.nix35
5 files changed, 93 insertions, 70 deletions
diff --git a/configuration.nix b/configuration.nix
index c2d900b..699a5e5 100644
--- a/configuration.nix
+++ b/configuration.nix
@@ -13,6 +13,7 @@ in {
./packages.nix
./overlays-system.nix
./login.nix
+ ./modules/torrent.home.nix
];
nixpkgs.config = {
@@ -27,7 +28,10 @@ in {
extraHosts = '''';
};
- virtualisation.docker.enable = true;
+ virtualisation = {
+ docker.enable = true;
+ lxd.enable = true;
+ };
# I18n and keyboard layout
time.timeZone = "Asia/Kolkata";
@@ -40,35 +44,6 @@ in {
home = { stateVersion = "21.03"; };
};
- services.transmission = {
- enable = true;
- settings = {
- "download-dir" = "/home/imsohexy/Downloads/dl";
- "download-queue-enabled" = true;
- "download-queue-size" = 5;
- "incomplete-dir" = "/home/imsohexy/Downloads/dl/incomplete";
- "incomplete-dir-enabled" = true;
- "peer-port" = 51413;
- "peer-port-random-high" = 65535;
- "peer-port-random-low" = 49152;
- "prefetch-enabled" = true;
- "rename-partial-files" = true;
- "rpc-authentication-required" = false;
- "rpc-bind-address" = "127.0.0.1";
- "rpc-enabled" = true;
- "rpc-port" = 9091;
- "rpc-whitelist-enabled" = true;
- "script-torrent-done-enabled" = false;
- "script-torrent-done-filename" = "";
- "start-added-torrents" = true;
- "trash-original-torrent-files" = false;
- "umask" = 18;
- "utp-enabled" = true;
- "watch-dir" = "/home/an/Downloads/qute";
- "watch-dir-enabled" = false;
- };
- };
-
# X11 config
services.xserver = {
enable = true;
@@ -76,8 +51,10 @@ in {
displayManager.startx.enable = true;
libinput = {
enable = true;
- tapping = true;
- naturalScrolling = false;
+ touchpad = {
+ tapping = true;
+ naturalScrolling = false;
+ };
};
};
fonts.fonts = with pkgs; [
diff --git a/home.nix b/home.nix
index 06edb7f..a70e8ca 100644
--- a/home.nix
+++ b/home.nix
@@ -1,55 +1,28 @@
-{ config, pkgs, ... }:
+{ config, pkgs, epkgs, ... }:
let
localPkgs = import ./packages/default.nix { pkgs = pkgs; };
in {
imports = [
- ./modules/music.nix
./overlays-home.nix
+ ./modules/music.home.nix
+ ./modules/git.home.nix
];
home.packages = with pkgs; [
yarn
];
- programs.lsd = {
+ programs.emacs = {
enable = true;
- enableAliases = true;
+ };
+ services.emacs = {
+ enable = true;
+ client.enable = true;
};
- programs.git = {
+ programs.lsd = {
enable = true;
- userEmail = "phenax5@gmail.com";
- userName = "Akshay Nair";
- ignores = [
- "tags"
- ".vim.session"
- "tags.lock"
- "tags.temp"
- ];
- aliases = {
- ignore = "!gi() { curl -sL https://www.toptal.com/developers/gitignore/api/$@ ;}; gi";
- };
- extraConfig = {
- "color" = {
- "ui" = true;
- };
- "color \"diff-highlight\"" = {
- oldNormal = "red bold";
- oldHighlight = "red bold 52";
- newNormal = "green bold";
- newHighlight = "green bold 22";
- };
- "color \"diff\"" = {
- meta = 11;
- frag = "magenta bold";
- commit = "yellow bold";
- old = "red bold";
- new = "green bold";
- whitespace = "red reverse";
- };
- };
- #signing.key = "GPG-KEY-ID";
- #signing.signByDefault = true;
+ enableAliases = true;
};
services.syncthing = {
@@ -85,7 +58,7 @@ in {
#'';
};
- services.network-manager-applet.enable = true;
+ # services.network-manager-applet.enable = true;
xresources.properties = let
bg = "#0f0c19";
diff --git a/modules/git.home.nix b/modules/git.home.nix
new file mode 100644
index 0000000..440a7d5
--- /dev/null
+++ b/modules/git.home.nix
@@ -0,0 +1,38 @@
+{ config, pkgs, ... }:
+{
+ programs.git = {
+ enable = true;
+ userEmail = "phenax5@gmail.com";
+ userName = "Akshay Nair";
+ ignores = [
+ "tags"
+ ".vim.session"
+ "tags.lock"
+ "tags.temp"
+ ];
+ aliases = {
+ ignore = "!gi() { curl -sL https://www.toptal.com/developers/gitignore/api/$@ ;}; gi";
+ };
+ extraConfig = {
+ "color" = {
+ "ui" = true;
+ };
+ "color \"diff-highlight\"" = {
+ oldNormal = "red bold";
+ oldHighlight = "red bold 52";
+ newNormal = "green bold";
+ newHighlight = "green bold 22";
+ };
+ "color \"diff\"" = {
+ meta = 11;
+ frag = "magenta bold";
+ commit = "yellow bold";
+ old = "red bold";
+ new = "green bold";
+ whitespace = "red reverse";
+ };
+ };
+ #signing.key = "GPG-KEY-ID";
+ #signing.signByDefault = true;
+ };
+}
diff --git a/modules/music.nix b/modules/music.home.nix
index b7cc0d6..b7cc0d6 100644
--- a/modules/music.nix
+++ b/modules/music.home.nix
diff --git a/modules/torrent.home.nix b/modules/torrent.home.nix
new file mode 100644
index 0000000..99f43d6
--- /dev/null
+++ b/modules/torrent.home.nix
@@ -0,0 +1,35 @@
+{ config, pkgs, ... }:
+let
+ downloadsDir = "/home/imsohexy/Downloads/dl";
+ incompleteDownloadsDir = "/home/imsohexy/Downloads/dl/incomplete";
+ watchTorrentFilesOn = "/home/an/Downloads/qute";
+in {
+ services.transmission = {
+ enable = true;
+ settings = {
+ "download-dir" = downloadsDir;
+ "download-queue-enabled" = true;
+ "download-queue-size" = 5;
+ "incomplete-dir" = incompleteDownloadsDir;
+ "incomplete-dir-enabled" = true;
+ "peer-port" = 51413;
+ "peer-port-random-high" = 65535;
+ "peer-port-random-low" = 49152;
+ "prefetch-enabled" = true;
+ "rename-partial-files" = true;
+ "rpc-authentication-required" = false;
+ "rpc-bind-address" = "127.0.0.1";
+ "rpc-enabled" = true;
+ "rpc-port" = 9091;
+ "rpc-whitelist-enabled" = true;
+ "script-torrent-done-enabled" = false;
+ "script-torrent-done-filename" = "";
+ "start-added-torrents" = true;
+ "trash-original-torrent-files" = false;
+ "umask" = 18;
+ "utp-enabled" = true;
+ "watch-dir" = watchTorrentFilesOn;
+ "watch-dir-enabled" = false;
+ };
+ };
+}