This commit is contained in:
Jacob Hrbek 2021-07-03 12:00:33 +02:00
parent 50f8176e0c
commit 0b150582e4
6 changed files with 63 additions and 12 deletions

1
.gitignore vendored Normal file
View File

@ -0,0 +1 @@
/result

14
Makefile.toml Normal file
View File

@ -0,0 +1,14 @@
[env]
project_environment = { value = "production", condition = { env_not_set = ["development"] }}
[tasks.deploy]
description = "Deploy configuration on the system"
category = "Administration"
command = "home-manager"
args = ["switch"]
[task.upload]
description = "Upload to repository hosters"
category = "Administration"
command = "git"
args = [ "push dotya central" ]

View File

@ -7,27 +7,47 @@
{ config, lib, ... }:
let
# Global variables
homeNixDir = "$HOME/.local/share/home-manager";
## NOTE(Krey): Uses `lib.splitString` to remove trailing new-line
## FIXME(Krey): Doesn't work
#hostname = lib.head (lib.splitString "\n" (builtins.readFile /etc/hostname));
#hostname = "leonid";
#domain = "domain";
# NOTE(Krey): Decide what to do with this
#homeNixDir = "$HOME/.local/share/home-manager";
# NOTE(Krey): Handling of https://github.com/NixOS/nixpkgs/issues/128286
nixFilesIn = path:
let
names = lib.filter (lib.hasSuffix ".nix") (lib.attrNames (builtins.readDir path));
in
map (x: path + "/${x}") names;
#nixFilesIn = path:
# let
# names = lib.filter (lib.hasSuffix ".nix") (lib.attrNames (builtins.readDir path));
# in
# map (x: path + "/${x}") names;
in {
#networking.hostName = hostname;
#networking.domain = domain;
imports = [
(/. + "${homeNixDir}" + /users/kreyren.nix)
./machines/leonid.nix
# (/. + "/machines/" + "${config.networking.hostName}" + ".nix")
];
#++ nixFilesIn ./programs;
(import "${homeNixDir}/machines/${config.networking.hostName}.nix" {inherit homeNixDir;})
] ++ nixFilesIn "${homeNixDir}/programs/";
# Let Home Manager install and manage itself.
programs.home-manager.enable = true;
# Use preferred location for home-manager
programs.home-manager.path = "${homeNixDir}";
# Home Manager needs a bit of information about you and the
# paths it should manage.
home.username = "kreyren";
home.homeDirectory = "/home/kreyren";
home.stateVersion = "21.05";
# Global packages
programs.bash.enable = true;
programs.vim.enable = true;
programs.alacritty.enable = true;
programs.firefox.enable = true;
programs.gpg.enable = true;
programs.gnupg.enable = true;
programs.git.enable = true;
programs.htop.enable = true;
}
}

View File

@ -1,4 +1,7 @@
{ config, pkgs, ... }: {
# NOTE(Krey): Just so there is something here
programs.vim.enable = true;
# FIXME(Krey): Blocked by https://github.com/nix-community/home-manager/issues/2152
#programs.freetube.enable = true;
}

View File

@ -4,4 +4,10 @@
userEmail = "kreyren@fsfe.org";
# FIXME(Krey): Use tor for proxy if it's set up on the system
};
# NOTE(Krey): Fix for `No pinentry` error
programs.gnupg.agent = {
enableSSHSupport = true;
pinentryFlavor = "curses";
}
}

7
shell.nix Normal file
View File

@ -0,0 +1,7 @@
# NixOS shell configuration to bootstrap the required dependencies
# NOTE(Krey): Uses mozilla's overlay, because nix's upstream is slow
{ pkgs ? import <nixpkgs> {} }:
pkgs.mkShell {
nativeBuildInputs = [ pkgs.buildPackages.cargo-make ];
}