diff --git a/Justfile b/Justfile index 5b66483..de2e276 100755 --- a/Justfile +++ b/Justfile @@ -1,9 +1,18 @@ _DEFAULT_VERSION_TMPL: echo "{{invocation_directory()}}/nix/variables/versions.tmpl.nix" +_DEFAULT_VERSION: + echo "{{invocation_directory()}}/nix/variables/versions.nix" + _usage: just -l +update-default-versions: + #!/usr/bin/env bash + template="$(just _DEFAULT_VERSION_TMPL)" + outfile="$(just _DEFAULT_VERSION)" + esh -o ${outfile} ${template} + _get_nix_path versionsPath: echo $(set -x; nix-build --no-link --show-trace {{invocation_directory()}}/nix/default.nix -A channelSources --argstr versionsPath {{versionsPath}} --argstr rebuildarg "dummy") @@ -106,6 +115,10 @@ update-this-device rebuild-mode='switch': template=nix/os/devices/$(hostname -s)/versions.tmpl.nix outfile=nix/os/devices/$(hostname -s)/versions.nix + if ! test -e ${template}; then + template="$(just _DEFAULT_VERSION_TMPL)" + fi + esh -o ${outfile} ${template} if ! test "$(git diff ${outfile})"; then echo Already on latest versions diff --git a/nix/default.nix b/nix/default.nix index 1bead1c..2d730ca 100644 --- a/nix/default.nix +++ b/nix/default.nix @@ -22,6 +22,7 @@ [ "nixos" (mkChannelSource "channelsNixosStable" + "/nixos") ] [ "channels-nixos-stable" (mkChannelSource "channelsNixosStable") ] [ "channels-nixos-unstable" (mkChannelSource "channelsNixosUnstable") ] + [ "nixpkgs-master" (mkChannelSource "nixpkgsMaster") ] [ "home-manager-module" (mkChannelSource "homeManagerModule") ] ]; in (import (mkChannelSource "channelsNixosStable") {}).writeText "channels.rc" '' diff --git a/nix/home-manager/configuration/graphical-fullblown.nix b/nix/home-manager/configuration/graphical-fullblown.nix index 9ce39a0..b5ab574 100644 --- a/nix/home-manager/configuration/graphical-fullblown.nix +++ b/nix/home-manager/configuration/graphical-fullblown.nix @@ -5,6 +5,7 @@ let # gitpkgs = import /home/steveej/src/github/NixOS/nixpkgs {}; unstablepkgs = import { config = config.nixpkgs.config; }; + masterpkgs = import { config = config.nixpkgs.config; }; in { imports = [ @@ -136,7 +137,7 @@ in { hexchat aspellDicts.en aspellDicts.de - skype + unstablepkgs.skype zoom-us unstablepkgs.bluejeans-gui thunderbird @@ -145,7 +146,7 @@ in { gnome3.cheese # Virtualization - virtmanager + masterpkgs.virtmanager (pkgs.lib.hiPrio qemu) # virtualbox vagrant diff --git a/nix/home-manager/profiles/qtile-desktop.nix b/nix/home-manager/profiles/qtile-desktop.nix index e1c31b3..1301da0 100644 --- a/nix/home-manager/profiles/qtile-desktop.nix +++ b/nix/home-manager/profiles/qtile-desktop.nix @@ -31,9 +31,10 @@ let exit 1 ;; esac - ''; + terminal = "${pkgs.gnome3.gnome_terminal}/bin/gnome-terminal"; + qtileConfig = pkgs.writeScript "qtile_config.py" '' from libqtile.config import Key, Screen, Group, Drag, Click from libqtile.command import lazy @@ -97,9 +98,9 @@ key_control = "control" keys = [ # https://github.com/qtile/qtile/blob/develop/libqtile/xkeysyms.py - Key([key_super], "Return", lazy.spawn("${pkgs.roxterm}/bin/roxterm")), - Key([key_super], "backslash", lazy.spawn("${pkgs.roxterm}/bin/roxterm")), - Key([key_super], "apostrophe", lazy.spawn("${pkgs.roxterm}/bin/roxterm")), + Key([key_super], "Return", lazy.spawn("${terminal}")), + Key([key_super], "backslash", lazy.spawn("${terminal}")), + Key([key_super], "apostrophe", lazy.spawn("${terminal}")), Key([key_super], "r", lazy.spawncmd()), Key([key_super], "w", lazy.window.kill()), diff --git a/nix/home-manager/programs/pass.nix b/nix/home-manager/programs/pass.nix index 39cdb19..5b892f5 100644 --- a/nix/home-manager/programs/pass.nix +++ b/nix/home-manager/programs/pass.nix @@ -4,8 +4,6 @@ { home.sessionVariables = { - EDITOR = "nvim"; - # required by pass-otp PASSWORD_STORE_EXTENSIONS_DIR = "$HOME/.nix-profile/lib/password-store/extensions"; PASSWORD_STORE_ENABLE_EXTENSIONS = "true"; diff --git a/nix/os/devices/steveej-t480s-work/system.nix b/nix/os/devices/steveej-t480s-work/system.nix index 7d3aa74..30b26d5 100644 --- a/nix/os/devices/steveej-t480s-work/system.nix +++ b/nix/os/devices/steveej-t480s-work/system.nix @@ -11,8 +11,14 @@ in { networking.hostName = "steveej-t480s-work"; # Define your hostname. # Used for testing local Openshift clusters - environment.etc."NetworkManager/dnsmasq.d/tectonic.conf".text = '' - server=/openshift.testing/192.168.126.1 + environment.etc."NetworkManager/dnsmasq.d/openshift.conf".text = + let + openshiftClusterName = "openshift-steveej"; + openshiftDomain = "openshift.testing"; + openshiftSubnetBase = "192.168.126"; + in '' + server=/${openshiftDomain}/${openshiftSubnetBase}.1 + address=/.apps.${openshiftClusterName}.${openshiftDomain}/${openshiftSubnetBase}.51 ''; networking.firewall.enable = lib.mkForce false; networking.firewall.checkReversePath = false; diff --git a/nix/os/devices/steveej-t480s-work/versions.nix b/nix/os/devices/steveej-t480s-work/versions.nix index a67d437..0d93e08 100644 --- a/nix/os/devices/steveej-t480s-work/versions.nix +++ b/nix/os/devices/steveej-t480s-work/versions.nix @@ -1,15 +1,20 @@ { channelsNixosStable = { ref = "nixos-19.03"; - rev = "3574dbb9767a2af89d07aeee79cadbdeb0964f84"; + rev = "1601f559e89ba71091faa26888711d4dd24c2d4d"; }; channelsNixosUnstable = { ref = "nixos-unstable"; - rev = "1222e289b5014d17884a8b1c99f220c5e3df0b14"; + rev = "7815c86c104a99417db844791dcda34fe7a7965f"; + }; + nixpkgsMaster = { + url = "https://github.com/NixOS/nixpkgs/"; + ref = "master"; + rev = "aa2f3eb8b102ffed4258a7e7fbc0a7d17b7ba319"; }; homeManagerModule = { url = "https://github.com/rycee/home-manager"; ref = "master"; - rev = "95e36dfe74b8d161c28601e33646e2d636026f83"; + rev = "cf0aad391c10473fa7613dcc41b1f6a366d03148"; }; } diff --git a/nix/os/devices/steveej-t480s-work/versions.tmpl.nix b/nix/os/devices/steveej-t480s-work/versions.tmpl.nix deleted file mode 100644 index 93b44b8..0000000 --- a/nix/os/devices/steveej-t480s-work/versions.tmpl.nix +++ /dev/null @@ -1,15 +0,0 @@ -{ - channelsNixosStable = { - ref = "nixos-19.03"; - rev = "<% git ls-remote https://github.com/nixos/nixpkgs-channels nixos-19.03 | awk '{ print $1 }' | tr -d '\n' -%>"; - }; - channelsNixosUnstable = { - ref = "nixos-unstable"; - rev = "<% git ls-remote https://github.com/nixos/nixpkgs-channels nixos-unstable | awk '{ print $1 }' | tr -d '\n' -%>"; - }; - homeManagerModule = { - url = "https://github.com/rycee/home-manager"; - ref = "master"; - rev = "<% git ls-remote https://github.com/rycee/home-manager.git master | awk '{ print $1 }' | tr -d '\n' -%>"; - }; -} diff --git a/nix/os/profiles/graphical/system.nix b/nix/os/profiles/graphical/system.nix index ee322df..287a6d5 100644 --- a/nix/os/profiles/graphical/system.nix +++ b/nix/os/profiles/graphical/system.nix @@ -109,4 +109,6 @@ services.samba.extraConfig = '' client max protocol = SMB3 ''; + + services.logind.lidSwitchExternalPower = "ignore"; } diff --git a/nix/variables/versions.nix b/nix/variables/versions.nix index 75928de..3d8fc1c 100644 --- a/nix/variables/versions.nix +++ b/nix/variables/versions.nix @@ -1,15 +1,20 @@ { channelsNixosStable = { - ref = "nixos-18.09"; - rev = "7e88992a8c7b2de0bcb89182d8686b27bd93e46a"; + ref = "nixos-19.03"; + rev = "3a4ffdd38b56801ce616aa08791121d36769e884"; }; channelsNixosUnstable = { ref = "nixos-unstable"; - rev = "44b02b52ea6a49674f124f50009299f192ed78bb"; + rev = "07b42ccf2de451342982b550657636d891c4ba35"; + }; + nixpkgsMaster = { + url = "https://github.com/NixOS/nixpkgs/"; + ref = "master"; + rev = "d8c7f0bd3f42bc9e687b12ce7f0a4ef747f27933"; }; homeManagerModule = { - url = "https://github.com/rycee/home-manager/"; - ref = "release-18.09"; - rev = "dd94a849df69fe62fe2cb23a74c2b9330f1189ed"; + url = "https://github.com/rycee/home-manager"; + ref = "master"; + rev = "03162970cd6dadfac58f169cd50aed5a5aeec14f"; }; } diff --git a/nix/variables/versions.tmpl.nix b/nix/variables/versions.tmpl.nix index 93b44b8..9f35d77 100644 --- a/nix/variables/versions.tmpl.nix +++ b/nix/variables/versions.tmpl.nix @@ -7,6 +7,11 @@ ref = "nixos-unstable"; rev = "<% git ls-remote https://github.com/nixos/nixpkgs-channels nixos-unstable | awk '{ print $1 }' | tr -d '\n' -%>"; }; + nixpkgsMaster = { + url = "https://github.com/NixOS/nixpkgs/"; + ref = "master"; + rev = "<% git ls-remote https://github.com/NixOS/nixpkgs.git master | head -n1 | awk '{ print $1 }' | tr -d '\n' -%>"; + }; homeManagerModule = { url = "https://github.com/rycee/home-manager"; ref = "master";