Skip to content

Commit

Permalink
Change upgrade system
Browse files Browse the repository at this point in the history
  • Loading branch information
FaustXVI committed Jan 4, 2025
1 parent 26e6981 commit d94c251
Show file tree
Hide file tree
Showing 6 changed files with 20 additions and 20 deletions.
15 changes: 1 addition & 14 deletions flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -24,16 +24,14 @@
};
};

outputs = { self, nixpkgs, sops, nur, home-manager, disko, ... }@inputs:
outputs = { self, nixpkgs, sops, nur, home-manager, disko, ... }@inputs:
let
system = "x86_64-linux";
targets = [
"desktop-home"
"eove"
];
pkgs = import nixpkgs { inherit system; };
inputNames = builtins.filter (name: name != "self") (builtins.attrNames inputs);
inputUpdates = builtins.foldl' (acc: input: acc ++ [ "--update-input" (builtins.toString "${input}") ]) [ ] inputNames;
xadetPackages = import ./packages { inherit pkgs self disko system targets; };
nixosMachine = configFile: nixpkgs.lib.nixosSystem rec {
inherit system;
Expand All @@ -51,17 +49,6 @@
inputs.nixos-facter-modules.nixosModules.facter
"${./.}/machines/${configFile}.nix"
./modules
{
system = {
autoUpgrade = {
enable = true;
dates = "13:00";
persistent = true;
flake = "/home/xadet/nixos-configuration/flake.nix#${configFile}";
flags = [ "--refresh" ] ++ inputUpdates;
};
};
}
{
options = {
usedFlake = pkgs.lib.mkOption {
Expand Down
4 changes: 2 additions & 2 deletions install/iso.nix
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
{ self, system, nixpkgs, pkgs, targets, ... }:
let
scripts = builtins.map (target: self.packages."${system}"."install-script-${target}") targets;
scripts = builtins.map (target: self.packages."${system}"."install-script-${target}") targets;
in
(nixpkgs.lib.nixosSystem {
inherit system;
modules = [
"${nixpkgs}/nixos/modules/installer/cd-dvd/installation-cd-graphical-gnome.nix"
#"${nixpkgs}/nixos/modules/installer/cd-dvd/installation-cd-minimal.nix"
({config, ...}:{
({ config, ... }: {
isoImage = {
squashfsCompression = "gzip -Xcompression-level 1";
isoBaseName = "nixos-xadet-installer-${config.system.nixos.release}";
Expand Down
2 changes: 1 addition & 1 deletion machines/desktop-home.nix
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ in
{
imports =
[
(import ./luks-interactive-login.nix {inherit device;})
(import ./luks-interactive-login.nix { inherit device; })
];
xadetComputer = {
type = "desktop";
Expand Down
4 changes: 2 additions & 2 deletions machines/eove.nix
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,13 @@

let
nixos-hardware = inputs.nixos-hardware;
suitable_disk = builtins.head (builtins.filter (d: d ? "bus_type" && ! builtins.any (s: s == "usb" ) d.class_list) config.facter.report.hardware.disk);
suitable_disk = builtins.head (builtins.filter (d: d ? "bus_type" && ! builtins.any (s: s == "usb") d.class_list) config.facter.report.hardware.disk);
device = suitable_disk.unix_device_name;
in
{
imports =
[
(import ./luks-interactive-login.nix {inherit device;})
(import ./luks-interactive-login.nix { inherit device; })
];
facter.reportPath = ./facter-eove.json;

Expand Down
2 changes: 1 addition & 1 deletion modules/hardware/keyboard.nix
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

{
console = {
earlySetup =true;
earlySetup = true;
useXkbConfig = true;
};
services = {
Expand Down
13 changes: 13 additions & 0 deletions modules/system/upgrade.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
{ config, ... }:

{
system = {
autoUpgrade = {
enable = true;
dates = "13:00";
persistent = true;
flake = "/home/xadet/nixos-configuration#${config.usedFlake}";
flags = [ "--refresh" "--recreate-lock-file" ];
};
};
}

0 comments on commit d94c251

Please sign in to comment.