aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--configuration.nix23
-rw-r--r--packages.nix11
-rw-r--r--packages/bslock/pkg.nix25
m---------packages/bslock/source0
4 files changed, 40 insertions, 19 deletions
diff --git a/configuration.nix b/configuration.nix
index c2c32fa..1270a75 100644
--- a/configuration.nix
+++ b/configuration.nix
@@ -4,7 +4,9 @@
{ config, pkgs, ... }:
-{
+let
+ localPkgs = import ./packages/default.nix { pkgs = pkgs; };
+in {
imports = [
<home-manager/nixos>
./hardware-configuration.nix
@@ -18,8 +20,10 @@
};
# Network
- networking.hostName = "dickhead";
- networking.networkmanager.enable = true;
+ networking = {
+ hostName = "dickhead";
+ networkmanager.enable = true;
+ };
virtualisation.docker.enable = true;
@@ -58,16 +62,5 @@
sound.enable = true;
# hardware.pulseaudio.enable = true;
- #programs.gnupg.agent = {
- #enable = true;
- #enableSSHSupport = false;
- #};
-
- # This value determines the NixOS release from which the default
- # settings for stateful data, like file locations and database versions
- # on your system were taken. It‘s perfectly fine and recommended to leave
- # this value at the release version of the first install of this system.
- # Before changing this value read the documentation for this option
- # (e.g. man configuration.nix or on https://nixos.org/nixos/options.html).
- system.stateVersion = "20.09"; # Did you read the comment?
+ system.stateVersion = "20.09";
}
diff --git a/packages.nix b/packages.nix
index d26c418..d77e751 100644
--- a/packages.nix
+++ b/packages.nix
@@ -1,4 +1,4 @@
-{ pkgs, ... }:
+{ pkgs, config, ... }:
let
localPkgs = import ./packages/default.nix { pkgs = pkgs; };
@@ -10,11 +10,9 @@ let
localPkgs.st
localPkgs.dmenu
localPkgs.anypinentry
+ localPkgs.bslock
];
- # security.setuidPrograms = [ "bslock" ];
- # security.wrappers.bslock.source = "${bslock.out}/bin/bslock";
-
devPackages = with pkgs; [
# Dev
neovim
@@ -93,4 +91,9 @@ in {
# Packages
environment.systemPackages = devPackages ++ customPackages ++ apps ++ utils;
+
+ # Security wrappers
+ security.wrappers = {
+ bslock.source = "${localPkgs.bslock}/bin/bslock";
+ };
}
diff --git a/packages/bslock/pkg.nix b/packages/bslock/pkg.nix
new file mode 100644
index 0000000..98ae7b5
--- /dev/null
+++ b/packages/bslock/pkg.nix
@@ -0,0 +1,25 @@
+{ stdenv, xorgproto, libX11, libXinerama, libXext, libXrandr }:
+with stdenv.lib;
+
+let
+ user = "imsohexy";
+ group = "users";
+in stdenv.mkDerivation rec {
+ name = "local-bslock-${version}";
+ version = "0.0.1";
+
+ src = ./source;
+
+ buildInputs = [ xorgproto libX11 libXinerama libXext libXrandr ];
+
+ unpackPhase = ''cp -r $src/* .'';
+
+ postPatch = "
+ # sed -e 's/@@user/${user}/' -e 's/@@group/${group}/' -i config.def.h;
+ sed -i '/chmod u+s/d' Makefile;
+ ";
+
+ buildPhase = ''make'';
+
+ installPhase = ''make PREFIX=$out DESTDIR="" install'';
+}
diff --git a/packages/bslock/source b/packages/bslock/source
new file mode 160000
+Subproject 7a494a619ce169b56bd37db2ef69cd09c63c643