Compare commits

...

2 Commits

Author SHA1 Message Date
2ff04267b6 update readme
Signed-off-by: Amneesh Singh <natto@weirdnatto.in>
2022-12-08 01:17:48 +05:30
e6cb5b2615 ran nixpkgs-fmt
Signed-off-by: Amneesh Singh <natto@weirdnatto.in>
2022-12-08 01:11:53 +05:30
19 changed files with 89 additions and 102 deletions

View File

@@ -2,32 +2,7 @@
#+AUTHOR: Amneesh Singh
#+OPTIONS: toc:nil num:nil
#+begin_src sh
├───homeConfigurations: unknown
├───legacyPackages
warning: │ ├───aarch64-linux: omitted (use '--legacy' to show)
warning: │ └───x86_64-linux: omitted (use '--legacy' to show)
└───nixosConfigurations
├───Marisa: NixOS configuration
├───Remilia: NixOS configuration
└───Satori: NixOS configuration
#+end_src
* TODOs
+ TODO Add user specific traditional dotfiles.
+ DONE Try home-manager
+ DONE Try nix flakes
* How install workey
Either do
#+begin_src sh
cd dotfiles
nixos-rebuild switch --flake .
#+end_src
or
#+begin_src sh
nixos-rebuild switch --flake "git+https://git.weirdnatto.in/natto1784/dotfiles?ref=nixos"
#+end_src
NixOS configurations for several hosts, now with [[https://flake.parts][flake-parts]].
* How home-manager workey
Just do
@@ -38,7 +13,7 @@ nix run nixpkgs#home-manager switch -- --flake "git+https://git.weirdnatto.in/na
* How packages workey
To build or run any of the packages in this flake do
#+begin_src sh
nix <"run"/"build"> "git+https://git.weirdnatto.in/natto1784/dotfiles?ref=nixos"#pkgs.<your_arch>.<package_name>
nix <"run"/"build"> "git+https://git.weirdnatto.in/natto1784/dotfiles?ref=nixos"#<package_name>
#+end_src
-----

View File

@@ -59,12 +59,13 @@ let
};
};
});
in {
in
{
options.age = {
secrets = mkOption {
type = types.attrsOf secretType;
default = {};
default = { };
description = ''
Attrset of secrets.
'';
@@ -78,9 +79,9 @@ in {
'';
};
};
config = mkIf (cfg.secrets != {}) {
config = mkIf (cfg.secrets != { }) {
assertions = [{
assertion = cfg.sshKeyPaths != [];
assertion = cfg.sshKeyPaths != [ ];
message = "age.sshKeyPaths must be set.";
}];
home.activation = {

View File

@@ -24,11 +24,13 @@
target = "${xdg.configHome}/mpv/mpv.conf";
};
packages = {
text = let
text =
let
packages = builtins.map (p: "${p.name}") config.home.packages;
sortedUnique = builtins.sort builtins.lessThan (lib.unique packages);
formatted = builtins.concatStringsSep "\n" sortedUnique;
in formatted;
in
formatted;
target = "${xdg.configHome}/${config.home.username}-packages";
};
};

View File

@@ -1,4 +1,4 @@
{config, pkgs, ...}:
{ config, pkgs, ... }:
{
imports =
[

View File

@@ -5,12 +5,14 @@
{
fileSystems."/" =
{ device = "/dev/disk/by-label/NIXOS_SD";
{
device = "/dev/disk/by-label/NIXOS_SD";
fsType = "ext4";
};
fileSystems."/nix/store" =
{ device = "/nix/store";
{
device = "/nix/store";
fsType = "none";
options = [ "bind" ];
};

View File

@@ -6,9 +6,14 @@
allowedTCPPorts = [
22 # ssh
80 # http
6060 4444 5454 8080 #????
6060
4444
5454
8080 #????
5001 #gitea
8800 4646 8500 #vault nomad consul
8800
4646
8500 #vault nomad consul
8888 #simpler-filehost1
6666 #concourse
202 #gitea-ssh

View File

@@ -1,4 +1,4 @@
{inputs, config, pkgs, ... }:
{ inputs, config, pkgs, ... }:
{
programs.neovim = {

View File

@@ -3,7 +3,7 @@
with lib;
let
cfg = config.services.vault-agent;
json = pkgs.formats.json {};
json = pkgs.formats.json { };
in
{
options = {
@@ -20,7 +20,7 @@ in
settings = mkOption {
type = json.type;
default = {};
default = { };
description = ''
Settings for the agent
'';

View File

@@ -1,12 +1,12 @@
{config, ...}:
{ config, ... }:
{
nix.buildMachines = [ {
nix.buildMachines = [{
hostName = "satori";
systems = ["x86_64-linux" "aarch64-linux"];
systems = [ "x86_64-linux" "aarch64-linux" ];
maxJobs = 4;
speedFactor = 2;
supportedFeatures = [ "nixos-test" "benchmark" "big-parallel" "kvm" ];
}] ;
}];
nix.distributedBuilds = true;
nix.extraOptions = ''
builders-use-substitutes = true

View File

@@ -1,4 +1,4 @@
{config, ...}:
{ config, ... }:
{
boot = {
kernel.sysctl."net.ipv4.ip_forward" = 1;

View File

@@ -1,4 +1,4 @@
{lib, config, ...}:
{ lib, config, ... }:
{
imports =
[

View File

@@ -2,17 +2,19 @@
{
imports =
[ (modulesPath + "/profiles/qemu-guest.nix")
[
(modulesPath + "/profiles/qemu-guest.nix")
];
fileSystems."/" =
{ device = "/dev/disk/by-uuid/d91adce2-9059-4a8a-86e7-dee6ecc85b2b";
{
device = "/dev/disk/by-uuid/d91adce2-9059-4a8a-86e7-dee6ecc85b2b";
fsType = "ext4";
};
swapDevices = [
{
device="/swapfile";
device = "/swapfile";
size = 7168;
priority = 0;
}

View File

@@ -1,4 +1,4 @@
{ lib, config, ...}:
{ lib, config, ... }:
{
imports =
[

View File

@@ -1,4 +1,3 @@
{ config, lib, ... }:
#let
@@ -11,7 +10,7 @@
services = {
xserver = {
enable = true;
libinput= {
libinput = {
enable = true;
mouse = {
accelSpeed = "0";
@@ -21,7 +20,7 @@
middleEmulation = false;
clickMethod = "buttonareas";
tapping = true;
naturalScrolling =true;
naturalScrolling = true;
};
};
displayManager = {

View File

@@ -1,4 +1,4 @@
{lib, stdenvNoCC, fetchFromGitHub}:
{ lib, stdenvNoCC, fetchFromGitHub }:
stdenvNoCC.mkDerivation {
name = "customscripts";
@@ -8,5 +8,5 @@ stdenvNoCC.mkDerivation {
mkdir -p $out/bin
cp -r $src/* $out/bin
chmod -R +x $out/bin/*
'';
'';
}

View File

@@ -1,6 +1,7 @@
final: prev:
let
call = prev.callPackage; in
call = prev.callPackage;
in
{
customscripts = call ./customscripts { };
tlauncher = call ./tlauncher { };